package defpackage;

import j$.util.Objects;
import java.io.EOFException;
import java.lang.reflect.Method;

/* JADX INFO: renamed from: ᵞᵨ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C3023 extends ᵣˉ {

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public final int f11627;

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public final ᵠʽᵲ f11628;

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public final Method f11629;

    /* JADX INFO: renamed from: ᵶᵥᵝ, reason: contains not printable characters */
    public final boolean f11630;

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public final String f11631;

    public C3023(Method method, int i, String str, boolean z) {
        ᵠʽᵲ r0 = ᵠʽᵲ.ᵜᵪʾ;
        this.f11629 = method;
        this.f11627 = i;
        Objects.requireNonNull(str, "name == null");
        this.f11631 = str;
        this.f11628 = r0;
        this.f11630 = z;
    }

    /* JADX WARN: Removed duplicated region for block: B:52:0x00f1  */
    /* JADX WARN: Removed duplicated region for block: B:54:0x00f4  */
    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public final void m7111(C3645 c3645, Object obj) throws EOFException {
        String strM10206;
        String strReplace;
        String str = this.f11631;
        if (obj == null) {
            throw AbstractC3481.m7919(this.f11629, this.f11627, AbstractC3589.m8117("Path parameter \"", str, "\" value must not be null."), new Object[0]);
        }
        this.f11628.getClass();
        String string = obj.toString();
        if (c3645.f13845 == null) {
            throw new AssertionError();
        }
        int length = string.length();
        int iCharCount = 0;
        while (iCharCount < length) {
            int iCodePointAt = string.codePointAt(iCharCount);
            boolean z = this.f11630;
            int i = 47;
            int i2 = -1;
            int i3 = 127;
            int i4 = 32;
            if (iCodePointAt < 32 || iCodePointAt >= 127 || " \"<>^`{}|\\?#".indexOf(iCodePointAt) != -1 || (!z && (iCodePointAt == 47 || iCodePointAt == 37))) {
                C4903 c4903 = new C4903();
                c4903.m10210(0, iCharCount, string);
                C4903 c49032 = null;
                while (iCharCount < length) {
                    int iCodePointAt2 = string.codePointAt(iCharCount);
                    if (!z || (iCodePointAt2 != 9 && iCodePointAt2 != 10 && iCodePointAt2 != 12 && iCodePointAt2 != 13)) {
                        if (iCodePointAt2 < i4 || iCodePointAt2 >= i3 || " \"<>^`{}|\\?#".indexOf(iCodePointAt2) != i2 || (!z && (iCodePointAt2 == i || iCodePointAt2 == 37))) {
                            if (c49032 == null) {
                                c49032 = new C4903();
                            }
                            c49032.m10211(iCodePointAt2);
                            long j = c49032.f18672;
                            long j2 = 0;
                            while (j2 < j) {
                                byte bM10213 = c49032.m10213(j2);
                                c4903.m10209(37);
                                char[] cArr = C3645.f13842;
                                c4903.m10209(cArr[((bM10213 & 255) >> 4) & 15]);
                                c4903.m10209(cArr[bM10213 & 15]);
                                j2++;
                                c49032 = c49032;
                            }
                            c49032.m10199();
                        } else {
                            c4903.m10211(iCodePointAt2);
                        }
                    }
                    iCharCount += Character.charCount(iCodePointAt2);
                    i = 47;
                    i2 = -1;
                    i3 = 127;
                    i4 = 32;
                }
                strM10206 = c4903.m10206();
                strReplace = c3645.f13845.replace("{" + str + "}", strM10206);
                if (C3645.f13841.matcher(strReplace).matches()) {
                    c3645.f13845 = strReplace;
                    return;
                } else {
                    ᵕᵩʽᵲ.ᵮᵣᵗˈ("@Path parameters shouldn't perform path traversal ('.' or '..'): ".concat(string));
                    return;
                }
            }
            iCharCount += Character.charCount(iCodePointAt);
        }
        strM10206 = string;
        strReplace = c3645.f13845.replace("{" + str + "}", strM10206);
        if (C3645.f13841.matcher(strReplace).matches()) {
        }
    }
}
