.class public final Ls9/d;
.super Lq9/d0;
.source ""

# interfaces
.implements Ld9/d;
.implements Lb9/d;


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


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


# instance fields
.field private volatile synthetic _reusableCancellableContinuation:Ljava/lang/Object;

.field public final u:Lq9/u;

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

.field public w:Ljava/lang/Object;

.field public final x:Ljava/lang/Object;


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

    const-class v0, Ls9/d;

    const-class v1, Ljava/lang/Object;

    const-string v2, "_reusableCancellableContinuation"

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

    return-void
.end method

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

    const/4 v0, -0x1

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

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

    iput-object p2, p0, Ls9/d;->v:Lb9/d;

    .line 1
    sget-object p1, Ls9/e;->a:Lf/o;

    .line 2
    iput-object p1, p0, Ls9/d;->w:Ljava/lang/Object;

    invoke-virtual {p0}, Ls9/d;->getContext()Lb9/f;

    move-result-object p1

    sget-object p2, Ls9/p;->a:Lf/o;

    const/4 p2, 0x0

    .line 3
    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p2

    sget-object v0, Ls9/p$a;->s:Ls9/p$a;

    invoke-interface {p1, p2, v0}, Lb9/f;->fold(Ljava/lang/Object;Lh9/c;)Ljava/lang/Object;

    move-result-object p1

    invoke-static {p1}, Lx/e;->d(Ljava/lang/Object;)V

    .line 4
    iput-object p1, p0, Ls9/d;->x:Ljava/lang/Object;

    const/4 p1, 0x0

    iput-object p1, p0, Ls9/d;->_reusableCancellableContinuation:Ljava/lang/Object;

    return-void
.end method


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

    instance-of v0, p1, Lq9/q;

    if-eqz v0, :cond_b

    check-cast p1, Lq9/q;

    iget-object p1, p1, Lq9/q;->b:Lh9/b;

    invoke-interface {p1, p2}, Lh9/b;->f(Ljava/lang/Object;)Ljava/lang/Object;

    :cond_b
    return-void
.end method

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

    return-object p0
.end method

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

    iget-object v0, p0, Ls9/d;->v: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 8

    iget-object v0, p0, Ls9/d;->v:Lb9/d;

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

    move-result-object v0

    const/4 v1, 0x0

    .line 1
    invoke-static {p1, v1}, Ln/a;->h(Ljava/lang/Object;Lh9/b;)Ljava/lang/Object;

    move-result-object v2

    .line 2
    iget-object v3, p0, Ls9/d;->u:Lq9/u;

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

    move-result v3

    const/4 v4, 0x0

    if-eqz v3, :cond_1e

    iput-object v2, p0, Ls9/d;->w:Ljava/lang/Object;

    iput v4, p0, Lq9/d0;->t:I

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

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

    goto :goto_5b

    :cond_1e
    sget-object v0, Lq9/j1;->a:Lq9/j1;

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

    move-result-object v0

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

    move-result v3

    if-eqz v3, :cond_32

    iput-object v2, p0, Ls9/d;->w:Ljava/lang/Object;

    iput v4, p0, Lq9/d0;->t:I

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

    goto :goto_5b

    :cond_32
    const/4 v2, 0x1

    invoke-virtual {v0, v2}, Lq9/i0;->d0(Z)V

    :try_start_36
    invoke-virtual {p0}, Ls9/d;->getContext()Lb9/f;

    move-result-object v3

    iget-object v4, p0, Ls9/d;->x:Ljava/lang/Object;

    invoke-static {v3, v4}, Ls9/p;->b(Lb9/f;Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v4
    :try_end_40
    .catchall {:try_start_36 .. :try_end_40} :catchall_54

    :try_start_40
    iget-object v5, p0, Ls9/d;->v:Lb9/d;

    invoke-interface {v5, p1}, Lb9/d;->g(Ljava/lang/Object;)V
    :try_end_45
    .catchall {:try_start_40 .. :try_end_45} :catchall_4f

    :try_start_45
    invoke-static {v3, v4}, Ls9/p;->a(Lb9/f;Ljava/lang/Object;)V

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

    move-result p1

    if-nez p1, :cond_48

    goto :goto_58

    :catchall_4f
    move-exception p1

    invoke-static {v3, v4}, Ls9/p;->a(Lb9/f;Ljava/lang/Object;)V

    throw p1
    :try_end_54
    .catchall {:try_start_45 .. :try_end_54} :catchall_54

    :catchall_54
    move-exception p1

    :try_start_55
    invoke-virtual {p0, p1, v1}, Lq9/d0;->e(Ljava/lang/Throwable;Ljava/lang/Throwable;)V
    :try_end_58
    .catchall {:try_start_55 .. :try_end_58} :catchall_5c

    :goto_58
    invoke-virtual {v0, v2}, Lq9/i0;->a0(Z)V

    :goto_5b
    return-void

    :catchall_5c
    move-exception p1

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

    throw p1
.end method

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

    iget-object v0, p0, Ls9/d;->v:Lb9/d;

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

    move-result-object v0

    return-object v0
.end method

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

    iget-object v0, p0, Ls9/d;->w:Ljava/lang/Object;

    .line 1
    sget-object v1, Ls9/e;->a:Lf/o;

    .line 2
    iput-object v1, p0, Ls9/d;->w:Ljava/lang/Object;

    return-object v0
.end method

.method public final i(Lq9/g;)Z
    .registers 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lq9/g<",
            "*>;)Z"
        }
    .end annotation

    iget-object v0, p0, Ls9/d;->_reusableCancellableContinuation:Ljava/lang/Object;

    const/4 v1, 0x0

    if-nez v0, :cond_6

    return v1

    :cond_6
    instance-of v2, v0, Lq9/g;

    const/4 v3, 0x1

    if-eqz v2, :cond_f

    if-ne v0, p1, :cond_e

    move v1, v3

    :cond_e
    return v1

    :cond_f
    return v3
.end method

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

    :cond_0
    iget-object v0, p0, Ls9/d;->_reusableCancellableContinuation:Ljava/lang/Object;

    sget-object v1, Ls9/e;->b:Lf/o;

    invoke-static {v0, v1}, Lx/e;->a(Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result v2

    const/4 v3, 0x1

    if-eqz v2, :cond_14

    sget-object v0, Ls9/d;->y:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;

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

    move-result v0

    if-eqz v0, :cond_0

    return v3

    :cond_14
    instance-of v1, v0, Ljava/lang/Throwable;

    if-eqz v1, :cond_19

    return v3

    :cond_19
    sget-object v1, Ls9/d;->y:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;

    const/4 v2, 0x0

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

    move-result v0

    if-eqz v0, :cond_0

    const/4 p1, 0x0

    return p1
.end method

.method public final k()V
    .registers 3

    .line 1
    :cond_0
    iget-object v0, p0, Ls9/d;->_reusableCancellableContinuation:Ljava/lang/Object;

    sget-object v1, Ls9/e;->b:Lf/o;

    if-eq v0, v1, :cond_0

    .line 2
    iget-object v0, p0, Ls9/d;->_reusableCancellableContinuation:Ljava/lang/Object;

    instance-of v1, v0, Lq9/g;

    if-eqz v1, :cond_f

    check-cast v0, Lq9/g;

    goto :goto_10

    :cond_f
    const/4 v0, 0x0

    :goto_10
    if-nez v0, :cond_13

    goto :goto_16

    .line 3
    :cond_13
    invoke-virtual {v0}, Lq9/g;->n()V

    :goto_16
    return-void
.end method

.method public final l(Lq9/f;)Ljava/lang/Throwable;
    .registers 5
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lq9/f<",
            "*>;)",
            "Ljava/lang/Throwable;"
        }
    .end annotation

    :cond_0
    iget-object v0, p0, Ls9/d;->_reusableCancellableContinuation:Ljava/lang/Object;

    sget-object v1, Ls9/e;->b:Lf/o;

    const/4 v2, 0x0

    if-ne v0, v1, :cond_10

    sget-object v0, Ls9/d;->y:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;

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

    move-result v0

    if-eqz v0, :cond_0

    return-object v2

    :cond_10
    instance-of p1, v0, Ljava/lang/Throwable;

    if-eqz p1, :cond_2b

    sget-object p1, Ls9/d;->y:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;

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

    move-result p1

    if-eqz p1, :cond_1f

    check-cast v0, Ljava/lang/Throwable;

    return-object v0

    :cond_1f
    new-instance p1, Ljava/lang/IllegalArgumentException;

    const-string v0, "Failed requirement."

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

    move-result-object v0

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

    throw p1

    :cond_2b
    const-string p1, "Inconsistent state "

    invoke-static {p1, v0}, Lx/e;->k(Ljava/lang/String;Ljava/lang/Object;)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

    throw v0
.end method

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

    const-string v0, "DispatchedContinuation["

    invoke-static {v0}, Landroidx/activity/c;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

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

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

    const-string v1, ", "

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

    iget-object v1, p0, Ls9/d;->v: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/16 v1, 0x5d

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

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

    move-result-object v0

    return-object v0
.end method
