package N2;

import V4.C;
import V4.E;
import java.util.concurrent.atomic.AtomicBoolean;
import m3.AbstractC2467b;
import w4.C3137A;

/* JADX INFO: loaded from: classes.dex */
public final class p extends C4.j implements J4.e {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public int f5241a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ AtomicBoolean f5242b;

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

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

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new p(this.f5242b, this.f5243c, dVar);
    }

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

    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        B4.a aVar = B4.a.f492a;
        int i6 = this.f5241a;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            this.f5241a = 1;
            if (E.l(30000L, this) == aVar) {
                return aVar;
            }
        } else {
            if (i6 != 1) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC2467b.l(obj);
        }
        if (this.f5242b.compareAndSet(false, true)) {
            this.f5243c.invoke();
        }
        return C3137A.f25453a;
    }
}
