.class public Lq9/g;
.super Lq9/d0;
.source ""

# interfaces
.implements Lq9/f;
.implements Ld9/d;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<T:",
        "Ljava/lang/Object;",
        ">",
        "Lq9/d0<",
        "TT;>;",
        "Lq9/f<",
        "TT;>;",
        "Ld9/d;"
    }
.end annotation


# static fields
.field public static final synthetic x:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;

.field public static final synthetic y:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;


# instance fields
.field private volatile synthetic _decision:I

.field private volatile synthetic _state:Ljava/lang/Object;

.field public final u:Lb9/d;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lb9/d<",
            "TT;>;"
        }
    .end annotation
.end field

.field public final v:Lb9/f;

.field public w:Lq9/f0;


# direct methods
.method public static constructor <clinit>()V
    .registers 3

    const-class v0, Lq9/g;

    const-string v1, "_decision"

    invoke-static {v0, v1}, Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;->newUpdater(Ljava/lang/Class;Ljava/lang/String;)Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;

    move-result-object v0

    sput-object v0, Lq9/g;->x:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;

    const-class v0, Lq9/g;

    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, Lq9/g;->y:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;

    return-void
.end method

.method public constructor <init>(Lb9/d;I)V
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lb9/d<",
            "-TT;>;I)V"
        }
    .end annotation

    invoke-direct {p0, p2}, Lq9/d0;-><init>(I)V

    iput-object p1, p0, Lq9/g;->u:Lb9/d;

    invoke-interface {p1}, Lb9/d;->getContext()Lb9/f;

    move-result-object p1

    iput-object p1, p0, Lq9/g;->v:Lb9/f;

    const/4 p1, 0x0

    iput p1, p0, Lq9/g;->_decision:I

    sget-object p1, Lq9/b;->r:Lq9/b;

    iput-object p1, p0, Lq9/g;->_state:Ljava/lang/Object;

    return-void
.end method

.method public static x(Lq9/g;Ljava/lang/Object;ILh9/b;ILjava/lang/Object;)V
    .registers 14

    const/4 p3, 0x0

    :goto_1
    const/4 v3, 0x0

    .line 1
    iget-object p4, p0, Lq9/g;->_state:Ljava/lang/Object;

    instance-of p5, p4, Lq9/e1;

    if-eqz p5, :cond_41

    move-object p5, p4

    check-cast p5, Lq9/e1;

    .line 2
    instance-of v0, p1, Lq9/p;

    if-eqz v0, :cond_10

    goto :goto_30

    :cond_10
    invoke-static {p2}, Le/d;->b(I)Z

    move-result v0

    if-nez v0, :cond_17

    goto :goto_30

    :cond_17
    instance-of v0, p5, Lq9/d;

    if-eqz v0, :cond_30

    new-instance v7, Lq9/o;

    instance-of v0, p5, Lq9/d;

    if-eqz v0, :cond_25

    check-cast p5, Lq9/d;

    move-object v2, p5

    goto :goto_26

    :cond_25
    move-object v2, p3

    :goto_26
    const/4 v5, 0x0

    const/16 v6, 0x10

    const/4 v4, 0x0

    move-object v0, v7

    move-object v1, p1

    invoke-direct/range {v0 .. v6}, Lq9/o;-><init>(Ljava/lang/Object;Lq9/d;Lh9/b;Ljava/lang/Object;Ljava/lang/Throwable;I)V

    goto :goto_31

    :cond_30
    :goto_30
    move-object v7, p1

    .line 3
    :goto_31
    sget-object p5, Lq9/g;->y:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;

    invoke-virtual {p5, p0, p4, v7}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result p4

    if-nez p4, :cond_3a

    goto :goto_1

    :cond_3a
    invoke-virtual {p0}, Lq9/g;->o()V

    invoke-virtual {p0, p2}, Lq9/g;->p(I)V

    goto :goto_54

    :cond_41
    instance-of p0, p4, Lq9/h;

    if-eqz p0, :cond_55

    check-cast p4, Lq9/h;

    invoke-static {p4}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 4
    sget-object p0, Lq9/h;->c:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;

    const/4 p2, 0x0

    const/4 p3, 0x1

    invoke-virtual {p0, p4, p2, p3}, Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;->compareAndSet(Ljava/lang/Object;II)Z

    move-result p0

    if-eqz p0, :cond_55

    :goto_54
    return-void

    :cond_55
    const-string p0, "Already resumed, but proposed with update "

    .line 5
    invoke-static {p0, p1}, Lx/e;->k(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p0

    new-instance p1, Ljava/lang/IllegalStateException;

    invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object p0

    invoke-direct {p1, p0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw p1
.end method


# virtual methods
.method public a(Ljava/lang/Object;Ljava/lang/Throwable;)V
    .registers 12

    :cond_0
    iget-object p1, p0, Lq9/g;->_state:Ljava/lang/Object;

    instance-of v0, p1, Lq9/e1;

    if-nez v0, :cond_64

    instance-of v0, p1, Lq9/p;

    if-eqz v0, :cond_b

    return-void

    :cond_b
    instance-of v0, p1, Lq9/o;

    if-eqz v0, :cond_4e

    move-object v0, p1

    check-cast v0, Lq9/o;

    .line 1
    iget-object v1, v0, Lq9/o;->e:Ljava/lang/Throwable;

    const/4 v2, 0x1

    if-eqz v1, :cond_19

    move v1, v2

    goto :goto_1a

    :cond_19
    const/4 v1, 0x0

    :goto_1a
    xor-int/2addr v1, v2

    if-eqz v1, :cond_42

    const/4 v2, 0x0

    const/4 v3, 0x0

    const/4 v4, 0x0

    const/4 v5, 0x0

    const/16 v7, 0xf

    move-object v1, v0

    move-object v6, p2

    .line 2
    invoke-static/range {v1 .. v7}, Lq9/o;->a(Lq9/o;Ljava/lang/Object;Lq9/d;Lh9/b;Ljava/lang/Object;Ljava/lang/Throwable;I)Lq9/o;

    move-result-object v1

    sget-object v2, Lq9/g;->y:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;

    invoke-virtual {v2, p0, p1, v1}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_0

    .line 3
    iget-object p1, v0, Lq9/o;->b:Lq9/d;

    if-nez p1, :cond_36

    goto :goto_39

    :cond_36
    invoke-virtual {p0, p1, p2}, Lq9/g;->j(Lq9/d;Ljava/lang/Throwable;)V

    :goto_39
    iget-object p1, v0, Lq9/o;->c:Lh9/b;

    if-nez p1, :cond_3e

    goto :goto_41

    :cond_3e
    invoke-virtual {p0, p1, p2}, Lq9/g;->k(Lh9/b;Ljava/lang/Throwable;)V

    :goto_41
    return-void

    .line 4
    :cond_42
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string p2, "Must be called at most once"

    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

    throw p1

    :cond_4e
    sget-object v7, Lq9/g;->y:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;

    new-instance v8, Lq9/o;

    const/4 v2, 0x0

    const/4 v3, 0x0

    const/4 v4, 0x0

    const/16 v6, 0xe

    move-object v0, v8

    move-object v1, p1

    move-object v5, p2

    invoke-direct/range {v0 .. v6}, Lq9/o;-><init>(Ljava/lang/Object;Lq9/d;Lh9/b;Ljava/lang/Object;Ljava/lang/Throwable;I)V

    invoke-virtual {v7, p0, p1, v8}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result p1

    if-eqz p1, :cond_0

    return-void

    :cond_64
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string p2, "Not completed"

    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

    throw p1
.end method

.method public final b()Lb9/d;
    .registers 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Lb9/d<",
            "TT;>;"
        }
    .end annotation

    iget-object v0, p0, Lq9/g;->u:Lb9/d;

    return-object v0
.end method

.method public c(Ljava/lang/Object;)Ljava/lang/Throwable;
    .registers 2

    invoke-super {p0, p1}, Lq9/d0;->c(Ljava/lang/Object;)Ljava/lang/Throwable;

    move-result-object p1

    if-nez p1, :cond_7

    const/4 p1, 0x0

    :cond_7
    return-object p1
.end method

.method public d(Ljava/lang/Object;)Ljava/lang/Object;
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<T:",
            "Ljava/lang/Object;",
            ">(",
            "Ljava/lang/Object;",
            ")TT;"
        }
    .end annotation

    instance-of v0, p1, Lq9/o;

    if-eqz v0, :cond_8

    check-cast p1, Lq9/o;

    iget-object p1, p1, Lq9/o;->a:Ljava/lang/Object;

    :cond_8
    return-object p1
.end method

.method public f()Ld9/d;
    .registers 3

    iget-object v0, p0, Lq9/g;->u:Lb9/d;

    instance-of v1, v0, Ld9/d;

    if-eqz v1, :cond_9

    check-cast v0, Ld9/d;

    goto :goto_a

    :cond_9
    const/4 v0, 0x0

    :goto_a
    return-object v0
.end method

.method public g(Ljava/lang/Object;)V
    .registers 11

    .line 1
    invoke-static {p1}, Ly8/f;->b(Ljava/lang/Object;)Ljava/lang/Throwable;

    move-result-object v0

    if-nez v0, :cond_7

    goto :goto_e

    :cond_7
    new-instance p1, Lq9/p;

    const/4 v1, 0x0

    const/4 v2, 0x2

    invoke-direct {p1, v0, v1, v2}, Lq9/p;-><init>(Ljava/lang/Throwable;ZI)V

    :goto_e
    move-object v4, p1

    .line 2
    iget v5, p0, Lq9/d0;->t:I

    const/4 v6, 0x0

    const/4 v7, 0x4

    const/4 v8, 0x0

    move-object v3, p0

    invoke-static/range {v3 .. v8}, Lq9/g;->x(Lq9/g;Ljava/lang/Object;ILh9/b;ILjava/lang/Object;)V

    return-void
.end method

.method public getContext()Lb9/f;
    .registers 2

    iget-object v0, p0, Lq9/g;->v:Lb9/f;

    return-object v0
.end method

.method public h()Ljava/lang/Object;
    .registers 2

    .line 1
    iget-object v0, p0, Lq9/g;->_state:Ljava/lang/Object;

    return-object v0
.end method

.method public final i(Lh9/b;Ljava/lang/Throwable;)V
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lh9/b<",
            "-",
            "Ljava/lang/Throwable;",
            "Ly8/k;",
            ">;",
            "Ljava/lang/Throwable;",
            ")V"
        }
    .end annotation

    :try_start_0
    invoke-interface {p1, p2}, Lh9/b;->f(Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_3
    .catchall {:try_start_0 .. :try_end_3} :catchall_4

    goto :goto_15

    :catchall_4
    move-exception p1

    .line 1
    iget-object p2, p0, Lq9/g;->v:Lb9/f;

    .line 2
    new-instance v0, Lg1/c;

    const-string v1, "Exception in invokeOnCancellation handler for "

    invoke-static {v1, p0}, Lx/e;->k(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1, p1}, Lg1/c;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V

    invoke-static {p2, v0}, Lo/b;->b(Lb9/f;Ljava/lang/Throwable;)V

    :goto_15
    return-void
.end method

.method public final j(Lq9/d;Ljava/lang/Throwable;)V
    .registers 5

    :try_start_0
    invoke-virtual {p1, p2}, Lq9/e;->a(Ljava/lang/Throwable;)V
    :try_end_3
    .catchall {:try_start_0 .. :try_end_3} :catchall_4

    goto :goto_15

    :catchall_4
    move-exception p1

    .line 1
    iget-object p2, p0, Lq9/g;->v:Lb9/f;

    .line 2
    new-instance v0, Lg1/c;

    const-string v1, "Exception in invokeOnCancellation handler for "

    invoke-static {v1, p0}, Lx/e;->k(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1, p1}, Lg1/c;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V

    invoke-static {p2, v0}, Lo/b;->b(Lb9/f;Ljava/lang/Throwable;)V

    :goto_15
    return-void
.end method

.method public final k(Lh9/b;Ljava/lang/Throwable;)V
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lh9/b<",
            "-",
            "Ljava/lang/Throwable;",
            "Ly8/k;",
            ">;",
            "Ljava/lang/Throwable;",
            ")V"
        }
    .end annotation

    :try_start_0
    invoke-interface {p1, p2}, Lh9/b;->f(Ljava/lang/Object;)Ljava/lang/Object;
    :try_end_3
    .catchall {:try_start_0 .. :try_end_3} :catchall_4

    goto :goto_15

    :catchall_4
    move-exception p1

    .line 1
    iget-object p2, p0, Lq9/g;->v:Lb9/f;

    .line 2
    new-instance v0, Lg1/c;

    const-string v1, "Exception in resume onCancellation handler for "

    invoke-static {v1, p0}, Lx/e;->k(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1, p1}, Lg1/c;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V

    invoke-static {p2, v0}, Lo/b;->b(Lb9/f;Ljava/lang/Throwable;)V

    :goto_15
    return-void
.end method

.method public l(Ljava/lang/Throwable;)Z
    .registers 6

    :goto_0
    iget-object v0, p0, Lq9/g;->_state:Ljava/lang/Object;

    instance-of v1, v0, Lq9/e1;

    if-nez v1, :cond_8

    const/4 p1, 0x0

    return p1

    :cond_8
    new-instance v1, Lq9/h;

    instance-of v2, v0, Lq9/d;

    invoke-direct {v1, p0, p1, v2}, Lq9/h;-><init>(Lb9/d;Ljava/lang/Throwable;Z)V

    sget-object v3, Lq9/g;->y:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;

    invoke-virtual {v3, p0, v0, v1}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_18

    goto :goto_0

    :cond_18
    if-eqz v2, :cond_1d

    check-cast v0, Lq9/d;

    goto :goto_1e

    :cond_1d
    const/4 v0, 0x0

    :goto_1e
    if-nez v0, :cond_21

    goto :goto_24

    :cond_21
    invoke-virtual {p0, v0, p1}, Lq9/g;->j(Lq9/d;Ljava/lang/Throwable;)V

    :goto_24
    invoke-virtual {p0}, Lq9/g;->o()V

    iget p1, p0, Lq9/d0;->t:I

    invoke-virtual {p0, p1}, Lq9/g;->p(I)V

    const/4 p1, 0x1

    return p1
.end method

.method public m(Lq9/u;Ljava/lang/Object;)V
    .registers 9
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lq9/u;",
            "TT;)V"
        }
    .end annotation

    iget-object v0, p0, Lq9/g;->u:Lb9/d;

    instance-of v1, v0, Ls9/d;

    const/4 v2, 0x0

    if-eqz v1, :cond_a

    check-cast v0, Ls9/d;

    goto :goto_b

    :cond_a
    move-object v0, v2

    :goto_b
    if-nez v0, :cond_e

    goto :goto_10

    :cond_e
    iget-object v2, v0, Ls9/d;->u:Lq9/u;

    :goto_10
    if-ne v2, p1, :cond_14

    const/4 p1, 0x4

    goto :goto_16

    :cond_14
    iget p1, p0, Lq9/d0;->t:I

    :goto_16
    move v2, p1

    const/4 v3, 0x0

    const/4 v4, 0x4

    const/4 v5, 0x0

    move-object v0, p0

    move-object v1, p2

    invoke-static/range {v0 .. v5}, Lq9/g;->x(Lq9/g;Ljava/lang/Object;ILh9/b;ILjava/lang/Object;)V

    return-void
.end method

.method public final n()V
    .registers 2

    iget-object v0, p0, Lq9/g;->w:Lq9/f0;

    if-nez v0, :cond_5

    return-void

    :cond_5
    invoke-interface {v0}, Lq9/f0;->c()V

    sget-object v0, Lq9/d1;->r:Lq9/d1;

    iput-object v0, p0, Lq9/g;->w:Lq9/f0;

    return-void
.end method

.method public final o()V
    .registers 2

    invoke-virtual {p0}, Lq9/g;->u()Z

    move-result v0

    if-nez v0, :cond_9

    invoke-virtual {p0}, Lq9/g;->n()V

    :cond_9
    return-void
.end method

.method public final p(I)V
    .registers 6

    .line 1
    :cond_0
    iget v0, p0, Lq9/g;->_decision:I

    const/4 v1, 0x1

    const/4 v2, 0x0

    if-eqz v0, :cond_16

    if-ne v0, v1, :cond_a

    move v0, v2

    goto :goto_20

    :cond_a
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string v0, "Already resumed"

    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

    throw p1

    :cond_16
    sget-object v0, Lq9/g;->x:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;

    const/4 v3, 0x2

    invoke-virtual {v0, p0, v2, v3}, Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;->compareAndSet(Ljava/lang/Object;II)Z

    move-result v0

    if-eqz v0, :cond_0

    move v0, v1

    :goto_20
    if-eqz v0, :cond_23

    return-void

    .line 2
    :cond_23
    invoke-virtual {p0}, Lq9/d0;->b()Lb9/d;

    move-result-object v0

    const/4 v3, 0x4

    if-ne p1, v3, :cond_2b

    move v2, v1

    :cond_2b
    if-nez v2, :cond_7f

    instance-of v3, v0, Ls9/d;

    if-eqz v3, :cond_7f

    invoke-static {p1}, Le/d;->b(I)Z

    move-result p1

    iget v3, p0, Lq9/d0;->t:I

    invoke-static {v3}, Le/d;->b(I)Z

    move-result v3

    if-ne p1, v3, :cond_7f

    move-object p1, v0

    check-cast p1, Ls9/d;

    iget-object p1, p1, Ls9/d;->u:Lq9/u;

    invoke-interface {v0}, Lb9/d;->getContext()Lb9/f;

    move-result-object v0

    invoke-virtual {p1, v0}, Lq9/u;->Z(Lb9/f;)Z

    move-result v2

    if-eqz v2, :cond_50

    invoke-virtual {p1, v0, p0}, Lq9/u;->Y(Lb9/f;Ljava/lang/Runnable;)V

    goto :goto_82

    .line 3
    :cond_50
    sget-object p1, Lq9/j1;->a:Lq9/j1;

    invoke-static {}, Lq9/j1;->a()Lq9/i0;

    move-result-object p1

    invoke-virtual {p1}, Lq9/i0;->e0()Z

    move-result v0

    if-eqz v0, :cond_60

    invoke-virtual {p1, p0}, Lq9/i0;->c0(Lq9/d0;)V

    goto :goto_82

    :cond_60
    invoke-virtual {p1, v1}, Lq9/i0;->d0(Z)V

    :try_start_63
    invoke-virtual {p0}, Lq9/d0;->b()Lb9/d;

    move-result-object v0

    invoke-static {p0, v0, v1}, Le/d;->c(Lq9/d0;Lb9/d;Z)V

    :cond_6a
    invoke-virtual {p1}, Lq9/i0;->f0()Z

    move-result v0
    :try_end_6e
    .catchall {:try_start_63 .. :try_end_6e} :catchall_71

    if-nez v0, :cond_6a

    goto :goto_76

    :catchall_71
    move-exception v0

    const/4 v2, 0x0

    :try_start_73
    invoke-virtual {p0, v0, v2}, Lq9/d0;->e(Ljava/lang/Throwable;Ljava/lang/Throwable;)V
    :try_end_76
    .catchall {:try_start_73 .. :try_end_76} :catchall_7a

    :goto_76
    invoke-virtual {p1, v1}, Lq9/i0;->a0(Z)V

    goto :goto_82

    :catchall_7a
    move-exception v0

    invoke-virtual {p1, v1}, Lq9/i0;->a0(Z)V

    throw v0

    .line 4
    :cond_7f
    invoke-static {p0, v0, v2}, Le/d;->c(Lq9/d0;Lb9/d;Z)V

    :goto_82
    return-void
.end method

.method public final q()Ljava/lang/Object;
    .registers 5

    invoke-virtual {p0}, Lq9/g;->u()Z

    move-result v0

    .line 1
    :cond_4
    iget v1, p0, Lq9/g;->_decision:I

    const/4 v2, 0x0

    if-eqz v1, :cond_19

    const/4 v3, 0x2

    if-ne v1, v3, :cond_d

    goto :goto_23

    :cond_d
    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "Already suspended"

    invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0

    :cond_19
    sget-object v1, Lq9/g;->x:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;

    const/4 v3, 0x1

    invoke-virtual {v1, p0, v2, v3}, Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;->compareAndSet(Ljava/lang/Object;II)Z

    move-result v1

    if-eqz v1, :cond_4

    move v2, v3

    :goto_23
    if-eqz v2, :cond_34

    .line 2
    iget-object v1, p0, Lq9/g;->w:Lq9/f0;

    if-nez v1, :cond_2c

    invoke-virtual {p0}, Lq9/g;->s()Lq9/f0;

    :cond_2c
    if-eqz v0, :cond_31

    invoke-virtual {p0}, Lq9/g;->w()V

    :cond_31
    sget-object v0, Lc9/a;->r:Lc9/a;

    return-object v0

    :cond_34
    if-eqz v0, :cond_39

    invoke-virtual {p0}, Lq9/g;->w()V

    .line 3
    :cond_39
    iget-object v0, p0, Lq9/g;->_state:Ljava/lang/Object;

    .line 4
    instance-of v1, v0, Lq9/p;

    if-nez v1, :cond_69

    iget v1, p0, Lq9/d0;->t:I

    invoke-static {v1}, Le/d;->b(I)Z

    move-result v1

    if-eqz v1, :cond_64

    .line 5
    iget-object v1, p0, Lq9/g;->v:Lb9/f;

    .line 6
    sget v2, Lq9/t0;->m:I

    sget-object v2, Lq9/t0$b;->r:Lq9/t0$b;

    invoke-interface {v1, v2}, Lb9/f;->get(Lb9/f$b;)Lb9/f$a;

    move-result-object v1

    check-cast v1, Lq9/t0;

    if-eqz v1, :cond_64

    invoke-interface {v1}, Lq9/t0;->b()Z

    move-result v2

    if-eqz v2, :cond_5c

    goto :goto_64

    :cond_5c
    invoke-interface {v1}, Lq9/t0;->I()Ljava/util/concurrent/CancellationException;

    move-result-object v1

    invoke-virtual {p0, v0, v1}, Lq9/g;->a(Ljava/lang/Object;Ljava/lang/Throwable;)V

    throw v1

    :cond_64
    :goto_64
    invoke-virtual {p0, v0}, Lq9/g;->d(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    return-object v0

    :cond_69
    check-cast v0, Lq9/p;

    iget-object v0, v0, Lq9/p;->a:Ljava/lang/Throwable;

    throw v0
.end method

.method public r()V
    .registers 3

    invoke-virtual {p0}, Lq9/g;->s()Lq9/f0;

    move-result-object v0

    if-nez v0, :cond_7

    return-void

    .line 1
    :cond_7
    iget-object v1, p0, Lq9/g;->_state:Ljava/lang/Object;

    .line 2
    instance-of v1, v1, Lq9/e1;

    xor-int/lit8 v1, v1, 0x1

    if-eqz v1, :cond_16

    .line 3
    invoke-interface {v0}, Lq9/f0;->c()V

    sget-object v0, Lq9/d1;->r:Lq9/d1;

    iput-object v0, p0, Lq9/g;->w:Lq9/f0;

    :cond_16
    return-void
.end method

.method public final s()Lq9/f0;
    .registers 8

    .line 1
    iget-object v0, p0, Lq9/g;->v:Lb9/f;

    .line 2
    sget v1, Lq9/t0;->m:I

    sget-object v1, Lq9/t0$b;->r:Lq9/t0$b;

    invoke-interface {v0, v1}, Lb9/f;->get(Lb9/f$b;)Lb9/f$a;

    move-result-object v0

    move-object v1, v0

    check-cast v1, Lq9/t0;

    if-nez v1, :cond_11

    const/4 v0, 0x0

    return-object v0

    :cond_11
    const/4 v2, 0x1

    const/4 v3, 0x0

    new-instance v4, Lq9/i;

    invoke-direct {v4, p0}, Lq9/i;-><init>(Lq9/g;)V

    const/4 v5, 0x2

    const/4 v6, 0x0

    invoke-static/range {v1 .. v6}, Lq9/t0$a;->a(Lq9/t0;ZZLh9/b;ILjava/lang/Object;)Lq9/f0;

    move-result-object v0

    iput-object v0, p0, Lq9/g;->w:Lq9/f0;

    return-object v0
.end method

.method public t(Lh9/b;)V
    .registers 12
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lh9/b<",
            "-",
            "Ljava/lang/Throwable;",
            "Ly8/k;",
            ">;)V"
        }
    .end annotation

    .line 1
    instance-of v0, p1, Lq9/d;

    if-eqz v0, :cond_8

    move-object v0, p1

    check-cast v0, Lq9/d;

    goto :goto_d

    :cond_8
    new-instance v0, Lq9/g0;

    invoke-direct {v0, p1}, Lq9/g0;-><init>(Lh9/b;)V

    .line 2
    :cond_d
    :goto_d
    iget-object v8, p0, Lq9/g;->_state:Ljava/lang/Object;

    instance-of v1, v8, Lq9/b;

    if-eqz v1, :cond_1c

    sget-object v1, Lq9/g;->y:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;

    invoke-virtual {v1, p0, v8, v0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_d

    return-void

    :cond_1c
    instance-of v1, v8, Lq9/d;

    const/4 v2, 0x0

    if-nez v1, :cond_8f

    instance-of v1, v8, Lq9/p;

    const/4 v3, 0x1

    const/4 v4, 0x0

    if-eqz v1, :cond_4a

    move-object v0, v8

    check-cast v0, Lq9/p;

    invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 3
    sget-object v5, Lq9/p;->b:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;

    invoke-virtual {v5, v0, v4, v3}, Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;->compareAndSet(Ljava/lang/Object;II)Z

    move-result v3

    if-eqz v3, :cond_46

    .line 4
    instance-of v3, v8, Lq9/h;

    if-eqz v3, :cond_45

    if-eqz v1, :cond_3c

    goto :goto_3d

    :cond_3c
    move-object v0, v2

    :goto_3d
    if-nez v0, :cond_40

    goto :goto_42

    :cond_40
    iget-object v2, v0, Lq9/p;->a:Ljava/lang/Throwable;

    :goto_42
    invoke-virtual {p0, p1, v2}, Lq9/g;->i(Lh9/b;Ljava/lang/Throwable;)V

    :cond_45
    return-void

    :cond_46
    invoke-virtual {p0, p1, v8}, Lq9/g;->v(Lh9/b;Ljava/lang/Object;)V

    throw v2

    :cond_4a
    instance-of v1, v8, Lq9/o;

    if-eqz v1, :cond_79

    move-object v1, v8

    check-cast v1, Lq9/o;

    iget-object v5, v1, Lq9/o;->b:Lq9/d;

    if-nez v5, :cond_75

    .line 5
    iget-object v2, v1, Lq9/o;->e:Ljava/lang/Throwable;

    if-eqz v2, :cond_5a

    goto :goto_5b

    :cond_5a
    move v3, v4

    :goto_5b
    if-eqz v3, :cond_61

    .line 6
    invoke-virtual {p0, p1, v2}, Lq9/g;->i(Lh9/b;Ljava/lang/Throwable;)V

    return-void

    :cond_61
    const/4 v2, 0x0

    const/4 v4, 0x0

    const/4 v5, 0x0

    const/4 v6, 0x0

    const/16 v7, 0x1d

    move-object v3, v0

    invoke-static/range {v1 .. v7}, Lq9/o;->a(Lq9/o;Ljava/lang/Object;Lq9/d;Lh9/b;Ljava/lang/Object;Ljava/lang/Throwable;I)Lq9/o;

    move-result-object v1

    sget-object v2, Lq9/g;->y:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;

    invoke-virtual {v2, p0, v8, v1}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_d

    return-void

    :cond_75
    invoke-virtual {p0, p1, v8}, Lq9/g;->v(Lh9/b;Ljava/lang/Object;)V

    throw v2

    :cond_79
    new-instance v9, Lq9/o;

    const/4 v4, 0x0

    const/4 v5, 0x0

    const/4 v6, 0x0

    const/16 v7, 0x1c

    move-object v1, v9

    move-object v2, v8

    move-object v3, v0

    invoke-direct/range {v1 .. v7}, Lq9/o;-><init>(Ljava/lang/Object;Lq9/d;Lh9/b;Ljava/lang/Object;Ljava/lang/Throwable;I)V

    sget-object v1, Lq9/g;->y:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;

    invoke-virtual {v1, p0, v8, v9}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_d

    return-void

    :cond_8f
    invoke-virtual {p0, p1, v8}, Lq9/g;->v(Lh9/b;Ljava/lang/Object;)V

    throw v2
.end method

.method public toString()Ljava/lang/String;
    .registers 4

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "CancellableContinuation"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const/16 v1, 0x28

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    iget-object v1, p0, Lq9/g;->u:Lb9/d;

    invoke-static {v1}, Lp/f;->n(Lb9/d;)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;

    .line 1
    iget-object v1, p0, Lq9/g;->_state:Ljava/lang/Object;

    .line 2
    instance-of v2, v1, Lq9/e1;

    if-eqz v2, :cond_26

    const-string v1, "Active"

    goto :goto_2f

    :cond_26
    instance-of v1, v1, Lq9/h;

    if-eqz v1, :cond_2d

    const-string v1, "Cancelled"

    goto :goto_2f

    :cond_2d
    const-string v1, "Completed"

    .line 3
    :goto_2f
    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}, Lp/f;->h(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
.end method

.method public final u()Z
    .registers 3

    iget-object v0, p0, Lq9/g;->u:Lb9/d;

    instance-of v1, v0, Ls9/d;

    if-eqz v1, :cond_10

    check-cast v0, Ls9/d;

    invoke-virtual {v0, p0}, Ls9/d;->i(Lq9/g;)Z

    move-result v0

    if-eqz v0, :cond_10

    const/4 v0, 0x1

    goto :goto_11

    :cond_10
    const/4 v0, 0x0

    :goto_11
    return v0
.end method

.method public final v(Lh9/b;Ljava/lang/Object;)V
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lh9/b<",
            "-",
            "Ljava/lang/Throwable;",
            "Ly8/k;",
            ">;",
            "Ljava/lang/Object;",
            ")V"
        }
    .end annotation

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "It\'s prohibited to register multiple handlers, tried to register "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string p1, ", already has "

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    new-instance p2, Ljava/lang/IllegalStateException;

    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {p2, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw p2
.end method

.method public final w()V
    .registers 4

    iget-object v0, p0, Lq9/g;->u:Lb9/d;

    instance-of v1, v0, Ls9/d;

    const/4 v2, 0x0

    if-eqz v1, :cond_a

    check-cast v0, Ls9/d;

    goto :goto_b

    :cond_a
    move-object v0, v2

    :goto_b
    if-nez v0, :cond_e

    goto :goto_12

    :cond_e
    invoke-virtual {v0, p0}, Ls9/d;->l(Lq9/f;)Ljava/lang/Throwable;

    move-result-object v2

    :goto_12
    if-nez v2, :cond_15

    return-void

    :cond_15
    invoke-virtual {p0}, Lq9/g;->n()V

    invoke-virtual {p0, v2}, Lq9/g;->l(Ljava/lang/Throwable;)Z

    return-void
.end method
