.class public abstract Lw1/a;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Lq7/a;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lw1/a$h;,
        Lw1/a$f;,
        Lw1/a$b;,
        Lw1/a$g;,
        Lw1/a$c;,
        Lw1/a$d;,
        Lw1/a$e;,
        Lw1/a$i;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "<V:",
        "Ljava/lang/Object;",
        ">",
        "Ljava/lang/Object;",
        "Lq7/a<",
        "TV;>;"
    }
.end annotation


# static fields
.field public static final u:Z

.field public static final v:Ljava/util/logging/Logger;

.field public static final w:Lw1/a$b;

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


# instance fields
.field public volatile r:Ljava/lang/Object;

.field public volatile s:Lw1/a$e;

.field public volatile t:Lw1/a$i;


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

    const-class v0, Lw1/a$i;

    const-string v1, "guava.concurrent.generate_cancellation_cause"

    const-string v2, "false"

    invoke-static {v1, v2}, Ljava/lang/System;->getProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Ljava/lang/Boolean;->parseBoolean(Ljava/lang/String;)Z

    move-result v1

    sput-boolean v1, Lw1/a;->u:Z

    const-class v1, Lw1/a;

    invoke-virtual {v1}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Ljava/util/logging/Logger;->getLogger(Ljava/lang/String;)Ljava/util/logging/Logger;

    move-result-object v1

    sput-object v1, Lw1/a;->v:Ljava/util/logging/Logger;

    :try_start_1c
    new-instance v1, Lw1/a$f;

    const-class v2, Ljava/lang/Thread;

    const-string v3, "a"

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

    move-result-object v3

    const-string v2, "b"

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

    move-result-object v4

    const-class v2, Lw1/a;

    const-string v5, "t"

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

    move-result-object v5

    const-class v0, Lw1/a;

    const-class v2, Lw1/a$e;

    const-string v6, "s"

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

    move-result-object v6

    const-class v0, Lw1/a;

    const-class v2, Ljava/lang/Object;

    const-string v7, "r"

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

    move-result-object v7

    move-object v2, v1

    invoke-direct/range {v2 .. v7}, Lw1/a$f;-><init>(Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;)V
    :try_end_4c
    .catchall {:try_start_1c .. :try_end_4c} :catchall_4e

    const/4 v0, 0x0

    goto :goto_54

    :catchall_4e
    move-exception v0

    new-instance v1, Lw1/a$h;

    invoke-direct {v1}, Lw1/a$h;-><init>()V

    :goto_54
    sput-object v1, Lw1/a;->w:Lw1/a$b;

    const-class v1, Ljava/util/concurrent/locks/LockSupport;

    if-eqz v0, :cond_63

    sget-object v1, Lw1/a;->v:Ljava/util/logging/Logger;

    sget-object v2, Ljava/util/logging/Level;->SEVERE:Ljava/util/logging/Level;

    const-string v3, "SafeAtomicHelper is broken!"

    invoke-virtual {v1, v2, v3, v0}, Ljava/util/logging/Logger;->log(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V

    :cond_63
    new-instance v0, Ljava/lang/Object;

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

    sput-object v0, Lw1/a;->x:Ljava/lang/Object;

    return-void
.end method

.method public constructor <init>()V
    .registers 1

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

    return-void
.end method

.method public static c(Lw1/a;)V
    .registers 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lw1/a<",
            "*>;)V"
        }
    .end annotation

    const/4 v0, 0x0

    move-object v1, v0

    .line 1
    :cond_2
    :goto_2
    iget-object v2, p0, Lw1/a;->t:Lw1/a$i;

    sget-object v3, Lw1/a;->w:Lw1/a$b;

    sget-object v4, Lw1/a$i;->c:Lw1/a$i;

    invoke-virtual {v3, p0, v2, v4}, Lw1/a$b;->c(Lw1/a;Lw1/a$i;Lw1/a$i;)Z

    move-result v3

    if-eqz v3, :cond_2

    :goto_e
    if-eqz v2, :cond_1c

    .line 2
    iget-object v3, v2, Lw1/a$i;->a:Ljava/lang/Thread;

    if-eqz v3, :cond_19

    iput-object v0, v2, Lw1/a$i;->a:Ljava/lang/Thread;

    invoke-static {v3}, Ljava/util/concurrent/locks/LockSupport;->unpark(Ljava/lang/Thread;)V

    .line 3
    :cond_19
    iget-object v2, v2, Lw1/a$i;->b:Lw1/a$i;

    goto :goto_e

    .line 4
    :cond_1c
    iget-object v2, p0, Lw1/a;->s:Lw1/a$e;

    sget-object v3, Lw1/a;->w:Lw1/a$b;

    sget-object v4, Lw1/a$e;->d:Lw1/a$e;

    invoke-virtual {v3, p0, v2, v4}, Lw1/a$b;->a(Lw1/a;Lw1/a$e;Lw1/a$e;)Z

    move-result v3

    if-eqz v3, :cond_1c

    :goto_28
    move-object p0, v1

    move-object v1, v2

    if-eqz v1, :cond_31

    iget-object v2, v1, Lw1/a$e;->c:Lw1/a$e;

    iput-object p0, v1, Lw1/a$e;->c:Lw1/a$e;

    goto :goto_28

    :cond_31
    :goto_31
    if-eqz p0, :cond_59

    .line 5
    iget-object v1, p0, Lw1/a$e;->c:Lw1/a$e;

    iget-object v2, p0, Lw1/a$e;->a:Ljava/lang/Runnable;

    instance-of v3, v2, Lw1/a$g;

    if-eqz v3, :cond_52

    check-cast v2, Lw1/a$g;

    iget-object p0, v2, Lw1/a$g;->r:Lw1/a;

    iget-object v3, p0, Lw1/a;->r:Ljava/lang/Object;

    if-ne v3, v2, :cond_57

    iget-object v3, v2, Lw1/a$g;->s:Lq7/a;

    invoke-static {v3}, Lw1/a;->f(Lq7/a;)Ljava/lang/Object;

    move-result-object v3

    sget-object v4, Lw1/a;->w:Lw1/a$b;

    invoke-virtual {v4, p0, v2, v3}, Lw1/a$b;->b(Lw1/a;Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_57

    goto :goto_2

    :cond_52
    iget-object p0, p0, Lw1/a$e;->b:Ljava/util/concurrent/Executor;

    invoke-static {v2, p0}, Lw1/a;->d(Ljava/lang/Runnable;Ljava/util/concurrent/Executor;)V

    :cond_57
    move-object p0, v1

    goto :goto_31

    :cond_59
    return-void
.end method

.method public static d(Ljava/lang/Runnable;Ljava/util/concurrent/Executor;)V
    .registers 7

    :try_start_0
    invoke-interface {p1, p0}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V
    :try_end_3
    .catch Ljava/lang/RuntimeException; {:try_start_0 .. :try_end_3} :catch_4

    goto :goto_25

    :catch_4
    move-exception v0

    sget-object v1, Lw1/a;->v:Ljava/util/logging/Logger;

    sget-object v2, Ljava/util/logging/Level;->SEVERE:Ljava/util/logging/Level;

    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "RuntimeException while executing runnable "

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

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

    const-string p0, " with executor "

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

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

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

    move-result-object p0

    invoke-virtual {v1, v2, p0, v0}, Ljava/util/logging/Logger;->log(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V

    :goto_25
    return-void
.end method

.method public static f(Lq7/a;)Ljava/lang/Object;
    .registers 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lq7/a<",
            "*>;)",
            "Ljava/lang/Object;"
        }
    .end annotation

    instance-of v0, p0, Lw1/a;

    const/4 v1, 0x0

    if-eqz v0, :cond_23

    check-cast p0, Lw1/a;

    iget-object p0, p0, Lw1/a;->r:Ljava/lang/Object;

    instance-of v0, p0, Lw1/a$c;

    if-eqz v0, :cond_22

    move-object v0, p0

    check-cast v0, Lw1/a$c;

    iget-boolean v2, v0, Lw1/a$c;->a:Z

    if-eqz v2, :cond_22

    iget-object p0, v0, Lw1/a$c;->b:Ljava/lang/Throwable;

    if-eqz p0, :cond_20

    new-instance p0, Lw1/a$c;

    iget-object v0, v0, Lw1/a$c;->b:Ljava/lang/Throwable;

    invoke-direct {p0, v1, v0}, Lw1/a$c;-><init>(ZLjava/lang/Throwable;)V

    goto :goto_22

    :cond_20
    sget-object p0, Lw1/a$c;->d:Lw1/a$c;

    :cond_22
    :goto_22
    return-object p0

    :cond_23
    move-object v0, p0

    check-cast v0, Lw1/a;

    .line 1
    iget-object v0, v0, Lw1/a;->r:Ljava/lang/Object;

    instance-of v0, v0, Lw1/a$c;

    .line 2
    sget-boolean v2, Lw1/a;->u:Z

    xor-int/lit8 v2, v2, 0x1

    and-int/2addr v2, v0

    if-eqz v2, :cond_34

    sget-object p0, Lw1/a$c;->d:Lw1/a$c;

    return-object p0

    :cond_34
    :try_start_34
    invoke-static {p0}, Lw1/a;->g(Ljava/util/concurrent/Future;)Ljava/lang/Object;

    move-result-object v2

    if-nez v2, :cond_3c

    sget-object v2, Lw1/a;->x:Ljava/lang/Object;
    :try_end_3c
    .catch Ljava/util/concurrent/ExecutionException; {:try_start_34 .. :try_end_3c} :catch_69
    .catch Ljava/util/concurrent/CancellationException; {:try_start_34 .. :try_end_3c} :catch_44
    .catchall {:try_start_34 .. :try_end_3c} :catchall_3d

    :cond_3c
    return-object v2

    :catchall_3d
    move-exception p0

    new-instance v0, Lw1/a$d;

    invoke-direct {v0, p0}, Lw1/a$d;-><init>(Ljava/lang/Throwable;)V

    return-object v0

    :catch_44
    move-exception v2

    if-nez v0, :cond_63

    new-instance v0, Lw1/a$d;

    new-instance v1, Ljava/lang/IllegalArgumentException;

    new-instance v3, Ljava/lang/StringBuilder;

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

    const-string v4, "get() threw CancellationException, despite reporting isCancelled() == false: "

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

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

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

    move-result-object p0

    invoke-direct {v1, p0, v2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V

    invoke-direct {v0, v1}, Lw1/a$d;-><init>(Ljava/lang/Throwable;)V

    return-object v0

    :cond_63
    new-instance p0, Lw1/a$c;

    invoke-direct {p0, v1, v2}, Lw1/a$c;-><init>(ZLjava/lang/Throwable;)V

    return-object p0

    :catch_69
    move-exception p0

    new-instance v0, Lw1/a$d;

    invoke-virtual {p0}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;

    move-result-object p0

    invoke-direct {v0, p0}, Lw1/a$d;-><init>(Ljava/lang/Throwable;)V

    return-object v0
.end method

.method public static g(Ljava/util/concurrent/Future;)Ljava/lang/Object;
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<V:",
            "Ljava/lang/Object;",
            ">(",
            "Ljava/util/concurrent/Future<",
            "TV;>;)TV;"
        }
    .end annotation

    const/4 v0, 0x0

    :goto_1
    :try_start_1
    move-object v1, p0

    check-cast v1, Lw1/a;

    invoke-virtual {v1}, Lw1/a;->get()Ljava/lang/Object;

    move-result-object p0
    :try_end_8
    .catch Ljava/lang/InterruptedException; {:try_start_1 .. :try_end_8} :catch_1d
    .catchall {:try_start_1 .. :try_end_8} :catchall_12

    if-eqz v0, :cond_11

    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Thread;->interrupt()V

    :cond_11
    return-object p0

    :catchall_12
    move-exception p0

    if-eqz v0, :cond_1c

    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Thread;->interrupt()V

    :cond_1c
    throw p0

    :catch_1d
    const/4 v0, 0x1

    goto :goto_1
.end method


# virtual methods
.method public final a(Ljava/lang/StringBuilder;)V
    .registers 5

    const-string v0, "]"

    :try_start_2
    invoke-static {p0}, Lw1/a;->g(Ljava/util/concurrent/Future;)Ljava/lang/Object;

    move-result-object v1

    const-string v2, "SUCCESS, result=["

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

    if-ne v1, p0, :cond_10

    const-string v1, "this future"

    goto :goto_14

    .line 1
    :cond_10
    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    .line 2
    :goto_14
    invoke-virtual {p1, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
    :try_end_1a
    .catch Ljava/util/concurrent/ExecutionException; {:try_start_2 .. :try_end_1a} :catch_2e
    .catch Ljava/util/concurrent/CancellationException; {:try_start_2 .. :try_end_1a} :catch_2b
    .catch Ljava/lang/RuntimeException; {:try_start_2 .. :try_end_1a} :catch_1b

    goto :goto_3e

    :catch_1b
    move-exception v0

    const-string v1, "UNKNOWN, cause=["

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

    invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v0

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

    const-string v0, " thrown from get()]"

    goto :goto_3b

    :catch_2b
    const-string v0, "CANCELLED"

    goto :goto_3b

    :catch_2e
    move-exception v1

    const-string v2, "FAILURE, cause=["

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

    invoke-virtual {v1}, Ljava/util/concurrent/ExecutionException;->getCause()Ljava/lang/Throwable;

    move-result-object v1

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

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

    :goto_3e
    return-void
.end method

.method public final b(Ljava/lang/Runnable;Ljava/util/concurrent/Executor;)V
    .registers 6

    .line 1
    invoke-static {p2}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 2
    iget-object v0, p0, Lw1/a;->s:Lw1/a$e;

    sget-object v1, Lw1/a$e;->d:Lw1/a$e;

    if-eq v0, v1, :cond_1f

    new-instance v1, Lw1/a$e;

    invoke-direct {v1, p1, p2}, Lw1/a$e;-><init>(Ljava/lang/Runnable;Ljava/util/concurrent/Executor;)V

    :cond_e
    iput-object v0, v1, Lw1/a$e;->c:Lw1/a$e;

    sget-object v2, Lw1/a;->w:Lw1/a$b;

    invoke-virtual {v2, p0, v0, v1}, Lw1/a$b;->a(Lw1/a;Lw1/a$e;Lw1/a$e;)Z

    move-result v0

    if-eqz v0, :cond_19

    return-void

    :cond_19
    iget-object v0, p0, Lw1/a;->s:Lw1/a$e;

    sget-object v2, Lw1/a$e;->d:Lw1/a$e;

    if-ne v0, v2, :cond_e

    :cond_1f
    invoke-static {p1, p2}, Lw1/a;->d(Ljava/lang/Runnable;Ljava/util/concurrent/Executor;)V

    return-void
.end method

.method public final cancel(Z)Z
    .registers 9

    iget-object v0, p0, Lw1/a;->r:Ljava/lang/Object;

    const/4 v1, 0x1

    const/4 v2, 0x0

    if-nez v0, :cond_8

    move v3, v1

    goto :goto_9

    :cond_8
    move v3, v2

    :goto_9
    instance-of v4, v0, Lw1/a$g;

    or-int/2addr v3, v4

    if-eqz v3, :cond_5e

    sget-boolean v3, Lw1/a;->u:Z

    if-eqz v3, :cond_1f

    new-instance v3, Lw1/a$c;

    new-instance v4, Ljava/util/concurrent/CancellationException;

    const-string v5, "Future.cancel() was called."

    invoke-direct {v4, v5}, Ljava/util/concurrent/CancellationException;-><init>(Ljava/lang/String;)V

    invoke-direct {v3, p1, v4}, Lw1/a$c;-><init>(ZLjava/lang/Throwable;)V

    goto :goto_26

    :cond_1f
    if-eqz p1, :cond_24

    sget-object v3, Lw1/a$c;->c:Lw1/a$c;

    goto :goto_26

    :cond_24
    sget-object v3, Lw1/a$c;->d:Lw1/a$c;

    :goto_26
    move-object v4, p0

    move v5, v2

    :cond_28
    :goto_28
    sget-object v6, Lw1/a;->w:Lw1/a$b;

    invoke-virtual {v6, v4, v0, v3}, Lw1/a$b;->b(Lw1/a;Ljava/lang/Object;Ljava/lang/Object;)Z

    move-result v6

    if-eqz v6, :cond_56

    invoke-static {v4}, Lw1/a;->c(Lw1/a;)V

    instance-of v4, v0, Lw1/a$g;

    if-eqz v4, :cond_5f

    check-cast v0, Lw1/a$g;

    iget-object v0, v0, Lw1/a$g;->s:Lq7/a;

    instance-of v4, v0, Lw1/a;

    if-eqz v4, :cond_50

    move-object v4, v0

    check-cast v4, Lw1/a;

    iget-object v0, v4, Lw1/a;->r:Ljava/lang/Object;

    if-nez v0, :cond_48

    move v5, v1

    goto :goto_49

    :cond_48
    move v5, v2

    :goto_49
    instance-of v6, v0, Lw1/a$g;

    or-int/2addr v5, v6

    if-eqz v5, :cond_5f

    move v5, v1

    goto :goto_28

    :cond_50
    check-cast v0, Lw1/a;

    invoke-virtual {v0, p1}, Lw1/a;->cancel(Z)Z

    goto :goto_5f

    :cond_56
    iget-object v0, v4, Lw1/a;->r:Ljava/lang/Object;

    instance-of v6, v0, Lw1/a$g;

    if-nez v6, :cond_28

    move v1, v5

    goto :goto_5f

    :cond_5e
    move v1, v2

    :cond_5f
    :goto_5f
    return v1
.end method

.method public final e(Ljava/lang/Object;)Ljava/lang/Object;
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/Object;",
            ")TV;"
        }
    .end annotation

    instance-of v0, p1, Lw1/a$c;

    if-nez v0, :cond_18

    instance-of v0, p1, Lw1/a$d;

    if-nez v0, :cond_e

    sget-object v0, Lw1/a;->x:Ljava/lang/Object;

    if-ne p1, v0, :cond_d

    const/4 p1, 0x0

    :cond_d
    return-object p1

    :cond_e
    new-instance v0, Ljava/util/concurrent/ExecutionException;

    check-cast p1, Lw1/a$d;

    iget-object p1, p1, Lw1/a$d;->a:Ljava/lang/Throwable;

    invoke-direct {v0, p1}, Ljava/util/concurrent/ExecutionException;-><init>(Ljava/lang/Throwable;)V

    throw v0

    :cond_18
    check-cast p1, Lw1/a$c;

    iget-object p1, p1, Lw1/a$c;->b:Ljava/lang/Throwable;

    .line 1
    new-instance v0, Ljava/util/concurrent/CancellationException;

    const-string v1, "Task was cancelled."

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

    invoke-virtual {v0, p1}, Ljava/util/concurrent/CancellationException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;

    .line 2
    throw v0
.end method

.method public final get()Ljava/lang/Object;
    .registers 7
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()TV;"
        }
    .end annotation

    invoke-static {}, Ljava/lang/Thread;->interrupted()Z

    move-result v0

    if-nez v0, :cond_61

    iget-object v0, p0, Lw1/a;->r:Ljava/lang/Object;

    const/4 v1, 0x0

    const/4 v2, 0x1

    if-eqz v0, :cond_e

    move v3, v2

    goto :goto_f

    :cond_e
    move v3, v1

    :goto_f
    instance-of v4, v0, Lw1/a$g;

    xor-int/2addr v4, v2

    and-int/2addr v3, v4

    if-eqz v3, :cond_1a

    invoke-virtual {p0, v0}, Lw1/a;->e(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    return-object v0

    :cond_1a
    iget-object v0, p0, Lw1/a;->t:Lw1/a$i;

    sget-object v3, Lw1/a$i;->c:Lw1/a$i;

    if-eq v0, v3, :cond_5a

    new-instance v3, Lw1/a$i;

    invoke-direct {v3}, Lw1/a$i;-><init>()V

    .line 1
    :cond_25
    sget-object v4, Lw1/a;->w:Lw1/a$b;

    invoke-virtual {v4, v3, v0}, Lw1/a$b;->d(Lw1/a$i;Lw1/a$i;)V

    .line 2
    invoke-virtual {v4, p0, v0, v3}, Lw1/a$b;->c(Lw1/a;Lw1/a$i;Lw1/a$i;)Z

    move-result v0

    if-eqz v0, :cond_54

    :cond_30
    invoke-static {p0}, Ljava/util/concurrent/locks/LockSupport;->park(Ljava/lang/Object;)V

    invoke-static {}, Ljava/lang/Thread;->interrupted()Z

    move-result v0

    if-nez v0, :cond_4b

    iget-object v0, p0, Lw1/a;->r:Ljava/lang/Object;

    if-eqz v0, :cond_3f

    move v4, v2

    goto :goto_40

    :cond_3f
    move v4, v1

    :goto_40
    instance-of v5, v0, Lw1/a$g;

    xor-int/2addr v5, v2

    and-int/2addr v4, v5

    if-eqz v4, :cond_30

    invoke-virtual {p0, v0}, Lw1/a;->e(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    return-object v0

    :cond_4b
    invoke-virtual {p0, v3}, Lw1/a;->i(Lw1/a$i;)V

    new-instance v0, Ljava/lang/InterruptedException;

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

    throw v0

    :cond_54
    iget-object v0, p0, Lw1/a;->t:Lw1/a$i;

    sget-object v4, Lw1/a$i;->c:Lw1/a$i;

    if-ne v0, v4, :cond_25

    :cond_5a
    iget-object v0, p0, Lw1/a;->r:Ljava/lang/Object;

    invoke-virtual {p0, v0}, Lw1/a;->e(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    return-object v0

    :cond_61
    new-instance v0, Ljava/lang/InterruptedException;

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

    throw v0
.end method

.method public final get(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;
    .registers 22
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(J",
            "Ljava/util/concurrent/TimeUnit;",
            ")TV;"
        }
    .end annotation

    move-object/from16 v0, p0

    move-wide/from16 v1, p1

    move-object/from16 v3, p3

    invoke-virtual {v3, v1, v2}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J

    move-result-wide v4

    invoke-static {}, Ljava/lang/Thread;->interrupted()Z

    move-result v6

    if-nez v6, :cond_163

    iget-object v6, v0, Lw1/a;->r:Ljava/lang/Object;

    const/4 v7, 0x1

    if-eqz v6, :cond_17

    move v8, v7

    goto :goto_18

    :cond_17
    const/4 v8, 0x0

    :goto_18
    instance-of v9, v6, Lw1/a$g;

    xor-int/2addr v9, v7

    and-int/2addr v8, v9

    if-eqz v8, :cond_23

    invoke-virtual {v0, v6}, Lw1/a;->e(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    return-object v1

    :cond_23
    const-wide/16 v8, 0x0

    cmp-long v6, v4, v8

    if-lez v6, :cond_2f

    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide v10

    add-long/2addr v10, v4

    goto :goto_30

    :cond_2f
    move-wide v10, v8

    :goto_30
    const-wide/16 v12, 0x3e8

    cmp-long v6, v4, v12

    if-ltz v6, :cond_8b

    iget-object v6, v0, Lw1/a;->t:Lw1/a$i;

    sget-object v14, Lw1/a$i;->c:Lw1/a$i;

    if-eq v6, v14, :cond_84

    new-instance v14, Lw1/a$i;

    invoke-direct {v14}, Lw1/a$i;-><init>()V

    .line 3
    :cond_41
    sget-object v15, Lw1/a;->w:Lw1/a$b;

    invoke-virtual {v15, v14, v6}, Lw1/a$b;->d(Lw1/a$i;Lw1/a$i;)V

    .line 4
    invoke-virtual {v15, v0, v6, v14}, Lw1/a$b;->c(Lw1/a;Lw1/a$i;Lw1/a$i;)Z

    move-result v6

    if-eqz v6, :cond_7e

    :cond_4c
    invoke-static {v0, v4, v5}, Ljava/util/concurrent/locks/LockSupport;->parkNanos(Ljava/lang/Object;J)V

    invoke-static {}, Ljava/lang/Thread;->interrupted()Z

    move-result v4

    if-nez v4, :cond_75

    iget-object v4, v0, Lw1/a;->r:Ljava/lang/Object;

    if-eqz v4, :cond_5b

    move v5, v7

    goto :goto_5c

    :cond_5b
    const/4 v5, 0x0

    :goto_5c
    instance-of v6, v4, Lw1/a$g;

    xor-int/2addr v6, v7

    and-int/2addr v5, v6

    if-eqz v5, :cond_67

    invoke-virtual {v0, v4}, Lw1/a;->e(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    return-object v1

    :cond_67
    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide v4

    sub-long v4, v10, v4

    cmp-long v6, v4, v12

    if-gez v6, :cond_4c

    invoke-virtual {v0, v14}, Lw1/a;->i(Lw1/a$i;)V

    goto :goto_8b

    :cond_75
    invoke-virtual {v0, v14}, Lw1/a;->i(Lw1/a$i;)V

    new-instance v1, Ljava/lang/InterruptedException;

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

    throw v1

    :cond_7e
    iget-object v6, v0, Lw1/a;->t:Lw1/a$i;

    sget-object v15, Lw1/a$i;->c:Lw1/a$i;

    if-ne v6, v15, :cond_41

    :cond_84
    iget-object v1, v0, Lw1/a;->r:Ljava/lang/Object;

    invoke-virtual {v0, v1}, Lw1/a;->e(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    return-object v1

    :cond_8b
    :goto_8b
    cmp-long v6, v4, v8

    if-lez v6, :cond_b4

    iget-object v4, v0, Lw1/a;->r:Ljava/lang/Object;

    if-eqz v4, :cond_95

    move v5, v7

    goto :goto_96

    :cond_95
    const/4 v5, 0x0

    :goto_96
    instance-of v6, v4, Lw1/a$g;

    xor-int/2addr v6, v7

    and-int/2addr v5, v6

    if-eqz v5, :cond_a1

    invoke-virtual {v0, v4}, Lw1/a;->e(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v1

    return-object v1

    :cond_a1
    invoke-static {}, Ljava/lang/Thread;->interrupted()Z

    move-result v4

    if-nez v4, :cond_ae

    invoke-static {}, Ljava/lang/System;->nanoTime()J

    move-result-wide v4

    sub-long v4, v10, v4

    goto :goto_8b

    :cond_ae
    new-instance v1, Ljava/lang/InterruptedException;

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

    throw v1

    :cond_b4
    invoke-virtual/range {p0 .. p0}, Lw1/a;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual/range {p3 .. p3}, Ljava/util/concurrent/TimeUnit;->toString()Ljava/lang/String;

    move-result-object v10

    sget-object v11, Ljava/util/Locale;->ROOT:Ljava/util/Locale;

    invoke-virtual {v10, v11}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;

    move-result-object v10

    new-instance v14, Ljava/lang/StringBuilder;

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

    const-string v15, "Waited "

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

    invoke-virtual {v14, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string v1, " "

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

    invoke-virtual/range {p3 .. p3}, Ljava/util/concurrent/TimeUnit;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2, v11}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;

    move-result-object v2

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

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

    move-result-object v2

    add-long v14, v4, v12

    cmp-long v11, v14, v8

    if-gez v11, :cond_145

    const-string v11, " (plus "

    invoke-static {v2, v11}, Le/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    neg-long v4, v4

    sget-object v11, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;

    invoke-virtual {v3, v4, v5, v11}, Ljava/util/concurrent/TimeUnit;->convert(JLjava/util/concurrent/TimeUnit;)J

    move-result-wide v14

    invoke-virtual {v3, v14, v15}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J

    move-result-wide v16

    sub-long v4, v4, v16

    cmp-long v3, v14, v8

    if-eqz v3, :cond_106

    cmp-long v8, v4, v12

    if-lez v8, :cond_105

    goto :goto_106

    :cond_105
    const/4 v7, 0x0

    :cond_106
    :goto_106
    if-lez v3, :cond_129

    new-instance v3, Ljava/lang/StringBuilder;

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

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

    invoke-virtual {v3, v14, v15}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

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

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

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

    move-result-object v2

    if-eqz v7, :cond_125

    const-string v3, ","

    invoke-static {v2, v3}, Le/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    :cond_125
    invoke-static {v2, v1}, Le/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    :cond_129
    if-eqz v7, :cond_13f

    new-instance v1, Ljava/lang/StringBuilder;

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

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

    invoke-virtual {v1, v4, v5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    const-string v2, " nanoseconds "

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

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

    move-result-object v2

    :cond_13f
    const-string v1, "delay)"

    invoke-static {v2, v1}, Le/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    :cond_145
    invoke-virtual/range {p0 .. p0}, Lw1/a;->isDone()Z

    move-result v1

    if-eqz v1, :cond_157

    new-instance v1, Ljava/util/concurrent/TimeoutException;

    const-string v3, " but future completed as timeout expired"

    invoke-static {v2, v3}, Le/a;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/util/concurrent/TimeoutException;-><init>(Ljava/lang/String;)V

    throw v1

    :cond_157
    new-instance v1, Ljava/util/concurrent/TimeoutException;

    const-string v3, " for "

    invoke-static {v2, v3, v6}, Le/b;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/util/concurrent/TimeoutException;-><init>(Ljava/lang/String;)V

    throw v1

    :cond_163
    new-instance v1, Ljava/lang/InterruptedException;

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

    throw v1
.end method

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

    iget-object v0, p0, Lw1/a;->r:Ljava/lang/Object;

    instance-of v1, v0, Lw1/a$g;

    if-eqz v1, :cond_20

    const-string v1, "setFuture=["

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

    move-result-object v1

    check-cast v0, Lw1/a$g;

    iget-object v0, v0, Lw1/a$g;->s:Lq7/a;

    if-ne v0, p0, :cond_15

    const-string v0, "this future"

    goto :goto_19

    .line 1
    :cond_15
    invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    :goto_19
    const-string v2, "]"

    .line 2
    invoke-static {v1, v0, v2}, Landroidx/activity/b;->a(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    return-object v0

    :cond_20
    instance-of v0, p0, Ljava/util/concurrent/ScheduledFuture;

    if-eqz v0, :cond_40

    const-string v0, "remaining delay=["

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

    move-result-object v0

    move-object v1, p0

    check-cast v1, Ljava/util/concurrent/ScheduledFuture;

    sget-object v2, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;

    invoke-interface {v1, v2}, Ljava/util/concurrent/ScheduledFuture;->getDelay(Ljava/util/concurrent/TimeUnit;)J

    move-result-wide v1

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

    const-string v1, " ms]"

    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

    :cond_40
    const/4 v0, 0x0

    return-object v0
.end method

.method public final i(Lw1/a$i;)V
    .registers 6

    const/4 v0, 0x0

    iput-object v0, p1, Lw1/a$i;->a:Ljava/lang/Thread;

    :goto_3
    iget-object p1, p0, Lw1/a;->t:Lw1/a$i;

    sget-object v1, Lw1/a$i;->c:Lw1/a$i;

    if-ne p1, v1, :cond_a

    return-void

    :cond_a
    move-object v1, v0

    :goto_b
    if-eqz p1, :cond_29

    iget-object v2, p1, Lw1/a$i;->b:Lw1/a$i;

    iget-object v3, p1, Lw1/a$i;->a:Ljava/lang/Thread;

    if-eqz v3, :cond_15

    move-object v1, p1

    goto :goto_27

    :cond_15
    if-eqz v1, :cond_1e

    iput-object v2, v1, Lw1/a$i;->b:Lw1/a$i;

    iget-object p1, v1, Lw1/a$i;->a:Ljava/lang/Thread;

    if-nez p1, :cond_27

    goto :goto_3

    :cond_1e
    sget-object v3, Lw1/a;->w:Lw1/a$b;

    invoke-virtual {v3, p0, p1, v2}, Lw1/a$b;->c(Lw1/a;Lw1/a$i;Lw1/a$i;)Z

    move-result p1

    if-nez p1, :cond_27

    goto :goto_3

    :cond_27
    :goto_27
    move-object p1, v2

    goto :goto_b

    :cond_29
    return-void
.end method

.method public final isCancelled()Z
    .registers 2

    iget-object v0, p0, Lw1/a;->r:Ljava/lang/Object;

    instance-of v0, v0, Lw1/a$c;

    return v0
.end method

.method public final isDone()Z
    .registers 4

    iget-object v0, p0, Lw1/a;->r:Ljava/lang/Object;

    const/4 v1, 0x1

    if-eqz v0, :cond_7

    move v2, v1

    goto :goto_8

    :cond_7
    const/4 v2, 0x0

    :goto_8
    instance-of v0, v0, Lw1/a$g;

    xor-int/2addr v0, v1

    and-int/2addr v0, v2

    return v0
.end method

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

    new-instance v0, Ljava/lang/StringBuilder;

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

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

    move-result-object v1

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

    const-string v1, "[status="

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

    .line 1
    iget-object v1, p0, Lw1/a;->r:Ljava/lang/Object;

    instance-of v1, v1, Lw1/a$c;

    const-string v2, "]"

    if-eqz v1, :cond_1c

    const-string v1, "CANCELLED"

    goto :goto_5a

    .line 2
    :cond_1c
    invoke-virtual {p0}, Lw1/a;->isDone()Z

    move-result v1

    if-eqz v1, :cond_23

    goto :goto_54

    :cond_23
    :try_start_23
    invoke-virtual {p0}, Lw1/a;->h()Ljava/lang/String;

    move-result-object v1
    :try_end_27
    .catch Ljava/lang/RuntimeException; {:try_start_23 .. :try_end_27} :catch_28

    goto :goto_3a

    :catch_28
    move-exception v1

    const-string v3, "Exception thrown from implementation: "

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

    move-result-object v3

    invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;

    move-result-object v1

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

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

    move-result-object v1

    :goto_3a
    if-eqz v1, :cond_4e

    invoke-virtual {v1}, Ljava/lang/String;->isEmpty()Z

    move-result v3

    if-nez v3, :cond_4e

    const-string v3, "PENDING, info=["

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

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

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

    goto :goto_5d

    :cond_4e
    invoke-virtual {p0}, Lw1/a;->isDone()Z

    move-result v1

    if-eqz v1, :cond_58

    :goto_54
    invoke-virtual {p0, v0}, Lw1/a;->a(Ljava/lang/StringBuilder;)V

    goto :goto_5d

    :cond_58
    const-string v1, "PENDING"

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

    :goto_5d
    invoke-virtual {v0, v2}, 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
