what-the-bank/sources/com/google/android/gms/internal/firebase_ml/zzxj.java

214 lines
7.9 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.firebase_ml;
import com.kofax.mobile.sdk._internal.impl.camera.h;
/* loaded from: classes2.dex */
final class zzxj extends zzxg {
/* JADX WARN: Code restructure failed: missing block: B:71:0x0055, code lost:
return -1;
*/
@Override // com.google.android.gms.internal.firebase_ml.zzxg
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
final int zzb(int r12, byte[] r13, int r14, int r15) {
/*
Method dump skipped, instructions count: 207
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.firebase_ml.zzxj.zzb(int, byte[], int, int):int");
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // com.google.android.gms.internal.firebase_ml.zzxg
public final String zzh(byte[] bArr, int i, int i2) throws zzuo {
boolean zze;
boolean zze2;
boolean zzf;
boolean zzg;
boolean zze3;
if ((i | i2 | ((bArr.length - i) - i2)) < 0) {
throw new ArrayIndexOutOfBoundsException(String.format("buffer length=%d, index=%d, size=%d", Integer.valueOf(bArr.length), Integer.valueOf(i), Integer.valueOf(i2)));
}
int i3 = i + i2;
char[] cArr = new char[i2];
int i4 = 0;
while (i < i3) {
byte zza = zzxc.zza(bArr, i);
zze3 = zzxf.zze(zza);
if (!zze3) {
break;
}
i++;
zzxf.zza(zza, cArr, i4);
i4++;
}
int i5 = i4;
while (i < i3) {
int i6 = i + 1;
byte zza2 = zzxc.zza(bArr, i);
zze = zzxf.zze(zza2);
if (zze) {
zzxf.zza(zza2, cArr, i5);
i5++;
i = i6;
while (i < i3) {
byte zza3 = zzxc.zza(bArr, i);
zze2 = zzxf.zze(zza3);
if (zze2) {
i++;
zzxf.zza(zza3, cArr, i5);
i5++;
}
}
} else {
zzf = zzxf.zzf(zza2);
if (!zzf) {
zzg = zzxf.zzg(zza2);
if (zzg) {
if (i6 >= i3 - 1) {
throw zzuo.zzrr();
}
zzxf.zza(zza2, zzxc.zza(bArr, i6), zzxc.zza(bArr, i + 2), cArr, i5);
i5++;
i += 3;
} else if (i6 < i3 - 2) {
zzxf.zza(zza2, zzxc.zza(bArr, i6), zzxc.zza(bArr, i + 2), zzxc.zza(bArr, i + 3), cArr, i5);
i5 += 2;
i += 4;
} else {
throw zzuo.zzrr();
}
} else if (i6 < i3) {
i += 2;
zzxf.zza(zza2, zzxc.zza(bArr, i6), cArr, i5);
i5++;
} else {
throw zzuo.zzrr();
}
}
}
return new String(cArr, 0, i5);
}
/* JADX INFO: Access modifiers changed from: package-private */
@Override // com.google.android.gms.internal.firebase_ml.zzxg
public final int zzb(CharSequence charSequence, byte[] bArr, int i, int i2) {
long j;
String str;
String str2;
long j2;
int i3;
char charAt;
long j3 = i;
long j4 = i2 + j3;
int length = charSequence.length();
String str3 = " at index ";
String str4 = "Failed writing ";
if (length > i2 || bArr.length - i2 < i) {
char charAt2 = charSequence.charAt(length - 1);
StringBuilder sb = new StringBuilder(37);
sb.append("Failed writing ");
sb.append(charAt2);
sb.append(" at index ");
sb.append(i + i2);
throw new ArrayIndexOutOfBoundsException(sb.toString());
}
int i4 = 0;
while (true) {
j = 1;
if (i4 >= length || (charAt = charSequence.charAt(i4)) >= 128) {
break;
}
zzxc.zza(bArr, j3, (byte) charAt);
i4++;
j3++;
}
if (i4 == length) {
return (int) j3;
}
while (i4 < length) {
char charAt3 = charSequence.charAt(i4);
if (charAt3 >= 128 || j3 >= j4) {
if (charAt3 < 2048 && j3 <= j4 - 2) {
zzxc.zza(bArr, j3, (byte) ((charAt3 >>> 6) | 960));
j2 = 2 + j3;
zzxc.zza(bArr, j3 + j, (byte) ((charAt3 & '?') | 128));
str = str3;
str2 = str4;
} else {
if ((charAt3 >= 55296 && 57343 >= charAt3) || j3 > j4 - 3) {
str = str3;
str2 = str4;
if (j3 <= j4 - 4) {
int i5 = i4 + 1;
if (i5 != length) {
char charAt4 = charSequence.charAt(i5);
if (Character.isSurrogatePair(charAt3, charAt4)) {
int codePoint = Character.toCodePoint(charAt3, charAt4);
zzxc.zza(bArr, j3, (byte) ((codePoint >>> 18) | 240));
zzxc.zza(bArr, j3 + j, (byte) (((codePoint >>> 12) & 63) | 128));
zzxc.zza(bArr, j3 + 2, (byte) (((codePoint >>> 6) & 63) | 128));
zzxc.zza(bArr, j3 + 3, (byte) ((codePoint & 63) | 128));
j3 = 4 + j3;
i4 = i5;
} else {
i4 = i5;
}
}
throw new zzxi(i4 - 1, length);
}
if (55296 <= charAt3 && charAt3 <= 57343 && ((i3 = i4 + 1) == length || !Character.isSurrogatePair(charAt3, charSequence.charAt(i3)))) {
throw new zzxi(i4, length);
}
StringBuilder sb2 = new StringBuilder(46);
sb2.append(str2);
sb2.append(charAt3);
sb2.append(str);
sb2.append(j3);
throw new ArrayIndexOutOfBoundsException(sb2.toString());
}
zzxc.zza(bArr, j3, (byte) ((charAt3 >>> '\f') | h.Az));
str = str3;
str2 = str4;
zzxc.zza(bArr, j3 + j, (byte) (((charAt3 >>> 6) & 63) | 128));
j2 = j3 + 3;
zzxc.zza(bArr, j3 + 2, (byte) ((charAt3 & '?') | 128));
}
j3 = j2;
} else {
zzxc.zza(bArr, j3, (byte) charAt3);
j3 += j;
str = str3;
str2 = str4;
}
i4++;
str3 = str;
str4 = str2;
j = 1;
}
return (int) j3;
}
private static int zza(byte[] bArr, int i, long j, int i2) {
int zzdr;
int zzw;
int zzd;
if (i2 == 0) {
zzdr = zzxe.zzdr(i);
return zzdr;
}
if (i2 == 1) {
zzw = zzxe.zzw(i, zzxc.zza(bArr, j));
return zzw;
}
if (i2 == 2) {
zzd = zzxe.zzd(i, zzxc.zza(bArr, j), zzxc.zza(bArr, j + 1));
return zzd;
}
throw new AssertionError();
}
}