package kotlin.reflect.internal;

/* JADX INFO: compiled from: r8-map-id-ae6aab8d9a1033945587ffdd1bc6222159522c1d66e66a2c4cecb065134dd0a6 */
/* JADX INFO: loaded from: E:\ios\vf_dex\classes3.dex */
@kotlin.Metadata(d1 = {"\u0000<\n\u0002\u0018\u0002\n\u0002\u0010\"\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0010\u0011\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0001\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\u001a\u0019\u0010\u0003\u001a\b\u0012\u0004\u0012\u00020\u00020\u0001*\u00020\u0000H\u0000¢\u0006\u0004\b\u0003\u0010\u0004\u001a!\u0010\u0007\u001a\b\u0012\u0004\u0012\u00020\u00000\u0006*\n\u0012\u0004\u0012\u00020\u0000\u0018\u00010\u0005H\u0000¢\u0006\u0004\b\u0007\u0010\b\u001a\u0017\u0010\u000b\u001a\u00020\n*\u0006\u0012\u0002\b\u00030\tH\u0000¢\u0006\u0004\b\u000b\u0010\f\u001a\u0017\u0010\r\u001a\u00020\u0002*\u0006\u0012\u0002\b\u00030\tH\u0000¢\u0006\u0004\b\r\u0010\u000e\u001a\u0017\u0010\u0010\u001a\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u0002H\u0000¢\u0006\u0004\b\u0010\u0010\u0011\u001a\u0019\u0010\u0014\u001a\b\u0012\u0004\u0012\u00020\u00130\t*\u00020\u0012H\u0000¢\u0006\u0004\b\u0014\u0010\u0015\u001a\u0013\u0010\u0017\u001a\u00020\u0012*\u00020\u0016H\u0000¢\u0006\u0004\b\u0017\u0010\u0018\"\u001a\u0010\u001a\u001a\b\u0012\u0004\u0012\u00020\u00000\u00068\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0003\u0010\u0019¨\u0006\u001b"}, d2 = {"Lkotlinx/serialization/descriptors/SerialDescriptor;", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "a", "(Lkotlinx/serialization/descriptors/SerialDescriptor;)Ljava/util/Set;", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "b", "(Ljava/util/List;)[Lkotlinx/serialization/descriptors/SerialDescriptor;", "Lkotlin/reflect/KClass;", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "f", "(Lkotlin/reflect/KClass;)Ljava/lang/Void;", "e", "(Lkotlin/reflect/KClass;)Ljava/lang/String;", "className", "d", "(Ljava/lang/String;)Ljava/lang/String;", "Lkotlin/reflect/KType;", okhttp3.HttpUrl.FRAGMENT_ENCODE_SET, "c", "(Lkotlin/reflect/KType;)Lkotlin/reflect/KClass;", "Lkotlin/reflect/KTypeProjection;", "g", "(Lkotlin/reflect/KTypeProjection;)Lkotlin/reflect/KType;", "[Lkotlinx/serialization/descriptors/SerialDescriptor;", "EMPTY_DESCRIPTOR_ARRAY", "kotlinx-serialization-core"}, k = 2, mv = {2, 0, 0}, xi = 48)
@kotlin.jvm.internal.SourceDebugExtension
public final class Platform_commonKt {
    private static final kotlin.reflect.descriptors.SerialDescriptor[] a = new kotlin.reflect.descriptors.SerialDescriptor[0];

    public static final java.util.Set a(kotlin.reflect.descriptors.SerialDescriptor serialDescriptor) {
        kotlin.jvm.internal.Intrinsics.l(serialDescriptor, "<this>");
        if (serialDescriptor instanceof kotlin.reflect.internal.CachedNames) {
            return ((kotlin.reflect.internal.CachedNames) serialDescriptor).a();
        }
        java.util.HashSet hashSet = new java.util.HashSet(serialDescriptor.e());
        int iE = serialDescriptor.e();
        for (int i = 0; i < iE; i++) {
            hashSet.add(serialDescriptor.f(i));
        }
        return hashSet;
    }

    public static final kotlin.reflect.descriptors.SerialDescriptor[] b(java.util.List list) {
        kotlin.reflect.descriptors.SerialDescriptor[] serialDescriptorArr;
        if (list == null || list.isEmpty()) {
            list = null;
        }
        return (list == null || (serialDescriptorArr = (kotlin.reflect.descriptors.SerialDescriptor[]) list.toArray(new kotlin.reflect.descriptors.SerialDescriptor[0])) == null) ? a : serialDescriptorArr;
    }

    public static final kotlin.reflect.KClass c(kotlin.reflect.KType kType) {
        kotlin.jvm.internal.Intrinsics.l(kType, "<this>");
        kotlin.reflect.KClass kClassJ = kType.j();
        if (kClassJ instanceof kotlin.reflect.KClass) {
            return kClassJ;
        }
        if (!(kClassJ instanceof kotlin.reflect.KTypeParameter)) {
            throw new java.lang.IllegalArgumentException("Only KClass supported as classifier, got " + kClassJ);
        }
        throw new java.lang.IllegalArgumentException("Captured type parameter " + kClassJ + " from generic non-reified function. Such functionality cannot be supported because " + kClassJ + " is erased, either specify serializer explicitly or make calling function inline with reified " + kClassJ + '.');
    }

    public static final java.lang.String d(java.lang.String str) {
        kotlin.jvm.internal.Intrinsics.l(str, "className");
        return "Serializer for class '" + str + "' is not found.\nPlease ensure that class is marked as '@Serializable' and that the serialization compiler plugin is applied.\n";
    }

    public static final java.lang.String e(kotlin.reflect.KClass kClass) {
        kotlin.jvm.internal.Intrinsics.l(kClass, "<this>");
        java.lang.String strX = kClass.x();
        if (strX == null) {
            strX = "<local class name not available>";
        }
        return d(strX);
    }

    public static final java.lang.Void f(kotlin.reflect.KClass kClass) {
        kotlin.jvm.internal.Intrinsics.l(kClass, "<this>");
        throw new kotlin.reflect.SerializationException(e(kClass));
    }

    public static final kotlin.reflect.KType g(kotlin.reflect.KTypeProjection kTypeProjection) {
        kotlin.jvm.internal.Intrinsics.l(kTypeProjection, "<this>");
        kotlin.reflect.KType kTypeC = kTypeProjection.c();
        if (kTypeC != null) {
            return kTypeC;
        }
        throw new java.lang.IllegalArgumentException(("Star projections in type arguments are not allowed, but had " + kTypeProjection.c()).toString());
    }
}
