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

122 lines
3.6 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.internal.firebase_ml;
/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes2.dex */
public final class zzxe {
private static final zzxg zzbtn;
/* JADX INFO: Access modifiers changed from: private */
public static int zzd(int i, int i2, int i3) {
if (i > -12 || i2 > -65 || i3 > -65) {
return -1;
}
return (i ^ (i2 << 8)) ^ (i3 << 16);
}
/* JADX INFO: Access modifiers changed from: private */
public static int zzdr(int i) {
if (i > -12) {
return -1;
}
return i;
}
public static boolean zzi(byte[] bArr) {
return zzbtn.zzf(bArr, 0, bArr.length);
}
/* JADX INFO: Access modifiers changed from: private */
public static int zzw(int i, int i2) {
if (i > -12 || i2 > -65) {
return -1;
}
return i ^ (i2 << 8);
}
public static boolean zzf(byte[] bArr, int i, int i2) {
return zzbtn.zzf(bArr, i, i2);
}
/* JADX INFO: Access modifiers changed from: private */
public static int zzg(byte[] bArr, int i, int i2) {
byte b = bArr[i - 1];
int i3 = i2 - i;
if (i3 == 0) {
return zzdr(b);
}
if (i3 == 1) {
return zzw(b, bArr[i]);
}
if (i3 == 2) {
return zzd(b, bArr[i], bArr[i + 1]);
}
throw new AssertionError();
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zzb(CharSequence charSequence) {
int length = charSequence.length();
int i = 0;
int i2 = 0;
while (i2 < length && charSequence.charAt(i2) < 128) {
i2++;
}
int i3 = length;
while (true) {
if (i2 >= length) {
break;
}
char charAt = charSequence.charAt(i2);
if (charAt < 2048) {
i3 += (127 - charAt) >>> 31;
i2++;
} else {
int length2 = charSequence.length();
while (i2 < length2) {
char charAt2 = charSequence.charAt(i2);
if (charAt2 < 2048) {
i += (127 - charAt2) >>> 31;
} else {
i += 2;
if (55296 <= charAt2 && charAt2 <= 57343) {
if (Character.codePointAt(charSequence, i2) < 65536) {
throw new zzxi(i2, length2);
}
i2++;
}
}
i2++;
}
i3 += i;
}
}
if (i3 >= length) {
return i3;
}
StringBuilder sb = new StringBuilder(54);
sb.append("UTF-8 length does not fit in int: ");
sb.append(i3 + 4294967296L);
throw new IllegalArgumentException(sb.toString());
}
/* JADX INFO: Access modifiers changed from: package-private */
public static int zza(CharSequence charSequence, byte[] bArr, int i, int i2) {
return zzbtn.zzb(charSequence, bArr, i, i2);
}
/* JADX INFO: Access modifiers changed from: package-private */
public static String zzh(byte[] bArr, int i, int i2) throws zzuo {
return zzbtn.zzh(bArr, i, i2);
}
static {
zzxg zzxhVar;
if (zzxc.zztj() && zzxc.zztk() && !zzsr.zzpv()) {
zzxhVar = new zzxj();
} else {
zzxhVar = new zzxh();
}
zzbtn = zzxhVar;
}
}