113 lines
3.0 KiB
Java
113 lines
3.0 KiB
Java
|
package o;
|
||
|
|
||
|
import org.bouncycastle.asn1.cmp.PKIFailureInfo;
|
||
|
|
||
|
/* renamed from: o.gej, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes.dex */
|
||
|
public class C15015gej extends C15018gem {
|
||
|
public static final Integer b(String str) {
|
||
|
boolean z;
|
||
|
int i;
|
||
|
int i2;
|
||
|
C14957gcv.e(str, "");
|
||
|
gdN.b(10);
|
||
|
int length = str.length();
|
||
|
if (length == 0) {
|
||
|
return null;
|
||
|
}
|
||
|
int i3 = 0;
|
||
|
char charAt = str.charAt(0);
|
||
|
int i4 = -2147483647;
|
||
|
if (C14957gcv.a(charAt, 48) < 0) {
|
||
|
i = 1;
|
||
|
if (length == 1) {
|
||
|
return null;
|
||
|
}
|
||
|
if (charAt == '-') {
|
||
|
i4 = PKIFailureInfo.systemUnavail;
|
||
|
z = true;
|
||
|
} else {
|
||
|
if (charAt != '+') {
|
||
|
return null;
|
||
|
}
|
||
|
z = false;
|
||
|
}
|
||
|
} else {
|
||
|
z = false;
|
||
|
i = 0;
|
||
|
}
|
||
|
int i5 = -59652323;
|
||
|
while (i < length) {
|
||
|
int digit = Character.digit((int) str.charAt(i), 10);
|
||
|
if (digit < 0) {
|
||
|
return null;
|
||
|
}
|
||
|
if ((i3 < i5 && (i5 != -59652323 || i3 < (i5 = i4 / 10))) || (i2 = i3 * 10) < i4 + digit) {
|
||
|
return null;
|
||
|
}
|
||
|
i3 = i2 - digit;
|
||
|
i++;
|
||
|
}
|
||
|
return z ? Integer.valueOf(i3) : Integer.valueOf(-i3);
|
||
|
}
|
||
|
|
||
|
public static final Long i(String str) {
|
||
|
boolean z;
|
||
|
C14957gcv.e(str, "");
|
||
|
int i = 10;
|
||
|
gdN.b(10);
|
||
|
int length = str.length();
|
||
|
if (length == 0) {
|
||
|
return null;
|
||
|
}
|
||
|
int i2 = 0;
|
||
|
char charAt = str.charAt(0);
|
||
|
long j = -9223372036854775807L;
|
||
|
if (C14957gcv.a(charAt, 48) < 0) {
|
||
|
z = true;
|
||
|
if (length == 1) {
|
||
|
return null;
|
||
|
}
|
||
|
if (charAt == '-') {
|
||
|
j = Long.MIN_VALUE;
|
||
|
i2 = 1;
|
||
|
} else {
|
||
|
if (charAt != '+') {
|
||
|
return null;
|
||
|
}
|
||
|
z = false;
|
||
|
i2 = 1;
|
||
|
}
|
||
|
} else {
|
||
|
z = false;
|
||
|
}
|
||
|
long j2 = 0;
|
||
|
long j3 = -256204778801521550L;
|
||
|
while (i2 < length) {
|
||
|
int digit = Character.digit((int) str.charAt(i2), i);
|
||
|
if (digit < 0) {
|
||
|
return null;
|
||
|
}
|
||
|
if (j2 < j3) {
|
||
|
if (j3 == -256204778801521550L) {
|
||
|
j3 = j / 10;
|
||
|
if (j2 < j3) {
|
||
|
}
|
||
|
}
|
||
|
return null;
|
||
|
}
|
||
|
long j4 = j2 * 10;
|
||
|
int i3 = length;
|
||
|
long j5 = digit;
|
||
|
if (j4 < j + j5) {
|
||
|
return null;
|
||
|
}
|
||
|
j2 = j4 - j5;
|
||
|
i2++;
|
||
|
length = i3;
|
||
|
i = 10;
|
||
|
}
|
||
|
return z ? Long.valueOf(j2) : Long.valueOf(-j2);
|
||
|
}
|
||
|
}
|