package bc;

import cc.g;
import com.bytedance.sdk.openadsdk.TTAdConstant;
import com.google.android.gms.internal.ads.k30;
import com.google.android.gms.measurement.internal.u1;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.NotFoundException;
import com.google.zxing.ResultMetadataType;
import defpackage.e;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import ob.f;
import tb.d;
import tv.danmaku.ijk.media.player.IjkMediaMeta;
import zb.j;

/* JADX INFO: loaded from: classes.dex */
public final class c extends ac.a {

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public static final int[] f4800k = {7, 5, 4, 3, 1};

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public static final int[] f4801l = {4, 20, 52, 104, 204};

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public static final int[] f4802m = {0, 348, 1388, 2948, 3988};

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public static final int[][] f4803n = {new int[]{1, 8, 4, 1}, new int[]{3, 6, 4, 1}, new int[]{3, 4, 6, 1}, new int[]{3, 2, 8, 1}, new int[]{2, 6, 5, 1}, new int[]{2, 2, 9, 1}};

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public static final int[][] f4804o = {new int[]{1, 3, 9, 27, 81, 32, 96, 77}, new int[]{20, 60, 180, 118, 143, 7, 21, 63}, new int[]{189, 145, 13, 39, 117, 140, 209, 205}, new int[]{193, 157, 49, 147, 19, 57, 171, 91}, new int[]{62, 186, 136, 197, 169, 85, 44, 132}, new int[]{185, 133, 188, 142, 4, 12, 36, 108}, new int[]{113, 128, TTAdConstant.IMAGE_MODE_VERTICAL_IMG_173, 97, 80, 29, 87, 50}, new int[]{150, 28, 84, 41, 123, 158, 52, 156}, new int[]{46, 138, 203, 187, 139, 206, 196, 166}, new int[]{76, 17, 51, 153, 37, 111, 122, 155}, new int[]{43, 129, 176, 106, 107, 110, 119, 146}, new int[]{16, 48, IjkMediaMeta.FF_PROFILE_H264_HIGH_444, 10, 30, 90, 59, 177}, new int[]{109, 116, 137, 200, 178, 112, 125, 164}, new int[]{70, 210, 208, 202, 184, 130, 179, 115}, new int[]{134, 191, 151, 31, 93, 68, 204, 190}, new int[]{148, 22, 66, 198, 172, 94, 71, 2}, new int[]{6, 18, 54, 162, 64, 192, 154, 40}, new int[]{120, 149, 25, 75, 14, 42, 126, 167}, new int[]{79, 26, 78, 23, 69, 207, 199, 175}, new int[]{103, 98, 83, 38, 114, 131, 182, 124}, new int[]{161, 61, 183, 127, 170, 88, 53, 159}, new int[]{55, 165, 73, 8, 24, 72, 5, 15}, new int[]{45, 135, 194, 160, 58, 174, 100, 89}};

    /* JADX INFO: renamed from: p, reason: collision with root package name */
    public static final int[][] f4805p = {new int[]{0, 0}, new int[]{0, 1, 1}, new int[]{0, 2, 1, 3}, new int[]{0, 4, 1, 3, 2}, new int[]{0, 4, 1, 3, 3, 5}, new int[]{0, 4, 1, 3, 4, 5, 5}, new int[]{0, 0, 1, 1, 2, 2, 3, 3}, new int[]{0, 0, 1, 1, 2, 2, 3, 4, 4}, new int[]{0, 0, 1, 1, 2, 2, 3, 4, 5, 5}, new int[]{0, 0, 1, 1, 2, 3, 3, 4, 4, 5, 5}};

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final ArrayList f4806g = new ArrayList(11);

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public final ArrayList f4807h = new ArrayList();

    /* JADX INFO: renamed from: i, reason: collision with root package name */
    public final int[] f4808i = new int[2];

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public boolean f4809j;

    public static f n(List list) {
        k30 aVar;
        int size = list.size() * 2;
        int i10 = size - 1;
        if (((a) e.c(list, 1)).f4796b == null) {
            i10 = size - 2;
        }
        tb.a aVar2 = new tb.a(i10 * 12);
        int i11 = ((a) list.get(0)).f4796b.f426a;
        int i12 = 0;
        for (int i13 = 11; i13 >= 0; i13--) {
            if (((1 << i13) & i11) != 0) {
                aVar2.j(i12);
            }
            i12++;
        }
        for (int i14 = 1; i14 < list.size(); i14++) {
            a aVar3 = (a) list.get(i14);
            int i15 = aVar3.f4795a.f426a;
            for (int i16 = 11; i16 >= 0; i16--) {
                if (((1 << i16) & i15) != 0) {
                    aVar2.j(i12);
                }
                i12++;
            }
            ac.b bVar = aVar3.f4796b;
            if (bVar != null) {
                for (int i17 = 11; i17 >= 0; i17--) {
                    if (((1 << i17) & bVar.f426a) != 0) {
                        aVar2.j(i12);
                    }
                    i12++;
                }
            }
        }
        if (aVar2.d(1)) {
            aVar = new cc.b(2, aVar2);
        } else if (aVar2.d(2)) {
            int iG = d.g(1, 4, aVar2);
            if (iG == 4) {
                aVar = new cc.a(0, aVar2);
            } else if (iG != 5) {
                int iG2 = d.g(1, 5, aVar2);
                if (iG2 == 12) {
                    aVar = new cc.b(0, aVar2);
                } else if (iG2 != 13) {
                    switch (d.g(1, 7, aVar2)) {
                        case 56:
                            aVar = new cc.c(aVar2, "310", "11");
                            break;
                        case 57:
                            aVar = new cc.c(aVar2, "320", "11");
                            break;
                        case 58:
                            aVar = new cc.c(aVar2, "310", "13");
                            break;
                        case 59:
                            aVar = new cc.c(aVar2, "320", "13");
                            break;
                        case 60:
                            aVar = new cc.c(aVar2, "310", "15");
                            break;
                        case 61:
                            aVar = new cc.c(aVar2, "320", "15");
                            break;
                        case 62:
                            aVar = new cc.c(aVar2, "310", "17");
                            break;
                        case 63:
                            aVar = new cc.c(aVar2, "320", "17");
                            break;
                        default:
                            throw new IllegalStateException("unknown decoder: " + aVar2);
                    }
                } else {
                    aVar = new cc.b(1, aVar2);
                }
            } else {
                aVar = new cc.a(1, aVar2);
            }
        } else {
            aVar = new g(aVar2);
        }
        String strD = aVar.d();
        ob.g[] gVarArr = ((a) list.get(0)).f4797c.f430c;
        ob.g[] gVarArr2 = ((a) e.c(list, 1)).f4797c.f430c;
        f fVar = new f(strD, null, new ob.g[]{gVarArr[0], gVarArr[1], gVarArr2[0], gVarArr2[1]}, BarcodeFormat.Q);
        fVar.b(ResultMetadataType.f24344m, "]e0");
        return fVar;
    }

    /* JADX WARN: Removed duplicated region for block: B:10:0x0016  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static boolean q(ArrayList arrayList, boolean z10) {
        int[][] iArr = f4805p;
        for (int i10 = 0; i10 < 10; i10++) {
            int[] iArr2 = iArr[i10];
            int size = arrayList.size();
            int length = iArr2.length;
            if (z10) {
                if (size == length) {
                    for (int i11 = 0; i11 < arrayList.size(); i11++) {
                        if (((a) arrayList.get(i11)).f4797c.f428a != iArr2[i11]) {
                            break;
                        }
                    }
                    return true;
                }
                continue;
            } else if (size > length) {
                continue;
            }
        }
        return false;
    }

    @Override // zb.j
    public final f c(int i10, tb.a aVar, Map map) {
        this.f4809j = false;
        try {
            return n(p(i10, aVar));
        } catch (NotFoundException unused) {
            this.f4809j = true;
            return n(p(i10, aVar));
        }
    }

    public final boolean k() {
        ArrayList arrayList = this.f4806g;
        a aVar = (a) arrayList.get(0);
        ac.b bVar = aVar.f4795a;
        ac.b bVar2 = aVar.f4796b;
        if (bVar2 == null) {
            return false;
        }
        int i10 = 2;
        int i11 = bVar2.f427b;
        for (int i12 = 1; i12 < arrayList.size(); i12++) {
            a aVar2 = (a) arrayList.get(i12);
            i11 += aVar2.f4795a.f427b;
            int i13 = i10 + 1;
            ac.b bVar3 = aVar2.f4796b;
            if (bVar3 != null) {
                i11 += bVar3.f427b;
                i10 += 2;
            } else {
                i10 = i13;
            }
        }
        return ((i10 + (-4)) * 211) + (i11 % 211) == bVar.f426a;
    }

    public final List l(int i10, ArrayList arrayList) throws NotFoundException {
        while (true) {
            ArrayList arrayList2 = this.f4807h;
            if (i10 >= arrayList2.size()) {
                throw NotFoundException.a();
            }
            b bVar = (b) arrayList2.get(i10);
            ArrayList arrayList3 = this.f4806g;
            arrayList3.addAll(bVar.f4798a);
            int size = bVar.f4798a.size();
            if (!q(arrayList3, false)) {
                arrayList3.subList(arrayList3.size() - size, arrayList3.size()).clear();
            } else {
                if (k()) {
                    return arrayList3;
                }
                arrayList.add(bVar);
                try {
                    return l(i10 + 1, arrayList);
                } catch (NotFoundException unused) {
                    arrayList.remove(arrayList.size() - 1);
                    arrayList3.subList(arrayList3.size() - size, arrayList3.size()).clear();
                }
            }
            i10++;
        }
    }

    public final List m(boolean z10) {
        ArrayList arrayList = this.f4807h;
        List listL = null;
        if (arrayList.size() > 25) {
            arrayList.clear();
            return null;
        }
        this.f4806g.clear();
        if (z10) {
            Collections.reverse(arrayList);
        }
        try {
            listL = l(0, new ArrayList());
        } catch (NotFoundException unused) {
        }
        if (z10) {
            Collections.reverse(arrayList);
        }
        return listL;
    }

    public final ac.b o(tb.a aVar, ac.c cVar, boolean z10, boolean z11) throws NotFoundException {
        boolean z12;
        boolean z13;
        boolean z14;
        boolean z15;
        int[][] iArr;
        int[] iArr2 = this.f421b;
        Arrays.fill(iArr2, 0);
        if (z11) {
            j.g(cVar.f429b[0], aVar, iArr2);
        } else {
            j.f(cVar.f429b[1], aVar, iArr2);
            int i10 = 0;
            for (int length = iArr2.length - 1; i10 < length; length--) {
                int i11 = iArr2[i10];
                iArr2[i10] = iArr2[length];
                iArr2[length] = i11;
                i10++;
            }
        }
        float fT = nb.g.T(iArr2) / 17;
        int[] iArr3 = cVar.f429b;
        float f10 = (iArr3[1] - iArr3[0]) / 15.0f;
        if (Math.abs(fT - f10) / f10 > 0.3f) {
            throw NotFoundException.a();
        }
        int i12 = 0;
        while (true) {
            int length2 = iArr2.length;
            float[] fArr = this.f423d;
            float[] fArr2 = this.f422c;
            int[] iArr4 = this.f425f;
            int[] iArr5 = this.f424e;
            if (i12 >= length2) {
                int iT = nb.g.T(iArr5);
                int iT2 = nb.g.T(iArr4);
                if (iT > 13) {
                    z12 = false;
                    z13 = true;
                } else if (iT < 4) {
                    z13 = false;
                    z12 = true;
                } else {
                    z12 = false;
                    z13 = false;
                }
                if (iT2 > 13) {
                    z14 = false;
                    z15 = true;
                } else if (iT2 < 4) {
                    z15 = false;
                    z14 = true;
                } else {
                    z14 = false;
                    z15 = false;
                }
                int i13 = (iT + iT2) - 17;
                boolean z16 = (iT & 1) == 1;
                boolean z17 = (iT2 & 1) == 0;
                boolean z18 = z12;
                boolean z19 = z13;
                boolean z20 = z14;
                boolean z21 = z15;
                if (i13 != -1) {
                    if (i13 != 0) {
                        if (i13 != 1) {
                            throw NotFoundException.a();
                        }
                        if (z16) {
                            if (z17) {
                                throw NotFoundException.a();
                            }
                            z19 = true;
                            z18 = z12;
                            z20 = z14;
                            z21 = z15;
                        } else {
                            if (!z17) {
                                throw NotFoundException.a();
                            }
                            z21 = true;
                            z18 = z12;
                            z19 = z13;
                            z20 = z14;
                        }
                    } else if (z16) {
                        if (!z17) {
                            throw NotFoundException.a();
                        }
                        if (iT < iT2) {
                            z18 = true;
                            z21 = true;
                            z19 = z13;
                            z20 = z14;
                        } else {
                            z19 = true;
                            z20 = true;
                            z18 = z12;
                            z21 = z15;
                        }
                    } else if (z17) {
                        throw NotFoundException.a();
                    }
                } else if (z16) {
                    if (z17) {
                        throw NotFoundException.a();
                    }
                    z18 = true;
                    z19 = z13;
                    z20 = z14;
                    z21 = z15;
                } else {
                    if (!z17) {
                        throw NotFoundException.a();
                    }
                    z20 = true;
                    z18 = z12;
                    z19 = z13;
                    z21 = z15;
                }
                if (z18) {
                    if (z19) {
                        throw NotFoundException.a();
                    }
                    ac.a.i(fArr2, iArr5);
                }
                if (z19) {
                    ac.a.h(fArr2, iArr5);
                }
                if (z20) {
                    if (z21) {
                        throw NotFoundException.a();
                    }
                    ac.a.i(fArr2, iArr4);
                }
                if (z21) {
                    ac.a.h(fArr, iArr4);
                }
                int i14 = cVar.f428a;
                int i15 = (((i14 * 4) + (z10 ? 0 : 2)) + (!z11 ? 1 : 0)) - 1;
                int length3 = iArr5.length - 1;
                int i16 = 0;
                int i17 = 0;
                while (true) {
                    iArr = f4804o;
                    if (length3 < 0) {
                        break;
                    }
                    if (i14 != 0 || !z10 || !z11) {
                        i16 += iArr5[length3] * iArr[i15][length3 * 2];
                    }
                    i17 += iArr5[length3];
                    length3--;
                }
                int i18 = 0;
                for (int length4 = iArr4.length - 1; length4 >= 0; length4--) {
                    if (i14 != 0 || !z10 || !z11) {
                        i18 += iArr4[length4] * iArr[i15][(length4 * 2) + 1];
                    }
                }
                int i19 = i16 + i18;
                if ((i17 & 1) != 0 || i17 > 13 || i17 < 4) {
                    throw NotFoundException.a();
                }
                int i20 = (13 - i17) / 2;
                int i21 = f4800k[i20];
                return new ac.b((ua.b.y(iArr5, i21, true) * f4801l[i20]) + ua.b.y(iArr4, 9 - i21, false) + f4802m[i20], i19);
            }
            float f11 = (iArr2[i12] * 1.0f) / fT;
            int i22 = (int) (0.5f + f11);
            if (i22 < 1) {
                if (f11 < 0.3f) {
                    throw NotFoundException.a();
                }
                i22 = 1;
            } else if (i22 > 8) {
                if (f11 > 8.7f) {
                    throw NotFoundException.a();
                }
                i22 = 8;
            }
            int i23 = i12 / 2;
            if ((i12 & 1) == 0) {
                iArr5[i23] = i22;
                fArr2[i23] = f11 - i22;
            } else {
                iArr4[i23] = i22;
                fArr[i23] = f11 - i22;
            }
            i12++;
        }
    }

    public final List p(int i10, tb.a aVar) throws NotFoundException {
        ArrayList<a> arrayList = this.f4806g;
        arrayList.clear();
        boolean z10 = false;
        while (!z10) {
            try {
                arrayList.add(r(aVar, arrayList, i10));
            } catch (NotFoundException e10) {
                if (arrayList.isEmpty()) {
                    throw e10;
                }
                z10 = true;
            }
        }
        if (k() && q(arrayList, true)) {
            return arrayList;
        }
        ArrayList arrayList2 = this.f4807h;
        boolean z11 = !arrayList2.isEmpty();
        int i11 = 0;
        boolean zEquals = false;
        while (true) {
            if (i11 >= arrayList2.size()) {
                break;
            }
            b bVar = (b) arrayList2.get(i11);
            int i12 = bVar.f4799b;
            ArrayList arrayList3 = bVar.f4798a;
            if (i12 > i10) {
                if (!arrayList3.equals(arrayList)) {
                    break;
                }
            } else {
                zEquals = arrayList3.equals(arrayList);
                i11++;
            }
        }
        if (!zEquals) {
            Iterator it = arrayList2.iterator();
            loop2: while (true) {
                if (it.hasNext()) {
                    b bVar2 = (b) it.next();
                    for (a aVar2 : arrayList) {
                        Iterator it2 = bVar2.f4798a.iterator();
                        while (it2.hasNext()) {
                            if (aVar2.equals((a) it2.next())) {
                                break;
                            }
                        }
                    }
                    break loop2;
                }
                arrayList2.add(i11, new b(i10, arrayList));
                Iterator it3 = arrayList2.iterator();
                while (it3.hasNext()) {
                    b bVar3 = (b) it3.next();
                    if (bVar3.f4798a.size() != arrayList.size()) {
                        Iterator it4 = bVar3.f4798a.iterator();
                        while (true) {
                            if (!it4.hasNext()) {
                                it3.remove();
                                break;
                            }
                            if (!arrayList.contains((a) it4.next())) {
                                break;
                            }
                        }
                    }
                }
            }
        }
        if (z11) {
            List listM = m(false);
            if (listM != null) {
                return listM;
            }
            List listM2 = m(true);
            if (listM2 != null) {
                return listM2;
            }
        }
        throw NotFoundException.a();
    }

    /* JADX WARN: Removed duplicated region for block: B:122:0x0217 A[LOOP:0: B:10:0x001c->B:122:0x0217, LOOP_END] */
    /* JADX WARN: Removed duplicated region for block: B:147:0x01f3 A[SYNTHETIC] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final a r(tb.a aVar, ArrayList arrayList, int i10) throws NotFoundException {
        int i11;
        int i12;
        int i13;
        int i14;
        int iF;
        int i15;
        int i16;
        ac.c cVar;
        int iE;
        ac.b bVarO;
        int i17;
        int i18 = 2;
        int i19 = 0;
        int i20 = 1;
        boolean z10 = arrayList.size() % 2 == 0;
        if (this.f4809j) {
            z10 = !z10;
        }
        int i21 = -1;
        boolean z11 = true;
        ac.b bVarO2 = null;
        while (true) {
            int[] iArr = this.f420a;
            iArr[i19] = i19;
            iArr[i20] = i19;
            iArr[i18] = i19;
            int i22 = 3;
            iArr[3] = i19;
            int i23 = aVar.f33004b;
            int i24 = i21 >= 0 ? i21 : arrayList.isEmpty() ? i19 : ((a) u1.e(arrayList, i20)).f4797c.f429b[i20];
            int i25 = arrayList.size() % i18 != 0 ? i20 : i19;
            if (this.f4809j) {
                i25 ^= 1;
            }
            int iD = i19;
            while (i24 < i23) {
                iD = aVar.d(i24) ^ i20;
                if (iD == 0) {
                    break;
                }
                i24++;
            }
            int i26 = i19;
            int i27 = i24;
            while (i24 < i23) {
                if (aVar.d(i24) != iD) {
                    iArr[i26] = iArr[i26] + i20;
                    i11 = i20;
                    i12 = i21;
                    i13 = i22;
                } else {
                    if (i26 == i22) {
                        if (i25 != 0) {
                            int length = iArr.length;
                            for (int i28 = 0; i28 < length / 2; i28++) {
                                int i29 = iArr[i28];
                                int i30 = (length - i28) - 1;
                                iArr[i28] = iArr[i30];
                                iArr[i30] = i29;
                            }
                        }
                        if (ac.a.j(iArr)) {
                            int[] iArr2 = this.f4808i;
                            iArr2[0] = i27;
                            iArr2[1] = i24;
                            if (z10) {
                                int i31 = i27 - 1;
                                while (i31 >= 0 && !aVar.d(i31)) {
                                    i31--;
                                }
                                i27 = i31 + 1;
                                i15 = iArr2[0] - i27;
                                i14 = 1;
                                iF = iArr2[1];
                            } else {
                                i14 = 1;
                                iF = aVar.f(i24 + 1);
                                i15 = iF - iArr2[1];
                            }
                            int i32 = i27;
                            System.arraycopy(iArr, 0, iArr, i14, iArr.length - i14);
                            iArr[0] = i15;
                            try {
                                int[][] iArr3 = f4803n;
                                int i33 = 0;
                                while (true) {
                                    if (i33 >= 6) {
                                        i16 = i21;
                                        try {
                                            throw NotFoundException.a();
                                        } catch (NotFoundException unused) {
                                        }
                                    } else if (j.e(iArr, iArr3[i33], 0.45f) < 0.2f) {
                                        if (!arrayList.isEmpty()) {
                                            int[][] iArr4 = f4805p;
                                            int i34 = 0;
                                            while (i34 < 10) {
                                                int[] iArr5 = iArr4[i34];
                                                if (arrayList.size() + 1 <= iArr5.length) {
                                                    int size = arrayList.size();
                                                    while (size < iArr5.length) {
                                                        int[][] iArr6 = iArr4;
                                                        if (iArr5[size] == i33) {
                                                            int i35 = 0;
                                                            while (i35 < arrayList.size()) {
                                                                i17 = i21;
                                                                if (iArr5[(size - i35) - 1] != ((a) arrayList.get((arrayList.size() - i35) - 1)).f4797c.f428a) {
                                                                    break;
                                                                }
                                                                i35++;
                                                                i21 = i17;
                                                            }
                                                        } else {
                                                            i17 = i21;
                                                        }
                                                        size++;
                                                        iArr4 = iArr6;
                                                        i21 = i17;
                                                    }
                                                }
                                                i34++;
                                                iArr4 = iArr4;
                                                i21 = i21;
                                            }
                                        }
                                        i16 = i21;
                                        if (!arrayList.isEmpty()) {
                                            int[] iArr7 = ((a) u1.e(arrayList, 1)).f4797c.f429b;
                                            int i36 = iArr7[0];
                                            float f10 = ((r7 - i36) / 15.0f) * 17.0f;
                                            float f11 = iArr7[1];
                                            float f12 = f10 * 2.0f;
                                            float f13 = (0.9f * f12) + f11;
                                            float f14 = (f12 * 1.1f) + f11;
                                            float f15 = i32;
                                            if (f15 < f13 || f15 > f14) {
                                            }
                                        }
                                        cVar = new ac.c(i33, i32, iF, i10, new int[]{i32, iF});
                                    } else {
                                        i33++;
                                    }
                                }
                            } catch (NotFoundException unused2) {
                            }
                            i16 = i21;
                            cVar = null;
                            if (cVar == null) {
                                int i37 = iArr2[0];
                                iE = aVar.d(i37) ? aVar.e(aVar.f(i37)) : aVar.f(aVar.e(i37));
                            } else {
                                try {
                                    bVarO2 = o(aVar, cVar, z10, true);
                                    i21 = i16;
                                    z11 = false;
                                } catch (NotFoundException unused3) {
                                    int i38 = iArr2[0];
                                    iE = aVar.d(i38) ? aVar.e(aVar.f(i38)) : aVar.f(aVar.e(i38));
                                    i21 = iE;
                                }
                                if (z11) {
                                    if (!arrayList.isEmpty() && ((a) u1.e(arrayList, 1)).f4796b == null) {
                                        throw NotFoundException.a();
                                    }
                                    try {
                                        bVarO = o(aVar, cVar, z10, false);
                                    } catch (NotFoundException unused4) {
                                        bVarO = null;
                                    }
                                    return new a(bVarO2, bVarO, cVar);
                                }
                                i18 = 2;
                                i19 = 0;
                                i20 = 1;
                            }
                            i21 = iE;
                            if (z11) {
                            }
                        } else {
                            i12 = i21;
                            if (i25 != 0) {
                                int length2 = iArr.length;
                                for (int i39 = 0; i39 < length2 / 2; i39++) {
                                    int i40 = iArr[i39];
                                    int i41 = (length2 - i39) - 1;
                                    iArr[i39] = iArr[i41];
                                    iArr[i41] = i40;
                                }
                            }
                            i11 = 1;
                            i27 = iArr[0] + iArr[1] + i27;
                            iArr[0] = iArr[2];
                            i13 = 3;
                            iArr[1] = iArr[3];
                            iArr[2] = 0;
                            iArr[3] = 0;
                            i26--;
                        }
                    } else {
                        i11 = i20;
                        i12 = i21;
                        i13 = i22;
                        i26++;
                    }
                    iArr[i26] = i11;
                    iD ^= 1;
                }
                i24++;
                i22 = i13;
                i20 = i11;
                i21 = i12;
            }
            throw NotFoundException.a();
        }
    }

    @Override // zb.j, ob.e
    public final void reset() {
        this.f4806g.clear();
        this.f4807h.clear();
    }
}
