package K;

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

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

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

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

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

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public I0(MutableState mutableState, long j4, z.l lVar, A4.d dVar) {
        super(2, dVar);
        this.f3667c = mutableState;
        this.f3668d = j4;
        this.f3669e = lVar;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new I0(this.f3667c, this.f3668d, this.f3669e, dVar);
    }

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

    /* JADX WARN: Code restructure failed: missing block: B:15:0x0045, code lost:
    
        if (((z.m) r2).a(r1, r8) == r0) goto L23;
     */
    /* JADX WARN: Removed duplicated region for block: B:21:0x0056  */
    @Override // C4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) {
        MutableState mutableState;
        z.o oVar;
        z.o oVar2;
        B4.a aVar = B4.a.f492a;
        int i6 = this.f3666b;
        z.l lVar = this.f3669e;
        MutableState mutableState2 = this.f3667c;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            z.o oVar3 = (z.o) mutableState2.getValue();
            if (oVar3 == null) {
                oVar = new z.o(this.f3668d);
                if (lVar != null) {
                    this.f3665a = oVar;
                    this.f3666b = 2;
                    if (((z.m) lVar).a(oVar, this) != aVar) {
                        oVar2 = oVar;
                        oVar = oVar2;
                    }
                }
                mutableState2.setValue(oVar);
                return C3137A.f25453a;
            }
            z.n nVar = new z.n(oVar3);
            if (lVar != null) {
                this.f3665a = mutableState2;
                this.f3666b = 1;
            }
            mutableState = mutableState2;
            return aVar;
        }
        if (i6 != 1) {
            if (i6 != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            oVar2 = (z.o) this.f3665a;
            AbstractC2467b.l(obj);
            oVar = oVar2;
            mutableState2.setValue(oVar);
            return C3137A.f25453a;
        }
        mutableState = (MutableState) this.f3665a;
        AbstractC2467b.l(obj);
        mutableState.setValue(null);
        oVar = new z.o(this.f3668d);
        if (lVar != null) {
        }
        mutableState2.setValue(oVar);
        return C3137A.f25453a;
    }
}
