package c.b.a.w;

import c.b.a.u.p;
import com.cvte.vman.instance.InvokeCmd;
import java.io.Closeable;
import java.io.IOException;
import java.io.Reader;
import java.util.Arrays;
import java.util.Objects;

/* JADX INFO: loaded from: classes.dex */
public class a implements Closeable {

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

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

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

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

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

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public int f1389f = 0;
    public int g = 0;
    public int h = 0;
    public long i;
    public int j;
    public String k;
    public int[] l;
    public int m;
    public String[] n;
    public int[] o;

    /* JADX INFO: renamed from: c.b.a.w.a$a, reason: collision with other inner class name */
    public class C0028a extends p {
    }

    static {
        p.f1348a = new C0028a();
    }

    public a(Reader reader) {
        int[] iArr = new int[32];
        this.l = iArr;
        this.m = 0;
        this.m = 0 + 1;
        iArr[0] = 6;
        this.n = new String[32];
        this.o = new int[32];
        Objects.requireNonNull(reader, "in == null");
        this.f1384a = reader;
    }

    /* JADX WARN: Code restructure failed: missing block: B:63:0x0099, code lost:
    
        c();
     */
    /* JADX WARN: Failed to find 'out' block for switch in B:61:0x0093. Please report as an issue. */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public void A() throws java.io.IOException {
        /*
            Method dump skipped, instruction units count: 204
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: c.b.a.w.a.A():void");
    }

    public final IOException B(String str) throws d {
        StringBuilder sbD = c.a.a.a.a.d(str);
        sbD.append(k());
        throw new d(sbD.toString());
    }

    public void a() throws IOException {
        int iD = this.h;
        if (iD == 0) {
            iD = d();
        }
        if (iD == 3) {
            w(1);
            this.o[this.m - 1] = 0;
            this.h = 0;
        } else {
            StringBuilder sbD = c.a.a.a.a.d("Expected BEGIN_ARRAY but was ");
            sbD.append(v());
            sbD.append(k());
            throw new IllegalStateException(sbD.toString());
        }
    }

    public void b() throws IOException {
        int iD = this.h;
        if (iD == 0) {
            iD = d();
        }
        if (iD == 1) {
            w(3);
            this.h = 0;
        } else {
            StringBuilder sbD = c.a.a.a.a.d("Expected BEGIN_OBJECT but was ");
            sbD.append(v());
            sbD.append(k());
            throw new IllegalStateException(sbD.toString());
        }
    }

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

    @Override // java.io.Closeable, java.lang.AutoCloseable
    public void close() throws IOException {
        this.h = 0;
        this.l[0] = 8;
        this.m = 1;
        this.f1384a.close();
    }

    /* JADX WARN: Code restructure failed: missing block: B:166:0x0213, code lost:
    
        if (j(r1) != false) goto L120;
     */
    /* JADX WARN: Removed duplicated region for block: B:114:0x0180 A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:115:0x0181  */
    /* JADX WARN: Removed duplicated region for block: B:127:0x01b1  */
    /* JADX WARN: Removed duplicated region for block: B:202:0x0263  */
    /* JADX WARN: Removed duplicated region for block: B:208:0x026f A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:209:0x0270  */
    /* JADX WARN: Removed duplicated region for block: B:220:0x0295  */
    /* JADX WARN: Removed duplicated region for block: B:228:0x02b4  */
    /* JADX WARN: Removed duplicated region for block: B:243:0x02e6  */
    /* JADX WARN: Removed duplicated region for block: B:258:0x0317  */
    /* JADX WARN: Removed duplicated region for block: B:67:0x00e7  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public int d() throws java.io.IOException {
        /*
            Method dump skipped, instruction units count: 795
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: c.b.a.w.a.d():int");
    }

    public void e() throws IOException {
        int iD = this.h;
        if (iD == 0) {
            iD = d();
        }
        if (iD != 4) {
            StringBuilder sbD = c.a.a.a.a.d("Expected END_ARRAY but was ");
            sbD.append(v());
            sbD.append(k());
            throw new IllegalStateException(sbD.toString());
        }
        int i = this.m - 1;
        this.m = i;
        int[] iArr = this.o;
        int i2 = i - 1;
        iArr[i2] = iArr[i2] + 1;
        this.h = 0;
    }

    public void f() throws IOException {
        int iD = this.h;
        if (iD == 0) {
            iD = d();
        }
        if (iD != 2) {
            StringBuilder sbD = c.a.a.a.a.d("Expected END_OBJECT but was ");
            sbD.append(v());
            sbD.append(k());
            throw new IllegalStateException(sbD.toString());
        }
        int i = this.m - 1;
        this.m = i;
        this.n[i] = null;
        int[] iArr = this.o;
        int i2 = i - 1;
        iArr[i2] = iArr[i2] + 1;
        this.h = 0;
    }

    public final boolean g(int i) throws IOException {
        int i2;
        int i3;
        char[] cArr = this.f1386c;
        int i4 = this.g;
        int i5 = this.f1387d;
        this.g = i4 - i5;
        int i6 = this.f1388e;
        if (i6 != i5) {
            int i7 = i6 - i5;
            this.f1388e = i7;
            System.arraycopy(cArr, i5, cArr, 0, i7);
        } else {
            this.f1388e = 0;
        }
        this.f1387d = 0;
        do {
            Reader reader = this.f1384a;
            int i8 = this.f1388e;
            int i9 = reader.read(cArr, i8, cArr.length - i8);
            if (i9 == -1) {
                return false;
            }
            i2 = this.f1388e + i9;
            this.f1388e = i2;
            if (this.f1389f == 0 && (i3 = this.g) == 0 && i2 > 0 && cArr[0] == 65279) {
                this.f1387d++;
                this.g = i3 + 1;
                i++;
            }
        } while (i2 < i);
        return true;
    }

    public String h() {
        StringBuilder sb = new StringBuilder();
        sb.append('$');
        int i = this.m;
        for (int i2 = 0; i2 < i; i2++) {
            int i3 = this.l[i2];
            if (i3 == 1 || i3 == 2) {
                sb.append('[');
                sb.append(this.o[i2]);
                sb.append(']');
            } else if (i3 == 3 || i3 == 4 || i3 == 5) {
                sb.append('.');
                String[] strArr = this.n;
                if (strArr[i2] != null) {
                    sb.append(strArr[i2]);
                }
            }
        }
        return sb.toString();
    }

    public boolean i() throws IOException {
        int iD = this.h;
        if (iD == 0) {
            iD = d();
        }
        return (iD == 2 || iD == 4) ? false : true;
    }

    public final boolean j(char c2) throws d {
        if (c2 == '\t' || c2 == '\n' || c2 == '\f' || c2 == '\r' || c2 == ' ') {
            return false;
        }
        if (c2 != '#') {
            if (c2 == ',') {
                return false;
            }
            if (c2 != '/' && c2 != '=') {
                if (c2 == '{' || c2 == '}' || c2 == ':') {
                    return false;
                }
                if (c2 != ';') {
                    switch (c2) {
                        case InvokeCmd.CMD_SYSTEMCTRL_SET_2K_APPS /* 91 */:
                        case InvokeCmd.CMD_SYSTEMCTRL_KILL_APP /* 93 */:
                            return false;
                        case InvokeCmd.CMD_SYSTEMCTRL_GET_2K_APPS /* 92 */:
                            break;
                        default:
                            return true;
                    }
                }
            }
        }
        c();
        return false;
    }

    public String k() {
        return " at line " + (this.f1389f + 1) + " column " + ((this.f1387d - this.g) + 1) + " path " + h();
    }

    public boolean l() throws IOException {
        int iD = this.h;
        if (iD == 0) {
            iD = d();
        }
        if (iD == 5) {
            this.h = 0;
            int[] iArr = this.o;
            int i = this.m - 1;
            iArr[i] = iArr[i] + 1;
            return true;
        }
        if (iD != 6) {
            StringBuilder sbD = c.a.a.a.a.d("Expected a boolean but was ");
            sbD.append(v());
            sbD.append(k());
            throw new IllegalStateException(sbD.toString());
        }
        this.h = 0;
        int[] iArr2 = this.o;
        int i2 = this.m - 1;
        iArr2[i2] = iArr2[i2] + 1;
        return false;
    }

    public double m() throws IOException {
        String strS;
        int iD = this.h;
        if (iD == 0) {
            iD = d();
        }
        if (iD == 15) {
            this.h = 0;
            int[] iArr = this.o;
            int i = this.m - 1;
            iArr[i] = iArr[i] + 1;
            return this.i;
        }
        if (iD == 16) {
            this.k = new String(this.f1386c, this.f1387d, this.j);
            this.f1387d += this.j;
        } else {
            if (iD == 8 || iD == 9) {
                strS = s(iD == 8 ? '\'' : '\"');
            } else if (iD == 10) {
                strS = u();
            } else if (iD != 11) {
                StringBuilder sbD = c.a.a.a.a.d("Expected a double but was ");
                sbD.append(v());
                sbD.append(k());
                throw new IllegalStateException(sbD.toString());
            }
            this.k = strS;
        }
        this.h = 11;
        double d2 = Double.parseDouble(this.k);
        if (!this.f1385b && (Double.isNaN(d2) || Double.isInfinite(d2))) {
            throw new d("JSON forbids NaN and infinities: " + d2 + k());
        }
        this.k = null;
        this.h = 0;
        int[] iArr2 = this.o;
        int i2 = this.m - 1;
        iArr2[i2] = iArr2[i2] + 1;
        return d2;
    }

    public int n() throws IOException {
        String strS;
        int iD = this.h;
        if (iD == 0) {
            iD = d();
        }
        if (iD == 15) {
            long j = this.i;
            int i = (int) j;
            if (j != i) {
                StringBuilder sbD = c.a.a.a.a.d("Expected an int but was ");
                sbD.append(this.i);
                sbD.append(k());
                throw new NumberFormatException(sbD.toString());
            }
            this.h = 0;
            int[] iArr = this.o;
            int i2 = this.m - 1;
            iArr[i2] = iArr[i2] + 1;
            return i;
        }
        if (iD == 16) {
            this.k = new String(this.f1386c, this.f1387d, this.j);
            this.f1387d += this.j;
        } else {
            if (iD != 8 && iD != 9 && iD != 10) {
                StringBuilder sbD2 = c.a.a.a.a.d("Expected an int but was ");
                sbD2.append(v());
                sbD2.append(k());
                throw new IllegalStateException(sbD2.toString());
            }
            if (iD == 10) {
                strS = u();
            } else {
                strS = s(iD == 8 ? '\'' : '\"');
            }
            this.k = strS;
            try {
                int i3 = Integer.parseInt(this.k);
                this.h = 0;
                int[] iArr2 = this.o;
                int i4 = this.m - 1;
                iArr2[i4] = iArr2[i4] + 1;
                return i3;
            } catch (NumberFormatException unused) {
            }
        }
        this.h = 11;
        double d2 = Double.parseDouble(this.k);
        int i5 = (int) d2;
        if (i5 != d2) {
            StringBuilder sbD3 = c.a.a.a.a.d("Expected an int but was ");
            sbD3.append(this.k);
            sbD3.append(k());
            throw new NumberFormatException(sbD3.toString());
        }
        this.k = null;
        this.h = 0;
        int[] iArr3 = this.o;
        int i6 = this.m - 1;
        iArr3[i6] = iArr3[i6] + 1;
        return i5;
    }

    public long o() throws IOException {
        String strS;
        int iD = this.h;
        if (iD == 0) {
            iD = d();
        }
        if (iD == 15) {
            this.h = 0;
            int[] iArr = this.o;
            int i = this.m - 1;
            iArr[i] = iArr[i] + 1;
            return this.i;
        }
        if (iD == 16) {
            this.k = new String(this.f1386c, this.f1387d, this.j);
            this.f1387d += this.j;
        } else {
            if (iD != 8 && iD != 9 && iD != 10) {
                StringBuilder sbD = c.a.a.a.a.d("Expected a long but was ");
                sbD.append(v());
                sbD.append(k());
                throw new IllegalStateException(sbD.toString());
            }
            if (iD == 10) {
                strS = u();
            } else {
                strS = s(iD == 8 ? '\'' : '\"');
            }
            this.k = strS;
            try {
                long j = Long.parseLong(this.k);
                this.h = 0;
                int[] iArr2 = this.o;
                int i2 = this.m - 1;
                iArr2[i2] = iArr2[i2] + 1;
                return j;
            } catch (NumberFormatException unused) {
            }
        }
        this.h = 11;
        double d2 = Double.parseDouble(this.k);
        long j2 = (long) d2;
        if (j2 != d2) {
            StringBuilder sbD2 = c.a.a.a.a.d("Expected a long but was ");
            sbD2.append(this.k);
            sbD2.append(k());
            throw new NumberFormatException(sbD2.toString());
        }
        this.k = null;
        this.h = 0;
        int[] iArr3 = this.o;
        int i3 = this.m - 1;
        iArr3[i3] = iArr3[i3] + 1;
        return j2;
    }

    public String p() throws IOException {
        char c2;
        String strS;
        int iD = this.h;
        if (iD == 0) {
            iD = d();
        }
        if (iD == 14) {
            strS = u();
        } else {
            if (iD == 12) {
                c2 = '\'';
            } else {
                if (iD != 13) {
                    StringBuilder sbD = c.a.a.a.a.d("Expected a name but was ");
                    sbD.append(v());
                    sbD.append(k());
                    throw new IllegalStateException(sbD.toString());
                }
                c2 = '\"';
            }
            strS = s(c2);
        }
        this.h = 0;
        this.n[this.m - 1] = strS;
        return strS;
    }

    /* JADX WARN: Code restructure failed: missing block: B:26:0x0051, code lost:
    
        if (r1 != '/') goto L69;
     */
    /* JADX WARN: Code restructure failed: missing block: B:27:0x0053, code lost:
    
        r9.f1387d = r4;
     */
    /* JADX WARN: Code restructure failed: missing block: B:28:0x0056, code lost:
    
        if (r4 != r2) goto L32;
     */
    /* JADX WARN: Code restructure failed: missing block: B:29:0x0058, code lost:
    
        r9.f1387d = r4 - 1;
        r2 = g(2);
        r9.f1387d++;
     */
    /* JADX WARN: Code restructure failed: missing block: B:30:0x0065, code lost:
    
        if (r2 != false) goto L32;
     */
    /* JADX WARN: Code restructure failed: missing block: B:31:0x0067, code lost:
    
        return r1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:32:0x0068, code lost:
    
        c();
        r2 = r9.f1387d;
        r4 = r0[r2];
     */
    /* JADX WARN: Code restructure failed: missing block: B:33:0x0071, code lost:
    
        if (r4 == '*') goto L37;
     */
    /* JADX WARN: Code restructure failed: missing block: B:34:0x0073, code lost:
    
        if (r4 == '/') goto L36;
     */
    /* JADX WARN: Code restructure failed: missing block: B:35:0x0075, code lost:
    
        return r1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:36:0x0076, code lost:
    
        r9.f1387d = r2 + 1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:37:0x007b, code lost:
    
        r9.f1387d = r2 + 1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:38:0x007f, code lost:
    
        r4 = 0;
     */
    /* JADX WARN: Code restructure failed: missing block: B:39:0x0085, code lost:
    
        if ((r9.f1387d + 2) <= r9.f1388e) goto L44;
     */
    /* JADX WARN: Code restructure failed: missing block: B:41:0x008b, code lost:
    
        if (g(2) == false) goto L76;
     */
    /* JADX WARN: Code restructure failed: missing block: B:43:0x008e, code lost:
    
        r3 = false;
     */
    /* JADX WARN: Code restructure failed: missing block: B:44:0x0090, code lost:
    
        r1 = r9.f1386c;
        r2 = r9.f1387d;
     */
    /* JADX WARN: Code restructure failed: missing block: B:45:0x0096, code lost:
    
        if (r1[r2] != '\n') goto L47;
     */
    /* JADX WARN: Code restructure failed: missing block: B:46:0x0098, code lost:
    
        r9.f1389f++;
        r9.g = r2 + 1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:47:0x00a2, code lost:
    
        if (r4 >= 2) goto L77;
     */
    /* JADX WARN: Code restructure failed: missing block: B:49:0x00b1, code lost:
    
        if (r9.f1386c[r9.f1387d + r4] == "*\/".charAt(r4)) goto L51;
     */
    /* JADX WARN: Code restructure failed: missing block: B:50:0x00b3, code lost:
    
        r9.f1387d++;
     */
    /* JADX WARN: Code restructure failed: missing block: B:51:0x00b9, code lost:
    
        r4 = r4 + 1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:52:0x00bc, code lost:
    
        if (r3 == false) goto L65;
     */
    /* JADX WARN: Code restructure failed: missing block: B:54:0x00c3, code lost:
    
        B("Unterminated comment");
     */
    /* JADX WARN: Code restructure failed: missing block: B:55:0x00c9, code lost:
    
        throw null;
     */
    /* JADX WARN: Code restructure failed: missing block: B:56:0x00ca, code lost:
    
        r9.f1387d = r4;
     */
    /* JADX WARN: Code restructure failed: missing block: B:57:0x00ce, code lost:
    
        if (r1 != '#') goto L66;
     */
    /* JADX WARN: Code restructure failed: missing block: B:58:0x00d0, code lost:
    
        c();
     */
    /* JADX WARN: Code restructure failed: missing block: B:60:0x00d8, code lost:
    
        return r1;
     */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final int q(boolean r10) throws java.io.IOException {
        /*
            Method dump skipped, instruction units count: 220
            To view this dump add '--comments-level debug' option
        */
        throw new UnsupportedOperationException("Method not decompiled: c.b.a.w.a.q(boolean):int");
    }

    public void r() throws IOException {
        int iD = this.h;
        if (iD == 0) {
            iD = d();
        }
        if (iD != 7) {
            StringBuilder sbD = c.a.a.a.a.d("Expected null but was ");
            sbD.append(v());
            sbD.append(k());
            throw new IllegalStateException(sbD.toString());
        }
        this.h = 0;
        int[] iArr = this.o;
        int i = this.m - 1;
        iArr[i] = iArr[i] + 1;
    }

    public final String s(char c2) throws d {
        char[] cArr = this.f1386c;
        StringBuilder sb = null;
        while (true) {
            int i = this.f1387d;
            int i2 = this.f1388e;
            while (true) {
                if (i < i2) {
                    int i3 = i + 1;
                    char c3 = cArr[i];
                    if (c3 == c2) {
                        this.f1387d = i3;
                        int i4 = (i3 - i) - 1;
                        if (sb == null) {
                            return new String(cArr, i, i4);
                        }
                        sb.append(cArr, i, i4);
                        return sb.toString();
                    }
                    if (c3 == '\\') {
                        this.f1387d = i3;
                        int i5 = (i3 - i) - 1;
                        if (sb == null) {
                            sb = new StringBuilder(Math.max((i5 + 1) * 2, 16));
                        }
                        sb.append(cArr, i, i5);
                        sb.append(x());
                    } else {
                        if (c3 == '\n') {
                            this.f1389f++;
                            this.g = i3;
                        }
                        i = i3;
                    }
                } else {
                    if (sb == null) {
                        sb = new StringBuilder(Math.max((i - i) * 2, 16));
                    }
                    sb.append(cArr, i, i - i);
                    this.f1387d = i;
                    if (!g(1)) {
                        B("Unterminated string");
                        throw null;
                    }
                }
            }
        }
    }

    public String t() throws IOException {
        String str;
        char c2;
        int iD = this.h;
        if (iD == 0) {
            iD = d();
        }
        if (iD == 10) {
            str = u();
        } else {
            if (iD == 8) {
                c2 = '\'';
            } else if (iD == 9) {
                c2 = '\"';
            } else if (iD == 11) {
                str = this.k;
                this.k = null;
            } else if (iD == 15) {
                str = Long.toString(this.i);
            } else {
                if (iD != 16) {
                    StringBuilder sbD = c.a.a.a.a.d("Expected a string but was ");
                    sbD.append(v());
                    sbD.append(k());
                    throw new IllegalStateException(sbD.toString());
                }
                str = new String(this.f1386c, this.f1387d, this.j);
                this.f1387d += this.j;
            }
            str = s(c2);
        }
        this.h = 0;
        int[] iArr = this.o;
        int i = this.m - 1;
        iArr[i] = iArr[i] + 1;
        return str;
    }

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

    /* JADX WARN: Code restructure failed: missing block: B:34:0x004a, code lost:
    
        c();
     */
    /* 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:0x0080  */
    /* JADX WARN: Removed duplicated region for block: B:47:0x008a  */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
        To view partially-correct add '--show-bad-code' argument
    */
    public final java.lang.String u() throws c.b.a.w.d {
        /*
            r6 = this;
            r0 = 0
            r1 = 0
        L2:
            r2 = r0
        L3:
            int r3 = r6.f1387d
            int r4 = r3 + r2
            int r5 = r6.f1388e
            if (r4 >= r5) goto L4e
            char[] r4 = r6.f1386c
            int r3 = r3 + r2
            char r3 = r4[r3]
            r4 = 9
            if (r3 == r4) goto L5c
            r4 = 10
            if (r3 == r4) goto L5c
            r4 = 12
            if (r3 == r4) goto L5c
            r4 = 13
            if (r3 == r4) goto L5c
            r4 = 32
            if (r3 == r4) goto L5c
            r4 = 35
            if (r3 == r4) goto L4a
            r4 = 44
            if (r3 == r4) goto L5c
            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 L5c
            r4 = 125(0x7d, float:1.75E-43)
            if (r3 == r4) goto L5c
            r4 = 58
            if (r3 == r4) goto L5c
            r4 = 59
            if (r3 == r4) goto L4a
            switch(r3) {
                case 91: goto L5c;
                case 92: goto L4a;
                case 93: goto L5c;
                default: goto L47;
            }
        L47:
            int r2 = r2 + 1
            goto L3
        L4a:
            r6.c()
            goto L5c
        L4e:
            char[] r3 = r6.f1386c
            int r3 = r3.length
            if (r2 >= r3) goto L5e
            int r3 = r2 + 1
            boolean r3 = r6.g(r3)
            if (r3 == 0) goto L5c
            goto L3
        L5c:
            r0 = r2
            goto L7e
        L5e:
            if (r1 != 0) goto L6b
            java.lang.StringBuilder r1 = new java.lang.StringBuilder
            r3 = 16
            int r3 = java.lang.Math.max(r2, r3)
            r1.<init>(r3)
        L6b:
            char[] r3 = r6.f1386c
            int r4 = r6.f1387d
            r1.append(r3, r4, r2)
            int r3 = r6.f1387d
            int r3 = r3 + r2
            r6.f1387d = r3
            r2 = 1
            boolean r2 = r6.g(r2)
            if (r2 != 0) goto L2
        L7e:
            if (r1 != 0) goto L8a
            java.lang.String r1 = new java.lang.String
            char[] r2 = r6.f1386c
            int r3 = r6.f1387d
            r1.<init>(r2, r3, r0)
            goto L95
        L8a:
            char[] r2 = r6.f1386c
            int r3 = r6.f1387d
            r1.append(r2, r3, r0)
            java.lang.String r1 = r1.toString()
        L95:
            int r2 = r6.f1387d
            int r2 = r2 + r0
            r6.f1387d = r2
            return r1
        */
        throw new UnsupportedOperationException("Method not decompiled: c.b.a.w.a.u():java.lang.String");
    }

    public b v() {
        int iD = this.h;
        if (iD == 0) {
            iD = d();
        }
        switch (iD) {
            case 1:
                return b.BEGIN_OBJECT;
            case 2:
                return b.END_OBJECT;
            case 3:
                return b.BEGIN_ARRAY;
            case 4:
                return b.END_ARRAY;
            case 5:
            case 6:
                return b.BOOLEAN;
            case 7:
                return b.NULL;
            case 8:
            case 9:
            case 10:
            case 11:
                return b.STRING;
            case 12:
            case 13:
            case 14:
                return b.NAME;
            case 15:
            case 16:
                return b.NUMBER;
            case 17:
                return b.END_DOCUMENT;
            default:
                throw new AssertionError();
        }
    }

    public final void w(int i) {
        int i2 = this.m;
        int[] iArr = this.l;
        if (i2 == iArr.length) {
            int i3 = i2 * 2;
            this.l = Arrays.copyOf(iArr, i3);
            this.o = Arrays.copyOf(this.o, i3);
            this.n = (String[]) Arrays.copyOf(this.n, i3);
        }
        int[] iArr2 = this.l;
        int i4 = this.m;
        this.m = i4 + 1;
        iArr2[i4] = i;
    }

    public final char x() throws d {
        int i;
        int i2;
        if (this.f1387d == this.f1388e && !g(1)) {
            B("Unterminated escape sequence");
            throw null;
        }
        char[] cArr = this.f1386c;
        int i3 = this.f1387d;
        int i4 = i3 + 1;
        this.f1387d = i4;
        char c2 = cArr[i3];
        if (c2 == '\n') {
            this.f1389f++;
            this.g = i4;
        } else if (c2 != '\"' && c2 != '\'' && c2 != '/' && c2 != '\\') {
            if (c2 == 'b') {
                return '\b';
            }
            if (c2 == 'f') {
                return '\f';
            }
            if (c2 == 'n') {
                return '\n';
            }
            if (c2 == 'r') {
                return '\r';
            }
            if (c2 == 't') {
                return '\t';
            }
            if (c2 != 'u') {
                B("Invalid escape sequence");
                throw null;
            }
            if (i4 + 4 > this.f1388e && !g(4)) {
                B("Unterminated escape sequence");
                throw null;
            }
            char c3 = 0;
            int i5 = this.f1387d;
            int i6 = i5 + 4;
            while (i5 < i6) {
                char c4 = this.f1386c[i5];
                char c5 = (char) (c3 << 4);
                if (c4 < '0' || c4 > '9') {
                    if (c4 >= 'a' && c4 <= 'f') {
                        i = c4 - 'a';
                    } else {
                        if (c4 < 'A' || c4 > 'F') {
                            StringBuilder sbD = c.a.a.a.a.d("\\u");
                            sbD.append(new String(this.f1386c, this.f1387d, 4));
                            throw new NumberFormatException(sbD.toString());
                        }
                        i = c4 - 'A';
                    }
                    i2 = i + 10;
                } else {
                    i2 = c4 - '0';
                }
                c3 = (char) (i2 + c5);
                i5++;
            }
            this.f1387d += 4;
            return c3;
        }
        return c2;
    }

    public final void y(char c2) throws d {
        char[] cArr = this.f1386c;
        while (true) {
            int i = this.f1387d;
            int i2 = this.f1388e;
            while (true) {
                if (i < i2) {
                    int i3 = i + 1;
                    char c3 = cArr[i];
                    if (c3 == c2) {
                        this.f1387d = i3;
                        return;
                    }
                    if (c3 == '\\') {
                        this.f1387d = i3;
                        x();
                        break;
                    } else {
                        if (c3 == '\n') {
                            this.f1389f++;
                            this.g = i3;
                        }
                        i = i3;
                    }
                } else {
                    this.f1387d = i;
                    if (!g(1)) {
                        B("Unterminated string");
                        throw null;
                    }
                }
            }
        }
    }

    public final void z() {
        char c2;
        do {
            if (this.f1387d >= this.f1388e && !g(1)) {
                return;
            }
            char[] cArr = this.f1386c;
            int i = this.f1387d;
            int i2 = i + 1;
            this.f1387d = i2;
            c2 = cArr[i];
            if (c2 == '\n') {
                this.f1389f++;
                this.g = i2;
                return;
            }
        } while (c2 != '\r');
    }
}
