155 lines
5.0 KiB
Java
155 lines
5.0 KiB
Java
package g0.z;
|
|
|
|
import d0.g0.c;
|
|
import d0.z.d.m;
|
|
import g0.e;
|
|
import g0.o;
|
|
import g0.s;
|
|
/* compiled from: Buffer.kt */
|
|
/* loaded from: classes3.dex */
|
|
public final class a {
|
|
public static final byte[] a;
|
|
|
|
static {
|
|
m.checkParameterIsNotNull("0123456789abcdef", "$this$asUtf8ToByteArray");
|
|
byte[] bytes = "0123456789abcdef".getBytes(c.a);
|
|
m.checkExpressionValueIsNotNull(bytes, "(this as java.lang.String).getBytes(charset)");
|
|
a = bytes;
|
|
}
|
|
|
|
public static final String a(e eVar, long j) {
|
|
m.checkParameterIsNotNull(eVar, "$this$readUtf8Line");
|
|
if (j > 0) {
|
|
long j2 = j - 1;
|
|
if (eVar.q(j2) == ((byte) 13)) {
|
|
String H = eVar.H(j2);
|
|
eVar.skip(2L);
|
|
return H;
|
|
}
|
|
}
|
|
String H2 = eVar.H(j);
|
|
eVar.skip(1L);
|
|
return H2;
|
|
}
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:27:0x005f, code lost:
|
|
if (r19 == false) goto L_0x0062;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:28:0x0061, code lost:
|
|
return -2;
|
|
*/
|
|
/* JADX WARN: Code restructure failed: missing block: B:29:0x0062, code lost:
|
|
return r10;
|
|
*/
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
*/
|
|
public static final int b(e eVar, o oVar, boolean z2) {
|
|
int i;
|
|
int i2;
|
|
s sVar;
|
|
int i3;
|
|
m.checkParameterIsNotNull(eVar, "$this$selectPrefix");
|
|
m.checkParameterIsNotNull(oVar, "options");
|
|
s sVar2 = eVar.j;
|
|
if (sVar2 != null) {
|
|
byte[] bArr = sVar2.a;
|
|
int i4 = sVar2.f3675b;
|
|
int i5 = sVar2.c;
|
|
int[] iArr = oVar.m;
|
|
s sVar3 = sVar2;
|
|
int i6 = 0;
|
|
int i7 = -1;
|
|
loop0: while (true) {
|
|
int i8 = i6 + 1;
|
|
int i9 = iArr[i6];
|
|
int i10 = i8 + 1;
|
|
int i11 = iArr[i8];
|
|
if (i11 != -1) {
|
|
i7 = i11;
|
|
}
|
|
if (sVar3 == null) {
|
|
break;
|
|
}
|
|
if (i9 < 0) {
|
|
int i12 = (i9 * (-1)) + i10;
|
|
while (true) {
|
|
int i13 = i4 + 1;
|
|
int i14 = i10 + 1;
|
|
if ((bArr[i4] & 255) != iArr[i10]) {
|
|
return i7;
|
|
}
|
|
boolean z3 = i14 == i12;
|
|
if (i13 == i5) {
|
|
if (sVar3 == null) {
|
|
m.throwNpe();
|
|
}
|
|
s sVar4 = sVar3.f;
|
|
if (sVar4 == null) {
|
|
m.throwNpe();
|
|
}
|
|
i3 = sVar4.f3675b;
|
|
byte[] bArr2 = sVar4.a;
|
|
i2 = sVar4.c;
|
|
if (sVar4 != sVar2) {
|
|
sVar = sVar4;
|
|
bArr = bArr2;
|
|
} else if (!z3) {
|
|
break loop0;
|
|
} else {
|
|
bArr = bArr2;
|
|
sVar = null;
|
|
}
|
|
} else {
|
|
i2 = i5;
|
|
i3 = i13;
|
|
sVar = sVar3;
|
|
}
|
|
if (z3) {
|
|
i = iArr[i14];
|
|
i4 = i3;
|
|
i5 = i2;
|
|
sVar3 = sVar;
|
|
break;
|
|
}
|
|
i4 = i3;
|
|
i5 = i2;
|
|
i10 = i14;
|
|
sVar3 = sVar;
|
|
}
|
|
} else {
|
|
i4++;
|
|
int i15 = bArr[i4] & 255;
|
|
int i16 = i10 + i9;
|
|
while (i10 != i16) {
|
|
if (i15 == iArr[i10]) {
|
|
i = iArr[i10 + i9];
|
|
if (i4 == i5) {
|
|
sVar3 = sVar3.f;
|
|
if (sVar3 == null) {
|
|
m.throwNpe();
|
|
}
|
|
i4 = sVar3.f3675b;
|
|
bArr = sVar3.a;
|
|
i5 = sVar3.c;
|
|
if (sVar3 == sVar2) {
|
|
sVar3 = null;
|
|
}
|
|
}
|
|
} else {
|
|
i10++;
|
|
}
|
|
}
|
|
return i7;
|
|
}
|
|
if (i >= 0) {
|
|
return i;
|
|
}
|
|
i6 = -i;
|
|
}
|
|
} else {
|
|
return z2 ? -2 : -1;
|
|
}
|
|
}
|
|
}
|