package kotlin.reflect.json.internal;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes3.dex */
@kotlin.Metadata(d1 = {"\u00006\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\u0005\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\f\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0003\b\u0000\u0018\u00002\u00020\u0001B\u000f\u0012\u0006\u0010\u0003\u001a\u00020\u0002¢\u0006\u0004\b\u0004\u0010\u0005J\u000f\u0010\u0007\u001a\u00020\u0006H\u0016¢\u0006\u0004\b\u0007\u0010\bJ\u000f\u0010\n\u001a\u00020\tH\u0016¢\u0006\u0004\b\n\u0010\u000bJ\u0017\u0010\u000f\u001a\u00020\u000e2\u0006\u0010\r\u001a\u00020\fH\u0016¢\u0006\u0004\b\u000f\u0010\u0010J\u000f\u0010\u0011\u001a\u00020\u0006H\u0016¢\u0006\u0004\b\u0011\u0010\bJ\u000f\u0010\u0013\u001a\u00020\u0012H\u0016¢\u0006\u0004\b\u0013\u0010\u0014¨\u0006\u0015"}, d2 = {"Lkotlinx/serialization/json/internal/StringJsonLexerWithComments;", "Lkotlinx/serialization/json/internal/StringJsonLexer;", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "source", "<init>", "(Ljava/lang/String;)V", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "j", "()B", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "e", "()Z", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "expected", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "l", "(C)V", "H", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "L", "()I", "kotlinx-serialization-json"}, k = 1, mv = {2, 0, 0}, xi = 48)
@kotlin.jvm.internal.SourceDebugExtension
public final class StringJsonLexerWithComments extends kotlin.reflect.json.internal.StringJsonLexer {
    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public StringJsonLexerWithComments(java.lang.String str) {
        super(str);
        kotlin.jvm.internal.Intrinsics.l(str, "source");
    }

    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.KotlinNothingValueException */
    @Override // kotlin.reflect.json.internal.JsonReader
    public byte H() throws kotlin.KotlinNothingValueException {
        java.lang.String strD = D();
        int iL = L();
        if (iL >= strD.length() || iL == -1) {
            return (byte) 10;
        }
        this.currentPosition = iL;
        return kotlin.reflect.json.internal.AbstractJsonLexerKt.a(strD.charAt(iL));
    }

    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.KotlinNothingValueException */
    @Override // kotlin.reflect.json.internal.StringJsonLexer, kotlin.reflect.json.internal.JsonReader
    public int L() throws kotlin.KotlinNothingValueException {
        int i;
        int iS0 = this.currentPosition;
        if (iS0 == -1) {
            return iS0;
        }
        java.lang.String strD = D();
        while (iS0 < strD.length()) {
            char cCharAt = strD.charAt(iS0);
            if (cCharAt != ' ' && cCharAt != '\n' && cCharAt != '\r' && cCharAt != '\t') {
                if (cCharAt != '/' || (i = iS0 + 1) >= strD.length()) {
                    break;
                }
                char cCharAt2 = strD.charAt(i);
                if (cCharAt2 == '*') {
                    int iT0 = kotlin.text.StringsKt.t0(strD, "*/", iS0 + 2, false, 4, (java.lang.Object) null);
                    if (iT0 == -1) {
                        this.currentPosition = strD.length();
                        kotlin.reflect.json.internal.JsonReader.x(this, "Expected end of the block comment: \"*/\", but had EOF instead", 0, null, 6, null);
                        throw new kotlin.KotlinNothingValueException();
                    }
                    iS0 = iT0 + 2;
                } else {
                    if (cCharAt2 != '/') {
                        break;
                    }
                    iS0 = kotlin.text.StringsKt.s0(strD, '\n', iS0 + 2, false, 4, (java.lang.Object) null);
                    if (iS0 == -1) {
                        iS0 = strD.length();
                    }
                }
            }
            iS0++;
        }
        this.currentPosition = iS0;
        return iS0;
    }

    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.KotlinNothingValueException */
    @Override // kotlin.reflect.json.internal.StringJsonLexer, kotlin.reflect.json.internal.JsonReader
    public boolean e() throws kotlin.KotlinNothingValueException {
        int iL = L();
        if (iL >= D().length() || iL == -1) {
            return false;
        }
        return F(D().charAt(iL));
    }

    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.KotlinNothingValueException */
    @Override // kotlin.reflect.json.internal.StringJsonLexer, kotlin.reflect.json.internal.JsonReader
    public byte j() throws kotlin.KotlinNothingValueException {
        java.lang.String strD = D();
        int iL = L();
        if (iL >= strD.length() || iL == -1) {
            return (byte) 10;
        }
        this.currentPosition = iL + 1;
        return kotlin.reflect.json.internal.AbstractJsonLexerKt.a(strD.charAt(iL));
    }

    /* JADX INFO: Thrown type has an unknown type hierarchy: kotlin.KotlinNothingValueException */
    @Override // kotlin.reflect.json.internal.StringJsonLexer, kotlin.reflect.json.internal.JsonReader
    public void l(char expected) throws kotlin.KotlinNothingValueException {
        java.lang.String strD = D();
        int iL = L();
        if (iL >= strD.length() || iL == -1) {
            this.currentPosition = -1;
            R(expected);
        }
        char cCharAt = strD.charAt(iL);
        this.currentPosition = iL + 1;
        if (cCharAt == expected) {
            return;
        }
        R(expected);
    }
}
