package d9; /* loaded from: classes2.dex */ public abstract class t { public static Object a(Object obj, int i10) { if (obj != null && !c(obj, i10)) { f(obj, "kotlin.jvm.functions.Function" + i10); } return obj; } public static int b(Object obj) { if (obj instanceof h) { return ((h) obj).getArity(); } if (obj instanceof c9.a) { return 0; } if (obj instanceof c9.l) { return 1; } return obj instanceof c9.p ? 2 : -1; } public static boolean c(Object obj, int i10) { return (obj instanceof s8.c) && b(obj) == i10; } private static Throwable d(Throwable th) { return j.k(th, t.class.getName()); } public static ClassCastException e(ClassCastException classCastException) { throw ((ClassCastException) d(classCastException)); } public static void f(Object obj, String str) { g((obj == null ? "null" : obj.getClass().getName()) + " cannot be cast to " + str); } public static void g(String str) { throw e(new ClassCastException(str)); } }