package o;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.jl, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C1604jl extends C1210ff {
    public final int v;

    public C1604jl(int i, int i2) {
        super(i);
        this.v = i2;
        if (i2 != 1) {
            if (i < 1) {
                throw new IllegalArgumentException(AbstractC0126Ew.k(i, "Buffered channel capacity must be at least 1, but ", " was specified").toString());
            }
        } else {
            throw new IllegalArgumentException(("This implementation does not support suspension for senders, use " + C10.a(C1210ff.class).b() + " instead").toString());
        }
    }

    /* JADX WARN: Code restructure failed: missing block: B:53:0x00bf, code lost:
    
        return r8;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final java.lang.Object J(boolean r18, java.lang.Object r19) {
        /*
            r17 = this;
            r0 = r17
            o.Oh0 r8 = o.Oh0.a
            int r1 = r0.v
            r9 = 3
            if (r1 != r9) goto L1a
            r3 = r19
            java.lang.Object r1 = super.p(r3)
            boolean r2 = r1 instanceof o.C1691kh
            if (r2 == 0) goto L19
            boolean r2 = r1 instanceof o.C1596jh
            if (r2 == 0) goto L18
            goto L19
        L18:
            return r8
        L19:
            return r1
        L1a:
            r3 = r19
            o.xq r6 = o.AbstractC1402hf.d
            java.util.concurrent.atomic.AtomicReferenceFieldUpdater r1 = o.C1210ff.q
            java.lang.Object r1 = r1.get(r0)
            o.mh r1 = (o.C1881mh) r1
        L26:
            java.util.concurrent.atomic.AtomicLongFieldUpdater r2 = o.C1210ff.m
            long r4 = r2.getAndIncrement(r0)
            r10 = 1152921504606846975(0xfffffffffffffff, double:1.2882297539194265E-231)
            long r10 = r10 & r4
            r2 = 0
            boolean r7 = r0.u(r2, r4)
            int r12 = o.AbstractC1402hf.b
            long r13 = (long) r12
            long r4 = r10 / r13
            r15 = r10
            long r9 = r15 % r13
            int r2 = (int) r9
            long r9 = r1.c
            int r9 = (r9 > r4 ? 1 : (r9 == r4 ? 0 : -1))
            if (r9 == 0) goto L5b
            o.mh r4 = o.C1210ff.b(r0, r4, r1)
            if (r4 != 0) goto L5a
            if (r7 == 0) goto L58
            java.lang.Throwable r1 = r0.q()
            o.jh r2 = new o.jh
            r2.<init>(r1)
            return r2
        L58:
            r9 = 3
            goto L26
        L5a:
            r1 = r4
        L5b:
            r4 = r15
            int r9 = o.C1210ff.e(r0, r1, r2, r3, r4, r6, r7)
            r15 = r4
            if (r9 == 0) goto Lc0
            r3 = 1
            if (r9 == r3) goto Lbf
            r3 = 2
            if (r9 == r3) goto L99
            r3 = 3
            if (r9 == r3) goto L91
            r2 = 4
            if (r9 == r2) goto L7a
            r2 = 5
            if (r9 == r2) goto L73
            goto L76
        L73:
            r1.b()
        L76:
            r9 = r3
            r3 = r19
            goto L26
        L7a:
            java.util.concurrent.atomic.AtomicLongFieldUpdater r2 = o.C1210ff.n
            long r2 = r2.get(r0)
            int r2 = (r15 > r2 ? 1 : (r15 == r2 ? 0 : -1))
            if (r2 >= 0) goto L87
            r1.b()
        L87:
            java.lang.Throwable r1 = r0.q()
            o.jh r2 = new o.jh
            r2.<init>(r1)
            return r2
        L91:
            java.lang.IllegalStateException r1 = new java.lang.IllegalStateException
            java.lang.String r2 = "unexpected"
            r1.<init>(r2)
            throw r1
        L99:
            if (r7 == 0) goto La8
            r1.i()
            java.lang.Throwable r1 = r0.q()
            o.jh r2 = new o.jh
            r2.<init>(r1)
            return r2
        La8:
            boolean r3 = r6 instanceof o.Ik0
            if (r3 == 0) goto Laf
            o.Ik0 r6 = (o.Ik0) r6
            goto Lb0
        Laf:
            r6 = 0
        Lb0:
            if (r6 == 0) goto Lb7
            int r3 = r2 + r12
            r6.a(r1, r3)
        Lb7:
            long r3 = r1.c
            long r3 = r3 * r13
            long r1 = (long) r2
            long r3 = r3 + r1
            r0.i(r3)
        Lbf:
            return r8
        Lc0:
            r1.b()
            return r8
        */
        throw new UnsupportedOperationException("Method not decompiled: o.C1604jl.J(boolean, java.lang.Object):java.lang.Object");
    }

    @Override // o.C1210ff, o.InterfaceC1455i60
    public final Object n(Object obj, InterfaceC0220Im interfaceC0220Im) throws Throwable {
        if (J(true, obj) instanceof C1596jh) {
            throw q();
        }
        return Oh0.a;
    }

    @Override // o.C1210ff, o.InterfaceC1455i60
    public final Object p(Object obj) {
        return J(false, obj);
    }

    @Override // o.C1210ff
    public final boolean x() {
        return this.v == 2;
    }
}
