apkfuckery/com.discord/smali_classes2/kotlinx/coroutines/aq.smali

3404 lines
72 KiB
Smali
Raw Normal View History

2019-02-04 20:29:01 +00:00
.class public Lkotlinx/coroutines/aq;
.super Ljava/lang/Object;
.source "JobSupport.kt"
2019-02-04 20:08:30 +00:00
# interfaces
2019-02-04 20:29:01 +00:00
.implements Lkotlinx/coroutines/ak;
.implements Lkotlinx/coroutines/aw;
.implements Lkotlinx/coroutines/d;
2019-02-04 20:08:30 +00:00
# annotations
2019-02-04 20:29:01 +00:00
.annotation system Ldalvik/annotation/MemberClasses;
2019-02-04 20:08:30 +00:00
value = {
2019-02-04 20:29:01 +00:00
Lkotlinx/coroutines/aq$b;,
Lkotlinx/coroutines/aq$a;
2019-02-04 20:08:30 +00:00
}
.end annotation
2019-02-04 20:29:01 +00:00
# static fields
.field static final bSn:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
2019-02-04 20:08:30 +00:00
# instance fields
2019-02-04 20:29:01 +00:00
.field private volatile _state:Ljava/lang/Object;
.field private volatile parentHandle:Lkotlinx/coroutines/b;
# direct methods
.method static constructor <clinit>()V
.locals 3
const-class v0, Lkotlinx/coroutines/aq;
const-class v1, Ljava/lang/Object;
const-string v2, "_state"
invoke-static {v0, v1, v2}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->newUpdater(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/String;)Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
move-result-object v0
sput-object v0, Lkotlinx/coroutines/aq;->bSn:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
return-void
.end method
.method public constructor <init>(Z)V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
if-eqz p1, :cond_0
invoke-static {}, Lkotlinx/coroutines/ar;->Ge()Lkotlinx/coroutines/ab;
move-result-object p1
goto :goto_0
:cond_0
invoke-static {}, Lkotlinx/coroutines/ar;->Gf()Lkotlinx/coroutines/ab;
move-result-object p1
:goto_0
iput-object p1, p0, Lkotlinx/coroutines/aq;->_state:Ljava/lang/Object;
return-void
.end method
.method private final FZ()Lkotlinx/coroutines/al;
.locals 4
new-instance v0, Lkotlinx/coroutines/al;
const-string v1, "Job was cancelled"
move-object v2, p0
check-cast v2, Lkotlinx/coroutines/ak;
const/4 v3, 0x0
invoke-direct {v0, v1, v3, v2}, Lkotlinx/coroutines/al;-><init>(Ljava/lang/String;Ljava/lang/Throwable;Lkotlinx/coroutines/ak;)V
return-object v0
.end method
.method private final a(Lkotlinx/coroutines/aq$b;Ljava/util/List;)Ljava/lang/Throwable;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkotlinx/coroutines/aq$b;",
"Ljava/util/List<",
"+",
"Ljava/lang/Throwable;",
">;)",
"Ljava/lang/Throwable;"
}
.end annotation
invoke-interface {p2}, Ljava/util/List;->isEmpty()Z
move-result v0
const/4 v1, 0x0
if-eqz v0, :cond_1
invoke-virtual {p1}, Lkotlinx/coroutines/aq$b;->Gb()Z
move-result p1
if-eqz p1, :cond_0
invoke-direct {p0}, Lkotlinx/coroutines/aq;->FZ()Lkotlinx/coroutines/al;
move-result-object p1
check-cast p1, Ljava/lang/Throwable;
return-object p1
:cond_0
return-object v1
:cond_1
move-object p1, p2
check-cast p1, Ljava/lang/Iterable;
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object p1
:cond_2
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
const/4 v2, 0x0
if-eqz v0, :cond_4
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
move-object v3, v0
check-cast v3, Ljava/lang/Throwable;
instance-of v3, v3, Ljava/util/concurrent/CancellationException;
if-nez v3, :cond_3
const/4 v3, 0x1
goto :goto_0
:cond_3
const/4 v3, 0x0
:goto_0
if-eqz v3, :cond_2
goto :goto_1
:cond_4
move-object v0, v1
:goto_1
check-cast v0, Ljava/lang/Throwable;
if-nez v0, :cond_5
invoke-interface {p2, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object p1
move-object v0, p1
check-cast v0, Ljava/lang/Throwable;
:cond_5
return-object v0
.end method
.method private final a(Lkotlin/jvm/functions/Function1;Z)Lkotlinx/coroutines/ap;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkotlin/jvm/functions/Function1<",
"-",
"Ljava/lang/Throwable;",
"Lkotlin/Unit;",
">;Z)",
"Lkotlinx/coroutines/ap<",
"*>;"
}
.end annotation
const/4 v0, 0x1
const/4 v1, 0x0
const/4 v2, 0x0
if-eqz p2, :cond_4
instance-of p2, p1, Lkotlinx/coroutines/am;
if-nez p2, :cond_0
goto :goto_0
:cond_0
move-object v2, p1
:goto_0
check-cast v2, Lkotlinx/coroutines/am;
if-eqz v2, :cond_3
iget-object p2, v2, Lkotlinx/coroutines/am;->job:Lkotlinx/coroutines/ak;
move-object v3, p0
check-cast v3, Lkotlinx/coroutines/aq;
if-ne p2, v3, :cond_1
goto :goto_1
:cond_1
const/4 v0, 0x0
:goto_1
if-eqz v0, :cond_2
if-eqz v2, :cond_3
check-cast v2, Lkotlinx/coroutines/ap;
return-object v2
:cond_2
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "Failed requirement."
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
:cond_3
new-instance p2, Lkotlinx/coroutines/ai;
move-object v0, p0
check-cast v0, Lkotlinx/coroutines/ak;
invoke-direct {p2, v0, p1}, Lkotlinx/coroutines/ai;-><init>(Lkotlinx/coroutines/ak;Lkotlin/jvm/functions/Function1;)V
check-cast p2, Lkotlinx/coroutines/ap;
return-object p2
:cond_4
instance-of p2, p1, Lkotlinx/coroutines/ap;
if-nez p2, :cond_5
goto :goto_2
:cond_5
move-object v2, p1
:goto_2
check-cast v2, Lkotlinx/coroutines/ap;
if-eqz v2, :cond_8
iget-object p2, v2, Lkotlinx/coroutines/ap;->job:Lkotlinx/coroutines/ak;
move-object v3, p0
check-cast v3, Lkotlinx/coroutines/aq;
if-ne p2, v3, :cond_6
instance-of p2, v2, Lkotlinx/coroutines/am;
if-nez p2, :cond_6
goto :goto_3
:cond_6
const/4 v0, 0x0
:goto_3
if-eqz v0, :cond_7
if-nez v2, :cond_9
goto :goto_4
:cond_7
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "Failed requirement."
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
:cond_8
:goto_4
new-instance p2, Lkotlinx/coroutines/aj;
move-object v0, p0
check-cast v0, Lkotlinx/coroutines/ak;
invoke-direct {p2, v0, p1}, Lkotlinx/coroutines/aj;-><init>(Lkotlinx/coroutines/ak;Lkotlin/jvm/functions/Function1;)V
move-object v2, p2
check-cast v2, Lkotlinx/coroutines/ap;
:cond_9
return-object v2
.end method
.method private final a(Lkotlinx/coroutines/ah;)Lkotlinx/coroutines/au;
.locals 1
invoke-interface {p1}, Lkotlinx/coroutines/ah;->FP()Lkotlinx/coroutines/au;
move-result-object v0
if-nez v0, :cond_2
instance-of v0, p1, Lkotlinx/coroutines/ab;
if-eqz v0, :cond_0
new-instance p1, Lkotlinx/coroutines/au;
invoke-direct {p1}, Lkotlinx/coroutines/au;-><init>()V
return-object p1
:cond_0
instance-of v0, p1, Lkotlinx/coroutines/ap;
if-eqz v0, :cond_1
check-cast p1, Lkotlinx/coroutines/ap;
invoke-direct {p0, p1}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/ap;)V
const/4 p1, 0x0
return-object p1
:cond_1
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
const-string v0, "State should have list: "
invoke-virtual {v0, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
new-instance v0, Ljava/lang/IllegalStateException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast v0, Ljava/lang/Throwable;
throw v0
:cond_2
return-object v0
.end method
.method private static a(Lkotlinx/coroutines/a/i;)Lkotlinx/coroutines/c;
.locals 1
:goto_0
invoke-virtual {p0}, Lkotlinx/coroutines/a/i;->Go()Ljava/lang/Object;
move-result-object v0
instance-of v0, v0, Lkotlinx/coroutines/a/n;
if-eqz v0, :cond_0
invoke-virtual {p0}, Lkotlinx/coroutines/a/i;->Gq()Ljava/lang/Object;
move-result-object p0
invoke-static {p0}, Lkotlinx/coroutines/a/h;->bT(Ljava/lang/Object;)Lkotlinx/coroutines/a/i;
move-result-object p0
goto :goto_0
:cond_0
invoke-virtual {p0}, Lkotlinx/coroutines/a/i;->Go()Ljava/lang/Object;
move-result-object p0
invoke-static {p0}, Lkotlinx/coroutines/a/h;->bT(Ljava/lang/Object;)Lkotlinx/coroutines/a/i;
move-result-object p0
invoke-virtual {p0}, Lkotlinx/coroutines/a/i;->Go()Ljava/lang/Object;
move-result-object v0
instance-of v0, v0, Lkotlinx/coroutines/a/n;
if-nez v0, :cond_0
instance-of v0, p0, Lkotlinx/coroutines/c;
if-eqz v0, :cond_1
check-cast p0, Lkotlinx/coroutines/c;
return-object p0
:cond_1
instance-of v0, p0, Lkotlinx/coroutines/au;
if-eqz v0, :cond_0
const/4 p0, 0x0
return-object p0
.end method
.method private final a(Lkotlinx/coroutines/ah;Ljava/lang/Object;)V
.locals 4
iget-object v0, p0, Lkotlinx/coroutines/aq;->parentHandle:Lkotlinx/coroutines/b;
if-eqz v0, :cond_0
invoke-interface {v0}, Lkotlinx/coroutines/b;->dispose()V
sget-object v0, Lkotlinx/coroutines/av;->bSz:Lkotlinx/coroutines/av;
check-cast v0, Lkotlinx/coroutines/b;
iput-object v0, p0, Lkotlinx/coroutines/aq;->parentHandle:Lkotlinx/coroutines/b;
:cond_0
instance-of v0, p2, Lkotlinx/coroutines/f;
const/4 v1, 0x0
if-nez v0, :cond_1
move-object v0, v1
goto :goto_0
:cond_1
move-object v0, p2
:goto_0
check-cast v0, Lkotlinx/coroutines/f;
if-eqz v0, :cond_2
iget-object v1, v0, Lkotlinx/coroutines/f;->cause:Ljava/lang/Throwable;
:cond_2
instance-of v0, p1, Lkotlinx/coroutines/ap;
if-eqz v0, :cond_3
:try_start_0
move-object v0, p1
check-cast v0, Lkotlinx/coroutines/ap;
invoke-virtual {v0, v1}, Lkotlinx/coroutines/ap;->invoke(Ljava/lang/Throwable;)V
:try_end_0
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_1
:catch_0
move-exception v0
new-instance v1, Lkotlinx/coroutines/i;
new-instance v2, Ljava/lang/StringBuilder;
const-string v3, "Exception in completion handler "
invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string p1, " for "
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v1, p1, v0}, Lkotlinx/coroutines/i;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
check-cast v1, Ljava/lang/Throwable;
invoke-virtual {p0, v1}, Lkotlinx/coroutines/aq;->p(Ljava/lang/Throwable;)V
goto :goto_1
:cond_3
invoke-interface {p1}, Lkotlinx/coroutines/ah;->FP()Lkotlinx/coroutines/au;
move-result-object p1
if-eqz p1, :cond_4
invoke-direct {p0, p1, v1}, Lkotlinx/coroutines/aq;->b(Lkotlinx/coroutines/au;Ljava/lang/Throwable;)V
:cond_4
:goto_1
invoke-virtual {p0, p2}, Lkotlinx/coroutines/aq;->bG(Ljava/lang/Object;)V
return-void
.end method
.method private final a(Lkotlinx/coroutines/ap;)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkotlinx/coroutines/ap<",
"*>;)V"
}
.end annotation
new-instance v0, Lkotlinx/coroutines/au;
invoke-direct {v0}, Lkotlinx/coroutines/au;-><init>()V
check-cast v0, Lkotlinx/coroutines/a/i;
invoke-virtual {p1, v0}, Lkotlinx/coroutines/ap;->b(Lkotlinx/coroutines/a/i;)Z
invoke-virtual {p1}, Lkotlinx/coroutines/a/i;->Go()Ljava/lang/Object;
move-result-object v0
invoke-static {v0}, Lkotlinx/coroutines/a/h;->bT(Ljava/lang/Object;)Lkotlinx/coroutines/a/i;
move-result-object v0
sget-object v1, Lkotlinx/coroutines/aq;->bSn:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
invoke-virtual {v1, p0, p1, v0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
return-void
.end method
.method public static final synthetic a(Lkotlinx/coroutines/aq;Lkotlinx/coroutines/aq$b;Lkotlinx/coroutines/c;Ljava/lang/Object;)V
.locals 2
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->FY()Ljava/lang/Object;
move-result-object v0
const/4 v1, 0x0
if-ne v0, p1, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_3
check-cast p2, Lkotlinx/coroutines/a/i;
invoke-static {p2}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/a/i;)Lkotlinx/coroutines/c;
move-result-object p2
if-eqz p2, :cond_1
invoke-direct {p0, p1, p2, p3}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/aq$b;Lkotlinx/coroutines/c;Ljava/lang/Object;)Z
move-result p2
if-nez p2, :cond_2
:cond_1
invoke-direct {p0, p1, p3, v1}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/aq$b;Ljava/lang/Object;I)Z
:cond_2
return-void
:cond_3
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "Failed requirement."
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.end method
.method private final a(Lkotlinx/coroutines/au;Ljava/lang/Throwable;)V
.locals 7
invoke-virtual {p1}, Lkotlinx/coroutines/a/g;->Go()Ljava/lang/Object;
move-result-object v0
if-eqz v0, :cond_4
check-cast v0, Lkotlinx/coroutines/a/i;
const/4 v1, 0x0
:goto_0
move-object v2, p1
check-cast v2, Lkotlinx/coroutines/a/g;
invoke-static {v0, v2}, Lkotlin/jvm/internal/j;->x(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v2
xor-int/lit8 v2, v2, 0x1
if-eqz v2, :cond_2
instance-of v2, v0, Lkotlinx/coroutines/am;
if-eqz v2, :cond_1
move-object v2, v0
check-cast v2, Lkotlinx/coroutines/ap;
:try_start_0
invoke-virtual {v2, p2}, Lkotlinx/coroutines/ap;->invoke(Ljava/lang/Throwable;)V
:try_end_0
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_1
:catch_0
move-exception v3
if-eqz v1, :cond_0
invoke-static {v1, v3}, Lkotlin/a;->b(Ljava/lang/Throwable;Ljava/lang/Throwable;)V
if-nez v1, :cond_1
:cond_0
move-object v1, p0
check-cast v1, Lkotlinx/coroutines/aq;
new-instance v4, Lkotlinx/coroutines/i;
new-instance v5, Ljava/lang/StringBuilder;
const-string v6, "Exception in completion handler "
invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v2, " for "
invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v4, v1, v3}, Lkotlinx/coroutines/i;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
move-object v1, v4
check-cast v1, Ljava/lang/Throwable;
sget-object v2, Lkotlin/Unit;->bPm:Lkotlin/Unit;
:cond_1
:goto_1
invoke-virtual {v0}, Lkotlinx/coroutines/a/i;->Gp()Lkotlinx/coroutines/a/i;
move-result-object v0
goto :goto_0
:cond_2
if-eqz v1, :cond_3
invoke-virtual {p0, v1}, Lkotlinx/coroutines/aq;->p(Ljava/lang/Throwable;)V
:cond_3
invoke-direct {p0, p2}, Lkotlinx/coroutines/aq;->t(Ljava/lang/Throwable;)Z
return-void
:cond_4
new-instance p1, Lkotlin/r;
const-string p2, "null cannot be cast to non-null type kotlinx.coroutines.internal.Node /* = kotlinx.coroutines.internal.LockFreeLinkedListNode */"
invoke-direct {p1, p2}, Lkotlin/r;-><init>(Ljava/lang/String;)V
throw p1
return-void
.end method
.method private final a(Ljava/lang/Object;Lkotlinx/coroutines/au;Lkotlinx/coroutines/ap;)Z
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
"Lkotlinx/coroutines/au;",
"Lkotlinx/coroutines/ap<",
"*>;)Z"
}
.end annotation
new-instance v0, Lkotlinx/coroutines/aq$c;
check-cast p3, Lkotlinx/coroutines/a/i;
invoke-direct {v0, p3, p3, p0, p1}, Lkotlinx/coroutines/aq$c;-><init>(Lkotlinx/coroutines/a/i;Lkotlinx/coroutines/a/i;Lkotlinx/coroutines/aq;Ljava/lang/Object;)V
check-cast v0, Lkotlinx/coroutines/a/i$a;
:goto_0
invoke-virtual {p2}, Lkotlinx/coroutines/a/i;->Gq()Ljava/lang/Object;
move-result-object p1
if-eqz p1, :cond_0
check-cast p1, Lkotlinx/coroutines/a/i;
invoke-virtual {p1, p3, p2, v0}, Lkotlinx/coroutines/a/i;->a(Lkotlinx/coroutines/a/i;Lkotlinx/coroutines/a/i;Lkotlinx/coroutines/a/i$a;)I
move-result p1
packed-switch p1, :pswitch_data_0
goto :goto_0
:pswitch_0
const/4 p1, 0x0
return p1
:pswitch_1
const/4 p1, 0x1
return p1
:cond_0
new-instance p1, Lkotlin/r;
const-string p2, "null cannot be cast to non-null type kotlinx.coroutines.internal.Node /* = kotlinx.coroutines.internal.LockFreeLinkedListNode */"
invoke-direct {p1, p2}, Lkotlin/r;-><init>(Ljava/lang/String;)V
throw p1
return-void
:pswitch_data_0
.packed-switch 0x1
:pswitch_1
:pswitch_0
.end packed-switch
.end method
.method private static a(Ljava/lang/Throwable;Ljava/util/List;)Z
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Throwable;",
"Ljava/util/List<",
"+",
"Ljava/lang/Throwable;",
">;)Z"
}
.end annotation
invoke-interface {p1}, Ljava/util/List;->size()I
move-result v0
const/4 v1, 0x0
const/4 v2, 0x1
if-gt v0, v2, :cond_0
return v1
:cond_0
invoke-interface {p1}, Ljava/util/List;->size()I
move-result v0
invoke-static {v0}, Lkotlinx/coroutines/a/e;->eX(I)Ljava/util/Set;
move-result-object v0
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object p1
:cond_1
:goto_0
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_2
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Ljava/lang/Throwable;
if-eq v3, p0, :cond_1
instance-of v4, v3, Ljava/util/concurrent/CancellationException;
if-nez v4, :cond_1
invoke-interface {v0, v3}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
move-result v4
if-eqz v4, :cond_1
invoke-static {p0, v3}, Lkotlin/a;->b(Ljava/lang/Throwable;Ljava/lang/Throwable;)V
const/4 v1, 0x1
goto :goto_0
:cond_2
return v1
.end method
.method private final a(Lkotlinx/coroutines/ah;Ljava/lang/Object;I)Z
.locals 2
instance-of p3, p1, Lkotlinx/coroutines/ab;
const/4 v0, 0x0
const/4 v1, 0x1
if-nez p3, :cond_1
instance-of p3, p1, Lkotlinx/coroutines/ap;
if-eqz p3, :cond_0
goto :goto_0
:cond_0
const/4 p3, 0x0
goto :goto_1
:cond_1
:goto_0
const/4 p3, 0x1
:goto_1
if-eqz p3, :cond_5
instance-of p3, p2, Lkotlinx/coroutines/f;
if-nez p3, :cond_2
const/4 p3, 0x1
goto :goto_2
:cond_2
const/4 p3, 0x0
:goto_2
if-eqz p3, :cond_4
sget-object p3, Lkotlinx/coroutines/aq;->bSn:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
invoke-virtual {p3, p0, p1, p2}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p3
if-nez p3, :cond_3
return v0
:cond_3
invoke-direct {p0, p1, p2}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/ah;Ljava/lang/Object;)V
return v1
:cond_4
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "Check failed."
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
:cond_5
new-instance p1, Ljava/lang/IllegalStateException;
const-string p2, "Check failed."
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
.end method
.method private final a(Lkotlinx/coroutines/aq$b;Ljava/lang/Object;I)Z
.locals 4
instance-of p3, p2, Lkotlinx/coroutines/ah;
const/4 v0, 0x0
const/4 v1, 0x1
if-nez p3, :cond_0
const/4 p3, 0x1
goto :goto_0
:cond_0
const/4 p3, 0x0
:goto_0
if-eqz p3, :cond_12
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->FY()Ljava/lang/Object;
move-result-object p3
if-ne p3, p1, :cond_1
const/4 p3, 0x1
goto :goto_1
:cond_1
const/4 p3, 0x0
:goto_1
if-eqz p3, :cond_11
invoke-virtual {p1}, Lkotlinx/coroutines/aq$b;->isSealed()Z
move-result p3
xor-int/2addr p3, v1
if-eqz p3, :cond_10
iget-boolean p3, p1, Lkotlinx/coroutines/aq$b;->isCompleting:Z
if-eqz p3, :cond_f
instance-of p3, p2, Lkotlinx/coroutines/f;
const/4 v2, 0x0
if-nez p3, :cond_2
move-object p3, v2
goto :goto_2
:cond_2
move-object p3, p2
:goto_2
check-cast p3, Lkotlinx/coroutines/f;
if-eqz p3, :cond_3
iget-object v2, p3, Lkotlinx/coroutines/f;->cause:Ljava/lang/Throwable;
:cond_3
monitor-enter p1
:try_start_0
iget-object p3, p1, Lkotlinx/coroutines/aq$b;->_exceptionsHolder:Ljava/lang/Object;
if-nez p3, :cond_4
invoke-static {}, Lkotlinx/coroutines/aq$b;->Gc()Ljava/util/ArrayList;
move-result-object p3
goto :goto_3
:cond_4
instance-of v3, p3, Ljava/lang/Throwable;
if-eqz v3, :cond_5
invoke-static {}, Lkotlinx/coroutines/aq$b;->Gc()Ljava/util/ArrayList;
move-result-object v3
invoke-virtual {v3, p3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
move-object p3, v3
goto :goto_3
:cond_5
instance-of v3, p3, Ljava/util/ArrayList;
if-eqz v3, :cond_e
if-eqz p3, :cond_d
check-cast p3, Ljava/util/ArrayList;
:goto_3
iget-object v3, p1, Lkotlinx/coroutines/aq$b;->rootCause:Ljava/lang/Throwable;
if-eqz v3, :cond_6
invoke-virtual {p3, v0, v3}, Ljava/util/ArrayList;->add(ILjava/lang/Object;)V
:cond_6
if-eqz v2, :cond_7
invoke-static {v2, v3}, Lkotlin/jvm/internal/j;->x(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
xor-int/2addr v0, v1
if-eqz v0, :cond_7
invoke-virtual {p3, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
:cond_7
invoke-static {}, Lkotlinx/coroutines/ar;->Gd()Lkotlinx/coroutines/a/o;
move-result-object v0
iput-object v0, p1, Lkotlinx/coroutines/aq$b;->_exceptionsHolder:Ljava/lang/Object;
check-cast p3, Ljava/util/List;
invoke-direct {p0, p1, p3}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/aq$b;Ljava/util/List;)Ljava/lang/Throwable;
move-result-object v0
if-eqz v0, :cond_8
invoke-static {v0, p3}, Lkotlinx/coroutines/aq;->a(Ljava/lang/Throwable;Ljava/util/List;)Z
move-result p3
if-nez p3, :cond_8
iget-object p3, p1, Lkotlinx/coroutines/aq$b;->rootCause:Ljava/lang/Throwable;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
:cond_8
monitor-exit p1
if-nez v0, :cond_9
goto :goto_4
:cond_9
if-ne v0, v2, :cond_a
goto :goto_4
:cond_a
new-instance p2, Lkotlinx/coroutines/f;
invoke-direct {p2, v0}, Lkotlinx/coroutines/f;-><init>(Ljava/lang/Throwable;)V
:goto_4
if-eqz v0, :cond_b
invoke-direct {p0, v0}, Lkotlinx/coroutines/aq;->t(Ljava/lang/Throwable;)Z
move-result p3
if-nez p3, :cond_b
invoke-virtual {p0, v0}, Lkotlinx/coroutines/aq;->s(Ljava/lang/Throwable;)V
:cond_b
sget-object p3, Lkotlinx/coroutines/aq;->bSn:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
invoke-virtual {p3, p0, p1, p2}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p3
if-eqz p3, :cond_c
check-cast p1, Lkotlinx/coroutines/ah;
invoke-direct {p0, p1, p2}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/ah;Ljava/lang/Object;)V
return v1
:cond_c
new-instance p3, Ljava/lang/StringBuilder;
const-string v0, "Unexpected state: "
invoke-direct {p3, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
iget-object v0, p0, Lkotlinx/coroutines/aq;->_state:Ljava/lang/Object;
invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v0, ", expected: "
invoke-virtual {p3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string p1, ", update: "
invoke-virtual {p3, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p3, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
new-instance p2, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p2, Ljava/lang/Throwable;
throw p2
:cond_d
:try_start_1
new-instance p2, Lkotlin/r;
const-string p3, "null cannot be cast to non-null type kotlin.collections.ArrayList<kotlin.Throwable> /* = java.util.ArrayList<kotlin.Throwable> */"
invoke-direct {p2, p3}, Lkotlin/r;-><init>(Ljava/lang/String;)V
throw p2
:cond_e
const-string p2, "State is "
invoke-static {p3}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p3
invoke-virtual {p2, p3}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p2
new-instance p3, Ljava/lang/IllegalStateException;
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p3, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast p3, Ljava/lang/Throwable;
throw p3
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:catchall_0
move-exception p2
monitor-exit p1
throw p2
:cond_f
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "Failed requirement."
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
:cond_10
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "Failed requirement."
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
:cond_11
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "Failed requirement."
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
:cond_12
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "Failed requirement."
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
.end method
.method private final a(Lkotlinx/coroutines/aq$b;Lkotlinx/coroutines/c;Ljava/lang/Object;)Z
.locals 4
:cond_0
iget-object v0, p2, Lkotlinx/coroutines/c;->bRz:Lkotlinx/coroutines/d;
new-instance v1, Lkotlinx/coroutines/aq$a;
invoke-direct {v1, p0, p1, p2, p3}, Lkotlinx/coroutines/aq$a;-><init>(Lkotlinx/coroutines/aq;Lkotlinx/coroutines/aq$b;Lkotlinx/coroutines/c;Ljava/lang/Object;)V
check-cast v1, Lkotlinx/coroutines/h;
check-cast v1, Lkotlin/jvm/functions/Function1;
const/4 v2, 0x1
const/4 v3, 0x0
invoke-static {v0, v3, v3, v1, v2}, Lkotlinx/coroutines/ak$a;->a(Lkotlinx/coroutines/ak;ZZLkotlin/jvm/functions/Function1;I)Lkotlinx/coroutines/aa;
move-result-object v0
sget-object v1, Lkotlinx/coroutines/av;->bSz:Lkotlinx/coroutines/av;
if-eq v0, v1, :cond_1
return v2
:cond_1
check-cast p2, Lkotlinx/coroutines/a/i;
invoke-static {p2}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/a/i;)Lkotlinx/coroutines/c;
move-result-object p2
if-nez p2, :cond_0
return v3
.end method
.method private final b(Ljava/lang/Throwable;Ljava/lang/String;)Ljava/util/concurrent/CancellationException;
.locals 2
instance-of v0, p1, Ljava/util/concurrent/CancellationException;
if-nez v0, :cond_0
const/4 v0, 0x0
goto :goto_0
:cond_0
move-object v0, p1
:goto_0
check-cast v0, Ljava/util/concurrent/CancellationException;
if-nez v0, :cond_1
new-instance v0, Lkotlinx/coroutines/al;
move-object v1, p0
check-cast v1, Lkotlinx/coroutines/ak;
invoke-direct {v0, p2, p1, v1}, Lkotlinx/coroutines/al;-><init>(Ljava/lang/String;Ljava/lang/Throwable;Lkotlinx/coroutines/ak;)V
check-cast v0, Ljava/util/concurrent/CancellationException;
:cond_1
return-object v0
.end method
.method private final b(Lkotlinx/coroutines/au;Ljava/lang/Throwable;)V
.locals 7
invoke-virtual {p1}, Lkotlinx/coroutines/a/g;->Go()Ljava/lang/Object;
move-result-object v0
if-eqz v0, :cond_4
check-cast v0, Lkotlinx/coroutines/a/i;
const/4 v1, 0x0
:goto_0
move-object v2, p1
check-cast v2, Lkotlinx/coroutines/a/g;
invoke-static {v0, v2}, Lkotlin/jvm/internal/j;->x(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v2
xor-int/lit8 v2, v2, 0x1
if-eqz v2, :cond_2
instance-of v2, v0, Lkotlinx/coroutines/ap;
if-eqz v2, :cond_1
move-object v2, v0
check-cast v2, Lkotlinx/coroutines/ap;
:try_start_0
invoke-virtual {v2, p2}, Lkotlinx/coroutines/ap;->invoke(Ljava/lang/Throwable;)V
:try_end_0
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_1
:catch_0
move-exception v3
if-eqz v1, :cond_0
invoke-static {v1, v3}, Lkotlin/a;->b(Ljava/lang/Throwable;Ljava/lang/Throwable;)V
if-nez v1, :cond_1
:cond_0
move-object v1, p0
check-cast v1, Lkotlinx/coroutines/aq;
new-instance v4, Lkotlinx/coroutines/i;
new-instance v5, Ljava/lang/StringBuilder;
const-string v6, "Exception in completion handler "
invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v2, " for "
invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v5, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v1
invoke-direct {v4, v1, v3}, Lkotlinx/coroutines/i;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
move-object v1, v4
check-cast v1, Ljava/lang/Throwable;
sget-object v2, Lkotlin/Unit;->bPm:Lkotlin/Unit;
:cond_1
:goto_1
invoke-virtual {v0}, Lkotlinx/coroutines/a/i;->Gp()Lkotlinx/coroutines/a/i;
move-result-object v0
goto :goto_0
:cond_2
if-eqz v1, :cond_3
invoke-virtual {p0, v1}, Lkotlinx/coroutines/aq;->p(Ljava/lang/Throwable;)V
return-void
:cond_3
return-void
:cond_4
new-instance p1, Lkotlin/r;
const-string p2, "null cannot be cast to non-null type kotlinx.coroutines.internal.Node /* = kotlinx.coroutines.internal.LockFreeLinkedListNode */"
invoke-direct {p1, p2}, Lkotlin/r;-><init>(Ljava/lang/String;)V
throw p1
return-void
.end method
.method private final bM(Ljava/lang/Object;)Z
.locals 1
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->FW()Z
move-result v0
if-eqz v0, :cond_0
invoke-direct {p0, p1}, Lkotlinx/coroutines/aq;->bN(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
const/4 p1, 0x1
return p1
:cond_0
invoke-direct {p0, p1}, Lkotlinx/coroutines/aq;->bP(Ljava/lang/Object;)Z
move-result p1
return p1
.end method
.method private final bN(Ljava/lang/Object;)Z
.locals 4
:pswitch_0
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->FY()Ljava/lang/Object;
move-result-object v0
instance-of v1, v0, Lkotlinx/coroutines/ah;
const/4 v2, 0x0
if-eqz v1, :cond_1
instance-of v1, v0, Lkotlinx/coroutines/aq$b;
if-eqz v1, :cond_0
move-object v1, v0
check-cast v1, Lkotlinx/coroutines/aq$b;
iget-boolean v1, v1, Lkotlinx/coroutines/aq$b;->isCompleting:Z
if-eqz v1, :cond_0
goto :goto_0
:cond_0
new-instance v1, Lkotlinx/coroutines/f;
invoke-direct {p0, p1}, Lkotlinx/coroutines/aq;->bO(Ljava/lang/Object;)Ljava/lang/Throwable;
move-result-object v3
invoke-direct {v1, v3}, Lkotlinx/coroutines/f;-><init>(Ljava/lang/Throwable;)V
invoke-virtual {p0, v0, v1, v2}, Lkotlinx/coroutines/aq;->d(Ljava/lang/Object;Ljava/lang/Object;I)I
move-result v0
packed-switch v0, :pswitch_data_0
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "unexpected result"
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
:pswitch_1
const/4 p1, 0x1
return p1
:pswitch_2
return v2
:cond_1
:goto_0
return v2
nop
:pswitch_data_0
.packed-switch 0x0
:pswitch_2
:pswitch_1
:pswitch_1
:pswitch_0
.end packed-switch
.end method
.method private final bO(Ljava/lang/Object;)Ljava/lang/Throwable;
.locals 1
if-eqz p1, :cond_0
instance-of v0, p1, Ljava/lang/Throwable;
goto :goto_0
:cond_0
const/4 v0, 0x1
:goto_0
if-eqz v0, :cond_2
if-eqz p1, :cond_1
check-cast p1, Ljava/lang/Throwable;
return-object p1
:cond_1
invoke-direct {p0}, Lkotlinx/coroutines/aq;->FZ()Lkotlinx/coroutines/al;
move-result-object p1
check-cast p1, Ljava/lang/Throwable;
return-object p1
:cond_2
if-eqz p1, :cond_3
check-cast p1, Lkotlinx/coroutines/aw;
invoke-interface {p1}, Lkotlinx/coroutines/aw;->Ga()Ljava/lang/Throwable;
move-result-object p1
return-object p1
:cond_3
new-instance p1, Lkotlin/r;
const-string v0, "null cannot be cast to non-null type kotlinx.coroutines.ParentJob"
invoke-direct {p1, v0}, Lkotlin/r;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method private final bP(Ljava/lang/Object;)Z
.locals 8
const/4 v0, 0x0
move-object v1, v0
:cond_0
:pswitch_0
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->FY()Ljava/lang/Object;
move-result-object v2
instance-of v3, v2, Lkotlinx/coroutines/aq$b;
const/4 v4, 0x1
const/4 v5, 0x0
if-eqz v3, :cond_7
monitor-enter v2
:try_start_0
move-object v3, v2
check-cast v3, Lkotlinx/coroutines/aq$b;
invoke-virtual {v3}, Lkotlinx/coroutines/aq$b;->isSealed()Z
move-result v3
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v3, :cond_1
monitor-exit v2
return v5
:cond_1
:try_start_1
move-object v3, v2
check-cast v3, Lkotlinx/coroutines/aq$b;
invoke-virtual {v3}, Lkotlinx/coroutines/aq$b;->Gb()Z
move-result v3
if-nez p1, :cond_2
if-nez v3, :cond_4
:cond_2
if-nez v1, :cond_3
invoke-direct {p0, p1}, Lkotlinx/coroutines/aq;->bO(Ljava/lang/Object;)Ljava/lang/Throwable;
move-result-object v1
:cond_3
move-object p1, v2
check-cast p1, Lkotlinx/coroutines/aq$b;
invoke-virtual {p1, v1}, Lkotlinx/coroutines/aq$b;->u(Ljava/lang/Throwable;)V
:cond_4
move-object p1, v2
check-cast p1, Lkotlinx/coroutines/aq$b;
iget-object p1, p1, Lkotlinx/coroutines/aq$b;->rootCause:Ljava/lang/Throwable;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
xor-int/lit8 v1, v3, 0x1
if-eqz v1, :cond_5
goto :goto_0
:cond_5
move-object p1, v0
:goto_0
monitor-exit v2
if-eqz p1, :cond_6
check-cast v2, Lkotlinx/coroutines/aq$b;
iget-object v0, v2, Lkotlinx/coroutines/aq$b;->bSi:Lkotlinx/coroutines/au;
invoke-direct {p0, v0, p1}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/au;Ljava/lang/Throwable;)V
:cond_6
return v4
:catchall_0
move-exception p1
monitor-exit v2
throw p1
:cond_7
instance-of v3, v2, Lkotlinx/coroutines/ah;
if-eqz v3, :cond_f
if-nez v1, :cond_8
invoke-direct {p0, p1}, Lkotlinx/coroutines/aq;->bO(Ljava/lang/Object;)Ljava/lang/Throwable;
move-result-object v1
:cond_8
move-object v3, v2
check-cast v3, Lkotlinx/coroutines/ah;
invoke-interface {v3}, Lkotlinx/coroutines/ah;->isActive()Z
move-result v6
if-eqz v6, :cond_e
instance-of v2, v3, Lkotlinx/coroutines/aq$b;
if-nez v2, :cond_9
const/4 v2, 0x1
goto :goto_1
:cond_9
const/4 v2, 0x0
:goto_1
if-eqz v2, :cond_d
invoke-interface {v3}, Lkotlinx/coroutines/ah;->isActive()Z
move-result v2
if-eqz v2, :cond_c
invoke-direct {p0, v3}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/ah;)Lkotlinx/coroutines/au;
move-result-object v2
if-nez v2, :cond_a
goto :goto_2
:cond_a
new-instance v6, Lkotlinx/coroutines/aq$b;
invoke-direct {v6, v2, v1}, Lkotlinx/coroutines/aq$b;-><init>(Lkotlinx/coroutines/au;Ljava/lang/Throwable;)V
sget-object v7, Lkotlinx/coroutines/aq;->bSn:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
invoke-virtual {v7, p0, v3, v6}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v3
if-nez v3, :cond_b
goto :goto_2
:cond_b
invoke-direct {p0, v2, v1}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/au;Ljava/lang/Throwable;)V
const/4 v5, 0x1
:goto_2
if-eqz v5, :cond_0
return v4
:cond_c
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "Check failed."
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
:cond_d
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "Check failed."
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
:cond_e
new-instance v3, Lkotlinx/coroutines/f;
invoke-direct {v3, v1}, Lkotlinx/coroutines/f;-><init>(Ljava/lang/Throwable;)V
invoke-virtual {p0, v2, v3, v5}, Lkotlinx/coroutines/aq;->d(Ljava/lang/Object;Ljava/lang/Object;I)I
move-result v3
packed-switch v3, :pswitch_data_0
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "unexpected result"
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
:pswitch_1
return v4
:pswitch_2
invoke-static {v2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
const-string v0, "Cannot happen in "
invoke-virtual {v0, p1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p1
new-instance v0, Ljava/lang/IllegalStateException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast v0, Ljava/lang/Throwable;
throw v0
:cond_f
return v5
:pswitch_data_0
.packed-switch 0x0
:pswitch_2
:pswitch_1
:pswitch_1
:pswitch_0
.end packed-switch
.end method
.method private static bQ(Ljava/lang/Object;)Ljava/lang/String;
.locals 1
instance-of v0, p0, Lkotlinx/coroutines/aq$b;
if-eqz v0, :cond_2
check-cast p0, Lkotlinx/coroutines/aq$b;
invoke-virtual {p0}, Lkotlinx/coroutines/aq$b;->Gb()Z
move-result v0
if-eqz v0, :cond_0
const-string p0, "Cancelling"
return-object p0
:cond_0
iget-boolean p0, p0, Lkotlinx/coroutines/aq$b;->isCompleting:Z
if-eqz p0, :cond_1
const-string p0, "Completing"
return-object p0
:cond_1
const-string p0, "Active"
return-object p0
:cond_2
instance-of v0, p0, Lkotlinx/coroutines/ah;
if-eqz v0, :cond_4
check-cast p0, Lkotlinx/coroutines/ah;
invoke-interface {p0}, Lkotlinx/coroutines/ah;->isActive()Z
move-result p0
if-eqz p0, :cond_3
const-string p0, "Active"
return-object p0
:cond_3
const-string p0, "New"
return-object p0
:cond_4
instance-of p0, p0, Lkotlinx/coroutines/f;
if-eqz p0, :cond_5
const-string p0, "Cancelled"
return-object p0
:cond_5
const-string p0, "Completed"
return-object p0
.end method
.method private isCompleted()Z
.locals 1
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->FY()Ljava/lang/Object;
move-result-object v0
instance-of v0, v0, Lkotlinx/coroutines/ah;
if-nez v0, :cond_0
const/4 v0, 0x1
return v0
:cond_0
const/4 v0, 0x0
return v0
.end method
.method private final t(Ljava/lang/Throwable;)Z
.locals 3
instance-of v0, p1, Ljava/util/concurrent/CancellationException;
const/4 v1, 0x1
if-eqz v0, :cond_0
return v1
:cond_0
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->FV()Z
move-result v0
const/4 v2, 0x0
if-nez v0, :cond_1
return v2
:cond_1
iget-object v0, p0, Lkotlinx/coroutines/aq;->parentHandle:Lkotlinx/coroutines/b;
if-eqz v0, :cond_2
invoke-interface {v0, p1}, Lkotlinx/coroutines/b;->q(Ljava/lang/Throwable;)Z
move-result p1
if-ne p1, v1, :cond_2
return v1
:cond_2
return v2
.end method
# virtual methods
.method public final FU()Ljava/util/concurrent/CancellationException;
.locals 4
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->FY()Ljava/lang/Object;
move-result-object v0
instance-of v1, v0, Lkotlinx/coroutines/aq$b;
if-eqz v1, :cond_1
check-cast v0, Lkotlinx/coroutines/aq$b;
iget-object v0, v0, Lkotlinx/coroutines/aq$b;->rootCause:Ljava/lang/Throwable;
if-eqz v0, :cond_0
const-string v1, "Job is cancelling"
invoke-direct {p0, v0, v1}, Lkotlinx/coroutines/aq;->b(Ljava/lang/Throwable;Ljava/lang/String;)Ljava/util/concurrent/CancellationException;
move-result-object v0
if-eqz v0, :cond_0
goto :goto_0
:cond_0
invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
const-string v1, "Job is still new or active: "
invoke-virtual {v1, v0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
new-instance v1, Ljava/lang/IllegalStateException;
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast v1, Ljava/lang/Throwable;
throw v1
:cond_1
instance-of v1, v0, Lkotlinx/coroutines/ah;
if-nez v1, :cond_3
instance-of v1, v0, Lkotlinx/coroutines/f;
if-eqz v1, :cond_2
check-cast v0, Lkotlinx/coroutines/f;
iget-object v0, v0, Lkotlinx/coroutines/f;->cause:Ljava/lang/Throwable;
const-string v1, "Job was cancelled"
invoke-direct {p0, v0, v1}, Lkotlinx/coroutines/aq;->b(Ljava/lang/Throwable;Ljava/lang/String;)Ljava/util/concurrent/CancellationException;
move-result-object v0
return-object v0
:cond_2
new-instance v0, Lkotlinx/coroutines/al;
const-string v1, "Job has completed normally"
const/4 v2, 0x0
move-object v3, p0
check-cast v3, Lkotlinx/coroutines/ak;
invoke-direct {v0, v1, v2, v3}, Lkotlinx/coroutines/al;-><init>(Ljava/lang/String;Ljava/lang/Throwable;Lkotlinx/coroutines/ak;)V
check-cast v0, Ljava/util/concurrent/CancellationException;
:goto_0
return-object v0
:cond_3
invoke-static {p0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
const-string v1, "Job is still new or active: "
invoke-virtual {v1, v0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
new-instance v1, Ljava/lang/IllegalStateException;
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast v1, Ljava/lang/Throwable;
throw v1
.end method
.method protected FV()Z
.locals 1
const/4 v0, 0x0
return v0
.end method
.method public FW()Z
.locals 1
const/4 v0, 0x0
return v0
.end method
.method protected FX()Z
.locals 1
const/4 v0, 0x1
return v0
.end method
.method public final FY()Ljava/lang/Object;
.locals 2
:goto_0
iget-object v0, p0, Lkotlinx/coroutines/aq;->_state:Ljava/lang/Object;
instance-of v1, v0, Lkotlinx/coroutines/a/m;
if-nez v1, :cond_0
return-object v0
:cond_0
check-cast v0, Lkotlinx/coroutines/a/m;
invoke-virtual {v0, p0}, Lkotlinx/coroutines/a/m;->bS(Ljava/lang/Object;)Ljava/lang/Object;
goto :goto_0
.end method
.method public Fy()V
.locals 0
return-void
.end method
.method public Fz()Ljava/lang/String;
.locals 1
invoke-static {p0}, Lkotlinx/coroutines/s;->bJ(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method public final Ga()Ljava/lang/Throwable;
.locals 5
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->FY()Ljava/lang/Object;
move-result-object v0
instance-of v1, v0, Lkotlinx/coroutines/aq$b;
if-eqz v1, :cond_0
move-object v1, v0
check-cast v1, Lkotlinx/coroutines/aq$b;
iget-object v1, v1, Lkotlinx/coroutines/aq$b;->rootCause:Ljava/lang/Throwable;
goto :goto_0
:cond_0
instance-of v1, v0, Lkotlinx/coroutines/ah;
if-nez v1, :cond_4
instance-of v1, v0, Lkotlinx/coroutines/f;
if-eqz v1, :cond_1
move-object v1, v0
check-cast v1, Lkotlinx/coroutines/f;
iget-object v1, v1, Lkotlinx/coroutines/f;->cause:Ljava/lang/Throwable;
goto :goto_0
:cond_1
const/4 v1, 0x0
:goto_0
if-eqz v1, :cond_3
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->FX()Z
move-result v2
if-eqz v2, :cond_2
instance-of v2, v1, Ljava/util/concurrent/CancellationException;
if-nez v2, :cond_2
goto :goto_1
:cond_2
return-object v1
:cond_3
:goto_1
new-instance v2, Lkotlinx/coroutines/al;
new-instance v3, Ljava/lang/StringBuilder;
const-string v4, "Parent job is "
invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-static {v0}, Lkotlinx/coroutines/aq;->bQ(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
move-object v3, p0
check-cast v3, Lkotlinx/coroutines/ak;
invoke-direct {v2, v0, v1, v3}, Lkotlinx/coroutines/al;-><init>(Ljava/lang/String;Ljava/lang/Throwable;Lkotlinx/coroutines/ak;)V
check-cast v2, Ljava/lang/Throwable;
return-object v2
:cond_4
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v0
const-string v1, "Cannot be cancelling child in this state: "
invoke-virtual {v1, v0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object v0
new-instance v1, Ljava/lang/IllegalStateException;
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {v1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast v1, Ljava/lang/Throwable;
throw v1
.end method
.method public final a(ZZLkotlin/jvm/functions/Function1;)Lkotlinx/coroutines/aa;
.locals 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(ZZ",
"Lkotlin/jvm/functions/Function1<",
"-",
"Ljava/lang/Throwable;",
"Lkotlin/Unit;",
">;)",
"Lkotlinx/coroutines/aa;"
}
.end annotation
const-string v0, "handler"
invoke-static {p3, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
const/4 v0, 0x0
move-object v1, v0
:cond_0
:goto_0
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->FY()Ljava/lang/Object;
move-result-object v2
instance-of v3, v2, Lkotlinx/coroutines/ab;
if-eqz v3, :cond_4
move-object v3, v2
check-cast v3, Lkotlinx/coroutines/ab;
iget-boolean v4, v3, Lkotlinx/coroutines/ab;->bSd:Z
if-eqz v4, :cond_2
if-nez v1, :cond_1
invoke-direct {p0, p3, p1}, Lkotlinx/coroutines/aq;->a(Lkotlin/jvm/functions/Function1;Z)Lkotlinx/coroutines/ap;
move-result-object v1
:cond_1
sget-object v3, Lkotlinx/coroutines/aq;->bSn:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
invoke-virtual {v3, p0, v2, v1}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
check-cast v1, Lkotlinx/coroutines/aa;
return-object v1
:cond_2
new-instance v2, Lkotlinx/coroutines/au;
invoke-direct {v2}, Lkotlinx/coroutines/au;-><init>()V
iget-boolean v4, v3, Lkotlinx/coroutines/ab;->bSd:Z
if-eqz v4, :cond_3
check-cast v2, Lkotlinx/coroutines/ah;
goto :goto_1
:cond_3
new-instance v4, Lkotlinx/coroutines/ag;
invoke-direct {v4, v2}, Lkotlinx/coroutines/ag;-><init>(Lkotlinx/coroutines/au;)V
move-object v2, v4
check-cast v2, Lkotlinx/coroutines/ah;
:goto_1
sget-object v4, Lkotlinx/coroutines/aq;->bSn:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
invoke-virtual {v4, p0, v3, v2}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
goto :goto_0
:cond_4
instance-of v3, v2, Lkotlinx/coroutines/ah;
if-eqz v3, :cond_10
move-object v3, v2
check-cast v3, Lkotlinx/coroutines/ah;
invoke-interface {v3}, Lkotlinx/coroutines/ah;->FP()Lkotlinx/coroutines/au;
move-result-object v3
if-nez v3, :cond_6
if-eqz v2, :cond_5
check-cast v2, Lkotlinx/coroutines/ap;
invoke-direct {p0, v2}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/ap;)V
goto :goto_0
:cond_5
new-instance p1, Lkotlin/r;
const-string p2, "null cannot be cast to non-null type kotlinx.coroutines.JobNode<*>"
invoke-direct {p1, p2}, Lkotlin/r;-><init>(Ljava/lang/String;)V
throw p1
:cond_6
sget-object v4, Lkotlinx/coroutines/av;->bSz:Lkotlinx/coroutines/av;
check-cast v4, Lkotlinx/coroutines/aa;
if-eqz p1, :cond_c
instance-of v5, v2, Lkotlinx/coroutines/aq$b;
if-eqz v5, :cond_c
monitor-enter v2
:try_start_0
move-object v5, v2
check-cast v5, Lkotlinx/coroutines/aq$b;
iget-object v5, v5, Lkotlinx/coroutines/aq$b;->rootCause:Ljava/lang/Throwable;
if-eqz v5, :cond_7
instance-of v6, p3, Lkotlinx/coroutines/c;
if-eqz v6, :cond_b
move-object v6, v2
check-cast v6, Lkotlinx/coroutines/aq$b;
iget-boolean v6, v6, Lkotlinx/coroutines/aq$b;->isCompleting:Z
if-nez v6, :cond_b
:cond_7
if-nez v1, :cond_8
invoke-direct {p0, p3, p1}, Lkotlinx/coroutines/aq;->a(Lkotlin/jvm/functions/Function1;Z)Lkotlinx/coroutines/ap;
move-result-object v1
:cond_8
invoke-direct {p0, v2, v3, v1}, Lkotlinx/coroutines/aq;->a(Ljava/lang/Object;Lkotlinx/coroutines/au;Lkotlinx/coroutines/ap;)Z
move-result v4
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-nez v4, :cond_9
monitor-exit v2
goto/16 :goto_0
:cond_9
if-nez v5, :cond_a
:try_start_1
check-cast v1, Lkotlinx/coroutines/aa;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
monitor-exit v2
return-object v1
:cond_a
:try_start_2
move-object v4, v1
check-cast v4, Lkotlinx/coroutines/aa;
:cond_b
sget-object v6, Lkotlin/Unit;->bPm:Lkotlin/Unit;
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
monitor-exit v2
goto :goto_2
:catchall_0
move-exception p1
monitor-exit v2
throw p1
:cond_c
move-object v5, v0
:goto_2
if-eqz v5, :cond_e
if-eqz p2, :cond_d
invoke-interface {p3, v5}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
:cond_d
return-object v4
:cond_e
if-nez v1, :cond_f
invoke-direct {p0, p3, p1}, Lkotlinx/coroutines/aq;->a(Lkotlin/jvm/functions/Function1;Z)Lkotlinx/coroutines/ap;
move-result-object v1
:cond_f
invoke-direct {p0, v2, v3, v1}, Lkotlinx/coroutines/aq;->a(Ljava/lang/Object;Lkotlinx/coroutines/au;Lkotlinx/coroutines/ap;)Z
move-result v2
if-eqz v2, :cond_0
check-cast v1, Lkotlinx/coroutines/aa;
return-object v1
:cond_10
if-eqz p2, :cond_13
instance-of p1, v2, Lkotlinx/coroutines/f;
if-nez p1, :cond_11
move-object v2, v0
:cond_11
check-cast v2, Lkotlinx/coroutines/f;
if-eqz v2, :cond_12
iget-object v0, v2, Lkotlinx/coroutines/f;->cause:Ljava/lang/Throwable;
:cond_12
invoke-interface {p3, v0}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
:cond_13
sget-object p1, Lkotlinx/coroutines/av;->bSz:Lkotlinx/coroutines/av;
check-cast p1, Lkotlinx/coroutines/aa;
return-object p1
.end method
.method public final a(Lkotlinx/coroutines/d;)Lkotlinx/coroutines/b;
.locals 3
const-string v0, "child"
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
new-instance v0, Lkotlinx/coroutines/c;
invoke-direct {v0, p0, p1}, Lkotlinx/coroutines/c;-><init>(Lkotlinx/coroutines/aq;Lkotlinx/coroutines/d;)V
check-cast v0, Lkotlinx/coroutines/h;
check-cast v0, Lkotlin/jvm/functions/Function1;
const/4 p1, 0x1
const/4 v1, 0x0
const/4 v2, 0x2
invoke-static {p0, p1, v1, v0, v2}, Lkotlinx/coroutines/ak$a;->a(Lkotlinx/coroutines/ak;ZZLkotlin/jvm/functions/Function1;I)Lkotlinx/coroutines/aa;
move-result-object p1
if-eqz p1, :cond_0
check-cast p1, Lkotlinx/coroutines/b;
return-object p1
:cond_0
new-instance p1, Lkotlin/r;
const-string v0, "null cannot be cast to non-null type kotlinx.coroutines.ChildHandle"
invoke-direct {p1, v0}, Lkotlin/r;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public final a(Lkotlinx/coroutines/aw;)V
.locals 1
const-string v0, "parentJob"
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
invoke-direct {p0, p1}, Lkotlinx/coroutines/aq;->bM(Ljava/lang/Object;)Z
return-void
.end method
.method public final b(Lkotlinx/coroutines/ak;)V
.locals 1
iget-object v0, p0, Lkotlinx/coroutines/aq;->parentHandle:Lkotlinx/coroutines/b;
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_3
if-nez p1, :cond_1
sget-object p1, Lkotlinx/coroutines/av;->bSz:Lkotlinx/coroutines/av;
check-cast p1, Lkotlinx/coroutines/b;
iput-object p1, p0, Lkotlinx/coroutines/aq;->parentHandle:Lkotlinx/coroutines/b;
return-void
:cond_1
invoke-interface {p1}, Lkotlinx/coroutines/ak;->start()Z
move-object v0, p0
check-cast v0, Lkotlinx/coroutines/d;
invoke-interface {p1, v0}, Lkotlinx/coroutines/ak;->a(Lkotlinx/coroutines/d;)Lkotlinx/coroutines/b;
move-result-object p1
iput-object p1, p0, Lkotlinx/coroutines/aq;->parentHandle:Lkotlinx/coroutines/b;
invoke-direct {p0}, Lkotlinx/coroutines/aq;->isCompleted()Z
move-result v0
if-eqz v0, :cond_2
invoke-interface {p1}, Lkotlinx/coroutines/b;->dispose()V
sget-object p1, Lkotlinx/coroutines/av;->bSz:Lkotlinx/coroutines/av;
check-cast p1, Lkotlinx/coroutines/b;
iput-object p1, p0, Lkotlinx/coroutines/aq;->parentHandle:Lkotlinx/coroutines/b;
:cond_2
return-void
:cond_3
new-instance p1, Ljava/lang/IllegalStateException;
const-string v0, "Check failed."
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
.end method
.method public bG(Ljava/lang/Object;)V
.locals 0
return-void
.end method
.method public final cancel()V
.locals 1
const/4 v0, 0x0
invoke-virtual {p0, v0}, Lkotlinx/coroutines/aq;->r(Ljava/lang/Throwable;)Z
return-void
.end method
.method final d(Ljava/lang/Object;Ljava/lang/Object;I)I
.locals 7
instance-of p3, p1, Lkotlinx/coroutines/ah;
const/4 v0, 0x0
if-nez p3, :cond_0
return v0
:cond_0
instance-of p3, p1, Lkotlinx/coroutines/ab;
const/4 v1, 0x3
const/4 v2, 0x1
if-nez p3, :cond_1
instance-of p3, p1, Lkotlinx/coroutines/ap;
if-eqz p3, :cond_3
:cond_1
instance-of p3, p1, Lkotlinx/coroutines/c;
if-nez p3, :cond_3
instance-of p3, p2, Lkotlinx/coroutines/f;
if-nez p3, :cond_3
check-cast p1, Lkotlinx/coroutines/ah;
invoke-direct {p0, p1, p2, v0}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/ah;Ljava/lang/Object;I)Z
move-result p1
if-nez p1, :cond_2
return v1
:cond_2
return v2
:cond_3
move-object p3, p1
check-cast p3, Lkotlinx/coroutines/ah;
invoke-direct {p0, p3}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/ah;)Lkotlinx/coroutines/au;
move-result-object v3
if-nez v3, :cond_4
return v1
:cond_4
instance-of v4, p1, Lkotlinx/coroutines/aq$b;
const/4 v5, 0x0
if-nez v4, :cond_5
move-object v4, v5
goto :goto_0
:cond_5
move-object v4, p1
:goto_0
check-cast v4, Lkotlinx/coroutines/aq$b;
if-nez v4, :cond_6
new-instance v4, Lkotlinx/coroutines/aq$b;
invoke-direct {v4, v3, v5}, Lkotlinx/coroutines/aq$b;-><init>(Lkotlinx/coroutines/au;Ljava/lang/Throwable;)V
:cond_6
monitor-enter v4
:try_start_0
iget-boolean v6, v4, Lkotlinx/coroutines/aq$b;->isCompleting:Z
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-eqz v6, :cond_7
monitor-exit v4
return v0
:cond_7
:try_start_1
iput-boolean v2, v4, Lkotlinx/coroutines/aq$b;->isCompleting:Z
if-eq v4, p1, :cond_8
sget-object v6, Lkotlinx/coroutines/aq;->bSn:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
invoke-virtual {v6, p0, p1, v4}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
if-nez p1, :cond_8
monitor-exit v4
return v1
:cond_8
:try_start_2
invoke-virtual {v4}, Lkotlinx/coroutines/aq$b;->isSealed()Z
move-result p1
xor-int/2addr p1, v2
if-eqz p1, :cond_11
invoke-virtual {v4}, Lkotlinx/coroutines/aq$b;->Gb()Z
move-result p1
instance-of v1, p2, Lkotlinx/coroutines/f;
if-nez v1, :cond_9
move-object v1, v5
goto :goto_1
:cond_9
move-object v1, p2
:goto_1
check-cast v1, Lkotlinx/coroutines/f;
if-eqz v1, :cond_a
iget-object v1, v1, Lkotlinx/coroutines/f;->cause:Ljava/lang/Throwable;
invoke-virtual {v4, v1}, Lkotlinx/coroutines/aq$b;->u(Ljava/lang/Throwable;)V
:cond_a
iget-object v1, v4, Lkotlinx/coroutines/aq$b;->rootCause:Ljava/lang/Throwable;
xor-int/2addr p1, v2
if-eqz p1, :cond_b
goto :goto_2
:cond_b
move-object v1, v5
:goto_2
sget-object p1, Lkotlin/Unit;->bPm:Lkotlin/Unit;
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
monitor-exit v4
if-eqz v1, :cond_c
invoke-direct {p0, v3, v1}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/au;Ljava/lang/Throwable;)V
:cond_c
instance-of p1, p3, Lkotlinx/coroutines/c;
if-nez p1, :cond_d
move-object p1, v5
goto :goto_3
:cond_d
move-object p1, p3
:goto_3
check-cast p1, Lkotlinx/coroutines/c;
if-nez p1, :cond_e
invoke-interface {p3}, Lkotlinx/coroutines/ah;->FP()Lkotlinx/coroutines/au;
move-result-object p1
if-eqz p1, :cond_f
check-cast p1, Lkotlinx/coroutines/a/i;
invoke-static {p1}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/a/i;)Lkotlinx/coroutines/c;
move-result-object v5
goto :goto_4
:cond_e
move-object v5, p1
:cond_f
:goto_4
if-eqz v5, :cond_10
invoke-direct {p0, v4, v5, p2}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/aq$b;Lkotlinx/coroutines/c;Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_10
const/4 p1, 0x2
return p1
:cond_10
invoke-direct {p0, v4, p2, v0}, Lkotlinx/coroutines/aq;->a(Lkotlinx/coroutines/aq$b;Ljava/lang/Object;I)Z
return v2
:cond_11
:try_start_3
const-string p1, "Failed requirement."
new-instance p2, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p2, Ljava/lang/Throwable;
throw p2
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
:catchall_0
move-exception p1
monitor-exit v4
throw p1
.end method
.method public fold(Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
.locals 1
2019-02-04 20:08:30 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
2019-02-04 20:29:01 +00:00
"<R:",
"Ljava/lang/Object;",
">(TR;",
"Lkotlin/jvm/functions/Function2<",
"-TR;-",
"Lkotlin/c/e$b;",
"+TR;>;)TR;"
2019-02-04 20:08:30 +00:00
}
.end annotation
2019-02-04 20:29:01 +00:00
const-string v0, "operation"
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-static {p2, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "operation"
invoke-static {p2, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
move-object v0, p0
check-cast v0, Lkotlin/c/e$b;
invoke-static {v0, p1, p2}, Lkotlin/c/e$b$a;->a(Lkotlin/c/e$b;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public get(Lkotlin/c/e$c;)Lkotlin/c/e$b;
2019-02-04 20:08:30 +00:00
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
2019-02-04 20:29:01 +00:00
"<E::",
"Lkotlin/c/e$b;",
">(",
"Lkotlin/c/e$c<",
"TE;>;)TE;"
2019-02-04 20:08:30 +00:00
}
.end annotation
2019-02-04 20:29:01 +00:00
const-string v0, "key"
2019-02-04 20:08:30 +00:00
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
2019-02-04 20:29:01 +00:00
const-string v0, "key"
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move-object v0, p0
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
check-cast v0, Lkotlin/c/e$b;
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-static {v0, p1}, Lkotlin/c/e$b$a;->a(Lkotlin/c/e$b;Lkotlin/c/e$c;)Lkotlin/c/e$b;
move-result-object p1
return-object p1
.end method
.method public final getKey()Lkotlin/c/e$c;
2019-02-04 20:08:30 +00:00
.locals 1
2019-02-04 20:29:01 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lkotlin/c/e$c<",
"*>;"
}
.end annotation
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
sget-object v0, Lkotlinx/coroutines/ak;->bSl:Lkotlinx/coroutines/ak$b;
check-cast v0, Lkotlin/c/e$c;
2019-02-04 20:08:30 +00:00
return-object v0
.end method
2019-02-04 20:29:01 +00:00
.method public isActive()Z
.locals 2
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->FY()Ljava/lang/Object;
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move-result-object v0
instance-of v1, v0, Lkotlinx/coroutines/ah;
if-eqz v1, :cond_0
check-cast v0, Lkotlinx/coroutines/ah;
invoke-interface {v0}, Lkotlinx/coroutines/ah;->isActive()Z
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move-result v0
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
if-eqz v0, :cond_0
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
const/4 v0, 0x1
return v0
2019-02-04 20:08:30 +00:00
:cond_0
2019-02-04 20:29:01 +00:00
const/4 v0, 0x0
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
return v0
.end method
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
.method public minusKey(Lkotlin/c/e$c;)Lkotlin/c/e;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkotlin/c/e$c<",
"*>;)",
"Lkotlin/c/e;"
}
.end annotation
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
const-string v0, "key"
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
const-string v0, "key"
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move-object v0, p0
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
check-cast v0, Lkotlin/c/e$b;
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-static {v0, p1}, Lkotlin/c/e$b$a;->b(Lkotlin/c/e$b;Lkotlin/c/e$c;)Lkotlin/c/e;
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
move-result-object p1
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
return-object p1
.end method
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
.method public p(Ljava/lang/Throwable;)V
.locals 1
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
const-string v0, "exception"
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
throw p1
.end method
.method public plus(Lkotlin/c/e;)Lkotlin/c/e;
.locals 1
const-string v0, "context"
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "context"
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
move-object v0, p0
check-cast v0, Lkotlin/c/e$b;
invoke-static {v0, p1}, Lkotlin/c/e$b$a;->a(Lkotlin/c/e$b;Lkotlin/c/e;)Lkotlin/c/e;
move-result-object p1
return-object p1
.end method
.method public final q(Ljava/lang/Throwable;)Z
.locals 1
const-string v0, "cause"
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
invoke-direct {p0, p1}, Lkotlinx/coroutines/aq;->bM(Ljava/lang/Object;)Z
move-result p1
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
if-eqz p1, :cond_0
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->FX()Z
move-result p1
if-eqz p1, :cond_0
const/4 p1, 0x1
return p1
:cond_0
const/4 p1, 0x0
return p1
.end method
.method public final r(Ljava/lang/Throwable;)Z
.locals 0
invoke-direct {p0, p1}, Lkotlinx/coroutines/aq;->bM(Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_0
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->FX()Z
move-result p1
if-eqz p1, :cond_0
const/4 p1, 0x1
return p1
:cond_0
const/4 p1, 0x0
return p1
.end method
.method protected s(Ljava/lang/Throwable;)V
.locals 1
const-string v0, "exception"
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
return-void
.end method
.method public final start()Z
.locals 6
:goto_0
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->FY()Ljava/lang/Object;
2019-02-04 20:08:30 +00:00
move-result-object v0
2019-02-04 20:29:01 +00:00
instance-of v1, v0, Lkotlinx/coroutines/ab;
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
const/4 v2, -0x1
const/4 v3, 0x0
const/4 v4, 0x1
if-eqz v1, :cond_1
move-object v1, v0
check-cast v1, Lkotlinx/coroutines/ab;
iget-boolean v1, v1, Lkotlinx/coroutines/ab;->bSd:Z
if-nez v1, :cond_3
sget-object v1, Lkotlinx/coroutines/aq;->bSn:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
invoke-static {}, Lkotlinx/coroutines/ar;->Ge()Lkotlinx/coroutines/ab;
move-result-object v5
invoke-virtual {v1, p0, v0, v5}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_0
goto :goto_1
:cond_0
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->Fy()V
const/4 v2, 0x1
goto :goto_1
:cond_1
instance-of v1, v0, Lkotlinx/coroutines/ag;
if-eqz v1, :cond_3
sget-object v1, Lkotlinx/coroutines/aq;->bSn:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
move-object v5, v0
check-cast v5, Lkotlinx/coroutines/ag;
iget-object v5, v5, Lkotlinx/coroutines/ag;->bSi:Lkotlinx/coroutines/au;
invoke-virtual {v1, p0, v0, v5}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-nez v0, :cond_2
goto :goto_1
:cond_2
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->Fy()V
const/4 v2, 0x1
goto :goto_1
2019-02-04 20:08:30 +00:00
:cond_3
2019-02-04 20:29:01 +00:00
const/4 v2, 0x0
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
:goto_1
packed-switch v2, :pswitch_data_0
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
goto :goto_0
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
:pswitch_0
return v4
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
:pswitch_1
return v3
:pswitch_data_0
.packed-switch 0x0
:pswitch_1
:pswitch_0
.end packed-switch
2019-02-04 20:08:30 +00:00
.end method
2019-02-04 20:29:01 +00:00
.method public toString()Ljava/lang/String;
.locals 2
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
new-instance v0, Ljava/lang/StringBuilder;
2019-02-04 20:08:30 +00:00
2019-02-04 20:29:01 +00:00
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->Fz()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const/16 v1, 0x7b
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {p0}, Lkotlinx/coroutines/aq;->FY()Ljava/lang/Object;
move-result-object v1
invoke-static {v1}, Lkotlinx/coroutines/aq;->bQ(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v1, "}@"
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-static {p0}, Lkotlinx/coroutines/s;->bI(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
2019-02-04 20:08:30 +00:00
.end method