package defpackage;

import com.squareup.moshi.JsonDataException;
import com.squareup.moshi.JsonEncodingException;
import java.io.Closeable;
import java.io.EOFException;
import java.io.IOException;
import java.util.Arrays;

/* JADX INFO: renamed from: ᵷˁʟ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C4877 implements Closeable {

    /* JADX INFO: renamed from: ʿٴˇ, reason: contains not printable characters */
    public static final C1054 f18581;

    /* JADX INFO: renamed from: ˀᵭ, reason: contains not printable characters */
    public static final C1054 f18582;

    /* JADX INFO: renamed from: ˁˌᵩ, reason: contains not printable characters */
    public static final C1054 f18583;

    /* JADX INFO: renamed from: ˉᵵᵜ, reason: contains not printable characters */
    public static final C1054 f18584;

    /* JADX INFO: renamed from: ᵠˏˏ, reason: contains not printable characters */
    public static final C1054 f18585;

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public int f18587;

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public long f18588;

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public String f18589;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public final InterfaceC2322 f18593;

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public final C4903 f18594;

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public int f18595;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public int[] f18591 = new int[32];

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public String[] f18590 = new String[32];

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public int[] f18592 = new int[32];

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public int f18586 = 0;

    static {
        C1054 c1054 = new C1054("'\\".getBytes(AbstractC4490.f17115));
        c1054.f4545 = "'\\";
        f18581 = c1054;
        C1054 c10542 = new C1054("\"\\".getBytes(AbstractC4490.f17115));
        c10542.f4545 = "\"\\";
        f18585 = c10542;
        C1054 c10543 = new C1054("{}[]:, \n\t\r\f/\\;#=".getBytes(AbstractC4490.f17115));
        c10543.f4545 = "{}[]:, \n\t\r\f/\\;#=";
        f18584 = c10543;
        C1054 c10544 = new C1054("\n\r".getBytes(AbstractC4490.f17115));
        c10544.f4545 = "\n\r";
        f18583 = c10544;
        C1054 c10545 = new C1054("*/".getBytes(AbstractC4490.f17115));
        c10545.f4545 = "*/";
        f18582 = c10545;
    }

    public C4877(InterfaceC2322 interfaceC2322) {
        this.f18593 = interfaceC2322;
        this.f18594 = interfaceC2322.mo5357();
        m10140(6);
    }

    @Override // java.io.Closeable, java.lang.AutoCloseable
    public final void close() throws IOException {
        this.f18586 = 0;
        this.f18591[0] = 8;
        this.f18587 = 1;
        this.f18594.m10199();
        this.f18593.close();
    }

    public final String toString() {
        return "JsonReader(" + this.f18593 + ")";
    }

    /* JADX INFO: renamed from: ˀᵗ, reason: contains not printable characters */
    public final int m10120() throws EOFException, JsonEncodingException {
        int iM10142 = this.f18586;
        if (iM10142 == 0) {
            iM10142 = m10142();
        }
        if (iM10142 == 16) {
            long j = this.f18588;
            int i = (int) j;
            if (j == i) {
                this.f18586 = 0;
                int[] iArr = this.f18592;
                int i2 = this.f18587 - 1;
                iArr[i2] = iArr[i2] + 1;
                return i;
            }
            throw new JsonDataException("Expected an int but was " + this.f18588 + " at path " + m10131());
        }
        if (iM10142 == 17) {
            long j2 = this.f18595;
            C4903 c4903 = this.f18594;
            c4903.getClass();
            this.f18589 = c4903.m10195(j2, AbstractC4490.f17115);
        } else if (iM10142 == 9 || iM10142 == 8) {
            String strM10130 = iM10142 == 9 ? m10130(f18585) : m10130(f18581);
            this.f18589 = strM10130;
            try {
                int i3 = Integer.parseInt(strM10130);
                this.f18586 = 0;
                int[] iArr2 = this.f18592;
                int i4 = this.f18587 - 1;
                iArr2[i4] = iArr2[i4] + 1;
                return i3;
            } catch (NumberFormatException unused) {
            }
        } else if (iM10142 != 11) {
            C1685.m4564("Expected an int but was ", AbstractC0793.m2862(m10144()), m10131());
            return 0;
        }
        this.f18586 = 11;
        try {
            double d = Double.parseDouble(this.f18589);
            int i5 = (int) d;
            if (i5 != d) {
                C1685.m4564("Expected an int but was ", this.f18589, m10131());
                return 0;
            }
            this.f18589 = null;
            this.f18586 = 0;
            int[] iArr3 = this.f18592;
            int i6 = this.f18587 - 1;
            iArr3[i6] = iArr3[i6] + 1;
            return i5;
        } catch (NumberFormatException unused2) {
            C1685.m4564("Expected an int but was ", this.f18589, m10131());
            return 0;
        }
    }

    /* JADX INFO: renamed from: ˆʤᵳ, reason: contains not printable characters */
    public final void m10121() throws EOFException, JsonEncodingException {
        int iM10142 = this.f18586;
        if (iM10142 == 0) {
            iM10142 = m10142();
        }
        if (iM10142 == 14) {
            long jMo5342 = this.f18593.mo5342(f18584);
            C4903 c4903 = this.f18594;
            if (jMo5342 == -1) {
                jMo5342 = c4903.f18672;
            }
            c4903.skip(jMo5342);
        } else if (iM10142 == 13) {
            m10146(f18585);
        } else if (iM10142 == 12) {
            m10146(f18581);
        } else if (iM10142 != 15) {
            C1685.m4564("Expected a name but was ", AbstractC0793.m2862(m10144()), m10131());
            return;
        }
        this.f18586 = 0;
        this.f18590[this.f18587 - 1] = "null";
    }

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public final int m10122(String str, C3714 c3714) {
        int length = ((String[]) c3714.f14143).length;
        for (int i = 0; i < length; i++) {
            if (str.equals(((String[]) c3714.f14143)[i])) {
                this.f18586 = 0;
                this.f18590[this.f18587 - 1] = str;
                return i;
            }
        }
        return -1;
    }

    /* JADX INFO: renamed from: ˈⁱᵡ, reason: contains not printable characters */
    public final boolean m10123() throws EOFException, JsonEncodingException {
        int iM10142 = this.f18586;
        if (iM10142 == 0) {
            iM10142 = m10142();
        }
        return (iM10142 == 2 || iM10142 == 4 || iM10142 == 18) ? false : true;
    }

    /* JADX WARN: Code restructure failed: missing block: B:15:0x0026, code lost:
    
        r1.skip(r3);
        r2 = defpackage.C4877.f18583;
     */
    /* JADX WARN: Code restructure failed: missing block: B:16:0x0031, code lost:
    
        if (r6 != 47) goto L56;
     */
    /* JADX WARN: Code restructure failed: missing block: B:18:0x0039, code lost:
    
        if (r5.request(2) != false) goto L20;
     */
    /* JADX WARN: Code restructure failed: missing block: B:20:0x003d, code lost:
    
        m10137();
        r10 = r1.m10213(1);
     */
    /* JADX WARN: Code restructure failed: missing block: B:21:0x0046, code lost:
    
        if (r10 == 42) goto L58;
     */
    /* JADX WARN: Code restructure failed: missing block: B:22:0x0048, code lost:
    
        if (r10 == 47) goto L24;
     */
    /* JADX WARN: Code restructure failed: missing block: B:24:0x004b, code lost:
    
        r1.readByte();
        r1.readByte();
        r5 = r5.mo5342(r2);
     */
    /* JADX WARN: Code restructure failed: missing block: B:25:0x0057, code lost:
    
        if (r5 == (-1)) goto L27;
     */
    /* JADX WARN: Code restructure failed: missing block: B:26:0x0059, code lost:
    
        r5 = r5 + 1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:27:0x005b, code lost:
    
        r5 = r1.f18672;
     */
    /* JADX WARN: Code restructure failed: missing block: B:28:0x005d, code lost:
    
        r1.skip(r5);
     */
    /* JADX WARN: Code restructure failed: missing block: B:29:0x0061, code lost:
    
        r1.readByte();
        r1.readByte();
        r2 = defpackage.C4877.f18582;
        r5 = r5.mo5341(r2);
     */
    /* JADX WARN: Code restructure failed: missing block: B:30:0x006f, code lost:
    
        if (r5 == (-1)) goto L32;
     */
    /* JADX WARN: Code restructure failed: missing block: B:31:0x0071, code lost:
    
        r3 = true;
     */
    /* JADX WARN: Code restructure failed: missing block: B:32:0x0073, code lost:
    
        r3 = false;
     */
    /* JADX WARN: Code restructure failed: missing block: B:33:0x0074, code lost:
    
        if (r3 == false) goto L35;
     */
    /* JADX WARN: Code restructure failed: missing block: B:34:0x0076, code lost:
    
        r5 = r5 + ((long) r2.f4544.length);
     */
    /* JADX WARN: Code restructure failed: missing block: B:35:0x007c, code lost:
    
        r5 = r1.f18672;
     */
    /* JADX WARN: Code restructure failed: missing block: B:36:0x007e, code lost:
    
        r1.skip(r5);
     */
    /* JADX WARN: Code restructure failed: missing block: B:37:0x0081, code lost:
    
        if (r3 == false) goto L61;
     */
    /* JADX WARN: Code restructure failed: missing block: B:39:0x0085, code lost:
    
        m10127("Unterminated comment");
     */
    /* JADX WARN: Code restructure failed: missing block: B:40:0x008b, code lost:
    
        throw null;
     */
    /* JADX WARN: Code restructure failed: missing block: B:42:0x008e, code lost:
    
        if (r6 != 35) goto L62;
     */
    /* JADX WARN: Code restructure failed: missing block: B:43:0x0090, code lost:
    
        m10137();
        r5 = r5.mo5342(r2);
     */
    /* JADX WARN: Code restructure failed: missing block: B:44:0x0099, code lost:
    
        if (r5 == (-1)) goto L46;
     */
    /* JADX WARN: Code restructure failed: missing block: B:45:0x009b, code lost:
    
        r5 = r5 + 1;
     */
    /* JADX WARN: Code restructure failed: missing block: B:46:0x009d, code lost:
    
        r5 = r1.f18672;
     */
    /* JADX WARN: Code restructure failed: missing block: B:47:0x009f, code lost:
    
        r1.skip(r5);
     */
    /* JADX INFO: renamed from: ˉˆᵗ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final int m10124(boolean z) throws EOFException, JsonEncodingException {
        byte bM10213;
        while (true) {
            int i = 0;
            while (true) {
                int i2 = i + 1;
                InterfaceC2322 interfaceC2322 = this.f18593;
                if (!interfaceC2322.request(i2)) {
                    if (z) {
                        throw new EOFException("End of input");
                    }
                    return -1;
                }
                long j = i;
                C4903 c4903 = this.f18594;
                bM10213 = c4903.m10213(j);
                if (bM10213 != 10 && bM10213 != 32 && bM10213 != 13 && bM10213 != 9) {
                    break;
                }
                i = i2;
            }
        }
        return bM10213;
    }

    /* JADX INFO: renamed from: ˊˌˊ, reason: contains not printable characters */
    public final double m10125() throws EOFException, JsonEncodingException {
        int iM10142 = this.f18586;
        if (iM10142 == 0) {
            iM10142 = m10142();
        }
        if (iM10142 == 16) {
            this.f18586 = 0;
            int[] iArr = this.f18592;
            int i = this.f18587 - 1;
            iArr[i] = iArr[i] + 1;
            return this.f18588;
        }
        if (iM10142 == 17) {
            long j = this.f18595;
            C4903 c4903 = this.f18594;
            c4903.getClass();
            this.f18589 = c4903.m10195(j, AbstractC4490.f17115);
        } else if (iM10142 == 9) {
            this.f18589 = m10130(f18585);
        } else if (iM10142 == 8) {
            this.f18589 = m10130(f18581);
        } else if (iM10142 == 10) {
            this.f18589 = m10139();
        } else if (iM10142 != 11) {
            C1685.m4564("Expected a double but was ", AbstractC0793.m2862(m10144()), m10131());
            return 0.0d;
        }
        this.f18586 = 11;
        try {
            double d = Double.parseDouble(this.f18589);
            if (Double.isNaN(d) || Double.isInfinite(d)) {
                throw new JsonEncodingException("JSON forbids NaN and infinities: " + d + " at path " + m10131());
            }
            this.f18589 = null;
            this.f18586 = 0;
            int[] iArr2 = this.f18592;
            int i2 = this.f18587 - 1;
            iArr2[i2] = iArr2[i2] + 1;
            return d;
        } catch (NumberFormatException unused) {
            C1685.m4564("Expected a double but was ", this.f18589, m10131());
            return 0.0d;
        }
    }

    /* JADX INFO: renamed from: ˏʜᵪ, reason: contains not printable characters */
    public final char m10126() throws EOFException, JsonEncodingException {
        int i;
        InterfaceC2322 interfaceC2322 = this.f18593;
        if (!interfaceC2322.request(1L)) {
            m10127("Unterminated escape sequence");
            throw null;
        }
        C4903 c4903 = this.f18594;
        byte b = c4903.readByte();
        if (b == 10 || b == 34 || b == 39 || b == 47 || b == 92) {
            return (char) b;
        }
        if (b == 98) {
            return '\b';
        }
        if (b == 102) {
            return '\f';
        }
        if (b == 110) {
            return '\n';
        }
        if (b == 114) {
            return '\r';
        }
        if (b == 116) {
            return '\t';
        }
        if (b != 117) {
            m10127("Invalid escape sequence: \\" + ((char) b));
            throw null;
        }
        if (!interfaceC2322.request(4L)) {
            throw new EOFException("Unterminated escape sequence at path ".concat(m10131()));
        }
        char c = 0;
        for (int i2 = 0; i2 < 4; i2++) {
            byte bM10213 = c4903.m10213(i2);
            char c2 = (char) (c << 4);
            if (bM10213 >= 48 && bM10213 <= 57) {
                i = bM10213 - 48;
            } else if (bM10213 >= 97 && bM10213 <= 102) {
                i = bM10213 - 87;
            } else {
                if (bM10213 < 65 || bM10213 > 70) {
                    m10127("\\u".concat(c4903.m10195(4L, AbstractC4490.f17115)));
                    throw null;
                }
                i = bM10213 - 55;
            }
            c = (char) (i + c2);
        }
        c4903.skip(4L);
        return c;
    }

    /* JADX INFO: renamed from: ˏʽˊᵰ, reason: contains not printable characters */
    public final void m10127(String str) throws JsonEncodingException {
        throw new JsonEncodingException(str + " at path " + m10131());
    }

    /* JADX INFO: renamed from: ˏːˆ, reason: contains not printable characters */
    public final void m10128() throws EOFException, JsonEncodingException {
        int iM10142 = this.f18586;
        if (iM10142 == 0) {
            iM10142 = m10142();
        }
        if (iM10142 != 4) {
            C1685.m4564("Expected END_ARRAY but was ", AbstractC0793.m2862(m10144()), m10131());
            return;
        }
        int i = this.f18587;
        this.f18587 = i - 1;
        int[] iArr = this.f18592;
        int i2 = i - 2;
        iArr[i2] = iArr[i2] + 1;
        this.f18586 = 0;
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final void m10129() throws EOFException, JsonEncodingException {
        int iM10142 = this.f18586;
        if (iM10142 == 0) {
            iM10142 = m10142();
        }
        if (iM10142 != 1) {
            C1685.m4564("Expected BEGIN_OBJECT but was ", AbstractC0793.m2862(m10144()), m10131());
        } else {
            m10140(3);
            this.f18586 = 0;
        }
    }

    /* JADX INFO: renamed from: ːᵝٴᵶ, reason: contains not printable characters */
    public final String m10130(C1054 c1054) throws EOFException, JsonEncodingException {
        StringBuilder sb = null;
        while (true) {
            long jMo5342 = this.f18593.mo5342(c1054);
            if (jMo5342 == -1) {
                m10127("Unterminated string");
                throw null;
            }
            C4903 c4903 = this.f18594;
            if (c4903.m10213(jMo5342) != 92) {
                if (sb == null) {
                    String strM10195 = c4903.m10195(jMo5342, AbstractC4490.f17115);
                    c4903.readByte();
                    return strM10195;
                }
                sb.append(c4903.m10195(jMo5342, AbstractC4490.f17115));
                c4903.readByte();
                return sb.toString();
            }
            if (sb == null) {
                sb = new StringBuilder();
            }
            sb.append(c4903.m10195(jMo5342, AbstractC4490.f17115));
            c4903.readByte();
            sb.append(m10126());
        }
    }

    /* JADX INFO: renamed from: ˑˊᵲ, reason: contains not printable characters */
    public final String m10131() {
        return ˀᵳˎᵹ.ˋˈ(this.f18587, this.f18591, this.f18590, this.f18592);
    }

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public final void m10132() throws EOFException, JsonEncodingException {
        int iM10142 = this.f18586;
        if (iM10142 == 0) {
            iM10142 = m10142();
        }
        if (iM10142 != 2) {
            C1685.m4564("Expected END_OBJECT but was ", AbstractC0793.m2862(m10144()), m10131());
            return;
        }
        int i = this.f18587;
        int i2 = i - 1;
        this.f18587 = i2;
        this.f18590[i2] = null;
        int[] iArr = this.f18592;
        int i3 = i - 2;
        iArr[i3] = iArr[i3] + 1;
        this.f18586 = 0;
    }

    /* JADX INFO: renamed from: ᵗᵭ, reason: contains not printable characters */
    public final String m10133() throws EOFException, JsonEncodingException {
        String strM10195;
        int iM10142 = this.f18586;
        if (iM10142 == 0) {
            iM10142 = m10142();
        }
        if (iM10142 == 10) {
            strM10195 = m10139();
        } else if (iM10142 == 9) {
            strM10195 = m10130(f18585);
        } else if (iM10142 == 8) {
            strM10195 = m10130(f18581);
        } else if (iM10142 == 11) {
            strM10195 = this.f18589;
            this.f18589 = null;
        } else if (iM10142 == 16) {
            strM10195 = Long.toString(this.f18588);
        } else {
            if (iM10142 != 17) {
                C1685.m4564("Expected a string but was ", AbstractC0793.m2862(m10144()), m10131());
                return null;
            }
            long j = this.f18595;
            C4903 c4903 = this.f18594;
            c4903.getClass();
            strM10195 = c4903.m10195(j, AbstractC4490.f17115);
        }
        this.f18586 = 0;
        int[] iArr = this.f18592;
        int i = this.f18587 - 1;
        iArr[i] = iArr[i] + 1;
        return strM10195;
    }

    /* JADX INFO: renamed from: ᵘᵝ, reason: contains not printable characters */
    public final int m10134(C3714 c3714) throws EOFException, JsonEncodingException {
        int iM10142 = this.f18586;
        if (iM10142 == 0) {
            iM10142 = m10142();
        }
        if (iM10142 < 12 || iM10142 > 15) {
            return -1;
        }
        if (iM10142 == 15) {
            return m10122(this.f18589, c3714);
        }
        int iMo5348 = this.f18593.mo5348((C4135) c3714.f14142);
        if (iMo5348 != -1) {
            this.f18586 = 0;
            this.f18590[this.f18587 - 1] = ((String[]) c3714.f14143)[iMo5348];
            return iMo5348;
        }
        String str = this.f18590[this.f18587 - 1];
        String strM10135 = m10135();
        int iM10122 = m10122(strM10135, c3714);
        if (iM10122 == -1) {
            this.f18586 = 15;
            this.f18589 = strM10135;
            this.f18590[this.f18587 - 1] = str;
        }
        return iM10122;
    }

    /* JADX INFO: renamed from: ᵛˀˊ, reason: contains not printable characters */
    public final String m10135() throws EOFException, JsonEncodingException {
        String strM10130;
        int iM10142 = this.f18586;
        if (iM10142 == 0) {
            iM10142 = m10142();
        }
        if (iM10142 == 14) {
            strM10130 = m10139();
        } else if (iM10142 == 13) {
            strM10130 = m10130(f18585);
        } else if (iM10142 == 12) {
            strM10130 = m10130(f18581);
        } else {
            if (iM10142 != 15) {
                C1685.m4564("Expected a name but was ", AbstractC0793.m2862(m10144()), m10131());
                return null;
            }
            strM10130 = this.f18589;
            this.f18589 = null;
        }
        this.f18586 = 0;
        this.f18590[this.f18587 - 1] = strM10130;
        return strM10130;
    }

    /* JADX INFO: renamed from: ᵜᵤ, reason: contains not printable characters */
    public final void m10136() {
        int iM10142 = this.f18586;
        if (iM10142 == 0) {
            iM10142 = m10142();
        }
        if (iM10142 != 7) {
            C1685.m4564("Expected null but was ", AbstractC0793.m2862(m10144()), m10131());
            return;
        }
        this.f18586 = 0;
        int[] iArr = this.f18592;
        int i = this.f18587 - 1;
        iArr[i] = iArr[i] + 1;
    }

    /* JADX INFO: renamed from: ᵟᵹᵙ, reason: contains not printable characters */
    public final void m10137() throws JsonEncodingException {
        m10127("Use JsonReader.setLenient(true) to accept malformed JSON");
        throw null;
    }

    /* JADX INFO: renamed from: ᵨˈʼﹶ, reason: contains not printable characters */
    public final boolean m10138(int i) throws JsonEncodingException {
        if (i == 9 || i == 10 || i == 12 || i == 13 || i == 32) {
            return false;
        }
        if (i != 35) {
            if (i == 44) {
                return false;
            }
            if (i != 47 && i != 61) {
                if (i == 123 || i == 125 || i == 58) {
                    return false;
                }
                if (i != 59) {
                    switch (i) {
                        case 91:
                        case 93:
                            return false;
                        case 92:
                            break;
                        default:
                            return true;
                    }
                }
            }
        }
        m10137();
        return false;
    }

    /* JADX INFO: renamed from: ᵫˈᵹ, reason: contains not printable characters */
    public final String m10139() {
        long jMo5342 = this.f18593.mo5342(f18584);
        C4903 c4903 = this.f18594;
        if (jMo5342 == -1) {
            return c4903.m10206();
        }
        c4903.getClass();
        return c4903.m10195(jMo5342, AbstractC4490.f17115);
    }

    /* JADX INFO: renamed from: ᵬᵦˋ, reason: contains not printable characters */
    public final void m10140(int i) {
        int i2 = this.f18587;
        int[] iArr = this.f18591;
        if (i2 == iArr.length) {
            if (i2 == 256) {
                C1685.m4563("Nesting too deep at ".concat(m10131()));
                return;
            }
            this.f18591 = Arrays.copyOf(iArr, iArr.length * 2);
            String[] strArr = this.f18590;
            this.f18590 = (String[]) Arrays.copyOf(strArr, strArr.length * 2);
            int[] iArr2 = this.f18592;
            this.f18592 = Arrays.copyOf(iArr2, iArr2.length * 2);
        }
        int[] iArr3 = this.f18591;
        int i3 = this.f18587;
        this.f18587 = i3 + 1;
        iArr3[i3] = i;
    }

    /* JADX INFO: renamed from: ᵮᵟᵡ, reason: contains not printable characters */
    public final void m10141() throws EOFException, JsonEncodingException {
        int i = 0;
        do {
            int iM10142 = this.f18586;
            if (iM10142 == 0) {
                iM10142 = m10142();
            }
            if (iM10142 == 3) {
                m10140(1);
            } else if (iM10142 == 1) {
                m10140(3);
            } else {
                if (iM10142 == 4) {
                    i--;
                    if (i < 0) {
                        C1685.m4564("Expected a value but was ", AbstractC0793.m2862(m10144()), m10131());
                        return;
                    }
                    this.f18587--;
                } else if (iM10142 == 2) {
                    i--;
                    if (i < 0) {
                        C1685.m4564("Expected a value but was ", AbstractC0793.m2862(m10144()), m10131());
                        return;
                    }
                    this.f18587--;
                } else {
                    C4903 c4903 = this.f18594;
                    if (iM10142 == 14 || iM10142 == 10) {
                        long jMo5342 = this.f18593.mo5342(f18584);
                        if (jMo5342 == -1) {
                            jMo5342 = c4903.f18672;
                        }
                        c4903.skip(jMo5342);
                    } else if (iM10142 == 9 || iM10142 == 13) {
                        m10146(f18585);
                    } else if (iM10142 == 8 || iM10142 == 12) {
                        m10146(f18581);
                    } else if (iM10142 == 17) {
                        c4903.skip(this.f18595);
                    } else if (iM10142 == 18) {
                        C1685.m4564("Expected a value but was ", AbstractC0793.m2862(m10144()), m10131());
                        return;
                    }
                }
                this.f18586 = 0;
            }
            i++;
            this.f18586 = 0;
        } while (i != 0);
        int[] iArr = this.f18592;
        int i2 = this.f18587 - 1;
        iArr[i2] = iArr[i2] + 1;
        this.f18590[i2] = "null";
    }

    /* JADX WARN: Code restructure failed: missing block: B:138:0x01ad, code lost:
    
        if (m10138(r14) != false) goto L119;
     */
    /* JADX WARN: Code restructure failed: missing block: B:139:0x01af, code lost:
    
        if (r4 != 2) goto L151;
     */
    /* JADX WARN: Code restructure failed: missing block: B:140:0x01b1, code lost:
    
        if (r5 == false) goto L151;
     */
    /* JADX WARN: Code restructure failed: missing block: B:142:0x01b7, code lost:
    
        if (r8 != Long.MIN_VALUE) goto L144;
     */
    /* JADX WARN: Code restructure failed: missing block: B:143:0x01b9, code lost:
    
        if (r2 == false) goto L151;
     */
    /* JADX WARN: Code restructure failed: missing block: B:145:0x01bd, code lost:
    
        if (r8 != r16) goto L147;
     */
    /* JADX WARN: Code restructure failed: missing block: B:146:0x01bf, code lost:
    
        if (r2 != false) goto L151;
     */
    /* JADX WARN: Code restructure failed: missing block: B:147:0x01c1, code lost:
    
        if (r2 == false) goto L149;
     */
    /* JADX WARN: Code restructure failed: missing block: B:149:0x01c4, code lost:
    
        r8 = -r8;
     */
    /* JADX WARN: Code restructure failed: missing block: B:150:0x01c5, code lost:
    
        r24.f18588 = r8;
        r11.skip(r1);
        r10 = 16;
        r24.f18586 = 16;
     */
    /* JADX WARN: Code restructure failed: missing block: B:151:0x01d0, code lost:
    
        if (r4 == 2) goto L156;
     */
    /* JADX WARN: Code restructure failed: missing block: B:153:0x01d3, code lost:
    
        if (r4 == 4) goto L156;
     */
    /* JADX WARN: Code restructure failed: missing block: B:155:0x01d6, code lost:
    
        if (r4 != 7) goto L119;
     */
    /* JADX WARN: Code restructure failed: missing block: B:156:0x01d8, code lost:
    
        r24.f18595 = r1;
        r10 = 17;
        r24.f18586 = 17;
     */
    /* JADX WARN: Removed duplicated region for block: B:175:0x01ff A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:176:0x0200  */
    /* JADX WARN: Removed duplicated region for block: B:93:0x0132 A[RETURN] */
    /* JADX WARN: Removed duplicated region for block: B:94:0x0133  */
    /* JADX INFO: renamed from: ᵱʡˏ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final int m10142() throws EOFException, JsonEncodingException {
        int i;
        String str;
        String str2;
        long j;
        int i2;
        char cM10213;
        int i3;
        char c;
        int[] iArr = this.f18591;
        int i4 = this.f18587 - 1;
        int i5 = iArr[i4];
        InterfaceC2322 interfaceC2322 = this.f18593;
        long j2 = 0;
        C4903 c4903 = this.f18594;
        if (i5 == 1) {
            iArr[i4] = 2;
        } else if (i5 == 2) {
            int iM10124 = m10124(true);
            c4903.readByte();
            if (iM10124 != 44) {
                if (iM10124 != 59) {
                    if (iM10124 == 93) {
                        this.f18586 = 4;
                        return 4;
                    }
                    m10127("Unterminated array");
                    throw null;
                }
                m10137();
            }
        } else {
            if (i5 == 3 || i5 == 5) {
                iArr[i4] = 4;
                if (i5 == 5) {
                    int iM101242 = m10124(true);
                    c4903.readByte();
                    if (iM101242 != 44) {
                        if (iM101242 != 59) {
                            if (iM101242 == 125) {
                                this.f18586 = 2;
                                return 2;
                            }
                            m10127("Unterminated object");
                            throw null;
                        }
                        m10137();
                    }
                }
                int iM101243 = m10124(true);
                if (iM101243 == 34) {
                    c4903.readByte();
                    this.f18586 = 13;
                    return 13;
                }
                if (iM101243 == 39) {
                    c4903.readByte();
                    m10137();
                    this.f18586 = 12;
                    return 12;
                }
                if (iM101243 != 125) {
                    m10137();
                    if (m10138((char) iM101243)) {
                        this.f18586 = 14;
                        return 14;
                    }
                    m10127("Expected name");
                    throw null;
                }
                if (i5 == 5) {
                    m10127("Expected name");
                    throw null;
                }
                c4903.readByte();
                this.f18586 = 2;
                return 2;
            }
            if (i5 == 4) {
                iArr[i4] = 5;
                int iM101244 = m10124(true);
                c4903.readByte();
                if (iM101244 != 58) {
                    if (iM101244 != 61) {
                        m10127("Expected ':'");
                        throw null;
                    }
                    m10137();
                    if (interfaceC2322.request(1L) && c4903.m10213(0L) == 62) {
                        c4903.readByte();
                    }
                }
            } else if (i5 == 6) {
                iArr[i4] = 7;
            } else if (i5 == 7) {
                if (m10124(false) == -1) {
                    this.f18586 = 18;
                    return 18;
                }
                m10137();
            } else {
                if (i5 == 9) {
                    throw null;
                }
                if (i5 == 8) {
                    ᵕᵩʽᵲ.ᵪᵹᵥᵻ("JsonReader is closed");
                    return 0;
                }
            }
        }
        int iM101245 = m10124(true);
        if (iM101245 == 34) {
            c4903.readByte();
            this.f18586 = 9;
            return 9;
        }
        if (iM101245 == 39) {
            m10137();
            c4903.readByte();
            this.f18586 = 8;
            return 8;
        }
        if (iM101245 != 44 && iM101245 != 59) {
            if (iM101245 == 91) {
                c4903.readByte();
                this.f18586 = 3;
                return 3;
            }
            if (iM101245 != 93) {
                if (iM101245 == 123) {
                    c4903.readByte();
                    this.f18586 = 1;
                    return 1;
                }
                byte bM10213 = c4903.m10213(0L);
                if (bM10213 == 116 || bM10213 == 84) {
                    i = 5;
                    str2 = "true";
                    str = "TRUE";
                } else if (bM10213 == 102 || bM10213 == 70) {
                    i = 6;
                    str2 = "false";
                    str = "FALSE";
                } else if (bM10213 == 110 || bM10213 == 78) {
                    i = 7;
                    str2 = "null";
                    str = "NULL";
                } else {
                    j = 0;
                    i2 = 0;
                    if (i2 == 0) {
                        return i2;
                    }
                    boolean z = true;
                    long j3 = j;
                    int i6 = 0;
                    boolean z2 = false;
                    char c2 = 0;
                    while (true) {
                        int i7 = i6 + 1;
                        if (!interfaceC2322.request(i7)) {
                            break;
                        }
                        byte bM102132 = c4903.m10213(i6);
                        if (bM102132 != 43) {
                            if (bM102132 == 69 || bM102132 == 101) {
                                if (c2 != 2 && c2 != 4) {
                                    break;
                                }
                                c2 = 5;
                                i6 = i7;
                            } else if (bM102132 == 45) {
                                c = 6;
                                if (c2 == 0) {
                                    z2 = true;
                                    c2 = 1;
                                    i6 = i7;
                                } else {
                                    if (c2 != 5) {
                                        break;
                                    }
                                    c2 = c;
                                    i6 = i7;
                                }
                            } else if (bM102132 == 46) {
                                if (c2 != 2) {
                                    break;
                                }
                                c2 = 3;
                                i6 = i7;
                            } else {
                                if (bM102132 < 48 || bM102132 > 57) {
                                    break;
                                }
                                if (c2 == 1 || c2 == 0) {
                                    j3 = -(bM102132 - 48);
                                    c2 = 2;
                                } else if (c2 == 2) {
                                    if (j3 == j) {
                                        break;
                                    }
                                    long j4 = (10 * j3) - ((long) (bM102132 - 48));
                                    z &= j3 > -922337203685477580L || (j3 == -922337203685477580L && j4 < j3);
                                    j3 = j4;
                                } else if (c2 == 3) {
                                    c2 = 4;
                                } else if (c2 == 5 || c2 == 6) {
                                    c2 = 7;
                                }
                                i6 = i7;
                            }
                            if (i3 == 0) {
                                return i3;
                            }
                            if (!m10138(c4903.m10213(j))) {
                                m10127("Expected value");
                                throw null;
                            }
                            m10137();
                            this.f18586 = 10;
                            return 10;
                        }
                        c = 6;
                        if (c2 != 5) {
                            break;
                        }
                        c2 = c;
                        i6 = i7;
                    }
                    i3 = 0;
                    if (i3 == 0) {
                    }
                }
                int length = str2.length();
                int i8 = 1;
                while (true) {
                    if (i8 < length) {
                        int i9 = i8 + 1;
                        j = j2;
                        if (!interfaceC2322.request(i9) || ((cM10213 = c4903.m10213(i8)) != str2.charAt(i8) && cM10213 != str.charAt(i8))) {
                            break;
                        }
                        i8 = i9;
                        j2 = j;
                    } else {
                        j = j2;
                        if (!interfaceC2322.request(length + 1) || !m10138(c4903.m10213(length))) {
                            c4903.skip(length);
                            this.f18586 = i;
                            i2 = i;
                        }
                    }
                }
                i2 = 0;
                if (i2 == 0) {
                }
            } else if (i5 == 1) {
                c4903.readByte();
                this.f18586 = 4;
                return 4;
            }
        }
        if (i5 != 1 && i5 != 2) {
            m10127("Unexpected value");
            throw null;
        }
        m10137();
        this.f18586 = 7;
        return 7;
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final void m10143() throws EOFException, JsonEncodingException {
        int iM10142 = this.f18586;
        if (iM10142 == 0) {
            iM10142 = m10142();
        }
        if (iM10142 != 3) {
            C1685.m4564("Expected BEGIN_ARRAY but was ", AbstractC0793.m2862(m10144()), m10131());
            return;
        }
        m10140(1);
        this.f18592[this.f18587 - 1] = 0;
        this.f18586 = 0;
    }

    /* JADX INFO: renamed from: ᵵᵸᵕᵸ, reason: contains not printable characters */
    public final int m10144() throws EOFException, JsonEncodingException {
        int iM10142 = this.f18586;
        if (iM10142 == 0) {
            iM10142 = m10142();
        }
        switch (iM10142) {
            case 1:
                return 3;
            case 2:
                return 4;
            case 3:
                return 1;
            case 4:
                return 2;
            case 5:
            case C5224.STRING_SET_FIELD_NUMBER /* 6 */:
                return 8;
            case C5224.DOUBLE_FIELD_NUMBER /* 7 */:
                return 9;
            case C5224.BYTES_FIELD_NUMBER /* 8 */:
            case 9:
            case 10:
            case 11:
                return 6;
            case 12:
            case 13:
            case 14:
            case 15:
                return 5;
            case 16:
            case 17:
                return 7;
            case 18:
                return 10;
            default:
                throw new AssertionError();
        }
    }

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public final int m10145(String str, C3714 c3714) {
        int length = ((String[]) c3714.f14143).length;
        for (int i = 0; i < length; i++) {
            if (str.equals(((String[]) c3714.f14143)[i])) {
                this.f18586 = 0;
                int[] iArr = this.f18592;
                int i2 = this.f18587 - 1;
                iArr[i2] = iArr[i2] + 1;
                return i;
            }
        }
        return -1;
    }

    /* JADX INFO: renamed from: ᵹʾᵢᵯ, reason: contains not printable characters */
    public final void m10146(C1054 c1054) throws EOFException, JsonEncodingException {
        while (true) {
            long jMo5342 = this.f18593.mo5342(c1054);
            if (jMo5342 == -1) {
                m10127("Unterminated string");
                throw null;
            }
            C4903 c4903 = this.f18594;
            if (c4903.m10213(jMo5342) != 92) {
                c4903.skip(jMo5342 + 1);
                return;
            } else {
                c4903.skip(jMo5342 + 1);
                m10126();
            }
        }
    }
}
