public final class com.google.common.math.LongMath extends java.lang.Object
{
static final long MAX_SIGNED_POWER_OF_TWO;
static final long MAX_POWER_OF_SQRT2_UNSIGNED;
static final byte[] maxLog10ForLeadingZeros;
static final long[] powersOf;
static final long[] halfPowersOf;
static final long FLOOR_SQRT_MAX_LONG;
static final long[] factorials;
static final int[] biggestBinomials;
static final int[] biggestSimpleBinomials;
private static final int SIEVE_30;
private static final long[][] millerRabinBaseSets;
public static long ceilingPowerOfTwo(long)
{
long v, v, v;
byte v;
int v, v;
java.lang.ArithmeticException v;
java.lang.StringBuilder v;
java.lang.String v;
v := @parameter: long;
staticinvoke <com.google.common.math.MathPreconditions: long checkPositive(java.lang.String,long)>("x", v);
v = v cmp 4611686018427387904L;
if v <= 0 goto label;
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.StringBuilder: void <init>(int)>(70);
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (long)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("ceilingPowerOfTwo(\u) is not representable as a long");
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>(v);
throw v;
label:
v = v - 1L;
v = staticinvoke <java.lang.Long: int numberOfLeadingZeros(long)>(v);
v = neg v;
v = 1L << v;
return v;
}
public static long floorPowerOfTwo(long)
{
int v, v;
long v, v;
v := @parameter: long;
staticinvoke <com.google.common.math.MathPreconditions: long checkPositive(java.lang.String,long)>("x", v);
v = staticinvoke <java.lang.Long: int numberOfLeadingZeros(long)>(v);
v = 63 - v;
v = 1L << v;
return v;
}
public static boolean isPowerOfTwo(long)
{
long v, v, v;
byte v, v;
boolean v, v, v;
v := @parameter: long;
v = v cmp 0L;
if v <= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v - 1L;
v = v & v;
v = v cmp 0L;
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v & v;
return v;
}
static int lessThanBranchFree(long, long)
{
long v, v, v, v, v, v;
v := @parameter: long;
v := @parameter: long;
v = v - v;
v = v ^ -1L;
v = v ^ -1L;
v = v >>> 63;
return v;
}
public static int log2(long, java.math.RoundingMode)
{
long v, v, v;
java.lang.AssertionError v;
int[] v;
int v, v, v, v, v, v, v, v, v, v;
boolean v;
java.math.RoundingMode v;
v := @parameter: long;
v := @parameter: java.math.RoundingMode;
staticinvoke <com.google.common.math.MathPreconditions: long checkPositive(java.lang.String,long)>("x", v);
v = <com.google.common.math.LongMath$1: int[] $SwitchMap$java$math$RoundingMode>;
v = virtualinvoke v.<java.math.RoundingMode: int ordinal()>();
v = v[v];
tableswitch(v)
{
case 1: goto label;
case 2: goto label;
case 3: goto label;
case 4: goto label;
case 5: goto label;
case 6: goto label;
case 7: goto label;
case 8: goto label;
default: goto label;
};
label:
v = staticinvoke <com.google.common.math.LongMath: boolean isPowerOfTwo(long)>(v);
staticinvoke <com.google.common.math.MathPreconditions: void checkRoundingUnnecessary(boolean)>(v);
label:
v = staticinvoke <java.lang.Long: int numberOfLeadingZeros(long)>(v);
v = 63 - v;
return v;
label:
v = v - 1L;
v = staticinvoke <java.lang.Long: int numberOfLeadingZeros(long)>(v);
v = 64 - v;
return v;
label:
v = staticinvoke <java.lang.Long: int numberOfLeadingZeros(long)>(v);
v = -5402926248376769404L >>> v;
v = 63 - v;
v = staticinvoke <com.google.common.math.LongMath: int lessThanBranchFree(long,long)>(v, v);
v = v + v;
return v;
label:
v = new java.lang.AssertionError;
specialinvoke v.<java.lang.AssertionError: void <init>(java.lang.Object)>("impossible");
throw v;
}
public static int log10(long, java.math.RoundingMode)
{
long v, v, v;
java.lang.AssertionError v;
long[] v, v;
byte v;
int[] v;
int v, v, v, v, v, v, v;
boolean v;
java.math.RoundingMode v;
v := @parameter: long;
v := @parameter: java.math.RoundingMode;
staticinvoke <com.google.common.math.MathPreconditions: long checkPositive(java.lang.String,long)>("x", v);
v = staticinvoke <com.google.common.math.LongMath: int log10Floor(long)>(v);
v = <com.google.common.math.LongMath: long[] powersOf10>;
v = v[v];
v = <com.google.common.math.LongMath$1: int[] $SwitchMap$java$math$RoundingMode>;
v = virtualinvoke v.<java.math.RoundingMode: int ordinal()>();
v = v[v];
tableswitch(v)
{
case 1: goto label;
case 2: goto label;
case 3: goto label;
case 4: goto label;
case 5: goto label;
case 6: goto label;
case 7: goto label;
case 8: goto label;
default: goto label;
};
label:
v = v cmp v;
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.math.MathPreconditions: void checkRoundingUnnecessary(boolean)>(v);
label:
return v;
label:
v = staticinvoke <com.google.common.math.LongMath: int lessThanBranchFree(long,long)>(v, v);
v = v + v;
return v;
label:
v = <com.google.common.math.LongMath: long[] halfPowersOf10>;
v = v[v];
v = staticinvoke <com.google.common.math.LongMath: int lessThanBranchFree(long,long)>(v, v);
v = v + v;
return v;
label:
v = new java.lang.AssertionError;
specialinvoke v.<java.lang.AssertionError: void <init>()>();
throw v;
}
static int log10Floor(long)
{
byte[] v;
long v, v;
long[] v;
byte v;
int v, v, v;
v := @parameter: long;
v = <com.google.common.math.LongMath: byte[] maxLog10ForLeadingZeros>;
v = staticinvoke <java.lang.Long: int numberOfLeadingZeros(long)>(v);
v = v[v];
v = <com.google.common.math.LongMath: long[] powersOf10>;
v = v[v];
v = staticinvoke <com.google.common.math.LongMath: int lessThanBranchFree(long,long)>(v, v);
v = v - v;
return v;
}
public static long pow(long, int)
{
long v, v, v, v, v, v, v, v, v, v;
java.lang.AssertionError v;
byte v, v;
int v, v, v, v;
v := @parameter: long;
v := @parameter: int;
staticinvoke <com.google.common.math.MathPreconditions: int checkNonNegative(java.lang.String,int)>("exponent", v);
v = -2L cmp v;
if v > 0 goto label;
v = v cmp 2L;
if v > 0 goto label;
tableswitch(v)
{
case -2: goto label;
case -1: goto label;
case 0: goto label;
case 1: goto label;
case 2: goto label;
default: goto label;
};
label:
if v != 0 goto label;
v = 1L;
goto label;
label:
v = 0L;
label:
return v;
label:
return 1L;
label:
v = v & 1;
if v != 0 goto label;
v = 1L;
goto label;
label:
v = -1L;
label:
return v;
label:
if v >= 64 goto label;
v = 1L << v;
goto label;
label:
v = 0L;
label:
return v;
label:
if v >= 64 goto label;
v = v & 1;
if v != 0 goto label;
v = 1L << v;
goto label;
label:
v = 1L << v;
v = neg v;
label:
return v;
label:
return 0L;
label:
v = new java.lang.AssertionError;
specialinvoke v.<java.lang.AssertionError: void <init>()>();
throw v;
label:
v = 1L;
label:
lookupswitch(v)
{
case 0: goto label;
case 1: goto label;
default: goto label;
};
label:
return v;
label:
v = v * v;
return v;
label:
v = v;
v = v & 1;
if v != 0 goto label;
v = 1L;
goto label;
label:
v = v;
label:
v = v * v;
v = v * v;
v = v >> 1;
goto label;
}
public static long sqrt(long, java.math.RoundingMode)
{
long v, v, v, v, v, v, v, v;
java.lang.AssertionError v;
byte v, v, v, v;
int[] v;
int v, v, v, v;
boolean v, v, v;
double v;
java.math.RoundingMode v;
v := @parameter: long;
v := @parameter: java.math.RoundingMode;
staticinvoke <com.google.common.math.MathPreconditions: long checkNonNegative(java.lang.String,long)>("x", v);
v = staticinvoke <com.google.common.math.LongMath: boolean fitsInInt(long)>(v);
if v == 0 goto label;
v = staticinvoke <com.google.common.math.IntMath: int sqrt(int,java.math.RoundingMode)>(v, v);
return v;
label:
v = staticinvoke <java.lang.Math: double sqrt(double)>(v);
v = v * v;
v = <com.google.common.math.LongMath$1: int[] $SwitchMap$java$math$RoundingMode>;
v = virtualinvoke v.<java.math.RoundingMode: int ordinal()>();
v = v[v];
tableswitch(v)
{
case 1: goto label;
case 2: goto label;
case 3: goto label;
case 4: goto label;
case 5: goto label;
case 6: goto label;
case 7: goto label;
case 8: goto label;
default: goto label;
};
label:
v = v cmp v;
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.math.MathPreconditions: void checkRoundingUnnecessary(boolean)>(v);
return v;
label:
v = v cmp v;
if v >= 0 goto label;
v = v - 1L;
return v;
label:
return v;
label:
v = v cmp v;
if v <= 0 goto label;
v = v + 1L;
return v;
label:
return v;
label:
v = v cmp v;
if v >= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v - v;
v = v * v;
v = v + v;
v = staticinvoke <com.google.common.math.LongMath: int lessThanBranchFree(long,long)>(v, v);
v = v + v;
return v;
label:
v = new java.lang.AssertionError;
specialinvoke v.<java.lang.AssertionError: void <init>()>();
throw v;
}
public static long divide(long, long, java.math.RoundingMode)
{
byte v, v, v, v, v;
int[] v;
boolean v, v, v, v, v, v, v, v, v;
java.math.RoundingMode v, v, v;
long v, v, v, v, v, v, v, v, v, v, v, v, v;
java.lang.AssertionError v;
int v, v, v;
v := @parameter: long;
v := @parameter: long;
v := @parameter: java.math.RoundingMode;
staticinvoke <com.google.common.base.Preconditions: java.lang.Object checkNotNull(java.lang.Object)>(v);
v = v / v;
v = v * v;
v = v - v;
v = v cmp 0L;
if v != 0 goto label;
return v;
label:
v = v ^ v;
v = v >> 63;
v = 1 | v;
v = <com.google.common.math.LongMath$1: int[] $SwitchMap$java$math$RoundingMode>;
v = virtualinvoke v.<java.math.RoundingMode: int ordinal()>();
v = v[v];
tableswitch(v)
{
case 1: goto label;
case 2: goto label;
case 3: goto label;
case 4: goto label;
case 5: goto label;
case 6: goto label;
case 7: goto label;
case 8: goto label;
default: goto label;
};
label:
v = v cmp 0L;
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.math.MathPreconditions: void checkRoundingUnnecessary(boolean)>(v);
label:
v = 0;
goto label;
label:
v = 1;
goto label;
label:
if v <= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v;
goto label;
label:
if v >= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v;
goto label;
label:
v = staticinvoke <java.lang.Math: long abs(long)>(v);
v = staticinvoke <java.lang.Math: long abs(long)>(v);
v = v - v;
v = v - v;
v = v cmp 0L;
if v != 0 goto label;
v = <java.math.RoundingMode: java.math.RoundingMode HALF_UP>;
if v != v goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = <java.math.RoundingMode: java.math.RoundingMode HALF_EVEN>;
if v != v goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v & 1L;
v = v cmp 0L;
if v == 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v & v;
v = v | v;
goto label;
label:
v = v cmp 0L;
if v <= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v;
goto label;
label:
v = new java.lang.AssertionError;
specialinvoke v.<java.lang.AssertionError: void <init>()>();
throw v;
label:
if v == 0 goto label;
v = v + v;
goto label;
label:
v = v;
label:
return v;
}
public static int mod(long, int)
{
int v;
long v, v;
v := @parameter: long;
v := @parameter: int;
v = staticinvoke <com.google.common.math.LongMath: long mod(long,long)>(v, v);
return v;
}
public static long mod(long, long)
{
byte v, v;
java.lang.ArithmeticException v;
long v, v, v, v;
v := @parameter: long;
v := @parameter: long;
v = v cmp 0L;
if v > 0 goto label;
v = new java.lang.ArithmeticException;
specialinvoke v.<java.lang.ArithmeticException: void <init>(java.lang.String)>("Modulus must be positive");
throw v;
label:
v = v % v;
v = v cmp 0L;
if v < 0 goto label;
v = v;
goto label;
label:
v = v + v;
label:
return v;
}
public static long gcd(long, long)
{
long v, v, v, v, v, v, v, v, v, v;
byte v, v, v;
int v, v, v, v;
v := @parameter: long;
v := @parameter: long;
staticinvoke <com.google.common.math.MathPreconditions: long checkNonNegative(java.lang.String,long)>("a", v);
staticinvoke <com.google.common.math.MathPreconditions: long checkNonNegative(java.lang.String,long)>("b", v);
v = v cmp 0L;
if v != 0 goto label;
return v;
label:
v = v cmp 0L;
if v != 0 goto label;
return v;
label:
v = staticinvoke <java.lang.Long: int numberOfTrailingZeros(long)>(v);
v = v >> v;
v = staticinvoke <java.lang.Long: int numberOfTrailingZeros(long)>(v);
v = v >> v;
label:
v = v cmp v;
if v == 0 goto label;
v = v - v;
v = v >> 63;
v = v & v;
v = v - v;
v = v - v;
v = v + v;
v = staticinvoke <java.lang.Long: int numberOfTrailingZeros(long)>(v);
v = v >> v;
goto label;
label:
v = staticinvoke <java.lang.Math: int min(int,int)>(v, v);
v = v << v;
return v;
}
public static long checkedAdd(long, long)
{
long v, v, v, v, v;
byte v, v;
boolean v, v, v;
v := @parameter: long;
v := @parameter: long;
v = v + v;
v = v ^ v;
v = v cmp 0L;
if v >= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v ^ v;
v = v cmp 0L;
if v < 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v | v;
staticinvoke <com.google.common.math.MathPreconditions: void checkNoOverflow(boolean,java.lang.String,long,long)>(v, "checkedAdd", v, v);
return v;
}
public static long checkedSubtract(long, long)
{
long v, v, v, v, v;
byte v, v;
boolean v, v, v;
v := @parameter: long;
v := @parameter: long;
v = v - v;
v = v ^ v;
v = v cmp 0L;
if v < 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v ^ v;
v = v cmp 0L;
if v < 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v | v;
staticinvoke <com.google.common.math.MathPreconditions: void checkNoOverflow(boolean,java.lang.String,long,long)>(v, "checkedSubtract", v, v);
return v;
}
public static long checkedMultiply(long, long)
{
long v, v, v, v, v, v, v;
byte v, v, v, v;
int v, v, v, v, v, v, v;
boolean v, v, v, v, v;
v := @parameter: long;
v := @parameter: long;
v = staticinvoke <java.lang.Long: int numberOfLeadingZeros(long)>(v);
v = v ^ -1L;
v = staticinvoke <java.lang.Long: int numberOfLeadingZeros(long)>(v);
v = v + v;
v = staticinvoke <java.lang.Long: int numberOfLeadingZeros(long)>(v);
v = v + v;
v = v ^ -1L;
v = staticinvoke <java.lang.Long: int numberOfLeadingZeros(long)>(v);
v = v + v;
if v <= 65 goto label;
v = v * v;
return v;
label:
if v < 64 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.math.MathPreconditions: void checkNoOverflow(boolean,java.lang.String,long,long)>(v, "checkedMultiply", v, v);
v = v cmp 0L;
if v < 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v cmp -9223372036854775808L;
if v == 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v | v;
staticinvoke <com.google.common.math.MathPreconditions: void checkNoOverflow(boolean,java.lang.String,long,long)>(v, "checkedMultiply", v, v);
v = v * v;
v = v cmp 0L;
if v == 0 goto label;
v = v / v;
v = v cmp v;
if v != 0 goto label;
label:
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.math.MathPreconditions: void checkNoOverflow(boolean,java.lang.String,long,long)>(v, "checkedMultiply", v, v);
return v;
}
public static long checkedPow(long, int)
{
long v, v, v, v, v, v, v;
java.lang.AssertionError v;
byte v, v, v, v;
int v, v, v, v;
boolean v, v, v, v, v, v;
v := @parameter: long;
v := @parameter: int;
staticinvoke <com.google.common.math.MathPreconditions: int checkNonNegative(java.lang.String,int)>("exponent", v);
v = v cmp -2L;
if v < 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v cmp 2L;
if v > 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v & v;
if v == 0 goto label;
tableswitch(v)
{
case -2: goto label;
case -1: goto label;
case 0: goto label;
case 1: goto label;
case 2: goto label;
default: goto label;
};
label:
if v != 0 goto label;
v = 1L;
goto label;
label:
v = 0L;
label:
return v;
label:
return 1L;
label:
v = v & 1;
if v != 0 goto label;
v = 1L;
goto label;
label:
v = -1L;
label:
return v;
label:
if v >= 63 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.math.MathPreconditions: void checkNoOverflow(boolean,java.lang.String,long,long)>(v, "checkedPow", v, v);
v = 1L << v;
return v;
label:
if v >= 64 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.math.MathPreconditions: void checkNoOverflow(boolean,java.lang.String,long,long)>(v, "checkedPow", v, v);
v = v & 1;
if v != 0 goto label;
v = 1L << v;
goto label;
label:
v = -1L << v;
label:
return v;
label:
v = new java.lang.AssertionError;
specialinvoke v.<java.lang.AssertionError: void <init>()>();
throw v;
label:
v = 1L;
label:
lookupswitch(v)
{
case 0: goto label;
case 1: goto label;
default: goto label;
};
label:
return v;
label:
v = staticinvoke <com.google.common.math.LongMath: long checkedMultiply(long,long)>(v, v);
return v;
label:
v = v & 1;
if v == 0 goto label;
v = staticinvoke <com.google.common.math.LongMath: long checkedMultiply(long,long)>(v, v);
label:
v = v >> 1;
if v <= 0 goto label;
v = -3037000499L cmp v;
if v > 0 goto label;
v = v cmp 3037000499L;
if v > 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.math.MathPreconditions: void checkNoOverflow(boolean,java.lang.String,long,long)>(v, "checkedPow", v, v);
v = v * v;
goto label;
}
public static long saturatedAdd(long, long)
{
long v, v, v, v, v, v, v, v;
byte v, v;
boolean v, v, v;
v := @parameter: long;
v := @parameter: long;
v = v + v;
v = v ^ v;
v = v cmp 0L;
if v >= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v ^ v;
v = v cmp 0L;
if v < 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v | v;
if v == 0 goto label;
return v;
label:
v = v >>> 63;
v = v ^ 1L;
v = 9223372036854775807L + v;
return v;
}
public static long saturatedSubtract(long, long)
{
long v, v, v, v, v, v, v, v;
byte v, v;
boolean v, v, v;
v := @parameter: long;
v := @parameter: long;
v = v - v;
v = v ^ v;
v = v cmp 0L;
if v < 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v ^ v;
v = v cmp 0L;
if v < 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v | v;
if v == 0 goto label;
return v;
label:
v = v >>> 63;
v = v ^ 1L;
v = 9223372036854775807L + v;
return v;
}
public static long saturatedMultiply(long, long)
{
long v, v, v, v, v, v, v, v, v, v;
byte v, v, v, v;
int v, v, v, v, v, v, v;
boolean v, v, v, v, v;
v := @parameter: long;
v := @parameter: long;
v = staticinvoke <java.lang.Long: int numberOfLeadingZeros(long)>(v);
v = v ^ -1L;
v = staticinvoke <java.lang.Long: int numberOfLeadingZeros(long)>(v);
v = v + v;
v = staticinvoke <java.lang.Long: int numberOfLeadingZeros(long)>(v);
v = v + v;
v = v ^ -1L;
v = staticinvoke <java.lang.Long: int numberOfLeadingZeros(long)>(v);
v = v + v;
if v <= 65 goto label;
v = v * v;
return v;
label:
v = v ^ v;
v = v >>> 63;
v = 9223372036854775807L + v;
if v >= 64 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v cmp 0L;
if v >= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v cmp -9223372036854775808L;
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v & v;
v = v | v;
if v == 0 goto label;
return v;
label:
v = v * v;
v = v cmp 0L;
if v == 0 goto label;
v = v / v;
v = v cmp v;
if v != 0 goto label;
label:
return v;
label:
return v;
}
public static long saturatedPow(long, int)
{
long v, v, v, v, v, v, v, v, v, v, v;
java.lang.AssertionError v;
byte v, v, v, v;
int v, v, v, v, v, v;
boolean v, v, v, v, v, v;
v := @parameter: long;
v := @parameter: int;
staticinvoke <com.google.common.math.MathPreconditions: int checkNonNegative(java.lang.String,int)>("exponent", v);
v = v cmp -2L;
if v < 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v cmp 2L;
if v > 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v & v;
if v == 0 goto label;
tableswitch(v)
{
case -2: goto label;
case -1: goto label;
case 0: goto label;
case 1: goto label;
case 2: goto label;
default: goto label;
};
label:
if v != 0 goto label;
v = 1L;
goto label;
label:
v = 0L;
label:
return v;
label:
return 1L;
label:
v = v & 1;
if v != 0 goto label;
v = 1L;
goto label;
label:
v = -1L;
label:
return v;
label:
if v < 63 goto label;
return 9223372036854775807L;
label:
v = 1L << v;
return v;
label:
if v < 64 goto label;
v = v & 1;
v = 9223372036854775807L + v;
return v;
label:
v = v & 1;
if v != 0 goto label;
v = 1L << v;
goto label;
label:
v = -1L << v;
label:
return v;
label:
v = new java.lang.AssertionError;
specialinvoke v.<java.lang.AssertionError: void <init>()>();
throw v;
label:
v = 1L;
v = v >>> 63;
v = v & 1;
v = v & v;
v = 9223372036854775807L + v;
label:
lookupswitch(v)
{
case 0: goto label;
case 1: goto label;
default: goto label;
};
label:
return v;
label:
v = staticinvoke <com.google.common.math.LongMath: long saturatedMultiply(long,long)>(v, v);
return v;
label:
v = v & 1;
if v == 0 goto label;
v = staticinvoke <com.google.common.math.LongMath: long saturatedMultiply(long,long)>(v, v);
label:
v = v >> 1;
if v <= 0 goto label;
v = -3037000499L cmp v;
if v <= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v cmp 3037000499L;
if v <= 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
v = v | v;
if v == 0 goto label;
return v;
label:
v = v * v;
goto label;
}
public static long factorial(int)
{
long[] v, v;
int v, v;
long v;
v := @parameter: int;
staticinvoke <com.google.common.math.MathPreconditions: int checkNonNegative(java.lang.String,int)>("n", v);
v = <com.google.common.math.LongMath: long[] factorials>;
v = lengthof v;
if v >= v goto label;
v = <com.google.common.math.LongMath: long[] factorials>;
v = v[v];
goto label;
label:
v = 9223372036854775807L;
label:
return v;
}
public static long binomial(int, int)
{
int[] v, v, v, v;
boolean v;
java.math.RoundingMode v;
long v, v, v, v, v, v, v, v, v;
long[] v, v, v, v;
int v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v;
v := @parameter: int;
v := @parameter: int;
staticinvoke <com.google.common.math.MathPreconditions: int checkNonNegative(java.lang.String,int)>("n", v);
staticinvoke <com.google.common.math.MathPreconditions: int checkNonNegative(java.lang.String,int)>("k", v);
if v > v goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.base.Preconditions: void checkArgument(boolean,java.lang.String,int,int)>(v, "k (%s) > n (%s)", v, v);
v = v >> 1;
if v <= v goto label;
v = v - v;
label:
lookupswitch(v)
{
case 0: goto label;
case 1: goto label;
default: goto label;
};
label:
return 1L;
label:
return v;
label:
v = <com.google.common.math.LongMath: long[] factorials>;
v = lengthof v;
if v >= v goto label;
v = <com.google.common.math.LongMath: long[] factorials>;
v = v[v];
v = <com.google.common.math.LongMath: long[] factorials>;
v = v[v];
v = <com.google.common.math.LongMath: long[] factorials>;
v = v - v;
v = v[v];
v = v * v;
v = v / v;
return v;
label:
v = <com.google.common.math.LongMath: int[] biggestBinomials>;
v = lengthof v;
if v >= v goto label;
v = <com.google.common.math.LongMath: int[] biggestBinomials>;
v = v[v];
if v <= v goto label;
label:
return 9223372036854775807L;
label:
v = <com.google.common.math.LongMath: int[] biggestSimpleBinomials>;
v = lengthof v;
if v >= v goto label;
v = <com.google.common.math.LongMath: int[] biggestSimpleBinomials>;
v = v[v];
if v > v goto label;
v = v - 1;
v = 2;
label:
if v > v goto label;
v = v * v;
v = v / v;
v = v - 1;
v = v + 1;
goto label;
label:
return v;
label:
v = <java.math.RoundingMode: java.math.RoundingMode CEILING>;
v = staticinvoke <com.google.common.math.LongMath: int log2(long,java.math.RoundingMode)>(v, v);
v = 1L;
v = v - 1;
v = 1L;
v = v;
v = 2;
label:
if v > v goto label;
v = v + v;
if v >= 63 goto label;
v = v * v;
v = v * v;
v = v + v;
goto label;
label:
v = staticinvoke <com.google.common.math.LongMath: long multiplyFraction(long,long,long)>(v, v, v);
v = v;
label:
v = v + 1;
v = v - 1;
goto label;
label:
v = staticinvoke <com.google.common.math.LongMath: long multiplyFraction(long,long,long)>(v, v, v);
return v;
}
static long multiplyFraction(long, long, long)
{
long v, v, v, v, v, v, v, v, v;
byte v;
v := @parameter: long;
v := @parameter: long;
v := @parameter: long;
v = v cmp 1L;
if v != 0 goto label;
v = v / v;
return v;
label:
v = staticinvoke <com.google.common.math.LongMath: long gcd(long,long)>(v, v);
v = v / v;
v = v / v;
v = v / v;
v = v * v;
return v;
}
static boolean fitsInInt(long)
{
byte v;
int v;
long v;
boolean v;
v := @parameter: long;
v = v cmp v;
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
public static long mean(long, long)
{
long v, v, v, v, v, v;
v := @parameter: long;
v := @parameter: long;
v = v & v;
v = v ^ v;
v = v >> 1;
v = v + v;
return v;
}
public static boolean isPrime(long)
{
long v, v, v, v, v, v, v, v, v;
java.lang.AssertionError v;
long[] v;
byte v, v, v, v, v, v, v, v;
int v, v, v, v, v, v, v;
boolean v, v;
long[][] v;
v := @parameter: long;
v = v cmp 2L;
if v >= 0 goto label;
staticinvoke <com.google.common.math.MathPreconditions: long checkNonNegative(java.lang.String,long)>("n", v);
return 0;
label:
v = v cmp 66L;
if v >= 0 goto label;
v = v - 2;
v = 722865708377213483L >> v;
v = v & 1L;
v = v cmp 0L;
if v == 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
label:
v = v % 30L;
v = 1 << v;
v = -545925251 & v;
if v == 0 goto label;
return 0;
label:
v = v % 7L;
v = v cmp 0L;
if v == 0 goto label;
v = v % 11L;
v = v cmp 0L;
if v == 0 goto label;
v = v % 13L;
v = v cmp 0L;
if v != 0 goto label;
label:
return 0;
label:
v = v cmp 289L;
if v >= 0 goto label;
return 1;
label:
v = <com.google.common.math.LongMath: long[][] millerRabinBaseSets>;
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
v = v[0];
v = v cmp v;
if v > 0 goto label;
v = 1;
label:
v = lengthof v;
if v >= v goto label;
v = v[v];
v = staticinvoke <com.google.common.math.LongMath$MillerRabinTester: boolean test(long,long)>(v, v);
if v != 0 goto label;
return 0;
label:
v = v + 1;
goto label;
label:
return 1;
label:
v = v + 1;
goto label;
label:
v = new java.lang.AssertionError;
specialinvoke v.<java.lang.AssertionError: void <init>()>();
throw v;
}
public static double roundToDouble(long, java.math.RoundingMode)
{
byte v, v, v, v, v, v, v;
int[] v, v;
boolean v;
java.math.RoundingMode v;
long v, v, v, v, v;
java.lang.AssertionError v, v;
int v, v, v, v, v, v, v;
double v, v, v, v, v, v, v, v, v, v, v, v, v, v;
v := @parameter: long;
v := @parameter: java.math.RoundingMode;
v = v cmp 9223372036854775807L;
if v != 0 goto label;
v = (int) -1;
v = v;
goto label;
label:
v = staticinvoke <com.google.common.primitives.Longs: int compare(long,long)>(v, v);
label:
v = <com.google.common.math.LongMath$1: int[] $SwitchMap$java$math$RoundingMode>;
v = virtualinvoke v.<java.math.RoundingMode: int ordinal()>();
v = v[v];
tableswitch(v)
{
case 1: goto label;
case 2: goto label;
case 3: goto label;
case 4: goto label;
case 5: goto label;
case 6: goto label;
case 7: goto label;
case 8: goto label;
default: goto label;
};
label:
if v != 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
staticinvoke <com.google.common.math.MathPreconditions: void checkRoundingUnnecessary(boolean)>(v);
return v;
label:
if v < 0 goto label;
v = v;
goto label;
label:
v = staticinvoke <com.google.common.math.DoubleUtils: double nextDown(double)>(v);
label:
return v;
label:
if v > 0 goto label;
v = v;
goto label;
label:
v = staticinvoke <java.lang.Math: double nextUp(double)>(v);
label:
return v;
label:
v = v cmp 0L;
if v < 0 goto label;
if v < 0 goto label;
v = v;
goto label;
label:
v = staticinvoke <com.google.common.math.DoubleUtils: double nextDown(double)>(v);
label:
return v;
label:
if v > 0 goto label;
v = v;
goto label;
label:
v = staticinvoke <java.lang.Math: double nextUp(double)>(v);
label:
return v;
label:
v = v cmp 0L;
if v < 0 goto label;
if v > 0 goto label;
v = v;
goto label;
label:
v = staticinvoke <java.lang.Math: double nextUp(double)>(v);
label:
return v;
label:
if v < 0 goto label;
v = v;
goto label;
label:
v = staticinvoke <com.google.common.math.DoubleUtils: double nextDown(double)>(v);
label:
return v;
label:
if v < 0 goto label;
v = v;
v = staticinvoke <java.lang.Math: double nextUp(double)>(v);
v = staticinvoke <java.lang.Math: double ceil(double)>(v);
goto label;
label:
v = v;
v = v;
v = staticinvoke <com.google.common.math.DoubleUtils: double nextDown(double)>(v);
v = staticinvoke <java.lang.Math: double floor(double)>(v);
label:
v = v - v;
v = v - v;
v = v cmp 9223372036854775807L;
if v != 0 goto label;
v = v + 1L;
label:
v = staticinvoke <com.google.common.primitives.Longs: int compare(long,long)>(v, v);
if v >= 0 goto label;
return v;
label:
if v <= 0 goto label;
return v;
label:
v = <com.google.common.math.LongMath$1: int[] $SwitchMap$java$math$RoundingMode>;
v = virtualinvoke v.<java.math.RoundingMode: int ordinal()>();
v = v[v];
tableswitch(v)
{
case 6: goto label;
case 7: goto label;
case 8: goto label;
default: goto label;
};
label:
v = staticinvoke <com.google.common.math.DoubleUtils: long getSignificand(double)>(v);
v = v & 1L;
v = v cmp 0L;
if v != 0 goto label;
v = v;
goto label;
label:
v = v;
label:
return v;
label:
v = v cmp 0L;
if v < 0 goto label;
v = v;
goto label;
label:
v = v;
label:
return v;
label:
v = v cmp 0L;
if v < 0 goto label;
v = v;
goto label;
label:
v = v;
label:
return v;
label:
v = new java.lang.AssertionError;
specialinvoke v.<java.lang.AssertionError: void <init>(java.lang.Object)>("impossible");
throw v;
label:
v = new java.lang.AssertionError;
specialinvoke v.<java.lang.AssertionError: void <init>(java.lang.Object)>("impossible");
throw v;
}
private void <init>()
{
com.google.common.math.LongMath v;
v := @this: com.google.common.math.LongMath;
specialinvoke v.<java.lang.Object: void <init>()>();
return;
}
static void <clinit>()
{
long[][] v;
byte[] v;
long[] v, v, v, v, v, v, v, v, v, v;
int[] v, v;
v = newarray (byte)[64];
v[0] = 19;
v[1] = 18;
v[2] = 18;
v[3] = 18;
v[4] = 18;
v[5] = 17;
v[6] = 17;
v[7] = 17;
v[8] = 16;
v[9] = 16;
v[10] = 16;
v[11] = 15;
v[12] = 15;
v[13] = 15;
v[14] = 15;
v[15] = 14;
v[16] = 14;
v[17] = 14;
v[18] = 13;
v[19] = 13;
v[20] = 13;
v[21] = 12;
v[22] = 12;
v[23] = 12;
v[24] = 12;
v[25] = 11;
v[26] = 11;
v[27] = 11;
v[28] = 10;
v[29] = 10;
v[30] = 10;
v[31] = 9;
v[32] = 9;
v[33] = 9;
v[34] = 9;
v[35] = 8;
v[36] = 8;
v[37] = 8;
v[38] = 7;
v[39] = 7;
v[40] = 7;
v[41] = 6;
v[42] = 6;
v[43] = 6;
v[44] = 6;
v[45] = 5;
v[46] = 5;
v[47] = 5;
v[48] = 4;
v[49] = 4;
v[50] = 4;
v[51] = 3;
v[52] = 3;
v[53] = 3;
v[54] = 3;
v[55] = 2;
v[56] = 2;
v[57] = 2;
v[58] = 1;
v[59] = 1;
v[60] = 1;
v[61] = 0;
v[62] = 0;
v[63] = 0;
<com.google.common.math.LongMath: byte[] maxLog10ForLeadingZeros> = v;
v = newarray (long)[19];
v[0] = 1L;
v[1] = 10L;
v[2] = 100L;
v[3] = 1000L;
v[4] = 10000L;
v[5] = 100000L;
v[6] = 1000000L;
v[7] = 10000000L;
v[8] = 100000000L;
v[9] = 1000000000L;
v[10] = 10000000000L;
v[11] = 100000000000L;
v[12] = 1000000000000L;
v[13] = 10000000000000L;
v[14] = 100000000000000L;
v[15] = 1000000000000000L;
v[16] = 10000000000000000L;
v[17] = 100000000000000000L;
v[18] = 1000000000000000000L;
<com.google.common.math.LongMath: long[] powersOf10> = v;
v = newarray (long)[19];
v[0] = 3L;
v[1] = 31L;
v[2] = 316L;
v[3] = 3162L;
v[4] = 31622L;
v[5] = 316227L;
v[6] = 3162277L;
v[7] = 31622776L;
v[8] = 316227766L;
v[9] = 3162277660L;
v[10] = 31622776601L;
v[11] = 316227766016L;
v[12] = 3162277660168L;
v[13] = 31622776601683L;
v[14] = 316227766016837L;
v[15] = 3162277660168379L;
v[16] = 31622776601683793L;
v[17] = 316227766016837933L;
v[18] = 3162277660168379331L;
<com.google.common.math.LongMath: long[] halfPowersOf10> = v;
v = newarray (long)[21];
v[0] = 1L;
v[1] = 1L;
v[2] = 2L;
v[3] = 6L;
v[4] = 24L;
v[5] = 120L;
v[6] = 720L;
v[7] = 5040L;
v[8] = 40320L;
v[9] = 362880L;
v[10] = 3628800L;
v[11] = 39916800L;
v[12] = 479001600L;
v[13] = 6227020800L;
v[14] = 87178291200L;
v[15] = 1307674368000L;
v[16] = 20922789888000L;
v[17] = 355687428096000L;
v[18] = 6402373705728000L;
v[19] = 121645100408832000L;
v[20] = 2432902008176640000L;
<com.google.common.math.LongMath: long[] factorials> = v;
v = newarray (int)[34];
v[0] = 2147483647;
v[1] = 2147483647;
v[2] = 2147483647;
v[3] = 3810779;
v[4] = 121977;
v[5] = 16175;
v[6] = 4337;
v[7] = 1733;
v[8] = 887;
v[9] = 534;
v[10] = 361;
v[11] = 265;
v[12] = 206;
v[13] = 169;
v[14] = 143;
v[15] = 125;
v[16] = 111;
v[17] = 101;
v[18] = 94;
v[19] = 88;
v[20] = 83;
v[21] = 79;
v[22] = 76;
v[23] = 74;
v[24] = 72;
v[25] = 70;
v[26] = 69;
v[27] = 68;
v[28] = 67;
v[29] = 67;
v[30] = 66;
v[31] = 66;
v[32] = 66;
v[33] = 66;
<com.google.common.math.LongMath: int[] biggestBinomials> = v;
v = newarray (int)[31];
v[0] = 2147483647;
v[1] = 2147483647;
v[2] = 2147483647;
v[3] = 2642246;
v[4] = 86251;
v[5] = 11724;
v[6] = 3218;
v[7] = 1313;
v[8] = 684;
v[9] = 419;
v[10] = 287;
v[11] = 214;
v[12] = 169;
v[13] = 139;
v[14] = 119;
v[15] = 105;
v[16] = 95;
v[17] = 87;
v[18] = 81;
v[19] = 76;
v[20] = 73;
v[21] = 70;
v[22] = 68;
v[23] = 66;
v[24] = 64;
v[25] = 63;
v[26] = 62;
v[27] = 62;
v[28] = 61;
v[29] = 61;
v[30] = 61;
<com.google.common.math.LongMath: int[] biggestSimpleBinomials> = v;
v = newarray (long[])[7];
v = newarray (long)[2];
v[0] = 291830L;
v[1] = 126401071349994536L;
v[0] = v;
v = newarray (long)[3];
v[0] = 885594168L;
v[1] = 725270293939359937L;
v[2] = 3569819667048198375L;
v[1] = v;
v = newarray (long)[4];
v[0] = 273919523040L;
v[1] = 15L;
v[2] = 7363882082L;
v[3] = 992620450144556L;
v[2] = v;
v = newarray (long)[5];
v[0] = 47636622961200L;
v[1] = 2L;
v[2] = 2570940L;
v[3] = 211991001L;
v[4] = 3749873356L;
v[3] = v;
v = newarray (long)[6];
v[0] = 7999252175582850L;
v[1] = 2L;
v[2] = 4130806001517L;
v[3] = 149795463772692060L;
v[4] = 186635894390467037L;
v[5] = 3967304179347715805L;
v[4] = v;
v = newarray (long)[7];
v[0] = 585226005592931976L;
v[1] = 2L;
v[2] = 123635709730000L;
v[3] = 9233062284813009L;
v[4] = 43835965440333360L;
v[5] = 761179012939631437L;
v[6] = 1263739024124850375L;
v[5] = v;
v = newarray (long)[8];
v[0] = 9223372036854775807L;
v[1] = 2L;
v[2] = 325L;
v[3] = 9375L;
v[4] = 28178L;
v[5] = 450775L;
v[6] = 9780504L;
v[7] = 1795265022L;
v[6] = v;
<com.google.common.math.LongMath: long[][] millerRabinBaseSets> = v;
return;
}
}