package java.lang;
public final class Integer extends Number implements java.lang.Comparable
{
public static final int MIN_VALUE = -2147483648;
public static final int MAX_VALUE = 2147483647;
public static final Class TYPE;
static final char[] digits;
static final char[] DigitTens;
static final char[] DigitOnes;
static final int[] sizeTable;
private final int value;
public static final int SIZE = 32;
private static final long serialVersionUID = 1360826667806852920l;
static final boolean $assertionsDisabled;
public static String toString(int i0, int i1)
{
char[] r0;
boolean $z1;
int i2, $i4;
label_0:
{
if (i1 >= 2 && i1 <= 36)
{
break label_0;
}
i1 = 10;
} //end label_0:
if (i1 != 10)
{
r0 = new char[33];
if (i0 >= 0)
{
$z1 = false;
}
else
{
$z1 = true;
}
i2 = SIZE;
if ( ! ($z1))
{
i0 = (- (i0));
}
while (i0 <= (- (i1)))
{
$i4 = i2;
i2--;
r0[$i4] = digits[(- (i0 % i1))];
i0 = i0 / i1;
}
r0[i2] = digits[(- (i0))];
if ($z1)
{
i2--;
r0[i2] = '-';
}
return new String(r0, i2, 33 - i2);
}
return Integer.toString(i0);
}
public static String toHexString(int i0)
{
return Integer.toUnsignedString(i0, 4);
}
public static String toOctalString(int i0)
{
return Integer.toUnsignedString(i0, 3);
}
public static String toBinaryString(int i0)
{
return Integer.toUnsignedString(i0, 1);
}
private static String toUnsignedString(int i0, int i1)
{
char[] r0;
int i2, i3, i4;
r0 = new char[SIZE];
i2 = SIZE;
i3 = 1 << i1;
i4 = i3 - 1;
do
{
i2--;
r0[i2] = digits[i0 & i4];
i0 = i0 >>> i1;
}
while (i0 != 0);
return new String(r0, i2, SIZE - i2);
}
public static String toString(int i0)
{
int $i4;
char[] r0;
if (i0 != MIN_VALUE)
{
if (i0 >= 0)
{
$i4 = Integer.stringSize(i0);
}
else
{
$i4 = Integer.stringSize((- (i0))) + 1;
}
r0 = new char[$i4];
Integer.getChars(i0, $i4, r0);
return new String(0, $i4, r0);
}
return "-2147483648";
}
static void getChars(int i0, int i1, char[] r0)
{
int i2, i4, i5, i11, i15, i19, i21;
char c3;
i2 = i1;
c3 = '\u0000';
if (i0 < 0)
{
c3 = '-';
i0 = (- (i0));
}
while (i0 >= 65536)
{
i4 = i0 / 100;
i5 = i0 - ((i4 << 6) + (i4 << 5) + (i4 << 2));
i0 = i4;
i11 = i2 + -1;
r0[i11] = DigitOnes[i5];
i2 = i11 + -1;
r0[i2] = DigitTens[i5];
}
do
{
i15 = i0 * 52429 >>> 19;
i19 = i0 - ((i15 << 3) + (i15 << 1));
i2--;
r0[i2] = digits[i19];
i0 = i15;
}
while (i0 != 0);
if (c3 != '\u0000')
{
i21 = i2 + -1;
r0[i21] = c3;
}
}
static int stringSize(int i0)
{
int i1;
for (i1 = 0; i0 > sizeTable[i1]; i1++)
{
}
return i1 + 1;
}
public static int parseInt(String r0, int i0) throws java.lang.NumberFormatException
{
int i1, i2, i3, i4, i6, i7, $i8, i10, $i12;
boolean z0;
char c5;
if (r0 != null)
{
if (i0 >= 2)
{
if (i0 <= 36)
{
i1 = 0;
z0 = false;
i2 = 0;
i3 = r0.length();
i4 = -2147483647;
if (i3 > 0)
{
c5 = r0.charAt(0);
if (c5 < '0')
{
if (c5 != '-')
{
if (c5 != '+')
{
throw NumberFormatException.forInputString(r0);
}
}
else
{
z0 = true;
i4 = MIN_VALUE;
}
if (i3 != 1)
{
i2++;
}
else
{
throw NumberFormatException.forInputString(r0);
}
}
i6 = i4 / i0;
while (i2 < i3)
{
$i8 = i2;
i2++;
i7 = Character.digit(r0.charAt($i8), i0);
if (i7 >= 0)
{
if (i1 >= i6)
{
i10 = i1 * i0;
if (i10 >= i4 + i7)
{
i1 = i10 - i7;
}
else
{
throw NumberFormatException.forInputString(r0);
}
}
else
{
throw NumberFormatException.forInputString(r0);
}
}
else
{
throw NumberFormatException.forInputString(r0);
}
}
if ( ! (z0))
{
$i12 = (- (i1));
}
else
{
$i12 = i1;
}
return $i12;
}
throw NumberFormatException.forInputString(r0);
}
else
{
throw new NumberFormatException((new StringBuilder()).append("radix ").append(i0).append(" greater than Character.MAX_RADIX").toString());
}
}
else
{
throw new NumberFormatException((new StringBuilder()).append("radix ").append(i0).append(" less than Character.MIN_RADIX").toString());
}
}
else
{
throw new NumberFormatException("null");
}
}
public static int parseInt(String r0) throws java.lang.NumberFormatException
{
return Integer.parseInt(r0, 10);
}
public static Integer valueOf(String r0, int i0) throws java.lang.NumberFormatException
{
return Integer.valueOf(Integer.parseInt(r0, i0));
}
public static Integer valueOf(String r0) throws java.lang.NumberFormatException
{
return Integer.valueOf(Integer.parseInt(r0, 10));
}
public static Integer valueOf(int i0)
{
if ( ! ($assertionsDisabled) && Integer$IntegerCache.high < 127)
{
throw new AssertionError();
}
if (i0 >= -128 && i0 <= Integer$IntegerCache.high)
{
return Integer$IntegerCache.cache[i0 + 128];
}
return new Integer(i0);
}
public Integer(int i0)
{
value = i0;
}
public Integer(String r1) throws java.lang.NumberFormatException
{
value = Integer.parseInt(r1, 10);
}
public byte byteValue()
{
return (byte) value;
}
public short shortValue()
{
return (short) value;
}
public int intValue()
{
return value;
}
public long longValue()
{
return (long) value;
}
public float floatValue()
{
return (float) value;
}
public double doubleValue()
{
return (double) value;
}
public String toString()
{
return Integer.toString(value);
}
public int hashCode()
{
return value;
}
public boolean equals(Object r1)
{
boolean $z1;
if ( ! (r1 instanceof Integer))
{
return false;
}
if (value != ((Integer) r1).intValue())
{
$z1 = false;
}
else
{
$z1 = true;
}
return $z1;
}
public static Integer getInteger(String r0)
{
return Integer.getInteger(r0, null);
}
public static Integer getInteger(String r0, int i0)
{
Integer r1, $r2;
r1 = Integer.getInteger(r0, null);
if (r1 != null)
{
$r2 = r1;
}
else
{
$r2 = Integer.valueOf(i0);
}
return $r2;
}
public static Integer getInteger(String r0, Integer r1)
{
String r2;
Integer $r7;
r2 = null;
try
{
r2 = System.getProperty(r0);
}
catch (IllegalArgumentException $r4)
{
}
catch (NullPointerException $r5)
{
}
label_2:
if (r2 != null)
{
try
{
$r7 = Integer.decode(r2);
}
catch (NumberFormatException $r8)
{
break label_2;
}
return $r7;
}
return r1;
}
public static Integer decode(String r0) throws java.lang.NumberFormatException
{
byte b0;
int i1;
boolean z0;
char c2;
Integer r1, $r7, r8;
String $r14;
b0 = (byte) (byte) 10;
i1 = 0;
z0 = false;
if (r0.length() != 0)
{
c2 = r0.charAt(0);
if (c2 != '-')
{
if (c2 == '+')
{
i1++;
}
}
else
{
z0 = true;
i1++;
}
label_4:
{
if ( ! (r0.startsWith("0x", i1) || r0.startsWith("0X", i1)) )
{
if ( ! (r0.startsWith("#", i1)))
{
if ( ! (r0.startsWith("0", i1)) || r0.length() <= 1 + i1)
{
break label_4;
}
i1++;
b0 = (byte) (byte) 8;
break label_4;
}
i1++;
b0 = (byte) (byte) 16;
break label_4;
}
i1 = i1 + 2;
b0 = (byte) (byte) 16;
} //end label_4:
if ( ! (r0.startsWith("-", i1) || r0.startsWith("+", i1)) )
{
try
{
r1 = Integer.valueOf(r0.substring(i1), b0);
if ( ! (z0))
{
$r7 = r1;
}
else
{
$r7 = Integer.valueOf((- (r1.intValue())));
}
r8 = $r7;
}
catch (NumberFormatException $r9)
{
if ( ! (z0))
{
$r14 = r0.substring(i1);
}
else
{
$r14 = (new StringBuilder()).append("-").append(r0.substring(i1)).toString();
}
r8 = Integer.valueOf($r14, b0);
}
return r8;
}
throw new NumberFormatException("Sign character in wrong position");
}
else
{
throw new NumberFormatException("Zero length string");
}
}
public int compareTo(Integer r1)
{
return Integer.compare(value, r1.value);
}
public static int compare(int i0, int i1)
{
byte $b2;
if (i0 >= i1)
{
if (i0 != i1)
{
$b2 = (byte) (byte) 1;
}
else
{
$b2 = (byte) (byte) 0;
}
}
else
{
$b2 = (byte) (byte) -1;
}
return $b2;
}
public static int highestOneBit(int i0)
{
int i2, i4, i6, i8, i10;
i2 = i0 | i0 >> 1;
i4 = i2 | i2 >> 2;
i6 = i4 | i4 >> 4;
i8 = i6 | i6 >> 8;
i10 = i8 | i8 >> 16;
return i10 - (i10 >>> 1);
}
public static int lowestOneBit(int i0)
{
return i0 & (- (i0));
}
public static int numberOfLeadingZeros(int i0)
{
int i1, i7;
if (i0 != 0)
{
i1 = 1;
if (i0 >>> 16 == 0)
{
i1 = 17;
i0 = i0 << 16;
}
if (i0 >>> 24 == 0)
{
i1 = i1 + 8;
i0 = i0 << 8;
}
if (i0 >>> 28 == 0)
{
i1 = i1 + 4;
i0 = i0 << 4;
}
if (i0 >>> 30 == 0)
{
i1 = i1 + 2;
i0 = i0 << 2;
}
i7 = i1 - (i0 >>> 31);
return i7;
}
return SIZE;
}
public static int numberOfTrailingZeros(int i0)
{
int i1, i2, i3, i4, i5;
if (i0 != 0)
{
i1 = 31;
i2 = i0 << 16;
if (i2 != 0)
{
i1 = 15;
i0 = i2;
}
i3 = i0 << 8;
if (i3 != 0)
{
i1 = i1 - 8;
i0 = i3;
}
i4 = i0 << 4;
if (i4 != 0)
{
i1 = i1 - 4;
i0 = i4;
}
i5 = i0 << 2;
if (i5 != 0)
{
i1 = i1 - 2;
i0 = i5;
}
return i1 - (i0 << 1 >>> 31);
}
return SIZE;
}
public static int bitCount(int i0)
{
int i3, i7, i10, i12, i14;
i3 = i0 - (i0 >>> 1 & 1431655765);
i7 = (i3 & 858993459) + (i3 >>> 2 & 858993459);
i10 = i7 + (i7 >>> 4) & 252645135;
i12 = i10 + (i10 >>> 8);
i14 = i12 + (i12 >>> 16);
return i14 & 63;
}
public static int rotateLeft(int i0, int i1)
{
return i0 << i1 | i0 >>> (- (i1));
}
public static int rotateRight(int i0, int i1)
{
return i0 >>> i1 | i0 << (- (i1));
}
public static int reverse(int i0)
{
int i5, i10, i15, i24;
i5 = (i0 & 1431655765) << 1 | i0 >>> 1 & 1431655765;
i10 = (i5 & 858993459) << 2 | i5 >>> 2 & 858993459;
i15 = (i10 & 252645135) << 4 | i10 >>> 4 & 252645135;
i24 = i15 << 24 | (i15 & 65280) << 8 | i15 >>> 8 & 65280 | i15 >>> 24;
return i24;
}
public static int signum(int i0)
{
return i0 >> 31 | (- (i0)) >>> 31;
}
public static int reverseBytes(int i0)
{
return i0 >>> 24 | i0 >> 8 & 65280 | i0 << 8 & 16711680 | i0 << 24;
}
public volatile int compareTo(Object r1)
{
return this.compareTo((Integer) r1);
}
static
{
boolean $z1;
if (class "java/lang/Integer".desiredAssertionStatus())
{
$z1 = false;
}
else
{
$z1 = true;
}
$assertionsDisabled = $z1;
TYPE = Class.getPrimitiveClass("int");
char[] $r2 = {'0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , 'a' , 'b' , 'c' , 'd' , 'e' , 'f' , 'g' , 'h' , 'i' , 'j' , 'k' , 'l' , 'm' , 'n' , 'o' , 'p' , 'q' , 'r' , 's' , 't' , 'u' , 'v' , 'w' , 'x' , 'y' , 'z'};
digits = $r2;
char[] $r3 = {'0' , '0' , '0' , '0' , '0' , '0' , '0' , '0' , '0' , '0' , '1' , '1' , '1' , '1' , '1' , '1' , '1' , '1' , '1' , '1' , '2' , '2' , '2' , '2' , '2' , '2' , '2' , '2' , '2' , '2' , '3' , '3' , '3' , '3' , '3' , '3' , '3' , '3' , '3' , '3' , '4' , '4' , '4' , '4' , '4' , '4' , '4' , '4' , '4' , '4' , '5' , '5' , '5' , '5' , '5' , '5' , '5' , '5' , '5' , '5' , '6' , '6' , '6' , '6' , '6' , '6' , '6' , '6' , '6' , '6' , '7' , '7' , '7' , '7' , '7' , '7' , '7' , '7' , '7' , '7' , '8' , '8' , '8' , '8' , '8' , '8' , '8' , '8' , '8' , '8' , '9' , '9' , '9' , '9' , '9' , '9' , '9' , '9' , '9' , '9'};
DigitTens = $r3;
char[] $r4 = {'0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9'};
DigitOnes = $r4;
int[] $r5 = {9 , 99 , 999 , 9999 , 99999 , 999999 , 9999999 , 99999999 , 999999999 , MAX_VALUE};
sizeTable = $r5;
}
}