what-the-bank/sources/com/google/gson/internal/bind/util/ISO8601Utils.java

469 lines
18 KiB
Java

package com.google.gson.internal.bind.util;
import android.graphics.Color;
import android.graphics.PointF;
import android.os.Process;
import android.os.SystemClock;
import android.text.TextUtils;
import android.view.Gravity;
import android.view.KeyEvent;
import android.widget.ExpandableListView;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import java.lang.reflect.Method;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Locale;
import java.util.TimeZone;
import net.sf.scuba.smartcards.ISO7816;
import o.jTb;
import o.xzZ;
import org.bouncycastle.crypto.tls.CipherSuite;
import org.bouncycastle.pqc.math.linearalgebra.Matrix;
/* loaded from: classes.dex */
public class ISO8601Utils {
private static final TimeZone TIMEZONE_UTC;
private static final String UTC_ID = "UTC";
private static char a;
private static char b;
private static char c;
private static char e;
private static int i;
private static final byte[] $$a = {33, -82, ISO7816.INS_UNBLOCK_CHV, 67};
private static final int $$b = CipherSuite.TLS_DH_RSA_WITH_AES_256_GCM_SHA384;
private static int $10 = 0;
private static int $11 = 1;
private static int d = 0;
/* JADX WARN: Removed duplicated region for block: B:10:0x0026 */
/* JADX WARN: Removed duplicated region for block: B:7:0x001e */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x0026 -> B:4:0x002c). Please report as a decompilation issue!!! */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private static void g(short r6, short r7, byte r8, java.lang.Object[] r9) {
/*
byte[] r0 = com.google.gson.internal.bind.util.ISO8601Utils.$$a
int r6 = r6 * 4
int r1 = r6 + 1
int r7 = 67 - r7
int r8 = r8 * 2
int r8 = 3 - r8
byte[] r1 = new byte[r1]
r2 = 0
if (r0 != 0) goto L14
r3 = r8
r4 = r2
goto L2c
L14:
r3 = r2
L15:
byte r4 = (byte) r7
int r8 = r8 + 1
r1[r3] = r4
int r4 = r3 + 1
if (r3 != r6) goto L26
java.lang.String r6 = new java.lang.String
r6.<init>(r1, r2)
r9[r2] = r6
return
L26:
r3 = r0[r8]
r5 = r8
r8 = r7
r7 = r3
r3 = r5
L2c:
int r7 = r7 + r8
r8 = r3
r3 = r4
goto L15
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.gson.internal.bind.util.ISO8601Utils.g(short, short, byte, java.lang.Object[]):void");
}
static {
i = 1;
a();
TIMEZONE_UTC = TimeZone.getTimeZone(UTC_ID);
int i2 = d + 109;
i = i2 % 128;
int i3 = i2 % 2;
}
public static String format(Date date) {
int i2 = 2 % 2;
int i3 = i + 65;
d = i3 % 128;
int i4 = i3 % 2;
String format = format(date, false, TIMEZONE_UTC);
int i5 = i + 13;
d = i5 % 128;
int i6 = i5 % 2;
return format;
}
public static String format(Date date, boolean z) {
int i2 = 2 % 2;
int i3 = d + 51;
i = i3 % 128;
int i4 = i3 % 2;
String format = format(date, z, TIMEZONE_UTC);
int i5 = d + 3;
i = i5 % 128;
int i6 = i5 % 2;
return format;
}
public static String format(Date date, boolean z, TimeZone timeZone) {
int i2;
int i3;
int i4 = 2 % 2;
GregorianCalendar gregorianCalendar = new GregorianCalendar(timeZone, Locale.US);
gregorianCalendar.setTime(date);
if (z) {
int i5 = d + 105;
i = i5 % 128;
int i6 = i5 % 2;
i2 = 4;
} else {
i2 = 0;
}
if (timeZone.getRawOffset() == 0) {
int i7 = i + 19;
d = i7 % 128;
int i8 = i7 % 2;
i3 = 1;
} else {
i3 = 6;
}
StringBuilder sb = new StringBuilder(i2 + 19 + i3);
padInt(sb, gregorianCalendar.get(1), 4);
sb.append('-');
padInt(sb, gregorianCalendar.get(2) + 1, 2);
sb.append('-');
padInt(sb, gregorianCalendar.get(5), 2);
sb.append('T');
padInt(sb, gregorianCalendar.get(11), 2);
sb.append(':');
padInt(sb, gregorianCalendar.get(12), 2);
sb.append(':');
padInt(sb, gregorianCalendar.get(13), 2);
if (z) {
sb.append('.');
padInt(sb, gregorianCalendar.get(14), 3);
}
int offset = timeZone.getOffset(gregorianCalendar.getTimeInMillis());
if (offset != 0) {
int i9 = d + 123;
i = i9 % 128;
int i10 = i9 % 2;
int i11 = offset / 60000;
int abs = Math.abs(i11 / 60);
int abs2 = Math.abs(i11 % 60);
sb.append(offset >= 0 ? '+' : '-');
padInt(sb, abs, 2);
sb.append(':');
padInt(sb, abs2, 2);
} else {
sb.append(Matrix.MATRIX_TYPE_ZERO);
int i12 = d + 43;
i = i12 % 128;
int i13 = i12 % 2;
}
return sb.toString();
}
private static void f(char[] cArr, int i2, Object[] objArr) {
int i3;
char c2;
int i4 = 2 % 2;
jTb jtb = new jTb();
char[] cArr2 = new char[cArr.length];
int i5 = 0;
jtb.b = 0;
char[] cArr3 = new char[2];
char c3 = 3;
int i6 = $10 + 3;
$11 = i6 % 128;
int i7 = i6 % 2;
while (jtb.b < cArr.length) {
int i8 = $10 + 7;
$11 = i8 % 128;
int i9 = 58224;
if (i8 % 2 == 0) {
cArr3[i5] = cArr[jtb.b];
cArr3[1] = cArr[jtb.b + 1];
i3 = 1;
} else {
cArr3[i5] = cArr[jtb.b];
cArr3[1] = cArr[jtb.b + 1];
i3 = i5;
}
while (i3 < 16) {
int i10 = $10 + 57;
$11 = i10 % 128;
int i11 = i10 % 2;
char c4 = cArr3[1];
char c5 = cArr3[i5];
char[] cArr4 = cArr3;
int i12 = (c5 + i9) ^ ((c5 << 4) + ((char) (c ^ 41718355337583039L)));
int i13 = c5 >>> 5;
try {
Object[] objArr2 = new Object[4];
objArr2[c3] = Integer.valueOf(b);
objArr2[2] = Integer.valueOf(i13);
objArr2[1] = Integer.valueOf(i12);
objArr2[0] = Integer.valueOf(c4);
Object obj = xzZ.y.get(597144044);
if (obj == null) {
Class cls = (Class) xzZ.c(412 - (PointF.length(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED) > BitmapDescriptorFactory.HUE_RED ? 1 : (PointF.length(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED) == BitmapDescriptorFactory.HUE_RED ? 0 : -1)), (SystemClock.elapsedRealtime() > 0L ? 1 : (SystemClock.elapsedRealtime() == 0L ? 0 : -1)) + 4, (char) ((SystemClock.currentThreadTimeMillis() > (-1L) ? 1 : (SystemClock.currentThreadTimeMillis() == (-1L) ? 0 : -1)) - 1));
byte b2 = (byte) 0;
byte b3 = (byte) (b2 + 1);
Object[] objArr3 = new Object[1];
g(b2, b3, (byte) (b3 - 1), objArr3);
obj = cls.getMethod((String) objArr3[0], Integer.TYPE, Integer.TYPE, Integer.TYPE, Integer.TYPE);
xzZ.y.put(597144044, obj);
}
char charValue = ((Character) ((Method) obj).invoke(null, objArr2)).charValue();
cArr4[1] = charValue;
Object[] objArr4 = {Integer.valueOf(cArr4[0]), Integer.valueOf((charValue + i9) ^ ((charValue << 4) + ((char) (e ^ 41718355337583039L)))), Integer.valueOf(charValue >>> 5), Integer.valueOf(a)};
Object obj2 = xzZ.y.get(597144044);
if (obj2 == null) {
Class cls2 = (Class) xzZ.c(KeyEvent.getDeadChar(0, 0) + 412, 5 - TextUtils.indexOf("", "", 0, 0), (char) ExpandableListView.getPackedPositionGroup(0L));
byte b4 = (byte) 0;
byte b5 = (byte) (b4 + 1);
Object[] objArr5 = new Object[1];
g(b4, b5, (byte) (b5 - 1), objArr5);
obj2 = cls2.getMethod((String) objArr5[0], Integer.TYPE, Integer.TYPE, Integer.TYPE, Integer.TYPE);
xzZ.y.put(597144044, obj2);
}
cArr4[0] = ((Character) ((Method) obj2).invoke(null, objArr4)).charValue();
i9 -= 40503;
i3++;
int i14 = $10 + 121;
$11 = i14 % 128;
if (i14 % 2 == 0) {
c2 = 3;
int i15 = 2 / 3;
} else {
c2 = 3;
}
c3 = c2;
cArr3 = cArr4;
i5 = 0;
} catch (Throwable th) {
Throwable cause = th.getCause();
if (cause == null) {
throw th;
}
throw cause;
}
}
char[] cArr5 = cArr3;
char c6 = c3;
cArr2[jtb.b] = cArr5[0];
cArr2[jtb.b + 1] = cArr5[1];
Object[] objArr6 = {jtb, jtb};
Object obj3 = xzZ.y.get(943004485);
if (obj3 == null) {
Class cls3 = (Class) xzZ.c(98 - Color.argb(0, 0, 0, 0), ((Process.getThreadPriority(0) + 20) >> 6) + 5, (char) Gravity.getAbsoluteGravity(0, 0));
byte b6 = (byte) 0;
byte b7 = b6;
Object[] objArr7 = new Object[1];
g(b6, b7, b7, objArr7);
obj3 = cls3.getMethod((String) objArr7[0], Object.class, Object.class);
xzZ.y.put(943004485, obj3);
}
((Method) obj3).invoke(null, objArr6);
c3 = c6;
cArr3 = cArr5;
i5 = 0;
}
objArr[0] = new String(cArr2, 0, i2);
}
/* JADX WARN: Removed duplicated region for block: B:100:0x0209 */
/* JADX WARN: Removed duplicated region for block: B:52:0x00f6 A[Catch: IllegalArgumentException -> 0x01f7, NumberFormatException -> 0x01f9, IndexOutOfBoundsException -> 0x01fb, TryCatch #2 {IllegalArgumentException -> 0x01f7, IndexOutOfBoundsException -> 0x01fb, NumberFormatException -> 0x01f9, blocks: (B:3:0x0007, B:5:0x001a, B:6:0x001c, B:13:0x0039, B:15:0x0048, B:17:0x004e, B:23:0x006f, B:25:0x007d, B:26:0x007f, B:28:0x008b, B:29:0x008f, B:32:0x009e, B:36:0x00a8, B:43:0x00c3, B:45:0x00c9, B:48:0x00e0, B:50:0x00f0, B:52:0x00f6, B:54:0x00fc, B:56:0x01c6, B:61:0x0111, B:62:0x0129, B:63:0x012a, B:66:0x0161, B:68:0x016e, B:71:0x0177, B:73:0x0193, B:76:0x01a2, B:77:0x01c1, B:79:0x01c4, B:80:0x0136, B:81:0x01fd, B:82:0x0204, B:83:0x00e3), top: B:2:0x0007 }] */
/* JADX WARN: Removed duplicated region for block: B:81:0x01fd A[Catch: IllegalArgumentException -> 0x01f7, NumberFormatException -> 0x01f9, IndexOutOfBoundsException -> 0x01fb, TryCatch #2 {IllegalArgumentException -> 0x01f7, IndexOutOfBoundsException -> 0x01fb, NumberFormatException -> 0x01f9, blocks: (B:3:0x0007, B:5:0x001a, B:6:0x001c, B:13:0x0039, B:15:0x0048, B:17:0x004e, B:23:0x006f, B:25:0x007d, B:26:0x007f, B:28:0x008b, B:29:0x008f, B:32:0x009e, B:36:0x00a8, B:43:0x00c3, B:45:0x00c9, B:48:0x00e0, B:50:0x00f0, B:52:0x00f6, B:54:0x00fc, B:56:0x01c6, B:61:0x0111, B:62:0x0129, B:63:0x012a, B:66:0x0161, B:68:0x016e, B:71:0x0177, B:73:0x0193, B:76:0x01a2, B:77:0x01c1, B:79:0x01c4, B:80:0x0136, B:81:0x01fd, B:82:0x0204, B:83:0x00e3), top: B:2:0x0007 }] */
/* JADX WARN: Removed duplicated region for block: B:92:0x0207 */
/* JADX WARN: Removed duplicated region for block: B:95:0x022c */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static java.util.Date parse(java.lang.String r21, java.text.ParsePosition r22) throws java.text.ParseException {
/*
Method dump skipped, instructions count: 630
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.gson.internal.bind.util.ISO8601Utils.parse(java.lang.String, java.text.ParsePosition):java.util.Date");
}
private static boolean checkOffset(String str, int i2, char c2) {
int i3 = 2 % 2;
int i4 = i + 125;
d = i4 % 128;
int i5 = i4 % 2;
if (i2 >= str.length() || str.charAt(i2) != c2) {
return false;
}
int i6 = d + 49;
i = i6 % 128;
int i7 = i6 % 2;
return true;
}
private static int parseInt(String str, int i2, int i3) throws NumberFormatException {
int i4;
int i5;
int digit;
int i6 = 2 % 2;
if (i2 >= 0 && i3 <= str.length()) {
int i7 = d + 99;
int i8 = i7 % 128;
i = i8;
if (i7 % 2 == 0) {
throw null;
}
if (i2 <= i3) {
if (i2 < i3) {
int i9 = i8 + 77;
d = i9 % 128;
int i10 = i9 % 2;
i5 = i2 + 1;
int digit2 = Character.digit(str.charAt(i2), 10);
if (digit2 < 0) {
StringBuilder sb = new StringBuilder("Invalid number: ");
sb.append(str.substring(i2, i3));
throw new NumberFormatException(sb.toString());
}
int i11 = i + 93;
int i12 = i11 % 128;
d = i12;
int i13 = i11 % 2;
i4 = -digit2;
int i14 = i12 + 105;
i = i14 % 128;
int i15 = i14 % 2;
} else {
i4 = 0;
i5 = i2;
}
while (i5 < i3) {
int i16 = i + 13;
d = i16 % 128;
if (i16 % 2 != 0) {
digit = Character.digit(str.charAt(i5), 34);
if (digit < 0) {
StringBuilder sb2 = new StringBuilder("Invalid number: ");
sb2.append(str.substring(i2, i3));
throw new NumberFormatException(sb2.toString());
}
i4 = (i4 * 10) - digit;
i5++;
} else {
digit = Character.digit(str.charAt(i5), 10);
if (digit < 0) {
StringBuilder sb22 = new StringBuilder("Invalid number: ");
sb22.append(str.substring(i2, i3));
throw new NumberFormatException(sb22.toString());
}
i4 = (i4 * 10) - digit;
i5++;
}
}
int i17 = -i4;
int i18 = d + 95;
i = i18 % 128;
int i19 = i18 % 2;
return i17;
}
}
throw new NumberFormatException(str);
}
private static void padInt(StringBuilder sb, int i2, int i3) {
int i4 = 2 % 2;
int i5 = d + 49;
i = i5 % 128;
int i6 = i5 % 2;
String num = Integer.toString(i2);
int length = i3 - num.length();
while (length > 0) {
int i7 = d + 39;
i = i7 % 128;
if (i7 % 2 == 0) {
sb.append('f');
length += 102;
} else {
sb.append('0');
length--;
}
}
sb.append(num);
}
/* JADX WARN: Removed duplicated region for block: B:10:0x0031 */
/* JADX WARN: Removed duplicated region for block: B:19:0x0040 A[SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private static int indexOfNonDigit(java.lang.String r5, int r6) {
/*
r0 = 2
int r1 = r0 % r0
L3:
int r1 = r5.length()
if (r6 >= r1) goto L41
int r1 = com.google.gson.internal.bind.util.ISO8601Utils.i
int r1 = r1 + 13
int r2 = r1 % 128
com.google.gson.internal.bind.util.ISO8601Utils.d = r2
int r1 = r1 % r0
if (r1 == 0) goto L1d
char r1 = r5.charAt(r6)
r2 = 94
if (r1 < r2) goto L40
goto L25
L1d:
char r1 = r5.charAt(r6)
r2 = 48
if (r1 < r2) goto L40
L25:
int r2 = com.google.gson.internal.bind.util.ISO8601Utils.i
r3 = 57
int r2 = r2 + r3
int r4 = r2 % 128
com.google.gson.internal.bind.util.ISO8601Utils.d = r4
int r2 = r2 % r0
if (r1 > r3) goto L40
int r4 = r4 + 29
int r1 = r4 % 128
com.google.gson.internal.bind.util.ISO8601Utils.i = r1
int r4 = r4 % r0
if (r4 != 0) goto L3d
int r6 = r6 + 27
goto L3
L3d:
int r6 = r6 + 1
goto L3
L40:
return r6
L41:
int r5 = r5.length()
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.gson.internal.bind.util.ISO8601Utils.indexOfNonDigit(java.lang.String, int):int");
}
static void a() {
e = (char) 5689;
a = (char) 38765;
c = (char) 48442;
b = (char) 39453;
}
}