package kotlin.coroutines.jvm.internal; import java.lang.reflect.Field; /* loaded from: classes2.dex */ public abstract class g { private static final void a(int i10, int i11) { if (i11 <= i10) { return; } throw new IllegalStateException(("Debug metadata version mismatch. Expected: " + i10 + ", got " + i11 + ". Please update the Kotlin standard library.").toString()); } private static final f b(a aVar) { return (f) aVar.getClass().getAnnotation(f.class); } private static final int c(a aVar) { try { Field declaredField = aVar.getClass().getDeclaredField("label"); declaredField.setAccessible(true); Object obj = declaredField.get(aVar); Integer num = obj instanceof Integer ? (Integer) obj : null; return (num != null ? num.intValue() : 0) - 1; } catch (Exception unused) { return -1; } } public static final StackTraceElement d(a aVar) { String str; d9.j.e(aVar, ""); f b10 = b(aVar); if (b10 == null) { return null; } a(1, b10.v()); int c10 = c(aVar); int i10 = c10 < 0 ? -1 : b10.l()[c10]; String b11 = i.f11422a.b(aVar); if (b11 == null) { str = b10.c(); } else { str = b11 + '/' + b10.c(); } return new StackTraceElement(str, b10.m(), b10.f(), i10); } }