package jq;

import java.util.Iterator;
import java.util.Map;

/* loaded from: classes3.dex */
public abstract class d1 {

    /* renamed from: a, reason: collision with root package name */
    private static final Map f25200a;

    static {
        Map l10;
        l10 = sm.q0.l(rm.c0.a(kotlin.jvm.internal.p0.b(String.class), gq.a.y(kotlin.jvm.internal.u0.f26205a)), rm.c0.a(kotlin.jvm.internal.p0.b(Character.TYPE), gq.a.s(kotlin.jvm.internal.g.f26184a)), rm.c0.a(kotlin.jvm.internal.p0.b(char[].class), gq.a.c()), rm.c0.a(kotlin.jvm.internal.p0.b(Double.TYPE), gq.a.t(kotlin.jvm.internal.l.f26194a)), rm.c0.a(kotlin.jvm.internal.p0.b(double[].class), gq.a.d()), rm.c0.a(kotlin.jvm.internal.p0.b(Float.TYPE), gq.a.u(kotlin.jvm.internal.m.f26196a)), rm.c0.a(kotlin.jvm.internal.p0.b(float[].class), gq.a.e()), rm.c0.a(kotlin.jvm.internal.p0.b(Long.TYPE), gq.a.w(kotlin.jvm.internal.w.f26206a)), rm.c0.a(kotlin.jvm.internal.p0.b(long[].class), gq.a.h()), rm.c0.a(kotlin.jvm.internal.p0.b(rm.h0.class), gq.a.B(rm.h0.f34885q)), rm.c0.a(kotlin.jvm.internal.p0.b(rm.i0.class), gq.a.n()), rm.c0.a(kotlin.jvm.internal.p0.b(Integer.TYPE), gq.a.v(kotlin.jvm.internal.s.f26202a)), rm.c0.a(kotlin.jvm.internal.p0.b(int[].class), gq.a.f()), rm.c0.a(kotlin.jvm.internal.p0.b(rm.f0.class), gq.a.A(rm.f0.f34880q)), rm.c0.a(kotlin.jvm.internal.p0.b(rm.g0.class), gq.a.m()), rm.c0.a(kotlin.jvm.internal.p0.b(Short.TYPE), gq.a.x(kotlin.jvm.internal.s0.f26203a)), rm.c0.a(kotlin.jvm.internal.p0.b(short[].class), gq.a.k()), rm.c0.a(kotlin.jvm.internal.p0.b(rm.k0.class), gq.a.C(rm.k0.f34892q)), rm.c0.a(kotlin.jvm.internal.p0.b(rm.l0.class), gq.a.o()), rm.c0.a(kotlin.jvm.internal.p0.b(Byte.TYPE), gq.a.r(kotlin.jvm.internal.e.f26182a)), rm.c0.a(kotlin.jvm.internal.p0.b(byte[].class), gq.a.b()), rm.c0.a(kotlin.jvm.internal.p0.b(rm.d0.class), gq.a.z(rm.d0.f34875q)), rm.c0.a(kotlin.jvm.internal.p0.b(rm.e0.class), gq.a.l()), rm.c0.a(kotlin.jvm.internal.p0.b(Boolean.TYPE), gq.a.q(kotlin.jvm.internal.d.f26181a)), rm.c0.a(kotlin.jvm.internal.p0.b(boolean[].class), gq.a.a()), rm.c0.a(kotlin.jvm.internal.p0.b(rm.n0.class), gq.a.D(rm.n0.f34904a)), rm.c0.a(kotlin.jvm.internal.p0.b(Void.class), gq.a.j()), rm.c0.a(kotlin.jvm.internal.p0.b(sp.a.class), gq.a.E(sp.a.f35959q)));
        f25200a = l10;
    }

    public static final hq.e a(String serialName, hq.d kind) {
        kotlin.jvm.internal.t.g(serialName, "serialName");
        kotlin.jvm.internal.t.g(kind, "kind");
        c(serialName);
        return new c1(serialName, kind);
    }

    private static final String b(String str) {
        if (!(str.length() > 0)) {
            return str;
        }
        StringBuilder sb2 = new StringBuilder();
        char charAt = str.charAt(0);
        sb2.append((Object) (Character.isLowerCase(charAt) ? kotlin.text.c.e(charAt) : String.valueOf(charAt)));
        String substring = str.substring(1);
        kotlin.jvm.internal.t.f(substring, "this as java.lang.String).substring(startIndex)");
        sb2.append(substring);
        return sb2.toString();
    }

    private static final void c(String str) {
        boolean z10;
        String f10;
        boolean z11;
        Iterator it = f25200a.keySet().iterator();
        while (it.hasNext()) {
            String i10 = ((kn.d) it.next()).i();
            kotlin.jvm.internal.t.d(i10);
            String b10 = b(i10);
            z10 = kotlin.text.y.z(str, "kotlin." + b10, true);
            if (!z10) {
                z11 = kotlin.text.y.z(str, b10, true);
                if (!z11) {
                }
            }
            f10 = kotlin.text.r.f("\n                The name of serial descriptor should uniquely identify associated serializer.\n                For serial name " + str + " there already exist " + b(b10) + "Serializer.\n                Please refer to SerialDescriptor documentation for additional information.\n            ");
            throw new IllegalArgumentException(f10);
        }
    }
}
