378 lines
13 KiB
Java
378 lines
13 KiB
Java
package o;
|
|
|
|
import com.airbnb.deeplinkdispatch.UrlTreeKt;
|
|
import java.util.ArrayList;
|
|
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
|
|
import kotlinx.coroutines.channels.ClosedSendChannelException;
|
|
import o.C15084ggl;
|
|
|
|
/* renamed from: o.ggg, reason: case insensitive filesystem */
|
|
/* loaded from: classes6.dex */
|
|
public abstract class AbstractC15079ggg<E> implements InterfaceC15090ggr<E> {
|
|
protected final InterfaceC14894gbR<E, C14866gag> d;
|
|
private final ggR b = new ggR();
|
|
private volatile Object onCloseHandler = null;
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
public AbstractC15079ggg(InterfaceC14894gbR<? super E, C14866gag> interfaceC14894gbR) {
|
|
this.d = interfaceC14894gbR;
|
|
}
|
|
|
|
protected Object b(E e) {
|
|
InterfaceC15083ggk<E> d;
|
|
do {
|
|
d = d();
|
|
if (d == null) {
|
|
return C15074ggb.a;
|
|
}
|
|
} while (d.b(e) == null);
|
|
C15045gfe.b();
|
|
d.c(e);
|
|
return d.c();
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
/* JADX WARN: Code restructure failed: missing block: B:39:0x0040, code lost:
|
|
|
|
r1 = null;
|
|
*/
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public final o.AbstractC15087ggo f() {
|
|
/*
|
|
r4 = this;
|
|
o.ggR r0 = r4.b
|
|
o.ggU r0 = (o.ggU) r0
|
|
L4:
|
|
java.lang.Object r1 = r0._next
|
|
boolean r2 = r1 instanceof o.AbstractC15115ghd
|
|
if (r2 != 0) goto L44
|
|
o.ggU r1 = (o.ggU) r1
|
|
if (r1 != r0) goto Lf
|
|
goto L40
|
|
Lf:
|
|
boolean r2 = r1 instanceof o.AbstractC15087ggo
|
|
if (r2 == 0) goto L40
|
|
r2 = r1
|
|
o.ggo r2 = (o.AbstractC15087ggo) r2
|
|
boolean r2 = r2 instanceof o.C15085ggm
|
|
if (r2 == 0) goto L20
|
|
boolean r2 = r1.bu_()
|
|
if (r2 == 0) goto L41
|
|
L20:
|
|
o.ggU r2 = r1.f()
|
|
if (r2 != 0) goto L27
|
|
goto L41
|
|
L27:
|
|
java.lang.Object r1 = r2._next
|
|
boolean r3 = r1 instanceof o.AbstractC15115ghd
|
|
if (r3 != 0) goto L3a
|
|
boolean r3 = r1 instanceof o.C15113ghb
|
|
if (r3 == 0) goto L36
|
|
o.ghb r1 = (o.C15113ghb) r1
|
|
o.ggU r2 = r1.c
|
|
goto L27
|
|
L36:
|
|
r2.b()
|
|
goto L4
|
|
L3a:
|
|
o.ghd r1 = (o.AbstractC15115ghd) r1
|
|
r1.a(r2)
|
|
goto L27
|
|
L40:
|
|
r1 = 0
|
|
L41:
|
|
o.ggo r1 = (o.AbstractC15087ggo) r1
|
|
return r1
|
|
L44:
|
|
o.ghd r1 = (o.AbstractC15115ghd) r1
|
|
r1.a(r0)
|
|
goto L4
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: o.AbstractC15079ggg.f():o.ggo");
|
|
}
|
|
|
|
@Override // o.InterfaceC15090ggr
|
|
public final Object d(E e) {
|
|
C15084ggl.LWm lWm;
|
|
Object b = b(e);
|
|
if (b != C15074ggb.e) {
|
|
if (b == C15074ggb.a) {
|
|
C15085ggm<?> h = h();
|
|
if (h != null) {
|
|
C15084ggl.Sts sts = C15084ggl.d;
|
|
d(h);
|
|
Throwable th = h.d;
|
|
return C15084ggl.e(new C15084ggl.HBt(new ClosedSendChannelException("Channel was closed")));
|
|
}
|
|
C15084ggl.Sts sts2 = C15084ggl.d;
|
|
lWm = C15084ggl.e;
|
|
return C15084ggl.e(lWm);
|
|
}
|
|
if (b instanceof C15085ggm) {
|
|
C15084ggl.Sts sts3 = C15084ggl.d;
|
|
C15085ggm c15085ggm = (C15085ggm) b;
|
|
d((C15085ggm<?>) c15085ggm);
|
|
Throwable th2 = c15085ggm.d;
|
|
return C15084ggl.e(new C15084ggl.HBt(new ClosedSendChannelException("Channel was closed")));
|
|
}
|
|
throw new IllegalStateException("trySend returned ".concat(String.valueOf(b)).toString());
|
|
}
|
|
C15084ggl.Sts sts4 = C15084ggl.d;
|
|
return C15084ggl.e(C14866gag.c);
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
/* JADX WARN: Code restructure failed: missing block: B:39:0x0040, code lost:
|
|
|
|
r1 = 0;
|
|
*/
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Type inference failed for: r1v1, types: [o.ggU] */
|
|
/* JADX WARN: Type inference failed for: r1v2 */
|
|
/* JADX WARN: Type inference failed for: r1v3 */
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
public o.InterfaceC15083ggk<E> d() {
|
|
/*
|
|
r4 = this;
|
|
o.ggR r0 = r4.b
|
|
o.ggU r0 = (o.ggU) r0
|
|
L4:
|
|
java.lang.Object r1 = r0._next
|
|
boolean r2 = r1 instanceof o.AbstractC15115ghd
|
|
if (r2 != 0) goto L44
|
|
o.ggU r1 = (o.ggU) r1
|
|
if (r1 != r0) goto Lf
|
|
goto L40
|
|
Lf:
|
|
boolean r2 = r1 instanceof o.InterfaceC15083ggk
|
|
if (r2 == 0) goto L40
|
|
r2 = r1
|
|
o.ggk r2 = (o.InterfaceC15083ggk) r2
|
|
boolean r2 = r2 instanceof o.C15085ggm
|
|
if (r2 == 0) goto L20
|
|
boolean r2 = r1.bu_()
|
|
if (r2 == 0) goto L41
|
|
L20:
|
|
o.ggU r2 = r1.f()
|
|
if (r2 != 0) goto L27
|
|
goto L41
|
|
L27:
|
|
java.lang.Object r1 = r2._next
|
|
boolean r3 = r1 instanceof o.AbstractC15115ghd
|
|
if (r3 != 0) goto L3a
|
|
boolean r3 = r1 instanceof o.C15113ghb
|
|
if (r3 == 0) goto L36
|
|
o.ghb r1 = (o.C15113ghb) r1
|
|
o.ggU r2 = r1.c
|
|
goto L27
|
|
L36:
|
|
r2.b()
|
|
goto L4
|
|
L3a:
|
|
o.ghd r1 = (o.AbstractC15115ghd) r1
|
|
r1.a(r2)
|
|
goto L27
|
|
L40:
|
|
r1 = 0
|
|
L41:
|
|
o.ggk r1 = (o.InterfaceC15083ggk) r1
|
|
return r1
|
|
L44:
|
|
o.ghd r1 = (o.AbstractC15115ghd) r1
|
|
r1.a(r0)
|
|
goto L4
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: o.AbstractC15079ggg.d():o.ggk");
|
|
}
|
|
|
|
public String toString() {
|
|
Object obj;
|
|
String concat;
|
|
String str;
|
|
Object obj2;
|
|
Object obj3;
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(C15041gfa.a(this));
|
|
sb.append('@');
|
|
sb.append(C15041gfa.b(this));
|
|
sb.append(UrlTreeKt.componentParamPrefixChar);
|
|
ggR ggr = this.b;
|
|
while (true) {
|
|
obj = ggr._next;
|
|
if (!(obj instanceof AbstractC15115ghd)) {
|
|
break;
|
|
}
|
|
((AbstractC15115ghd) obj).a(ggr);
|
|
}
|
|
ggU d = ggT.d(obj);
|
|
if (d == this.b) {
|
|
str = "EmptyQueue";
|
|
} else {
|
|
if (d instanceof C15085ggm) {
|
|
concat = d.toString();
|
|
} else if (d instanceof AbstractC15082ggj) {
|
|
concat = "ReceiveQueued";
|
|
} else {
|
|
concat = d instanceof AbstractC15087ggo ? "SendQueued" : "UNEXPECTED:".concat(String.valueOf(d));
|
|
}
|
|
ggR ggr2 = this.b;
|
|
ggU b = ggr2.b();
|
|
if (b == null) {
|
|
b = ggU.a((ggU) ggr2._prev);
|
|
}
|
|
if (b != d) {
|
|
StringBuilder sb2 = new StringBuilder();
|
|
sb2.append(concat);
|
|
sb2.append(",queueSize=");
|
|
ggR ggr3 = this.b;
|
|
while (true) {
|
|
obj2 = ggr3._next;
|
|
if (!(obj2 instanceof AbstractC15115ghd)) {
|
|
break;
|
|
}
|
|
((AbstractC15115ghd) obj2).a(ggr3);
|
|
}
|
|
ggU ggu = (ggU) obj2;
|
|
int i = 0;
|
|
while (!C14957gcv.b(ggu, ggr3)) {
|
|
if (ggu instanceof ggU) {
|
|
i++;
|
|
}
|
|
int i2 = i;
|
|
while (true) {
|
|
obj3 = ggu._next;
|
|
if (!(obj3 instanceof AbstractC15115ghd)) {
|
|
break;
|
|
}
|
|
((AbstractC15115ghd) obj3).a(ggu);
|
|
}
|
|
ggu = ggT.d(obj3);
|
|
i = i2;
|
|
}
|
|
sb2.append(i);
|
|
str = sb2.toString();
|
|
if (b instanceof C15085ggm) {
|
|
StringBuilder sb3 = new StringBuilder();
|
|
sb3.append(str);
|
|
sb3.append(",closedForSend=");
|
|
sb3.append(b);
|
|
str = sb3.toString();
|
|
}
|
|
} else {
|
|
str = concat;
|
|
}
|
|
}
|
|
sb.append(str);
|
|
sb.append(UrlTreeKt.componentParamSuffixChar);
|
|
sb.append(a());
|
|
return sb.toString();
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Type inference failed for: r1v0 */
|
|
/* JADX WARN: Type inference failed for: r1v1, types: [java.lang.Object] */
|
|
/* JADX WARN: Type inference failed for: r1v4 */
|
|
/* JADX WARN: Type inference failed for: r1v5 */
|
|
/* JADX WARN: Type inference failed for: r1v6 */
|
|
/* JADX WARN: Type inference failed for: r3v10, types: [java.util.AbstractCollection, java.util.ArrayList] */
|
|
private static void d(C15085ggm<?> c15085ggm) {
|
|
Object obj;
|
|
ggU ggu;
|
|
ArrayList arrayList = 0;
|
|
while (true) {
|
|
ggU b = c15085ggm.b();
|
|
if (b == null) {
|
|
b = ggU.a((ggU) c15085ggm._prev);
|
|
}
|
|
AbstractC15082ggj abstractC15082ggj = b instanceof AbstractC15082ggj ? (AbstractC15082ggj) b : null;
|
|
if (abstractC15082ggj == null) {
|
|
if (arrayList != 0) {
|
|
if (!(arrayList instanceof ArrayList)) {
|
|
((AbstractC15082ggj) arrayList).a(c15085ggm);
|
|
} else {
|
|
if (arrayList == 0) {
|
|
throw new NullPointerException("null cannot be cast to non-null type java.util.ArrayList<E of kotlinx.coroutines.internal.InlineList>{ kotlin.collections.TypeAliasesKt.ArrayList<E of kotlinx.coroutines.internal.InlineList> }");
|
|
}
|
|
ArrayList arrayList2 = arrayList;
|
|
for (int size = arrayList2.size() - 1; size >= 0; size--) {
|
|
((AbstractC15082ggj) arrayList2.get(size)).a(c15085ggm);
|
|
}
|
|
}
|
|
}
|
|
return;
|
|
}
|
|
if (!abstractC15082ggj.bw_()) {
|
|
while (true) {
|
|
obj = abstractC15082ggj._next;
|
|
if (!(obj instanceof AbstractC15115ghd)) {
|
|
break;
|
|
} else {
|
|
((AbstractC15115ghd) obj).a(abstractC15082ggj);
|
|
}
|
|
}
|
|
do {
|
|
ggu = ((C15113ghb) obj).c;
|
|
while (true) {
|
|
obj = ggu._next;
|
|
if (!(obj instanceof AbstractC15115ghd)) {
|
|
break;
|
|
} else {
|
|
((AbstractC15115ghd) obj).a(ggu);
|
|
}
|
|
}
|
|
} while (obj instanceof C15113ghb);
|
|
ggu.b();
|
|
} else {
|
|
C15045gfe.b();
|
|
if (arrayList == 0) {
|
|
arrayList = abstractC15082ggj;
|
|
} else if (arrayList instanceof ArrayList) {
|
|
if (arrayList == 0) {
|
|
throw new NullPointerException("null cannot be cast to non-null type java.util.ArrayList<E of kotlinx.coroutines.internal.InlineList>{ kotlin.collections.TypeAliasesKt.ArrayList<E of kotlinx.coroutines.internal.InlineList> }");
|
|
}
|
|
arrayList.add(abstractC15082ggj);
|
|
} else {
|
|
?? arrayList3 = new ArrayList(4);
|
|
arrayList3.add(arrayList);
|
|
arrayList3.add(abstractC15082ggj);
|
|
arrayList = arrayList3;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
public final C15085ggm<?> h() {
|
|
ggR ggr = this.b;
|
|
ggU b = ggr.b();
|
|
if (b == null) {
|
|
b = ggU.a((ggU) ggr._prev);
|
|
}
|
|
C15085ggm<?> c15085ggm = b instanceof C15085ggm ? (C15085ggm) b : null;
|
|
if (c15085ggm == null) {
|
|
return null;
|
|
}
|
|
d(c15085ggm);
|
|
return c15085ggm;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: protected */
|
|
public final ggR i() {
|
|
return this.b;
|
|
}
|
|
|
|
protected String a() {
|
|
return "";
|
|
}
|
|
|
|
static {
|
|
AtomicReferenceFieldUpdater.newUpdater(AbstractC15079ggg.class, Object.class, "onCloseHandler");
|
|
}
|
|
}
|