package h3;

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

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

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

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

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

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ D.H f18011e;

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

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

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public final /* synthetic */ MutableState f18014k;
    public final /* synthetic */ MutableState l;

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public h5(J4.c cVar, boolean z6, boolean z7, D.H h5, MutableIntState mutableIntState, MutableState mutableState, MutableState mutableState2, MutableState mutableState3, MutableState mutableState4, A4.d dVar) {
        super(2, dVar);
        this.f18008b = cVar;
        this.f18009c = z6;
        this.f18010d = z7;
        this.f18011e = h5;
        this.f18012f = mutableIntState;
        this.f18013j = mutableState;
        this.f18014k = mutableState2;
        this.l = mutableState3;
        this.f18015m = mutableState4;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new h5(this.f18008b, this.f18009c, this.f18010d, this.f18011e, this.f18012f, this.f18013j, this.f18014k, this.l, this.f18015m, dVar);
    }

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

    /* JADX WARN: Code restructure failed: missing block: B:32:0x0084, code lost:
    
        if (h3.n5.u(r2, r9, r10) == r1) goto L36;
     */
    /* JADX WARN: Code restructure failed: missing block: B:35:0x008d, code lost:
    
        if (D.H.k(r10, r2, r9) == r1) goto L36;
     */
    /* JADX WARN: Code restructure failed: missing block: B:36:0x008f, code lost:
    
        return r1;
     */
    /* JADX WARN: Multi-variable type inference failed */
    @Override // C4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) {
        int i6;
        B4.a aVar = B4.a.f492a;
        int i7 = this.f18007a;
        MutableState mutableState = this.f18015m;
        MutableState mutableState2 = this.l;
        boolean z6 = this.f18009c;
        if (i7 == 0) {
            AbstractC2467b.l(obj);
            float f6 = n5.f18281a;
            MutableIntState mutableIntState = this.f18012f;
            if (mutableIntState.getIntValue() >= 0) {
                this.f18008b.invoke(new Integer(mutableIntState.getIntValue()));
            }
            n5.s(this.f18013j, this.f18014k);
            int intValue = mutableIntState.getIntValue();
            if (intValue == -2) {
                i6 = z6 ? 1 : 0;
            } else if (intValue != -1) {
                i6 = (this.f18010d ? (z6 ? 1 : 0) + 1 : z6 ? 1 : 0) + intValue;
            } else {
                i6 = 0;
            }
            if (i6 >= 0) {
                D.H h5 = this.f18011e;
                if (i6 < h5.i().f903n) {
                    if (((Boolean) mutableState2.getValue()).booleanValue() || ((Boolean) mutableState.getValue()).booleanValue() != z6) {
                        this.f18007a = 1;
                    } else {
                        this.f18007a = 2;
                    }
                }
            }
        } else {
            if (i7 != 1 && i7 != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC2467b.l(obj);
        }
        n5.t(mutableState2, false);
        mutableState.setValue(Boolean.valueOf(z6));
        return C3137A.f25453a;
    }
}
