173 lines
5.7 KiB
Java
173 lines
5.7 KiB
Java
package com.google.android.gms.internal.measurement;
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* loaded from: classes.dex */
|
|
public final class zzmq {
|
|
private static final zzmn zza;
|
|
|
|
static {
|
|
if (zzml.zzx() && zzml.zzy()) {
|
|
int i = zzij.zza;
|
|
}
|
|
zza = new zzmo();
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public static /* synthetic */ int zza(byte[] bArr, int i, int i2) {
|
|
byte b = bArr[i - 1];
|
|
int i3 = i2 - i;
|
|
if (i3 != 0) {
|
|
if (i3 == 1) {
|
|
byte b2 = bArr[i];
|
|
if (b <= -12 && b2 <= -65) {
|
|
return b ^ (b2 << 8);
|
|
}
|
|
} else if (i3 == 2) {
|
|
byte b3 = bArr[i];
|
|
byte b4 = bArr[i + 1];
|
|
if (b <= -12 && b3 <= -65 && b4 <= -65) {
|
|
return ((b3 << 8) ^ b) ^ (b4 << 16);
|
|
}
|
|
} else {
|
|
throw new AssertionError();
|
|
}
|
|
} else if (b <= -12) {
|
|
return b;
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
/* JADX WARN: Code restructure failed: missing block: B:12:0x0101, code lost:
|
|
|
|
return r9 + r0;
|
|
*/
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public static int zzb(java.lang.CharSequence r7, byte[] r8, int r9, int r10) {
|
|
/*
|
|
Method dump skipped, instructions count: 258
|
|
To view this dump add '--comments-level debug' option
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.measurement.zzmq.zzb(java.lang.CharSequence, byte[], int, int):int");
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public static int zzc(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 (charAt2 >= 55296 && charAt2 <= 57343) {
|
|
if (Character.codePointAt(charSequence, i2) < 65536) {
|
|
throw new zzmp(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 String zzd(byte[] bArr, int i, int i2) throws zzkh {
|
|
int length = bArr.length;
|
|
if ((i | i2 | ((length - i) - i2)) >= 0) {
|
|
int i3 = i + i2;
|
|
char[] cArr = new char[i2];
|
|
int i4 = 0;
|
|
while (i < i3) {
|
|
byte b = bArr[i];
|
|
if (!zzmm.zzd(b)) {
|
|
break;
|
|
}
|
|
i++;
|
|
cArr[i4] = (char) b;
|
|
i4++;
|
|
}
|
|
int i5 = i4;
|
|
while (i < i3) {
|
|
int i6 = i + 1;
|
|
byte b2 = bArr[i];
|
|
if (zzmm.zzd(b2)) {
|
|
cArr[i5] = (char) b2;
|
|
i5++;
|
|
i = i6;
|
|
while (i < i3) {
|
|
byte b3 = bArr[i];
|
|
if (!zzmm.zzd(b3)) {
|
|
break;
|
|
}
|
|
i++;
|
|
cArr[i5] = (char) b3;
|
|
i5++;
|
|
}
|
|
} else if (b2 < -32) {
|
|
if (i6 < i3) {
|
|
i += 2;
|
|
zzmm.zzb(b2, bArr[i6], cArr, i5);
|
|
i5++;
|
|
} else {
|
|
throw zzkh.zzc();
|
|
}
|
|
} else if (b2 < -16) {
|
|
if (i6 < i3 - 1) {
|
|
zzmm.zzc(b2, bArr[i6], bArr[i + 2], cArr, i5);
|
|
i5++;
|
|
i += 3;
|
|
} else {
|
|
throw zzkh.zzc();
|
|
}
|
|
} else if (i6 < i3 - 2) {
|
|
zzmm.zza(b2, bArr[i6], bArr[i + 2], bArr[i + 3], cArr, i5);
|
|
i5 += 2;
|
|
i += 4;
|
|
} else {
|
|
throw zzkh.zzc();
|
|
}
|
|
}
|
|
return new String(cArr, 0, i5);
|
|
}
|
|
throw new ArrayIndexOutOfBoundsException(String.format("buffer length=%d, index=%d, size=%d", Integer.valueOf(length), Integer.valueOf(i), Integer.valueOf(i2)));
|
|
}
|
|
|
|
public static boolean zze(byte[] bArr) {
|
|
return zza.zzb(bArr, 0, bArr.length);
|
|
}
|
|
|
|
public static boolean zzf(byte[] bArr, int i, int i2) {
|
|
return zza.zzb(bArr, i, i2);
|
|
}
|
|
}
|