what-the-bank/sources/com/google/common/base/Strings.java

589 lines
21 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.common.base;
import android.graphics.Color;
import android.graphics.PointF;
import android.os.Process;
import android.text.TextUtils;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.View;
import android.view.ViewConfiguration;
import android.widget.ExpandableListView;
import com.airbnb.deeplinkdispatch.UrlTreeKt;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.pingan.ai.p;
import java.lang.reflect.Method;
import java.util.logging.Level;
import java.util.logging.Logger;
import o.Nhs;
import o.xzZ;
import org.jmrtd.lds.CVCAFile;
/* loaded from: classes.dex */
public final class Strings {
private static final byte[] $$a = {110, 84, -61, CVCAFile.CAR_TAG};
private static final int $$b = 29;
private static int $10 = 0;
private static int $11 = 1;
private static int c = 0;
private static int b = 1;
private static long a = 9051040786702654117L;
private static int e = 452713125;
private static char d = 44622;
/* JADX WARN: Removed duplicated region for block: B:10:0x0024 */
/* JADX WARN: Removed duplicated region for block: B:7:0x001c */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:10:0x0024 -> B:4:0x002a). 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(int r7, byte r8, int r9, java.lang.Object[] r10) {
/*
int r8 = 115 - r8
int r7 = r7 * 2
int r7 = r7 + 1
byte[] r0 = com.google.common.base.Strings.$$a
int r9 = r9 + 4
byte[] r1 = new byte[r7]
r2 = 0
if (r0 != 0) goto L12
r3 = r9
r5 = r2
goto L2a
L12:
r3 = r2
L13:
byte r4 = (byte) r8
int r5 = r3 + 1
r1[r3] = r4
int r9 = r9 + 1
if (r5 != r7) goto L24
java.lang.String r7 = new java.lang.String
r7.<init>(r1, r2)
r10[r2] = r7
return
L24:
r3 = r0[r9]
r6 = r9
r9 = r8
r8 = r3
r3 = r6
L2a:
int r8 = r8 + r9
r9 = r3
r3 = r5
goto L13
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.common.base.Strings.g(int, byte, int, java.lang.Object[]):void");
}
private Strings() {
}
public static String nullToEmpty(String str) {
int i = 2 % 2;
int i2 = b + 121;
c = i2 % 128;
int i3 = i2 % 2;
String nullToEmpty = Platform.nullToEmpty(str);
int i4 = b + 63;
c = i4 % 128;
int i5 = i4 % 2;
return nullToEmpty;
}
public static String emptyToNull(String str) {
int i = 2 % 2;
int i2 = c + 71;
b = i2 % 128;
if (i2 % 2 == 0) {
Platform.emptyToNull(str);
throw null;
}
String emptyToNull = Platform.emptyToNull(str);
int i3 = b + 45;
c = i3 % 128;
int i4 = i3 % 2;
return emptyToNull;
}
public static boolean isNullOrEmpty(String str) {
int i = 2 % 2;
int i2 = c + 103;
b = i2 % 128;
int i3 = i2 % 2;
boolean stringIsNullOrEmpty = Platform.stringIsNullOrEmpty(str);
int i4 = c + 79;
b = i4 % 128;
int i5 = i4 % 2;
return stringIsNullOrEmpty;
}
public static String padStart(String str, int i, char c2) {
int i2 = 2 % 2;
int i3 = b + 27;
c = i3 % 128;
if (i3 % 2 == 0) {
Preconditions.checkNotNull(str);
if (str.length() >= i) {
int i4 = b + 107;
c = i4 % 128;
if (i4 % 2 == 0) {
return str;
}
throw null;
}
StringBuilder sb = new StringBuilder(i);
for (int length = str.length(); length < i; length++) {
int i5 = c + 13;
b = i5 % 128;
int i6 = i5 % 2;
sb.append(c2);
}
sb.append(str);
return sb.toString();
}
Preconditions.checkNotNull(str);
str.length();
throw null;
}
private static void f(char c2, int i, char[] cArr, char[] cArr2, char[] cArr3, Object[] objArr) {
int i2 = 2 % 2;
Nhs nhs = new Nhs();
int length = cArr.length;
char[] cArr4 = new char[length];
int length2 = cArr3.length;
char[] cArr5 = new char[length2];
System.arraycopy(cArr, 0, cArr4, 0, length);
System.arraycopy(cArr3, 0, cArr5, 0, length2);
cArr4[0] = (char) (cArr4[0] ^ c2);
cArr5[2] = (char) (cArr5[2] + ((char) i));
int length3 = cArr2.length;
char[] cArr6 = new char[length3];
nhs.a = 0;
while (nhs.a < length3) {
int i3 = $10 + 93;
$11 = i3 % 128;
int i4 = i3 % 2;
try {
Object[] objArr2 = {nhs};
Object obj = xzZ.y.get(263693715);
if (obj == null) {
obj = ((Class) xzZ.c((ViewConfiguration.getFadingEdgeLength() >> 16) + 45, KeyEvent.getDeadChar(0, 0) + 5, (char) (ViewConfiguration.getScrollBarFadeDuration() >> 16))).getMethod("t", Object.class);
xzZ.y.put(263693715, obj);
}
int intValue = ((Integer) ((Method) obj).invoke(null, objArr2)).intValue();
Object[] objArr3 = {nhs};
Object obj2 = xzZ.y.get(-484664112);
if (obj2 == null) {
Class cls = (Class) xzZ.c(352 - (ViewConfiguration.getWindowTouchSlop() >> 8), Gravity.getAbsoluteGravity(0, 0) + 5, (char) (52128 - View.MeasureSpec.makeMeasureSpec(0, 0)));
byte b2 = (byte) 0;
byte b3 = b2;
Object[] objArr4 = new Object[1];
g(b2, b3, (byte) (b3 - 1), objArr4);
obj2 = cls.getMethod((String) objArr4[0], Object.class);
xzZ.y.put(-484664112, obj2);
}
int intValue2 = ((Integer) ((Method) obj2).invoke(null, objArr3)).intValue();
Object[] objArr5 = {nhs, Integer.valueOf(cArr4[nhs.a % 4] * 32718), Integer.valueOf(cArr5[intValue])};
Object obj3 = xzZ.y.get(430099516);
if (obj3 == null) {
obj3 = ((Class) xzZ.c(748 - (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)), 5 - (Process.myPid() >> 22), (char) ((Process.getThreadPriority(0) + 20) >> 6))).getMethod(p.a, Object.class, Integer.TYPE, Integer.TYPE);
xzZ.y.put(430099516, obj3);
}
((Method) obj3).invoke(null, objArr5);
Object[] objArr6 = {Integer.valueOf(cArr4[intValue2] * 32718), Integer.valueOf(cArr5[intValue])};
Object obj4 = xzZ.y.get(1019894806);
if (obj4 == null) {
Class cls2 = (Class) xzZ.c(402 - Color.red(0), 5 - TextUtils.getCapsMode("", 0, 0), (char) ((ExpandableListView.getPackedPositionForGroup(0) > 0L ? 1 : (ExpandableListView.getPackedPositionForGroup(0) == 0L ? 0 : -1)) + 21608));
byte b4 = (byte) 0;
byte b5 = (byte) (b4 + 1);
Object[] objArr7 = new Object[1];
g(b4, b5, (byte) (-b5), objArr7);
obj4 = cls2.getMethod((String) objArr7[0], Integer.TYPE, Integer.TYPE);
xzZ.y.put(1019894806, obj4);
}
cArr5[intValue2] = ((Character) ((Method) obj4).invoke(null, objArr6)).charValue();
cArr4[intValue2] = nhs.c;
cArr6[nhs.a] = (char) ((((cArr4[intValue2] ^ cArr2[nhs.a]) ^ (a ^ 9051040786702654117L)) ^ ((int) (e ^ 9051040786702654117L))) ^ ((char) (d ^ 9051040786702654117L)));
nhs.a++;
int i5 = $10 + 73;
$11 = i5 % 128;
int i6 = i5 % 2;
} catch (Throwable th) {
Throwable cause = th.getCause();
if (cause == null) {
throw th;
}
throw cause;
}
}
String str = new String(cArr6);
int i7 = $11 + 101;
$10 = i7 % 128;
if (i7 % 2 == 0) {
objArr[0] = str;
} else {
int i8 = 31 / 0;
objArr[0] = str;
}
}
public static String padEnd(String str, int i, char c2) {
int i2 = 2 % 2;
int i3 = b + 59;
c = i3 % 128;
if (i3 % 2 != 0) {
Preconditions.checkNotNull(str);
str.length();
throw null;
}
Preconditions.checkNotNull(str);
if (str.length() >= i) {
return str;
}
StringBuilder sb = new StringBuilder(i);
sb.append(str);
int length = str.length();
while (length < i) {
sb.append(c2);
length++;
int i4 = c + 75;
b = i4 % 128;
int i5 = i4 % 2;
}
String obj = sb.toString();
int i6 = b + 99;
c = i6 % 128;
if (i6 % 2 != 0) {
int i7 = 14 / 0;
}
return obj;
}
public static String repeat(String str, int i) {
int i2 = 2 % 2;
Preconditions.checkNotNull(str);
if (i <= 1) {
Preconditions.checkArgument(i >= 0, "invalid count: %s", i);
return i == 0 ? "" : str;
}
int length = str.length();
long j = length * i;
int i3 = (int) j;
if (i3 != j) {
StringBuilder sb = new StringBuilder(51);
sb.append("Required array size too large: ");
sb.append(j);
throw new ArrayIndexOutOfBoundsException(sb.toString());
}
int i4 = b + 73;
c = i4 % 128;
int i5 = i4 % 2;
char[] cArr = new char[i3];
str.getChars(0, length, cArr, 0);
int i6 = c + 89;
while (true) {
b = i6 % 128;
int i7 = i6 % 2;
int i8 = i3 - length;
if (length >= i8) {
System.arraycopy(cArr, 0, cArr, length, i8);
return new String(cArr);
}
System.arraycopy(cArr, 0, cArr, length, length);
length <<= 1;
i6 = c + 87;
}
}
/* JADX WARN: Code restructure failed: missing block: B:13:0x004a, code lost:
if (validSurrogatePairAt(r7, r1) != false) goto L14;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static java.lang.String commonPrefix(java.lang.CharSequence r6, java.lang.CharSequence r7) {
/*
r0 = 2
int r1 = r0 % r0
com.google.common.base.Preconditions.checkNotNull(r6)
com.google.common.base.Preconditions.checkNotNull(r7)
int r1 = r6.length()
int r2 = r7.length()
int r1 = java.lang.Math.min(r1, r2)
int r2 = com.google.common.base.Strings.c
int r2 = r2 + 91
int r3 = r2 % 128
com.google.common.base.Strings.b = r3
int r2 = r2 % r0
if (r2 != 0) goto L22
int r2 = r0 / r0
L22:
r2 = 0
r3 = r2
L24:
if (r3 >= r1) goto L33
char r4 = r6.charAt(r3)
char r5 = r7.charAt(r3)
if (r4 != r5) goto L33
int r3 = r3 + 1
goto L24
L33:
int r1 = r3 + (-1)
boolean r4 = validSurrogatePairAt(r6, r1)
r4 = r4 ^ 1
if (r4 == 0) goto L4c
int r4 = com.google.common.base.Strings.c
int r4 = r4 + 69
int r5 = r4 % 128
com.google.common.base.Strings.b = r5
int r4 = r4 % r0
boolean r7 = validSurrogatePairAt(r7, r1)
if (r7 == 0) goto L4d
L4c:
r3 = r1
L4d:
java.lang.CharSequence r6 = r6.subSequence(r2, r3)
java.lang.String r6 = r6.toString()
return r6
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.common.base.Strings.commonPrefix(java.lang.CharSequence, java.lang.CharSequence):java.lang.String");
}
/* JADX WARN: Removed duplicated region for block: B:16:0x00a6 A[RETURN] */
/* JADX WARN: Removed duplicated region for block: B:18:0x00a7 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static java.lang.String commonSuffix(java.lang.CharSequence r5, java.lang.CharSequence r6) {
/*
r0 = 2
int r1 = r0 % r0
com.google.common.base.Preconditions.checkNotNull(r5)
com.google.common.base.Preconditions.checkNotNull(r6)
int r1 = r5.length()
int r2 = r6.length()
int r1 = java.lang.Math.min(r1, r2)
r2 = 0
L16:
if (r2 >= r1) goto L55
int r3 = com.google.common.base.Strings.b
int r3 = r3 + 21
int r4 = r3 % 128
com.google.common.base.Strings.c = r4
int r3 = r3 % r0
if (r3 == 0) goto L3a
int r3 = r5.length()
int r3 = r3 >> r2
char r3 = r5.charAt(r3)
int r4 = r6.length()
int r4 = r4 * r2
int r4 = r4 << 1
char r4 = r6.charAt(r4)
if (r3 != r4) goto L55
goto L52
L3a:
int r3 = r5.length()
int r3 = r3 - r2
int r3 = r3 + (-1)
char r3 = r5.charAt(r3)
int r4 = r6.length()
int r4 = r4 - r2
int r4 = r4 + (-1)
char r4 = r6.charAt(r4)
if (r3 != r4) goto L55
L52:
int r2 = r2 + 1
goto L16
L55:
int r1 = r5.length()
int r1 = r1 - r2
int r1 = r1 + (-1)
boolean r1 = validSurrogatePairAt(r5, r1)
if (r1 != 0) goto L88
int r1 = com.google.common.base.Strings.b
int r1 = r1 + 5
int r3 = r1 % 128
com.google.common.base.Strings.c = r3
int r1 = r1 % r0
if (r1 == 0) goto L7b
int r1 = r6.length()
int r1 = r1 * r2
int r1 = r1 + (-1)
boolean r6 = validSurrogatePairAt(r6, r1)
if (r6 == 0) goto L8a
goto L88
L7b:
int r1 = r6.length()
int r1 = r1 - r2
int r1 = r1 + (-1)
boolean r6 = validSurrogatePairAt(r6, r1)
if (r6 == 0) goto L8a
L88:
int r2 = r2 + (-1)
L8a:
int r6 = r5.length()
int r6 = r6 - r2
int r1 = r5.length()
java.lang.CharSequence r5 = r5.subSequence(r6, r1)
java.lang.String r5 = r5.toString()
int r6 = com.google.common.base.Strings.c
int r6 = r6 + 93
int r1 = r6 % 128
com.google.common.base.Strings.b = r1
int r6 = r6 % r0
if (r6 == 0) goto La7
return r5
La7:
r5 = 0
throw r5
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.common.base.Strings.commonSuffix(java.lang.CharSequence, java.lang.CharSequence):java.lang.String");
}
static boolean validSurrogatePairAt(CharSequence charSequence, int i) {
int i2 = 2 % 2;
int i3 = b + 37;
c = i3 % 128;
int i4 = i3 % 2;
if (i >= 0 && i <= charSequence.length() - 2 && Character.isHighSurrogate(charSequence.charAt(i))) {
int i5 = c + 65;
b = i5 % 128;
if (i5 % 2 == 0) {
if (Character.isLowSurrogate(charSequence.charAt(i))) {
return true;
}
} else if (!(!Character.isLowSurrogate(charSequence.charAt(i + 1)))) {
return true;
}
}
int i6 = c + 29;
b = i6 % 128;
int i7 = i6 % 2;
return false;
}
public static String lenientFormat(String str, Object... objArr) {
int i = 2 % 2;
int i2 = b + 55;
c = i2 % 128;
if (i2 % 2 != 0) {
String.valueOf(str);
throw null;
}
String valueOf = String.valueOf(str);
int i3 = 0;
if (objArr == null) {
objArr = new Object[]{"(Object[])null"};
} else {
for (int i4 = 0; i4 < objArr.length; i4++) {
objArr[i4] = lenientToString(objArr[i4]);
}
}
StringBuilder sb = new StringBuilder(valueOf.length() + (objArr.length << 4));
int i5 = 0;
while (i3 < objArr.length) {
int i6 = b + 87;
c = i6 % 128;
if (i6 % 2 != 0) {
valueOf.indexOf("%s", i5);
throw null;
}
int indexOf = valueOf.indexOf("%s", i5);
if (indexOf == -1) {
break;
}
int i7 = c + 29;
b = i7 % 128;
if (i7 % 2 == 0) {
sb.append((CharSequence) valueOf, i5, indexOf);
sb.append(objArr[i3]);
i5 = indexOf - 5;
i3 += 105;
} else {
sb.append((CharSequence) valueOf, i5, indexOf);
sb.append(objArr[i3]);
i5 = indexOf + 2;
i3++;
}
}
sb.append((CharSequence) valueOf, i5, valueOf.length());
if (i3 < objArr.length) {
sb.append(" [");
int i8 = i3 + 1;
sb.append(objArr[i3]);
while (i8 < objArr.length) {
int i9 = b + 57;
c = i9 % 128;
if (i9 % 2 != 0) {
sb.append(", ");
sb.append(objArr[i8]);
i8 += 50;
} else {
sb.append(", ");
sb.append(objArr[i8]);
i8++;
}
int i10 = c + 21;
b = i10 % 128;
int i11 = i10 % 2;
}
sb.append(']');
}
return sb.toString();
}
private static String lenientToString(Object obj) {
int i = 2 % 2;
int i2 = b;
int i3 = i2 + 95;
c = i3 % 128;
int i4 = i3 % 2;
if (obj == null) {
int i5 = i2 + 99;
c = i5 % 128;
int i6 = i5 % 2;
Object[] objArr = new Object[1];
f((char) (View.MeasureSpec.getSize(0) + 33131), Color.alpha(0), new char[]{24460, 57060, 27524, 13185}, new char[]{4783, 29931, 53674, 55955}, new char[]{0, 0, 0, 0}, objArr);
return ((String) objArr[0]).intern();
}
try {
return obj.toString();
} catch (Exception e2) {
String name = obj.getClass().getName();
String hexString = Integer.toHexString(System.identityHashCode(obj));
StringBuilder sb = new StringBuilder(String.valueOf(name).length() + 1 + String.valueOf(hexString).length());
sb.append(name);
sb.append('@');
sb.append(hexString);
String obj2 = sb.toString();
Logger logger = Logger.getLogger("com.google.common.base.Strings");
Level level = Level.WARNING;
String valueOf = String.valueOf(obj2);
logger.log(level, valueOf.length() != 0 ? "Exception during lenientFormat for ".concat(valueOf) : new String("Exception during lenientFormat for "), (Throwable) e2);
String name2 = e2.getClass().getName();
StringBuilder sb2 = new StringBuilder(String.valueOf(obj2).length() + 9 + String.valueOf(name2).length());
sb2.append(UrlTreeKt.configurablePathSegmentPrefix);
sb2.append(obj2);
sb2.append(" threw ");
sb2.append(name2);
sb2.append(UrlTreeKt.configurablePathSegmentSuffix);
String obj3 = sb2.toString();
int i7 = b + 61;
c = i7 % 128;
if (i7 % 2 == 0) {
return obj3;
}
Object obj4 = null;
obj4.hashCode();
throw null;
}
}
}