package O1;

import com.google.android.gms.internal.measurement.C1;

/* JADX INFO: loaded from: classes.dex */
public final class Q extends G6.i implements O6.p {

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

    /* JADX INFO: renamed from: B, reason: collision with root package name */
    public final /* synthetic */ EnumC0241q[] f4987B;

    /* JADX INFO: renamed from: C, reason: collision with root package name */
    public final /* synthetic */ T f4988C;
    public final /* synthetic */ H D;

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public EnumC0241q[] f4989u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public T f4990v;

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public H f4991w;

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

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

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

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public Q(EnumC0241q[] enumC0241qArr, T t6, H h8, E6.d dVar) {
        super(2, dVar);
        this.f4987B = enumC0241qArr;
        this.f4988C = t6;
        this.D = h8;
    }

    @Override // O6.p
    public final Object k(Object obj, Object obj2) {
        return ((Q) m((E6.d) obj2, (Q1.m) obj)).p(A6.n.f457a);
    }

    @Override // G6.a
    public final E6.d m(E6.d dVar, Object obj) {
        return new Q(this.f4987B, this.f4988C, this.D, dVar);
    }

    /* JADX WARN: Code restructure failed: missing block: B:23:0x0072, code lost:
    
        if (O1.T.c(r7, r6, r11, r10) == r0) goto L24;
     */
    /* JADX WARN: Code restructure failed: missing block: B:29:0x0058, code lost:
    
        r5 = r9;
     */
    /* JADX WARN: Removed duplicated region for block: B:11:0x0034  */
    /* JADX WARN: Removed duplicated region for block: B:27:0x0078  */
    /* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:25:0x0075 -> B:26:0x0076). Please report as a decompilation issue!!! */
    @Override // G6.a
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final Object p(Object obj) throws Throwable {
        int length;
        int i;
        H h8;
        EnumC0241q[] enumC0241qArr;
        int i5;
        T t6;
        F6.a aVar = F6.a.f2580q;
        int i8 = this.f4986A;
        if (i8 == 0) {
            C1.N(obj);
            EnumC0241q[] enumC0241qArr2 = this.f4987B;
            length = enumC0241qArr2.length;
            i = 0;
            T t8 = this.f4988C;
            h8 = this.D;
            enumC0241qArr = enumC0241qArr2;
            i5 = 0;
            t6 = t8;
            if (i >= length) {
            }
        } else {
            if (i8 != 1 && i8 != 2) {
                throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
            }
            length = this.f4994z;
            i = this.f4993y;
            int i9 = this.f4992x;
            h8 = this.f4991w;
            t6 = this.f4990v;
            enumC0241qArr = this.f4989u;
            C1.N(obj);
            i5 = i9;
            i++;
            if (i >= length) {
                int i10 = i5 + 1;
                int iOrdinal = enumC0241qArr[i].ordinal();
                if (iOrdinal == 0) {
                    i5 = i10;
                    i++;
                    if (i >= length) {
                        return A6.n.f457a;
                    }
                } else {
                    if (iOrdinal != 1) {
                        if (iOrdinal != 2) {
                            throw new A6.b();
                        }
                        this.f4989u = enumC0241qArr;
                        this.f4990v = t6;
                        this.f4991w = h8;
                        this.f4992x = i10;
                        this.f4993y = i;
                        this.f4994z = length;
                        this.f4986A = 2;
                        if (T.d(t6, h8, i5, this) != aVar) {
                            i9 = i10;
                            i5 = i9;
                        }
                        return aVar;
                    }
                    this.f4989u = enumC0241qArr;
                    this.f4990v = t6;
                    this.f4991w = h8;
                    this.f4992x = i10;
                    this.f4993y = i;
                    this.f4994z = length;
                    this.f4986A = 1;
                    i++;
                    if (i >= length) {
                    }
                }
            }
        }
    }
}
