package o;

import java.util.concurrent.atomic.AtomicReference;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class B70 {
    public final C3017yf0 a;
    public final InterfaceC1326gp b;
    public final AtomicReference c = new AtomicReference();

    public B70(InterfaceC2747vn interfaceC2747vn, C3017yf0 c3017yf0, InterfaceC1326gp interfaceC1326gp) {
        this.a = c3017yf0;
        this.b = interfaceC1326gp;
        AbstractC1692kh0.C(C80.e(interfaceC2747vn), null, new C3070z70(this, null, 0), 3);
    }

    public final V60 a() throws Throwable {
        AtomicReference atomicReference = this.c;
        if (atomicReference.get() == null) {
            Object objM = AbstractC1692kh0.M(C0281Kv.l, new C3070z70(this, null, 1));
            while (!atomicReference.compareAndSet(null, objM) && atomicReference.get() == null) {
            }
        }
        return (V60) atomicReference.get();
    }

    public final boolean b() {
        Long l = a().e;
        Integer num = a().d;
        return l == null || num == null || this.a.a().c - l.longValue() >= ((long) num.intValue());
    }

    /* JADX WARN: Removed duplicated region for block: B:7:0x0013  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final java.lang.Object c(o.V60 r6, o.AbstractC0298Lm r7) {
        /*
            r5 = this;
            boolean r0 = r7 instanceof o.A70
            if (r0 == 0) goto L13
            r0 = r7
            o.A70 r0 = (o.A70) r0
            int r1 = r0.q
            r2 = -2147483648(0xffffffff80000000, float:-0.0)
            r3 = r1 & r2
            if (r3 == 0) goto L13
            int r1 = r1 - r2
            r0.q = r1
            goto L18
        L13:
            o.A70 r0 = new o.A70
            r0.<init>(r5, r7)
        L18:
            java.lang.Object r7 = r0.f39o
            int r1 = r0.q
            r2 = 1
            if (r1 == 0) goto L2f
            if (r1 != r2) goto L27
            o.IJ.H(r7)     // Catch: java.io.IOException -> L25
            goto L49
        L25:
            r6 = move-exception
            goto L46
        L27:
            java.lang.IllegalStateException r6 = new java.lang.IllegalStateException
            java.lang.String r7 = "call to 'resume' before 'invoke' with coroutine"
            r6.<init>(r7)
            throw r6
        L2f:
            o.IJ.H(r7)
            o.gp r7 = r5.b     // Catch: java.io.IOException -> L25
            o.a4 r1 = new o.a4     // Catch: java.io.IOException -> L25
            r3 = 0
            r4 = 4
            r1.<init>(r6, r3, r4)     // Catch: java.io.IOException -> L25
            r0.q = r2     // Catch: java.io.IOException -> L25
            java.lang.Object r6 = r7.a(r1, r0)     // Catch: java.io.IOException -> L25
            o.Dn r7 = o.EnumC0091Dn.l
            if (r6 != r7) goto L49
            return r7
        L46:
            r6.toString()
        L49:
            o.Oh0 r6 = o.Oh0.a
            return r6
        */
        throw new UnsupportedOperationException("Method not decompiled: o.B70.c(o.V60, o.Lm):java.lang.Object");
    }
}
