package M2;

import androidx.compose.runtime.MutableState;
import m3.AbstractC2467b;
import o0.C2631b;
import q.C2786l0;
import w4.C3137A;

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

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public /* synthetic */ x.C0 f4527b;

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public R0(MutableState mutableState, A4.d dVar) {
        super(3, dVar);
        this.f4528c = mutableState;
    }

    @Override // J4.f
    public final Object invoke(Object obj, Object obj2, Object obj3) {
        long j4 = ((C2631b) obj2).f21785a;
        R0 r02 = new R0(this.f4528c, (A4.d) obj3);
        r02.f4527b = (x.C0) obj;
        return r02.invokeSuspend(C3137A.f25453a);
    }

    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        B4.a aVar = B4.a.f492a;
        int i6 = this.f4526a;
        MutableState mutableState = this.f4528c;
        try {
            if (i6 == 0) {
                AbstractC2467b.l(obj);
                x.C0 c02 = this.f4527b;
                C2786l0 c2786l0 = T0.f4553a;
                mutableState.setValue(Boolean.TRUE);
                this.f4526a = 1;
                obj = c02.k(this);
                if (obj == aVar) {
                    return aVar;
                }
            } else {
                if (i6 != 1) {
                    throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                }
                AbstractC2467b.l(obj);
            }
            ((Boolean) obj).getClass();
            C2786l0 c2786l02 = T0.f4553a;
            mutableState.setValue(Boolean.FALSE);
            return C3137A.f25453a;
        } catch (Throwable th) {
            C2786l0 c2786l03 = T0.f4553a;
            mutableState.setValue(Boolean.FALSE);
            throw th;
        }
    }
}
