package o;

import java.util.concurrent.atomic.AtomicInteger;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class O80 implements InterfaceC1754lI {
    public final C2427sR a = C1884mi0.d();
    public final OD b = new OD(14);
    public final C2277qp c = new C2277qp(new I5(2, null, 1));

    /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
    @Override // o.InterfaceC1754lI
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final java.lang.Object a(o.OC r8, o.AbstractC0298Lm r9) throws java.lang.Throwable {
        /*
            r7 = this;
            boolean r0 = r9 instanceof o.M80
            if (r0 == 0) goto L13
            r0 = r9
            o.M80 r0 = (o.M80) r0
            int r1 = r0.s
            r2 = -2147483648(0xffffffff80000000, float:-0.0)
            r3 = r1 & r2
            if (r3 == 0) goto L13
            int r1 = r1 - r2
            r0.s = r1
            goto L18
        L13:
            o.M80 r0 = new o.M80
            r0.<init>(r7, r9)
        L18:
            java.lang.Object r9 = r0.q
            int r1 = r0.s
            r2 = 2
            r3 = 1
            r4 = 0
            o.Dn r5 = o.EnumC0091Dn.l
            if (r1 == 0) goto L45
            if (r1 == r3) goto L39
            if (r1 != r2) goto L31
            java.lang.Object r8 = r0.f227o
            o.qR r8 = (o.InterfaceC2238qR) r8
            o.IJ.H(r9)     // Catch: java.lang.Throwable -> L2f
            goto L67
        L2f:
            r9 = move-exception
            goto L71
        L31:
            java.lang.IllegalStateException r8 = new java.lang.IllegalStateException
            java.lang.String r9 = "call to 'resume' before 'invoke' with coroutine"
            r8.<init>(r9)
            throw r8
        L39:
            o.sR r8 = r0.p
            java.lang.Object r1 = r0.f227o
            o.OC r1 = (o.OC) r1
            o.IJ.H(r9)
            r9 = r8
            r8 = r1
            goto L57
        L45:
            o.IJ.H(r9)
            r0.f227o = r8
            o.sR r9 = r7.a
            r0.p = r9
            r0.s = r3
            java.lang.Object r1 = r9.d(r0)
            if (r1 != r5) goto L57
            goto L63
        L57:
            r0.f227o = r9     // Catch: java.lang.Throwable -> L6d
            r0.p = r4     // Catch: java.lang.Throwable -> L6d
            r0.s = r2     // Catch: java.lang.Throwable -> L6d
            java.lang.Object r8 = r8.g(r0)     // Catch: java.lang.Throwable -> L6d
            if (r8 != r5) goto L64
        L63:
            return r5
        L64:
            r6 = r9
            r9 = r8
            r8 = r6
        L67:
            o.sR r8 = (o.C2427sR) r8
            r8.f(r4)
            return r9
        L6d:
            r8 = move-exception
            r6 = r9
            r9 = r8
            r8 = r6
        L71:
            o.sR r8 = (o.C2427sR) r8
            r8.f(r4)
            throw r9
        */
        throw new UnsupportedOperationException("Method not decompiled: o.O80.a(o.OC, o.Lm):java.lang.Object");
    }

    /* JADX WARN: Removed duplicated region for block: B:25:0x0055  */
    /* JADX WARN: Removed duplicated region for block: B:30:0x005f  */
    /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
    @Override // o.InterfaceC1754lI
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final java.lang.Object b(o.SC r6, o.AbstractC0298Lm r7) throws java.lang.Throwable {
        /*
            r5 = this;
            boolean r0 = r7 instanceof o.N80
            if (r0 == 0) goto L13
            r0 = r7
            o.N80 r0 = (o.N80) r0
            int r1 = r0.s
            r2 = -2147483648(0xffffffff80000000, float:-0.0)
            r3 = r1 & r2
            if (r3 == 0) goto L13
            int r1 = r1 - r2
            r0.s = r1
            goto L18
        L13:
            o.N80 r0 = new o.N80
            r0.<init>(r5, r7)
        L18:
            java.lang.Object r7 = r0.q
            int r1 = r0.s
            r2 = 1
            r3 = 0
            if (r1 == 0) goto L34
            if (r1 != r2) goto L2c
            boolean r6 = r0.p
            o.sR r0 = r0.f252o
            o.IJ.H(r7)     // Catch: java.lang.Throwable -> L2a
            goto L53
        L2a:
            r7 = move-exception
            goto L5d
        L2c:
            java.lang.IllegalStateException r6 = new java.lang.IllegalStateException
            java.lang.String r7 = "call to 'resume' before 'invoke' with coroutine"
            r6.<init>(r7)
            throw r6
        L34:
            o.IJ.H(r7)
            o.sR r7 = r5.a
            boolean r1 = r7.e()
            java.lang.Boolean r4 = java.lang.Boolean.valueOf(r1)     // Catch: java.lang.Throwable -> L59
            r0.f252o = r7     // Catch: java.lang.Throwable -> L59
            r0.p = r1     // Catch: java.lang.Throwable -> L59
            r0.s = r2     // Catch: java.lang.Throwable -> L59
            java.lang.Object r6 = r6.f(r4, r0)     // Catch: java.lang.Throwable -> L59
            o.Dn r0 = o.EnumC0091Dn.l
            if (r6 != r0) goto L50
            return r0
        L50:
            r0 = r7
            r7 = r6
            r6 = r1
        L53:
            if (r6 == 0) goto L58
            r0.f(r3)
        L58:
            return r7
        L59:
            r6 = move-exception
            r0 = r7
            r7 = r6
            r6 = r1
        L5d:
            if (r6 == 0) goto L62
            r0.f(r3)
        L62:
            throw r7
        */
        throw new UnsupportedOperationException("Method not decompiled: o.O80.b(o.SC, o.Lm):java.lang.Object");
    }

    @Override // o.InterfaceC1754lI
    public final InterfaceC2104oz c() {
        return this.c;
    }

    @Override // o.InterfaceC1754lI
    public final Object d(AbstractC0298Lm abstractC0298Lm) {
        return new Integer(((AtomicInteger) this.b.m).get());
    }

    @Override // o.InterfaceC1754lI
    public final Object e(C0015Ap c0015Ap) {
        return new Integer(((AtomicInteger) this.b.m).incrementAndGet());
    }
}
