package d3;

import V2.Q2;
import androidx.compose.runtime.MutableState;
import androidx.compose.runtime.State;
import j$.time.format.DateTimeFormatter;
import java.util.List;
import m3.AbstractC2467b;
import w4.C3137A;

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

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

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

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

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ n0.x f15684e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final /* synthetic */ n0.x f15685f;

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

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public final /* synthetic */ boolean f15687k;
    public final /* synthetic */ n0.x l;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public final /* synthetic */ n0.x f15688m;

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public final /* synthetic */ n0.x f15689n;

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

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public C1894i1(int i6, List list, D.H h5, n0.x xVar, n0.x xVar2, List list2, boolean z6, n0.x xVar3, n0.x xVar4, n0.x xVar5, MutableState mutableState, MutableState mutableState2, State state, A4.d dVar) {
        super(2, dVar);
        this.f15681b = i6;
        this.f15682c = list;
        this.f15683d = h5;
        this.f15684e = xVar;
        this.f15685f = xVar2;
        this.f15686j = list2;
        this.f15687k = z6;
        this.l = xVar3;
        this.f15688m = xVar4;
        this.f15689n = xVar5;
        this.f15690o = mutableState;
        this.f15691p = mutableState2;
        this.f15692q = state;
    }

    @Override // C4.a
    public final A4.d create(Object obj, A4.d dVar) {
        return new C1894i1(this.f15681b, this.f15682c, this.f15683d, this.f15684e, this.f15685f, this.f15686j, this.f15687k, this.l, this.f15688m, this.f15689n, this.f15690o, this.f15691p, this.f15692q, dVar);
    }

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

    /* JADX WARN: Code restructure failed: missing block: B:21:0x005a, code lost:
    
        if (V4.E.l(40, r8) == r0) goto L22;
     */
    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:35:0x0095  */
    @Override // C4.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object invokeSuspend(Object obj) {
        String str;
        B4.a aVar = B4.a.f492a;
        int i6 = this.f15680a;
        MutableState mutableState = this.f15691p;
        int i7 = this.f15681b;
        if (i6 == 0) {
            AbstractC2467b.l(obj);
            MutableState mutableState2 = this.f15690o;
            DateTimeFormatter dateTimeFormatter = v2.f16084a;
            if (!((Boolean) mutableState2.getValue()).booleanValue()) {
                mutableState.setValue(D.f15042a);
                n0.x.a(this.f15689n);
                return C3137A.f25453a;
            }
            if (((D) mutableState.getValue()) == D.f15042a && i7 >= 0 && i7 < this.f15682c.size()) {
                this.f15680a = 1;
                if (D.H.k(this.f15683d, i7, this) != aVar) {
                }
                return aVar;
            }
            return C3137A.f25453a;
        }
        if (i6 != 1) {
            if (i6 != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            AbstractC2467b.l(obj);
            DateTimeFormatter dateTimeFormatter2 = v2.f16084a;
            int iOrdinal = ((D) mutableState.getValue()).ordinal();
            if (iOrdinal != 0) {
                if (iOrdinal == 1) {
                    n0.x.a(this.f15684e);
                } else {
                    if (iOrdinal != 2) {
                        throw new E3.v();
                    }
                    n0.x.a(this.f15685f);
                }
            } else if (i7 >= 0) {
                List list = this.f15686j;
                if (i7 < list.size()) {
                    n0.x.a((n0.x) list.get(i7));
                } else if (!this.f15687k || (str = ((Q2) this.f15692q.getValue()).f7503h) == null || S4.p.Q0(str)) {
                    n0.x.a(this.f15688m);
                } else {
                    n0.x.a(this.l);
                }
            }
            return C3137A.f25453a;
        }
        AbstractC2467b.l(obj);
        this.f15680a = 2;
    }
}
