package K2;

import androidx.compose.runtime.MutableState;
import m3.AbstractC2467b;
import o0.C2631b;
import w4.C3137A;
import x.C0;

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

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

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public /* synthetic */ C0 f4084c;

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

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

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public h(boolean z6, J4.a aVar, boolean z7, MutableState mutableState, A4.d dVar) {
        super(3, dVar);
        this.f4085d = z6;
        this.f4086e = aVar;
        this.f4087f = z7;
        this.f4088j = mutableState;
    }

    @Override // J4.f
    public final Object invoke(Object obj, Object obj2, Object obj3) {
        long j4 = ((C2631b) obj2).f21785a;
        boolean z6 = this.f4087f;
        MutableState mutableState = this.f4088j;
        h hVar = new h(this.f4085d, this.f4086e, z6, mutableState, (A4.d) obj3);
        hVar.f4084c = (C0) obj;
        return hVar.invokeSuspend(C3137A.f25453a);
    }

    /* JADX WARN: Code restructure failed: missing block: B:15:0x003b, code lost:
    
        if (r8.k(r7) == r0) goto L31;
     */
    /* JADX WARN: Code restructure failed: missing block: B:30:0x0070, code lost:
    
        if (r8.k(r7) == r0) goto L31;
     */
    /* JADX WARN: Removed duplicated region for block: B:28:0x0061  */
    @Override // C4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) {
        boolean z6;
        B4.a aVar = B4.a.f492a;
        int i6 = this.f4083b;
        MutableState mutableState = this.f4088j;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            C0 c02 = this.f4084c;
            J4.a aVar2 = this.f4086e;
            boolean z7 = this.f4085d;
            if (!z7) {
                aVar2.invoke();
                this.f4083b = 1;
            } else if (z7 && this.f4087f) {
                boolean zBooleanValue = ((Boolean) mutableState.getValue()).booleanValue();
                if (!zBooleanValue) {
                    aVar2.invoke();
                }
                this.f4082a = zBooleanValue;
                this.f4083b = 2;
                if (c02.k(this) != aVar) {
                    z6 = zBooleanValue;
                    if (z6) {
                    }
                }
            } else {
                aVar2.invoke();
                this.f4083b = 3;
            }
            return aVar;
        }
        if (i6 == 1) {
            AbstractC2467b.l(obj);
        } else if (i6 == 2) {
            z6 = this.f4082a;
            AbstractC2467b.l(obj);
            if (z6) {
                mutableState.setValue(Boolean.FALSE);
            }
        } else {
            if (i6 != 3) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC2467b.l(obj);
            if (((Boolean) mutableState.getValue()).booleanValue()) {
                mutableState.setValue(Boolean.FALSE);
            }
        }
        return C3137A.f25453a;
    }
}
