330 lines
12 KiB
Java
330 lines
12 KiB
Java
package com.google.android.gms.internal.measurement;
|
|
|
|
import com.ubtrobot.jimu.robotapi.PeripheralType;
|
|
import java.nio.ByteBuffer;
|
|
|
|
/* loaded from: classes.dex */
|
|
final class zzxq extends zzxn {
|
|
zzxq() {
|
|
}
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:55:0x00b9, code lost:
|
|
|
|
return -1;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:69:0x0061, code lost:
|
|
|
|
return -1;
|
|
*/
|
|
@Override // com.google.android.gms.internal.measurement.zzxn
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct code enable 'Show inconsistent code' option in preferences
|
|
*/
|
|
final int a(int r16, byte[] r17, int r18, int r19) {
|
|
/*
|
|
Method dump skipped, instructions count: 220
|
|
To view this dump change 'Code comments level' option to 'DEBUG'
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.measurement.zzxq.a(int, byte[], int, int):int");
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.measurement.zzxn
|
|
final String b(byte[] bArr, int i, int i2) throws zzuv {
|
|
boolean a;
|
|
boolean a2;
|
|
boolean b;
|
|
boolean c;
|
|
boolean a3;
|
|
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 a4 = zzxj.a(bArr, i);
|
|
a3 = zzxm.a(a4);
|
|
if (!a3) {
|
|
break;
|
|
}
|
|
i++;
|
|
zzxm.a(a4, cArr, i4);
|
|
i4++;
|
|
}
|
|
int i5 = i4;
|
|
while (i < i3) {
|
|
int i6 = i + 1;
|
|
byte a5 = zzxj.a(bArr, i);
|
|
a = zzxm.a(a5);
|
|
if (a) {
|
|
int i7 = i5 + 1;
|
|
zzxm.a(a5, cArr, i5);
|
|
while (i6 < i3) {
|
|
byte a6 = zzxj.a(bArr, i6);
|
|
a2 = zzxm.a(a6);
|
|
if (!a2) {
|
|
break;
|
|
}
|
|
i6++;
|
|
zzxm.a(a6, cArr, i7);
|
|
i7++;
|
|
}
|
|
i = i6;
|
|
i5 = i7;
|
|
} else {
|
|
b = zzxm.b(a5);
|
|
if (!b) {
|
|
c = zzxm.c(a5);
|
|
if (c) {
|
|
if (i6 >= i3 - 1) {
|
|
throw zzuv.zzwx();
|
|
}
|
|
int i8 = i6 + 1;
|
|
zzxm.a(a5, zzxj.a(bArr, i6), zzxj.a(bArr, i8), cArr, i5);
|
|
i = i8 + 1;
|
|
i5++;
|
|
} else {
|
|
if (i6 >= i3 - 2) {
|
|
throw zzuv.zzwx();
|
|
}
|
|
int i9 = i6 + 1;
|
|
byte a7 = zzxj.a(bArr, i6);
|
|
int i10 = i9 + 1;
|
|
zzxm.a(a5, a7, zzxj.a(bArr, i9), zzxj.a(bArr, i10), cArr, i5);
|
|
i = i10 + 1;
|
|
i5 = i5 + 1 + 1;
|
|
}
|
|
} else {
|
|
if (i6 >= i3) {
|
|
throw zzuv.zzwx();
|
|
}
|
|
zzxm.a(a5, zzxj.a(bArr, i6), cArr, i5);
|
|
i = i6 + 1;
|
|
i5++;
|
|
}
|
|
}
|
|
}
|
|
return new String(cArr, 0, i5);
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.measurement.zzxn
|
|
final int a(CharSequence charSequence, byte[] bArr, int i, int i2) {
|
|
char c;
|
|
long j;
|
|
long j2;
|
|
long j3;
|
|
int i3;
|
|
char charAt;
|
|
long j4 = i;
|
|
long j5 = i2 + j4;
|
|
int length = charSequence.length();
|
|
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) {
|
|
c = 128;
|
|
j = 1;
|
|
if (i4 >= length || (charAt = charSequence.charAt(i4)) >= 128) {
|
|
break;
|
|
}
|
|
zzxj.a(bArr, j4, (byte) charAt);
|
|
i4++;
|
|
j4 = 1 + j4;
|
|
}
|
|
if (i4 == length) {
|
|
return (int) j4;
|
|
}
|
|
while (i4 < length) {
|
|
char charAt3 = charSequence.charAt(i4);
|
|
if (charAt3 >= c || j4 >= j5) {
|
|
if (charAt3 < 2048 && j4 <= j5 - 2) {
|
|
long j6 = j4 + j;
|
|
zzxj.a(bArr, j4, (byte) ((charAt3 >>> 6) | 960));
|
|
zzxj.a(bArr, j6, (byte) ((charAt3 & '?') | PeripheralType.SERVO));
|
|
j2 = j6 + j;
|
|
j3 = j;
|
|
} else {
|
|
if ((charAt3 >= 55296 && 57343 >= charAt3) || j4 > j5 - 3) {
|
|
if (j4 <= j5 - 4) {
|
|
int i5 = i4 + 1;
|
|
if (i5 != length) {
|
|
char charAt4 = charSequence.charAt(i5);
|
|
if (Character.isSurrogatePair(charAt3, charAt4)) {
|
|
int codePoint = Character.toCodePoint(charAt3, charAt4);
|
|
long j7 = j4 + 1;
|
|
zzxj.a(bArr, j4, (byte) ((codePoint >>> 18) | 240));
|
|
long j8 = j7 + 1;
|
|
zzxj.a(bArr, j7, (byte) (((codePoint >>> 12) & 63) | PeripheralType.SERVO));
|
|
long j9 = j8 + 1;
|
|
zzxj.a(bArr, j8, (byte) (((codePoint >>> 6) & 63) | PeripheralType.SERVO));
|
|
j3 = 1;
|
|
j2 = j9 + 1;
|
|
zzxj.a(bArr, j9, (byte) ((codePoint & 63) | PeripheralType.SERVO));
|
|
i4 = i5;
|
|
} else {
|
|
i4 = i5;
|
|
}
|
|
}
|
|
throw new zzxp(i4 - 1, length);
|
|
}
|
|
if (55296 <= charAt3 && charAt3 <= 57343 && ((i3 = i4 + 1) == length || !Character.isSurrogatePair(charAt3, charSequence.charAt(i3)))) {
|
|
throw new zzxp(i4, length);
|
|
}
|
|
StringBuilder sb2 = new StringBuilder(46);
|
|
sb2.append("Failed writing ");
|
|
sb2.append(charAt3);
|
|
sb2.append(" at index ");
|
|
sb2.append(j4);
|
|
throw new ArrayIndexOutOfBoundsException(sb2.toString());
|
|
}
|
|
long j10 = j4 + j;
|
|
zzxj.a(bArr, j4, (byte) ((charAt3 >>> '\f') | 480));
|
|
long j11 = j10 + j;
|
|
zzxj.a(bArr, j10, (byte) (((charAt3 >>> 6) & 63) | PeripheralType.SERVO));
|
|
zzxj.a(bArr, j11, (byte) ((charAt3 & '?') | PeripheralType.SERVO));
|
|
j2 = j11 + 1;
|
|
j3 = 1;
|
|
}
|
|
i4++;
|
|
c = 128;
|
|
long j12 = j3;
|
|
j4 = j2;
|
|
j = j12;
|
|
} else {
|
|
long j13 = j4 + j;
|
|
zzxj.a(bArr, j4, (byte) charAt3);
|
|
j3 = j;
|
|
j2 = j13;
|
|
}
|
|
i4++;
|
|
c = 128;
|
|
long j122 = j3;
|
|
j4 = j2;
|
|
j = j122;
|
|
}
|
|
return (int) j4;
|
|
}
|
|
|
|
@Override // com.google.android.gms.internal.measurement.zzxn
|
|
final void a(CharSequence charSequence, ByteBuffer byteBuffer) {
|
|
char c;
|
|
long j;
|
|
int i;
|
|
char charAt;
|
|
long a = zzxj.a(byteBuffer);
|
|
long position = byteBuffer.position() + a;
|
|
long limit = byteBuffer.limit() + a;
|
|
int length = charSequence.length();
|
|
if (length > limit - position) {
|
|
char charAt2 = charSequence.charAt(length - 1);
|
|
int limit2 = byteBuffer.limit();
|
|
StringBuilder sb = new StringBuilder(37);
|
|
sb.append("Failed writing ");
|
|
sb.append(charAt2);
|
|
sb.append(" at index ");
|
|
sb.append(limit2);
|
|
throw new ArrayIndexOutOfBoundsException(sb.toString());
|
|
}
|
|
int i2 = 0;
|
|
while (true) {
|
|
c = 128;
|
|
if (i2 >= length || (charAt = charSequence.charAt(i2)) >= 128) {
|
|
break;
|
|
}
|
|
zzxj.a(position, (byte) charAt);
|
|
i2++;
|
|
position++;
|
|
}
|
|
if (i2 == length) {
|
|
byteBuffer.position((int) (position - a));
|
|
return;
|
|
}
|
|
while (i2 < length) {
|
|
char charAt3 = charSequence.charAt(i2);
|
|
if (charAt3 < c && position < limit) {
|
|
zzxj.a(position, (byte) charAt3);
|
|
position++;
|
|
j = a;
|
|
} else if (charAt3 >= 2048 || position > limit - 2) {
|
|
j = a;
|
|
if ((charAt3 >= 55296 && 57343 >= charAt3) || position > limit - 3) {
|
|
if (position <= limit - 4) {
|
|
int i3 = i2 + 1;
|
|
if (i3 != length) {
|
|
char charAt4 = charSequence.charAt(i3);
|
|
if (Character.isSurrogatePair(charAt3, charAt4)) {
|
|
int codePoint = Character.toCodePoint(charAt3, charAt4);
|
|
long j2 = position + 1;
|
|
zzxj.a(position, (byte) ((codePoint >>> 18) | 240));
|
|
long j3 = j2 + 1;
|
|
zzxj.a(j2, (byte) (((codePoint >>> 12) & 63) | PeripheralType.SERVO));
|
|
long j4 = j3 + 1;
|
|
zzxj.a(j3, (byte) (((codePoint >>> 6) & 63) | PeripheralType.SERVO));
|
|
long j5 = j4 + 1;
|
|
zzxj.a(j4, (byte) ((codePoint & 63) | PeripheralType.SERVO));
|
|
i2 = i3;
|
|
position = j5;
|
|
}
|
|
} else {
|
|
i3 = i2;
|
|
}
|
|
throw new zzxp(i3 - 1, length);
|
|
}
|
|
if (55296 <= charAt3 && charAt3 <= 57343 && ((i = i2 + 1) == length || !Character.isSurrogatePair(charAt3, charSequence.charAt(i)))) {
|
|
throw new zzxp(i2, length);
|
|
}
|
|
StringBuilder sb2 = new StringBuilder(46);
|
|
sb2.append("Failed writing ");
|
|
sb2.append(charAt3);
|
|
sb2.append(" at index ");
|
|
sb2.append(position);
|
|
throw new ArrayIndexOutOfBoundsException(sb2.toString());
|
|
}
|
|
long j6 = position + 1;
|
|
zzxj.a(position, (byte) ((charAt3 >>> '\f') | 480));
|
|
long j7 = j6 + 1;
|
|
zzxj.a(j6, (byte) (((charAt3 >>> 6) & 63) | PeripheralType.SERVO));
|
|
zzxj.a(j7, (byte) ((charAt3 & '?') | PeripheralType.SERVO));
|
|
position = j7 + 1;
|
|
} else {
|
|
j = a;
|
|
long j8 = position + 1;
|
|
zzxj.a(position, (byte) ((charAt3 >>> 6) | 960));
|
|
zzxj.a(j8, (byte) ((charAt3 & '?') | PeripheralType.SERVO));
|
|
position = j8 + 1;
|
|
}
|
|
i2++;
|
|
a = j;
|
|
c = 128;
|
|
}
|
|
byteBuffer.position((int) (position - a));
|
|
}
|
|
|
|
private static int a(byte[] bArr, int i, long j, int i2) {
|
|
int a;
|
|
int a2;
|
|
int a3;
|
|
if (i2 == 0) {
|
|
a = zzxl.a(i);
|
|
return a;
|
|
}
|
|
if (i2 == 1) {
|
|
a2 = zzxl.a(i, zzxj.a(bArr, j));
|
|
return a2;
|
|
}
|
|
if (i2 == 2) {
|
|
a3 = zzxl.a(i, zzxj.a(bArr, j), zzxj.a(bArr, j + 1));
|
|
return a3;
|
|
}
|
|
throw new AssertionError();
|
|
}
|
|
}
|