package h3;

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

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

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final /* synthetic */ List f17070b;

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

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

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

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public M4(List list, D.H h5, MutableIntState mutableIntState, MutableState mutableState, MutableState mutableState2, MutableIntState mutableIntState2, A4.d dVar) {
        super(2, dVar);
        this.f17070b = list;
        this.f17071c = h5;
        this.f17072d = mutableIntState;
        this.f17073e = mutableState;
        this.f17074f = mutableState2;
        this.f17075j = mutableIntState2;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new M4(this.f17070b, this.f17071c, this.f17072d, this.f17073e, this.f17074f, this.f17075j, dVar);
    }

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

    /* JADX WARN: Removed duplicated region for block: B:29:0x0073 A[RETURN] */
    @Override // C4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) {
        B4.a aVar = B4.a.f492a;
        int i6 = this.f17069a;
        C3137A c3137a = C3137A.f25453a;
        if (i6 != 0) {
            if (i6 == 1) {
                AbstractC2467b.l(obj);
                return c3137a;
            }
            if (i6 != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC2467b.l(obj);
            return c3137a;
        }
        AbstractC2467b.l(obj);
        int size = this.f17070b.size();
        float f6 = n5.f18281a;
        MutableIntState mutableIntState = this.f17072d;
        if (size != mutableIntState.getIntValue()) {
            boolean z6 = mutableIntState.getIntValue() >= 0;
            mutableIntState.setIntValue(size);
            n5.r(this.f17073e, this.f17074f);
            if (size > 0) {
                D.H h5 = this.f17071c;
                MutableIntState mutableIntState2 = this.f17075j;
                if (z6) {
                    mutableIntState2.setIntValue(0);
                    this.f17069a = 1;
                    if (D.H.k(h5, 0, this) == aVar) {
                        return aVar;
                    }
                } else {
                    mutableIntState2.setIntValue(L4.a.v(mutableIntState2.getIntValue(), 0, size - 1));
                    int intValue = mutableIntState2.getIntValue();
                    this.f17069a = 2;
                    if (D.H.k(h5, intValue, this) == aVar) {
                    }
                }
            }
        }
        return c3137a;
    }
}
