Primer paso de la investigacion. Se aportan el .apk, las carpetas con el apk extraido y el apk descompilado. El archivo API_DOCUMENTATION.md es un archivo donde se anotaran los descubrimientos del funcionamiento de la API, y los .py son scripts para probar la funcionalidad de la API con los métodos que vayamos encontrando. Finalmente, los archivos .js son scripts de Frida para extraer informacion de la APP durante la ejecucion.

This commit is contained in:
2025-12-04 13:59:54 +01:00
parent f2fd1c3bf5
commit e0133d2ca2
10432 changed files with 1019085 additions and 1 deletions

View File

@@ -0,0 +1,87 @@
package kotlinx.coroutines.debug;
import android.annotation.SuppressLint;
import java.lang.instrument.ClassFileTransformer;
import java.lang.instrument.Instrumentation;
import java.security.ProtectionDomain;
import kotlin.Metadata;
import kotlin.Result;
import kotlin.ResultKt;
import kotlin.io.ByteStreamsKt;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.debug.internal.AgentInstallationType;
import kotlinx.coroutines.debug.internal.DebugProbesImpl;
import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;
import sun.misc.Signal;
import sun.misc.SignalHandler;
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\bÁ\u0002\u0018\u00002\u00020\u0001:\u0001\fB\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\b\u0010\u0005\u001a\u00020\u0006H\u0002J\u001a\u0010\u0007\u001a\u00020\u00062\b\u0010\b\u001a\u0004\u0018\u00010\t2\u0006\u0010\n\u001a\u00020\u000bH\u0007R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\r"}, d2 = {"Lkotlinx/coroutines/debug/AgentPremain;", "", "()V", "enableCreationStackTraces", "", "installSignalHandler", "", "premain", "args", "", "instrumentation", "Ljava/lang/instrument/Instrumentation;", "DebugProbesTransformer", "kotlinx-coroutines-core"}, k = 1, mv = {1, 9, 0}, xi = 48)
@SuppressLint({"all"})
@IgnoreJRERequirement
/* loaded from: classes3.dex */
public final class AgentPremain {
public static final AgentPremain INSTANCE = new AgentPremain();
private static final boolean enableCreationStackTraces;
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0012\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\bÀ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J<\u0010\u0003\u001a\u0004\u0018\u00010\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u00062\u0006\u0010\u0007\u001a\u00020\b2\f\u0010\t\u001a\b\u0012\u0002\b\u0003\u0018\u00010\n2\u0006\u0010\u000b\u001a\u00020\f2\b\u0010\r\u001a\u0004\u0018\u00010\u0004H\u0016¨\u0006\u000e"}, d2 = {"Lkotlinx/coroutines/debug/AgentPremain$DebugProbesTransformer;", "Ljava/lang/instrument/ClassFileTransformer;", "()V", "transform", "", "loader", "Ljava/lang/ClassLoader;", "className", "", "classBeingRedefined", "Ljava/lang/Class;", "protectionDomain", "Ljava/security/ProtectionDomain;", "classfileBuffer", "kotlinx-coroutines-core"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes3.dex */
public static final class DebugProbesTransformer implements ClassFileTransformer {
public static final DebugProbesTransformer INSTANCE = new DebugProbesTransformer();
private DebugProbesTransformer() {
}
public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) {
if (loader == null || !Intrinsics.areEqual(className, "kotlin/coroutines/jvm/internal/DebugProbesKt")) {
return null;
}
AgentInstallationType.INSTANCE.setInstalledStatically$kotlinx_coroutines_core(true);
return ByteStreamsKt.readBytes(loader.getResourceAsStream("DebugProbesKt.bin"));
}
}
static {
Object m116constructorimpl;
try {
Result.Companion companion = Result.INSTANCE;
String property = System.getProperty("kotlinx.coroutines.debug.enable.creation.stack.trace");
m116constructorimpl = Result.m116constructorimpl(property != null ? Boolean.valueOf(Boolean.parseBoolean(property)) : null);
} catch (Throwable th) {
Result.Companion companion2 = Result.INSTANCE;
m116constructorimpl = Result.m116constructorimpl(ResultKt.createFailure(th));
}
Boolean bool = (Boolean) (Result.m122isFailureimpl(m116constructorimpl) ? null : m116constructorimpl);
enableCreationStackTraces = bool != null ? bool.booleanValue() : DebugProbesImpl.INSTANCE.getEnableCreationStackTraces$kotlinx_coroutines_core();
}
private AgentPremain() {
}
/* JADX WARN: Type inference failed for: r0v1, types: [sun.misc.SignalHandler, java.lang.Object] */
private final void installSignalHandler() {
try {
Signal.handle(new Signal("TRAP"), (SignalHandler) new Object());
} catch (Throwable unused) {
}
}
private static final void installSignalHandler$lambda$1(Signal signal) {
DebugProbesImpl debugProbesImpl = DebugProbesImpl.INSTANCE;
if (debugProbesImpl.isInstalled$kotlinx_coroutines_debug()) {
debugProbesImpl.dumpCoroutines(System.out);
} else {
System.out.println((Object) "Cannot perform coroutines dump, debug probes are disabled");
}
}
@JvmStatic
public static final void premain(String args, Instrumentation instrumentation) {
AgentInstallationType.INSTANCE.setInstalledStatically$kotlinx_coroutines_core(true);
instrumentation.addTransformer(DebugProbesTransformer.INSTANCE);
DebugProbesImpl debugProbesImpl = DebugProbesImpl.INSTANCE;
debugProbesImpl.setEnableCreationStackTraces$kotlinx_coroutines_core(enableCreationStackTraces);
debugProbesImpl.install$kotlinx_coroutines_core();
INSTANCE.installSignalHandler();
}
}

View File

@@ -0,0 +1,21 @@
package kotlinx.coroutines.debug.internal;
import kotlin.Metadata;
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0005\bÀ\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u001a\u0010\u0003\u001a\u00020\u0004X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0005\u0010\u0006\"\u0004\b\u0007\u0010\b¨\u0006\t"}, d2 = {"Lkotlinx/coroutines/debug/internal/AgentInstallationType;", "", "()V", "isInstalledStatically", "", "isInstalledStatically$kotlinx_coroutines_core", "()Z", "setInstalledStatically$kotlinx_coroutines_core", "(Z)V", "kotlinx-coroutines-core"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes3.dex */
public final class AgentInstallationType {
public static final AgentInstallationType INSTANCE = new AgentInstallationType();
private static boolean isInstalledStatically;
private AgentInstallationType() {
}
public final boolean isInstalledStatically$kotlinx_coroutines_core() {
return isInstalledStatically;
}
public final void setInstalledStatically$kotlinx_coroutines_core(boolean z3) {
isInstalledStatically = z3;
}
}

View File

@@ -0,0 +1,604 @@
package kotlinx.coroutines.debug.internal;
import com.adif.elcanomovil.widget.DefaultWidgetPayloadHandler;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.google.firebase.crashlytics.internal.metadata.UserMetadata;
import com.google.firebase.remoteconfig.RemoteConfigConstants;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.util.Iterator;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import java.util.concurrent.atomic.AtomicReferenceArray;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
import kotlin.KotlinNothingValueException;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.collections.AbstractMutableMap;
import kotlin.collections.AbstractMutableSet;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.jvm.internal.markers.KMutableIterator;
import kotlin.jvm.internal.markers.KMutableMap;
import kotlin.ranges.RangesKt;
import kotlinx.coroutines.debug.internal.ConcurrentWeakMap;
import kotlinx.coroutines.internal.Symbol;
@Metadata(d1 = {"\u0000R\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010#\n\u0002\u0010'\n\u0002\b\u0005\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u000f\b\u0000\u0018\u0000*\b\b\u0000\u0010\u0001*\u00020\u0002*\b\b\u0001\u0010\u0003*\u00020\u00022\u000e\u0012\u0004\u0012\u0002H\u0001\u0012\u0004\u0012\u0002H\u00030\u0004:\u0003()*B\u000f\u0012\b\b\u0002\u0010\u0005\u001a\u00020\u0006¢\u0006\u0002\u0010\u0007J\u0014\u0010\u0019\u001a\u00020\u001a2\n\u0010\u001b\u001a\u0006\u0012\u0002\b\u00030\u001cH\u0002J\b\u0010\u001d\u001a\u00020\u001aH\u0016J\b\u0010\u001e\u001a\u00020\u001aH\u0002J\u0018\u0010\u001f\u001a\u0004\u0018\u00018\u00012\u0006\u0010 \u001a\u00028\u0000H\u0096\u0002¢\u0006\u0002\u0010!J\u001f\u0010\"\u001a\u0004\u0018\u00018\u00012\u0006\u0010 \u001a\u00028\u00002\u0006\u0010#\u001a\u00028\u0001H\u0016¢\u0006\u0002\u0010$J!\u0010%\u001a\u0004\u0018\u00018\u00012\u0006\u0010 \u001a\u00028\u00002\b\u0010#\u001a\u0004\u0018\u00018\u0001H\u0002¢\u0006\u0002\u0010$J\u0017\u0010&\u001a\u0004\u0018\u00018\u00012\u0006\u0010 \u001a\u00028\u0000H\u0016¢\u0006\u0002\u0010!J\u0006\u0010'\u001a\u00020\u001aR\t\u0010\b\u001a\u00020\tX\u0082\u0004R\u001f\u0010\n\u001a\u0018\u0012\u0014\u0012\u00120\fR\u000e\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u00010\u00000\u000bX\u0082\u0004R&\u0010\r\u001a\u0014\u0012\u0010\u0012\u000e\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u00010\u000f0\u000e8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0010\u0010\u0011R\u001a\u0010\u0012\u001a\b\u0012\u0004\u0012\u00028\u00000\u000e8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0013\u0010\u0011R\u0014\u0010\u0014\u001a\u00020\u00158VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0016\u0010\u0017R\u0016\u0010\u0005\u001a\n\u0012\u0004\u0012\u00028\u0000\u0018\u00010\u0018X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006+"}, d2 = {"Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap;", "K", "", "V", "Lkotlin/collections/AbstractMutableMap;", "weakRefQueue", "", "(Z)V", "_size", "Lkotlinx/atomicfu/AtomicInt;", "core", "Lkotlinx/atomicfu/AtomicRef;", "Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap$Core;", RemoteConfigConstants.ResponseFieldKey.ENTRIES, "", "", "getEntries", "()Ljava/util/Set;", UserMetadata.KEYDATA_FILENAME, "getKeys", "size", "", "getSize", "()I", "Ljava/lang/ref/ReferenceQueue;", "cleanWeakRef", "", DefaultWidgetPayloadHandler.IS_WIDGET_JSON_TYPE, "Lkotlinx/coroutines/debug/internal/HashedWeakRef;", "clear", "decrementSize", "get", "key", "(Ljava/lang/Object;)Ljava/lang/Object;", "put", "value", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", "putSynchronized", "remove", "runWeakRefQueueCleaningLoopUntilInterrupted", "Core", "Entry", "KeyValueSet", "kotlinx-coroutines-core"}, k = 1, mv = {1, 9, 0}, xi = 48)
@SourceDebugExtension({"SMAP\nConcurrentWeakMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ConcurrentWeakMap.kt\nkotlinx/coroutines/debug/internal/ConcurrentWeakMap\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,284:1\n1#2:285\n*E\n"})
/* loaded from: classes3.dex */
public final class ConcurrentWeakMap<K, V> extends AbstractMutableMap<K, V> {
private static final /* synthetic */ AtomicIntegerFieldUpdater _size$volatile$FU = AtomicIntegerFieldUpdater.newUpdater(ConcurrentWeakMap.class, "_size$volatile");
private static final /* synthetic */ AtomicReferenceFieldUpdater core$volatile$FU = AtomicReferenceFieldUpdater.newUpdater(ConcurrentWeakMap.class, Object.class, "core$volatile");
private volatile /* synthetic */ int _size$volatile;
private volatile /* synthetic */ Object core$volatile;
private final ReferenceQueue<K> weakRefQueue;
@Metadata(d1 = {"\u0000D\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\u0007\n\u0002\u0010)\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0082\u0004\u0018\u00002\u00020\u0001:\u0001!B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0012\u0010\r\u001a\u00020\u000e2\n\u0010\u000f\u001a\u0006\u0012\u0002\b\u00030\u0007J\u0015\u0010\u0010\u001a\u0004\u0018\u00018\u00012\u0006\u0010\u0011\u001a\u00028\u0000¢\u0006\u0002\u0010\u0012J\u0010\u0010\u0013\u001a\u00020\u00032\u0006\u0010\u0014\u001a\u00020\u0003H\u0002J,\u0010\u0015\u001a\b\u0012\u0004\u0012\u0002H\u00170\u0016\"\u0004\b\u0002\u0010\u00172\u0018\u0010\u0018\u001a\u0014\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u0001\u0012\u0004\u0012\u0002H\u00170\u0019J1\u0010\u001a\u001a\u0004\u0018\u00010\u00012\u0006\u0010\u0011\u001a\u00028\u00002\b\u0010\u001b\u001a\u0004\u0018\u00018\u00012\u0010\b\u0002\u0010\u001c\u001a\n\u0012\u0004\u0012\u00028\u0000\u0018\u00010\u0007¢\u0006\u0002\u0010\u001dJ\u0016\u0010\u001e\u001a\u00120\u0000R\u000e\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u00010\u001fJ\u0010\u0010 \u001a\u00020\u000e2\u0006\u0010\u0013\u001a\u00020\u0003H\u0002R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0017\u0010\u0005\u001a\u0010\u0012\f\u0012\n\u0012\u0004\u0012\u00028\u0000\u0018\u00010\u00070\u0006X\u0082\u0004R\t\u0010\b\u001a\u00020\tX\u0082\u0004R\u000e\u0010\n\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u000b\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0011\u0010\f\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00010\u0006X\u0082\u0004¨\u0006\""}, d2 = {"Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap$Core;", "", "allocated", "", "(Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap;I)V", UserMetadata.KEYDATA_FILENAME, "Lkotlinx/atomicfu/AtomicArray;", "Lkotlinx/coroutines/debug/internal/HashedWeakRef;", "load", "Lkotlinx/atomicfu/AtomicInt;", "shift", "threshold", "values", "cleanWeakRef", "", "weakRef", "getImpl", "key", "(Ljava/lang/Object;)Ljava/lang/Object;", FirebaseAnalytics.Param.INDEX, "hash", "keyValueIterator", "", "E", "factory", "Lkotlin/Function2;", "putImpl", "value", "weakKey0", "(Ljava/lang/Object;Ljava/lang/Object;Lkotlinx/coroutines/debug/internal/HashedWeakRef;)Ljava/lang/Object;", "rehash", "Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap;", "removeCleanedAt", "KeyValueIterator", "kotlinx-coroutines-core"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes3.dex */
public final class Core {
private static final /* synthetic */ AtomicIntegerFieldUpdater load$volatile$FU = AtomicIntegerFieldUpdater.newUpdater(Core.class, "load$volatile");
private final int allocated;
private final /* synthetic */ AtomicReferenceArray keys;
private volatile /* synthetic */ int load$volatile;
private final int shift;
private final int threshold;
private final /* synthetic */ AtomicReferenceArray values;
@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010)\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0010\u0001\n\u0000\b\u0082\u0004\u0018\u0000*\u0004\b\u0002\u0010\u00012\b\u0012\u0004\u0012\u0002H\u00010\u0002B\u001f\u0012\u0018\u0010\u0003\u001a\u0014\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u0001\u0012\u0004\u0012\u00028\u00020\u0004¢\u0006\u0002\u0010\u0005J\b\u0010\u000b\u001a\u00020\fH\u0002J\t\u0010\r\u001a\u00020\u000eH\u0096\u0002J\u000e\u0010\u000f\u001a\u00028\u0002H\u0096\u0002¢\u0006\u0002\u0010\u0010J\b\u0010\u0011\u001a\u00020\u0012H\u0016R \u0010\u0003\u001a\u0014\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u0001\u0012\u0004\u0012\u00028\u00020\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\b\u001a\u00028\u0000X\u0082.¢\u0006\u0004\n\u0002\u0010\tR\u0010\u0010\n\u001a\u00028\u0001X\u0082.¢\u0006\u0004\n\u0002\u0010\t¨\u0006\u0013"}, d2 = {"Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap$Core$KeyValueIterator;", "E", "", "factory", "Lkotlin/Function2;", "(Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap$Core;Lkotlin/jvm/functions/Function2;)V", FirebaseAnalytics.Param.INDEX, "", "key", "Ljava/lang/Object;", "value", "findNext", "", "hasNext", "", "next", "()Ljava/lang/Object;", "remove", "", "kotlinx-coroutines-core"}, k = 1, mv = {1, 9, 0}, xi = 48)
@SourceDebugExtension({"SMAP\nConcurrentWeakMap.kt\nKotlin\n*S Kotlin\n*F\n+ 1 ConcurrentWeakMap.kt\nkotlinx/coroutines/debug/internal/ConcurrentWeakMap$Core$KeyValueIterator\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,284:1\n1#2:285\n*E\n"})
/* loaded from: classes3.dex */
public final class KeyValueIterator<E> implements Iterator<E>, KMutableIterator {
private final Function2<K, V, E> factory;
private int index = -1;
private K key;
private V value;
/* JADX WARN: Multi-variable type inference failed */
public KeyValueIterator(Function2<? super K, ? super V, ? extends E> function2) {
this.factory = function2;
findNext();
}
private final void findNext() {
K k4;
while (true) {
int i = this.index + 1;
this.index = i;
if (i >= ((Core) Core.this).allocated) {
return;
}
HashedWeakRef hashedWeakRef = (HashedWeakRef) Core.this.getKeys().get(this.index);
if (hashedWeakRef != null && (k4 = (K) hashedWeakRef.get()) != null) {
this.key = k4;
Object obj = (V) Core.this.getValues().get(this.index);
if (obj instanceof Marked) {
obj = (V) ((Marked) obj).ref;
}
if (obj != null) {
this.value = (V) obj;
return;
}
}
}
}
@Override // java.util.Iterator
public boolean hasNext() {
return this.index < ((Core) Core.this).allocated;
}
@Override // java.util.Iterator
public E next() {
if (this.index >= ((Core) Core.this).allocated) {
throw new NoSuchElementException();
}
Function2<K, V, E> function2 = this.factory;
K k4 = this.key;
if (k4 == false) {
Intrinsics.throwUninitializedPropertyAccessException("key");
k4 = (K) Unit.INSTANCE;
}
V v3 = this.value;
if (v3 == false) {
Intrinsics.throwUninitializedPropertyAccessException("value");
v3 = (V) Unit.INSTANCE;
}
E e4 = (E) function2.invoke(k4, v3);
findNext();
return e4;
}
@Override // java.util.Iterator
public Void remove() {
ConcurrentWeakMapKt.noImpl();
throw new KotlinNothingValueException();
}
}
public Core(int i) {
this.allocated = i;
this.shift = Integer.numberOfLeadingZeros(i) + 1;
this.threshold = (i * 2) / 3;
this.keys = new AtomicReferenceArray(i);
this.values = new AtomicReferenceArray(i);
}
/* JADX INFO: Access modifiers changed from: private */
public final /* synthetic */ AtomicReferenceArray getKeys() {
return this.keys;
}
private final /* synthetic */ int getLoad$volatile() {
return this.load$volatile;
}
/* JADX INFO: Access modifiers changed from: private */
public final /* synthetic */ AtomicReferenceArray getValues() {
return this.values;
}
private final int index(int hash) {
return (hash * (-1640531527)) >>> this.shift;
}
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ Object putImpl$default(Core core, Object obj, Object obj2, HashedWeakRef hashedWeakRef, int i, Object obj3) {
if ((i & 4) != 0) {
hashedWeakRef = null;
}
return core.putImpl(obj, obj2, hashedWeakRef);
}
private final void removeCleanedAt(int index) {
while (true) {
Object obj = getValues().get(index);
if (obj == null || (obj instanceof Marked)) {
return;
}
AtomicReferenceArray values = getValues();
while (!values.compareAndSet(index, obj, null)) {
if (values.get(index) != obj) {
break;
}
}
ConcurrentWeakMap.this.decrementSize();
return;
}
}
private final /* synthetic */ void setLoad$volatile(int i) {
this.load$volatile = i;
}
private final /* synthetic */ void update$atomicfu(Object obj, AtomicIntegerFieldUpdater atomicIntegerFieldUpdater, Function1<? super Integer, Integer> function1) {
int i;
do {
i = atomicIntegerFieldUpdater.get(obj);
} while (!atomicIntegerFieldUpdater.compareAndSet(obj, i, function1.invoke(Integer.valueOf(i)).intValue()));
}
public final void cleanWeakRef(HashedWeakRef<?> weakRef) {
int index = index(weakRef.hash);
while (true) {
HashedWeakRef<?> hashedWeakRef = (HashedWeakRef) getKeys().get(index);
if (hashedWeakRef == null) {
return;
}
if (hashedWeakRef == weakRef) {
removeCleanedAt(index);
return;
} else {
if (index == 0) {
index = this.allocated;
}
index--;
}
}
}
/* JADX WARN: Multi-variable type inference failed */
public final V getImpl(K key) {
int index = index(key.hashCode());
while (true) {
HashedWeakRef hashedWeakRef = (HashedWeakRef) getKeys().get(index);
if (hashedWeakRef == null) {
return null;
}
T t2 = hashedWeakRef.get();
if (Intrinsics.areEqual(key, t2)) {
V v3 = (V) getValues().get(index);
return v3 instanceof Marked ? (V) ((Marked) v3).ref : v3;
}
if (t2 == 0) {
removeCleanedAt(index);
}
if (index == 0) {
index = this.allocated;
}
index--;
}
}
public final <E> Iterator<E> keyValueIterator(Function2<? super K, ? super V, ? extends E> factory) {
return new KeyValueIterator(factory);
}
/* JADX WARN: Code restructure failed: missing block: B:18:0x006b, code lost:
r3 = getValues().get(r0);
*/
/* JADX WARN: Code restructure failed: missing block: B:19:0x0075, code lost:
if ((r3 instanceof kotlinx.coroutines.debug.internal.Marked) == false) goto L35;
*/
/* JADX WARN: Code restructure failed: missing block: B:20:0x007c, code lost:
r4 = getValues();
*/
/* JADX WARN: Code restructure failed: missing block: B:22:0x0084, code lost:
if (r4.compareAndSet(r0, r3, r9) == false) goto L39;
*/
/* JADX WARN: Code restructure failed: missing block: B:24:0x008b, code lost:
if (r4.get(r0) == r3) goto L60;
*/
/* JADX WARN: Code restructure failed: missing block: B:28:0x0086, code lost:
return r3;
*/
/* JADX WARN: Code restructure failed: missing block: B:31:0x0077, code lost:
r7 = kotlinx.coroutines.debug.internal.ConcurrentWeakMapKt.REHASH;
*/
/* JADX WARN: Code restructure failed: missing block: B:32:0x007b, code lost:
return r7;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object putImpl(K r8, V r9, kotlinx.coroutines.debug.internal.HashedWeakRef<K> r10) {
/*
r7 = this;
int r0 = r8.hashCode()
int r0 = r7.index(r0)
r1 = 0
L9:
java.util.concurrent.atomic.AtomicReferenceArray r2 = r7.getKeys()
java.lang.Object r2 = r2.get(r0)
kotlinx.coroutines.debug.internal.HashedWeakRef r2 = (kotlinx.coroutines.debug.internal.HashedWeakRef) r2
if (r2 != 0) goto L58
r3 = 0
if (r9 != 0) goto L19
return r3
L19:
if (r1 != 0) goto L35
java.util.concurrent.atomic.AtomicIntegerFieldUpdater r2 = getLoad$volatile$FU()
L1f:
int r1 = r2.get(r7)
int r4 = r7.threshold
if (r1 < r4) goto L2c
kotlinx.coroutines.internal.Symbol r7 = kotlinx.coroutines.debug.internal.ConcurrentWeakMapKt.access$getREHASH$p()
return r7
L2c:
int r4 = r1 + 1
boolean r1 = r2.compareAndSet(r7, r1, r4)
if (r1 == 0) goto L1f
r1 = 1
L35:
r4 = r1
if (r10 != 0) goto L43
kotlinx.coroutines.debug.internal.HashedWeakRef r10 = new kotlinx.coroutines.debug.internal.HashedWeakRef
kotlinx.coroutines.debug.internal.ConcurrentWeakMap<K, V> r1 = kotlinx.coroutines.debug.internal.ConcurrentWeakMap.this
java.lang.ref.ReferenceQueue r1 = kotlinx.coroutines.debug.internal.ConcurrentWeakMap.access$getWeakRefQueue$p(r1)
r10.<init>(r8, r1)
L43:
r5 = r10
java.util.concurrent.atomic.AtomicReferenceArray r6 = r7.getKeys()
L48:
boolean r10 = r6.compareAndSet(r0, r3, r5)
if (r10 == 0) goto L4f
goto L6b
L4f:
java.lang.Object r10 = r6.get(r0)
if (r10 == 0) goto L48
r1 = r4
r10 = r5
goto L9
L58:
java.lang.Object r2 = r2.get()
boolean r3 = kotlin.jvm.internal.Intrinsics.areEqual(r8, r2)
if (r3 == 0) goto L8e
if (r1 == 0) goto L6b
java.util.concurrent.atomic.AtomicIntegerFieldUpdater r8 = getLoad$volatile$FU()
r8.decrementAndGet(r7)
L6b:
java.util.concurrent.atomic.AtomicReferenceArray r8 = r7.getValues()
java.lang.Object r3 = r8.get(r0)
boolean r8 = r3 instanceof kotlinx.coroutines.debug.internal.Marked
if (r8 == 0) goto L7c
kotlinx.coroutines.internal.Symbol r7 = kotlinx.coroutines.debug.internal.ConcurrentWeakMapKt.access$getREHASH$p()
return r7
L7c:
java.util.concurrent.atomic.AtomicReferenceArray r4 = r7.getValues()
L80:
boolean r8 = r4.compareAndSet(r0, r3, r9)
if (r8 == 0) goto L87
return r3
L87:
java.lang.Object r8 = r4.get(r0)
if (r8 == r3) goto L80
goto L6b
L8e:
if (r2 != 0) goto L93
r7.removeCleanedAt(r0)
L93:
if (r0 != 0) goto L97
int r0 = r7.allocated
L97:
int r0 = r0 + (-1)
goto L9
*/
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.debug.internal.ConcurrentWeakMap.Core.putImpl(java.lang.Object, java.lang.Object, kotlinx.coroutines.debug.internal.HashedWeakRef):java.lang.Object");
}
/* JADX WARN: Multi-variable type inference failed */
public final ConcurrentWeakMap<K, V>.Core rehash() {
Object obj;
Symbol symbol;
Marked mark;
while (true) {
ConcurrentWeakMap<K, V>.Core core = (ConcurrentWeakMap<K, V>.Core) new Core(Integer.highestOneBit(RangesKt.coerceAtLeast(ConcurrentWeakMap.this.size(), 4)) * 4);
int i = this.allocated;
for (int i4 = 0; i4 < i; i4++) {
HashedWeakRef hashedWeakRef = (HashedWeakRef) getKeys().get(i4);
Object obj2 = hashedWeakRef != null ? hashedWeakRef.get() : null;
if (hashedWeakRef != null && obj2 == null) {
removeCleanedAt(i4);
}
while (true) {
obj = getValues().get(i4);
if (!(obj instanceof Marked)) {
AtomicReferenceArray values = getValues();
mark = ConcurrentWeakMapKt.mark(obj);
while (!values.compareAndSet(i4, obj, mark)) {
if (values.get(i4) != obj) {
break;
}
}
break;
}
obj = ((Marked) obj).ref;
break;
}
if (obj2 != null && obj != null) {
Object putImpl = core.putImpl(obj2, obj, hashedWeakRef);
symbol = ConcurrentWeakMapKt.REHASH;
if (putImpl != symbol) {
}
}
}
return core;
}
}
}
@Metadata(d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010'\n\u0002\b\u000b\b\u0002\u0018\u0000*\u0004\b\u0002\u0010\u0001*\u0004\b\u0003\u0010\u00022\u000e\u0012\u0004\u0012\u0002H\u0001\u0012\u0004\u0012\u0002H\u00020\u0003B\u0015\u0012\u0006\u0010\u0004\u001a\u00028\u0002\u0012\u0006\u0010\u0005\u001a\u00028\u0003¢\u0006\u0002\u0010\u0006J\u0015\u0010\u000b\u001a\u00028\u00032\u0006\u0010\f\u001a\u00028\u0003H\u0016¢\u0006\u0002\u0010\rR\u0016\u0010\u0004\u001a\u00028\u0002X\u0096\u0004¢\u0006\n\n\u0002\u0010\t\u001a\u0004\b\u0007\u0010\bR\u0016\u0010\u0005\u001a\u00028\u0003X\u0096\u0004¢\u0006\n\n\u0002\u0010\t\u001a\u0004\b\n\u0010\b¨\u0006\u000e"}, d2 = {"Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap$Entry;", "K", "V", "", "key", "value", "(Ljava/lang/Object;Ljava/lang/Object;)V", "getKey", "()Ljava/lang/Object;", "Ljava/lang/Object;", "getValue", "setValue", "newValue", "(Ljava/lang/Object;)Ljava/lang/Object;", "kotlinx-coroutines-core"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes3.dex */
public static final class Entry<K, V> implements Map.Entry<K, V>, KMutableMap.Entry {
private final K key;
private final V value;
public Entry(K k4, V v3) {
this.key = k4;
this.value = v3;
}
@Override // java.util.Map.Entry
public K getKey() {
return this.key;
}
@Override // java.util.Map.Entry
public V getValue() {
return this.value;
}
@Override // java.util.Map.Entry
public V setValue(V newValue) {
ConcurrentWeakMapKt.noImpl();
throw new KotlinNothingValueException();
}
}
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0010)\n\u0000\b\u0082\u0004\u0018\u0000*\u0004\b\u0002\u0010\u00012\b\u0012\u0004\u0012\u0002H\u00010\u0002B\u001f\u0012\u0018\u0010\u0003\u001a\u0014\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u0001\u0012\u0004\u0012\u00028\u00020\u0004¢\u0006\u0002\u0010\u0005J\u0015\u0010\n\u001a\u00020\u000b2\u0006\u0010\f\u001a\u00028\u0002H\u0016¢\u0006\u0002\u0010\rJ\u000f\u0010\u000e\u001a\b\u0012\u0004\u0012\u00028\u00020\u000fH\u0096\u0002R \u0010\u0003\u001a\u0014\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u0001\u0012\u0004\u0012\u00028\u00020\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\u0006\u001a\u00020\u00078VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\b\u0010\t¨\u0006\u0010"}, d2 = {"Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap$KeyValueSet;", "E", "Lkotlin/collections/AbstractMutableSet;", "factory", "Lkotlin/Function2;", "(Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap;Lkotlin/jvm/functions/Function2;)V", "size", "", "getSize", "()I", "add", "", "element", "(Ljava/lang/Object;)Z", "iterator", "", "kotlinx-coroutines-core"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes3.dex */
public final class KeyValueSet<E> extends AbstractMutableSet<E> {
private final Function2<K, V, E> factory;
/* JADX WARN: Multi-variable type inference failed */
public KeyValueSet(Function2<? super K, ? super V, ? extends E> function2) {
this.factory = function2;
}
@Override // kotlin.collections.AbstractMutableSet, java.util.AbstractCollection, java.util.Collection, java.util.Set
public boolean add(E element) {
ConcurrentWeakMapKt.noImpl();
throw new KotlinNothingValueException();
}
@Override // kotlin.collections.AbstractMutableSet
public int getSize() {
return ConcurrentWeakMap.this.size();
}
@Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set
public Iterator<E> iterator() {
return ((Core) ConcurrentWeakMap.access$getCore$volatile$FU().get(ConcurrentWeakMap.this)).keyValueIterator(this.factory);
}
}
public ConcurrentWeakMap() {
this(false, 1, null);
}
public static final /* synthetic */ AtomicReferenceFieldUpdater access$getCore$volatile$FU() {
return core$volatile$FU;
}
private final void cleanWeakRef(HashedWeakRef<?> w3) {
((Core) core$volatile$FU.get(this)).cleanWeakRef(w3);
}
/* JADX INFO: Access modifiers changed from: private */
public final void decrementSize() {
_size$volatile$FU.decrementAndGet(this);
}
private final /* synthetic */ Object getCore$volatile() {
return this.core$volatile;
}
private final /* synthetic */ int get_size$volatile() {
return this._size$volatile;
}
private final synchronized V putSynchronized(K key, V value) {
V v3;
Symbol symbol;
Core core = (Core) core$volatile$FU.get(this);
while (true) {
K k4 = key;
V v4 = value;
v3 = (V) Core.putImpl$default(core, k4, v4, null, 4, null);
symbol = ConcurrentWeakMapKt.REHASH;
if (v3 == symbol) {
core = core.rehash();
core$volatile$FU.set(this, core);
key = k4;
value = v4;
}
}
return v3;
}
private final /* synthetic */ void setCore$volatile(Object obj) {
this.core$volatile = obj;
}
private final /* synthetic */ void set_size$volatile(int i) {
this._size$volatile = i;
}
@Override // java.util.AbstractMap, java.util.Map
public void clear() {
Iterator<K> it = keySet().iterator();
while (it.hasNext()) {
remove(it.next());
}
}
@Override // java.util.AbstractMap, java.util.Map
public V get(Object key) {
if (key == null) {
return null;
}
return (V) ((Core) core$volatile$FU.get(this)).getImpl(key);
}
@Override // kotlin.collections.AbstractMutableMap
public Set<Map.Entry<K, V>> getEntries() {
return new KeyValueSet(new Function2<K, V, Map.Entry<K, V>>() { // from class: kotlinx.coroutines.debug.internal.ConcurrentWeakMap$entries$1
/* JADX WARN: Multi-variable type inference failed */
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
return invoke((ConcurrentWeakMap$entries$1<K, V>) obj, obj2);
}
@Override // kotlin.jvm.functions.Function2
public final Map.Entry<K, V> invoke(K k4, V v3) {
return new ConcurrentWeakMap.Entry(k4, v3);
}
});
}
@Override // kotlin.collections.AbstractMutableMap
public Set<K> getKeys() {
return new KeyValueSet(new Function2<K, V, K>() { // from class: kotlinx.coroutines.debug.internal.ConcurrentWeakMap$keys$1
@Override // kotlin.jvm.functions.Function2
public final K invoke(K k4, V v3) {
return k4;
}
});
}
@Override // kotlin.collections.AbstractMutableMap
public int getSize() {
return _size$volatile$FU.get(this);
}
@Override // kotlin.collections.AbstractMutableMap, java.util.AbstractMap, java.util.Map
public V put(K key, V value) {
Symbol symbol;
V v3 = (V) Core.putImpl$default((Core) core$volatile$FU.get(this), key, value, null, 4, null);
symbol = ConcurrentWeakMapKt.REHASH;
if (v3 == symbol) {
v3 = putSynchronized(key, value);
}
if (v3 == null) {
_size$volatile$FU.incrementAndGet(this);
}
return v3;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // java.util.AbstractMap, java.util.Map
public V remove(Object key) {
Symbol symbol;
if (key == 0) {
return null;
}
V v3 = (V) Core.putImpl$default((Core) core$volatile$FU.get(this), key, null, null, 4, null);
symbol = ConcurrentWeakMapKt.REHASH;
if (v3 == symbol) {
v3 = putSynchronized(key, null);
}
if (v3 != null) {
_size$volatile$FU.decrementAndGet(this);
}
return v3;
}
public final void runWeakRefQueueCleaningLoopUntilInterrupted() {
if (this.weakRefQueue == null) {
throw new IllegalStateException("Must be created with weakRefQueue = true");
}
while (true) {
try {
Reference<? extends K> remove = this.weakRefQueue.remove();
Intrinsics.checkNotNull(remove, "null cannot be cast to non-null type kotlinx.coroutines.debug.internal.HashedWeakRef<*>");
cleanWeakRef((HashedWeakRef) remove);
} catch (InterruptedException unused) {
Thread.currentThread().interrupt();
return;
}
}
}
public /* synthetic */ ConcurrentWeakMap(boolean z3, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? false : z3);
}
public ConcurrentWeakMap(boolean z3) {
this.core$volatile = new Core(16);
this.weakRefQueue = z3 ? new ReferenceQueue<>() : null;
}
}

View File

@@ -0,0 +1,25 @@
package kotlinx.coroutines.debug.internal;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.internal.Symbol;
@Metadata(d1 = {"\u0000\"\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0001\n\u0000\n\u0002\u0010\u0000\n\u0000\u001a\b\u0010\b\u001a\u00020\tH\u0002\u001a\u000e\u0010\n\u001a\u00020\u0003*\u0004\u0018\u00010\u000bH\u0002\"\u000e\u0010\u0000\u001a\u00020\u0001X\u0082T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000\"\u000e\u0010\u0004\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000\"\u000e\u0010\u0005\u001a\u00020\u0001X\u0082T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\f"}, d2 = {"MAGIC", "", "MARKED_NULL", "Lkotlinx/coroutines/debug/internal/Marked;", "MARKED_TRUE", "MIN_CAPACITY", "REHASH", "Lkotlinx/coroutines/internal/Symbol;", "noImpl", "", "mark", "", "kotlinx-coroutines-core"}, k = 2, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes3.dex */
public final class ConcurrentWeakMapKt {
private static final int MAGIC = -1640531527;
private static final int MIN_CAPACITY = 16;
private static final Symbol REHASH = new Symbol("REHASH");
private static final Marked MARKED_NULL = new Marked(null);
private static final Marked MARKED_TRUE = new Marked(Boolean.TRUE);
/* JADX INFO: Access modifiers changed from: private */
public static final Marked mark(Object obj) {
return obj == null ? MARKED_NULL : Intrinsics.areEqual(obj, Boolean.TRUE) ? MARKED_TRUE : new Marked(obj);
}
/* JADX INFO: Access modifiers changed from: private */
public static final Void noImpl() {
throw new UnsupportedOperationException("not implemented");
}
}

View File

@@ -0,0 +1,68 @@
package kotlinx.coroutines.debug.internal;
import com.google.firebase.remoteconfig.RemoteConfigConstants;
import java.util.List;
import kotlin.Metadata;
import kotlin.PublishedApi;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.jvm.internal.CoroutineStackFrame;
import kotlin.jvm.JvmName;
@Metadata(d1 = {"\u0000D\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\t\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0003\b\u0001\u0018\u00002\u00020\u0001B\u0017\b\u0000\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006R\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\bR\u0016\u0010\t\u001a\u0004\u0018\u00010\nX\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\fR\u0017\u0010\r\u001a\b\u0012\u0004\u0012\u00020\u000f0\u000e¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\u0011R\u0013\u0010\u0012\u001a\u0004\u0018\u00010\n¢\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010\fR\u0019\u0010\u0014\u001a\b\u0012\u0004\u0012\u00020\u000f0\u000e8G¢\u0006\b\n\u0000\u001a\u0004\b\u0014\u0010\u0011R\u0013\u0010\u0015\u001a\u0004\u0018\u00010\u0016¢\u0006\b\n\u0000\u001a\u0004\b\u0017\u0010\u0018R\u0011\u0010\u0019\u001a\u00020\u001a¢\u0006\b\n\u0000\u001a\u0004\b\u001b\u0010\u001cR\u0011\u0010\u001d\u001a\u00020\u001e¢\u0006\b\n\u0000\u001a\u0004\b\u001f\u0010 ¨\u0006!"}, d2 = {"Lkotlinx/coroutines/debug/internal/DebugCoroutineInfo;", "", "source", "Lkotlinx/coroutines/debug/internal/DebugCoroutineInfoImpl;", "context", "Lkotlin/coroutines/CoroutineContext;", "(Lkotlinx/coroutines/debug/internal/DebugCoroutineInfoImpl;Lkotlin/coroutines/CoroutineContext;)V", "getContext", "()Lkotlin/coroutines/CoroutineContext;", "creationStackBottom", "Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;", "getCreationStackBottom$kotlinx_coroutines_core", "()Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;", "creationStackTrace", "", "Ljava/lang/StackTraceElement;", "getCreationStackTrace", "()Ljava/util/List;", "lastObservedFrame", "getLastObservedFrame", "lastObservedStackTrace", "lastObservedThread", "Ljava/lang/Thread;", "getLastObservedThread", "()Ljava/lang/Thread;", "sequenceNumber", "", "getSequenceNumber", "()J", RemoteConfigConstants.ResponseFieldKey.STATE, "", "getState", "()Ljava/lang/String;", "kotlinx-coroutines-core"}, k = 1, mv = {1, 9, 0}, xi = 48)
@PublishedApi
/* loaded from: classes3.dex */
public final class DebugCoroutineInfo {
private final CoroutineContext context;
private final CoroutineStackFrame creationStackBottom;
private final List<StackTraceElement> creationStackTrace;
private final CoroutineStackFrame lastObservedFrame;
private final List<StackTraceElement> lastObservedStackTrace;
private final Thread lastObservedThread;
private final long sequenceNumber;
private final String state;
public DebugCoroutineInfo(DebugCoroutineInfoImpl debugCoroutineInfoImpl, CoroutineContext coroutineContext) {
this.context = coroutineContext;
this.creationStackBottom = debugCoroutineInfoImpl.getCreationStackBottom();
this.sequenceNumber = debugCoroutineInfoImpl.sequenceNumber;
this.creationStackTrace = debugCoroutineInfoImpl.getCreationStackTrace();
this.state = debugCoroutineInfoImpl.get_state();
this.lastObservedThread = debugCoroutineInfoImpl.lastObservedThread;
this.lastObservedFrame = debugCoroutineInfoImpl.getLastObservedFrame$kotlinx_coroutines_core();
this.lastObservedStackTrace = debugCoroutineInfoImpl.lastObservedStackTrace$kotlinx_coroutines_core();
}
public final CoroutineContext getContext() {
return this.context;
}
/* renamed from: getCreationStackBottom$kotlinx_coroutines_core, reason: from getter */
public final CoroutineStackFrame getCreationStackBottom() {
return this.creationStackBottom;
}
public final List<StackTraceElement> getCreationStackTrace() {
return this.creationStackTrace;
}
public final CoroutineStackFrame getLastObservedFrame() {
return this.lastObservedFrame;
}
public final Thread getLastObservedThread() {
return this.lastObservedThread;
}
public final long getSequenceNumber() {
return this.sequenceNumber;
}
public final String getState() {
return this.state;
}
@JvmName(name = "lastObservedStackTrace")
public final List<StackTraceElement> lastObservedStackTrace() {
return this.lastObservedStackTrace;
}
}

View File

@@ -0,0 +1,65 @@
package kotlinx.coroutines.debug.internal;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.CoroutineStackFrame;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.RestrictedSuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.sequences.SequenceScope;
@Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\u0010\u0000\u001a\u00020\u0001*\b\u0012\u0004\u0012\u00020\u00030\u0002H\u008a@"}, d2 = {"<anonymous>", "", "Lkotlin/sequences/SequenceScope;", "Ljava/lang/StackTraceElement;"}, k = 3, mv = {1, 9, 0}, xi = 48)
@DebugMetadata(c = "kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl$creationStackTrace$1", f = "DebugCoroutineInfoImpl.kt", i = {}, l = {166}, m = "invokeSuspend", n = {}, s = {})
/* loaded from: classes3.dex */
public final class DebugCoroutineInfoImpl$creationStackTrace$1 extends RestrictedSuspendLambda implements Function2<SequenceScope<? super StackTraceElement>, Continuation<? super Unit>, Object> {
final /* synthetic */ StackTraceFrame $bottom;
private /* synthetic */ Object L$0;
int label;
final /* synthetic */ DebugCoroutineInfoImpl this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public DebugCoroutineInfoImpl$creationStackTrace$1(DebugCoroutineInfoImpl debugCoroutineInfoImpl, StackTraceFrame stackTraceFrame, Continuation<? super DebugCoroutineInfoImpl$creationStackTrace$1> continuation) {
super(2, continuation);
this.this$0 = debugCoroutineInfoImpl;
this.$bottom = stackTraceFrame;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
DebugCoroutineInfoImpl$creationStackTrace$1 debugCoroutineInfoImpl$creationStackTrace$1 = new DebugCoroutineInfoImpl$creationStackTrace$1(this.this$0, this.$bottom, continuation);
debugCoroutineInfoImpl$creationStackTrace$1.L$0 = obj;
return debugCoroutineInfoImpl$creationStackTrace$1;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object yieldFrames;
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
SequenceScope sequenceScope = (SequenceScope) this.L$0;
DebugCoroutineInfoImpl debugCoroutineInfoImpl = this.this$0;
CoroutineStackFrame callerFrame = this.$bottom.getCallerFrame();
this.label = 1;
yieldFrames = debugCoroutineInfoImpl.yieldFrames(sequenceScope, callerFrame, this);
if (yieldFrames == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(SequenceScope<? super StackTraceElement> sequenceScope, Continuation<? super Unit> continuation) {
return ((DebugCoroutineInfoImpl$creationStackTrace$1) create(sequenceScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
}

View File

@@ -0,0 +1,34 @@
package kotlinx.coroutines.debug.internal;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.jvm.internal.IntCompanionObject;
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
@DebugMetadata(c = "kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl", f = "DebugCoroutineInfoImpl.kt", i = {0, 0, 0}, l = {171}, m = "yieldFrames", n = {"this", "$this$yieldFrames", "frame"}, s = {"L$0", "L$1", "L$2"})
/* loaded from: classes3.dex */
public final class DebugCoroutineInfoImpl$yieldFrames$1 extends ContinuationImpl {
Object L$0;
Object L$1;
Object L$2;
int label;
/* synthetic */ Object result;
final /* synthetic */ DebugCoroutineInfoImpl this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
public DebugCoroutineInfoImpl$yieldFrames$1(DebugCoroutineInfoImpl debugCoroutineInfoImpl, Continuation<? super DebugCoroutineInfoImpl$yieldFrames$1> continuation) {
super(continuation);
this.this$0 = debugCoroutineInfoImpl;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object yieldFrames;
this.result = obj;
this.label |= IntCompanionObject.MIN_VALUE;
yieldFrames = this.this$0.yieldFrames(null, null, this);
return yieldFrames;
}
}

View File

@@ -0,0 +1,202 @@
package kotlinx.coroutines.debug.internal;
import com.google.firebase.remoteconfig.RemoteConfigConstants;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
import kotlin.Metadata;
import kotlin.PublishedApi;
import kotlin.collections.CollectionsKt;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.jvm.internal.CoroutineStackFrame;
import kotlin.jvm.JvmField;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.sequences.SequencesKt;
@Metadata(d1 = {"\u0000j\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\b\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0001\u0018\u00002\u00020\u0001B#\b\u0000\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003\u0012\b\u0010\u0004\u001a\u0004\u0018\u00010\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007¢\u0006\u0002\u0010\bJ\u000e\u0010\u0013\u001a\b\u0012\u0004\u0012\u00020\u00150\u0014H\u0002J\u0013\u0010%\u001a\b\u0012\u0004\u0012\u00020\u00150\u0014H\u0000¢\u0006\u0002\b&J\b\u0010'\u001a\u00020\u000eH\u0016J)\u0010(\u001a\u00020)2\u0006\u0010 \u001a\u00020\u000e2\n\u0010*\u001a\u0006\u0012\u0002\b\u00030+2\u0006\u0010,\u001a\u00020-H\u0000¢\u0006\u0002\b.J\"\u0010/\u001a\u00020)*\b\u0012\u0004\u0012\u00020\u0015002\b\u0010*\u001a\u0004\u0018\u00010\fH\u0082P¢\u0006\u0002\u00101R\u0016\u0010\t\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00030\nX\u0082\u0004¢\u0006\u0002\n\u0000R\u001a\u0010\u000b\u001a\n\u0012\u0004\u0012\u00020\f\u0018\u00010\n8\u0006@\u0006X\u0087\u000e¢\u0006\u0002\n\u0000R\u0012\u0010\r\u001a\u00020\u000e8\u0006@\u0006X\u0087\u000e¢\u0006\u0002\n\u0000R\u0013\u0010\u0002\u001a\u0004\u0018\u00010\u00038F¢\u0006\u0006\u001a\u0004\b\u000f\u0010\u0010R\u0016\u0010\u0004\u001a\u0004\u0018\u00010\u0005X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\u0012R\u0017\u0010\u0013\u001a\b\u0012\u0004\u0012\u00020\u00150\u00148F¢\u0006\u0006\u001a\u0004\b\u0016\u0010\u0017R(\u0010\u0019\u001a\u0004\u0018\u00010\f2\b\u0010\u0018\u001a\u0004\u0018\u00010\f8@@@X\u0080\u000e¢\u0006\f\u001a\u0004\b\u001a\u0010\u001b\"\u0004\b\u001c\u0010\u001dR\u0014\u0010\u001e\u001a\u0004\u0018\u00010\u001f8\u0006@\u0006X\u0087\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\u0006\u001a\u00020\u00078\u0006X\u0087\u0004¢\u0006\u0002\n\u0000R\u0014\u0010 \u001a\u00020\u000e8@X\u0080\u0004¢\u0006\u0006\u001a\u0004\b!\u0010\"R\u000e\u0010#\u001a\u00020$X\u0082\u000e¢\u0006\u0002\n\u0000¨\u00062"}, d2 = {"Lkotlinx/coroutines/debug/internal/DebugCoroutineInfoImpl;", "", "context", "Lkotlin/coroutines/CoroutineContext;", "creationStackBottom", "Lkotlinx/coroutines/debug/internal/StackTraceFrame;", "sequenceNumber", "", "(Lkotlin/coroutines/CoroutineContext;Lkotlinx/coroutines/debug/internal/StackTraceFrame;J)V", "_context", "Ljava/lang/ref/WeakReference;", "_lastObservedFrame", "Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;", "_state", "", "getContext", "()Lkotlin/coroutines/CoroutineContext;", "getCreationStackBottom$kotlinx_coroutines_core", "()Lkotlinx/coroutines/debug/internal/StackTraceFrame;", "creationStackTrace", "", "Ljava/lang/StackTraceElement;", "getCreationStackTrace", "()Ljava/util/List;", "value", "lastObservedFrame", "getLastObservedFrame$kotlinx_coroutines_core", "()Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;", "setLastObservedFrame$kotlinx_coroutines_core", "(Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;)V", "lastObservedThread", "Ljava/lang/Thread;", RemoteConfigConstants.ResponseFieldKey.STATE, "getState$kotlinx_coroutines_core", "()Ljava/lang/String;", "unmatchedResume", "", "lastObservedStackTrace", "lastObservedStackTrace$kotlinx_coroutines_core", "toString", "updateState", "", "frame", "Lkotlin/coroutines/Continuation;", "shouldBeMatched", "", "updateState$kotlinx_coroutines_core", "yieldFrames", "Lkotlin/sequences/SequenceScope;", "(Lkotlin/sequences/SequenceScope;Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "kotlinx-coroutines-core"}, k = 1, mv = {1, 9, 0}, xi = 48)
@PublishedApi
@SourceDebugExtension({"SMAP\nDebugCoroutineInfoImpl.kt\nKotlin\n*S Kotlin\n*F\n+ 1 DebugCoroutineInfoImpl.kt\nkotlinx/coroutines/debug/internal/DebugCoroutineInfoImpl\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,180:1\n1#2:181\n*E\n"})
/* loaded from: classes3.dex */
public final class DebugCoroutineInfoImpl {
private final WeakReference<CoroutineContext> _context;
@JvmField
public volatile WeakReference<CoroutineStackFrame> _lastObservedFrame;
@JvmField
public volatile String _state = DebugCoroutineInfoImplKt.CREATED;
private final StackTraceFrame creationStackBottom;
@JvmField
public volatile Thread lastObservedThread;
@JvmField
public final long sequenceNumber;
private int unmatchedResume;
public DebugCoroutineInfoImpl(CoroutineContext coroutineContext, StackTraceFrame stackTraceFrame, long j4) {
this.creationStackBottom = stackTraceFrame;
this.sequenceNumber = j4;
this._context = new WeakReference<>(coroutineContext);
}
private final List<StackTraceElement> creationStackTrace() {
StackTraceFrame stackTraceFrame = this.creationStackBottom;
return stackTraceFrame == null ? CollectionsKt.emptyList() : SequencesKt.toList(SequencesKt.sequence(new DebugCoroutineInfoImpl$creationStackTrace$1(this, stackTraceFrame, null)));
}
/* JADX INFO: Access modifiers changed from: private */
/* JADX WARN: Removed duplicated region for block: B:13:0x0067 */
/* JADX WARN: Removed duplicated region for block: B:17:0x0042 */
/* JADX WARN: Removed duplicated region for block: B:19:0x0045 */
/* JADX WARN: Removed duplicated region for block: B:27:0x003d */
/* JADX WARN: Removed duplicated region for block: B:8:0x0023 */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:20:0x0049 -> B:11:0x0060). Please report as a decompilation issue!!! */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:24:0x005a -> B:10:0x005d). Please report as a decompilation issue!!! */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object yieldFrames(kotlin.sequences.SequenceScope<? super java.lang.StackTraceElement> r6, kotlin.coroutines.jvm.internal.CoroutineStackFrame r7, kotlin.coroutines.Continuation<? super kotlin.Unit> r8) {
/*
r5 = this;
boolean r0 = r8 instanceof kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl$yieldFrames$1
if (r0 == 0) goto L13
r0 = r8
kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl$yieldFrames$1 r0 = (kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl$yieldFrames$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r3 = r1 & r2
if (r3 == 0) goto L13
int r1 = r1 - r2
r0.label = r1
goto L18
L13:
kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl$yieldFrames$1 r0 = new kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl$yieldFrames$1
r0.<init>(r5, r8)
L18:
java.lang.Object r8 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L3d
if (r2 != r3) goto L35
java.lang.Object r5 = r0.L$2
kotlin.coroutines.jvm.internal.CoroutineStackFrame r5 = (kotlin.coroutines.jvm.internal.CoroutineStackFrame) r5
java.lang.Object r6 = r0.L$1
kotlin.sequences.SequenceScope r6 = (kotlin.sequences.SequenceScope) r6
java.lang.Object r7 = r0.L$0
kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl r7 = (kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl) r7
kotlin.ResultKt.throwOnFailure(r8)
goto L5d
L35:
java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
java.lang.String r6 = "call to 'resume' before 'invoke' with coroutine"
r5.<init>(r6)
throw r5
L3d:
kotlin.ResultKt.throwOnFailure(r8)
L40:
if (r7 != 0) goto L45
kotlin.Unit r5 = kotlin.Unit.INSTANCE
return r5
L45:
java.lang.StackTraceElement r8 = r7.getStackTraceElement()
if (r8 == 0) goto L60
r0.L$0 = r5
r0.L$1 = r6
r0.L$2 = r7
r0.label = r3
java.lang.Object r8 = r6.yield(r8, r0)
if (r8 != r1) goto L5a
return r1
L5a:
r4 = r7
r7 = r5
r5 = r4
L5d:
r4 = r7
r7 = r5
r5 = r4
L60:
kotlin.coroutines.jvm.internal.CoroutineStackFrame r7 = r7.getCallerFrame()
if (r7 == 0) goto L67
goto L40
L67:
kotlin.Unit r5 = kotlin.Unit.INSTANCE
return r5
*/
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl.yieldFrames(kotlin.sequences.SequenceScope, kotlin.coroutines.jvm.internal.CoroutineStackFrame, kotlin.coroutines.Continuation):java.lang.Object");
}
public final CoroutineContext getContext() {
return this._context.get();
}
/* renamed from: getCreationStackBottom$kotlinx_coroutines_core, reason: from getter */
public final StackTraceFrame getCreationStackBottom() {
return this.creationStackBottom;
}
public final List<StackTraceElement> getCreationStackTrace() {
return creationStackTrace();
}
public final CoroutineStackFrame getLastObservedFrame$kotlinx_coroutines_core() {
WeakReference<CoroutineStackFrame> weakReference = this._lastObservedFrame;
if (weakReference != null) {
return weakReference.get();
}
return null;
}
/* renamed from: getState$kotlinx_coroutines_core, reason: from getter */
public final String get_state() {
return this._state;
}
public final List<StackTraceElement> lastObservedStackTrace$kotlinx_coroutines_core() {
CoroutineStackFrame lastObservedFrame$kotlinx_coroutines_core = getLastObservedFrame$kotlinx_coroutines_core();
if (lastObservedFrame$kotlinx_coroutines_core == null) {
return CollectionsKt.emptyList();
}
ArrayList arrayList = new ArrayList();
while (lastObservedFrame$kotlinx_coroutines_core != null) {
StackTraceElement stackTraceElement = lastObservedFrame$kotlinx_coroutines_core.getStackTraceElement();
if (stackTraceElement != null) {
arrayList.add(stackTraceElement);
}
lastObservedFrame$kotlinx_coroutines_core = lastObservedFrame$kotlinx_coroutines_core.getCallerFrame();
}
return arrayList;
}
public final void setLastObservedFrame$kotlinx_coroutines_core(CoroutineStackFrame coroutineStackFrame) {
this._lastObservedFrame = coroutineStackFrame != null ? new WeakReference<>(coroutineStackFrame) : null;
}
public String toString() {
return "DebugCoroutineInfo(state=" + get_state() + ",context=" + getContext() + ')';
}
public final synchronized void updateState$kotlinx_coroutines_core(String state, Continuation<?> frame, boolean shouldBeMatched) {
try {
if (Intrinsics.areEqual(this._state, DebugCoroutineInfoImplKt.RUNNING) && Intrinsics.areEqual(state, DebugCoroutineInfoImplKt.RUNNING) && shouldBeMatched) {
this.unmatchedResume++;
} else if (this.unmatchedResume > 0 && Intrinsics.areEqual(state, DebugCoroutineInfoImplKt.SUSPENDED)) {
this.unmatchedResume--;
return;
}
if (Intrinsics.areEqual(this._state, state) && Intrinsics.areEqual(state, DebugCoroutineInfoImplKt.SUSPENDED) && getLastObservedFrame$kotlinx_coroutines_core() != null) {
return;
}
this._state = state;
setLastObservedFrame$kotlinx_coroutines_core(frame instanceof CoroutineStackFrame ? (CoroutineStackFrame) frame : null);
this.lastObservedThread = Intrinsics.areEqual(state, DebugCoroutineInfoImplKt.RUNNING) ? Thread.currentThread() : null;
} catch (Throwable th) {
throw th;
}
}
}

View File

@@ -0,0 +1,11 @@
package kotlinx.coroutines.debug.internal;
import kotlin.Metadata;
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\"\u000e\u0010\u0000\u001a\u00020\u0001X\u0080T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0002\u001a\u00020\u0001X\u0080T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0003\u001a\u00020\u0001X\u0080T¢\u0006\u0002\n\u0000¨\u0006\u0004"}, d2 = {DebugCoroutineInfoImplKt.CREATED, "", DebugCoroutineInfoImplKt.RUNNING, DebugCoroutineInfoImplKt.SUSPENDED, "kotlinx-coroutines-core"}, k = 2, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes3.dex */
public final class DebugCoroutineInfoImplKt {
public static final String CREATED = "CREATED";
public static final String RUNNING = "RUNNING";
public static final String SUSPENDED = "SUSPENDED";
}

View File

@@ -0,0 +1,38 @@
package kotlinx.coroutines.debug.internal;
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes3.dex */
public /* synthetic */ class DebugProbesImpl$DebugProbesImpl$VolatileWrapper$atomicfu$private {
private static final /* synthetic */ AtomicIntegerFieldUpdater installations$volatile$FU = AtomicIntegerFieldUpdater.newUpdater(DebugProbesImpl$DebugProbesImpl$VolatileWrapper$atomicfu$private.class, "installations$volatile");
private static final /* synthetic */ AtomicLongFieldUpdater sequenceNumber$volatile$FU = AtomicLongFieldUpdater.newUpdater(DebugProbesImpl$DebugProbesImpl$VolatileWrapper$atomicfu$private.class, "sequenceNumber$volatile");
private volatile /* synthetic */ int installations$volatile;
private volatile /* synthetic */ long sequenceNumber$volatile;
private DebugProbesImpl$DebugProbesImpl$VolatileWrapper$atomicfu$private() {
}
private final /* synthetic */ int getInstallations$volatile() {
return this.installations$volatile;
}
private final /* synthetic */ long getSequenceNumber$volatile() {
return this.sequenceNumber$volatile;
}
private final /* synthetic */ void setInstallations$volatile(int i) {
this.installations$volatile = i;
}
private final /* synthetic */ void setSequenceNumber$volatile(long j4) {
this.sequenceNumber$volatile = j4;
}
public /* synthetic */ DebugProbesImpl$DebugProbesImpl$VolatileWrapper$atomicfu$private(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}

View File

@@ -0,0 +1,18 @@
package kotlinx.coroutines.debug.internal;
import java.util.Comparator;
import kotlin.Metadata;
import kotlin.comparisons.ComparisonsKt;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlinx.coroutines.debug.internal.DebugProbesImpl;
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\b\n\u0002\b\u0007\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u00022\u000e\u0010\u0003\u001a\n \u0004*\u0004\u0018\u0001H\u0002H\u00022\u000e\u0010\u0005\u001a\n \u0004*\u0004\u0018\u0001H\u0002H\u0002H\n¢\u0006\u0004\b\u0006\u0010\u0007¨\u0006\b"}, d2 = {"<anonymous>", "", "T", "a", "kotlin.jvm.PlatformType", "b", "compare", "(Ljava/lang/Object;Ljava/lang/Object;)I", "kotlin/comparisons/ComparisonsKt__ComparisonsKt$compareBy$2"}, k = 3, mv = {1, 9, 0}, xi = 48)
@SourceDebugExtension({"SMAP\nComparisons.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Comparisons.kt\nkotlin/comparisons/ComparisonsKt__ComparisonsKt$compareBy$2\n+ 2 DebugProbesImpl.kt\nkotlinx/coroutines/debug/internal/DebugProbesImpl\n*L\n1#1,328:1\n154#2:329\n*E\n"})
/* loaded from: classes3.dex */
public final class DebugProbesImpl$dumpCoroutinesInfoImpl$$inlined$sortedBy$1<T> implements Comparator {
/* JADX WARN: Multi-variable type inference failed */
@Override // java.util.Comparator
public final int compare(T t2, T t4) {
return ComparisonsKt.compareValues(Long.valueOf(((DebugProbesImpl.CoroutineOwner) t2).info.sequenceNumber), Long.valueOf(((DebugProbesImpl.CoroutineOwner) t4).info.sequenceNumber));
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,37 @@
package kotlinx.coroutines.debug.internal;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.Typography;
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u000e\n\u0000\u001a\f\u0010\u0000\u001a\u00020\u0001*\u00020\u0001H\u0002¨\u0006\u0002"}, d2 = {"repr", "", "kotlinx-coroutines-core"}, k = 2, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes3.dex */
public final class DebugProbesImplKt {
/* JADX INFO: Access modifiers changed from: private */
public static final String repr(String str) {
StringBuilder sb = new StringBuilder("\"");
int length = str.length();
for (int i = 0; i < length; i++) {
char charAt = str.charAt(i);
if (charAt == '\"') {
sb.append("\\\"");
} else if (charAt == '\\') {
sb.append("\\\\");
} else if (charAt == '\b') {
sb.append("\\b");
} else if (charAt == '\n') {
sb.append("\\n");
} else if (charAt == '\r') {
sb.append("\\r");
} else if (charAt == '\t') {
sb.append("\\t");
} else {
sb.append(charAt);
}
}
sb.append(Typography.quote);
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "toString(...)");
return sb2;
}
}

View File

@@ -0,0 +1,20 @@
package kotlinx.coroutines.debug.internal;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
@Metadata(d1 = {"\u0000\u0012\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\b\u0003\u001a\"\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u00022\f\u0010\u0003\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001H\u0000\u001a\u0014\u0010\u0004\u001a\u00020\u00052\n\u0010\u0006\u001a\u0006\u0012\u0002\b\u00030\u0001H\u0000\u001a\u0014\u0010\u0007\u001a\u00020\u00052\n\u0010\u0006\u001a\u0006\u0012\u0002\b\u00030\u0001H\u0000¨\u0006\b"}, d2 = {"probeCoroutineCreated", "Lkotlin/coroutines/Continuation;", "T", "completion", "probeCoroutineResumed", "", "frame", "probeCoroutineSuspended", "kotlinx-coroutines-core"}, k = 2, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes3.dex */
public final class DebugProbesKt {
public static final <T> Continuation<T> probeCoroutineCreated(Continuation<? super T> continuation) {
return DebugProbesImpl.INSTANCE.probeCoroutineCreated$kotlinx_coroutines_core(continuation);
}
public static final void probeCoroutineResumed(Continuation<?> continuation) {
DebugProbesImpl.INSTANCE.probeCoroutineResumed$kotlinx_coroutines_core(continuation);
}
public static final void probeCoroutineSuspended(Continuation<?> continuation) {
DebugProbesImpl.INSTANCE.probeCoroutineSuspended$kotlinx_coroutines_core(continuation);
}
}

View File

@@ -0,0 +1,76 @@
package kotlinx.coroutines.debug.internal;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import com.google.firebase.remoteconfig.RemoteConfigConstants;
import java.io.Serializable;
import java.lang.Thread;
import java.util.List;
import kotlin.Metadata;
import kotlin.PublishedApi;
import kotlin.coroutines.ContinuationInterceptor;
import kotlin.coroutines.CoroutineContext;
import kotlinx.coroutines.CoroutineId;
import kotlinx.coroutines.CoroutineName;
@Metadata(d1 = {"\u00004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\t\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u000e\b\u0001\u0018\u00002\u00020\u0001B\u0015\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006R\u0015\u0010\u0007\u001a\u0004\u0018\u00010\b¢\u0006\n\n\u0002\u0010\u000b\u001a\u0004\b\t\u0010\nR\u0013\u0010\f\u001a\u0004\u0018\u00010\r¢\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u000fR\u0017\u0010\u0010\u001a\b\u0012\u0004\u0012\u00020\u00120\u0011¢\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010\u0014R\u0013\u0010\u0015\u001a\u0004\u0018\u00010\r¢\u0006\b\n\u0000\u001a\u0004\b\u0016\u0010\u000fR\u0013\u0010\u0017\u001a\u0004\u0018\u00010\r¢\u0006\b\n\u0000\u001a\u0004\b\u0018\u0010\u000fR\u0013\u0010\u0019\u001a\u0004\u0018\u00010\r¢\u0006\b\n\u0000\u001a\u0004\b\u001a\u0010\u000fR\u0011\u0010\u001b\u001a\u00020\b¢\u0006\b\n\u0000\u001a\u0004\b\u001c\u0010\u001dR\u0011\u0010\u001e\u001a\u00020\r¢\u0006\b\n\u0000\u001a\u0004\b\u001f\u0010\u000f¨\u0006 "}, d2 = {"Lkotlinx/coroutines/debug/internal/DebuggerInfo;", "Ljava/io/Serializable;", "source", "Lkotlinx/coroutines/debug/internal/DebugCoroutineInfoImpl;", "context", "Lkotlin/coroutines/CoroutineContext;", "(Lkotlinx/coroutines/debug/internal/DebugCoroutineInfoImpl;Lkotlin/coroutines/CoroutineContext;)V", "coroutineId", "", "getCoroutineId", "()Ljava/lang/Long;", "Ljava/lang/Long;", "dispatcher", "", "getDispatcher", "()Ljava/lang/String;", "lastObservedStackTrace", "", "Ljava/lang/StackTraceElement;", "getLastObservedStackTrace", "()Ljava/util/List;", "lastObservedThreadName", "getLastObservedThreadName", "lastObservedThreadState", "getLastObservedThreadState", AppMeasurementSdk.ConditionalUserProperty.NAME, "getName", "sequenceNumber", "getSequenceNumber", "()J", RemoteConfigConstants.ResponseFieldKey.STATE, "getState", "kotlinx-coroutines-core"}, k = 1, mv = {1, 9, 0}, xi = 48)
@PublishedApi
/* loaded from: classes3.dex */
public final class DebuggerInfo implements Serializable {
private final Long coroutineId;
private final String dispatcher;
private final List<StackTraceElement> lastObservedStackTrace;
private final String lastObservedThreadName;
private final String lastObservedThreadState;
private final String name;
private final long sequenceNumber;
private final String state;
public DebuggerInfo(DebugCoroutineInfoImpl debugCoroutineInfoImpl, CoroutineContext coroutineContext) {
Thread.State state;
CoroutineId coroutineId = (CoroutineId) coroutineContext.get(CoroutineId.INSTANCE);
this.coroutineId = coroutineId != null ? Long.valueOf(coroutineId.getId()) : null;
ContinuationInterceptor continuationInterceptor = (ContinuationInterceptor) coroutineContext.get(ContinuationInterceptor.INSTANCE);
this.dispatcher = continuationInterceptor != null ? continuationInterceptor.toString() : null;
CoroutineName coroutineName = (CoroutineName) coroutineContext.get(CoroutineName.INSTANCE);
this.name = coroutineName != null ? coroutineName.getName() : null;
this.state = debugCoroutineInfoImpl.get_state();
Thread thread = debugCoroutineInfoImpl.lastObservedThread;
this.lastObservedThreadState = (thread == null || (state = thread.getState()) == null) ? null : state.toString();
Thread thread2 = debugCoroutineInfoImpl.lastObservedThread;
this.lastObservedThreadName = thread2 != null ? thread2.getName() : null;
this.lastObservedStackTrace = debugCoroutineInfoImpl.lastObservedStackTrace$kotlinx_coroutines_core();
this.sequenceNumber = debugCoroutineInfoImpl.sequenceNumber;
}
public final Long getCoroutineId() {
return this.coroutineId;
}
public final String getDispatcher() {
return this.dispatcher;
}
public final List<StackTraceElement> getLastObservedStackTrace() {
return this.lastObservedStackTrace;
}
public final String getLastObservedThreadName() {
return this.lastObservedThreadName;
}
public final String getLastObservedThreadState() {
return this.lastObservedThreadState;
}
public final String getName() {
return this.name;
}
public final long getSequenceNumber() {
return this.sequenceNumber;
}
public final String getState() {
return this.state;
}
}

View File

@@ -0,0 +1,19 @@
package kotlinx.coroutines.debug.internal;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import kotlin.Metadata;
import kotlin.jvm.JvmField;
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\b\u0000\u0018\u0000*\u0004\b\u0000\u0010\u00012\b\u0012\u0004\u0012\u0002H\u00010\u0002B\u001d\u0012\u0006\u0010\u0003\u001a\u00028\u0000\u0012\u000e\u0010\u0004\u001a\n\u0012\u0004\u0012\u00028\u0000\u0018\u00010\u0005¢\u0006\u0002\u0010\u0006R\u0010\u0010\u0007\u001a\u00020\b8\u0006X\u0087\u0004¢\u0006\u0002\n\u0000¨\u0006\t"}, d2 = {"Lkotlinx/coroutines/debug/internal/HashedWeakRef;", "T", "Ljava/lang/ref/WeakReference;", "ref", "queue", "Ljava/lang/ref/ReferenceQueue;", "(Ljava/lang/Object;Ljava/lang/ref/ReferenceQueue;)V", "hash", "", "kotlinx-coroutines-core"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes3.dex */
public final class HashedWeakRef<T> extends WeakReference<T> {
@JvmField
public final int hash;
public HashedWeakRef(T t2, ReferenceQueue<T> referenceQueue) {
super(t2, referenceQueue);
this.hash = t2 != null ? t2.hashCode() : 0;
}
}

View File

@@ -0,0 +1,17 @@
package kotlinx.coroutines.debug.internal;
import kotlin.Metadata;
import kotlin.jvm.JvmField;
/* JADX INFO: Access modifiers changed from: package-private */
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\b\u0002\u0018\u00002\u00020\u0001B\u000f\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0001¢\u0006\u0002\u0010\u0003R\u0012\u0010\u0002\u001a\u0004\u0018\u00010\u00018\u0006X\u0087\u0004¢\u0006\u0002\n\u0000¨\u0006\u0004"}, d2 = {"Lkotlinx/coroutines/debug/internal/Marked;", "", "ref", "(Ljava/lang/Object;)V", "kotlinx-coroutines-core"}, k = 1, mv = {1, 9, 0}, xi = 48)
/* loaded from: classes3.dex */
public final class Marked {
@JvmField
public final Object ref;
public Marked(Object obj) {
this.ref = obj;
}
}

View File

@@ -0,0 +1,31 @@
package kotlinx.coroutines.debug.internal;
import kotlin.Metadata;
import kotlin.PublishedApi;
import kotlin.coroutines.jvm.internal.CoroutineStackFrame;
import kotlin.jvm.JvmField;
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0001\u0018\u00002\u00020\u0001B\u0019\b\u0000\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0001\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005J\b\u0010\b\u001a\u00020\u0004H\u0016R\u0016\u0010\u0002\u001a\u0004\u0018\u00010\u0001X\u0096\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007R\u0010\u0010\u0003\u001a\u00020\u00048\u0006X\u0087\u0004¢\u0006\u0002\n\u0000¨\u0006\t"}, d2 = {"Lkotlinx/coroutines/debug/internal/StackTraceFrame;", "Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;", "callerFrame", "stackTraceElement", "Ljava/lang/StackTraceElement;", "(Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;Ljava/lang/StackTraceElement;)V", "getCallerFrame", "()Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;", "getStackTraceElement", "kotlinx-coroutines-core"}, k = 1, mv = {1, 9, 0}, xi = 48)
@PublishedApi
/* loaded from: classes3.dex */
public final class StackTraceFrame implements CoroutineStackFrame {
private final CoroutineStackFrame callerFrame;
@JvmField
public final StackTraceElement stackTraceElement;
public StackTraceFrame(CoroutineStackFrame coroutineStackFrame, StackTraceElement stackTraceElement) {
this.callerFrame = coroutineStackFrame;
this.stackTraceElement = stackTraceElement;
}
@Override // kotlin.coroutines.jvm.internal.CoroutineStackFrame
public CoroutineStackFrame getCallerFrame() {
return this.callerFrame;
}
@Override // kotlin.coroutines.jvm.internal.CoroutineStackFrame
public StackTraceElement getStackTraceElement() {
return this.stackTraceElement;
}
}