.class public Lha/b;
.super Lha/a0;
.source ""


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lha/b$b;,
        Lha/b$a;
    }
.end annotation


# static fields
.field public static final h:J

.field public static final i:J

.field public static j:Lha/b;

.field public static final k:Lha/b$a;


# instance fields
.field public e:Z

.field public f:Lha/b;

.field public g:J


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

    new-instance v0, Lha/b$a;

    const/4 v1, 0x0

    invoke-direct {v0, v1}, Lha/b$a;-><init>(Li9/c;)V

    sput-object v0, Lha/b;->k:Lha/b$a;

    sget-object v0, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;

    const-wide/16 v1, 0x3c

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

    move-result-wide v0

    sput-wide v0, Lha/b;->h:J

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

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

    move-result-wide v0

    sput-wide v0, Lha/b;->i:J

    return-void
.end method

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

    invoke-direct {p0}, Lha/a0;-><init>()V

    return-void
.end method


# virtual methods
.method public final h()V
    .registers 10

    iget-boolean v0, p0, Lha/b;->e:Z

    const/4 v1, 0x1

    xor-int/2addr v0, v1

    if-eqz v0, :cond_79

    .line 1
    iget-wide v2, p0, Lha/a0;->c:J

    .line 2
    iget-boolean v0, p0, Lha/a0;->a:Z

    const-wide/16 v4, 0x0

    cmp-long v4, v2, v4

    if-nez v4, :cond_13

    if-nez v0, :cond_13

    return-void

    .line 3
    :cond_13
    iput-boolean v1, p0, Lha/b;->e:Z

    .line 4
    const-class v1, Lha/b;

    monitor-enter v1

    .line 5
    :try_start_18
    sget-object v5, Lha/b;->j:Lha/b;

    if-nez v5, :cond_2b

    .line 6
    new-instance v5, Lha/b;

    invoke-direct {v5}, Lha/b;-><init>()V

    .line 7
    sput-object v5, Lha/b;->j:Lha/b;

    .line 8
    new-instance v5, Lha/b$b;

    invoke-direct {v5}, Lha/b$b;-><init>()V

    invoke-virtual {v5}, Ljava/lang/Thread;->start()V

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

    move-result-wide v5

    if-eqz v4, :cond_3d

    if-eqz v0, :cond_3d

    invoke-virtual {p0}, Lha/a0;->c()J

    move-result-wide v7

    sub-long/2addr v7, v5

    invoke-static {v2, v3, v7, v8}, Ljava/lang/Math;->min(JJ)J

    move-result-wide v2

    goto :goto_3f

    :cond_3d
    if-eqz v4, :cond_41

    :goto_3f
    add-long/2addr v2, v5

    goto :goto_47

    :cond_41
    if-eqz v0, :cond_70

    invoke-virtual {p0}, Lha/a0;->c()J

    move-result-wide v2

    .line 9
    :goto_47
    iput-wide v2, p0, Lha/b;->g:J

    sub-long/2addr v2, v5

    .line 10
    sget-object v0, Lha/b;->j:Lha/b;

    .line 11
    :goto_4c
    invoke-static {v0}, Lx/e;->d(Ljava/lang/Object;)V

    .line 12
    iget-object v4, v0, Lha/b;->f:Lha/b;

    if-eqz v4, :cond_61

    .line 13
    invoke-static {v4}, Lx/e;->d(Ljava/lang/Object;)V

    .line 14
    iget-wide v7, v4, Lha/b;->g:J

    sub-long/2addr v7, v5

    cmp-long v4, v2, v7

    if-gez v4, :cond_5e

    goto :goto_61

    .line 15
    :cond_5e
    iget-object v0, v0, Lha/b;->f:Lha/b;

    goto :goto_4c

    :cond_61
    :goto_61
    iget-object v2, v0, Lha/b;->f:Lha/b;

    .line 16
    iput-object v2, p0, Lha/b;->f:Lha/b;

    iput-object p0, v0, Lha/b;->f:Lha/b;

    .line 17
    sget-object v2, Lha/b;->j:Lha/b;

    if-ne v0, v2, :cond_6e

    .line 18
    invoke-virtual {v1}, Ljava/lang/Object;->notify()V
    :try_end_6e
    .catchall {:try_start_18 .. :try_end_6e} :catchall_76

    :cond_6e
    monitor-exit v1

    return-void

    :cond_70
    :try_start_70
    new-instance v0, Ljava/lang/AssertionError;

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

    throw v0
    :try_end_76
    .catchall {:try_start_70 .. :try_end_76} :catchall_76

    :catchall_76
    move-exception v0

    monitor-exit v1

    throw v0

    :cond_79
    const-string v0, "Unbalanced enter/exit"

    .line 19
    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

    throw v1
.end method

.method public final i()Z
    .registers 5

    iget-boolean v0, p0, Lha/b;->e:Z

    const/4 v1, 0x0

    if-nez v0, :cond_6

    return v1

    :cond_6
    iput-boolean v1, p0, Lha/b;->e:Z

    .line 1
    const-class v0, Lha/b;

    monitor-enter v0

    .line 2
    :try_start_b
    sget-object v2, Lha/b;->j:Lha/b;

    :goto_d
    if-eqz v2, :cond_1d

    .line 3
    iget-object v3, v2, Lha/b;->f:Lha/b;

    if-ne v3, p0, :cond_1b

    iget-object v3, p0, Lha/b;->f:Lha/b;

    .line 4
    iput-object v3, v2, Lha/b;->f:Lha/b;

    const/4 v2, 0x0

    iput-object v2, p0, Lha/b;->f:Lha/b;
    :try_end_1a
    .catchall {:try_start_b .. :try_end_1a} :catchall_20

    goto :goto_1e

    :cond_1b
    move-object v2, v3

    goto :goto_d

    :cond_1d
    const/4 v1, 0x1

    .line 5
    :goto_1e
    monitor-exit v0

    return v1

    :catchall_20
    move-exception v1

    monitor-exit v0

    throw v1
.end method

.method public j(Ljava/io/IOException;)Ljava/io/IOException;
    .registers 4

    new-instance v0, Ljava/io/InterruptedIOException;

    const-string v1, "timeout"

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

    if-eqz p1, :cond_c

    invoke-virtual {v0, p1}, Ljava/io/InterruptedIOException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;

    :cond_c
    return-object v0
.end method

.method public k()V
    .registers 1

    return-void
.end method
