package q3;

import io.flutter.embedding.android.AndroidTouchProcessor;
import io.flutter.plugin.editing.FlutterTextUtils;
import io.sentry.flutter.SentryFlutterPluginKt;
import java.io.Closeable;
import java.io.IOException;
import java.io.Reader;
import java.util.Arrays;
import java.util.Objects;
import p0.AbstractC0928a;
import u.e;

/* JADX INFO: renamed from: q3.b, reason: case insensitive filesystem */
/* JADX INFO: loaded from: classes.dex */
public class C0957b implements Closeable {

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public final Reader f9565k;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public long f9571s;

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

    /* JADX INFO: renamed from: u, reason: collision with root package name */
    public String f9573u;

    /* JADX INFO: renamed from: v, reason: collision with root package name */
    public int[] f9574v;

    /* JADX INFO: renamed from: x, reason: collision with root package name */
    public String[] f9576x;

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

    /* JADX INFO: renamed from: l, reason: collision with root package name */
    public boolean f9566l = false;

    /* JADX INFO: renamed from: m, reason: collision with root package name */
    public final char[] f9567m = new char[1024];

    /* JADX INFO: renamed from: n, reason: collision with root package name */
    public int f9568n = 0;

    /* JADX INFO: renamed from: o, reason: collision with root package name */
    public int f9569o = 0;
    public int p = 0;
    public int q = 0;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public int f9570r = 0;

    /* JADX INFO: renamed from: w, reason: collision with root package name */
    public int f9575w = 1;

    static {
        C0956a.f9564a = new C0956a();
    }

    public C0957b(Reader reader) {
        int[] iArr = new int[32];
        this.f9574v = iArr;
        iArr[0] = 6;
        this.f9576x = new String[32];
        this.f9577y = new int[32];
        Objects.requireNonNull(reader, "in == null");
        this.f9565k = reader;
    }

    public String A() throws IOException {
        String strD;
        int iH = this.f9570r;
        if (iH == 0) {
            iH = h();
        }
        if (iH == 14) {
            strD = F();
        } else if (iH == 12) {
            strD = D('\'');
        } else {
            if (iH != 13) {
                throw new IllegalStateException("Expected a name but was " + AbstractC0928a.A(G()) + v());
            }
            strD = D('\"');
        }
        this.f9570r = 0;
        this.f9576x[this.f9575w - 1] = strD;
        return strD;
    }

    /* JADX WARN: Code restructure failed: missing block: B:33:0x0074, code lost:
    
        return r5;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public final int B(boolean r10) throws java.io.IOException {
        /*
            Method dump skipped, instruction units count: 226
            To view this dump change 'Code comments level' option to 'DEBUG'
        */
        throw new UnsupportedOperationException("Method not decompiled: q3.C0957b.B(boolean):int");
    }

    public void C() throws IOException {
        int iH = this.f9570r;
        if (iH == 0) {
            iH = h();
        }
        if (iH != 7) {
            throw new IllegalStateException("Expected null but was " + AbstractC0928a.A(G()) + v());
        }
        this.f9570r = 0;
        int[] iArr = this.f9577y;
        int i = this.f9575w - 1;
        iArr[i] = iArr[i] + 1;
    }

    /* JADX WARN: Code restructure failed: missing block: B:17:0x002d, code lost:
    
        r10.f9568n = r8;
        r8 = r8 - r3;
        r2 = r8 - 1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:18:0x0032, code lost:
    
        if (r1 != null) goto L37;
     */
    /* JADX WARN: Code restructure failed: missing block: B:19:0x0034, code lost:
    
        r1 = new java.lang.StringBuilder(java.lang.Math.max(r8 * 2, 16));
     */
    /* JADX WARN: Code restructure failed: missing block: B:25:0x005b, code lost:
    
        if (r1 != null) goto L27;
     */
    /* JADX WARN: Code restructure failed: missing block: B:26:0x005d, code lost:
    
        r1 = new java.lang.StringBuilder(java.lang.Math.max((r2 - r3) * 2, 16));
     */
    /* JADX WARN: Code restructure failed: missing block: B:27:0x006b, code lost:
    
        r1.append(r5, r3, r2 - r3);
        r10.f9568n = r2;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public final java.lang.String D(char r11) throws q3.d {
        /*
            r10 = this;
            r0 = 0
            r1 = r0
        L2:
            int r2 = r10.f9568n
            int r3 = r10.f9569o
        L6:
            r4 = r3
            r3 = r2
        L8:
            char[] r5 = r10.f9567m
            r6 = 1
            r7 = 16
            if (r2 >= r4) goto L5b
            int r8 = r2 + 1
            char r2 = r5[r2]
            if (r2 != r11) goto L29
            r10.f9568n = r8
            int r8 = r8 - r3
            int r8 = r8 - r6
            if (r1 != 0) goto L21
            java.lang.String r11 = new java.lang.String
            r11.<init>(r5, r3, r8)
            return r11
        L21:
            r1.append(r5, r3, r8)
            java.lang.String r11 = r1.toString()
            return r11
        L29:
            r9 = 92
            if (r2 != r9) goto L4e
            r10.f9568n = r8
            int r8 = r8 - r3
            int r2 = r8 + (-1)
            if (r1 != 0) goto L3f
            int r8 = r8 * 2
            java.lang.StringBuilder r1 = new java.lang.StringBuilder
            int r4 = java.lang.Math.max(r8, r7)
            r1.<init>(r4)
        L3f:
            r1.append(r5, r3, r2)
            char r2 = r10.I()
            r1.append(r2)
            int r2 = r10.f9568n
            int r3 = r10.f9569o
            goto L6
        L4e:
            r5 = 10
            if (r2 != r5) goto L59
            int r2 = r10.p
            int r2 = r2 + r6
            r10.p = r2
            r10.q = r8
        L59:
            r2 = r8
            goto L8
        L5b:
            if (r1 != 0) goto L6b
            int r1 = r2 - r3
            int r1 = r1 * 2
            java.lang.StringBuilder r4 = new java.lang.StringBuilder
            int r1 = java.lang.Math.max(r1, r7)
            r4.<init>(r1)
            r1 = r4
        L6b:
            int r4 = r2 - r3
            r1.append(r5, r3, r4)
            r10.f9568n = r2
            boolean r2 = r10.m(r6)
            if (r2 == 0) goto L79
            goto L2
        L79:
            java.lang.String r11 = "Unterminated string"
            r10.N(r11)
            throw r0
        */
        throw new UnsupportedOperationException("Method not decompiled: q3.C0957b.D(char):java.lang.String");
    }

    public String E() throws IOException {
        String str;
        int iH = this.f9570r;
        if (iH == 0) {
            iH = h();
        }
        if (iH == 10) {
            str = F();
        } else if (iH == 8) {
            str = D('\'');
        } else if (iH == 9) {
            str = D('\"');
        } else if (iH == 11) {
            str = this.f9573u;
            this.f9573u = null;
        } else if (iH == 15) {
            str = Long.toString(this.f9571s);
        } else {
            if (iH != 16) {
                throw new IllegalStateException("Expected a string but was " + AbstractC0928a.A(G()) + v());
            }
            str = new String(this.f9567m, this.f9568n, this.f9572t);
            this.f9568n += this.f9572t;
        }
        this.f9570r = 0;
        int[] iArr = this.f9577y;
        int i = this.f9575w - 1;
        iArr[i] = iArr[i] + 1;
        return str;
    }

    /* JADX WARN: Code restructure failed: missing block: B:34:0x004a, code lost:
    
        f();
     */
    /* JADX WARN: Failed to find 'out' block for switch in B:32:0x0044. Please report as an issue. */
    /* JADX WARN: Removed duplicated region for block: B:46:0x007c  */
    /* JADX WARN: Removed duplicated region for block: B:47:0x0084  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public final java.lang.String F() throws q3.d {
        /*
            r7 = this;
            r0 = 0
            r1 = 0
        L2:
            r2 = r1
        L3:
            int r3 = r7.f9568n
            int r4 = r3 + r2
            int r5 = r7.f9569o
            char[] r6 = r7.f9567m
            if (r4 >= r5) goto L4e
            int r3 = r3 + r2
            char r3 = r6[r3]
            r4 = 9
            if (r3 == r4) goto L5a
            r4 = 10
            if (r3 == r4) goto L5a
            r4 = 12
            if (r3 == r4) goto L5a
            r4 = 13
            if (r3 == r4) goto L5a
            r4 = 32
            if (r3 == r4) goto L5a
            r4 = 35
            if (r3 == r4) goto L4a
            r4 = 44
            if (r3 == r4) goto L5a
            r4 = 47
            if (r3 == r4) goto L4a
            r4 = 61
            if (r3 == r4) goto L4a
            r4 = 123(0x7b, float:1.72E-43)
            if (r3 == r4) goto L5a
            r4 = 125(0x7d, float:1.75E-43)
            if (r3 == r4) goto L5a
            r4 = 58
            if (r3 == r4) goto L5a
            r4 = 59
            if (r3 == r4) goto L4a
            switch(r3) {
                case 91: goto L5a;
                case 92: goto L4a;
                case 93: goto L5a;
                default: goto L47;
            }
        L47:
            int r2 = r2 + 1
            goto L3
        L4a:
            r7.f()
            goto L5a
        L4e:
            int r3 = r6.length
            if (r2 >= r3) goto L5c
            int r3 = r2 + 1
            boolean r3 = r7.m(r3)
            if (r3 == 0) goto L5a
            goto L3
        L5a:
            r1 = r2
            goto L7a
        L5c:
            if (r0 != 0) goto L69
            java.lang.StringBuilder r0 = new java.lang.StringBuilder
            r3 = 16
            int r3 = java.lang.Math.max(r2, r3)
            r0.<init>(r3)
        L69:
            int r3 = r7.f9568n
            r0.append(r6, r3, r2)
            int r3 = r7.f9568n
            int r3 = r3 + r2
            r7.f9568n = r3
            r2 = 1
            boolean r2 = r7.m(r2)
            if (r2 != 0) goto L2
        L7a:
            if (r0 != 0) goto L84
            java.lang.String r0 = new java.lang.String
            int r2 = r7.f9568n
            r0.<init>(r6, r2, r1)
            goto L8d
        L84:
            int r2 = r7.f9568n
            r0.append(r6, r2, r1)
            java.lang.String r0 = r0.toString()
        L8d:
            int r2 = r7.f9568n
            int r2 = r2 + r1
            r7.f9568n = r2
            return r0
        */
        throw new UnsupportedOperationException("Method not decompiled: q3.C0957b.F():java.lang.String");
    }

    public int G() {
        int iH = this.f9570r;
        if (iH == 0) {
            iH = h();
        }
        switch (iH) {
            case 1:
                return 3;
            case 2:
                return 4;
            case 3:
                return 1;
            case 4:
                return 2;
            case 5:
            case 6:
                return 8;
            case 7:
                return 9;
            case 8:
            case AndroidTouchProcessor.PointerChange.PAN_ZOOM_END /* 9 */:
            case FlutterTextUtils.LINE_FEED /* 10 */:
            case 11:
                return 6;
            case 12:
            case FlutterTextUtils.CARRIAGE_RETURN /* 13 */:
            case 14:
                return 5;
            case 15:
            case SentryFlutterPluginKt.VIDEO_BLOCK_SIZE /* 16 */:
                return 7;
            case 17:
                return 10;
            default:
                throw new AssertionError();
        }
    }

    public final void H(int i) {
        int i5 = this.f9575w;
        int[] iArr = this.f9574v;
        if (i5 == iArr.length) {
            int i6 = i5 * 2;
            this.f9574v = Arrays.copyOf(iArr, i6);
            this.f9577y = Arrays.copyOf(this.f9577y, i6);
            this.f9576x = (String[]) Arrays.copyOf(this.f9576x, i6);
        }
        int[] iArr2 = this.f9574v;
        int i7 = this.f9575w;
        this.f9575w = i7 + 1;
        iArr2[i7] = i;
    }

    public final char I() throws d {
        int i;
        if (this.f9568n == this.f9569o && !m(1)) {
            N("Unterminated escape sequence");
            throw null;
        }
        int i5 = this.f9568n;
        int i6 = i5 + 1;
        this.f9568n = i6;
        char[] cArr = this.f9567m;
        char c6 = cArr[i5];
        if (c6 == '\n') {
            this.p++;
            this.q = i6;
            return c6;
        }
        if (c6 == '\"' || c6 == '\'' || c6 == '/' || c6 == '\\') {
            return c6;
        }
        if (c6 == 'b') {
            return '\b';
        }
        if (c6 == 'f') {
            return '\f';
        }
        if (c6 == 'n') {
            return '\n';
        }
        if (c6 == 'r') {
            return '\r';
        }
        if (c6 == 't') {
            return '\t';
        }
        if (c6 != 'u') {
            N("Invalid escape sequence");
            throw null;
        }
        if (i5 + 5 > this.f9569o && !m(4)) {
            N("Unterminated escape sequence");
            throw null;
        }
        int i7 = this.f9568n;
        int i8 = i7 + 4;
        char c7 = 0;
        while (i7 < i8) {
            char c8 = cArr[i7];
            char c9 = (char) (c7 << 4);
            if (c8 >= '0' && c8 <= '9') {
                i = c8 - '0';
            } else if (c8 >= 'a' && c8 <= 'f') {
                i = c8 - 'W';
            } else {
                if (c8 < 'A' || c8 > 'F') {
                    throw new NumberFormatException("\\u".concat(new String(cArr, this.f9568n, 4)));
                }
                i = c8 - '7';
            }
            c7 = (char) (i + c9);
            i7++;
        }
        this.f9568n += 4;
        return c7;
    }

    public final void J(char c6) throws d {
        do {
            int i = this.f9568n;
            int i5 = this.f9569o;
            while (i < i5) {
                int i6 = i + 1;
                char c7 = this.f9567m[i];
                if (c7 == c6) {
                    this.f9568n = i6;
                    return;
                }
                if (c7 == '\\') {
                    this.f9568n = i6;
                    I();
                    i = this.f9568n;
                    i5 = this.f9569o;
                } else {
                    if (c7 == '\n') {
                        this.p++;
                        this.q = i6;
                    }
                    i = i6;
                }
            }
            this.f9568n = i;
        } while (m(1));
        N("Unterminated string");
        throw null;
    }

    public final void K() {
        char c6;
        do {
            if (this.f9568n >= this.f9569o && !m(1)) {
                return;
            }
            int i = this.f9568n;
            int i5 = i + 1;
            this.f9568n = i5;
            c6 = this.f9567m[i];
            if (c6 == '\n') {
                this.p++;
                this.q = i5;
                return;
            }
        } while (c6 != '\r');
    }

    /* JADX WARN: Code restructure failed: missing block: B:33:0x0048, code lost:
    
        f();
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public final void L() throws q3.d {
        /*
            r4 = this;
        L0:
            r0 = 0
        L1:
            int r1 = r4.f9568n
            int r2 = r1 + r0
            int r3 = r4.f9569o
            if (r2 >= r3) goto L51
            char[] r2 = r4.f9567m
            int r1 = r1 + r0
            char r1 = r2[r1]
            r2 = 9
            if (r1 == r2) goto L4b
            r2 = 10
            if (r1 == r2) goto L4b
            r2 = 12
            if (r1 == r2) goto L4b
            r2 = 13
            if (r1 == r2) goto L4b
            r2 = 32
            if (r1 == r2) goto L4b
            r2 = 35
            if (r1 == r2) goto L48
            r2 = 44
            if (r1 == r2) goto L4b
            r2 = 47
            if (r1 == r2) goto L48
            r2 = 61
            if (r1 == r2) goto L48
            r2 = 123(0x7b, float:1.72E-43)
            if (r1 == r2) goto L4b
            r2 = 125(0x7d, float:1.75E-43)
            if (r1 == r2) goto L4b
            r2 = 58
            if (r1 == r2) goto L4b
            r2 = 59
            if (r1 == r2) goto L48
            switch(r1) {
                case 91: goto L4b;
                case 92: goto L48;
                case 93: goto L4b;
                default: goto L45;
            }
        L45:
            int r0 = r0 + 1
            goto L1
        L48:
            r4.f()
        L4b:
            int r1 = r4.f9568n
            int r1 = r1 + r0
            r4.f9568n = r1
            return
        L51:
            int r1 = r1 + r0
            r4.f9568n = r1
            r0 = 1
            boolean r0 = r4.m(r0)
            if (r0 != 0) goto L0
            return
        */
        throw new UnsupportedOperationException("Method not decompiled: q3.C0957b.L():void");
    }

    /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
    public void M() throws IOException {
        int i = 0;
        do {
            int iH = this.f9570r;
            if (iH == 0) {
                iH = h();
            }
            switch (iH) {
                case 1:
                    H(3);
                    i++;
                    this.f9570r = 0;
                    break;
                case 2:
                    if (i == 0) {
                        this.f9576x[this.f9575w - 1] = null;
                    }
                    this.f9575w--;
                    i--;
                    this.f9570r = 0;
                    break;
                case 3:
                    H(1);
                    i++;
                    this.f9570r = 0;
                    break;
                case 4:
                    this.f9575w--;
                    i--;
                    this.f9570r = 0;
                    break;
                case 5:
                case 6:
                case 7:
                case 11:
                case 15:
                default:
                    this.f9570r = 0;
                    break;
                case 8:
                    J('\'');
                    this.f9570r = 0;
                    break;
                case AndroidTouchProcessor.PointerChange.PAN_ZOOM_END /* 9 */:
                    J('\"');
                    this.f9570r = 0;
                    break;
                case FlutterTextUtils.LINE_FEED /* 10 */:
                    L();
                    this.f9570r = 0;
                    break;
                case 12:
                    J('\'');
                    if (i == 0) {
                        this.f9576x[this.f9575w - 1] = "<skipped>";
                    }
                    this.f9570r = 0;
                    break;
                case FlutterTextUtils.CARRIAGE_RETURN /* 13 */:
                    J('\"');
                    if (i == 0) {
                        this.f9576x[this.f9575w - 1] = "<skipped>";
                    }
                    this.f9570r = 0;
                    break;
                case 14:
                    L();
                    if (i == 0) {
                        this.f9576x[this.f9575w - 1] = "<skipped>";
                    }
                    this.f9570r = 0;
                    break;
                case SentryFlutterPluginKt.VIDEO_BLOCK_SIZE /* 16 */:
                    this.f9568n += this.f9572t;
                    this.f9570r = 0;
                    break;
                case 17:
                    break;
            }
            return;
        } while (i > 0);
        int[] iArr = this.f9577y;
        int i5 = this.f9575w - 1;
        iArr[i5] = iArr[i5] + 1;
    }

    public final void N(String str) throws d {
        StringBuilder sbB = e.b(str);
        sbB.append(v());
        throw new d(sbB.toString());
    }

    public void a() throws IOException {
        int iH = this.f9570r;
        if (iH == 0) {
            iH = h();
        }
        if (iH == 3) {
            H(1);
            this.f9577y[this.f9575w - 1] = 0;
            this.f9570r = 0;
        } else {
            throw new IllegalStateException("Expected BEGIN_ARRAY but was " + AbstractC0928a.A(G()) + v());
        }
    }

    @Override // java.io.Closeable, java.lang.AutoCloseable
    public void close() throws IOException {
        this.f9570r = 0;
        this.f9574v[0] = 8;
        this.f9575w = 1;
        this.f9565k.close();
    }

    public void e() throws IOException {
        int iH = this.f9570r;
        if (iH == 0) {
            iH = h();
        }
        if (iH == 1) {
            H(3);
            this.f9570r = 0;
        } else {
            throw new IllegalStateException("Expected BEGIN_OBJECT but was " + AbstractC0928a.A(G()) + v());
        }
    }

    public final void f() throws d {
        if (this.f9566l) {
            return;
        }
        N("Use JsonReader.setLenient(true) to accept malformed JSON");
        throw null;
    }

    /* JADX WARN: Code restructure failed: missing block: B:165:0x020f, code lost:
    
        if (u(r7) != false) goto L121;
     */
    /* JADX WARN: Removed duplicated region for block: B:115:0x017f A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:116:0x0180  */
    /* JADX WARN: Removed duplicated region for block: B:128:0x01b1  */
    /* JADX WARN: Removed duplicated region for block: B:200:0x025e  */
    /* JADX WARN: Removed duplicated region for block: B:204:0x0267 A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:205:0x0268  */
    /* JADX WARN: Removed duplicated region for block: B:228:0x02aa  */
    /* JADX WARN: Removed duplicated region for block: B:66:0x00ea  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct code enable 'Show inconsistent code' option in preferences
    */
    public final int h() throws java.io.IOException {
        /*
            Method dump skipped, instruction units count: 783
            To view this dump change 'Code comments level' option to 'DEBUG'
        */
        throw new UnsupportedOperationException("Method not decompiled: q3.C0957b.h():int");
    }

    public void k() throws IOException {
        int iH = this.f9570r;
        if (iH == 0) {
            iH = h();
        }
        if (iH != 4) {
            throw new IllegalStateException("Expected END_ARRAY but was " + AbstractC0928a.A(G()) + v());
        }
        int i = this.f9575w;
        this.f9575w = i - 1;
        int[] iArr = this.f9577y;
        int i5 = i - 2;
        iArr[i5] = iArr[i5] + 1;
        this.f9570r = 0;
    }

    public void l() throws IOException {
        int iH = this.f9570r;
        if (iH == 0) {
            iH = h();
        }
        if (iH != 2) {
            throw new IllegalStateException("Expected END_OBJECT but was " + AbstractC0928a.A(G()) + v());
        }
        int i = this.f9575w;
        int i5 = i - 1;
        this.f9575w = i5;
        this.f9576x[i5] = null;
        int[] iArr = this.f9577y;
        int i6 = i - 2;
        iArr[i6] = iArr[i6] + 1;
        this.f9570r = 0;
    }

    public final boolean m(int i) throws IOException {
        int i5;
        int i6;
        int i7 = this.q;
        int i8 = this.f9568n;
        this.q = i7 - i8;
        int i9 = this.f9569o;
        char[] cArr = this.f9567m;
        if (i9 != i8) {
            int i10 = i9 - i8;
            this.f9569o = i10;
            System.arraycopy(cArr, i8, cArr, 0, i10);
        } else {
            this.f9569o = 0;
        }
        this.f9568n = 0;
        do {
            int i11 = this.f9569o;
            int i12 = this.f9565k.read(cArr, i11, cArr.length - i11);
            if (i12 == -1) {
                return false;
            }
            i5 = this.f9569o + i12;
            this.f9569o = i5;
            if (this.p == 0 && (i6 = this.q) == 0 && i5 > 0 && cArr[0] == 65279) {
                this.f9568n++;
                this.q = i6 + 1;
                i++;
            }
        } while (i5 < i);
        return true;
    }

    public String n() {
        return o(false);
    }

    public final String o(boolean z5) {
        StringBuilder sb = new StringBuilder("$");
        int i = 0;
        while (true) {
            int i5 = this.f9575w;
            if (i >= i5) {
                return sb.toString();
            }
            int i6 = this.f9574v[i];
            if (i6 == 1 || i6 == 2) {
                int i7 = this.f9577y[i];
                if (z5 && i7 > 0 && i == i5 - 1) {
                    i7--;
                }
                sb.append('[');
                sb.append(i7);
                sb.append(']');
            } else if (i6 == 3 || i6 == 4 || i6 == 5) {
                sb.append('.');
                String str = this.f9576x[i];
                if (str != null) {
                    sb.append(str);
                }
            }
            i++;
        }
    }

    public String r() {
        return o(true);
    }

    public boolean t() throws IOException {
        int iH = this.f9570r;
        if (iH == 0) {
            iH = h();
        }
        return (iH == 2 || iH == 4 || iH == 17) ? false : true;
    }

    public String toString() {
        return getClass().getSimpleName() + v();
    }

    public final boolean u(char c6) throws d {
        if (c6 == '\t' || c6 == '\n' || c6 == '\f' || c6 == '\r' || c6 == ' ') {
            return false;
        }
        if (c6 != '#') {
            if (c6 == ',') {
                return false;
            }
            if (c6 != '/' && c6 != '=') {
                if (c6 == '{' || c6 == '}' || c6 == ':') {
                    return false;
                }
                if (c6 != ';') {
                    switch (c6) {
                        case '[':
                        case ']':
                            return false;
                        case '\\':
                            break;
                        default:
                            return true;
                    }
                }
            }
        }
        f();
        return false;
    }

    final String v() {
        return " at line " + (this.p + 1) + " column " + ((this.f9568n - this.q) + 1) + " path " + n();
    }

    public boolean w() throws IOException {
        int iH = this.f9570r;
        if (iH == 0) {
            iH = h();
        }
        if (iH == 5) {
            this.f9570r = 0;
            int[] iArr = this.f9577y;
            int i = this.f9575w - 1;
            iArr[i] = iArr[i] + 1;
            return true;
        }
        if (iH != 6) {
            throw new IllegalStateException("Expected a boolean but was " + AbstractC0928a.A(G()) + v());
        }
        this.f9570r = 0;
        int[] iArr2 = this.f9577y;
        int i5 = this.f9575w - 1;
        iArr2[i5] = iArr2[i5] + 1;
        return false;
    }

    public double x() throws IOException {
        int iH = this.f9570r;
        if (iH == 0) {
            iH = h();
        }
        if (iH == 15) {
            this.f9570r = 0;
            int[] iArr = this.f9577y;
            int i = this.f9575w - 1;
            iArr[i] = iArr[i] + 1;
            return this.f9571s;
        }
        if (iH == 16) {
            this.f9573u = new String(this.f9567m, this.f9568n, this.f9572t);
            this.f9568n += this.f9572t;
        } else if (iH == 8 || iH == 9) {
            this.f9573u = D(iH == 8 ? '\'' : '\"');
        } else if (iH == 10) {
            this.f9573u = F();
        } else if (iH != 11) {
            throw new IllegalStateException("Expected a double but was " + AbstractC0928a.A(G()) + v());
        }
        this.f9570r = 11;
        double d3 = Double.parseDouble(this.f9573u);
        if (!this.f9566l && (Double.isNaN(d3) || Double.isInfinite(d3))) {
            throw new d("JSON forbids NaN and infinities: " + d3 + v());
        }
        this.f9573u = null;
        this.f9570r = 0;
        int[] iArr2 = this.f9577y;
        int i5 = this.f9575w - 1;
        iArr2[i5] = iArr2[i5] + 1;
        return d3;
    }

    public int y() throws IOException {
        int iH = this.f9570r;
        if (iH == 0) {
            iH = h();
        }
        if (iH == 15) {
            long j5 = this.f9571s;
            int i = (int) j5;
            if (j5 != i) {
                throw new NumberFormatException("Expected an int but was " + this.f9571s + v());
            }
            this.f9570r = 0;
            int[] iArr = this.f9577y;
            int i5 = this.f9575w - 1;
            iArr[i5] = iArr[i5] + 1;
            return i;
        }
        if (iH == 16) {
            this.f9573u = new String(this.f9567m, this.f9568n, this.f9572t);
            this.f9568n += this.f9572t;
        } else {
            if (iH != 8 && iH != 9 && iH != 10) {
                throw new IllegalStateException("Expected an int but was " + AbstractC0928a.A(G()) + v());
            }
            if (iH == 10) {
                this.f9573u = F();
            } else {
                this.f9573u = D(iH == 8 ? '\'' : '\"');
            }
            try {
                int i6 = Integer.parseInt(this.f9573u);
                this.f9570r = 0;
                int[] iArr2 = this.f9577y;
                int i7 = this.f9575w - 1;
                iArr2[i7] = iArr2[i7] + 1;
                return i6;
            } catch (NumberFormatException unused) {
            }
        }
        this.f9570r = 11;
        double d3 = Double.parseDouble(this.f9573u);
        int i8 = (int) d3;
        if (i8 != d3) {
            throw new NumberFormatException("Expected an int but was " + this.f9573u + v());
        }
        this.f9573u = null;
        this.f9570r = 0;
        int[] iArr3 = this.f9577y;
        int i9 = this.f9575w - 1;
        iArr3[i9] = iArr3[i9] + 1;
        return i8;
    }

    public long z() throws IOException {
        int iH = this.f9570r;
        if (iH == 0) {
            iH = h();
        }
        if (iH == 15) {
            this.f9570r = 0;
            int[] iArr = this.f9577y;
            int i = this.f9575w - 1;
            iArr[i] = iArr[i] + 1;
            return this.f9571s;
        }
        if (iH == 16) {
            this.f9573u = new String(this.f9567m, this.f9568n, this.f9572t);
            this.f9568n += this.f9572t;
        } else {
            if (iH != 8 && iH != 9 && iH != 10) {
                throw new IllegalStateException("Expected a long but was " + AbstractC0928a.A(G()) + v());
            }
            if (iH == 10) {
                this.f9573u = F();
            } else {
                this.f9573u = D(iH == 8 ? '\'' : '\"');
            }
            try {
                long j5 = Long.parseLong(this.f9573u);
                this.f9570r = 0;
                int[] iArr2 = this.f9577y;
                int i5 = this.f9575w - 1;
                iArr2[i5] = iArr2[i5] + 1;
                return j5;
            } catch (NumberFormatException unused) {
            }
        }
        this.f9570r = 11;
        double d3 = Double.parseDouble(this.f9573u);
        long j6 = (long) d3;
        if (j6 != d3) {
            throw new NumberFormatException("Expected a long but was " + this.f9573u + v());
        }
        this.f9573u = null;
        this.f9570r = 0;
        int[] iArr3 = this.f9577y;
        int i6 = this.f9575w - 1;
        iArr3[i6] = iArr3[i6] + 1;
        return j6;
    }
}
