package h3;

import androidx.compose.runtime.MutableIntState;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.State;
import java.util.List;
import m3.AbstractC2467b;
import w4.C3137A;
import x4.AbstractC3251q;

/* JADX INFO: renamed from: h3.b1, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public final class C2084b1 extends C4.j implements J4.e {

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

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

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

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C2084b1(D.H h5, State state, MutableIntState mutableIntState, MutableState mutableState, A4.d dVar) {
        super(2, dVar);
        this.f17743b = h5;
        this.f17744c = state;
        this.f17745d = mutableIntState;
        this.f17746e = mutableState;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new C2084b1(this.f17743b, this.f17744c, this.f17745d, this.f17746e, dVar);
    }

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

    /* JADX WARN: Multi-variable type inference failed */
    @Override // C4.a
    public final Object invokeSuspend(Object obj) {
        X2.i iVar;
        B4.a aVar = B4.a.f492a;
        int i6 = this.f17742a;
        MutableIntState mutableIntState = this.f17745d;
        C3137A c3137a = C3137A.f25453a;
        MutableState mutableState = this.f17746e;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            J.f fVar = AbstractC2211w1.f18642a;
            State state = this.f17744c;
            if (!((List) state.getValue()).isEmpty() && (iVar = (X2.i) AbstractC3251q.g0((List) state.getValue())) != null) {
                if (iVar.f8598f == mutableIntState.getIntValue()) {
                    Integer num = (Integer) mutableState.getValue();
                    if (num == null) {
                        mutableState.setValue(new Integer(mutableIntState.getIntValue()));
                        return c3137a;
                    }
                    if (num.intValue() != mutableIntState.getIntValue()) {
                        this.f17742a = 1;
                        if (D.H.k(this.f17743b, 0, this) == aVar) {
                            return aVar;
                        }
                    }
                }
            }
            return c3137a;
        }
        if (i6 != 1) {
            throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
        }
        AbstractC2467b.l(obj);
        J.f fVar2 = AbstractC2211w1.f18642a;
        mutableState.setValue(new Integer(mutableIntState.getIntValue()));
        return c3137a;
    }
}
