package defpackage;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.CancellationException;
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import java.util.concurrent.atomic.AtomicReferenceArray;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
import kotlinx.coroutines.DispatchException;
import kotlinx.coroutines.channels.ClosedReceiveChannelException;
import kotlinx.coroutines.channels.ClosedSendChannelException;
import sun.misc.Unsafe;

/* JADX INFO: renamed from: ʾﾞ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public class C0349 implements InterfaceC0714 {

    /* JADX INFO: renamed from: ʿٴˇ, reason: contains not printable characters */
    public static final /* synthetic */ long f2112;

    /* JADX INFO: renamed from: ˀᵭ, reason: contains not printable characters */
    public static final /* synthetic */ long f2113;

    /* JADX INFO: renamed from: ˁˌᵩ, reason: contains not printable characters */
    public static final /* synthetic */ long f2114;

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public static final /* synthetic */ AtomicReferenceFieldUpdater f2115;

    /* JADX INFO: renamed from: ˉᵵᵜ, reason: contains not printable characters */
    public static final /* synthetic */ long f2116;

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public static final /* synthetic */ AtomicReferenceFieldUpdater f2117;

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public static final /* synthetic */ AtomicReferenceFieldUpdater f2118;

    /* JADX INFO: renamed from: ᵠˏˏ, reason: contains not printable characters */
    public static final /* synthetic */ long f2121;

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public static final /* synthetic */ AtomicReferenceFieldUpdater f2125;
    private volatile /* synthetic */ Object _closeCause$volatile;
    private volatile /* synthetic */ long bufferEnd$volatile;
    private volatile /* synthetic */ Object bufferEndSegment$volatile;
    private volatile /* synthetic */ Object closeHandler$volatile;
    private volatile /* synthetic */ long completedExpandBuffersAndPauseFlag$volatile;
    private volatile /* synthetic */ Object receiveSegment$volatile;
    private volatile /* synthetic */ long receivers$volatile;
    private volatile /* synthetic */ Object sendSegment$volatile;
    private volatile /* synthetic */ long sendersAndCloseStatus$volatile;

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final int f2126;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public static final /* synthetic */ AtomicLongFieldUpdater f2120 = AtomicLongFieldUpdater.newUpdater(C0349.class, "sendersAndCloseStatus$volatile");

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public static final /* synthetic */ AtomicLongFieldUpdater f2119 = AtomicLongFieldUpdater.newUpdater(C0349.class, "receivers$volatile");

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public static final /* synthetic */ AtomicLongFieldUpdater f2122 = AtomicLongFieldUpdater.newUpdater(C0349.class, "bufferEnd$volatile");

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public static final /* synthetic */ AtomicLongFieldUpdater f2123 = AtomicLongFieldUpdater.newUpdater(C0349.class, "completedExpandBuffersAndPauseFlag$volatile");

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public static final /* synthetic */ AtomicReferenceFieldUpdater f2124 = AtomicReferenceFieldUpdater.newUpdater(C0349.class, Object.class, "sendSegment$volatile");

    static {
        Unsafe unsafe = AbstractC1929.f7689;
        f2113 = unsafe.objectFieldOffset(C0349.class.getDeclaredField("sendSegment$volatile"));
        f2115 = AtomicReferenceFieldUpdater.newUpdater(C0349.class, Object.class, "receiveSegment$volatile");
        f2114 = unsafe.objectFieldOffset(C0349.class.getDeclaredField("receiveSegment$volatile"));
        f2117 = AtomicReferenceFieldUpdater.newUpdater(C0349.class, Object.class, "bufferEndSegment$volatile");
        f2121 = unsafe.objectFieldOffset(C0349.class.getDeclaredField("bufferEndSegment$volatile"));
        f2125 = AtomicReferenceFieldUpdater.newUpdater(C0349.class, Object.class, "_closeCause$volatile");
        f2112 = unsafe.objectFieldOffset(C0349.class.getDeclaredField("_closeCause$volatile"));
        f2118 = AtomicReferenceFieldUpdater.newUpdater(C0349.class, Object.class, "closeHandler$volatile");
        f2116 = unsafe.objectFieldOffset(C0349.class.getDeclaredField("closeHandler$volatile"));
    }

    public C0349(int i) {
        this.f2126 = i;
        if (i < 0) {
            ᵕᵩʽᵲ.ᵱᵽʡᵚ(AbstractC0793.m2876(i, "Invalid channel capacity: ", ", should be >=0"));
            throw null;
        }
        C2552 c2552 = AbstractC4752.f18083;
        this.bufferEnd$volatile = i != 0 ? i != Integer.MAX_VALUE ? i : Long.MAX_VALUE : 0L;
        this.completedExpandBuffersAndPauseFlag$volatile = f2122.get(this);
        C2552 c25522 = new C2552(0L, null, this, 3);
        this.sendSegment$volatile = c25522;
        this.receiveSegment$volatile = c25522;
        this.bufferEndSegment$volatile = m1642() ? AbstractC4752.f18083 : c25522;
        this._closeCause$volatile = AbstractC4752.f18071;
    }

    /* JADX WARN: Removed duplicated region for block: B:8:0x0014  */
    /* JADX INFO: renamed from: ˁˌᵩ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static Object m1619(C0349 c0349, AbstractC3500 abstractC3500) throws DispatchException {
        C3967 c3967;
        C2552 c2552;
        if (abstractC3500 instanceof C3967) {
            c3967 = (C3967) abstractC3500;
            int i = c3967.f15203;
            if ((i & Integer.MIN_VALUE) != 0) {
                c3967.f15203 = i - Integer.MIN_VALUE;
            } else {
                c3967 = new C3967(c0349, abstractC3500);
            }
        }
        C3967 c39672 = c3967;
        Object obj = c39672.f15201;
        int i2 = c39672.f15203;
        if (i2 != 0) {
            if (i2 == 1) {
                ᵟˌᵫ.ˊˌˊ(obj);
                return ((C5191) obj).f19535;
            }
            ᵕᵩʽᵲ.ᵪᵹᵥᵻ("call to 'resume' before 'invoke' with coroutine");
            return null;
        }
        ᵟˌᵫ.ˊˌˊ(obj);
        f2115.getClass();
        C2552 c25522 = (C2552) AbstractC1929.f7689.getObjectVolatile(c0349, f2114);
        while (!c0349.m1629()) {
            long andIncrement = f2119.getAndIncrement(c0349);
            long j = AbstractC4752.f18070;
            long j2 = andIncrement / j;
            int i3 = (int) (andIncrement % j);
            if (c25522.f17947 != j2) {
                C2552 c2552M1653 = c0349.m1653(j2, c25522);
                if (c2552M1653 == null) {
                    continue;
                } else {
                    c2552 = c2552M1653;
                }
            } else {
                c2552 = c25522;
            }
            C0349 c03492 = c0349;
            Object objM1626 = c03492.m1626(c2552, i3, andIncrement, null);
            if (objM1626 == AbstractC4752.f18076) {
                ᵕᵩʽᵲ.ᵪᵹᵥᵻ("unexpected");
                return null;
            }
            if (objM1626 != AbstractC4752.f18079) {
                if (objM1626 != AbstractC4752.f18074) {
                    c2552.m10590();
                    return objM1626;
                }
                c39672.f15203 = 1;
                Object objM1628 = c03492.m1628(c2552, i3, andIncrement, c39672);
                EnumC0111 enumC0111 = EnumC0111.f1384;
                return objM1628 == enumC0111 ? enumC0111 : objM1628;
            }
            if (andIncrement < c03492.m1638()) {
                c2552.m10590();
            }
            c0349 = c03492;
            c25522 = c2552;
        }
        return new C2502(c0349.m1631());
    }

    /* JADX INFO: renamed from: ˉᵵᵜ, reason: contains not printable characters */
    public static Object m1620(C0349 c0349, ᵡᵥ r14) throws Throwable {
        C2552 c2552;
        Throwable th;
        C2552 c25522;
        AtomicReferenceFieldUpdater atomicReferenceFieldUpdater = f2115;
        atomicReferenceFieldUpdater.getClass();
        if (c0349 == null) {
            C1685.m4560();
            return null;
        }
        C2552 c25523 = (C2552) AbstractC1929.f7689.getObjectVolatile(c0349, f2114);
        while (!c0349.m1629()) {
            AtomicLongFieldUpdater atomicLongFieldUpdater = f2119;
            long andIncrement = atomicLongFieldUpdater.getAndIncrement(c0349);
            long j = AbstractC4752.f18070;
            long j2 = andIncrement / j;
            int i = (int) (andIncrement % j);
            if (c25523.f17947 != j2) {
                C2552 c2552M1653 = c0349.m1653(j2, c25523);
                if (c2552M1653 == null) {
                    continue;
                } else {
                    c2552 = c2552M1653;
                }
            } else {
                c2552 = c25523;
            }
            C0349 c03492 = c0349;
            Object objM1626 = c03492.m1626(c2552, i, andIncrement, null);
            C1735 c1735 = AbstractC4752.f18076;
            if (objM1626 == c1735) {
                ᵕᵩʽᵲ.ᵪᵹᵥᵻ("unexpected");
                return null;
            }
            C1735 c17352 = AbstractC4752.f18079;
            if (objM1626 == c17352) {
                if (andIncrement < c03492.m1638()) {
                    c2552.m10590();
                }
                c0349 = c03492;
                c25523 = c2552;
            } else {
                if (objM1626 != AbstractC4752.f18074) {
                    c2552.m10590();
                    return objM1626;
                }
                C3453 c3453 = ᵹˊᵫˋ.ˋˈ(ˌᵨʽʙ.ᵔᵖᵹᵫ(r14));
                try {
                    Object objM16262 = c03492.m1626(c2552, i, andIncrement, c3453);
                    if (objM16262 == c1735) {
                        c3453.mo3792(c2552, i);
                    } else {
                        if (objM16262 == c17352) {
                            if (andIncrement < c03492.m1638()) {
                                c2552.m10590();
                            }
                            C2552 c25524 = (C2552) atomicReferenceFieldUpdater.get(c03492);
                            while (true) {
                                if (c03492.m1629()) {
                                    c3453.mo3530(new C2586(c03492.m1640()));
                                    break;
                                }
                                C3453 c34532 = c3453;
                                try {
                                    long andIncrement2 = atomicLongFieldUpdater.getAndIncrement(c03492);
                                    long j3 = AbstractC4752.f18070;
                                    long j4 = andIncrement2 / j3;
                                    int i2 = (int) (andIncrement2 % j3);
                                    if (c25524.f17947 != j4) {
                                        try {
                                            C2552 c2552M16532 = c03492.m1653(j4, c25524);
                                            if (c2552M16532 == null) {
                                                c3453 = c34532;
                                            } else {
                                                c25522 = c2552M16532;
                                            }
                                        } catch (Throwable th2) {
                                            th = th2;
                                            c3453 = c34532;
                                            c3453.m7877();
                                            throw th;
                                        }
                                    } else {
                                        c25522 = c25524;
                                    }
                                    C0349 c03493 = c03492;
                                    objM16262 = c03493.m1626(c25522, i2, andIncrement2, c34532);
                                    c03492 = c03493;
                                    C2552 c25525 = c25522;
                                    c3453 = c34532;
                                    if (objM16262 == AbstractC4752.f18076) {
                                        c3453.mo3792(c25525, i2);
                                        break;
                                    }
                                    if (objM16262 == AbstractC4752.f18079) {
                                        if (andIncrement2 < c03492.m1638()) {
                                            c25525.m10590();
                                        }
                                        c25524 = c25525;
                                    } else {
                                        if (objM16262 == AbstractC4752.f18074) {
                                            throw new IllegalStateException("unexpected");
                                        }
                                        c25525.m10590();
                                    }
                                } catch (Throwable th3) {
                                    th = th3;
                                    c3453 = c34532;
                                    th = th;
                                    c3453.m7877();
                                    throw th;
                                }
                            }
                        } else {
                            c2552.m10590();
                        }
                        c3453.mo2190(objM16262, null);
                    }
                    return c3453.m7875();
                } catch (Throwable th4) {
                    th = th4;
                }
            }
        }
        Throwable thM1640 = c0349.m1640();
        int i3 = AbstractC1152.f4931;
        throw thM1640;
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public static final void m1621(C0349 c0349, Object obj, C3453 c3453) throws DispatchException {
        c3453.mo3530(new C2586(c0349.m1634()));
    }

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public static void m1622(C0349 c0349) {
        AtomicLongFieldUpdater atomicLongFieldUpdater = f2123;
        if ((atomicLongFieldUpdater.addAndGet(c0349, 1L) & 4611686018427387904L) != 0) {
            while ((atomicLongFieldUpdater.get(c0349) & 4611686018427387904L) != 0) {
            }
        }
    }

    /* JADX WARN: Code restructure failed: missing block: B:101:0x0173, code lost:
    
        return r13;
     */
    /* JADX WARN: Removed duplicated region for block: B:131:? A[RETURN, SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:91:0x015e  */
    /* JADX WARN: Removed duplicated region for block: B:93:0x0161 A[RETURN] */
    /* JADX INFO: renamed from: ᵛˑﹳ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static Object m1623(C0349 c0349, Object obj, InterfaceC2643 interfaceC2643) throws DispatchException {
        C5063 c5063;
        Object objM7875;
        C5063 c50632;
        AtomicReferenceFieldUpdater atomicReferenceFieldUpdater = f2124;
        atomicReferenceFieldUpdater.getClass();
        C2552 c2552 = (C2552) AbstractC1929.f7689.getObjectVolatile(c0349, f2113);
        while (true) {
            AtomicLongFieldUpdater atomicLongFieldUpdater = f2120;
            long andIncrement = atomicLongFieldUpdater.getAndIncrement(c0349);
            long j = andIncrement & 1152921504606846975L;
            boolean zM1658 = c0349.m1658(false, andIncrement);
            int i = AbstractC4752.f18070;
            long j2 = i;
            long j3 = j / j2;
            int i2 = (int) (j % j2);
            long j4 = c2552.f17947;
            C5063 c50633 = C5063.f19112;
            EnumC0111 enumC0111 = EnumC0111.f1384;
            if (j4 != j3) {
                C2552 c2552M1632 = c0349.m1632(j3, c2552);
                if (c2552M1632 != null) {
                    c2552 = c2552M1632;
                } else if (zM1658) {
                    Object objM1646 = c0349.m1646(interfaceC2643, obj);
                    if (objM1646 == enumC0111) {
                        return objM1646;
                    }
                }
            }
            int iM1624 = m1624(c0349, c2552, i2, obj, j, null, zM1658);
            if (iM1624 == 0) {
                c2552.m10590();
                return c50633;
            }
            if (iM1624 == 1) {
                break;
            }
            if (iM1624 == 2) {
                if (!zM1658) {
                    return c50633;
                }
                c2552.m9850();
                Object objM16462 = c0349.m1646(interfaceC2643, obj);
                return objM16462 == enumC0111 ? objM16462 : c50633;
            }
            AtomicLongFieldUpdater atomicLongFieldUpdater2 = f2119;
            if (iM1624 == 3) {
                C3453 c3453 = ᵹˊᵫˋ.ˋˈ(ˌᵨʽʙ.ᵔᵖᵹᵫ(interfaceC2643));
                try {
                    int iM16242 = m1624(c0349, c2552, i2, obj, j, c3453, false);
                    if (iM16242 != 0) {
                        if (iM16242 == 1) {
                            c5063 = c50633;
                            c3453.mo3530(c5063);
                        } else if (iM16242 == 2) {
                            c5063 = c50633;
                            c3453.mo3792(c2552, i2 + i);
                        } else if (iM16242 == 4) {
                            c5063 = c50633;
                            if (j < atomicLongFieldUpdater2.get(c0349)) {
                                c2552.m10590();
                            }
                            m1621(c0349, obj, c3453);
                        } else {
                            if (iM16242 != 5) {
                                throw new IllegalStateException("unexpected");
                            }
                            c2552.m10590();
                            C2552 c25522 = (C2552) atomicReferenceFieldUpdater.get(c0349);
                            while (true) {
                                long andIncrement2 = atomicLongFieldUpdater.getAndIncrement(c0349);
                                long j5 = andIncrement2 & 1152921504606846975L;
                                boolean zM16582 = c0349.m1658(false, andIncrement2);
                                int i3 = AbstractC4752.f18070;
                                long j6 = i3;
                                AtomicLongFieldUpdater atomicLongFieldUpdater3 = atomicLongFieldUpdater;
                                long j7 = j5 / j6;
                                int i4 = (int) (j5 % j6);
                                c50632 = c50633;
                                if (c25522.f17947 != j7) {
                                    C2552 c2552M16322 = c0349.m1632(j7, c25522);
                                    if (c2552M16322 != null) {
                                        c25522 = c2552M16322;
                                    } else {
                                        if (zM16582) {
                                            break;
                                        }
                                        atomicLongFieldUpdater = atomicLongFieldUpdater3;
                                        c50633 = c50632;
                                    }
                                }
                                int iM16243 = m1624(c0349, c25522, i4, obj, j5, c3453, zM16582);
                                if (iM16243 == 0) {
                                    c5063 = c50632;
                                    c25522.m10590();
                                    break;
                                }
                                if (iM16243 == 1) {
                                    c5063 = c50632;
                                    c3453.mo3530(c5063);
                                    break;
                                }
                                if (iM16243 != 2) {
                                    if (iM16243 == 3) {
                                        throw new IllegalStateException("unexpected");
                                    }
                                    if (iM16243 != 4) {
                                        if (iM16243 == 5) {
                                            c25522.m10590();
                                        }
                                        atomicLongFieldUpdater = atomicLongFieldUpdater3;
                                        c50633 = c50632;
                                    } else if (j5 < atomicLongFieldUpdater2.get(c0349)) {
                                        c25522.m10590();
                                    }
                                } else if (zM16582) {
                                    c25522.m9850();
                                } else {
                                    c3453.mo3792(c25522, i4 + i3);
                                }
                            }
                            m1621(c0349, obj, c3453);
                            c5063 = c50632;
                        }
                        objM7875 = c3453.m7875();
                        if (objM7875 != enumC0111) {
                            objM7875 = c5063;
                        }
                        return objM7875 != enumC0111 ? objM7875 : c5063;
                    }
                    c5063 = c50633;
                    c2552.m10590();
                    c3453.mo3530(c5063);
                    objM7875 = c3453.m7875();
                    if (objM7875 != enumC0111) {
                    }
                    if (objM7875 != enumC0111) {
                    }
                } catch (Throwable th) {
                    c3453.m7877();
                    throw th;
                }
            } else if (iM1624 == 4) {
                if (j < atomicLongFieldUpdater2.get(c0349)) {
                    c2552.m10590();
                }
                Object objM16463 = c0349.m1646(interfaceC2643, obj);
                if (objM16463 == enumC0111) {
                    return objM16463;
                }
            } else if (iM1624 == 5) {
                c2552.m10590();
            }
        }
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public static final int m1624(C0349 c0349, C2552 c2552, int i, Object obj, long j, Object obj2, boolean z) {
        c2552.m6271(i, obj);
        if (z) {
            return c0349.m1630(c2552, i, obj, j, obj2, z);
        }
        Object objM6275 = c2552.m6275(i);
        if (objM6275 == null) {
            if (c0349.m1648(j)) {
                if (c2552.m6274(null, i, AbstractC4752.f18086)) {
                    return 1;
                }
            } else {
                if (obj2 == null) {
                    return 3;
                }
                if (c2552.m6274(null, i, obj2)) {
                    return 2;
                }
            }
        } else if (objM6275 instanceof InterfaceC2973) {
            c2552.m6271(i, null);
            if (c0349.m1656(objM6275, obj)) {
                c2552.m6273(i, AbstractC4752.f18087);
                return 0;
            }
            C1735 c1735 = AbstractC4752.f18085;
            if (c2552.f9862.getAndSet((i * 2) + 1, c1735) == c1735) {
                return 5;
            }
            c2552.m6272(i, true);
            return 5;
        }
        return c0349.m1630(c2552, i, obj, j, obj2, z);
    }

    @Override // defpackage.InterfaceC0714
    public final C4475 iterator() {
        return new C4475(this);
    }

    /* JADX WARN: Code restructure failed: missing block: B:87:0x01c9, code lost:
    
        r15 = r8;
        r3 = (defpackage.C2552) r3.m10591();
     */
    /* JADX WARN: Code restructure failed: missing block: B:88:0x01d1, code lost:
    
        if (r3 != null) goto L94;
     */
    /* JADX WARN: Multi-variable type inference failed */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final String toString() {
        int i;
        String string;
        StringBuilder sb = new StringBuilder();
        int i2 = (int) (f2120.get(this) >> 60);
        if (i2 == 2) {
            sb.append("closed,");
        } else if (i2 == 3) {
            sb.append("cancelled,");
        }
        sb.append("capacity=" + this.f2126 + ',');
        sb.append("data=[");
        f2115.getClass();
        Unsafe unsafe = AbstractC1929.f7689;
        int i3 = 0;
        f2124.getClass();
        Object objectVolatile = unsafe.getObjectVolatile(this, f2113);
        int i4 = 1;
        f2117.getClass();
        List listM3123 = AbstractC0892.m3123(unsafe.getObjectVolatile(this, f2114), objectVolatile, unsafe.getObjectVolatile(this, f2121));
        ArrayList arrayList = new ArrayList();
        for (Object obj : listM3123) {
            if (((C2552) obj) != AbstractC4752.f18083) {
                arrayList.add(obj);
            }
        }
        Iterator it = arrayList.iterator();
        if (!it.hasNext()) {
            C4468.m9518();
            return null;
        }
        Object next = it.next();
        if (it.hasNext()) {
            long j = ((C2552) next).f17947;
            do {
                Object next2 = it.next();
                long j2 = ((C2552) next2).f17947;
                if (j > j2) {
                    next = next2;
                    j = j2;
                }
            } while (it.hasNext());
        }
        C2552 c2552 = (C2552) next;
        long j3 = f2119.get(this);
        long jM1638 = m1638();
        loop2: while (true) {
            int i5 = AbstractC4752.f18070;
            int i6 = i3;
            while (true) {
                if (i6 >= i5) {
                    break;
                }
                i = i4;
                long j4 = (c2552.f17947 * ((long) AbstractC4752.f18070)) + ((long) i6);
                if (j4 >= jM1638 && j4 >= j3) {
                    break loop2;
                }
                Object objM6275 = c2552.m6275(i6);
                Object obj2 = c2552.f9862.get(i6 * 2);
                if (objM6275 instanceof InterfaceC0573) {
                    string = (jM1638 > j4 || j4 >= j3) ? (j3 > j4 || j4 >= jM1638) ? "cont" : "send" : "receive";
                } else if (objM6275 instanceof C4600) {
                    string = (jM1638 > j4 || j4 >= j3) ? (j3 > j4 || j4 >= jM1638) ? "select" : "onSend" : "onReceive";
                } else if (objM6275 instanceof C1280) {
                    string = "receiveCatching";
                } else if (objM6275 instanceof C5298) {
                    string = "EB(" + objM6275 + ')';
                } else if (ᵥˈᵛ.ˊᵫᵗ(objM6275, AbstractC4752.f18088) || ᵥˈᵛ.ˊᵫᵗ(objM6275, AbstractC4752.f18084)) {
                    string = "resuming_sender";
                } else if (objM6275 == null || objM6275.equals(AbstractC4752.f18078) || objM6275.equals(AbstractC4752.f18087) || objM6275.equals(AbstractC4752.f18073) || objM6275.equals(AbstractC4752.f18085) || objM6275.equals(AbstractC4752.f18082) || objM6275.equals(AbstractC4752.f18080)) {
                    i6++;
                    i4 = i;
                } else {
                    string = objM6275.toString();
                }
                if (obj2 != null) {
                    sb.append("(" + string + ',' + obj2 + "),");
                } else {
                    sb.append(string + ',');
                }
                i6++;
                i4 = i;
            }
            i4 = i;
            i3 = 0;
        }
        if (AbstractC3801.m8466(sb) == ',') {
            sb.deleteCharAt(sb.length() - i);
        }
        sb.append("]");
        return sb.toString();
    }

    @Override // defpackage.InterfaceC0714
    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final C1709 mo1625() {
        AbstractC0702.m2522(3, C2245.f8899);
        AbstractC0702.m2522(3, C5169.f19466);
        return new C1709(this, (AbstractC4049) null);
    }

    /* JADX INFO: renamed from: ʽᵡᵢᵾ, reason: contains not printable characters */
    public final Object m1626(C2552 c2552, int i, long j, Object obj) {
        Object objM6275 = c2552.m6275(i);
        AtomicReferenceArray atomicReferenceArray = c2552.f9862;
        AtomicLongFieldUpdater atomicLongFieldUpdater = f2120;
        if (objM6275 == null) {
            if (j >= (atomicLongFieldUpdater.get(this) & 1152921504606846975L)) {
                if (obj == null) {
                    return AbstractC4752.f18074;
                }
                if (c2552.m6274(objM6275, i, obj)) {
                    m1650();
                    return AbstractC4752.f18076;
                }
            }
        } else if (objM6275 == AbstractC4752.f18086 && c2552.m6274(objM6275, i, AbstractC4752.f18087)) {
            m1650();
            Object obj2 = atomicReferenceArray.get(i * 2);
            c2552.m6271(i, null);
            return obj2;
        }
        while (true) {
            Object objM62752 = c2552.m6275(i);
            if (objM62752 == null || objM62752 == AbstractC4752.f18078) {
                if (j < (atomicLongFieldUpdater.get(this) & 1152921504606846975L)) {
                    if (c2552.m6274(objM62752, i, AbstractC4752.f18073)) {
                        m1650();
                        return AbstractC4752.f18079;
                    }
                } else {
                    if (obj == null) {
                        return AbstractC4752.f18074;
                    }
                    if (c2552.m6274(objM62752, i, obj)) {
                        m1650();
                        return AbstractC4752.f18076;
                    }
                }
            } else {
                if (objM62752 != AbstractC4752.f18086) {
                    C1735 c1735 = AbstractC4752.f18082;
                    if (objM62752 != c1735 && objM62752 != AbstractC4752.f18073) {
                        if (objM62752 == AbstractC4752.f18080) {
                            m1650();
                            return AbstractC4752.f18079;
                        }
                        if (objM62752 != AbstractC4752.f18084 && c2552.m6274(objM62752, i, AbstractC4752.f18088)) {
                            boolean z = objM62752 instanceof C5298;
                            if (z) {
                                objM62752 = ((C5298) objM62752).f20015;
                            }
                            if (m1641(objM62752, c2552, i)) {
                                c2552.m6273(i, AbstractC4752.f18087);
                                m1650();
                                Object obj3 = atomicReferenceArray.get(i * 2);
                                c2552.m6271(i, null);
                                return obj3;
                            }
                            c2552.m6273(i, c1735);
                            c2552.m9850();
                            if (z) {
                                m1650();
                            }
                            return AbstractC4752.f18079;
                        }
                    }
                    return AbstractC4752.f18079;
                }
                if (c2552.m6274(objM62752, i, AbstractC4752.f18087)) {
                    m1650();
                    Object obj4 = atomicReferenceArray.get(i * 2);
                    c2552.m6271(i, null);
                    return obj4;
                }
            }
        }
    }

    /* JADX WARN: Code restructure failed: missing block: B:30:0x0063, code lost:
    
        if (r5.m9853() == false) goto L43;
     */
    /* JADX WARN: Code restructure failed: missing block: B:31:0x0065, code lost:
    
        r5.m10592();
     */
    /* JADX INFO: renamed from: ʿٴˇ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m1627(long j, C2552 c2552) {
        C0349 c0349;
        C2552 c25522;
        C2552 c25523;
        while (c2552.f17947 < j && (c25523 = (C2552) c2552.m10591()) != null) {
            c2552 = c25523;
        }
        while (true) {
            C2552 c25524 = c2552;
            while (c25524.mo9852() && (c25522 = (C2552) c25524.m10591()) != null) {
                c25524 = c25522;
            }
            while (true) {
                f2117.getClass();
                Unsafe unsafe = AbstractC1929.f7689;
                long j2 = f2121;
                AbstractC4709 abstractC4709 = (AbstractC4709) unsafe.getObjectVolatile(this, j2);
                if (abstractC4709.f17947 >= c25524.f17947) {
                    return;
                }
                if (!c25524.m9851()) {
                    break;
                }
                while (true) {
                    Unsafe unsafe2 = AbstractC1929.f7689;
                    c0349 = this;
                    if (unsafe2.compareAndSwapObject(c0349, f2121, abstractC4709, c25524)) {
                        if (abstractC4709.m9853()) {
                            abstractC4709.m10592();
                            return;
                        }
                        return;
                    } else if (unsafe2.getObjectVolatile(c0349, j2) != abstractC4709) {
                        break;
                    } else {
                        this = c0349;
                    }
                }
                this = c0349;
            }
            c2552 = c25524;
        }
    }

    /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
    /* JADX INFO: renamed from: ˀᵭ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object m1628(C2552 c2552, int i, long j, AbstractC3500 abstractC3500) throws DispatchException {
        C1478 c1478;
        C5191 c5191;
        C2552 c25522;
        if (abstractC3500 instanceof C1478) {
            c1478 = (C1478) abstractC3500;
            int i2 = c1478.f6001;
            if ((i2 & Integer.MIN_VALUE) != 0) {
                c1478.f6001 = i2 - Integer.MIN_VALUE;
            } else {
                c1478 = new C1478(this, abstractC3500);
            }
        }
        Object objM7875 = c1478.f5999;
        int i3 = c1478.f6001;
        if (i3 == 0) {
            ᵟˌᵫ.ˊˌˊ(objM7875);
            c1478.f6001 = 1;
            C3453 c3453 = ᵹˊᵫˋ.ˋˈ(ˌᵨʽʙ.ᵔᵖᵹᵫ(c1478));
            try {
                C1280 c1280 = new C1280(c3453);
                Object objM1626 = m1626(c2552, i, j, c1280);
                if (objM1626 == AbstractC4752.f18076) {
                    c1280.mo3792(c2552, i);
                } else {
                    if (objM1626 == AbstractC4752.f18079) {
                        if (j < m1638()) {
                            c2552.m10590();
                        }
                        C2552 c25523 = (C2552) f2115.get(this);
                        while (true) {
                            if (m1629()) {
                                c3453.mo3530(new C5191(new C2502(m1631())));
                                break;
                            }
                            long andIncrement = f2119.getAndIncrement(this);
                            long j2 = AbstractC4752.f18070;
                            long j3 = andIncrement / j2;
                            int i4 = (int) (andIncrement % j2);
                            if (c25523.f17947 != j3) {
                                C2552 c2552M1653 = m1653(j3, c25523);
                                if (c2552M1653 != null) {
                                    c25522 = c2552M1653;
                                }
                            } else {
                                c25522 = c25523;
                            }
                            Object objM16262 = m1626(c25522, i4, andIncrement, c1280);
                            C2552 c25524 = c25522;
                            if (objM16262 == AbstractC4752.f18076) {
                                c1280.mo3792(c25524, i4);
                                break;
                            }
                            if (objM16262 == AbstractC4752.f18079) {
                                if (andIncrement < m1638()) {
                                    c25524.m10590();
                                }
                                c25523 = c25524;
                            } else {
                                if (objM16262 == AbstractC4752.f18074) {
                                    throw new IllegalStateException("unexpected");
                                }
                                c25524.m10590();
                                c5191 = new C5191(objM16262);
                            }
                        }
                    } else {
                        c2552.m10590();
                        c5191 = new C5191(objM1626);
                    }
                    c3453.mo2190(c5191, null);
                }
                objM7875 = c3453.m7875();
                EnumC0111 enumC0111 = EnumC0111.f1384;
                if (objM7875 == enumC0111) {
                    return enumC0111;
                }
            } catch (Throwable th) {
                c3453.m7877();
                throw th;
            }
        } else {
            if (i3 != 1) {
                ᵕᵩʽᵲ.ᵪᵹᵥᵻ("call to 'resume' before 'invoke' with coroutine");
                return null;
            }
            ᵟˌᵫ.ˊˌˊ(objM7875);
        }
        return ((C5191) objM7875).f19535;
    }

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public final boolean m1629() {
        return m1658(true, f2120.get(this));
    }

    /* JADX INFO: renamed from: ˈⁱᵡ, reason: contains not printable characters */
    public final int m1630(C2552 c2552, int i, Object obj, long j, Object obj2, boolean z) throws DispatchException {
        while (true) {
            Object objM6275 = c2552.m6275(i);
            if (objM6275 == null) {
                if (!m1648(j) || z) {
                    if (z) {
                        if (c2552.m6274(null, i, AbstractC4752.f18082)) {
                            c2552.m9850();
                            return 4;
                        }
                    } else {
                        if (obj2 == null) {
                            return 3;
                        }
                        if (c2552.m6274(null, i, obj2)) {
                            return 2;
                        }
                    }
                } else if (c2552.m6274(null, i, AbstractC4752.f18086)) {
                    break;
                }
            } else {
                if (objM6275 != AbstractC4752.f18078) {
                    C1735 c1735 = AbstractC4752.f18085;
                    if (objM6275 == c1735) {
                        c2552.m6271(i, null);
                        return 5;
                    }
                    if (objM6275 == AbstractC4752.f18073) {
                        c2552.m6271(i, null);
                        return 5;
                    }
                    if (objM6275 == AbstractC4752.f18080) {
                        c2552.m6271(i, null);
                        m1639();
                        return 4;
                    }
                    c2552.m6271(i, null);
                    if (objM6275 instanceof C5298) {
                        objM6275 = ((C5298) objM6275).f20015;
                    }
                    if (m1656(objM6275, obj)) {
                        c2552.m6273(i, AbstractC4752.f18087);
                        return 0;
                    }
                    if (c2552.f9862.getAndSet((i * 2) + 1, c1735) != c1735) {
                        c2552.m6272(i, true);
                    }
                    return 5;
                }
                if (c2552.m6274(objM6275, i, AbstractC4752.f18086)) {
                    break;
                }
            }
        }
        return 1;
    }

    /* JADX INFO: renamed from: ˉᵲ, reason: contains not printable characters */
    public final Throwable m1631() {
        f2125.getClass();
        return (Throwable) AbstractC1929.f7689.getObjectVolatile(this, f2112);
    }

    /* JADX INFO: renamed from: ˊᵙᵾᵲ, reason: contains not printable characters */
    public final C2552 m1632(long j, C2552 c2552) throws DispatchException {
        Object objM9402;
        long j2;
        long j3;
        Unsafe unsafe;
        C2552 c25522 = AbstractC4752.f18083;
        C4915 c4915 = C4915.f18706;
        loop0: while (true) {
            objM9402 = AbstractC4390.m9402(c2552, j, c4915);
            if (!ᵻᵕᵭ.ᵯᵷʽ(objM9402)) {
                AbstractC4709 abstractC4709 = ᵻᵕᵭ.ᵔᵖᵹᵫ(objM9402);
                while (true) {
                    f2124.getClass();
                    Unsafe unsafe2 = AbstractC1929.f7689;
                    long j4 = f2113;
                    AbstractC4709 abstractC47092 = (AbstractC4709) unsafe2.getObjectVolatile(this, j4);
                    if (abstractC47092.f17947 >= abstractC4709.f17947) {
                        break loop0;
                    }
                    if (!abstractC4709.m9851()) {
                        break;
                    }
                    do {
                        unsafe = AbstractC1929.f7689;
                        if (unsafe.compareAndSwapObject(this, f2113, abstractC47092, abstractC4709)) {
                            if (abstractC47092.m9853()) {
                                abstractC47092.m10592();
                            }
                        }
                    } while (unsafe.getObjectVolatile(this, j4) == abstractC47092);
                    if (abstractC4709.m9853()) {
                        abstractC4709.m10592();
                    }
                }
            } else {
                break;
            }
        }
        boolean z = ᵻᵕᵭ.ᵯᵷʽ(objM9402);
        AtomicLongFieldUpdater atomicLongFieldUpdater = f2119;
        if (z) {
            m1639();
            if (c2552.f17947 * ((long) AbstractC4752.f18070) < atomicLongFieldUpdater.get(this)) {
                c2552.m10590();
                return null;
            }
        } else {
            C2552 c25523 = (C2552) ᵻᵕᵭ.ᵔᵖᵹᵫ(objM9402);
            long j5 = c25523.f17947;
            if (j5 <= j) {
                return c25523;
            }
            long j6 = j5 * ((long) AbstractC4752.f18070);
            do {
                j2 = f2120.get(this);
                j3 = 1152921504606846975L & j2;
                if (j3 >= j6) {
                    break;
                }
            } while (!f2120.compareAndSet(this, j2, j3 + (((long) ((int) (j2 >> 60))) << 60)));
            if (j5 * ((long) AbstractC4752.f18070) < atomicLongFieldUpdater.get(this)) {
                c25523.m10590();
            }
        }
        return null;
    }

    /* JADX INFO: renamed from: ˊᵡᵗʨ, reason: contains not printable characters */
    public final void m1633(InterfaceC2973 interfaceC2973, boolean z) throws DispatchException {
        if (interfaceC2973 instanceof InterfaceC0573) {
            ((InterfaceC2643) interfaceC2973).mo3530(new C2586(z ? m1640() : m1634()));
            return;
        }
        if (interfaceC2973 instanceof C1280) {
            ((C1280) interfaceC2973).f5348.mo3530(new C5191(new C2502(m1631())));
            return;
        }
        if (!(interfaceC2973 instanceof C4475)) {
            if (interfaceC2973 instanceof C4600) {
                ((C4600) interfaceC2973).m9695(this, AbstractC4752.f18080);
                return;
            } else {
                C3226.m7364(interfaceC2973, "Unexpected waiter: ");
                return;
            }
        }
        C4475 c4475 = (C4475) interfaceC2973;
        C3453 c3453 = c4475.f17077;
        c4475.f17077 = null;
        c4475.f17075 = AbstractC4752.f18080;
        Throwable thM1631 = c4475.f17076.m1631();
        if (thM1631 == null) {
            c3453.mo3530(Boolean.FALSE);
        } else {
            c3453.mo3530(new C2586(thM1631));
        }
    }

    /* JADX INFO: renamed from: ˊᵨᵧ, reason: contains not printable characters */
    public final Throwable m1634() {
        Throwable thM1631 = m1631();
        return thM1631 == null ? new ClosedSendChannelException("Channel was closed") : thM1631;
    }

    @Override // defpackage.InterfaceC0714
    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public final Object mo1635() {
        C2552 c2552;
        AtomicLongFieldUpdater atomicLongFieldUpdater = f2119;
        long j = atomicLongFieldUpdater.get(this);
        long j2 = f2120.get(this);
        if (m1658(true, j2)) {
            return new C2502(m1631());
        }
        long j3 = j2 & 1152921504606846975L;
        C0566 c0566 = C5191.f19534;
        if (j >= j3) {
            return c0566;
        }
        Object obj = AbstractC4752.f18085;
        f2115.getClass();
        C2552 c25522 = (C2552) AbstractC1929.f7689.getObjectVolatile(this, f2114);
        while (!this.m1629()) {
            long andIncrement = atomicLongFieldUpdater.getAndIncrement(this);
            long j4 = AbstractC4752.f18070;
            long j5 = andIncrement / j4;
            int i = (int) (andIncrement % j4);
            if (c25522.f17947 != j5) {
                C2552 c2552M1653 = this.m1653(j5, c25522);
                if (c2552M1653 == null) {
                    continue;
                } else {
                    c2552 = c2552M1653;
                }
            } else {
                c2552 = c25522;
            }
            C0349 c0349 = this;
            Object objM1626 = c0349.m1626(c2552, i, andIncrement, obj);
            c25522 = c2552;
            if (objM1626 == AbstractC4752.f18076) {
                InterfaceC2973 interfaceC2973 = obj instanceof InterfaceC2973 ? (InterfaceC2973) obj : null;
                if (interfaceC2973 != null) {
                    interfaceC2973.mo3792(c25522, i);
                }
                c0349.m1647(andIncrement);
                c25522.m9850();
                return c0566;
            }
            if (objM1626 != AbstractC4752.f18079) {
                if (objM1626 != AbstractC4752.f18074) {
                    c25522.m10590();
                    return objM1626;
                }
                ᵕᵩʽᵲ.ᵪᵹᵥᵻ("unexpected");
                return null;
            }
            if (andIncrement < c0349.m1638()) {
                c25522.m10590();
            }
            this = c0349;
        }
        return new C2502(this.m1631());
    }

    /* JADX INFO: renamed from: ˊᵾʽʼ, reason: contains not printable characters */
    public final void m1636(C4600 c4600) {
        C2552 c2552;
        C0349 c0349;
        C4600 c46002;
        int i;
        f2115.getClass();
        C2552 c25522 = (C2552) AbstractC1929.f7689.getObjectVolatile(this, f2114);
        while (!this.m1629()) {
            long andIncrement = f2119.getAndIncrement(this);
            long j = AbstractC4752.f18070;
            long j2 = andIncrement / j;
            int i2 = (int) (andIncrement % j);
            if (c25522.f17947 != j2) {
                C2552 c2552M1653 = this.m1653(j2, c25522);
                if (c2552M1653 == null) {
                    continue;
                } else {
                    c2552 = c2552M1653;
                    c46002 = c4600;
                    i = i2;
                    c0349 = this;
                }
            } else {
                c2552 = c25522;
                c0349 = this;
                c46002 = c4600;
                i = i2;
            }
            Object objM1626 = c0349.m1626(c2552, i, andIncrement, c46002);
            c25522 = c2552;
            if (objM1626 == AbstractC4752.f18076) {
                C4600 c46003 = c46002 != null ? c46002 : null;
                if (c46003 != null) {
                    c46003.f17506 = c25522;
                    c46003.f17508 = i;
                    return;
                }
                return;
            }
            if (objM1626 != AbstractC4752.f18079) {
                if (objM1626 == AbstractC4752.f18074) {
                    ᵕᵩʽᵲ.ᵪᵹᵥᵻ("unexpected");
                    return;
                } else {
                    c25522.m10590();
                    c46002.f17509 = objM1626;
                    return;
                }
            }
            if (andIncrement < c0349.m1638()) {
                c25522.m10590();
            }
            this = c0349;
            c4600 = c46002;
        }
        c4600.f17509 = AbstractC4752.f18080;
    }

    /* JADX WARN: Failed to analyze thrown exceptions
    java.util.ConcurrentModificationException
    	at java.base/java.util.ArrayList$Itr.checkForComodification(ArrayList.java:1095)
    	at java.base/java.util.ArrayList$Itr.next(ArrayList.java:1049)
    	at jadx.core.dex.visitors.MethodThrowsVisitor.processInstructions(MethodThrowsVisitor.java:130)
    	at jadx.core.dex.visitors.MethodThrowsVisitor.visit(MethodThrowsVisitor.java:68)
    	at jadx.core.dex.visitors.MethodThrowsVisitor.checkInsn(MethodThrowsVisitor.java:178)
    	at jadx.core.dex.visitors.MethodThrowsVisitor.processInstructions(MethodThrowsVisitor.java:131)
    	at jadx.core.dex.visitors.MethodThrowsVisitor.visit(MethodThrowsVisitor.java:68)
    	at jadx.core.dex.visitors.MethodThrowsVisitor.checkInsn(MethodThrowsVisitor.java:178)
    	at jadx.core.dex.visitors.MethodThrowsVisitor.processInstructions(MethodThrowsVisitor.java:131)
    	at jadx.core.dex.visitors.MethodThrowsVisitor.visit(MethodThrowsVisitor.java:68)
    	at jadx.core.dex.visitors.MethodThrowsVisitor.checkInsn(MethodThrowsVisitor.java:178)
    	at jadx.core.dex.visitors.MethodThrowsVisitor.processInstructions(MethodThrowsVisitor.java:131)
    	at jadx.core.dex.visitors.MethodThrowsVisitor.visit(MethodThrowsVisitor.java:68)
    	at jadx.core.dex.visitors.MethodThrowsVisitor.checkInsn(MethodThrowsVisitor.java:178)
    	at jadx.core.dex.visitors.MethodThrowsVisitor.processInstructions(MethodThrowsVisitor.java:131)
    	at jadx.core.dex.visitors.MethodThrowsVisitor.visit(MethodThrowsVisitor.java:68)
    	at jadx.core.dex.visitors.MethodThrowsVisitor.checkInsn(MethodThrowsVisitor.java:178)
    	at jadx.core.dex.visitors.MethodThrowsVisitor.processInstructions(MethodThrowsVisitor.java:131)
    	at jadx.core.dex.visitors.MethodThrowsVisitor.visit(MethodThrowsVisitor.java:68)
     */
    /* JADX INFO: renamed from: ˋˈ, reason: contains not printable characters */
    public final void m1637(long j) {
        f2115.getClass();
        C2552 c2552 = (C2552) AbstractC1929.f7689.getObjectVolatile(this, f2114);
        while (true) {
            AtomicLongFieldUpdater atomicLongFieldUpdater = f2119;
            long j2 = atomicLongFieldUpdater.get(this);
            if (j < Math.max(((long) this.f2126) + j2, f2122.get(this))) {
                return;
            }
            C0349 c0349 = this;
            if (atomicLongFieldUpdater.compareAndSet(c0349, j2, 1 + j2)) {
                long j3 = AbstractC4752.f18070;
                long j4 = j2 / j3;
                int i = (int) (j2 % j3);
                if (c2552.f17947 != j4) {
                    C2552 c2552M1653 = c0349.m1653(j4, c2552);
                    if (c2552M1653 != null) {
                        c2552 = c2552M1653;
                    }
                }
                C2552 c25522 = c2552;
                if (c0349.m1626(c25522, i, j2, null) != AbstractC4752.f18079 || j2 < c0349.m1638()) {
                    c25522.m10590();
                }
                this = c0349;
                c2552 = c25522;
            }
            this = c0349;
        }
    }

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final long m1638() {
        return f2120.get(this) & 1152921504606846975L;
    }

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public final boolean m1639() throws DispatchException {
        return m1658(false, f2120.get(this));
    }

    /* JADX INFO: renamed from: ˏːˆ, reason: contains not printable characters */
    public final Throwable m1640() {
        Throwable thM1631 = m1631();
        return thM1631 == null ? new ClosedReceiveChannelException("Channel was closed") : thM1631;
    }

    /* JADX INFO: renamed from: ˑʢ, reason: contains not printable characters */
    public final boolean m1641(Object obj, C2552 c2552, int i) {
        char c;
        boolean z = obj instanceof InterfaceC0573;
        C5063 c5063 = C5063.f19112;
        if (z) {
            return AbstractC4752.m9933((InterfaceC0573) obj, c5063, null);
        }
        if (!(obj instanceof C4600)) {
            C3226.m7364(obj, "Unexpected waiter: ");
            return false;
        }
        int iM9695 = ((C4600) obj).m9695(this, c5063);
        if (iM9695 == 0) {
            c = 1;
        } else if (iM9695 != 1) {
            c = 3;
            if (iM9695 != 2) {
                if (iM9695 != 3) {
                    ᵷᵝˎ.ᵵᵽ(iM9695, "Unexpected internal result: ");
                    return false;
                }
                c = 4;
            }
        } else {
            c = 2;
        }
        if (c == 2) {
            c2552.m6271(i, null);
        }
        return c == 1;
    }

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public final boolean m1642() {
        long j = f2122.get(this);
        return j == 0 || j == Long.MAX_VALUE;
    }

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public final boolean m1643() {
        while (true) {
            f2115.getClass();
            Unsafe unsafe = AbstractC1929.f7689;
            long j = f2114;
            C2552 c2552M1653 = (C2552) unsafe.getObjectVolatile(this, j);
            AtomicLongFieldUpdater atomicLongFieldUpdater = f2119;
            long j2 = atomicLongFieldUpdater.get(this);
            if (m1638() <= j2) {
                return false;
            }
            long j3 = AbstractC4752.f18070;
            long j4 = j2 / j3;
            if (c2552M1653.f17947 == j4 || (c2552M1653 = m1653(j4, c2552M1653)) != null) {
                c2552M1653.m10590();
                int i = (int) (j2 % j3);
                while (true) {
                    Object objM6275 = c2552M1653.m6275(i);
                    if (objM6275 == null || objM6275 == AbstractC4752.f18078) {
                        if (c2552M1653.m6274(objM6275, i, AbstractC4752.f18073)) {
                            m1650();
                            break;
                        }
                    } else {
                        if (objM6275 == AbstractC4752.f18086) {
                            return true;
                        }
                        if (objM6275 != AbstractC4752.f18082 && objM6275 != AbstractC4752.f18080 && objM6275 != AbstractC4752.f18087 && objM6275 != AbstractC4752.f18073) {
                            if (objM6275 == AbstractC4752.f18084) {
                                return true;
                            }
                            if (objM6275 != AbstractC4752.f18088 && j2 == atomicLongFieldUpdater.get(this)) {
                                return true;
                            }
                        }
                    }
                }
                f2119.compareAndSet(this, j2, j2 + 1);
            } else if (((C2552) unsafe.getObjectVolatile(this, j)).f17947 < j4) {
                return false;
            }
        }
    }

    /* JADX WARN: Code restructure failed: missing block: B:23:0x0046, code lost:
    
        r1 = (defpackage.C2552) r1.m10593();
     */
    /* JADX INFO: renamed from: ᵝᵶ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final C2552 m1644(long j) throws DispatchException {
        long j2;
        C2552 c2552M1659 = m1659();
        if (mo1660()) {
            C2552 c2552 = c2552M1659;
            loop0: do {
                int i = AbstractC4752.f18070 - 1;
                while (true) {
                    if (-1 >= i) {
                        break;
                    }
                    j2 = (c2552.f17947 * ((long) AbstractC4752.f18070)) + ((long) i);
                    if (j2 < f2119.get(this)) {
                        break loop0;
                    }
                    while (true) {
                        Object objM6275 = c2552.m6275(i);
                        if (objM6275 != null && objM6275 != AbstractC4752.f18078) {
                            if (objM6275 == AbstractC4752.f18086) {
                                break loop0;
                            }
                        } else {
                            if (c2552.m6274(objM6275, i, AbstractC4752.f18080)) {
                                c2552.m9850();
                                break;
                            }
                        }
                    }
                    i--;
                }
            } while (c2552 != null);
            j2 = -1;
            if (j2 != -1) {
                m1637(j2);
            }
        }
        Object obj = null;
        loop3: for (C2552 c25522 = c2552M1659; c25522 != null; c25522 = (C2552) c25522.m10593()) {
            for (int i2 = AbstractC4752.f18070 - 1; -1 < i2; i2--) {
                if ((c25522.f17947 * ((long) AbstractC4752.f18070)) + ((long) i2) < j) {
                    break loop3;
                }
                while (true) {
                    Object objM62752 = c25522.m6275(i2);
                    if (objM62752 != null && objM62752 != AbstractC4752.f18078) {
                        if (!(objM62752 instanceof C5298)) {
                            if (!(objM62752 instanceof InterfaceC2973)) {
                                break;
                            }
                            if (c25522.m6274(objM62752, i2, AbstractC4752.f18080)) {
                                obj = ᵫﾞˌ.ˏːˆ(obj, objM62752);
                                c25522.m6272(i2, true);
                                break;
                            }
                        } else {
                            if (c25522.m6274(objM62752, i2, AbstractC4752.f18080)) {
                                obj = ᵫﾞˌ.ˏːˆ(obj, ((C5298) objM62752).f20015);
                                c25522.m6272(i2, true);
                                break;
                            }
                        }
                    } else {
                        if (c25522.m6274(objM62752, i2, AbstractC4752.f18080)) {
                            c25522.m9850();
                            break;
                        }
                    }
                }
            }
        }
        if (obj != null) {
            if (!(obj instanceof ArrayList)) {
                m1633((InterfaceC2973) obj, true);
                return c2552M1659;
            }
            ArrayList arrayList = (ArrayList) obj;
            for (int size = arrayList.size() - 1; -1 < size; size--) {
                m1633((InterfaceC2973) arrayList.get(size), true);
            }
        }
        return c2552M1659;
    }

    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    public final C2552 m1645(long j, C2552 c2552, long j2) {
        Object objM9402;
        Unsafe unsafe;
        C2552 c25522 = AbstractC4752.f18083;
        C4915 c4915 = C4915.f18706;
        loop0: while (true) {
            objM9402 = AbstractC4390.m9402(c2552, j, c4915);
            if (!ᵻᵕᵭ.ᵯᵷʽ(objM9402)) {
                AbstractC4709 abstractC4709 = ᵻᵕᵭ.ᵔᵖᵹᵫ(objM9402);
                while (true) {
                    f2117.getClass();
                    Unsafe unsafe2 = AbstractC1929.f7689;
                    long j3 = f2121;
                    AbstractC4709 abstractC47092 = (AbstractC4709) unsafe2.getObjectVolatile(this, j3);
                    if (abstractC47092.f17947 >= abstractC4709.f17947) {
                        break loop0;
                    }
                    if (!abstractC4709.m9851()) {
                        break;
                    }
                    do {
                        unsafe = AbstractC1929.f7689;
                        if (unsafe.compareAndSwapObject(this, f2121, abstractC47092, abstractC4709)) {
                            if (abstractC47092.m9853()) {
                                abstractC47092.m10592();
                            }
                        }
                    } while (unsafe.getObjectVolatile(this, j3) == abstractC47092);
                    if (abstractC4709.m9853()) {
                        abstractC4709.m10592();
                    }
                }
            } else {
                break;
            }
        }
        if (ᵻᵕᵭ.ᵯᵷʽ(objM9402)) {
            m1639();
            m1627(j, c2552);
            m1622(this);
            return null;
        }
        C2552 c25523 = (C2552) ᵻᵕᵭ.ᵔᵖᵹᵫ(objM9402);
        long j4 = c25523.f17947;
        if (j4 <= j) {
            return c25523;
        }
        long j5 = AbstractC4752.f18070;
        if (!f2122.compareAndSet(this, j2 + 1, j4 * j5)) {
            m1622(this);
            return null;
        }
        AtomicLongFieldUpdater atomicLongFieldUpdater = f2123;
        if ((atomicLongFieldUpdater.addAndGet(this, (j4 * j5) - j2) & 4611686018427387904L) != 0) {
            while ((atomicLongFieldUpdater.get(this) & 4611686018427387904L) != 0) {
            }
        }
        return null;
    }

    /* JADX INFO: renamed from: ᵠˏˏ, reason: contains not printable characters */
    public final Object m1646(InterfaceC2643 interfaceC2643, Object obj) throws DispatchException {
        C3453 c3453 = new C3453(1, ˌᵨʽʙ.ᵔᵖᵹᵫ(interfaceC2643));
        c3453.m7878();
        c3453.mo3530(new C2586(m1634()));
        Object objM7875 = c3453.m7875();
        return objM7875 == EnumC0111.f1384 ? objM7875 : C5063.f19112;
    }

    /* JADX INFO: renamed from: ᵨˈʼﹶ, reason: contains not printable characters */
    public final void m1647(long j) {
        AtomicLongFieldUpdater atomicLongFieldUpdater;
        C0349 c0349 = this;
        if (c0349.m1642()) {
            return;
        }
        while (true) {
            atomicLongFieldUpdater = f2122;
            if (atomicLongFieldUpdater.get(c0349) > j) {
                break;
            } else {
                c0349 = this;
            }
        }
        int i = AbstractC4752.f18075;
        int i2 = 0;
        while (true) {
            AtomicLongFieldUpdater atomicLongFieldUpdater2 = f2123;
            if (i2 < i) {
                long j2 = atomicLongFieldUpdater.get(c0349);
                if (j2 == (4611686018427387903L & atomicLongFieldUpdater2.get(c0349)) && j2 == atomicLongFieldUpdater.get(c0349)) {
                    return;
                } else {
                    i2++;
                }
            } else {
                while (true) {
                    long j3 = atomicLongFieldUpdater2.get(c0349);
                    if (atomicLongFieldUpdater2.compareAndSet(c0349, j3, (j3 & 4611686018427387903L) + 4611686018427387904L)) {
                        break;
                    } else {
                        c0349 = this;
                    }
                }
                while (true) {
                    long j4 = atomicLongFieldUpdater.get(c0349);
                    long j5 = atomicLongFieldUpdater2.get(c0349);
                    long j6 = j5 & 4611686018427387903L;
                    boolean z = (j5 & 4611686018427387904L) != 0;
                    if (j4 == j6 && j4 == atomicLongFieldUpdater.get(c0349)) {
                        break;
                    }
                    if (z) {
                        c0349 = this;
                    } else {
                        c0349 = this;
                        atomicLongFieldUpdater2.compareAndSet(c0349, j5, 4611686018427387904L + j6);
                    }
                }
                while (true) {
                    long j7 = atomicLongFieldUpdater2.get(c0349);
                    if (atomicLongFieldUpdater2.compareAndSet(c0349, j7, j7 & 4611686018427387903L)) {
                        return;
                    } else {
                        c0349 = this;
                    }
                }
            }
        }
    }

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public final boolean m1648(long j) {
        return j < f2122.get(this) || j < f2119.get(this) + ((long) this.f2126);
    }

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public final void m1649() {
        Object objectVolatile;
        C0349 c0349;
        loop0: while (true) {
            f2118.getClass();
            Unsafe unsafe = AbstractC1929.f7689;
            long j = f2116;
            objectVolatile = unsafe.getObjectVolatile(this, j);
            C1735 c1735 = objectVolatile == null ? AbstractC4752.f18081 : AbstractC4752.f18072;
            while (true) {
                Unsafe unsafe2 = AbstractC1929.f7689;
                c0349 = this;
                if (unsafe2.compareAndSwapObject(c0349, f2116, objectVolatile, c1735)) {
                    break loop0;
                } else if (unsafe2.getObjectVolatile(c0349, j) != objectVolatile) {
                    break;
                } else {
                    this = c0349;
                }
            }
            this = c0349;
        }
        if (objectVolatile == null) {
            return;
        }
        AbstractC0702.m2522(1, objectVolatile);
        ((InterfaceC0778) objectVolatile).mo1706(c0349.m1631());
    }

    /* JADX WARN: Code restructure failed: missing block: B:69:0x00f1, code lost:
    
        m1622(r1);
     */
    /* JADX WARN: Code restructure failed: missing block: B:70:0x00f4, code lost:
    
        return;
     */
    /* JADX WARN: Removed duplicated region for block: B:84:0x00bc A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:88:0x0088 A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:97:? A[SYNTHETIC] */
    /* JADX INFO: renamed from: ᵪᵹᵥᵻ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m1650() {
        int i;
        boolean z;
        Object objM6275;
        if (m1642()) {
            return;
        }
        f2117.getClass();
        C2552 c2552 = (C2552) AbstractC1929.f7689.getObjectVolatile(this, f2121);
        loop0: while (true) {
            long andIncrement = f2122.getAndIncrement(this);
            long j = AbstractC4752.f18070;
            long j2 = andIncrement / j;
            if (this.m1638() <= andIncrement) {
                if (c2552.f17947 < j2 && c2552.m10591() != null) {
                    this.m1627(j2, c2552);
                }
                m1622(this);
                return;
            }
            C0349 c0349 = this;
            if (c2552.f17947 == j2) {
                i = (int) (andIncrement % j);
                Object objM62752 = c2552.m6275(i);
                z = objM62752 instanceof InterfaceC2973;
                AtomicLongFieldUpdater atomicLongFieldUpdater = f2119;
                if (z || andIncrement < atomicLongFieldUpdater.get(c0349) || !c2552.m6274(objM62752, i, AbstractC4752.f18084)) {
                    while (true) {
                        objM6275 = c2552.m6275(i);
                        if (objM6275 instanceof InterfaceC2973) {
                            if (objM6275 != AbstractC4752.f18082) {
                                if (objM6275 != null) {
                                    if (objM6275 == AbstractC4752.f18086 || objM6275 == AbstractC4752.f18073 || objM6275 == AbstractC4752.f18087 || objM6275 == AbstractC4752.f18085 || objM6275 == AbstractC4752.f18080) {
                                        break loop0;
                                    } else if (objM6275 != AbstractC4752.f18088) {
                                        C3226.m7364(objM6275, "Unexpected cell state: ");
                                        return;
                                    }
                                } else if (c2552.m6274(objM6275, i, AbstractC4752.f18078)) {
                                    break loop0;
                                }
                            } else {
                                break;
                            }
                        } else if (andIncrement < atomicLongFieldUpdater.get(c0349)) {
                            if (c2552.m6274(objM6275, i, new C5298((InterfaceC2973) objM6275))) {
                                break loop0;
                            }
                        } else if (c2552.m6274(objM6275, i, AbstractC4752.f18084)) {
                            if (c0349.m1641(objM6275, c2552, i)) {
                                c2552.m6273(i, AbstractC4752.f18086);
                                break;
                            } else {
                                c2552.m6273(i, AbstractC4752.f18082);
                                c2552.m9850();
                            }
                        }
                    }
                } else if (c0349.m1641(objM62752, c2552, i)) {
                    c2552.m6273(i, AbstractC4752.f18086);
                    break;
                } else {
                    c2552.m6273(i, AbstractC4752.f18082);
                    c2552.m9850();
                    m1622(c0349);
                }
            } else {
                C2552 c2552M1645 = c0349.m1645(j2, c2552, andIncrement);
                if (c2552M1645 == null) {
                    continue;
                } else {
                    c2552 = c2552M1645;
                    i = (int) (andIncrement % j);
                    Object objM627522 = c2552.m6275(i);
                    z = objM627522 instanceof InterfaceC2973;
                    AtomicLongFieldUpdater atomicLongFieldUpdater2 = f2119;
                    if (z) {
                        while (true) {
                            objM6275 = c2552.m6275(i);
                            if (objM6275 instanceof InterfaceC2973) {
                            }
                        }
                    }
                }
            }
            this = c0349;
        }
    }

    /* JADX INFO: renamed from: ᵮᵣᵗˈ, reason: contains not printable characters */
    public final boolean m1651(Throwable th, boolean z) throws DispatchException {
        C0349 c0349;
        boolean z2;
        long j;
        long j2;
        long j3;
        AtomicLongFieldUpdater atomicLongFieldUpdater = f2120;
        if (z) {
            while (true) {
                long j4 = atomicLongFieldUpdater.get(this);
                if (((int) (j4 >> 60)) != 0) {
                    break;
                }
                C2552 c2552 = AbstractC4752.f18083;
                c0349 = this;
                if (atomicLongFieldUpdater.compareAndSet(c0349, j4, (j4 & 1152921504606846975L) + 1152921504606846976L)) {
                    break;
                }
                this = c0349;
            }
        } else {
            c0349 = this;
        }
        C1735 c1735 = AbstractC4752.f18071;
        while (true) {
            f2125.getClass();
            C0349 c03492 = c0349;
            Unsafe unsafe = AbstractC1929.f7689;
            long j5 = f2112;
            Throwable th2 = th;
            boolean zCompareAndSwapObject = unsafe.compareAndSwapObject(c03492, j5, c1735, th2);
            c0349 = c03492;
            if (zCompareAndSwapObject) {
                z2 = true;
                break;
            }
            if (unsafe.getObjectVolatile(c0349, j5) != c1735) {
                z2 = false;
                break;
            }
            th = th2;
        }
        if (z) {
            do {
                j3 = atomicLongFieldUpdater.get(c0349);
            } while (!atomicLongFieldUpdater.compareAndSet(c0349, j3, 3458764513820540928L + (j3 & 1152921504606846975L)));
        } else {
            do {
                j = atomicLongFieldUpdater.get(c0349);
                int i = (int) (j >> 60);
                if (i == 0) {
                    j2 = (j & 1152921504606846975L) + 2305843009213693952L;
                } else {
                    if (i != 1) {
                        break;
                    }
                    j2 = (j & 1152921504606846975L) + 3458764513820540928L;
                }
            } while (!atomicLongFieldUpdater.compareAndSet(c0349, j, j2));
        }
        c0349.m1639();
        if (z2) {
            c0349.m1649();
        }
        return z2;
    }

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public final void m1652(C4154 c4154) {
        Unsafe unsafe;
        while (true) {
            f2118.getClass();
            Unsafe unsafe2 = AbstractC1929.f7689;
            C0349 c0349 = this;
            if (unsafe2.compareAndSwapObject(c0349, f2116, (Object) null, c4154)) {
                return;
            }
            long j = f2116;
            if (unsafe2.getObjectVolatile(c0349, j) != null) {
                while (true) {
                    Object objectVolatile = AbstractC1929.f7689.getObjectVolatile(c0349, j);
                    C1735 c1735 = AbstractC4752.f18081;
                    if (objectVolatile != c1735) {
                        if (objectVolatile == AbstractC4752.f18072) {
                            ᵕᵩʽᵲ.ᵪᵹᵥᵻ("Another handler was already registered and successfully invoked");
                            return;
                        } else {
                            C3226.m7364(objectVolatile, "Another handler is already registered: ");
                            return;
                        }
                    }
                    C1735 c17352 = AbstractC4752.f18072;
                    do {
                        C0349 c03492 = c0349;
                        unsafe = AbstractC1929.f7689;
                        boolean zCompareAndSwapObject = unsafe.compareAndSwapObject(c03492, f2116, c1735, c17352);
                        c0349 = c03492;
                        if (zCompareAndSwapObject) {
                            c4154.mo1706(c0349.m1631());
                            return;
                        }
                    } while (unsafe.getObjectVolatile(c0349, j) == c1735);
                }
            } else {
                this = c0349;
            }
        }
    }

    /* JADX WARN: Code restructure failed: missing block: B:44:0x00d0, code lost:
    
        if (r8.m9853() == false) goto L76;
     */
    /* JADX WARN: Code restructure failed: missing block: B:45:0x00d2, code lost:
    
        r8.m10592();
     */
    /* JADX WARN: Removed duplicated region for block: B:51:0x00de  */
    /* JADX WARN: Removed duplicated region for block: B:61:0x0107 A[RETURN] */
    /* JADX INFO: renamed from: ᵱʡˏ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final C2552 m1653(long j, C2552 c2552) {
        Object objM9402;
        C2552 c25522;
        long j2;
        Unsafe unsafe;
        C2552 c25523 = AbstractC4752.f18083;
        C4915 c4915 = C4915.f18706;
        loop0: while (true) {
            objM9402 = AbstractC4390.m9402(c2552, j, c4915);
            if (!ᵻᵕᵭ.ᵯᵷʽ(objM9402)) {
                AbstractC4709 abstractC4709 = ᵻᵕᵭ.ᵔᵖᵹᵫ(objM9402);
                while (true) {
                    f2115.getClass();
                    Unsafe unsafe2 = AbstractC1929.f7689;
                    long j3 = f2114;
                    AbstractC4709 abstractC47092 = (AbstractC4709) unsafe2.getObjectVolatile(this, j3);
                    if (abstractC47092.f17947 >= abstractC4709.f17947) {
                        break loop0;
                    }
                    if (!abstractC4709.m9851()) {
                        break;
                    }
                    do {
                        unsafe = AbstractC1929.f7689;
                        if (unsafe.compareAndSwapObject(this, f2114, abstractC47092, abstractC4709)) {
                            if (abstractC47092.m9853()) {
                                abstractC47092.m10592();
                            }
                        }
                    } while (unsafe.getObjectVolatile(this, j3) == abstractC47092);
                    if (abstractC4709.m9853()) {
                        abstractC4709.m10592();
                    }
                }
            } else {
                break;
            }
        }
        if (ᵻᵕᵭ.ᵯᵷʽ(objM9402)) {
            m1639();
            if (c2552.f17947 * ((long) AbstractC4752.f18070) < m1638()) {
                c2552.m10590();
                return null;
            }
        } else {
            C2552 c25524 = (C2552) ᵻᵕᵭ.ᵔᵖᵹᵫ(objM9402);
            long j4 = c25524.f17947;
            if (m1642() || j > f2122.get(this) / ((long) AbstractC4752.f18070)) {
                c25522 = c25524;
                if (j4 > j) {
                    return c25522;
                }
                long j5 = j4 * ((long) AbstractC4752.f18070);
                do {
                    j2 = f2119.get(this);
                    if (j2 >= j5) {
                        break;
                    }
                } while (!f2119.compareAndSet(this, j2, j5));
                if (j4 * ((long) AbstractC4752.f18070) < m1638()) {
                    c25522.m10590();
                }
            } else {
                while (true) {
                    f2117.getClass();
                    Unsafe unsafe3 = AbstractC1929.f7689;
                    long j6 = f2121;
                    AbstractC4709 abstractC47093 = (AbstractC4709) unsafe3.getObjectVolatile(this, j6);
                    if (abstractC47093.f17947 >= j4 || !c25524.m9851()) {
                        break;
                    }
                    while (true) {
                        Unsafe unsafe4 = AbstractC1929.f7689;
                        c25522 = c25524;
                        if (unsafe4.compareAndSwapObject(this, f2121, abstractC47093, c25524)) {
                            if (abstractC47093.m9853()) {
                                abstractC47093.m10592();
                            }
                        } else {
                            if (unsafe4.getObjectVolatile(this, j6) != abstractC47093) {
                                break;
                            }
                            c25524 = c25522;
                        }
                    }
                    c25524 = c25522;
                }
                if (j4 > j) {
                }
            }
        }
        return null;
    }

    @Override // defpackage.InterfaceC0714
    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public final Object mo1654(C5197 c5197) {
        return m1619(this, c5197);
    }

    @Override // defpackage.InterfaceC0714
    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final void mo1655(CancellationException cancellationException) throws DispatchException {
        if (cancellationException == null) {
            cancellationException = new CancellationException("Channel was cancelled");
        }
        m1651(cancellationException, true);
    }

    /* JADX INFO: renamed from: ᵵᵬᵽ, reason: contains not printable characters */
    public final boolean m1656(Object obj, Object obj2) {
        if (obj instanceof C4600) {
            return ((C4600) obj).m9695(this, obj2) == 0;
        }
        if (obj instanceof C1280) {
            return AbstractC4752.m9933(((C1280) obj).f5348, new C5191(obj2), null);
        }
        if (!(obj instanceof C4475)) {
            if (obj instanceof InterfaceC0573) {
                return AbstractC4752.m9933((InterfaceC0573) obj, obj2, null);
            }
            C3226.m7364(obj, "Unexpected receiver type: ");
            return false;
        }
        C4475 c4475 = (C4475) obj;
        C3453 c3453 = c4475.f17077;
        c4475.f17077 = null;
        c4475.f17075 = obj2;
        return AbstractC4752.m9933(c3453, Boolean.TRUE, null);
    }

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public final boolean m1657(Throwable th) throws DispatchException {
        return m1651(th, false);
    }

    /* JADX WARN: Code restructure failed: missing block: B:53:0x00a3, code lost:
    
        r10 = (defpackage.C2552) r10.m10593();
     */
    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final boolean m1658(boolean z, long j) throws DispatchException {
        int i = (int) (j >> 60);
        if (i != 0 && i != 1) {
            if (i == 2) {
                m1644(j & 1152921504606846975L);
                if (!z || !m1643()) {
                }
            } else {
                if (i != 3) {
                    throw new IllegalStateException(AbstractC2704.m6517(i, "unexpected close status: ").toString());
                }
                C2552 c2552M1644 = m1644(j & 1152921504606846975L);
                Object obj = null;
                loop0: do {
                    int i2 = AbstractC4752.f18070 - 1;
                    while (true) {
                        if (-1 >= i2) {
                            break;
                        }
                        long j2 = (c2552M1644.f17947 * ((long) AbstractC4752.f18070)) + ((long) i2);
                        while (true) {
                            Object objM6275 = c2552M1644.m6275(i2);
                            if (objM6275 == AbstractC4752.f18087) {
                                break loop0;
                            }
                            C1735 c1735 = AbstractC4752.f18086;
                            AtomicLongFieldUpdater atomicLongFieldUpdater = f2119;
                            if (objM6275 != c1735) {
                                if (objM6275 != AbstractC4752.f18078 && objM6275 != null) {
                                    if (!(objM6275 instanceof InterfaceC2973) && !(objM6275 instanceof C5298)) {
                                        C1735 c17352 = AbstractC4752.f18084;
                                        if (objM6275 == c17352 || objM6275 == AbstractC4752.f18088) {
                                            break loop0;
                                        }
                                        if (objM6275 != c17352) {
                                            break;
                                        }
                                    } else {
                                        if (j2 < atomicLongFieldUpdater.get(this)) {
                                            break loop0;
                                        }
                                        InterfaceC2973 interfaceC2973 = objM6275 instanceof C5298 ? ((C5298) objM6275).f20015 : (InterfaceC2973) objM6275;
                                        if (c2552M1644.m6274(objM6275, i2, AbstractC4752.f18080)) {
                                            obj = ᵫﾞˌ.ˏːˆ(obj, interfaceC2973);
                                            c2552M1644.m6271(i2, null);
                                            c2552M1644.m9850();
                                            break;
                                        }
                                    }
                                } else {
                                    if (c2552M1644.m6274(objM6275, i2, AbstractC4752.f18080)) {
                                        c2552M1644.m9850();
                                        break;
                                    }
                                }
                            } else {
                                if (j2 < atomicLongFieldUpdater.get(this)) {
                                    break loop0;
                                }
                                if (c2552M1644.m6274(objM6275, i2, AbstractC4752.f18080)) {
                                    c2552M1644.m6271(i2, null);
                                    c2552M1644.m9850();
                                    break;
                                }
                            }
                        }
                        i2--;
                    }
                } while (c2552M1644 != null);
                if (obj != null) {
                    if (obj instanceof ArrayList) {
                        ArrayList arrayList = (ArrayList) obj;
                        for (int size = arrayList.size() - 1; -1 < size; size--) {
                            m1633((InterfaceC2973) arrayList.get(size), false);
                        }
                    } else {
                        m1633((InterfaceC2973) obj, false);
                    }
                }
            }
            return true;
        }
        return false;
    }

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public final C2552 m1659() {
        f2117.getClass();
        Unsafe unsafe = AbstractC1929.f7689;
        Object objectVolatile = unsafe.getObjectVolatile(this, f2121);
        f2124.getClass();
        C2552 c2552 = (C2552) unsafe.getObjectVolatile(this, f2113);
        if (c2552.f17947 > ((C2552) objectVolatile).f17947) {
            objectVolatile = c2552;
        }
        f2115.getClass();
        C2552 c25522 = (C2552) unsafe.getObjectVolatile(this, f2114);
        if (c25522.f17947 > ((C2552) objectVolatile).f17947) {
            objectVolatile = c25522;
        }
        AbstractC5101 abstractC5101 = (AbstractC5101) objectVolatile;
        while (true) {
            AtomicReferenceFieldUpdater atomicReferenceFieldUpdater = AbstractC5101.f19217;
            Object objM10588 = abstractC5101.m10588();
            if (objM10588 == AbstractC4390.f16677) {
                break;
            }
            AbstractC5101 abstractC51012 = (AbstractC5101) objM10588;
            if (abstractC51012 != null) {
                abstractC5101 = abstractC51012;
            } else if (abstractC5101.m10586()) {
                break;
            }
        }
        return (C2552) abstractC5101;
    }

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public boolean mo1660() {
        return false;
    }

    /* JADX WARN: Removed duplicated region for block: B:22:0x006f  */
    /* JADX WARN: Removed duplicated region for block: B:56:0x00c3 A[SYNTHETIC] */
    @Override // defpackage.InterfaceC3561
    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public Object mo1661(Object obj) throws DispatchException {
        int iM1624;
        AtomicLongFieldUpdater atomicLongFieldUpdater = f2120;
        boolean z = false;
        long j = 1152921504606846975L;
        boolean z2 = m1658(false, atomicLongFieldUpdater.get(this)) ? false : !m1648(r1 & 1152921504606846975L);
        C0566 c0566 = C5191.f19534;
        if (z2) {
            return c0566;
        }
        Object obj2 = AbstractC4752.f18082;
        f2124.getClass();
        C2552 c2552 = (C2552) AbstractC1929.f7689.getObjectVolatile(this, f2113);
        while (true) {
            long andIncrement = atomicLongFieldUpdater.getAndIncrement(this);
            long j2 = andIncrement & j;
            boolean zM1658 = m1658(z, andIncrement);
            int i = AbstractC4752.f18070;
            long j3 = i;
            long j4 = j2 / j3;
            int i2 = (int) (j2 % j3);
            if (c2552.f17947 == j4) {
                iM1624 = m1624(this, c2552, i2, obj, j2, obj2, zM1658);
                C5063 c5063 = C5063.f19112;
                if (iM1624 != 0) {
                    c2552.m10590();
                    return c5063;
                }
                if (iM1624 == 1) {
                    return c5063;
                }
                if (iM1624 == 2) {
                    if (zM1658) {
                        c2552.m9850();
                        return new C2502(m1634());
                    }
                    InterfaceC2973 interfaceC2973 = obj2 instanceof InterfaceC2973 ? (InterfaceC2973) obj2 : null;
                    if (interfaceC2973 != null) {
                        interfaceC2973.mo3792(c2552, i2 + i);
                    }
                    c2552.m9850();
                    return c0566;
                }
                if (iM1624 == 3) {
                    ᵕᵩʽᵲ.ᵪᵹᵥᵻ("unexpected");
                    return null;
                }
                if (iM1624 == 4) {
                    if (j2 < f2119.get(this)) {
                        c2552.m10590();
                    }
                    return new C2502(m1634());
                }
                if (iM1624 == 5) {
                    c2552.m10590();
                }
                z = false;
            } else {
                C2552 c2552M1632 = m1632(j4, c2552);
                if (c2552M1632 != null) {
                    c2552 = c2552M1632;
                    iM1624 = m1624(this, c2552, i2, obj, j2, obj2, zM1658);
                    C5063 c50632 = C5063.f19112;
                    if (iM1624 != 0) {
                    }
                } else {
                    if (zM1658) {
                        return new C2502(m1634());
                    }
                    z = false;
                }
            }
            j = 1152921504606846975L;
        }
    }

    @Override // defpackage.InterfaceC3561
    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public Object mo1662(InterfaceC2643 interfaceC2643, Object obj) {
        return m1623(this, obj, interfaceC2643);
    }
}
