package com.google.common.primitives; import android.graphics.Color; import android.graphics.PointF; import android.os.SystemClock; import android.text.TextUtils; import android.view.Gravity; import android.view.KeyEvent; import android.view.MotionEvent; import android.view.View; import android.view.ViewConfiguration; import com.google.android.gms.maps.model.BitmapDescriptorFactory; import com.google.common.base.Ascii; import com.google.common.base.Preconditions; import java.lang.reflect.Method; import java.math.BigInteger; import java.util.Arrays; import java.util.Comparator; import net.sf.scuba.smartcards.ISO7816; import o.TVH; import o.xzZ; /* loaded from: classes2.dex */ public final class UnsignedLongs { public static final long MAX_VALUE = -1; private static final byte[] $$a = {15, Ascii.DC4, ISO7816.INS_MSE, -3}; private static final int $$b = 1; private static int $10 = 0; private static int $11 = 1; private static int b = 0; private static int c = 1; private static char[] a = {40027}; /* JADX WARN: Removed duplicated region for block: B:10:0x0028 */ /* JADX WARN: Removed duplicated region for block: B:7:0x0020 */ /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x0028 -> B:4:0x002e). 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 f(byte r6, short r7, short r8, java.lang.Object[] r9) { /* byte[] r0 = com.google.common.primitives.UnsignedLongs.$$a int r8 = r8 * 3 int r8 = 3 - r8 int r7 = r7 * 2 int r7 = 73 - r7 int r6 = r6 * 2 int r6 = r6 + 1 byte[] r1 = new byte[r6] r2 = 0 if (r0 != 0) goto L16 r3 = r8 r4 = r2 goto L2e L16: r3 = r2 L17: int r8 = r8 + 1 byte r4 = (byte) r7 r1[r3] = r4 int r3 = r3 + 1 if (r3 != r6) goto L28 java.lang.String r6 = new java.lang.String r6.(r1, r2) r9[r2] = r6 return L28: r4 = r0[r8] r5 = r3 r3 = r8 r8 = r4 r4 = r5 L2e: int r7 = r7 + r8 r8 = r3 r3 = r4 goto L17 */ throw new UnsupportedOperationException("Method not decompiled: com.google.common.primitives.UnsignedLongs.f(byte, short, short, java.lang.Object[]):void"); } private UnsignedLongs() { } public static int compare(long j, long j2) { int i = 2 % 2; int i2 = b + 115; c = i2 % 128; int i3 = i2 % 2; int compare = Longs.compare(flip(j), flip(j2)); int i4 = c + 29; b = i4 % 128; int i5 = i4 % 2; return compare; } /* JADX WARN: Removed duplicated region for block: B:9:0x002a */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public static long min(long... r7) { /* r0 = 2 int r1 = r0 % r0 int r1 = com.google.common.primitives.UnsignedLongs.b int r2 = r1 + 91 int r3 = r2 % 128 com.google.common.primitives.UnsignedLongs.c = r3 int r2 = r2 % r0 int r2 = r7.length r3 = 0 r4 = 1 if (r2 <= 0) goto L1d int r1 = r1 + 23 int r2 = r1 % 128 com.google.common.primitives.UnsignedLongs.c = r2 int r1 = r1 % r0 if (r1 != 0) goto L1b goto L1d L1b: r1 = r4 goto L1e L1d: r1 = r3 L1e: com.google.common.base.Preconditions.checkArgument(r1) r1 = r7[r3] long r1 = flip(r1) L27: int r3 = r7.length if (r4 >= r3) goto L4b r5 = r7[r4] long r5 = flip(r5) int r3 = (r5 > r1 ? 1 : (r5 == r1 ? 0 : -1)) if (r3 >= 0) goto L3e int r1 = com.google.common.primitives.UnsignedLongs.b int r1 = r1 + 119 int r2 = r1 % 128 com.google.common.primitives.UnsignedLongs.c = r2 int r1 = r1 % r0 r1 = r5 L3e: int r4 = r4 + 1 int r3 = com.google.common.primitives.UnsignedLongs.c int r3 = r3 + 99 int r5 = r3 % 128 com.google.common.primitives.UnsignedLongs.b = r5 int r3 = r3 % 2 goto L27 L4b: long r0 = flip(r1) return r0 */ throw new UnsupportedOperationException("Method not decompiled: com.google.common.primitives.UnsignedLongs.min(long[]):long"); } public static long max(long... jArr) { boolean z; int i = 2 % 2; int i2 = b; int i3 = i2 + 109; c = i3 % 128; int i4 = i3 % 2; if (jArr.length > 0) { int i5 = i2 + 61; c = i5 % 128; int i6 = i5 % 2; z = true; } else { z = false; } Preconditions.checkArgument(z); long flip = flip(jArr[0]); for (int i7 = 1; i7 < jArr.length; i7++) { long flip2 = flip(jArr[i7]); if (flip2 > flip) { int i8 = c + 15; b = i8 % 128; int i9 = i8 % 2; flip = flip2; } } return flip(flip); } public static String join(String str, long... jArr) { int i = 2 % 2; int i2 = b + 83; c = i2 % 128; if (i2 % 2 == 0) { Preconditions.checkNotNull(str); int i3 = 46 / 0; if (jArr.length == 0) { return ""; } } else { Preconditions.checkNotNull(str); if (jArr.length == 0) { return ""; } } StringBuilder sb = new StringBuilder(jArr.length * 5); sb.append(toString(jArr[0])); int i4 = 1; while (i4 < jArr.length) { int i5 = b + 15; c = i5 % 128; if (i5 % 2 == 0) { sb.append(str); sb.append(toString(jArr[i4])); i4 += 78; } else { sb.append(str); sb.append(toString(jArr[i4])); i4++; } } return sb.toString(); } public static Comparator lexicographicalComparator() { int i = 2 % 2; int i2 = c + 61; b = i2 % 128; int i3 = i2 % 2; LexicographicalComparator lexicographicalComparator = LexicographicalComparator.INSTANCE; if (i3 != 0) { int i4 = 23 / 0; } return lexicographicalComparator; } /* loaded from: classes2.dex */ enum LexicographicalComparator implements Comparator { INSTANCE; @Override // java.util.Comparator public final int compare(long[] jArr, long[] jArr2) { int min = Math.min(jArr.length, jArr2.length); for (int i = 0; i < min; i++) { long j = jArr[i]; long j2 = jArr2[i]; if (j != j2) { return UnsignedLongs.compare(j, j2); } } return jArr.length - jArr2.length; } @Override // java.lang.Enum public final String toString() { return "UnsignedLongs.lexicographicalComparator()"; } } public static void sort(long[] jArr) { int i; int i2 = 2 % 2; int i3 = c + 17; b = i3 % 128; if (i3 % 2 != 0) { Preconditions.checkNotNull(jArr); i = 1; } else { Preconditions.checkNotNull(jArr); i = 0; } sort(jArr, i, jArr.length); int i4 = b + 19; c = i4 % 128; int i5 = i4 % 2; } public static void sort(long[] jArr, int i, int i2) { int i3 = 2 % 2; Preconditions.checkNotNull(jArr); Preconditions.checkPositionIndexes(i, i2, jArr.length); for (int i4 = i; i4 < i2; i4++) { int i5 = b + 37; c = i5 % 128; int i6 = i5 % 2; jArr[i4] = flip(jArr[i4]); } Arrays.sort(jArr, i, i2); while (i < i2) { int i7 = b + 21; c = i7 % 128; int i8 = i7 % 2; jArr[i] = flip(jArr[i]); i++; } } public static void sortDescending(long[] jArr) { int i = 2 % 2; int i2 = c + 97; b = i2 % 128; int i3 = i2 % 2; Preconditions.checkNotNull(jArr); sortDescending(jArr, 0, jArr.length); int i4 = b + 77; c = i4 % 128; if (i4 % 2 == 0) { int i5 = 14 / 0; } } private static void d(byte[] bArr, int[] iArr, boolean z, Object[] objArr) { int i; char[] cArr; char[] cArr2; int i2 = 2 % 2; TVH tvh = new TVH(); int i3 = 0; int i4 = iArr[0]; int i5 = iArr[1]; int i6 = iArr[2]; int i7 = iArr[3]; char[] cArr3 = a; if (cArr3 != null) { int length = cArr3.length; char[] cArr4 = new char[length]; int i8 = 0; while (i8 < length) { try { Object[] objArr2 = new Object[1]; objArr2[i3] = Integer.valueOf(cArr3[i8]); Object obj = xzZ.y.get(1645349359); if (obj != null) { cArr2 = cArr3; } else { Class cls = (Class) xzZ.c(223 - (ViewConfiguration.getFadingEdgeLength() >> 16), 5 - View.resolveSize(i3, i3), (char) (TextUtils.indexOf((CharSequence) "", '0', i3) + 41978)); int i9 = $$b; byte b2 = (byte) (i9 - 1); byte b3 = (byte) i9; cArr2 = cArr3; Object[] objArr3 = new Object[1]; f(b2, b3, (byte) (b3 - 1), objArr3); obj = cls.getMethod((String) objArr3[0], Integer.TYPE); xzZ.y.put(1645349359, obj); } cArr4[i8] = ((Character) ((Method) obj).invoke(null, objArr2)).charValue(); i8++; cArr3 = cArr2; i3 = 0; } catch (Throwable th) { Throwable cause = th.getCause(); if (cause == null) { throw th; } throw cause; } } cArr3 = cArr4; } char[] cArr5 = new char[i5]; System.arraycopy(cArr3, i4, cArr5, 0, i5); if (bArr != null) { char[] cArr6 = new char[i5]; tvh.c = 0; char c2 = 0; while (tvh.c < i5) { if (bArr[tvh.c] == 1) { int i10 = $10 + 93; $11 = i10 % 128; if (i10 % 2 == 0) { int i11 = tvh.c; try { Object[] objArr4 = {Integer.valueOf(cArr5[tvh.c]), Integer.valueOf(c2)}; Object obj2 = xzZ.y.get(850398076); if (obj2 == null) { obj2 = ((Class) xzZ.c(502 - Color.argb(0, 0, 0, 0), 5 - (ViewConfiguration.getScrollDefaultDelay() >> 16), (char) (54 - (ViewConfiguration.getTouchSlop() >> 8)))).getMethod("F", Integer.TYPE, Integer.TYPE); xzZ.y.put(850398076, obj2); } cArr6[i11] = ((Character) ((Method) obj2).invoke(null, objArr4)).charValue(); throw null; } catch (Throwable th2) { Throwable cause2 = th2.getCause(); if (cause2 == null) { throw th2; } throw cause2; } } int i12 = tvh.c; Object[] objArr5 = {Integer.valueOf(cArr5[tvh.c]), Integer.valueOf(c2)}; Object obj3 = xzZ.y.get(850398076); if (obj3 == null) { obj3 = ((Class) xzZ.c(502 - TextUtils.indexOf("", ""), View.combineMeasuredStates(0, 0) + 5, (char) ((ViewConfiguration.getScrollBarSize() >> 8) + 54))).getMethod("F", Integer.TYPE, Integer.TYPE); xzZ.y.put(850398076, obj3); } cArr6[i12] = ((Character) ((Method) obj3).invoke(null, objArr5)).charValue(); } else { int i13 = tvh.c; Object[] objArr6 = {Integer.valueOf(cArr5[tvh.c]), Integer.valueOf(c2)}; Object obj4 = xzZ.y.get(1084521042); if (obj4 == null) { obj4 = ((Class) xzZ.c(16 - (SystemClock.currentThreadTimeMillis() > (-1L) ? 1 : (SystemClock.currentThreadTimeMillis() == (-1L) ? 0 : -1)), 4 - MotionEvent.axisFromString(""), (char) (KeyEvent.normalizeMetaState(0) + 58134))).getMethod("H", Integer.TYPE, Integer.TYPE); xzZ.y.put(1084521042, obj4); } cArr6[i13] = ((Character) ((Method) obj4).invoke(null, objArr6)).charValue(); } c2 = cArr6[tvh.c]; Object[] objArr7 = {tvh, tvh}; Object obj5 = xzZ.y.get(1698744941); if (obj5 == null) { Class cls2 = (Class) xzZ.c(402 - (ViewConfiguration.getScrollBarSize() >> 8), 5 - Gravity.getAbsoluteGravity(0, 0), (char) (21608 - (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)))); byte b4 = (byte) ($$b - 1); byte b5 = b4; Object[] objArr8 = new Object[1]; f(b4, b5, b5, objArr8); obj5 = cls2.getMethod((String) objArr8[0], Object.class, Object.class); xzZ.y.put(1698744941, obj5); } ((Method) obj5).invoke(null, objArr7); int i14 = $10 + 115; $11 = i14 % 128; if (i14 % 2 == 0) { int i15 = 4 / 3; } } cArr5 = cArr6; } if (i7 > 0) { int i16 = $11 + 97; $10 = i16 % 128; int i17 = i16 % 2; char[] cArr7 = new char[i5]; System.arraycopy(cArr5, 0, cArr7, 0, i5); int i18 = i5 - i7; System.arraycopy(cArr7, 0, cArr5, i18, i7); System.arraycopy(cArr7, i7, cArr5, 0, i18); } if (z) { int i19 = $11 + 71; $10 = i19 % 128; if (i19 % 2 != 0) { cArr = new char[i5]; i = 0; } else { i = 0; cArr = new char[i5]; } while (true) { tvh.c = i; if (tvh.c >= i5) { break; } int i20 = $10 + 59; $11 = i20 % 128; if (i20 % 2 == 0) { cArr[tvh.c] = cArr5[(i5 / tvh.c) << 1]; } else { cArr[tvh.c] = cArr5[(i5 - tvh.c) - 1]; } i = tvh.c + 1; } cArr5 = cArr; } if (i6 > 0) { int i21 = $10 + 59; $11 = i21 % 128; int i22 = i21 % 2; int i23 = 0; while (true) { tvh.c = i23; if (tvh.c >= i5) { break; } cArr5[tvh.c] = (char) (cArr5[tvh.c] - iArr[2]); i23 = tvh.c + 1; } } objArr[0] = new String(cArr5); } public static void sortDescending(long[] jArr, int i, int i2) { int i3 = 2 % 2; Preconditions.checkNotNull(jArr); Preconditions.checkPositionIndexes(i, i2, jArr.length); for (int i4 = i; i4 < i2; i4++) { jArr[i4] = Long.MAX_VALUE ^ jArr[i4]; } Arrays.sort(jArr, i, i2); int i5 = b + 65; c = i5 % 128; if (i5 % 2 == 0) { int i6 = 4 / 3; } while (i < i2) { int i7 = c + 3; b = i7 % 128; int i8 = i7 % 2; jArr[i] = jArr[i] ^ Long.MAX_VALUE; i++; } } public static long divide(long j, long j2) { int i = 2 % 2; int i2 = c + 57; b = i2 % 128; if (i2 % 2 == 0 ? j2 < 0 : j2 < 1) { if (compare(j, j2) >= 0) { return 1L; } int i3 = b + 79; c = i3 % 128; return i3 % 2 == 0 ? 1L : 0L; } if (j >= 0) { return j / j2; } int i4 = 1; long j3 = ((j >>> 1) / j2) << 1; if (compare(j - (j3 * j2), j2) < 0) { int i5 = c + 67; b = i5 % 128; if (i5 % 2 == 0) { i4 = 0; } } return j3 + i4; } public static long remainder(long j, long j2) { int i = 2 % 2; if (j2 >= 0) { if (j >= 0) { return j % j2; } long j3 = j - ((((j >>> 1) / j2) << 1) * j2); if (compare(j3, j2) < 0) { j2 = 0; } return j3 - j2; } int i2 = c + 47; b = i2 % 128; int i3 = i2 % 2; if (compare(j, j2) < 0) { return j; } long j4 = j - j2; int i4 = c + 57; b = i4 % 128; if (i4 % 2 == 0) { return j4; } throw null; } public static long parseUnsignedLong(String str) { int i = 2 % 2; int i2 = c + 93; b = i2 % 128; long parseUnsignedLong = parseUnsignedLong(str, i2 % 2 != 0 ? 41 : 10); int i3 = b + 119; c = i3 % 128; if (i3 % 2 == 0) { int i4 = 54 / 0; } return parseUnsignedLong; } public static long parseUnsignedLong(String str, int i) { int i2 = 2 % 2; int i3 = b + 41; c = i3 % 128; Object obj = null; if (i3 % 2 != 0) { Preconditions.checkNotNull(str); if (str.length() == 0) { throw new NumberFormatException("empty string"); } if (i < 2 || i > 36) { StringBuilder sb = new StringBuilder(26); sb.append("illegal radix: "); sb.append(i); throw new NumberFormatException(sb.toString()); } int i4 = ParseOverflowDetection.maxSafeDigits[i]; long j = 0; for (int i5 = 0; i5 < str.length(); i5++) { int digit = Character.digit(str.charAt(i5), i); if (digit == -1) { throw new NumberFormatException(str); } int i6 = b + 75; int i7 = i6 % 128; c = i7; int i8 = i6 % 2; if (i5 > i4 - 1) { int i9 = i7 + 103; b = i9 % 128; if (i9 % 2 == 0) { if (ParseOverflowDetection.overflowInParse(j, digit, i)) { int i10 = b + 11; c = i10 % 128; if (i10 % 2 != 0) { String valueOf = String.valueOf(str); throw new NumberFormatException(valueOf.length() != 0 ? "Too large for unsigned long: ".concat(valueOf) : new String("Too large for unsigned long: ")); } String.valueOf(str).length(); obj.hashCode(); throw null; } } else { ParseOverflowDetection.overflowInParse(j, digit, i); throw null; } } j = (j * i) + digit; } return j; } Preconditions.checkNotNull(str); str.length(); obj.hashCode(); throw null; } public static long decode(String str) { String concat; int i = 2 % 2; int i2 = c + 121; b = i2 % 128; int i3 = i2 % 2; ParseRequest fromString = ParseRequest.fromString(str); try { return parseUnsignedLong(fromString.rawValue, fromString.radix); } catch (NumberFormatException e) { String valueOf = String.valueOf(str); if (valueOf.length() != 0) { concat = "Error parsing value: ".concat(valueOf); } else { concat = new String("Error parsing value: "); int i4 = b + 83; c = i4 % 128; int i5 = i4 % 2; } NumberFormatException numberFormatException = new NumberFormatException(concat); numberFormatException.initCause(e); throw numberFormatException; } } /* JADX INFO: Access modifiers changed from: package-private */ /* loaded from: classes2.dex */ public static final class ParseOverflowDetection { static final long[] maxValueDivs = new long[37]; static final int[] maxValueMods = new int[37]; static final int[] maxSafeDigits = new int[37]; private ParseOverflowDetection() { } static { BigInteger bigInteger = new BigInteger("10000000000000000", 16); for (int i = 2; i <= 36; i++) { long j = i; maxValueDivs[i] = UnsignedLongs.divide(-1L, j); maxValueMods[i] = (int) UnsignedLongs.remainder(-1L, j); maxSafeDigits[i] = bigInteger.toString(i).length() - 1; } } static boolean overflowInParse(long j, int i, int i2) { if (j < 0) { return true; } long j2 = maxValueDivs[i2]; if (j < j2) { return false; } return j > j2 || i > maxValueMods[i2]; } } public static String toString(long j) { int i = 2 % 2; int i2 = c + 47; b = i2 % 128; int i3 = i2 % 2; String unsignedLongs = toString(j, 10); int i4 = b + 13; c = i4 % 128; if (i4 % 2 != 0) { return unsignedLongs; } throw null; } /* JADX WARN: Removed duplicated region for block: B:10:0x0025 */ /* JADX WARN: Removed duplicated region for block: B:13:0x003d */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public static java.lang.String toString(long r13, int r15) { /* Method dump skipped, instructions count: 212 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: com.google.common.primitives.UnsignedLongs.toString(long, int):java.lang.String"); } private static long flip(long j) { int i = 2 % 2; int i2 = c + 31; int i3 = i2 % 128; b = i3; int i4 = i2 % 2; long j2 = j ^ Long.MIN_VALUE; int i5 = i3 + 47; c = i5 % 128; if (i5 % 2 == 0) { int i6 = 11 / 0; } return j2; } }