package K;

import androidx.compose.runtime.MutableState;
import m3.AbstractC2467b;
import w4.C3137A;
import z.InterfaceC3290j;

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

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

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ MutableState f3677c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public final /* synthetic */ boolean f3678d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ z.l f3679e;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public J0(MutableState mutableState, boolean z6, z.l lVar, A4.d dVar) {
        super(2, dVar);
        this.f3677c = mutableState;
        this.f3678d = z6;
        this.f3679e = lVar;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new J0(this.f3677c, this.f3678d, this.f3679e, dVar);
    }

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

    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        MutableState mutableState;
        MutableState mutableState2;
        B4.a aVar = B4.a.f492a;
        int i6 = this.f3676b;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            mutableState = this.f3677c;
            z.o oVar = (z.o) mutableState.getValue();
            if (oVar != null) {
                InterfaceC3290j pVar = this.f3678d ? new z.p(oVar) : new z.n(oVar);
                z.l lVar = this.f3679e;
                if (lVar != null) {
                    this.f3675a = mutableState;
                    this.f3676b = 1;
                    if (((z.m) lVar).a(pVar, this) == aVar) {
                        return aVar;
                    }
                    mutableState2 = mutableState;
                }
                mutableState.setValue(null);
            }
            return C3137A.f25453a;
        }
        if (i6 != 1) {
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
        mutableState2 = this.f3675a;
        AbstractC2467b.l(obj);
        mutableState = mutableState2;
        mutableState.setValue(null);
        return C3137A.f25453a;
    }
}
