package V4;

import java.util.concurrent.CancellationException;
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import m3.AbstractC2467b;
import w4.C3137A;

/* JADX INFO: renamed from: V4.f0, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes3.dex */
public final class C0759f0 extends C4.j implements J4.e {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public /* synthetic */ Object f8297a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ J4.a f8298b;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C0759f0(J4.a aVar, A4.d dVar) {
        super(2, dVar);
        this.f8298b = aVar;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        C0759f0 c0759f0 = new C0759f0(this.f8298b, dVar);
        c0759f0.f8297a = obj;
        return c0759f0;
    }

    @Override // J4.e
    public final Object invoke(Object obj, Object obj2) {
        return ((C0759f0) create((C) obj, (A4.d) obj2)).invokeSuspend(C3137A.f25453a);
    }

    /* JADX WARN: Code restructure failed: missing block: B:17:0x0041, code lost:
    
        return r0.invoke();
     */
    /* JADX WARN: Code restructure failed: missing block: B:20:0x0044, code lost:
    
        r5 = move-exception;
     */
    /* JADX WARN: Code restructure failed: missing block: B:21:0x0045, code lost:
    
        r1.k();
     */
    /* JADX WARN: Code restructure failed: missing block: B:22:0x0048, code lost:
    
        throw r5;
     */
    @Override // C4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) throws Throwable {
        B4.a aVar = B4.a.f492a;
        AbstractC2467b.l(obj);
        A4.j coroutineContext = ((C) this.f8297a).getCoroutineContext();
        J4.a aVar2 = this.f8298b;
        try {
            G0 g0 = new G0();
            g0.f8245f = E.t(E.q(coroutineContext), true, g0);
            while (true) {
                AtomicIntegerFieldUpdater atomicIntegerFieldUpdater = G0.f8243j;
                int i6 = atomicIntegerFieldUpdater.get(g0);
                if (i6 != 0) {
                    if (i6 != 2 && i6 != 3) {
                        G0.l(i6);
                        throw null;
                    }
                } else if (!atomicIntegerFieldUpdater.compareAndSet(g0, i6, 0)) {
                }
            }
        } catch (InterruptedException e6) {
            throw new CancellationException("Blocking call was interrupted due to parent cancellation").initCause(e6);
        }
    }
}
