public static long getTokenLongIntegerInternal(char[] buffer, int start, int end, int size) {
    { int length = end - start;
      int auxend = end;
      long result = 0l;
      boolean negativeP = false;
      int digit = 0;

      if (length < 0) {
        length = length + size;
        auxend = size;
      }
      switch (((char) (0x00ff & buffer[start]))) {
        case '+': 
          start = start + 1;
        break;
        case '-': 
          start = start + 1;
          negativeP = true;
        break;
        default:
        break;
      }
      loop000 : for (;;) {
        while (start < auxend) {
          digit = (int) (((char) (0x00ff & buffer[start]))) - (int) '0';
          if ((result >= Stella.$GET_TOKEN_LONG_INTEGER_CHECKPOINT$) &&
              (((Stella.MOST_POSITIVE_LONG_INTEGER - digit) / (10l)) < result)) {
            throw ((StellaException)(StellaException.newStellaException("get-token-long-integer: long-integer overflow").fillInStackTrace()));
          }
          result = (result * 10) + digit;
          start = start + 1;
        }
        if (auxend == end) {
          break loop000;
        }
        start = 0;
        auxend = end;
      }
      if (negativeP) {
        return (0 - result);
      }
      else {
        return (result);
      }
    }
  }