apkfuckery/com.discord/smali_classes2/h0/b.smali

371 lines
6.2 KiB
Smali

.class public Lh0/b;
.super Lh0/y;
.source "AsyncTimeout.kt"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lh0/b$b;,
Lh0/b$a;
}
.end annotation
# static fields
.field public static final h:J
.field public static final i:J
.field public static j:Lh0/b;
.field public static final k:Lh0/b$a;
# instance fields
.field public e:Z
.field public f:Lh0/b;
.field public g:J
# direct methods
.method public static constructor <clinit>()V
.locals 3
new-instance v0, Lh0/b$a;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lh0/b$a;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
sput-object v0, Lh0/b;->k:Lh0/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, Lh0/b;->h:J
sget-object v0, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
sget-wide v1, Lh0/b;->h:J
invoke-virtual {v0, v1, v2}, Ljava/util/concurrent/TimeUnit;->toNanos(J)J
move-result-wide v0
sput-wide v0, Lh0/b;->i:J
return-void
.end method
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Lh0/y;-><init>()V
return-void
.end method
# virtual methods
.method public final i()V
.locals 10
iget-boolean v0, p0, Lh0/b;->e:Z
const/4 v1, 0x1
xor-int/2addr v0, v1
if-eqz v0, :cond_b
iget-wide v2, p0, Lh0/y;->c:J
iget-boolean v0, p0, Lh0/y;->a:Z
const-wide/16 v4, 0x0
cmp-long v6, v2, v4
if-nez v6, :cond_0
if-nez v0, :cond_0
return-void
:cond_0
iput-boolean v1, p0, Lh0/b;->e:Z
const-class v1, Lh0/b;
monitor-enter v1
:try_start_0
sget-object v4, Lh0/b;->j:Lh0/b;
if-nez v4, :cond_1
new-instance v4, Lh0/b;
invoke-direct {v4}, Lh0/b;-><init>()V
sput-object v4, Lh0/b;->j:Lh0/b;
new-instance v4, Lh0/b$b;
invoke-direct {v4}, Lh0/b$b;-><init>()V
invoke-virtual {v4}, Ljava/lang/Thread;->start()V
:cond_1
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v4
if-eqz v6, :cond_2
if-eqz v0, :cond_2
invoke-virtual {p0}, Lh0/y;->c()J
move-result-wide v6
sub-long/2addr v6, v4
invoke-static {v2, v3, v6, v7}, Ljava/lang/Math;->min(JJ)J
move-result-wide v2
add-long/2addr v2, v4
iput-wide v2, p0, Lh0/b;->g:J
goto :goto_0
:cond_2
if-eqz v6, :cond_3
add-long/2addr v2, v4
iput-wide v2, p0, Lh0/b;->g:J
goto :goto_0
:cond_3
if-eqz v0, :cond_a
invoke-virtual {p0}, Lh0/y;->c()J
move-result-wide v2
iput-wide v2, p0, Lh0/b;->g:J
:goto_0
iget-wide v2, p0, Lh0/b;->g:J
sub-long/2addr v2, v4
sget-object v0, Lh0/b;->j:Lh0/b;
const/4 v6, 0x0
if-eqz v0, :cond_9
:goto_1
iget-object v7, v0, Lh0/b;->f:Lh0/b;
if-eqz v7, :cond_7
iget-object v7, v0, Lh0/b;->f:Lh0/b;
if-eqz v7, :cond_6
iget-wide v7, v7, Lh0/b;->g:J
sub-long/2addr v7, v4
cmp-long v9, v2, v7
if-gez v9, :cond_4
goto :goto_2
:cond_4
iget-object v0, v0, Lh0/b;->f:Lh0/b;
if-eqz v0, :cond_5
goto :goto_1
:cond_5
invoke-static {}, Lc0/n/c/j;->throwNpe()V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
throw v6
:cond_6
:try_start_1
invoke-static {}, Lc0/n/c/j;->throwNpe()V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v6
:cond_7
:goto_2
:try_start_2
iget-object v2, v0, Lh0/b;->f:Lh0/b;
iput-object v2, p0, Lh0/b;->f:Lh0/b;
iput-object p0, v0, Lh0/b;->f:Lh0/b;
sget-object v2, Lh0/b;->j:Lh0/b;
if-ne v0, v2, :cond_8
invoke-virtual {v1}, Ljava/lang/Object;->notify()V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
:cond_8
monitor-exit v1
return-void
:cond_9
:try_start_3
invoke-static {}, Lc0/n/c/j;->throwNpe()V
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
throw v6
:cond_a
:try_start_4
new-instance v0, Ljava/lang/AssertionError;
invoke-direct {v0}, Ljava/lang/AssertionError;-><init>()V
throw v0
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_0
:catchall_0
move-exception v0
monitor-exit v1
throw v0
:cond_b
const-string v0, "Unbalanced enter/exit"
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 j()Z
.locals 5
iget-boolean v0, p0, Lh0/b;->e:Z
const/4 v1, 0x0
if-nez v0, :cond_0
return v1
:cond_0
iput-boolean v1, p0, Lh0/b;->e:Z
const/4 v0, 0x0
const-class v2, Lh0/b;
monitor-enter v2
:try_start_0
sget-object v3, Lh0/b;->j:Lh0/b;
:goto_0
if-eqz v3, :cond_2
iget-object v4, v3, Lh0/b;->f:Lh0/b;
if-ne v4, p0, :cond_1
iget-object v4, p0, Lh0/b;->f:Lh0/b;
iput-object v4, v3, Lh0/b;->f:Lh0/b;
iput-object v0, p0, Lh0/b;->f:Lh0/b;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit v2
goto :goto_1
:cond_1
:try_start_1
iget-object v3, v3, Lh0/b;->f:Lh0/b;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_0
:cond_2
const/4 v1, 0x1
monitor-exit v2
:goto_1
return v1
:catchall_0
move-exception v0
monitor-exit v2
throw v0
.end method
.method public k(Ljava/io/IOException;)Ljava/io/IOException;
.locals 2
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_0
invoke-virtual {v0, p1}, Ljava/io/InterruptedIOException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
:cond_0
return-object v0
.end method
.method public l()V
.locals 0
return-void
.end method