package defpackage;

import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.WildcardType;
import java.net.URI;
import java.util.Map;

/* JADX INFO: renamed from: ˉˇʤᵧ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public abstract class AbstractC1171 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final C3423 f4984;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final InterfaceC4840 f4985;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final C4952 f4986;

    public AbstractC1171(C4952 c4952, C3423 c3423, InterfaceC4840 interfaceC4840) {
        this.f4986 = c4952;
        this.f4984 = c3423;
        this.f4985 = interfaceC4840;
    }

    /* JADX WARN: Code restructure failed: missing block: B:52:0x0116, code lost:
    
        throw defpackage.AbstractC3481.m7925(r31, null, "@Headers value must be in the form \"Name: Value\". Found: \"%s\"", r14);
     */
    /* JADX WARN: Removed duplicated region for block: B:387:0x0901  */
    /* JADX WARN: Removed duplicated region for block: B:597:0x0905 A[SYNTHETIC] */
    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static AbstractC1171 m3651(ᵕˁـ r29, Class cls, Method method) {
        Type genericReturnType;
        boolean z;
        boolean z2;
        boolean z3;
        ᵣˉ r16;
        int i;
        ᵣˉ[] r25;
        int i2;
        int i3;
        String str;
        ᵣˉ c2117;
        ᵣˉ c2116;
        ᵣˉ c4542;
        C2117 c21172;
        C0237 c0237 = new C0237(r29, cls, method);
        Annotation[] annotationArr = c0237.f1777;
        int length = annotationArr.length;
        int i4 = 0;
        int i5 = 0;
        loop0: while (true) {
            String str2 = "HEAD";
            int i6 = 1;
            if (i5 >= length) {
                if (c0237.f1770 == null) {
                    throw AbstractC3481.m7925(method, null, "HTTP method annotation is required (e.g., @GET, @POST, etc.).", new Object[0]);
                }
                if (!c0237.f1768) {
                    if (c0237.f1758) {
                        throw AbstractC3481.m7925(method, null, "Multipart can only be specified on HTTP methods with request body (e.g., @POST).", new Object[0]);
                    }
                    if (c0237.f1772) {
                        throw AbstractC3481.m7925(method, null, "FormUrlEncoded can only be specified on HTTP methods with request body (e.g., @POST).", new Object[0]);
                    }
                }
                Annotation[][] annotationArr2 = c0237.f1769;
                int length2 = annotationArr2.length;
                c0237.f1766 = new ᵣˉ[length2];
                int i7 = length2 - 1;
                int i8 = 0;
                while (i8 < length2) {
                    ᵣˉ[] r11 = c0237.f1766;
                    Type type = c0237.f1779[i8];
                    Annotation[] annotationArr3 = annotationArr2[i8];
                    int i9 = i8 == i7 ? i6 : i4;
                    if (annotationArr3 != null) {
                        int length3 = annotationArr3.length;
                        r16 = null;
                        while (i4 < length3) {
                            Annotation annotation = annotationArr3[i4];
                            Annotation[][] annotationArr4 = annotationArr2;
                            ᵣˉ c1939 = C0331.f2053;
                            int i10 = i4;
                            int i11 = length2;
                            if (annotation instanceof InterfaceC0512) {
                                c0237.m1411(i8, type);
                                if (c0237.f1761) {
                                    throw AbstractC3481.m7919(method, i8, "Multiple @Url method annotations found.", new Object[0]);
                                }
                                if (c0237.f1773) {
                                    throw AbstractC3481.m7919(method, i8, "@Path parameters may not be used with @Url.", new Object[0]);
                                }
                                if (c0237.f1776) {
                                    throw AbstractC3481.m7919(method, i8, "A @Url parameter must not come after a @Query.", new Object[0]);
                                }
                                if (c0237.f1771) {
                                    throw AbstractC3481.m7919(method, i8, "A @Url parameter must not come after a @QueryName.", new Object[0]);
                                }
                                if (c0237.f1767) {
                                    throw AbstractC3481.m7919(method, i8, "A @Url parameter must not come after a @QueryMap.", new Object[0]);
                                }
                                if (c0237.f1757 != null) {
                                    throw AbstractC3481.m7919(method, i8, "@Url cannot be used with @%s URL", c0237.f1770);
                                }
                                c0237.f1761 = true;
                                if (type != C1695.class && type != String.class && type != URI.class && (!(type instanceof Class) || !"android.net.Uri".equals(((Class) type).getName()))) {
                                    throw AbstractC3481.m7919(method, i8, "@Url must be okhttp3.HttpUrl, String, java.net.URI, or android.net.Uri type.", new Object[0]);
                                }
                                c2117 = new C0162(method, i8, 1);
                                str = str2;
                                i = i7;
                            } else {
                                i = i7;
                                boolean z4 = annotation instanceof InterfaceC2719;
                                ᵕˁـ r9 = c0237.f1774;
                                if (z4) {
                                    c0237.m1411(i8, type);
                                    if (c0237.f1776) {
                                        throw AbstractC3481.m7919(method, i8, "A @Path parameter must not come after a @Query.", new Object[0]);
                                    }
                                    if (c0237.f1771) {
                                        throw AbstractC3481.m7919(method, i8, "A @Path parameter must not come after a @QueryName.", new Object[0]);
                                    }
                                    if (c0237.f1767) {
                                        throw AbstractC3481.m7919(method, i8, "A @Path parameter must not come after a @QueryMap.", new Object[0]);
                                    }
                                    if (c0237.f1761) {
                                        throw AbstractC3481.m7919(method, i8, "@Path parameters may not be used with @Url.", new Object[0]);
                                    }
                                    if (c0237.f1757 == null) {
                                        throw AbstractC3481.m7919(method, i8, "@Path can only be used with relative url on @%s", c0237.f1770);
                                    }
                                    c0237.f1773 = true;
                                    InterfaceC2719 interfaceC2719 = (InterfaceC2719) annotation;
                                    String strValue = interfaceC2719.value();
                                    if (!C0237.f1755.matcher(strValue).matches()) {
                                        throw AbstractC3481.m7919(method, i8, "@Path parameter name must match %s. Found: %s", C0237.f1754.pattern(), strValue);
                                    }
                                    if (!c0237.f1762.contains(strValue)) {
                                        throw AbstractC3481.m7919(method, i8, "URL \"%s\" does not contain \"{%s}\".", c0237.f1757, strValue);
                                    }
                                    r9.ᵸˆˁ(type, annotationArr3);
                                    c2117 = new C3023(c0237.f1764, i8, strValue, interfaceC2719.encoded());
                                    str = str2;
                                } else {
                                    r25 = r11;
                                    i2 = i9;
                                    if (annotation instanceof InterfaceC1757) {
                                        c0237.m1411(i8, type);
                                        InterfaceC1757 interfaceC1757 = (InterfaceC1757) annotation;
                                        String strValue2 = interfaceC1757.value();
                                        boolean zEncoded = interfaceC1757.encoded();
                                        Class clsM7929 = AbstractC3481.m7929(type);
                                        i3 = length3;
                                        c0237.f1776 = true;
                                        if (Iterable.class.isAssignableFrom(clsM7929)) {
                                            if (!(type instanceof ParameterizedType)) {
                                                throw AbstractC3481.m7919(method, i8, clsM7929.getSimpleName() + " must include generic type (e.g., " + clsM7929.getSimpleName() + "<String>)", new Object[0]);
                                            }
                                            r9.ᵸˆˁ(AbstractC3481.m7935(0, (ParameterizedType) type), annotationArr3);
                                            c21172 = new C2117(new C1909(2, strValue2, zEncoded), 0);
                                        } else if (clsM7929.isArray()) {
                                            r9.ᵸˆˁ(C0237.m1409(clsM7929.getComponentType()), annotationArr3);
                                            c21172 = new C2117(new C1909(2, strValue2, zEncoded), 1);
                                        } else {
                                            r9.ᵸˆˁ(type, annotationArr3);
                                            c4542 = new C1909(2, strValue2, zEncoded);
                                            c2117 = c4542;
                                        }
                                        c2117 = c21172;
                                    } else {
                                        i3 = length3;
                                        if (annotation instanceof InterfaceC3786) {
                                            c0237.m1411(i8, type);
                                            boolean zEncoded2 = ((InterfaceC3786) annotation).encoded();
                                            Class clsM79292 = AbstractC3481.m7929(type);
                                            c0237.f1771 = true;
                                            if (Iterable.class.isAssignableFrom(clsM79292)) {
                                                if (!(type instanceof ParameterizedType)) {
                                                    throw AbstractC3481.m7919(method, i8, clsM79292.getSimpleName() + " must include generic type (e.g., " + clsM79292.getSimpleName() + "<String>)", new Object[0]);
                                                }
                                                r9.ᵸˆˁ(AbstractC3481.m7935(0, (ParameterizedType) type), annotationArr3);
                                                c21172 = new C2117(new C4542(zEncoded2), 0);
                                            } else if (clsM79292.isArray()) {
                                                r9.ᵸˆˁ(C0237.m1409(clsM79292.getComponentType()), annotationArr3);
                                                c21172 = new C2117(new C4542(zEncoded2), 1);
                                            } else {
                                                r9.ᵸˆˁ(type, annotationArr3);
                                                c4542 = new C4542(zEncoded2);
                                                c2117 = c4542;
                                            }
                                            c2117 = c21172;
                                        } else {
                                            str = str2;
                                            if (annotation instanceof InterfaceC0888) {
                                                c0237.m1411(i8, type);
                                                Class clsM79293 = AbstractC3481.m7929(type);
                                                c0237.f1767 = true;
                                                if (!Map.class.isAssignableFrom(clsM79293)) {
                                                    throw AbstractC3481.m7919(method, i8, "@QueryMap parameter type must be Map.", new Object[0]);
                                                }
                                                Type typeM7933 = AbstractC3481.m7933(type, clsM79293);
                                                if (!(typeM7933 instanceof ParameterizedType)) {
                                                    throw AbstractC3481.m7919(method, i8, "Map must include generic types (e.g., Map<String, String>)", new Object[0]);
                                                }
                                                ParameterizedType parameterizedType = (ParameterizedType) typeM7933;
                                                Type typeM7935 = AbstractC3481.m7935(0, parameterizedType);
                                                if (String.class != typeM7935) {
                                                    throw AbstractC3481.m7919(method, i8, "@QueryMap keys must be of type String: " + typeM7935, new Object[0]);
                                                }
                                                r9.ᵸˆˁ(AbstractC3481.m7935(1, parameterizedType), annotationArr3);
                                                c1939 = new C1866(method, i8, ((InterfaceC0888) annotation).encoded(), 2);
                                            } else {
                                                if (annotation instanceof InterfaceC1148) {
                                                    c0237.m1411(i8, type);
                                                    InterfaceC1148 interfaceC1148 = (InterfaceC1148) annotation;
                                                    String strValue3 = interfaceC1148.value();
                                                    Class clsM79294 = AbstractC3481.m7929(type);
                                                    if (Iterable.class.isAssignableFrom(clsM79294)) {
                                                        if (!(type instanceof ParameterizedType)) {
                                                            throw AbstractC3481.m7919(method, i8, clsM79294.getSimpleName() + " must include generic type (e.g., " + clsM79294.getSimpleName() + "<String>)", new Object[0]);
                                                        }
                                                        r9.ᵸˆˁ(AbstractC3481.m7935(0, (ParameterizedType) type), annotationArr3);
                                                        c2117 = new C2117(new C1909(1, strValue3, interfaceC1148.allowUnsafeNonAsciiValues()), 0);
                                                    } else if (clsM79294.isArray()) {
                                                        r9.ᵸˆˁ(C0237.m1409(clsM79294.getComponentType()), annotationArr3);
                                                        c2117 = new C2117(new C1909(1, strValue3, interfaceC1148.allowUnsafeNonAsciiValues()), 1);
                                                    } else {
                                                        r9.ᵸˆˁ(type, annotationArr3);
                                                        c1939 = new C1909(1, strValue3, interfaceC1148.allowUnsafeNonAsciiValues());
                                                    }
                                                } else if (annotation instanceof InterfaceC4897) {
                                                    if (type == C0661.class) {
                                                        c2117 = new C0162(method, i8, 0);
                                                    } else {
                                                        c0237.m1411(i8, type);
                                                        Class clsM79295 = AbstractC3481.m7929(type);
                                                        if (!Map.class.isAssignableFrom(clsM79295)) {
                                                            throw AbstractC3481.m7919(method, i8, "@HeaderMap parameter type must be Map or Headers.", new Object[0]);
                                                        }
                                                        Type typeM79332 = AbstractC3481.m7933(type, clsM79295);
                                                        if (!(typeM79332 instanceof ParameterizedType)) {
                                                            throw AbstractC3481.m7919(method, i8, "Map must include generic types (e.g., Map<String, String>)", new Object[0]);
                                                        }
                                                        ParameterizedType parameterizedType2 = (ParameterizedType) typeM79332;
                                                        Type typeM79352 = AbstractC3481.m7935(0, parameterizedType2);
                                                        if (String.class != typeM79352) {
                                                            throw AbstractC3481.m7919(method, i8, "@HeaderMap keys must be of type String: " + typeM79352, new Object[0]);
                                                        }
                                                        r9.ᵸˆˁ(AbstractC3481.m7935(1, parameterizedType2), annotationArr3);
                                                        c2117 = new C1866(method, i8, ((InterfaceC4897) annotation).allowUnsafeNonAsciiValues(), 1);
                                                    }
                                                } else if (annotation instanceof InterfaceC3128) {
                                                    c0237.m1411(i8, type);
                                                    if (!c0237.f1772) {
                                                        throw AbstractC3481.m7919(method, i8, "@Field parameters can only be used with form encoding.", new Object[0]);
                                                    }
                                                    InterfaceC3128 interfaceC3128 = (InterfaceC3128) annotation;
                                                    String strValue4 = interfaceC3128.value();
                                                    boolean zEncoded3 = interfaceC3128.encoded();
                                                    c0237.f1775 = true;
                                                    Class clsM79296 = AbstractC3481.m7929(type);
                                                    if (Iterable.class.isAssignableFrom(clsM79296)) {
                                                        if (!(type instanceof ParameterizedType)) {
                                                            throw AbstractC3481.m7919(method, i8, clsM79296.getSimpleName() + " must include generic type (e.g., " + clsM79296.getSimpleName() + "<String>)", new Object[0]);
                                                        }
                                                        r9.ᵸˆˁ(AbstractC3481.m7935(0, (ParameterizedType) type), annotationArr3);
                                                        c2117 = new C2117(new C1909(0, strValue4, zEncoded3), 0);
                                                    } else if (clsM79296.isArray()) {
                                                        r9.ᵸˆˁ(C0237.m1409(clsM79296.getComponentType()), annotationArr3);
                                                        c2117 = new C2117(new C1909(0, strValue4, zEncoded3), 1);
                                                    } else {
                                                        r9.ᵸˆˁ(type, annotationArr3);
                                                        c2116 = new C1909(0, strValue4, zEncoded3);
                                                        c2117 = c2116;
                                                    }
                                                } else if (annotation instanceof InterfaceC3841) {
                                                    c0237.m1411(i8, type);
                                                    if (!c0237.f1772) {
                                                        throw AbstractC3481.m7919(method, i8, "@FieldMap parameters can only be used with form encoding.", new Object[0]);
                                                    }
                                                    Class clsM79297 = AbstractC3481.m7929(type);
                                                    if (!Map.class.isAssignableFrom(clsM79297)) {
                                                        throw AbstractC3481.m7919(method, i8, "@FieldMap parameter type must be Map.", new Object[0]);
                                                    }
                                                    Type typeM79333 = AbstractC3481.m7933(type, clsM79297);
                                                    if (!(typeM79333 instanceof ParameterizedType)) {
                                                        throw AbstractC3481.m7919(method, i8, "Map must include generic types (e.g., Map<String, String>)", new Object[0]);
                                                    }
                                                    ParameterizedType parameterizedType3 = (ParameterizedType) typeM79333;
                                                    Type typeM79353 = AbstractC3481.m7935(0, parameterizedType3);
                                                    if (String.class != typeM79353) {
                                                        throw AbstractC3481.m7919(method, i8, "@FieldMap keys must be of type String: " + typeM79353, new Object[0]);
                                                    }
                                                    r9.ᵸˆˁ(AbstractC3481.m7935(1, parameterizedType3), annotationArr3);
                                                    c0237.f1775 = true;
                                                    c2117 = new C1866(method, i8, ((InterfaceC3841) annotation).encoded(), 0);
                                                } else if (annotation instanceof InterfaceC2982) {
                                                    c0237.m1411(i8, type);
                                                    if (!c0237.f1758) {
                                                        throw AbstractC3481.m7919(method, i8, "@Part parameters can only be used with multipart encoding.", new Object[0]);
                                                    }
                                                    InterfaceC2982 interfaceC2982 = (InterfaceC2982) annotation;
                                                    c0237.f1760 = true;
                                                    String strValue5 = interfaceC2982.value();
                                                    Class clsM79298 = AbstractC3481.m7929(type);
                                                    if (!strValue5.isEmpty()) {
                                                        C0661 c0661 = ᵷˆᵣ.ᵱᵽʡᵚ(new String[]{"Content-Disposition", AbstractC3589.m8117("form-data; name=\"", strValue5, "\""), "Content-Transfer-Encoding", interfaceC2982.encoding()});
                                                        if (Iterable.class.isAssignableFrom(clsM79298)) {
                                                            if (!(type instanceof ParameterizedType)) {
                                                                throw AbstractC3481.m7919(method, i8, clsM79298.getSimpleName() + " must include generic type (e.g., " + clsM79298.getSimpleName() + "<String>)", new Object[0]);
                                                            }
                                                            Type typeM79354 = AbstractC3481.m7935(0, (ParameterizedType) type);
                                                            if (C2372.class.isAssignableFrom(AbstractC3481.m7929(typeM79354))) {
                                                                throw AbstractC3481.m7919(method, i8, "@Part parameters using the MultipartBody.Part must not include a part name in the annotation.", new Object[0]);
                                                            }
                                                            c2117 = new C2117(new C2116(method, i8, c0661, r9.ˊᵨᵧ(typeM79354, annotationArr3, annotationArr)), 0);
                                                        } else if (clsM79298.isArray()) {
                                                            Class clsM1409 = C0237.m1409(clsM79298.getComponentType());
                                                            if (C2372.class.isAssignableFrom(clsM1409)) {
                                                                throw AbstractC3481.m7919(method, i8, "@Part parameters using the MultipartBody.Part must not include a part name in the annotation.", new Object[0]);
                                                            }
                                                            c2117 = new C2117(new C2116(method, i8, c0661, r9.ˊᵨᵧ(clsM1409, annotationArr3, annotationArr)), 1);
                                                        } else {
                                                            if (C2372.class.isAssignableFrom(clsM79298)) {
                                                                throw AbstractC3481.m7919(method, i8, "@Part parameters using the MultipartBody.Part must not include a part name in the annotation.", new Object[0]);
                                                            }
                                                            c2116 = new C2116(method, i8, c0661, r9.ˊᵨᵧ(type, annotationArr3, annotationArr));
                                                            c2117 = c2116;
                                                        }
                                                    } else if (Iterable.class.isAssignableFrom(clsM79298)) {
                                                        if (!(type instanceof ParameterizedType)) {
                                                            throw AbstractC3481.m7919(method, i8, clsM79298.getSimpleName() + " must include generic type (e.g., " + clsM79298.getSimpleName() + "<String>)", new Object[0]);
                                                        }
                                                        if (!C2372.class.isAssignableFrom(AbstractC3481.m7929(AbstractC3481.m7935(0, (ParameterizedType) type)))) {
                                                            throw AbstractC3481.m7919(method, i8, "@Part annotation must supply a name or use MultipartBody.Part parameter type.", new Object[0]);
                                                        }
                                                        c2117 = new C2117(c1939, 0);
                                                    } else if (clsM79298.isArray()) {
                                                        if (!C2372.class.isAssignableFrom(clsM79298.getComponentType())) {
                                                            throw AbstractC3481.m7919(method, i8, "@Part annotation must supply a name or use MultipartBody.Part parameter type.", new Object[0]);
                                                        }
                                                        c2117 = new C2117(c1939, 1);
                                                    } else if (!C2372.class.isAssignableFrom(clsM79298)) {
                                                        throw AbstractC3481.m7919(method, i8, "@Part annotation must supply a name or use MultipartBody.Part parameter type.", new Object[0]);
                                                    }
                                                } else if (annotation instanceof InterfaceC4047) {
                                                    c0237.m1411(i8, type);
                                                    if (!c0237.f1758) {
                                                        throw AbstractC3481.m7919(method, i8, "@PartMap parameters can only be used with multipart encoding.", new Object[0]);
                                                    }
                                                    c0237.f1760 = true;
                                                    Class clsM79299 = AbstractC3481.m7929(type);
                                                    if (!Map.class.isAssignableFrom(clsM79299)) {
                                                        throw AbstractC3481.m7919(method, i8, "@PartMap parameter type must be Map.", new Object[0]);
                                                    }
                                                    Type typeM79334 = AbstractC3481.m7933(type, clsM79299);
                                                    if (!(typeM79334 instanceof ParameterizedType)) {
                                                        throw AbstractC3481.m7919(method, i8, "Map must include generic types (e.g., Map<String, String>)", new Object[0]);
                                                    }
                                                    ParameterizedType parameterizedType4 = (ParameterizedType) typeM79334;
                                                    Type typeM79355 = AbstractC3481.m7935(0, parameterizedType4);
                                                    if (String.class != typeM79355) {
                                                        throw AbstractC3481.m7919(method, i8, "@PartMap keys must be of type String: " + typeM79355, new Object[0]);
                                                    }
                                                    Type typeM79356 = AbstractC3481.m7935(1, parameterizedType4);
                                                    if (C2372.class.isAssignableFrom(AbstractC3481.m7929(typeM79356))) {
                                                        throw AbstractC3481.m7919(method, i8, "@PartMap values cannot be MultipartBody.Part. Use @Part List<Part> or a different value type instead.", new Object[0]);
                                                    }
                                                    c1939 = new C2116(method, i8, r9.ˊᵨᵧ(typeM79356, annotationArr3, annotationArr), ((InterfaceC4047) annotation).encoding());
                                                } else if (annotation instanceof InterfaceC4519) {
                                                    c0237.m1411(i8, type);
                                                    if (c0237.f1772 || c0237.f1758) {
                                                        throw AbstractC3481.m7919(method, i8, "@Body parameters cannot be used with form or multi-part encoding.", new Object[0]);
                                                    }
                                                    if (c0237.f1778) {
                                                        throw AbstractC3481.m7919(method, i8, "Multiple @Body method annotations found.", new Object[0]);
                                                    }
                                                    try {
                                                        InterfaceC4840 interfaceC4840 = r9.ˊᵨᵧ(type, annotationArr3, annotationArr);
                                                        c0237.f1778 = true;
                                                        c1939 = new C5186(method, i8, interfaceC4840);
                                                    } catch (RuntimeException e) {
                                                        throw AbstractC3481.m7931(method, e, i8, "Unable to create @Body converter for %s", type);
                                                    }
                                                } else if (annotation instanceof InterfaceC4831) {
                                                    c0237.m1411(i8, type);
                                                    Class clsM14092 = C0237.m1409(AbstractC3481.m7929(type));
                                                    for (int i12 = i8 - 1; i12 >= 0; i12--) {
                                                        ᵣˉ r5 = c0237.f1766[i12];
                                                        if ((r5 instanceof C1939) && ((C1939) r5).f7722.equals(clsM14092)) {
                                                            throw AbstractC3481.m7919(method, i8, "@Tag type " + clsM14092.getName() + " is duplicate of " + AbstractC1286.f5371.ᵟᵹᵙ(i12, method) + " and would always overwrite its value.", new Object[0]);
                                                        }
                                                    }
                                                    c1939 = new C1939(clsM14092);
                                                } else {
                                                    c2117 = null;
                                                }
                                                if (c2117 != null) {
                                                    if (r16 != null) {
                                                        throw AbstractC3481.m7919(method, i8, "Multiple Retrofit annotations found, only one allowed.", new Object[0]);
                                                    }
                                                    r16 = c2117;
                                                }
                                                i4 = i10 + 1;
                                                annotationArr2 = annotationArr4;
                                                i7 = i;
                                                length2 = i11;
                                                length3 = i3;
                                                r11 = r25;
                                                i9 = i2;
                                                str2 = str;
                                            }
                                            c2117 = c1939;
                                            if (c2117 != null) {
                                            }
                                            i4 = i10 + 1;
                                            annotationArr2 = annotationArr4;
                                            i7 = i;
                                            length2 = i11;
                                            length3 = i3;
                                            r11 = r25;
                                            i9 = i2;
                                            str2 = str;
                                        }
                                    }
                                    str = str2;
                                    if (c2117 != null) {
                                    }
                                    i4 = i10 + 1;
                                    annotationArr2 = annotationArr4;
                                    i7 = i;
                                    length2 = i11;
                                    length3 = i3;
                                    r11 = r25;
                                    i9 = i2;
                                    str2 = str;
                                }
                            }
                            r25 = r11;
                            i2 = i9;
                            i3 = length3;
                            if (c2117 != null) {
                            }
                            i4 = i10 + 1;
                            annotationArr2 = annotationArr4;
                            i7 = i;
                            length2 = i11;
                            length3 = i3;
                            r11 = r25;
                            i9 = i2;
                            str2 = str;
                        }
                    } else {
                        r16 = null;
                    }
                    Annotation[][] annotationArr5 = annotationArr2;
                    int i13 = length2;
                    String str3 = str2;
                    int i14 = i7;
                    ᵣˉ[] r252 = r11;
                    int i15 = i9;
                    if (r16 == null) {
                        if (i15 != 0) {
                            try {
                                if (AbstractC3481.m7929(type) == InterfaceC2643.class) {
                                    c0237.f1765 = true;
                                    r16 = null;
                                }
                            } catch (NoClassDefFoundError unused) {
                            }
                        }
                        throw AbstractC3481.m7919(method, i8, "No Retrofit annotation found.", new Object[0]);
                    }
                    r252[i8] = r16;
                    i8++;
                    annotationArr2 = annotationArr5;
                    i7 = i14;
                    length2 = i13;
                    str2 = str3;
                    i4 = 0;
                    i6 = 1;
                }
                String str4 = str2;
                if (c0237.f1757 == null && !c0237.f1761) {
                    throw AbstractC3481.m7925(method, null, "Missing either @%s URL or @Url parameter.", c0237.f1770);
                }
                boolean z5 = c0237.f1772;
                if (!z5 && !c0237.f1758 && !c0237.f1768 && c0237.f1778) {
                    throw AbstractC3481.m7925(method, null, "Non-body HTTP method cannot contain @Body.", new Object[0]);
                }
                if (z5 && !c0237.f1775) {
                    throw AbstractC3481.m7925(method, null, "Form-encoded method must contain at least one @Field.", new Object[0]);
                }
                if (c0237.f1758 && !c0237.f1760) {
                    throw AbstractC3481.m7925(method, null, "Multipart method must contain at least one @Part.", new Object[0]);
                }
                C4952 c4952 = new C4952(c0237);
                Type genericReturnType2 = method.getGenericReturnType();
                if (AbstractC3481.m7939(genericReturnType2)) {
                    throw AbstractC3481.m7925(method, null, "Method return type must not include a type variable or wildcard: %s", genericReturnType2);
                }
                if (genericReturnType2 == Void.TYPE) {
                    throw AbstractC3481.m7925(method, null, "Service methods cannot return void.", new Object[0]);
                }
                Annotation[] annotations = method.getAnnotations();
                boolean z6 = c4952.f18798;
                if (z6) {
                    Type typeM79357 = ((ParameterizedType) method.getGenericParameterTypes()[r6.length - 1]).getActualTypeArguments()[0];
                    if (typeM79357 instanceof WildcardType) {
                        typeM79357 = ((WildcardType) typeM79357).getLowerBounds()[0];
                    }
                    if (AbstractC3481.m7929(typeM79357) == C1034.class && (typeM79357 instanceof ParameterizedType)) {
                        typeM79357 = AbstractC3481.m7935(0, (ParameterizedType) typeM79357);
                        z2 = true;
                        z3 = false;
                    } else {
                        if (AbstractC3481.m7929(typeM79357) == InterfaceC4415.class) {
                            throw AbstractC3481.m7925(method, null, "Suspend functions should not return Call, as they already execute asynchronously.\nChange its return type to %s", AbstractC3481.m7935(0, (ParameterizedType) typeM79357));
                        }
                        z3 = AbstractC3481.f13406 && typeM79357 == C5063.class;
                        z2 = false;
                    }
                    genericReturnType = new C4384(null, InterfaceC4415.class, typeM79357);
                    if (!AbstractC3481.m7917(annotations, InterfaceC2863.class)) {
                        Annotation[] annotationArr6 = new Annotation[annotations.length + 1];
                        annotationArr6[0] = C1551.f6232;
                        System.arraycopy(annotations, 0, annotationArr6, 1, annotations.length);
                        annotations = annotationArr6;
                    }
                    z = z3;
                } else {
                    genericReturnType = method.getGenericReturnType();
                    z = false;
                    z2 = false;
                }
                try {
                    InterfaceC1969 interfaceC1969 = r29.ᵷᵺʾᵖ(genericReturnType, annotations);
                    Type typeM5320 = interfaceC1969.m5320();
                    if (typeM5320 == C1120.class) {
                        throw AbstractC3481.m7925(method, null, "'" + AbstractC3481.m7929(typeM5320).getName() + "' is not a valid response body type. Did you mean ResponseBody?", new Object[0]);
                    }
                    if (typeM5320 == C1034.class) {
                        throw AbstractC3481.m7925(method, null, "Response must include generic type (e.g., Response<String>)", new Object[0]);
                    }
                    if (c4952.f18803.equals(str4) && !Void.class.equals(typeM5320) && (!AbstractC3481.f13406 || typeM5320 != C5063.class)) {
                        throw AbstractC3481.m7925(method, null, "HEAD method must use Void or Unit as response type.", new Object[0]);
                    }
                    try {
                        InterfaceC4840 interfaceC48402 = r29.ᵜᵪʾ(typeM5320, method.getAnnotations());
                        C3423 c3423 = (C3423) r29.ᵔᵖᵹᵫ;
                        return !z6 ? new C1698(c4952, c3423, interfaceC48402, interfaceC1969, 0) : z2 ? new C1698(c4952, c3423, interfaceC48402, interfaceC1969, 1) : new C1853(c4952, c3423, interfaceC48402, interfaceC1969, z);
                    } catch (RuntimeException e2) {
                        throw AbstractC3481.m7925(method, e2, "Unable to create converter for %s", typeM5320);
                    }
                } catch (RuntimeException e3) {
                    throw AbstractC3481.m7925(method, e3, "Unable to create call adapter for %s", genericReturnType);
                }
            }
            Annotation annotation2 = annotationArr[i5];
            if (annotation2 instanceof InterfaceC2148) {
                c0237.m1410("DELETE", ((InterfaceC2148) annotation2).value(), false);
            } else if (annotation2 instanceof InterfaceC2654) {
                c0237.m1410("GET", ((InterfaceC2654) annotation2).value(), false);
            } else if (annotation2 instanceof InterfaceC3392) {
                c0237.m1410("HEAD", ((InterfaceC3392) annotation2).value(), false);
            } else if (annotation2 instanceof InterfaceC2976) {
                c0237.m1410("PATCH", ((InterfaceC2976) annotation2).value(), true);
            } else if (annotation2 instanceof InterfaceC0588) {
                c0237.m1410("POST", ((InterfaceC0588) annotation2).value(), true);
            } else if (annotation2 instanceof InterfaceC1429) {
                c0237.m1410("PUT", ((InterfaceC1429) annotation2).value(), true);
            } else if (annotation2 instanceof InterfaceC2017) {
                c0237.m1410("OPTIONS", ((InterfaceC2017) annotation2).value(), false);
            } else if (annotation2 instanceof InterfaceC1675) {
                InterfaceC1675 interfaceC1675 = (InterfaceC1675) annotation2;
                c0237.m1410(interfaceC1675.method(), interfaceC1675.path(), interfaceC1675.hasBody());
            } else if (annotation2 instanceof InterfaceC2915) {
                InterfaceC2915 interfaceC2915 = (InterfaceC2915) annotation2;
                String[] strArrValue = interfaceC2915.value();
                if (strArrValue.length == 0) {
                    throw AbstractC3481.m7925(method, null, "@Headers annotation is empty.", new Object[0]);
                }
                boolean zAllowUnsafeNonAsciiValues = interfaceC2915.allowUnsafeNonAsciiValues();
                C4759 c4759 = new C4759();
                int length4 = strArrValue.length;
                for (int i16 = 0; i16 < length4; i16++) {
                    String str5 = strArrValue[i16];
                    int iIndexOf = str5.indexOf(58);
                    if (iIndexOf == -1 || iIndexOf == 0 || iIndexOf == str5.length() - 1) {
                        break loop0;
                    }
                    String strSubstring = str5.substring(0, iIndexOf);
                    String strTrim = str5.substring(iIndexOf + 1).trim();
                    if ("Content-Type".equalsIgnoreCase(strSubstring)) {
                        try {
                            C4532 c4532 = C4738.f18011;
                            c0237.f1759 = ᵽˊᵘᵬ.ᵻʽᵯ(strTrim);
                        } catch (IllegalArgumentException e4) {
                            throw AbstractC3481.m7925(method, e4, "Malformed content type: %s", strTrim);
                        }
                    } else if (zAllowUnsafeNonAsciiValues) {
                        ᵥˇᵛˎ.ˊᵾʽʼ(strSubstring);
                        ᵥˇᵛˎ.ᵵᵽ(c4759, strSubstring, strTrim);
                    } else {
                        c4759.m9939(strSubstring, strTrim);
                    }
                }
                c0237.f1763 = c4759.m9936();
            } else if (annotation2 instanceof InterfaceC1643) {
                if (c0237.f1772) {
                    throw AbstractC3481.m7925(method, null, "Only one encoding annotation is allowed.", new Object[0]);
                }
                c0237.f1758 = true;
            } else if (!(annotation2 instanceof InterfaceC0958)) {
                continue;
            } else {
                if (c0237.f1758) {
                    throw AbstractC3481.m7925(method, null, "Only one encoding annotation is allowed.", new Object[0]);
                }
                c0237.f1772 = true;
            }
            i5++;
        }
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public abstract Object mo3652(C0736 c0736, Object[] objArr);
}
