Initial import of ADIF API reverse-engineering toolkit

This commit is contained in:
2025-12-16 08:37:56 +01:00
commit 60388529c1
11486 changed files with 1086536 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
package l3;
import kotlin.KotlinVersion;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes3.dex */
public abstract class A {
/* renamed from: a, reason: collision with root package name */
public static final int[] f7366a = {8184, 8388568, 268435426, 268435427, 268435428, 268435429, 268435430, 268435431, 268435432, 16777194, 1073741820, 268435433, 268435434, 1073741821, 268435435, 268435436, 268435437, 268435438, 268435439, 268435440, 268435441, 268435442, 1073741822, 268435443, 268435444, 268435445, 268435446, 268435447, 268435448, 268435449, 268435450, 268435451, 20, 1016, 1017, 4090, 8185, 21, 248, 2042, 1018, 1019, 249, 2043, 250, 22, 23, 24, 0, 1, 2, 25, 26, 27, 28, 29, 30, 31, 92, 251, 32764, 32, 4091, 1020, 8186, 33, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 252, 115, 253, 8187, 524272, 8188, 16380, 34, 32765, 3, 35, 4, 36, 5, 37, 38, 39, 6, 116, 117, 40, 41, 42, 7, 43, 118, 44, 8, 9, 45, 119, 120, 121, 122, 123, 32766, 2044, 16381, 8189, 268435452, 1048550, 4194258, 1048551, 1048552, 4194259, 4194260, 4194261, 8388569, 4194262, 8388570, 8388571, 8388572, 8388573, 8388574, 16777195, 8388575, 16777196, 16777197, 4194263, 8388576, 16777198, 8388577, 8388578, 8388579, 8388580, 2097116, 4194264, 8388581, 4194265, 8388582, 8388583, 16777199, 4194266, 2097117, 1048553, 4194267, 4194268, 8388584, 8388585, 2097118, 8388586, 4194269, 4194270, 16777200, 2097119, 4194271, 8388587, 8388588, 2097120, 2097121, 4194272, 2097122, 8388589, 4194273, 8388590, 8388591, 1048554, 4194274, 4194275, 4194276, 8388592, 4194277, 4194278, 8388593, 67108832, 67108833, 1048555, 524273, 4194279, 8388594, 4194280, 33554412, 67108834, 67108835, 67108836, 134217694, 134217695, 67108837, 16777201, 33554413, 524274, 2097123, 67108838, 134217696, 134217697, 67108839, 134217698, 16777202, 2097124, 2097125, 67108840, 67108841, 268435453, 134217699, 134217700, 134217701, 1048556, 16777203, 1048557, 2097126, 4194281, 2097127, 2097128, 8388595, 4194282, 4194283, 33554414, 33554415, 16777204, 16777205, 67108842, 8388596, 67108843, 134217702, 67108844, 67108845, 134217703, 134217704, 134217705, 134217706, 134217707, 268435454, 134217708, 134217709, 134217710, 134217711, 134217712, 67108846};
/* renamed from: b, reason: collision with root package name */
public static final byte[] f7367b = {13, 23, 28, 28, 28, 28, 28, 28, 28, 24, 30, 28, 28, 30, 28, 28, 28, 28, 28, 28, 28, 28, 30, 28, 28, 28, 28, 28, 28, 28, 28, 28, 6, 10, 10, 12, 13, 6, 8, 11, 10, 10, 8, 11, 8, 6, 6, 6, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 8, 15, 6, 12, 10, 13, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 7, 8, 13, 19, 13, 14, 6, 15, 5, 6, 5, 6, 5, 6, 6, 6, 5, 7, 7, 6, 6, 6, 5, 6, 7, 6, 5, 5, 6, 7, 7, 7, 7, 7, 15, 11, 14, 13, 28, 20, 22, 20, 20, 22, 22, 22, 23, 22, 23, 23, 23, 23, 23, 24, 23, 24, 24, 22, 23, 24, 23, 23, 23, 23, 21, 22, 23, 22, 23, 23, 24, 22, 21, 20, 22, 22, 23, 23, 21, 23, 22, 22, 24, 21, 22, 23, 23, 21, 21, 22, 21, 23, 22, 23, 23, 20, 22, 22, 22, 23, 22, 22, 23, 26, 26, 20, 19, 22, 23, 22, 25, 26, 26, 26, 27, 27, 26, 24, 25, 19, 21, 26, 27, 27, 26, 27, 24, 21, 21, 26, 26, 28, 27, 27, 27, 20, 24, 20, 21, 22, 21, 21, 23, 22, 22, 25, 25, 24, 24, 26, 23, 26, 27, 26, 26, 27, 27, 27, 27, 27, 28, 27, 27, 27, 27, 27, 26};
/* renamed from: c, reason: collision with root package name */
public static final com.google.android.material.datepicker.l f7368c = new com.google.android.material.datepicker.l();
static {
com.google.android.material.datepicker.l[] lVarArr;
for (int i = 0; i < 256; i++) {
int i4 = f7366a[i];
int i5 = f7367b[i];
com.google.android.material.datepicker.l lVar = new com.google.android.material.datepicker.l(i, i5);
com.google.android.material.datepicker.l lVar2 = f7368c;
while (true) {
lVarArr = (com.google.android.material.datepicker.l[]) lVar2.f5667a;
if (i5 > 8) {
i5 -= 8;
int i6 = (i4 >>> i5) & KotlinVersion.MAX_COMPONENT_VALUE;
Intrinsics.checkNotNull(lVarArr);
com.google.android.material.datepicker.l lVar3 = lVarArr[i6];
if (lVar3 == null) {
lVar3 = new com.google.android.material.datepicker.l();
lVarArr[i6] = lVar3;
}
lVar2 = lVar3;
}
}
int i7 = 8 - i5;
int i8 = (i4 << i7) & KotlinVersion.MAX_COMPONENT_VALUE;
Intrinsics.checkNotNull(lVarArr);
ArraysKt___ArraysJvmKt.fill((com.google.android.material.datepicker.l[]) lVarArr, lVar, i8, (1 << i7) + i8);
}
}
}

View File

@@ -0,0 +1,8 @@
package l3;
/* loaded from: classes3.dex */
public final class B {
/* renamed from: a, reason: collision with root package name */
public static final B f7369a = new Object();
}

View File

@@ -0,0 +1,40 @@
package l3;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes3.dex */
public final class C {
/* renamed from: a, reason: collision with root package name */
public int f7370a;
/* renamed from: b, reason: collision with root package name */
public final int[] f7371b = new int[10];
public final int a() {
if ((this.f7370a & 128) != 0) {
return this.f7371b[7];
}
return 65535;
}
public final void b(C other) {
Intrinsics.checkNotNullParameter(other, "other");
for (int i = 0; i < 10; i++) {
if (((1 << i) & other.f7370a) != 0) {
c(i, other.f7371b[i]);
}
}
}
public final void c(int i, int i4) {
if (i >= 0) {
int[] iArr = this.f7371b;
if (i >= iArr.length) {
return;
}
this.f7370a = (1 << i) | this.f7370a;
iArr[i] = i4;
}
}
}

View File

@@ -0,0 +1,8 @@
package l3;
import java.io.IOException;
/* renamed from: l3.a, reason: case insensitive filesystem */
/* loaded from: classes3.dex */
public final class C0438a extends IOException {
}

View File

@@ -0,0 +1,86 @@
package l3;
import f0.C0338b;
import kotlin.jvm.internal.Intrinsics;
import r3.C0579k;
/* renamed from: l3.c, reason: case insensitive filesystem */
/* loaded from: classes3.dex */
public final class C0440c {
/* renamed from: d, reason: collision with root package name */
public static final C0579k f7380d;
/* renamed from: e, reason: collision with root package name */
public static final C0579k f7381e;
/* renamed from: f, reason: collision with root package name */
public static final C0579k f7382f;
/* renamed from: g, reason: collision with root package name */
public static final C0579k f7383g;
public static final C0579k h;
public static final C0579k i;
/* renamed from: a, reason: collision with root package name */
public final C0579k f7384a;
/* renamed from: b, reason: collision with root package name */
public final C0579k f7385b;
/* renamed from: c, reason: collision with root package name */
public final int f7386c;
static {
C0579k c0579k = C0579k.f8285d;
f7380d = C0338b.n(":");
f7381e = C0338b.n(":status");
f7382f = C0338b.n(":method");
f7383g = C0338b.n(":path");
h = C0338b.n(":scheme");
i = C0338b.n(":authority");
}
public C0440c(C0579k name, C0579k value) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(value, "value");
this.f7384a = name;
this.f7385b = value;
this.f7386c = value.d() + name.d() + 32;
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof C0440c)) {
return false;
}
C0440c c0440c = (C0440c) obj;
return Intrinsics.areEqual(this.f7384a, c0440c.f7384a) && Intrinsics.areEqual(this.f7385b, c0440c.f7385b);
}
public final int hashCode() {
return this.f7385b.hashCode() + (this.f7384a.hashCode() * 31);
}
public final String toString() {
return this.f7384a.q() + ": " + this.f7385b.q();
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public C0440c(String name, String value) {
this(C0338b.n(name), C0338b.n(value));
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(value, "value");
C0579k c0579k = C0579k.f8285d;
}
/* JADX WARN: 'this' call moved to the top of the method (can break code semantics) */
public C0440c(C0579k name, String value) {
this(name, C0338b.n(value));
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(value, "value");
C0579k c0579k = C0579k.f8285d;
}
}

View File

@@ -0,0 +1,194 @@
package l3;
import a.AbstractC0105a;
import java.io.IOException;
import java.util.ArrayList;
import kotlin.KotlinVersion;
import kotlin.UByte;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.io.ConstantsKt;
import kotlin.jvm.internal.ByteCompanionObject;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.scheduling.WorkQueueKt;
import r3.C0579k;
/* renamed from: l3.d, reason: case insensitive filesystem */
/* loaded from: classes3.dex */
public final class C0441d {
/* renamed from: a, reason: collision with root package name */
public int f7387a;
/* renamed from: b, reason: collision with root package name */
public final ArrayList f7388b;
/* renamed from: c, reason: collision with root package name */
public final r3.C f7389c;
/* renamed from: d, reason: collision with root package name */
public C0440c[] f7390d;
/* renamed from: e, reason: collision with root package name */
public int f7391e;
/* renamed from: f, reason: collision with root package name */
public int f7392f;
/* renamed from: g, reason: collision with root package name */
public int f7393g;
public C0441d(t source) {
Intrinsics.checkNotNullParameter(source, "source");
this.f7387a = ConstantsKt.DEFAULT_BLOCK_SIZE;
this.f7388b = new ArrayList();
this.f7389c = AbstractC0105a.d(source);
this.f7390d = new C0440c[8];
this.f7391e = 7;
}
public final int a(int i) {
int i4;
int i5 = 0;
if (i > 0) {
int length = this.f7390d.length;
while (true) {
length--;
i4 = this.f7391e;
if (length < i4 || i <= 0) {
break;
}
C0440c c0440c = this.f7390d[length];
Intrinsics.checkNotNull(c0440c);
int i6 = c0440c.f7386c;
i -= i6;
this.f7393g -= i6;
this.f7392f--;
i5++;
}
C0440c[] c0440cArr = this.f7390d;
System.arraycopy(c0440cArr, i4 + 1, c0440cArr, i4 + 1 + i5, this.f7392f);
this.f7391e += i5;
}
return i5;
}
public final C0579k b(int i) {
if (i >= 0) {
C0440c[] c0440cArr = f.f7401a;
if (i <= c0440cArr.length - 1) {
return c0440cArr[i].f7384a;
}
}
int length = this.f7391e + 1 + (i - f.f7401a.length);
if (length >= 0) {
C0440c[] c0440cArr2 = this.f7390d;
if (length < c0440cArr2.length) {
C0440c c0440c = c0440cArr2[length];
Intrinsics.checkNotNull(c0440c);
return c0440c.f7384a;
}
}
throw new IOException("Header index too large " + (i + 1));
}
public final void c(C0440c c0440c) {
this.f7388b.add(c0440c);
int i = this.f7387a;
int i4 = c0440c.f7386c;
if (i4 > i) {
ArraysKt___ArraysJvmKt.fill$default(this.f7390d, (Object) null, 0, 0, 6, (Object) null);
this.f7391e = this.f7390d.length - 1;
this.f7392f = 0;
this.f7393g = 0;
return;
}
a((this.f7393g + i4) - i);
int i5 = this.f7392f + 1;
C0440c[] c0440cArr = this.f7390d;
if (i5 > c0440cArr.length) {
C0440c[] c0440cArr2 = new C0440c[c0440cArr.length * 2];
System.arraycopy(c0440cArr, 0, c0440cArr2, c0440cArr.length, c0440cArr.length);
this.f7391e = this.f7390d.length - 1;
this.f7390d = c0440cArr2;
}
int i6 = this.f7391e;
this.f7391e = i6 - 1;
this.f7390d[i6] = c0440c;
this.f7392f++;
this.f7393g += i4;
}
/* JADX WARN: Type inference failed for: r12v3, types: [java.lang.Object, r3.h] */
public final C0579k d() {
int i;
r3.C source = this.f7389c;
byte readByte = source.readByte();
byte[] bArr = f3.c.f6469a;
int i4 = readByte & UByte.MAX_VALUE;
int i5 = 0;
boolean z3 = (readByte & ByteCompanionObject.MIN_VALUE) == 128;
long e4 = e(i4, WorkQueueKt.MASK);
if (!z3) {
return source.h(e4);
}
?? sink = new Object();
int[] iArr = A.f7366a;
Intrinsics.checkNotNullParameter(source, "source");
Intrinsics.checkNotNullParameter(sink, "sink");
com.google.android.material.datepicker.l lVar = A.f7368c;
com.google.android.material.datepicker.l lVar2 = lVar;
int i6 = 0;
for (long j4 = 0; j4 < e4; j4++) {
byte readByte2 = source.readByte();
byte[] bArr2 = f3.c.f6469a;
i5 = (i5 << 8) | (readByte2 & UByte.MAX_VALUE);
i6 += 8;
while (i6 >= 8) {
int i7 = (i5 >>> (i6 - 8)) & KotlinVersion.MAX_COMPONENT_VALUE;
com.google.android.material.datepicker.l[] lVarArr = (com.google.android.material.datepicker.l[]) lVar2.f5667a;
Intrinsics.checkNotNull(lVarArr);
lVar2 = lVarArr[i7];
Intrinsics.checkNotNull(lVar2);
if (((com.google.android.material.datepicker.l[]) lVar2.f5667a) == null) {
sink.j0(lVar2.f5668b);
i6 -= lVar2.f5669c;
lVar2 = lVar;
} else {
i6 -= 8;
}
}
}
while (i6 > 0) {
int i8 = (i5 << (8 - i6)) & KotlinVersion.MAX_COMPONENT_VALUE;
com.google.android.material.datepicker.l[] lVarArr2 = (com.google.android.material.datepicker.l[]) lVar2.f5667a;
Intrinsics.checkNotNull(lVarArr2);
com.google.android.material.datepicker.l lVar3 = lVarArr2[i8];
Intrinsics.checkNotNull(lVar3);
if (((com.google.android.material.datepicker.l[]) lVar3.f5667a) != null || (i = lVar3.f5669c) > i6) {
break;
}
sink.j0(lVar3.f5668b);
i6 -= i;
lVar2 = lVar;
}
return sink.h(sink.f8284b);
}
public final int e(int i, int i4) {
int i5 = i & i4;
if (i5 < i4) {
return i5;
}
int i6 = 0;
while (true) {
byte readByte = this.f7389c.readByte();
byte[] bArr = f3.c.f6469a;
int i7 = readByte & UByte.MAX_VALUE;
if ((readByte & ByteCompanionObject.MIN_VALUE) == 0) {
return i4 + (i7 << i6);
}
i4 += (readByte & ByteCompanionObject.MAX_VALUE) << i6;
i6 += 7;
}
}
}

View File

@@ -0,0 +1,18 @@
package l3;
import java.io.IOException;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes3.dex */
public final class D extends IOException {
/* renamed from: a, reason: collision with root package name */
public final EnumC0439b f7372a;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public D(EnumC0439b errorCode) {
super("stream was reset: " + errorCode);
Intrinsics.checkNotNullParameter(errorCode, "errorCode");
this.f7372a = errorCode;
}
}

View File

@@ -0,0 +1,36 @@
package l3;
/* renamed from: l3.b, reason: case insensitive filesystem */
/* loaded from: classes3.dex */
public enum EnumC0439b {
NO_ERROR(0),
PROTOCOL_ERROR(1),
INTERNAL_ERROR(2),
FLOW_CONTROL_ERROR(3),
/* JADX INFO: Fake field, exist only in values array */
SETTINGS_TIMEOUT(4),
/* JADX INFO: Fake field, exist only in values array */
STREAM_CLOSED(5),
/* JADX INFO: Fake field, exist only in values array */
FRAME_SIZE_ERROR(6),
REFUSED_STREAM(7),
CANCEL(8),
/* JADX INFO: Fake field, exist only in values array */
COMPRESSION_ERROR(9),
/* JADX INFO: Fake field, exist only in values array */
CONNECT_ERROR(10),
/* JADX INFO: Fake field, exist only in values array */
ENHANCE_YOUR_CALM(11),
/* JADX INFO: Fake field, exist only in values array */
INADEQUATE_SECURITY(12),
/* JADX INFO: Fake field, exist only in values array */
HTTP_1_1_REQUIRED(13);
/* renamed from: a, reason: collision with root package name */
public final int f7379a;
EnumC0439b(int i) {
this.f7379a = i;
}
}

View File

@@ -0,0 +1,246 @@
package l3;
import java.util.ArrayList;
import java.util.Arrays;
import kotlin.UByte;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.io.ConstantsKt;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.scheduling.WorkQueueKt;
import r3.C0576h;
import r3.C0579k;
/* loaded from: classes3.dex */
public final class e {
/* renamed from: a, reason: collision with root package name */
public final C0576h f7394a;
/* renamed from: b, reason: collision with root package name */
public int f7395b;
/* renamed from: c, reason: collision with root package name */
public boolean f7396c;
/* renamed from: d, reason: collision with root package name */
public int f7397d;
/* renamed from: e, reason: collision with root package name */
public C0440c[] f7398e;
/* renamed from: f, reason: collision with root package name */
public int f7399f;
/* renamed from: g, reason: collision with root package name */
public int f7400g;
public int h;
public e(C0576h out) {
Intrinsics.checkNotNullParameter(out, "out");
this.f7394a = out;
this.f7395b = Integer.MAX_VALUE;
this.f7397d = ConstantsKt.DEFAULT_BLOCK_SIZE;
this.f7398e = new C0440c[8];
this.f7399f = 7;
}
public final void a(int i) {
int i4;
if (i > 0) {
int length = this.f7398e.length - 1;
int i5 = 0;
while (true) {
i4 = this.f7399f;
if (length < i4 || i <= 0) {
break;
}
C0440c c0440c = this.f7398e[length];
Intrinsics.checkNotNull(c0440c);
i -= c0440c.f7386c;
int i6 = this.h;
C0440c c0440c2 = this.f7398e[length];
Intrinsics.checkNotNull(c0440c2);
this.h = i6 - c0440c2.f7386c;
this.f7400g--;
i5++;
length--;
}
C0440c[] c0440cArr = this.f7398e;
int i7 = i4 + 1;
System.arraycopy(c0440cArr, i7, c0440cArr, i7 + i5, this.f7400g);
C0440c[] c0440cArr2 = this.f7398e;
int i8 = this.f7399f + 1;
Arrays.fill(c0440cArr2, i8, i8 + i5, (Object) null);
this.f7399f += i5;
}
}
public final void b(C0440c c0440c) {
int i = this.f7397d;
int i4 = c0440c.f7386c;
if (i4 > i) {
ArraysKt___ArraysJvmKt.fill$default(this.f7398e, (Object) null, 0, 0, 6, (Object) null);
this.f7399f = this.f7398e.length - 1;
this.f7400g = 0;
this.h = 0;
return;
}
a((this.h + i4) - i);
int i5 = this.f7400g + 1;
C0440c[] c0440cArr = this.f7398e;
if (i5 > c0440cArr.length) {
C0440c[] c0440cArr2 = new C0440c[c0440cArr.length * 2];
System.arraycopy(c0440cArr, 0, c0440cArr2, c0440cArr.length, c0440cArr.length);
this.f7399f = this.f7398e.length - 1;
this.f7398e = c0440cArr2;
}
int i6 = this.f7399f;
this.f7399f = i6 - 1;
this.f7398e[i6] = c0440c;
this.f7400g++;
this.h += i4;
}
/* JADX WARN: Type inference failed for: r2v6, types: [java.lang.Object, r3.h] */
public final void c(C0579k source) {
Intrinsics.checkNotNullParameter(source, "data");
C0576h c0576h = this.f7394a;
int[] iArr = A.f7366a;
Intrinsics.checkNotNullParameter(source, "bytes");
int d4 = source.d();
long j4 = 0;
for (int i = 0; i < d4; i++) {
byte i4 = source.i(i);
byte[] bArr = f3.c.f6469a;
j4 += A.f7367b[i4 & UByte.MAX_VALUE];
}
if (((int) ((j4 + 7) >> 3)) >= source.d()) {
e(source.d(), WorkQueueKt.MASK, 0);
c0576h.h0(source);
return;
}
?? sink = new Object();
int[] iArr2 = A.f7366a;
Intrinsics.checkNotNullParameter(source, "source");
Intrinsics.checkNotNullParameter(sink, "sink");
int d5 = source.d();
long j5 = 0;
int i5 = 0;
for (int i6 = 0; i6 < d5; i6++) {
byte i7 = source.i(i6);
byte[] bArr2 = f3.c.f6469a;
int i8 = i7 & UByte.MAX_VALUE;
int i9 = A.f7366a[i8];
byte b4 = A.f7367b[i8];
j5 = (j5 << b4) | i9;
i5 += b4;
while (i5 >= 8) {
i5 -= 8;
sink.j0((int) (j5 >> i5));
}
}
if (i5 > 0) {
sink.j0((int) ((255 >>> i5) | (j5 << (8 - i5))));
}
C0579k h = sink.h(sink.f8284b);
e(h.d(), WorkQueueKt.MASK, 128);
c0576h.h0(h);
}
public final void d(ArrayList headerBlock) {
int i;
int i4;
Intrinsics.checkNotNullParameter(headerBlock, "headerBlock");
if (this.f7396c) {
int i5 = this.f7395b;
if (i5 < this.f7397d) {
e(i5, 31, 32);
}
this.f7396c = false;
this.f7395b = Integer.MAX_VALUE;
e(this.f7397d, 31, 32);
}
int size = headerBlock.size();
for (int i6 = 0; i6 < size; i6++) {
C0440c c0440c = (C0440c) headerBlock.get(i6);
C0579k p = c0440c.f7384a.p();
Integer num = (Integer) f.f7402b.get(p);
C0579k c0579k = c0440c.f7385b;
if (num != null) {
int intValue = num.intValue();
i4 = intValue + 1;
if (2 <= i4 && i4 < 8) {
C0440c[] c0440cArr = f.f7401a;
if (Intrinsics.areEqual(c0440cArr[intValue].f7385b, c0579k)) {
i = i4;
} else if (Intrinsics.areEqual(c0440cArr[i4].f7385b, c0579k)) {
i4 = intValue + 2;
i = i4;
}
}
i = i4;
i4 = -1;
} else {
i = -1;
i4 = -1;
}
if (i4 == -1) {
int i7 = this.f7399f + 1;
int length = this.f7398e.length;
while (true) {
if (i7 >= length) {
break;
}
C0440c c0440c2 = this.f7398e[i7];
Intrinsics.checkNotNull(c0440c2);
if (Intrinsics.areEqual(c0440c2.f7384a, p)) {
C0440c c0440c3 = this.f7398e[i7];
Intrinsics.checkNotNull(c0440c3);
if (Intrinsics.areEqual(c0440c3.f7385b, c0579k)) {
i4 = f.f7401a.length + (i7 - this.f7399f);
break;
} else if (i == -1) {
i = (i7 - this.f7399f) + f.f7401a.length;
}
}
i7++;
}
}
if (i4 != -1) {
e(i4, WorkQueueKt.MASK, 128);
} else if (i == -1) {
this.f7394a.j0(64);
c(p);
c(c0579k);
b(c0440c);
} else {
C0579k prefix = C0440c.f7380d;
p.getClass();
Intrinsics.checkNotNullParameter(prefix, "prefix");
if (!p.l(0, prefix, prefix.d()) || Intrinsics.areEqual(C0440c.i, p)) {
e(i, 63, 64);
c(c0579k);
b(c0440c);
} else {
e(i, 15, 0);
c(c0579k);
}
}
}
}
public final void e(int i, int i4, int i5) {
C0576h c0576h = this.f7394a;
if (i < i4) {
c0576h.j0(i | i5);
return;
}
c0576h.j0(i5 | i4);
int i6 = i - i4;
while (i6 >= 128) {
c0576h.j0(128 | (i6 & WorkQueueKt.MASK));
i6 >>>= 7;
}
c0576h.j0(i6);
}
}

View File

@@ -0,0 +1,58 @@
package l3;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.google.firebase.dynamiclinks.DynamicLink;
import com.google.firebase.messaging.Constants;
import com.google.firebase.sessions.settings.RemoteSettings;
import java.io.IOException;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import kotlin.jvm.internal.Intrinsics;
import r3.C0579k;
/* loaded from: classes3.dex */
public abstract class f {
/* renamed from: a, reason: collision with root package name */
public static final C0440c[] f7401a;
/* renamed from: b, reason: collision with root package name */
public static final Map f7402b;
static {
C0440c c0440c = new C0440c(C0440c.i, "");
C0579k c0579k = C0440c.f7382f;
C0440c c0440c2 = new C0440c(c0579k, "GET");
C0440c c0440c3 = new C0440c(c0579k, "POST");
C0579k c0579k2 = C0440c.f7383g;
C0440c c0440c4 = new C0440c(c0579k2, RemoteSettings.FORWARD_SLASH_STRING);
C0440c c0440c5 = new C0440c(c0579k2, "/index.html");
C0579k c0579k3 = C0440c.h;
C0440c c0440c6 = new C0440c(c0579k3, "http");
C0440c c0440c7 = new C0440c(c0579k3, "https");
C0579k c0579k4 = C0440c.f7381e;
C0440c[] c0440cArr = {c0440c, c0440c2, c0440c3, c0440c4, c0440c5, c0440c6, c0440c7, new C0440c(c0579k4, "200"), new C0440c(c0579k4, "204"), new C0440c(c0579k4, "206"), new C0440c(c0579k4, "304"), new C0440c(c0579k4, "400"), new C0440c(c0579k4, "404"), new C0440c(c0579k4, "500"), new C0440c("accept-charset", ""), new C0440c("accept-encoding", "gzip, deflate"), new C0440c("accept-language", ""), new C0440c("accept-ranges", ""), new C0440c("accept", ""), new C0440c("access-control-allow-origin", ""), new C0440c("age", ""), new C0440c("allow", ""), new C0440c("authorization", ""), new C0440c("cache-control", ""), new C0440c("content-disposition", ""), new C0440c("content-encoding", ""), new C0440c("content-language", ""), new C0440c("content-length", ""), new C0440c("content-location", ""), new C0440c("content-range", ""), new C0440c("content-type", ""), new C0440c("cookie", ""), new C0440c("date", ""), new C0440c("etag", ""), new C0440c("expect", ""), new C0440c("expires", ""), new C0440c(Constants.MessagePayloadKeys.FROM, ""), new C0440c("host", ""), new C0440c("if-match", ""), new C0440c("if-modified-since", ""), new C0440c("if-none-match", ""), new C0440c("if-range", ""), new C0440c("if-unmodified-since", ""), new C0440c("last-modified", ""), new C0440c(DynamicLink.Builder.KEY_LINK, ""), new C0440c(FirebaseAnalytics.Param.LOCATION, ""), new C0440c("max-forwards", ""), new C0440c("proxy-authenticate", ""), new C0440c("proxy-authorization", ""), new C0440c("range", ""), new C0440c("referer", ""), new C0440c("refresh", ""), new C0440c("retry-after", ""), new C0440c("server", ""), new C0440c("set-cookie", ""), new C0440c("strict-transport-security", ""), new C0440c("transfer-encoding", ""), new C0440c("user-agent", ""), new C0440c("vary", ""), new C0440c("via", ""), new C0440c("www-authenticate", "")};
f7401a = c0440cArr;
LinkedHashMap linkedHashMap = new LinkedHashMap(61);
for (int i = 0; i < 61; i++) {
if (!linkedHashMap.containsKey(c0440cArr[i].f7384a)) {
linkedHashMap.put(c0440cArr[i].f7384a, Integer.valueOf(i));
}
}
Map unmodifiableMap = Collections.unmodifiableMap(linkedHashMap);
Intrinsics.checkNotNullExpressionValue(unmodifiableMap, "unmodifiableMap(result)");
f7402b = unmodifiableMap;
}
public static void a(C0579k name) {
Intrinsics.checkNotNullParameter(name, "name");
int d4 = name.d();
for (int i = 0; i < d4; i++) {
byte i4 = name.i(i);
if (65 <= i4 && i4 < 91) {
throw new IOException("PROTOCOL_ERROR response malformed: mixed case name: ".concat(name.q()));
}
}
}
}

View File

@@ -0,0 +1,95 @@
package l3;
import f0.C0338b;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt__StringsJVMKt;
import r3.C0579k;
/* loaded from: classes3.dex */
public abstract class g {
/* renamed from: a, reason: collision with root package name */
public static final C0579k f7403a;
/* renamed from: b, reason: collision with root package name */
public static final String[] f7404b;
/* renamed from: c, reason: collision with root package name */
public static final String[] f7405c;
/* renamed from: d, reason: collision with root package name */
public static final String[] f7406d;
static {
String replace$default;
C0579k c0579k = C0579k.f8285d;
f7403a = C0338b.n("PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n");
f7404b = new String[]{"DATA", "HEADERS", "PRIORITY", "RST_STREAM", "SETTINGS", "PUSH_PROMISE", "PING", "GOAWAY", "WINDOW_UPDATE", "CONTINUATION"};
f7405c = new String[64];
String[] strArr = new String[256];
for (int i = 0; i < 256; i++) {
String binaryString = Integer.toBinaryString(i);
Intrinsics.checkNotNullExpressionValue(binaryString, "toBinaryString(it)");
replace$default = StringsKt__StringsJVMKt.replace$default(f3.c.h("%8s", binaryString), ' ', '0', false, 4, (Object) null);
strArr[i] = replace$default;
}
f7406d = strArr;
String[] strArr2 = f7405c;
strArr2[0] = "";
strArr2[1] = "END_STREAM";
int[] iArr = {1};
strArr2[8] = "PADDED";
int i4 = iArr[0];
strArr2[i4 | 8] = C.w.r(new StringBuilder(), strArr2[i4], "|PADDED");
strArr2[4] = "END_HEADERS";
strArr2[32] = "PRIORITY";
strArr2[36] = "END_HEADERS|PRIORITY";
int[] iArr2 = {4, 32, 36};
for (int i5 = 0; i5 < 3; i5++) {
int i6 = iArr2[i5];
int i7 = iArr[0];
String[] strArr3 = f7405c;
int i8 = i7 | i6;
strArr3[i8] = strArr3[i7] + '|' + strArr3[i6];
StringBuilder sb = new StringBuilder();
sb.append(strArr3[i7]);
sb.append('|');
strArr3[i8 | 8] = C.w.r(sb, strArr3[i6], "|PADDED");
}
int length = f7405c.length;
for (int i9 = 0; i9 < length; i9++) {
String[] strArr4 = f7405c;
if (strArr4[i9] == null) {
strArr4[i9] = f7406d[i9];
}
}
}
public static String a(boolean z3, int i, int i4, int i5, int i6) {
String str;
String str2;
String[] strArr = f7404b;
String h = i5 < strArr.length ? strArr[i5] : f3.c.h("0x%02x", Integer.valueOf(i5));
if (i6 == 0) {
str = "";
} else {
String[] strArr2 = f7406d;
if (i5 != 2 && i5 != 3) {
if (i5 == 4 || i5 == 6) {
str = i6 == 1 ? "ACK" : strArr2[i6];
} else if (i5 != 7 && i5 != 8) {
String[] strArr3 = f7405c;
if (i6 < strArr3.length) {
str2 = strArr3[i6];
Intrinsics.checkNotNull(str2);
} else {
str2 = strArr2[i6];
}
str = (i5 != 5 || (i6 & 4) == 0) ? (i5 != 0 || (i6 & 32) == 0) ? str2 : StringsKt__StringsJVMKt.replace$default(str2, "PRIORITY", "COMPRESSED", false, 4, (Object) null) : StringsKt__StringsJVMKt.replace$default(str2, "HEADERS", "PUSH_PROMISE", false, 4, (Object) null);
}
}
str = strArr2[i6];
}
return f3.c.h("%s 0x%08x %5d %-13s %s", z3 ? "<<" : ">>", Integer.valueOf(i), Integer.valueOf(i4), h, str);
}
}

View File

@@ -0,0 +1,12 @@
package l3;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes3.dex */
public final class h extends i {
@Override // l3.i
public final void b(y stream) {
Intrinsics.checkNotNullParameter(stream, "stream");
stream.c(EnumC0439b.REFUSED_STREAM, null);
}
}

View File

@@ -0,0 +1,17 @@
package l3;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes3.dex */
public abstract class i {
/* renamed from: a, reason: collision with root package name */
public static final h f7407a = new Object();
public void a(q connection, C settings) {
Intrinsics.checkNotNullParameter(connection, "connection");
Intrinsics.checkNotNullParameter(settings, "settings");
}
public abstract void b(y yVar);
}

View File

@@ -0,0 +1,113 @@
package l3;
import java.io.IOException;
import kotlin.Unit;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Ref;
/* loaded from: classes3.dex */
public final class j extends h3.a {
/* renamed from: e, reason: collision with root package name */
public final /* synthetic */ int f7408e;
/* renamed from: f, reason: collision with root package name */
public final /* synthetic */ Object f7409f;
/* renamed from: g, reason: collision with root package name */
public final /* synthetic */ Object f7410g;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public /* synthetic */ j(String str, Object obj, Object obj2, int i) {
super(str, true);
this.f7408e = i;
this.f7409f = obj;
this.f7410g = obj2;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r7v0, types: [T, l3.C] */
@Override // h3.a
public final long a() {
long a2;
y[] yVarArr;
int i = 0;
switch (this.f7408e) {
case 0:
q qVar = (q) this.f7409f;
qVar.f7429a.a(qVar, (C) ((Ref.ObjectRef) this.f7410g).element);
return -1L;
case 1:
try {
((q) this.f7409f).f7429a.b((y) this.f7410g);
} catch (IOException e4) {
m3.n nVar = m3.n.f7829a;
m3.n nVar2 = m3.n.f7829a;
String str = "Http2Connection.Listener failure for " + ((q) this.f7409f).f7431c;
nVar2.getClass();
m3.n.i(4, str, e4);
try {
((y) this.f7410g).c(EnumC0439b.PROTOCOL_ERROR, e4);
} catch (IOException unused) {
}
}
return -1L;
default:
l lVar = (l) this.f7409f;
C settings = (C) this.f7410g;
Intrinsics.checkNotNullParameter(settings, "settings");
Ref.ObjectRef objectRef = new Ref.ObjectRef();
q qVar2 = lVar.f7415b;
synchronized (qVar2.f7448w) {
synchronized (qVar2) {
try {
C c4 = qVar2.f7442q;
?? c5 = new C();
c5.b(c4);
c5.b(settings);
objectRef.element = c5;
a2 = c5.a() - c4.a();
if (a2 != 0 && !qVar2.f7430b.isEmpty()) {
yVarArr = (y[]) qVar2.f7430b.values().toArray(new y[0]);
C c6 = (C) objectRef.element;
Intrinsics.checkNotNullParameter(c6, "<set-?>");
qVar2.f7442q = c6;
qVar2.f7436j.c(new j(qVar2.f7431c + " onSettings", qVar2, objectRef, i), 0L);
Unit unit = Unit.INSTANCE;
}
yVarArr = null;
C c62 = (C) objectRef.element;
Intrinsics.checkNotNullParameter(c62, "<set-?>");
qVar2.f7442q = c62;
qVar2.f7436j.c(new j(qVar2.f7431c + " onSettings", qVar2, objectRef, i), 0L);
Unit unit2 = Unit.INSTANCE;
} catch (Throwable th) {
throw th;
}
}
try {
qVar2.f7448w.d((C) objectRef.element);
} catch (IOException e5) {
qVar2.e(e5);
}
Unit unit3 = Unit.INSTANCE;
}
if (yVarArr != null) {
int length = yVarArr.length;
while (i < length) {
y yVar = yVarArr[i];
synchronized (yVar) {
yVar.f7484f += a2;
if (a2 > 0) {
Intrinsics.checkNotNull(yVar, "null cannot be cast to non-null type java.lang.Object");
yVar.notifyAll();
}
Unit unit4 = Unit.INSTANCE;
}
i++;
}
}
return -1L;
}
}
}

View File

@@ -0,0 +1,39 @@
package l3;
import java.io.IOException;
/* loaded from: classes3.dex */
public final class k extends h3.a {
/* renamed from: e, reason: collision with root package name */
public final /* synthetic */ q f7411e;
/* renamed from: f, reason: collision with root package name */
public final /* synthetic */ int f7412f;
/* renamed from: g, reason: collision with root package name */
public final /* synthetic */ int f7413g;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public k(String str, q qVar, int i, int i4) {
super(str, true);
this.f7411e = qVar;
this.f7412f = i;
this.f7413g = i4;
}
@Override // h3.a
public final long a() {
int i = this.f7412f;
int i4 = this.f7413g;
q qVar = this.f7411e;
qVar.getClass();
try {
qVar.f7448w.Y(i, i4, true);
return -1L;
} catch (IOException e4) {
qVar.e(e4);
return -1L;
}
}
}

View File

@@ -0,0 +1,73 @@
package l3;
import java.io.IOException;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes3.dex */
public final class l implements Function0 {
/* renamed from: a, reason: collision with root package name */
public final u f7414a;
/* renamed from: b, reason: collision with root package name */
public final /* synthetic */ q f7415b;
public l(q qVar, u reader) {
Intrinsics.checkNotNullParameter(reader, "reader");
this.f7415b = qVar;
this.f7414a = reader;
}
@Override // kotlin.jvm.functions.Function0
public final Object invoke() {
Throwable th;
EnumC0439b enumC0439b;
q qVar = this.f7415b;
u uVar = this.f7414a;
EnumC0439b enumC0439b2 = EnumC0439b.INTERNAL_ERROR;
IOException e4 = null;
try {
try {
Intrinsics.checkNotNullParameter(this, "handler");
if (!uVar.d(true, this)) {
throw new IOException("Required SETTINGS preface not received");
}
do {
try {
} catch (Throwable th2) {
th = th2;
enumC0439b = enumC0439b2;
qVar.d(enumC0439b, enumC0439b2, e4);
f3.c.c(uVar);
throw th;
}
} while (uVar.d(false, this));
enumC0439b = EnumC0439b.NO_ERROR;
try {
try {
qVar.d(enumC0439b, EnumC0439b.CANCEL, null);
} catch (IOException e5) {
e4 = e5;
EnumC0439b enumC0439b3 = EnumC0439b.PROTOCOL_ERROR;
qVar.d(enumC0439b3, enumC0439b3, e4);
f3.c.c(uVar);
return Unit.INSTANCE;
}
} catch (Throwable th3) {
th = th3;
qVar.d(enumC0439b, enumC0439b2, e4);
f3.c.c(uVar);
throw th;
}
} catch (Throwable th4) {
th = th4;
}
} catch (IOException e6) {
e4 = e6;
}
f3.c.c(uVar);
return Unit.INSTANCE;
}
}

View File

@@ -0,0 +1,47 @@
package l3;
import java.io.IOException;
import kotlin.jvm.internal.Intrinsics;
import r3.C0576h;
/* loaded from: classes3.dex */
public final class m extends h3.a {
/* renamed from: e, reason: collision with root package name */
public final /* synthetic */ q f7416e;
/* renamed from: f, reason: collision with root package name */
public final /* synthetic */ int f7417f;
/* renamed from: g, reason: collision with root package name */
public final /* synthetic */ C0576h f7418g;
public final /* synthetic */ int h;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public m(String str, q qVar, int i, C0576h c0576h, int i4, boolean z3) {
super(str, true);
this.f7416e = qVar;
this.f7417f = i;
this.f7418g = c0576h;
this.h = i4;
}
@Override // h3.a
public final long a() {
try {
B b4 = this.f7416e.f7437k;
C0576h source = this.f7418g;
int i = this.h;
b4.getClass();
Intrinsics.checkNotNullParameter(source, "source");
source.l(i);
this.f7416e.f7448w.Z(this.f7417f, EnumC0439b.CANCEL);
synchronized (this.f7416e) {
this.f7416e.f7450y.remove(Integer.valueOf(this.f7417f));
}
return -1L;
} catch (IOException unused) {
return -1L;
}
}
}

View File

@@ -0,0 +1,69 @@
package l3;
import java.io.IOException;
import java.util.List;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes3.dex */
public final class n extends h3.a {
/* renamed from: e, reason: collision with root package name */
public final /* synthetic */ int f7419e = 1;
/* renamed from: f, reason: collision with root package name */
public final /* synthetic */ q f7420f;
/* renamed from: g, reason: collision with root package name */
public final /* synthetic */ int f7421g;
public final /* synthetic */ List h;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public n(String str, q qVar, int i, List list) {
super(str, true);
this.f7420f = qVar;
this.f7421g = i;
this.h = list;
}
@Override // h3.a
public final long a() {
switch (this.f7419e) {
case 0:
B b4 = this.f7420f.f7437k;
List responseHeaders = this.h;
b4.getClass();
Intrinsics.checkNotNullParameter(responseHeaders, "responseHeaders");
try {
this.f7420f.f7448w.Z(this.f7421g, EnumC0439b.CANCEL);
synchronized (this.f7420f) {
this.f7420f.f7450y.remove(Integer.valueOf(this.f7421g));
}
return -1L;
} catch (IOException unused) {
return -1L;
}
default:
B b5 = this.f7420f.f7437k;
List requestHeaders = this.h;
b5.getClass();
Intrinsics.checkNotNullParameter(requestHeaders, "requestHeaders");
try {
this.f7420f.f7448w.Z(this.f7421g, EnumC0439b.CANCEL);
synchronized (this.f7420f) {
this.f7420f.f7450y.remove(Integer.valueOf(this.f7421g));
}
return -1L;
} catch (IOException unused2) {
return -1L;
}
}
}
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public n(String str, q qVar, int i, List list, boolean z3) {
super(str, true);
this.f7420f = qVar;
this.f7421g = i;
this.h = list;
}
}

View File

@@ -0,0 +1,56 @@
package l3;
import java.io.IOException;
import kotlin.Unit;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes3.dex */
public final class o extends h3.a {
/* renamed from: e, reason: collision with root package name */
public final /* synthetic */ int f7422e;
/* renamed from: f, reason: collision with root package name */
public final /* synthetic */ q f7423f;
/* renamed from: g, reason: collision with root package name */
public final /* synthetic */ int f7424g;
public final /* synthetic */ EnumC0439b h;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public /* synthetic */ o(String str, q qVar, int i, EnumC0439b enumC0439b, int i4) {
super(str, true);
this.f7422e = i4;
this.f7423f = qVar;
this.f7424g = i;
this.h = enumC0439b;
}
@Override // h3.a
public final long a() {
switch (this.f7422e) {
case 0:
B b4 = this.f7423f.f7437k;
EnumC0439b errorCode = this.h;
b4.getClass();
Intrinsics.checkNotNullParameter(errorCode, "errorCode");
synchronized (this.f7423f) {
this.f7423f.f7450y.remove(Integer.valueOf(this.f7424g));
Unit unit = Unit.INSTANCE;
}
return -1L;
default:
q qVar = this.f7423f;
try {
int i = this.f7424g;
EnumC0439b statusCode = this.h;
qVar.getClass();
Intrinsics.checkNotNullParameter(statusCode, "statusCode");
qVar.f7448w.Z(i, statusCode);
} catch (IOException e4) {
qVar.e(e4);
}
return -1L;
}
}
}

View File

@@ -0,0 +1,36 @@
package l3;
import java.io.IOException;
/* loaded from: classes3.dex */
public final class p extends h3.a {
/* renamed from: e, reason: collision with root package name */
public final /* synthetic */ q f7425e;
/* renamed from: f, reason: collision with root package name */
public final /* synthetic */ int f7426f;
/* renamed from: g, reason: collision with root package name */
public final /* synthetic */ long f7427g;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public p(String str, q qVar, int i, long j4) {
super(str, true);
this.f7425e = qVar;
this.f7426f = i;
this.f7427g = j4;
}
@Override // h3.a
public final long a() {
q qVar = this.f7425e;
try {
qVar.f7448w.a0(this.f7426f, this.f7427g);
return -1L;
} catch (IOException e4) {
qVar.e(e4);
return -1L;
}
}
}

View File

@@ -0,0 +1,335 @@
package l3;
import java.io.Closeable;
import java.io.IOException;
import java.net.Socket;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import kotlin.Unit;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Ref;
/* loaded from: classes3.dex */
public final class q implements Closeable {
/* renamed from: z, reason: collision with root package name */
public static final C f7428z;
/* renamed from: a, reason: collision with root package name */
public final i f7429a;
/* renamed from: b, reason: collision with root package name */
public final LinkedHashMap f7430b;
/* renamed from: c, reason: collision with root package name */
public final String f7431c;
/* renamed from: d, reason: collision with root package name */
public int f7432d;
/* renamed from: e, reason: collision with root package name */
public int f7433e;
/* renamed from: f, reason: collision with root package name */
public boolean f7434f;
/* renamed from: g, reason: collision with root package name */
public final h3.e f7435g;
public final h3.c h;
public final h3.c i;
/* renamed from: j, reason: collision with root package name */
public final h3.c f7436j;
/* renamed from: k, reason: collision with root package name */
public final B f7437k;
/* renamed from: l, reason: collision with root package name */
public long f7438l;
/* renamed from: m, reason: collision with root package name */
public long f7439m;
/* renamed from: n, reason: collision with root package name */
public long f7440n;
/* renamed from: o, reason: collision with root package name */
public long f7441o;
public final C p;
/* renamed from: q, reason: collision with root package name */
public C f7442q;
/* renamed from: r, reason: collision with root package name */
public long f7443r;
/* renamed from: s, reason: collision with root package name */
public long f7444s;
/* renamed from: t, reason: collision with root package name */
public long f7445t;
/* renamed from: u, reason: collision with root package name */
public long f7446u;
/* renamed from: v, reason: collision with root package name */
public final Socket f7447v;
/* renamed from: w, reason: collision with root package name */
public final z f7448w;
/* renamed from: x, reason: collision with root package name */
public final l f7449x;
/* renamed from: y, reason: collision with root package name */
public final LinkedHashSet f7450y;
static {
C c4 = new C();
c4.c(7, 65535);
c4.c(5, 16384);
f7428z = c4;
}
public q(I0.g builder) {
Intrinsics.checkNotNullParameter(builder, "builder");
this.f7429a = (i) builder.f758f;
this.f7430b = new LinkedHashMap();
String str = (String) builder.f755c;
r3.C c4 = null;
if (str == null) {
Intrinsics.throwUninitializedPropertyAccessException("connectionName");
str = null;
}
this.f7431c = str;
this.f7433e = 3;
h3.e eVar = (h3.e) builder.f753a;
this.f7435g = eVar;
this.h = eVar.e();
this.i = eVar.e();
this.f7436j = eVar.e();
this.f7437k = B.f7369a;
C c5 = new C();
c5.c(7, 16777216);
this.p = c5;
this.f7442q = f7428z;
this.f7446u = r0.a();
Socket socket = (Socket) builder.f754b;
if (socket == null) {
Intrinsics.throwUninitializedPropertyAccessException("socket");
socket = null;
}
this.f7447v = socket;
r3.B b4 = (r3.B) builder.f757e;
if (b4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("sink");
b4 = null;
}
this.f7448w = new z(b4);
r3.C c6 = (r3.C) builder.f756d;
if (c6 != null) {
c4 = c6;
} else {
Intrinsics.throwUninitializedPropertyAccessException("source");
}
this.f7449x = new l(this, new u(c4));
this.f7450y = new LinkedHashSet();
}
public final void O(EnumC0439b statusCode) {
Intrinsics.checkNotNullParameter(statusCode, "statusCode");
synchronized (this.f7448w) {
Ref.IntRef intRef = new Ref.IntRef();
synchronized (this) {
if (this.f7434f) {
return;
}
this.f7434f = true;
int i = this.f7432d;
intRef.element = i;
Unit unit = Unit.INSTANCE;
this.f7448w.x(i, statusCode, f3.c.f6469a);
}
}
}
public final synchronized void Y(long j4) {
long j5 = this.f7443r + j4;
this.f7443r = j5;
long j6 = j5 - this.f7444s;
if (j6 >= this.p.a() / 2) {
b0(0, j6);
this.f7444s += j6;
}
}
/* JADX WARN: Code restructure failed: missing block: B:17:0x0038, code lost:
throw new java.io.IOException("stream closed");
*/
/* JADX WARN: Code restructure failed: missing block: B:21:0x003a, code lost:
r2 = java.lang.Math.min((int) java.lang.Math.min(r12, r6 - r4), r8.f7448w.f7494c);
r6 = r2;
r8.f7445t += r6;
r4 = kotlin.Unit.INSTANCE;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void Z(int r9, boolean r10, r3.C0576h r11, long r12) {
/*
r8 = this;
r0 = 0
int r2 = (r12 > r0 ? 1 : (r12 == r0 ? 0 : -1))
r3 = 0
if (r2 != 0) goto Ld
l3.z r8 = r8.f7448w
r8.e(r10, r9, r11, r3)
return
Ld:
int r2 = (r12 > r0 ? 1 : (r12 == r0 ? 0 : -1))
if (r2 <= 0) goto L6f
monitor-enter(r8)
L12:
long r4 = r8.f7445t // Catch: java.lang.Throwable -> L2f java.lang.InterruptedException -> L60
long r6 = r8.f7446u // Catch: java.lang.Throwable -> L2f java.lang.InterruptedException -> L60
int r2 = (r4 > r6 ? 1 : (r4 == r6 ? 0 : -1))
if (r2 < 0) goto L39
java.util.LinkedHashMap r2 = r8.f7430b // Catch: java.lang.Throwable -> L2f java.lang.InterruptedException -> L60
java.lang.Integer r4 = java.lang.Integer.valueOf(r9) // Catch: java.lang.Throwable -> L2f java.lang.InterruptedException -> L60
boolean r2 = r2.containsKey(r4) // Catch: java.lang.Throwable -> L2f java.lang.InterruptedException -> L60
if (r2 == 0) goto L31
java.lang.String r2 = "null cannot be cast to non-null type java.lang.Object"
kotlin.jvm.internal.Intrinsics.checkNotNull(r8, r2) // Catch: java.lang.Throwable -> L2f java.lang.InterruptedException -> L60
r8.wait() // Catch: java.lang.Throwable -> L2f java.lang.InterruptedException -> L60
goto L12
L2f:
r9 = move-exception
goto L6d
L31:
java.io.IOException r9 = new java.io.IOException // Catch: java.lang.Throwable -> L2f java.lang.InterruptedException -> L60
java.lang.String r10 = "stream closed"
r9.<init>(r10) // Catch: java.lang.Throwable -> L2f java.lang.InterruptedException -> L60
throw r9 // Catch: java.lang.Throwable -> L2f java.lang.InterruptedException -> L60
L39:
long r6 = r6 - r4
long r4 = java.lang.Math.min(r12, r6) // Catch: java.lang.Throwable -> L2f
int r2 = (int) r4 // Catch: java.lang.Throwable -> L2f
l3.z r4 = r8.f7448w // Catch: java.lang.Throwable -> L2f
int r4 = r4.f7494c // Catch: java.lang.Throwable -> L2f
int r2 = java.lang.Math.min(r2, r4) // Catch: java.lang.Throwable -> L2f
long r4 = r8.f7445t // Catch: java.lang.Throwable -> L2f
long r6 = (long) r2 // Catch: java.lang.Throwable -> L2f
long r4 = r4 + r6
r8.f7445t = r4 // Catch: java.lang.Throwable -> L2f
kotlin.Unit r4 = kotlin.Unit.INSTANCE // Catch: java.lang.Throwable -> L2f
monitor-exit(r8)
long r12 = r12 - r6
l3.z r4 = r8.f7448w
if (r10 == 0) goto L5b
int r5 = (r12 > r0 ? 1 : (r12 == r0 ? 0 : -1))
if (r5 != 0) goto L5b
r5 = 1
goto L5c
L5b:
r5 = r3
L5c:
r4.e(r5, r9, r11, r2)
goto Ld
L60:
java.lang.Thread r9 = java.lang.Thread.currentThread() // Catch: java.lang.Throwable -> L2f
r9.interrupt() // Catch: java.lang.Throwable -> L2f
java.io.InterruptedIOException r9 = new java.io.InterruptedIOException // Catch: java.lang.Throwable -> L2f
r9.<init>() // Catch: java.lang.Throwable -> L2f
throw r9 // Catch: java.lang.Throwable -> L2f
L6d:
monitor-exit(r8)
throw r9
L6f:
return
*/
throw new UnsupportedOperationException("Method not decompiled: l3.q.Z(int, boolean, r3.h, long):void");
}
public final void a0(int i, EnumC0439b errorCode) {
Intrinsics.checkNotNullParameter(errorCode, "errorCode");
this.h.c(new o(this.f7431c + '[' + i + "] writeSynReset", this, i, errorCode, 1), 0L);
}
public final void b0(int i, long j4) {
this.h.c(new p(this.f7431c + '[' + i + "] windowUpdate", this, i, j4), 0L);
}
@Override // java.io.Closeable, java.lang.AutoCloseable
public final void close() {
d(EnumC0439b.NO_ERROR, EnumC0439b.CANCEL, null);
}
public final void d(EnumC0439b connectionCode, EnumC0439b streamCode, IOException iOException) {
int i;
Object[] objArr;
Intrinsics.checkNotNullParameter(connectionCode, "connectionCode");
Intrinsics.checkNotNullParameter(streamCode, "streamCode");
byte[] bArr = f3.c.f6469a;
try {
O(connectionCode);
} catch (IOException unused) {
}
synchronized (this) {
try {
if (this.f7430b.isEmpty()) {
objArr = null;
} else {
objArr = this.f7430b.values().toArray(new y[0]);
this.f7430b.clear();
}
Unit unit = Unit.INSTANCE;
} catch (Throwable th) {
throw th;
}
}
y[] yVarArr = (y[]) objArr;
if (yVarArr != null) {
for (y yVar : yVarArr) {
try {
yVar.c(streamCode, iOException);
} catch (IOException unused2) {
}
}
}
try {
this.f7448w.close();
} catch (IOException unused3) {
}
try {
this.f7447v.close();
} catch (IOException unused4) {
}
this.h.e();
this.i.e();
this.f7436j.e();
}
public final void e(IOException iOException) {
EnumC0439b enumC0439b = EnumC0439b.PROTOCOL_ERROR;
d(enumC0439b, enumC0439b, iOException);
}
public final void flush() {
this.f7448w.flush();
}
public final synchronized y s(int i) {
return (y) this.f7430b.get(Integer.valueOf(i));
}
public final synchronized y x(int i) {
y yVar;
yVar = (y) this.f7430b.remove(Integer.valueOf(i));
Intrinsics.checkNotNull(this, "null cannot be cast to non-null type java.lang.Object");
notifyAll();
return yVar;
}
}

View File

@@ -0,0 +1,266 @@
package l3;
import a.AbstractC0105a;
import e3.C0334u;
import e3.F;
import e3.G;
import e3.I;
import e3.N;
import e3.O;
import java.io.IOException;
import java.net.ProtocolException;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.concurrent.TimeUnit;
import kotlin.Unit;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt__StringsKt;
import r3.C0579k;
/* loaded from: classes3.dex */
public final class r implements j3.e {
/* renamed from: g, reason: collision with root package name */
public static final List f7451g = f3.c.k("connection", "host", "keep-alive", "proxy-connection", "te", "transfer-encoding", "encoding", "upgrade", ":method", ":path", ":scheme", ":authority");
public static final List h = f3.c.k("connection", "host", "keep-alive", "proxy-connection", "te", "transfer-encoding", "encoding", "upgrade");
/* renamed from: a, reason: collision with root package name */
public final i3.l f7452a;
/* renamed from: b, reason: collision with root package name */
public final j3.g f7453b;
/* renamed from: c, reason: collision with root package name */
public final q f7454c;
/* renamed from: d, reason: collision with root package name */
public volatile y f7455d;
/* renamed from: e, reason: collision with root package name */
public final G f7456e;
/* renamed from: f, reason: collision with root package name */
public volatile boolean f7457f;
public r(F client, i3.l connection, j3.g chain, q http2Connection) {
Intrinsics.checkNotNullParameter(client, "client");
Intrinsics.checkNotNullParameter(connection, "connection");
Intrinsics.checkNotNullParameter(chain, "chain");
Intrinsics.checkNotNullParameter(http2Connection, "http2Connection");
this.f7452a = connection;
this.f7453b = chain;
this.f7454c = http2Connection;
List list = client.f6247r;
G g4 = G.H2_PRIOR_KNOWLEDGE;
this.f7456e = list.contains(g4) ? g4 : G.HTTP_2;
}
@Override // j3.e
public final void a(I request) {
int i;
y yVar;
boolean z3 = true;
Intrinsics.checkNotNullParameter(request, "request");
if (this.f7455d != null) {
return;
}
boolean z4 = request.f6270d != null;
Intrinsics.checkNotNullParameter(request, "request");
C0334u c0334u = request.f6269c;
ArrayList requestHeaders = new ArrayList(c0334u.size() + 4);
requestHeaders.add(new C0440c(C0440c.f7382f, request.f6268b));
C0579k c0579k = C0440c.f7383g;
e3.w url = request.f6267a;
Intrinsics.checkNotNullParameter(url, "url");
String b4 = url.b();
String d4 = url.d();
if (d4 != null) {
b4 = b4 + '?' + d4;
}
requestHeaders.add(new C0440c(c0579k, b4));
String b5 = request.b("Host");
if (b5 != null) {
requestHeaders.add(new C0440c(C0440c.i, b5));
}
requestHeaders.add(new C0440c(C0440c.h, url.f6413a));
int size = c0334u.size();
for (int i4 = 0; i4 < size; i4++) {
String b6 = c0334u.b(i4);
Locale US = Locale.US;
Intrinsics.checkNotNullExpressionValue(US, "US");
String lowerCase = b6.toLowerCase(US);
Intrinsics.checkNotNullExpressionValue(lowerCase, "this as java.lang.String).toLowerCase(locale)");
if (!f7451g.contains(lowerCase) || (Intrinsics.areEqual(lowerCase, "te") && Intrinsics.areEqual(c0334u.f(i4), "trailers"))) {
requestHeaders.add(new C0440c(lowerCase, c0334u.f(i4)));
}
}
q qVar = this.f7454c;
qVar.getClass();
Intrinsics.checkNotNullParameter(requestHeaders, "requestHeaders");
boolean z5 = !z4;
synchronized (qVar.f7448w) {
synchronized (qVar) {
try {
if (qVar.f7433e > 1073741823) {
qVar.O(EnumC0439b.REFUSED_STREAM);
}
if (qVar.f7434f) {
throw new IOException();
}
i = qVar.f7433e;
qVar.f7433e = i + 2;
yVar = new y(i, qVar, z5, false, null);
if (z4 && qVar.f7445t < qVar.f7446u && yVar.f7483e < yVar.f7484f) {
z3 = false;
}
if (yVar.h()) {
qVar.f7430b.put(Integer.valueOf(i), yVar);
}
Unit unit = Unit.INSTANCE;
} catch (Throwable th) {
throw th;
}
}
qVar.f7448w.O(z5, i, requestHeaders);
}
if (z3) {
qVar.f7448w.flush();
}
this.f7455d = yVar;
if (this.f7457f) {
y yVar2 = this.f7455d;
Intrinsics.checkNotNull(yVar2);
yVar2.e(EnumC0439b.CANCEL);
throw new IOException("Canceled");
}
y yVar3 = this.f7455d;
Intrinsics.checkNotNull(yVar3);
x xVar = yVar3.f7487k;
long j4 = this.f7453b.f6954g;
TimeUnit timeUnit = TimeUnit.MILLISECONDS;
xVar.g(j4);
y yVar4 = this.f7455d;
Intrinsics.checkNotNull(yVar4);
yVar4.f7488l.g(this.f7453b.h);
}
@Override // j3.e
public final r3.I b(O response) {
Intrinsics.checkNotNullParameter(response, "response");
y yVar = this.f7455d;
Intrinsics.checkNotNull(yVar);
return yVar.i;
}
@Override // j3.e
public final void c() {
y yVar = this.f7455d;
Intrinsics.checkNotNull(yVar);
yVar.f().close();
}
@Override // j3.e
public final void cancel() {
this.f7457f = true;
y yVar = this.f7455d;
if (yVar != null) {
yVar.e(EnumC0439b.CANCEL);
}
}
@Override // j3.e
public final void d() {
this.f7454c.flush();
}
@Override // j3.e
public final r3.G e(I request, long j4) {
Intrinsics.checkNotNullParameter(request, "request");
y yVar = this.f7455d;
Intrinsics.checkNotNull(yVar);
return yVar.f();
}
@Override // j3.e
public final long f(O response) {
Intrinsics.checkNotNullParameter(response, "response");
if (j3.f.a(response)) {
return f3.c.j(response);
}
return 0L;
}
@Override // j3.e
public final N g(boolean z3) {
C0334u headerBlock;
CharSequence trim;
y yVar = this.f7455d;
if (yVar == null) {
throw new IOException("stream wasn't created");
}
synchronized (yVar) {
yVar.f7487k.h();
while (yVar.f7485g.isEmpty() && yVar.f7489m == null) {
try {
yVar.k();
} catch (Throwable th) {
yVar.f7487k.k();
throw th;
}
}
yVar.f7487k.k();
if (yVar.f7485g.isEmpty()) {
IOException iOException = yVar.f7490n;
if (iOException != null) {
throw iOException;
}
EnumC0439b enumC0439b = yVar.f7489m;
Intrinsics.checkNotNull(enumC0439b);
throw new D(enumC0439b);
}
Object removeFirst = yVar.f7485g.removeFirst();
Intrinsics.checkNotNullExpressionValue(removeFirst, "headersQueue.removeFirst()");
headerBlock = (C0334u) removeFirst;
}
G protocol = this.f7456e;
Intrinsics.checkNotNullParameter(headerBlock, "headerBlock");
Intrinsics.checkNotNullParameter(protocol, "protocol");
ArrayList arrayList = new ArrayList(20);
int size = headerBlock.size();
B0.G g4 = null;
for (int i = 0; i < size; i++) {
String name = headerBlock.b(i);
String value = headerBlock.f(i);
if (Intrinsics.areEqual(name, ":status")) {
g4 = AbstractC0105a.L("HTTP/1.1 " + value);
} else if (!h.contains(name)) {
Intrinsics.checkNotNullParameter(name, "name");
Intrinsics.checkNotNullParameter(value, "value");
arrayList.add(name);
trim = StringsKt__StringsKt.trim((CharSequence) value);
arrayList.add(trim.toString());
}
}
if (g4 == null) {
throw new ProtocolException("Expected ':status' header not present");
}
N n4 = new N();
Intrinsics.checkNotNullParameter(protocol, "protocol");
n4.f6281b = protocol;
n4.f6282c = g4.f102b;
String message = (String) g4.f104d;
Intrinsics.checkNotNullParameter(message, "message");
n4.f6283d = message;
n4.c(new C0334u((String[]) arrayList.toArray(new String[0])));
if (z3 && n4.f6282c == 100) {
return null;
}
return n4;
}
@Override // j3.e
public final i3.l h() {
return this.f7452a;
}
}

View File

@@ -0,0 +1,16 @@
package l3;
import java.io.IOException;
/* loaded from: classes3.dex */
public abstract class s {
public static int a(int i, int i4, int i5) {
if ((i4 & 8) != 0) {
i--;
}
if (i5 <= i) {
return i - i5;
}
throw new IOException(C.w.k("PROTOCOL_ERROR padding ", i5, i, " > remaining length "));
}
}

View File

@@ -0,0 +1,89 @@
package l3;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import kotlin.UByte;
import kotlin.jvm.internal.Intrinsics;
import r3.C0576h;
import r3.C0579k;
import r3.I;
import r3.InterfaceC0578j;
import r3.K;
/* loaded from: classes3.dex */
public final class t implements I {
/* renamed from: a, reason: collision with root package name */
public final InterfaceC0578j f7458a;
/* renamed from: b, reason: collision with root package name */
public int f7459b;
/* renamed from: c, reason: collision with root package name */
public int f7460c;
/* renamed from: d, reason: collision with root package name */
public int f7461d;
/* renamed from: e, reason: collision with root package name */
public int f7462e;
/* renamed from: f, reason: collision with root package name */
public int f7463f;
public t(InterfaceC0578j source) {
Intrinsics.checkNotNullParameter(source, "source");
this.f7458a = source;
}
@Override // java.io.Closeable, java.lang.AutoCloseable
public final void close() {
}
@Override // r3.I
public final long read(C0576h sink, long j4) {
int i;
int readInt;
Intrinsics.checkNotNullParameter(sink, "sink");
do {
int i4 = this.f7462e;
InterfaceC0578j interfaceC0578j = this.f7458a;
if (i4 == 0) {
interfaceC0578j.l(this.f7463f);
this.f7463f = 0;
if ((this.f7460c & 4) == 0) {
i = this.f7461d;
int s4 = f3.c.s(interfaceC0578j);
this.f7462e = s4;
this.f7459b = s4;
int readByte = interfaceC0578j.readByte() & UByte.MAX_VALUE;
this.f7460c = interfaceC0578j.readByte() & UByte.MAX_VALUE;
Logger logger = u.f7464d;
if (logger.isLoggable(Level.FINE)) {
C0579k c0579k = g.f7403a;
logger.fine(g.a(true, this.f7461d, this.f7459b, readByte, this.f7460c));
}
readInt = interfaceC0578j.readInt() & Integer.MAX_VALUE;
this.f7461d = readInt;
if (readByte != 9) {
throw new IOException(readByte + " != TYPE_CONTINUATION");
}
}
} else {
long read = interfaceC0578j.read(sink, Math.min(j4, i4));
if (read != -1) {
this.f7462e -= (int) read;
return read;
}
}
return -1L;
} while (readInt == i);
throw new IOException("TYPE_CONTINUATION streamId changed");
}
@Override // r3.I
public final K timeout() {
return this.f7458a.timeout();
}
}

View File

@@ -0,0 +1,270 @@
package l3;
import java.io.Closeable;
import java.io.EOFException;
import java.io.IOException;
import java.util.List;
import java.util.logging.Logger;
import kotlin.UByte;
import kotlin.Unit;
import kotlin.jvm.internal.Intrinsics;
import r3.C0576h;
import r3.InterfaceC0578j;
/* loaded from: classes3.dex */
public final class u implements Closeable {
/* renamed from: d, reason: collision with root package name */
public static final Logger f7464d;
/* renamed from: a, reason: collision with root package name */
public final InterfaceC0578j f7465a;
/* renamed from: b, reason: collision with root package name */
public final t f7466b;
/* renamed from: c, reason: collision with root package name */
public final C0441d f7467c;
static {
Logger logger = Logger.getLogger(g.class.getName());
Intrinsics.checkNotNullExpressionValue(logger, "getLogger(Http2::class.java.name)");
f7464d = logger;
}
public u(InterfaceC0578j source) {
Intrinsics.checkNotNullParameter(source, "source");
this.f7465a = source;
t tVar = new t(source);
this.f7466b = tVar;
this.f7467c = new C0441d(tVar);
}
public final void O(l lVar, int i, int i4, int i5) {
int i6;
if (i5 == 0) {
throw new IOException("PROTOCOL_ERROR: TYPE_PUSH_PROMISE streamId == 0");
}
if ((i4 & 8) != 0) {
byte readByte = this.f7465a.readByte();
byte[] bArr = f3.c.f6469a;
i6 = readByte & UByte.MAX_VALUE;
} else {
i6 = 0;
}
int readInt = this.f7465a.readInt() & Integer.MAX_VALUE;
List requestHeaders = s(s.a(i - 4, i4, i6), i6, i4, i5);
Intrinsics.checkNotNullParameter(requestHeaders, "requestHeaders");
q qVar = lVar.f7415b;
qVar.getClass();
Intrinsics.checkNotNullParameter(requestHeaders, "requestHeaders");
synchronized (qVar) {
if (qVar.f7450y.contains(Integer.valueOf(readInt))) {
qVar.a0(readInt, EnumC0439b.PROTOCOL_ERROR);
return;
}
qVar.f7450y.add(Integer.valueOf(readInt));
qVar.i.c(new n(qVar.f7431c + '[' + readInt + "] onRequest", qVar, readInt, requestHeaders), 0L);
}
}
@Override // java.io.Closeable, java.lang.AutoCloseable
public final void close() {
this.f7465a.close();
}
/* JADX WARN: Code restructure failed: missing block: B:155:0x0256, code lost:
throw new java.io.IOException(com.google.android.gms.measurement.internal.a.l(r8, "PROTOCOL_ERROR SETTINGS_MAX_FRAME_SIZE: "));
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean d(boolean r20, l3.l r21) {
/*
Method dump skipped, instructions count: 912
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: l3.u.d(boolean, l3.l):boolean");
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r1v13, types: [java.lang.Object, r3.h] */
public final void e(l lVar, int i, int i4, int i5) {
int i6;
boolean z3;
long j4;
boolean z4;
if (i5 == 0) {
throw new IOException("PROTOCOL_ERROR: TYPE_DATA streamId == 0");
}
boolean z5 = (i4 & 1) != 0;
if ((i4 & 32) != 0) {
throw new IOException("PROTOCOL_ERROR: FLAG_COMPRESSED without SETTINGS_COMPRESS_DATA");
}
if ((i4 & 8) != 0) {
byte readByte = this.f7465a.readByte();
byte[] bArr = f3.c.f6469a;
i6 = readByte & UByte.MAX_VALUE;
} else {
i6 = 0;
}
int a2 = s.a(i, i4, i6);
InterfaceC0578j source = this.f7465a;
Intrinsics.checkNotNullParameter(source, "source");
lVar.f7415b.getClass();
long j5 = 0;
if (i5 != 0 && (i5 & 1) == 0) {
q qVar = lVar.f7415b;
qVar.getClass();
Intrinsics.checkNotNullParameter(source, "source");
?? obj = new Object();
long j6 = a2;
source.P(j6);
source.read(obj, j6);
qVar.i.c(new m(qVar.f7431c + '[' + i5 + "] onData", qVar, i5, obj, a2, z5), 0L);
} else {
y s4 = lVar.f7415b.s(i5);
if (s4 == null) {
lVar.f7415b.a0(i5, EnumC0439b.PROTOCOL_ERROR);
long j7 = a2;
lVar.f7415b.Y(j7);
source.l(j7);
} else {
Intrinsics.checkNotNullParameter(source, "source");
byte[] bArr2 = f3.c.f6469a;
w wVar = s4.i;
long j8 = a2;
wVar.getClass();
Intrinsics.checkNotNullParameter(source, "source");
long j9 = j8;
while (true) {
if (j9 <= j5) {
byte[] bArr3 = f3.c.f6469a;
wVar.f7477f.f7480b.Y(j8);
break;
}
synchronized (wVar.f7477f) {
z3 = wVar.f7473b;
j4 = j5;
z4 = wVar.f7475d.f8284b + j9 > wVar.f7472a;
Unit unit = Unit.INSTANCE;
}
if (z4) {
source.l(j9);
wVar.f7477f.e(EnumC0439b.FLOW_CONTROL_ERROR);
break;
}
if (z3) {
source.l(j9);
break;
}
long read = source.read(wVar.f7474c, j9);
if (read == -1) {
throw new EOFException();
}
j9 -= read;
y yVar = wVar.f7477f;
synchronized (yVar) {
try {
if (wVar.f7476e) {
wVar.f7474c.d();
} else {
C0576h c0576h = wVar.f7475d;
boolean z6 = c0576h.f8284b == j4;
c0576h.D(wVar.f7474c);
if (z6) {
Intrinsics.checkNotNull(yVar, "null cannot be cast to non-null type java.lang.Object");
yVar.notifyAll();
}
}
} catch (Throwable th) {
throw th;
}
}
j5 = j4;
}
if (z5) {
s4.i(f3.c.f6470b, true);
}
}
}
this.f7465a.l(i6);
}
/* JADX WARN: Code restructure failed: missing block: B:46:0x00e4, code lost:
throw new java.io.IOException("Invalid dynamic table size update " + r6.f7387a);
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.util.List s(int r6, int r7, int r8, int r9) {
/*
Method dump skipped, instructions count: 301
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: l3.u.s(int, int, int, int):java.util.List");
}
public final void x(l lVar, int i, int i4, int i5) {
int i6;
int i7 = 1;
if (i5 == 0) {
throw new IOException("PROTOCOL_ERROR: TYPE_HEADERS streamId == 0");
}
boolean z3 = false;
boolean z4 = (i4 & 1) != 0;
if ((i4 & 8) != 0) {
byte readByte = this.f7465a.readByte();
byte[] bArr = f3.c.f6469a;
i6 = readByte & UByte.MAX_VALUE;
} else {
i6 = 0;
}
if ((i4 & 32) != 0) {
InterfaceC0578j interfaceC0578j = this.f7465a;
interfaceC0578j.readInt();
interfaceC0578j.readByte();
byte[] bArr2 = f3.c.f6469a;
i -= 5;
}
List requestHeaders = s(s.a(i, i4, i6), i6, i4, i5);
Intrinsics.checkNotNullParameter(requestHeaders, "headerBlock");
lVar.f7415b.getClass();
if (i5 != 0 && (i5 & 1) == 0) {
z3 = true;
}
if (z3) {
q qVar = lVar.f7415b;
qVar.getClass();
Intrinsics.checkNotNullParameter(requestHeaders, "requestHeaders");
qVar.i.c(new n(qVar.f7431c + '[' + i5 + "] onHeaders", qVar, i5, requestHeaders, z4), 0L);
return;
}
q qVar2 = lVar.f7415b;
synchronized (qVar2) {
y s4 = qVar2.s(i5);
if (s4 != null) {
Unit unit = Unit.INSTANCE;
s4.i(f3.c.u(requestHeaders), z4);
return;
}
if (qVar2.f7434f) {
return;
}
if (i5 <= qVar2.f7432d) {
return;
}
if (i5 % 2 == qVar2.f7433e % 2) {
return;
}
y yVar = new y(i5, qVar2, false, z4, f3.c.u(requestHeaders));
qVar2.f7432d = i5;
qVar2.f7430b.put(Integer.valueOf(i5), yVar);
qVar2.f7435g.e().c(new j(qVar2.f7431c + '[' + i5 + "] onStream", qVar2, yVar, i7), 0L);
}
}
}

View File

@@ -0,0 +1,133 @@
package l3;
import kotlin.Unit;
import kotlin.jvm.internal.Intrinsics;
import r3.C0576h;
import r3.G;
import r3.K;
/* loaded from: classes3.dex */
public final class v implements G {
/* renamed from: a, reason: collision with root package name */
public final boolean f7468a;
/* renamed from: b, reason: collision with root package name */
public final C0576h f7469b = new Object();
/* renamed from: c, reason: collision with root package name */
public boolean f7470c;
/* renamed from: d, reason: collision with root package name */
public final /* synthetic */ y f7471d;
/* JADX WARN: Type inference failed for: r1v1, types: [java.lang.Object, r3.h] */
public v(y yVar, boolean z3) {
this.f7471d = yVar;
this.f7468a = z3;
}
@Override // r3.G, java.io.Closeable, java.lang.AutoCloseable
public final void close() {
boolean z3;
y yVar = this.f7471d;
byte[] bArr = f3.c.f6469a;
synchronized (yVar) {
if (this.f7470c) {
return;
}
synchronized (yVar) {
z3 = yVar.f7489m == null;
Unit unit = Unit.INSTANCE;
}
y yVar2 = this.f7471d;
if (!yVar2.f7486j.f7468a) {
if (this.f7469b.f8284b > 0) {
while (this.f7469b.f8284b > 0) {
d(true);
}
} else if (z3) {
yVar2.f7480b.Z(yVar2.f7479a, true, null, 0L);
}
}
synchronized (this.f7471d) {
this.f7470c = true;
Unit unit2 = Unit.INSTANCE;
}
this.f7471d.f7480b.flush();
this.f7471d.a();
}
}
/* JADX WARN: Finally extract failed */
public final void d(boolean z3) {
long min;
boolean z4;
y yVar = this.f7471d;
synchronized (yVar) {
try {
yVar.f7488l.h();
while (yVar.f7483e >= yVar.f7484f && !this.f7468a && !this.f7470c) {
try {
synchronized (yVar) {
EnumC0439b enumC0439b = yVar.f7489m;
if (enumC0439b != null) {
break;
} else {
yVar.k();
}
}
} catch (Throwable th) {
yVar.f7488l.k();
throw th;
}
}
yVar.f7488l.k();
yVar.b();
min = Math.min(yVar.f7484f - yVar.f7483e, this.f7469b.f8284b);
yVar.f7483e += min;
z4 = z3 && min == this.f7469b.f8284b;
Unit unit = Unit.INSTANCE;
} catch (Throwable th2) {
throw th2;
}
}
this.f7471d.f7488l.h();
try {
y yVar2 = this.f7471d;
yVar2.f7480b.Z(yVar2.f7479a, z4, this.f7469b, min);
} finally {
this.f7471d.f7488l.k();
}
}
@Override // r3.G, java.io.Flushable
public final void flush() {
y yVar = this.f7471d;
byte[] bArr = f3.c.f6469a;
synchronized (yVar) {
yVar.b();
Unit unit = Unit.INSTANCE;
}
while (this.f7469b.f8284b > 0) {
d(false);
this.f7471d.f7480b.flush();
}
}
@Override // r3.G
public final K timeout() {
return this.f7471d.f7488l;
}
@Override // r3.G
public final void z(C0576h source, long j4) {
Intrinsics.checkNotNullParameter(source, "source");
byte[] bArr = f3.c.f6469a;
C0576h c0576h = this.f7469b;
c0576h.z(source, j4);
while (c0576h.f8284b >= 16384) {
d(false);
}
}
}

View File

@@ -0,0 +1,193 @@
package l3;
import kotlin.Unit;
import kotlin.jvm.internal.Intrinsics;
import r3.C0576h;
import r3.I;
import r3.K;
/* loaded from: classes3.dex */
public final class w implements I {
/* renamed from: a, reason: collision with root package name */
public final long f7472a;
/* renamed from: b, reason: collision with root package name */
public boolean f7473b;
/* renamed from: c, reason: collision with root package name */
public final C0576h f7474c = new Object();
/* renamed from: d, reason: collision with root package name */
public final C0576h f7475d = new Object();
/* renamed from: e, reason: collision with root package name */
public boolean f7476e;
/* renamed from: f, reason: collision with root package name */
public final /* synthetic */ y f7477f;
/* JADX WARN: Type inference failed for: r1v1, types: [java.lang.Object, r3.h] */
/* JADX WARN: Type inference failed for: r1v2, types: [java.lang.Object, r3.h] */
public w(y yVar, long j4, boolean z3) {
this.f7477f = yVar;
this.f7472a = j4;
this.f7473b = z3;
}
@Override // java.io.Closeable, java.lang.AutoCloseable
public final void close() {
long j4;
y yVar = this.f7477f;
synchronized (yVar) {
this.f7476e = true;
C0576h c0576h = this.f7475d;
j4 = c0576h.f8284b;
c0576h.d();
Intrinsics.checkNotNull(yVar, "null cannot be cast to non-null type java.lang.Object");
yVar.notifyAll();
Unit unit = Unit.INSTANCE;
}
if (j4 > 0) {
byte[] bArr = f3.c.f6469a;
this.f7477f.f7480b.Y(j4);
}
this.f7477f.a();
}
/* JADX WARN: Removed duplicated region for block: B:40:0x008a A[LOOP:0: B:3:0x000f->B:40:0x008a, LOOP_END] */
/* JADX WARN: Removed duplicated region for block: B:41:0x008d A[SYNTHETIC] */
@Override // r3.I
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final long read(r3.C0576h r16, long r17) {
/*
r15 = this;
r1 = r16
r2 = r17
java.lang.String r4 = "sink"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r1, r4)
r4 = 0
int r6 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1))
if (r6 < 0) goto Lab
Lf:
l3.y r6 = r15.f7477f
monitor-enter(r6)
l3.x r7 = r6.f7487k // Catch: java.lang.Throwable -> L96
r7.h() // Catch: java.lang.Throwable -> L96
monitor-enter(r6) // Catch: java.lang.Throwable -> L32
l3.b r7 = r6.f7489m // Catch: java.lang.Throwable -> La0
monitor-exit(r6) // Catch: java.lang.Throwable -> L32
if (r7 == 0) goto L38
boolean r7 = r15.f7473b // Catch: java.lang.Throwable -> L32
if (r7 != 0) goto L38
java.io.IOException r7 = r6.f7490n // Catch: java.lang.Throwable -> L32
if (r7 != 0) goto L39
l3.D r7 = new l3.D // Catch: java.lang.Throwable -> L32
monitor-enter(r6) // Catch: java.lang.Throwable -> L32
l3.b r8 = r6.f7489m // Catch: java.lang.Throwable -> L35
monitor-exit(r6) // Catch: java.lang.Throwable -> L32
kotlin.jvm.internal.Intrinsics.checkNotNull(r8) // Catch: java.lang.Throwable -> L32
r7.<init>(r8) // Catch: java.lang.Throwable -> L32
goto L39
L32:
r0 = move-exception
goto La3
L35:
r0 = move-exception
monitor-exit(r6) // Catch: java.lang.Throwable -> L35
throw r0 // Catch: java.lang.Throwable -> L32
L38:
r7 = 0
L39:
boolean r8 = r15.f7476e // Catch: java.lang.Throwable -> L32
if (r8 != 0) goto L98
r3.h r8 = r15.f7475d // Catch: java.lang.Throwable -> L32
long r9 = r8.f8284b // Catch: java.lang.Throwable -> L32
int r11 = (r9 > r4 ? 1 : (r9 == r4 ? 0 : -1))
r12 = -1
r14 = 0
if (r11 <= 0) goto L75
long r9 = java.lang.Math.min(r2, r9) // Catch: java.lang.Throwable -> L32
long r8 = r8.read(r1, r9) // Catch: java.lang.Throwable -> L32
long r10 = r6.f7481c // Catch: java.lang.Throwable -> L32
long r10 = r10 + r8
r6.f7481c = r10 // Catch: java.lang.Throwable -> L32
long r4 = r6.f7482d // Catch: java.lang.Throwable -> L32
long r10 = r10 - r4
if (r7 != 0) goto L80
l3.q r4 = r6.f7480b // Catch: java.lang.Throwable -> L32
l3.C r4 = r4.p // Catch: java.lang.Throwable -> L32
int r4 = r4.a() // Catch: java.lang.Throwable -> L32
int r4 = r4 / 2
long r4 = (long) r4 // Catch: java.lang.Throwable -> L32
int r4 = (r10 > r4 ? 1 : (r10 == r4 ? 0 : -1))
if (r4 < 0) goto L80
l3.q r4 = r6.f7480b // Catch: java.lang.Throwable -> L32
int r5 = r6.f7479a // Catch: java.lang.Throwable -> L32
r4.b0(r5, r10) // Catch: java.lang.Throwable -> L32
long r4 = r6.f7481c // Catch: java.lang.Throwable -> L32
r6.f7482d = r4 // Catch: java.lang.Throwable -> L32
goto L80
L75:
boolean r4 = r15.f7473b // Catch: java.lang.Throwable -> L32
if (r4 != 0) goto L7f
if (r7 != 0) goto L7f
r6.k() // Catch: java.lang.Throwable -> L32
r14 = 1
L7f:
r8 = r12
L80:
l3.x r4 = r6.f7487k // Catch: java.lang.Throwable -> L96
r4.k() // Catch: java.lang.Throwable -> L96
kotlin.Unit r4 = kotlin.Unit.INSTANCE // Catch: java.lang.Throwable -> L96
monitor-exit(r6)
if (r14 == 0) goto L8d
r4 = 0
goto Lf
L8d:
int r0 = (r8 > r12 ? 1 : (r8 == r12 ? 0 : -1))
if (r0 == 0) goto L92
return r8
L92:
if (r7 != 0) goto L95
return r12
L95:
throw r7
L96:
r0 = move-exception
goto La9
L98:
java.io.IOException r0 = new java.io.IOException // Catch: java.lang.Throwable -> L32
java.lang.String r1 = "stream closed"
r0.<init>(r1) // Catch: java.lang.Throwable -> L32
throw r0 // Catch: java.lang.Throwable -> L32
La0:
r0 = move-exception
monitor-exit(r6) // Catch: java.lang.Throwable -> La0
throw r0 // Catch: java.lang.Throwable -> L32
La3:
l3.x r1 = r6.f7487k // Catch: java.lang.Throwable -> L96
r1.k() // Catch: java.lang.Throwable -> L96
throw r0 // Catch: java.lang.Throwable -> L96
La9:
monitor-exit(r6)
throw r0
Lab:
java.lang.String r0 = "byteCount < 0: "
java.lang.String r0 = C.w.l(r0, r2)
java.lang.IllegalArgumentException r1 = new java.lang.IllegalArgumentException
java.lang.String r0 = r0.toString()
r1.<init>(r0)
throw r1
*/
throw new UnsupportedOperationException("Method not decompiled: l3.w.read(r3.h, long):long");
}
@Override // r3.I
public final K timeout() {
return this.f7477f.f7487k;
}
}

View File

@@ -0,0 +1,39 @@
package l3;
import java.net.SocketTimeoutException;
import kotlin.Unit;
import r3.C0573e;
/* loaded from: classes3.dex */
public final class x extends C0573e {
/* renamed from: m, reason: collision with root package name */
public final /* synthetic */ y f7478m;
public x(y yVar) {
this.f7478m = yVar;
}
@Override // r3.C0573e
public final void j() {
this.f7478m.e(EnumC0439b.CANCEL);
q qVar = this.f7478m.f7480b;
synchronized (qVar) {
long j4 = qVar.f7440n;
long j5 = qVar.f7439m;
if (j4 < j5) {
return;
}
qVar.f7439m = j5 + 1;
qVar.f7441o = System.nanoTime() + 1000000000;
Unit unit = Unit.INSTANCE;
qVar.h.c(new h3.b(qVar, 2, C.w.r(new StringBuilder(), qVar.f7431c, " ping")), 0L);
}
}
public final void k() {
if (i()) {
throw new SocketTimeoutException("timeout");
}
}
}

View File

@@ -0,0 +1,267 @@
package l3;
import e3.C0334u;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.util.ArrayDeque;
import kotlin.Unit;
import kotlin.jvm.internal.Intrinsics;
/* loaded from: classes3.dex */
public final class y {
/* renamed from: a, reason: collision with root package name */
public final int f7479a;
/* renamed from: b, reason: collision with root package name */
public final q f7480b;
/* renamed from: c, reason: collision with root package name */
public long f7481c;
/* renamed from: d, reason: collision with root package name */
public long f7482d;
/* renamed from: e, reason: collision with root package name */
public long f7483e;
/* renamed from: f, reason: collision with root package name */
public long f7484f;
/* renamed from: g, reason: collision with root package name */
public final ArrayDeque f7485g;
public boolean h;
public final w i;
/* renamed from: j, reason: collision with root package name */
public final v f7486j;
/* renamed from: k, reason: collision with root package name */
public final x f7487k;
/* renamed from: l, reason: collision with root package name */
public final x f7488l;
/* renamed from: m, reason: collision with root package name */
public EnumC0439b f7489m;
/* renamed from: n, reason: collision with root package name */
public IOException f7490n;
public y(int i, q connection, boolean z3, boolean z4, C0334u c0334u) {
Intrinsics.checkNotNullParameter(connection, "connection");
this.f7479a = i;
this.f7480b = connection;
this.f7484f = connection.f7442q.a();
ArrayDeque arrayDeque = new ArrayDeque();
this.f7485g = arrayDeque;
this.i = new w(this, connection.p.a(), z4);
this.f7486j = new v(this, z3);
this.f7487k = new x(this);
this.f7488l = new x(this);
if (c0334u == null) {
if (!g()) {
throw new IllegalStateException("remotely-initiated streams should have headers");
}
} else {
if (g()) {
throw new IllegalStateException("locally-initiated streams shouldn't have headers yet");
}
arrayDeque.add(c0334u);
}
}
public final void a() {
boolean z3;
boolean h;
byte[] bArr = f3.c.f6469a;
synchronized (this) {
try {
w wVar = this.i;
if (!wVar.f7473b && wVar.f7476e) {
v vVar = this.f7486j;
if (vVar.f7468a || vVar.f7470c) {
z3 = true;
h = h();
Unit unit = Unit.INSTANCE;
}
}
z3 = false;
h = h();
Unit unit2 = Unit.INSTANCE;
} catch (Throwable th) {
throw th;
}
}
if (z3) {
c(EnumC0439b.CANCEL, null);
} else {
if (h) {
return;
}
this.f7480b.x(this.f7479a);
}
}
public final void b() {
v vVar = this.f7486j;
if (vVar.f7470c) {
throw new IOException("stream closed");
}
if (vVar.f7468a) {
throw new IOException("stream finished");
}
if (this.f7489m != null) {
IOException iOException = this.f7490n;
if (iOException != null) {
throw iOException;
}
EnumC0439b enumC0439b = this.f7489m;
Intrinsics.checkNotNull(enumC0439b);
throw new D(enumC0439b);
}
}
public final void c(EnumC0439b statusCode, IOException iOException) {
Intrinsics.checkNotNullParameter(statusCode, "rstStatusCode");
if (d(statusCode, iOException)) {
q qVar = this.f7480b;
qVar.getClass();
Intrinsics.checkNotNullParameter(statusCode, "statusCode");
qVar.f7448w.Z(this.f7479a, statusCode);
}
}
public final boolean d(EnumC0439b enumC0439b, IOException iOException) {
byte[] bArr = f3.c.f6469a;
synchronized (this) {
if (this.f7489m != null) {
return false;
}
this.f7489m = enumC0439b;
this.f7490n = iOException;
Intrinsics.checkNotNull(this, "null cannot be cast to non-null type java.lang.Object");
notifyAll();
if (this.i.f7473b && this.f7486j.f7468a) {
return false;
}
Unit unit = Unit.INSTANCE;
this.f7480b.x(this.f7479a);
return true;
}
}
public final void e(EnumC0439b errorCode) {
Intrinsics.checkNotNullParameter(errorCode, "errorCode");
if (d(errorCode, null)) {
this.f7480b.a0(this.f7479a, errorCode);
}
}
public final v f() {
synchronized (this) {
try {
if (!this.h && !g()) {
throw new IllegalStateException("reply before requesting the sink");
}
Unit unit = Unit.INSTANCE;
} catch (Throwable th) {
throw th;
}
}
return this.f7486j;
}
public final boolean g() {
boolean z3 = (this.f7479a & 1) == 1;
this.f7480b.getClass();
return true == z3;
}
public final synchronized boolean h() {
if (this.f7489m != null) {
return false;
}
w wVar = this.i;
if (wVar.f7473b || wVar.f7476e) {
v vVar = this.f7486j;
if (vVar.f7468a || vVar.f7470c) {
if (this.h) {
return false;
}
}
}
return true;
}
/* JADX WARN: Removed duplicated region for block: B:10:0x0021 A[Catch: all -> 0x0016, TryCatch #0 {all -> 0x0016, blocks: (B:4:0x0008, B:8:0x0010, B:10:0x0021, B:11:0x0025, B:19:0x0018), top: B:3:0x0008 }] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void i(e3.C0334u r3, boolean r4) {
/*
r2 = this;
java.lang.String r0 = "headers"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r3, r0)
byte[] r0 = f3.c.f6469a
monitor-enter(r2)
boolean r0 = r2.h // Catch: java.lang.Throwable -> L16
r1 = 1
if (r0 == 0) goto L18
if (r4 != 0) goto L10
goto L18
L10:
l3.w r3 = r2.i // Catch: java.lang.Throwable -> L16
r3.getClass() // Catch: java.lang.Throwable -> L16
goto L1f
L16:
r3 = move-exception
goto L3e
L18:
r2.h = r1 // Catch: java.lang.Throwable -> L16
java.util.ArrayDeque r0 = r2.f7485g // Catch: java.lang.Throwable -> L16
r0.add(r3) // Catch: java.lang.Throwable -> L16
L1f:
if (r4 == 0) goto L25
l3.w r3 = r2.i // Catch: java.lang.Throwable -> L16
r3.f7473b = r1 // Catch: java.lang.Throwable -> L16
L25:
boolean r3 = r2.h() // Catch: java.lang.Throwable -> L16
java.lang.String r4 = "null cannot be cast to non-null type java.lang.Object"
kotlin.jvm.internal.Intrinsics.checkNotNull(r2, r4) // Catch: java.lang.Throwable -> L16
r2.notifyAll() // Catch: java.lang.Throwable -> L16
kotlin.Unit r4 = kotlin.Unit.INSTANCE // Catch: java.lang.Throwable -> L16
monitor-exit(r2)
if (r3 != 0) goto L3d
l3.q r3 = r2.f7480b
int r2 = r2.f7479a
r3.x(r2)
L3d:
return
L3e:
monitor-exit(r2)
throw r3
*/
throw new UnsupportedOperationException("Method not decompiled: l3.y.i(e3.u, boolean):void");
}
public final synchronized void j(EnumC0439b errorCode) {
Intrinsics.checkNotNullParameter(errorCode, "errorCode");
if (this.f7489m == null) {
this.f7489m = errorCode;
Intrinsics.checkNotNull(this, "null cannot be cast to non-null type java.lang.Object");
notifyAll();
}
}
public final void k() {
try {
Intrinsics.checkNotNull(this, "null cannot be cast to non-null type java.lang.Object");
wait();
} catch (InterruptedException unused) {
Thread.currentThread().interrupt();
throw new InterruptedIOException();
}
}
}

View File

@@ -0,0 +1,213 @@
package l3;
import java.io.Closeable;
import java.io.IOException;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import kotlin.KotlinVersion;
import kotlin.collections.ArraysKt___ArraysJvmKt;
import kotlin.jvm.internal.Intrinsics;
import r3.C0576h;
import r3.InterfaceC0577i;
/* loaded from: classes3.dex */
public final class z implements Closeable {
/* renamed from: f, reason: collision with root package name */
public static final Logger f7491f = Logger.getLogger(g.class.getName());
/* renamed from: a, reason: collision with root package name */
public final InterfaceC0577i f7492a;
/* renamed from: b, reason: collision with root package name */
public final C0576h f7493b;
/* renamed from: c, reason: collision with root package name */
public int f7494c;
/* renamed from: d, reason: collision with root package name */
public boolean f7495d;
/* renamed from: e, reason: collision with root package name */
public final e f7496e;
/* JADX WARN: Type inference failed for: r2v1, types: [java.lang.Object, r3.h] */
public z(InterfaceC0577i sink) {
Intrinsics.checkNotNullParameter(sink, "sink");
this.f7492a = sink;
?? obj = new Object();
this.f7493b = obj;
this.f7494c = 16384;
this.f7496e = new e(obj);
}
public final synchronized void O(boolean z3, int i, ArrayList headerBlock) {
Intrinsics.checkNotNullParameter(headerBlock, "headerBlock");
if (this.f7495d) {
throw new IOException("closed");
}
this.f7496e.d(headerBlock);
long j4 = this.f7493b.f8284b;
long min = Math.min(this.f7494c, j4);
int i4 = j4 == min ? 4 : 0;
if (z3) {
i4 |= 1;
}
s(i, (int) min, 1, i4);
this.f7492a.z(this.f7493b, min);
if (j4 > min) {
long j5 = j4 - min;
while (j5 > 0) {
long min2 = Math.min(this.f7494c, j5);
j5 -= min2;
s(i, (int) min2, 9, j5 == 0 ? 4 : 0);
this.f7492a.z(this.f7493b, min2);
}
}
}
public final synchronized void Y(int i, int i4, boolean z3) {
if (this.f7495d) {
throw new IOException("closed");
}
s(0, 8, 6, z3 ? 1 : 0);
this.f7492a.r(i);
this.f7492a.r(i4);
this.f7492a.flush();
}
public final synchronized void Z(int i, EnumC0439b errorCode) {
Intrinsics.checkNotNullParameter(errorCode, "errorCode");
if (this.f7495d) {
throw new IOException("closed");
}
if (errorCode.f7379a == -1) {
throw new IllegalArgumentException("Failed requirement.");
}
s(i, 4, 3, 0);
this.f7492a.r(errorCode.f7379a);
this.f7492a.flush();
}
public final synchronized void a0(int i, long j4) {
if (this.f7495d) {
throw new IOException("closed");
}
if (j4 == 0 || j4 > 2147483647L) {
throw new IllegalArgumentException(("windowSizeIncrement == 0 || windowSizeIncrement > 0x7fffffffL: " + j4).toString());
}
s(i, 4, 8, 0);
this.f7492a.r((int) j4);
this.f7492a.flush();
}
@Override // java.io.Closeable, java.lang.AutoCloseable
public final synchronized void close() {
this.f7495d = true;
this.f7492a.close();
}
public final synchronized void d(C peerSettings) {
try {
Intrinsics.checkNotNullParameter(peerSettings, "peerSettings");
if (this.f7495d) {
throw new IOException("closed");
}
int i = this.f7494c;
int i4 = peerSettings.f7370a;
if ((i4 & 32) != 0) {
i = peerSettings.f7371b[5];
}
this.f7494c = i;
if (((i4 & 2) != 0 ? peerSettings.f7371b[1] : -1) != -1) {
e eVar = this.f7496e;
int i5 = (i4 & 2) != 0 ? peerSettings.f7371b[1] : -1;
eVar.getClass();
int min = Math.min(i5, 16384);
int i6 = eVar.f7397d;
if (i6 != min) {
if (min < i6) {
eVar.f7395b = Math.min(eVar.f7395b, min);
}
eVar.f7396c = true;
eVar.f7397d = min;
int i7 = eVar.h;
if (min < i7) {
if (min == 0) {
ArraysKt___ArraysJvmKt.fill$default(eVar.f7398e, (Object) null, 0, 0, 6, (Object) null);
eVar.f7399f = eVar.f7398e.length - 1;
eVar.f7400g = 0;
eVar.h = 0;
} else {
eVar.a(i7 - min);
}
}
}
}
s(0, 0, 4, 1);
this.f7492a.flush();
} catch (Throwable th) {
throw th;
}
}
public final synchronized void e(boolean z3, int i, C0576h c0576h, int i4) {
if (this.f7495d) {
throw new IOException("closed");
}
s(i, i4, 0, z3 ? 1 : 0);
if (i4 > 0) {
Intrinsics.checkNotNull(c0576h);
this.f7492a.z(c0576h, i4);
}
}
public final synchronized void flush() {
if (this.f7495d) {
throw new IOException("closed");
}
this.f7492a.flush();
}
public final void s(int i, int i4, int i5, int i6) {
Level level = Level.FINE;
Logger logger = f7491f;
if (logger.isLoggable(level)) {
logger.fine(g.a(false, i, i4, i5, i6));
}
if (i4 > this.f7494c) {
throw new IllegalArgumentException(("FRAME_SIZE_ERROR length > " + this.f7494c + ": " + i4).toString());
}
if ((Integer.MIN_VALUE & i) != 0) {
throw new IllegalArgumentException(com.google.android.gms.measurement.internal.a.l(i, "reserved bit set: ").toString());
}
byte[] bArr = f3.c.f6469a;
InterfaceC0577i interfaceC0577i = this.f7492a;
Intrinsics.checkNotNullParameter(interfaceC0577i, "<this>");
interfaceC0577i.y((i4 >>> 16) & KotlinVersion.MAX_COMPONENT_VALUE);
interfaceC0577i.y((i4 >>> 8) & KotlinVersion.MAX_COMPONENT_VALUE);
interfaceC0577i.y(i4 & KotlinVersion.MAX_COMPONENT_VALUE);
interfaceC0577i.y(i5 & KotlinVersion.MAX_COMPONENT_VALUE);
interfaceC0577i.y(i6 & KotlinVersion.MAX_COMPONENT_VALUE);
interfaceC0577i.r(i & Integer.MAX_VALUE);
}
public final synchronized void x(int i, EnumC0439b errorCode, byte[] debugData) {
Intrinsics.checkNotNullParameter(errorCode, "errorCode");
Intrinsics.checkNotNullParameter(debugData, "debugData");
if (this.f7495d) {
throw new IOException("closed");
}
if (errorCode.f7379a == -1) {
throw new IllegalArgumentException("errorCode.httpCode == -1");
}
s(0, debugData.length + 8, 7, 0);
this.f7492a.r(i);
this.f7492a.r(errorCode.f7379a);
if (debugData.length != 0) {
this.f7492a.E(debugData);
}
this.f7492a.flush();
}
}