Rabbit-R1/switch port/smali/smali_classes3/okio/AsyncTimeout$Companion.smali
2024-05-21 17:08:36 -04:00

497 lines
12 KiB
Smali

.class public final Lokio/AsyncTimeout$Companion;
.super Ljava/lang/Object;
.source "AsyncTimeout.kt"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokio/AsyncTimeout;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "Companion"
.end annotation
.annotation system Ldalvik/annotation/SourceDebugExtension;
value = "SMAP\nAsyncTimeout.kt\nKotlin\n*S Kotlin\n*F\n+ 1 AsyncTimeout.kt\nokio/AsyncTimeout$Companion\n+ 2 -Platform.kt\nokio/-Platform\n*L\n1#1,327:1\n28#2:328\n28#2:329\n*E\n*S KotlinDebug\n*F\n+ 1 AsyncTimeout.kt\nokio/AsyncTimeout$Companion\n*L\n228#1:328\n268#1:329\n*E\n"
.end annotation
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u00002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\n\u0002\u0010\t\n\u0002\u0008\u0002\n\u0002\u0010\u0008\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0010\u000b\n\u0002\u0008\u0002\n\u0002\u0010\u0002\n\u0002\u0008\u0003\u0008\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\u0008\u0002\u00a2\u0006\u0002\u0010\u0002J\u000f\u0010\n\u001a\u0004\u0018\u00010\tH\u0000\u00a2\u0006\u0002\u0008\u000bJ\u0010\u0010\u000c\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\tH\u0002J \u0010\u000f\u001a\u00020\u00102\u0006\u0010\u000e\u001a\u00020\t2\u0006\u0010\u0011\u001a\u00020\u00042\u0006\u0010\u0012\u001a\u00020\rH\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0004X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082T\u00a2\u0006\u0002\n\u0000R\u0010\u0010\u0008\u001a\u0004\u0018\u00010\tX\u0082\u000e\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u0013"
}
d2 = {
"Lokio/AsyncTimeout$Companion;",
"",
"()V",
"IDLE_TIMEOUT_MILLIS",
"",
"IDLE_TIMEOUT_NANOS",
"TIMEOUT_WRITE_SIZE",
"",
"head",
"Lokio/AsyncTimeout;",
"awaitTimeout",
"awaitTimeout$okio",
"cancelScheduledTimeout",
"",
"node",
"scheduleTimeout",
"",
"timeoutNanos",
"hasDeadline",
"okio"
}
k = 0x1
mv = {
0x1,
0x4,
0x0
}
.end annotation
# direct methods
.method private constructor <init>()V
.locals 0
.line 205
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
.locals 0
.line 205
invoke-direct {p0}, Lokio/AsyncTimeout$Companion;-><init>()V
return-void
.end method
.method public static final synthetic access$cancelScheduledTimeout(Lokio/AsyncTimeout$Companion;Lokio/AsyncTimeout;)Z
.locals 0
.line 205
invoke-direct {p0, p1}, Lokio/AsyncTimeout$Companion;->cancelScheduledTimeout(Lokio/AsyncTimeout;)Z
move-result p0
return p0
.end method
.method public static final synthetic access$scheduleTimeout(Lokio/AsyncTimeout$Companion;Lokio/AsyncTimeout;JZ)V
.locals 0
.line 205
invoke-direct {p0, p1, p2, p3, p4}, Lokio/AsyncTimeout$Companion;->scheduleTimeout(Lokio/AsyncTimeout;JZ)V
return-void
.end method
.method private final cancelScheduledTimeout(Lokio/AsyncTimeout;)Z
.locals 2
.line 268
const-class p0, Lokio/AsyncTimeout;
.line 329
monitor-enter p0
.line 270
:try_start_0
invoke-static {}, Lokio/AsyncTimeout;->access$getHead$cp()Lokio/AsyncTimeout;
move-result-object v0
:goto_0
if-eqz v0, :cond_1
.line 272
invoke-static {v0}, Lokio/AsyncTimeout;->access$getNext$p(Lokio/AsyncTimeout;)Lokio/AsyncTimeout;
move-result-object v1
if-ne v1, p1, :cond_0
.line 273
invoke-static {p1}, Lokio/AsyncTimeout;->access$getNext$p(Lokio/AsyncTimeout;)Lokio/AsyncTimeout;
move-result-object v1
invoke-static {v0, v1}, Lokio/AsyncTimeout;->access$setNext$p(Lokio/AsyncTimeout;Lokio/AsyncTimeout;)V
const/4 v0, 0x0
.line 274
move-object v1, v0
check-cast v1, Lokio/AsyncTimeout;
invoke-static {p1, v0}, Lokio/AsyncTimeout;->access$setNext$p(Lokio/AsyncTimeout;Lokio/AsyncTimeout;)V
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 275
monitor-exit p0
const/4 p0, 0x0
return p0
.line 277
:cond_0
:try_start_1
invoke-static {v0}, Lokio/AsyncTimeout;->access$getNext$p(Lokio/AsyncTimeout;)Lokio/AsyncTimeout;
move-result-object v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
goto :goto_0
.line 281
:cond_1
monitor-exit p0
const/4 p0, 0x1
return p0
:catchall_0
move-exception p1
monitor-exit p0
throw p1
.end method
.method private final scheduleTimeout(Lokio/AsyncTimeout;JZ)V
.locals 4
.line 228
const-class p0, Lokio/AsyncTimeout;
.line 328
monitor-enter p0
.line 230
:try_start_0
invoke-static {}, Lokio/AsyncTimeout;->access$getHead$cp()Lokio/AsyncTimeout;
move-result-object v0
if-nez v0, :cond_0
.line 231
new-instance v0, Lokio/AsyncTimeout;
invoke-direct {v0}, Lokio/AsyncTimeout;-><init>()V
invoke-static {v0}, Lokio/AsyncTimeout;->access$setHead$cp(Lokio/AsyncTimeout;)V
.line 232
new-instance v0, Lokio/AsyncTimeout$Watchdog;
invoke-direct {v0}, Lokio/AsyncTimeout$Watchdog;-><init>()V
invoke-virtual {v0}, Lokio/AsyncTimeout$Watchdog;->start()V
.line 235
:cond_0
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v0
const-wide/16 v2, 0x0
cmp-long v2, p2, v2
if-eqz v2, :cond_1
if-eqz p4, :cond_1
.line 239
invoke-virtual {p1}, Lokio/AsyncTimeout;->deadlineNanoTime()J
move-result-wide v2
sub-long/2addr v2, v0
invoke-static {p2, p3, v2, v3}, Ljava/lang/Math;->min(JJ)J
move-result-wide p2
add-long/2addr p2, v0
invoke-static {p1, p2, p3}, Lokio/AsyncTimeout;->access$setTimeoutAt$p(Lokio/AsyncTimeout;J)V
goto :goto_0
:cond_1
if-eqz v2, :cond_2
add-long/2addr p2, v0
.line 241
invoke-static {p1, p2, p3}, Lokio/AsyncTimeout;->access$setTimeoutAt$p(Lokio/AsyncTimeout;J)V
goto :goto_0
:cond_2
if-eqz p4, :cond_6
.line 243
invoke-virtual {p1}, Lokio/AsyncTimeout;->deadlineNanoTime()J
move-result-wide p2
invoke-static {p1, p2, p3}, Lokio/AsyncTimeout;->access$setTimeoutAt$p(Lokio/AsyncTimeout;J)V
.line 249
:goto_0
invoke-static {p1, v0, v1}, Lokio/AsyncTimeout;->access$remainingNanos(Lokio/AsyncTimeout;J)J
move-result-wide p2
.line 250
invoke-static {}, Lokio/AsyncTimeout;->access$getHead$cp()Lokio/AsyncTimeout;
move-result-object p4
invoke-static {p4}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
.line 252
:goto_1
invoke-static {p4}, Lokio/AsyncTimeout;->access$getNext$p(Lokio/AsyncTimeout;)Lokio/AsyncTimeout;
move-result-object v2
if-eqz v2, :cond_4
invoke-static {p4}, Lokio/AsyncTimeout;->access$getNext$p(Lokio/AsyncTimeout;)Lokio/AsyncTimeout;
move-result-object v2
invoke-static {v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
invoke-static {v2, v0, v1}, Lokio/AsyncTimeout;->access$remainingNanos(Lokio/AsyncTimeout;J)J
move-result-wide v2
cmp-long v2, p2, v2
if-gez v2, :cond_3
goto :goto_2
.line 261
:cond_3
invoke-static {p4}, Lokio/AsyncTimeout;->access$getNext$p(Lokio/AsyncTimeout;)Lokio/AsyncTimeout;
move-result-object p4
invoke-static {p4}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
goto :goto_1
.line 253
:cond_4
:goto_2
invoke-static {p4}, Lokio/AsyncTimeout;->access$getNext$p(Lokio/AsyncTimeout;)Lokio/AsyncTimeout;
move-result-object p2
invoke-static {p1, p2}, Lokio/AsyncTimeout;->access$setNext$p(Lokio/AsyncTimeout;Lokio/AsyncTimeout;)V
.line 254
invoke-static {p4, p1}, Lokio/AsyncTimeout;->access$setNext$p(Lokio/AsyncTimeout;Lokio/AsyncTimeout;)V
.line 255
invoke-static {}, Lokio/AsyncTimeout;->access$getHead$cp()Lokio/AsyncTimeout;
move-result-object p1
if-ne p4, p1, :cond_5
.line 257
const-class p1, Lokio/AsyncTimeout;
check-cast p1, Ljava/lang/Object;
invoke-virtual {p1}, Ljava/lang/Object;->notify()V
.line 263
:cond_5
sget-object p1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
monitor-exit p0
return-void
.line 245
:cond_6
:try_start_1
new-instance p1, Ljava/lang/AssertionError;
invoke-direct {p1}, Ljava/lang/AssertionError;-><init>()V
check-cast p1, Ljava/lang/Throwable;
throw p1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
:catchall_0
move-exception p1
.line 263
monitor-exit p0
throw p1
.end method
# virtual methods
.method public final awaitTimeout$okio()Lokio/AsyncTimeout;
.locals 7
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/InterruptedException;
}
.end annotation
.line 295
invoke-static {}, Lokio/AsyncTimeout;->access$getHead$cp()Lokio/AsyncTimeout;
move-result-object p0
invoke-static {p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
invoke-static {p0}, Lokio/AsyncTimeout;->access$getNext$p(Lokio/AsyncTimeout;)Lokio/AsyncTimeout;
move-result-object p0
const/4 v0, 0x0
if-nez p0, :cond_1
.line 299
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v1
.line 300
const-class p0, Lokio/AsyncTimeout;
check-cast p0, Ljava/lang/Object;
invoke-static {}, Lokio/AsyncTimeout;->access$getIDLE_TIMEOUT_MILLIS$cp()J
move-result-wide v3
invoke-virtual {p0, v3, v4}, Ljava/lang/Object;->wait(J)V
.line 301
invoke-static {}, Lokio/AsyncTimeout;->access$getHead$cp()Lokio/AsyncTimeout;
move-result-object p0
invoke-static {p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
invoke-static {p0}, Lokio/AsyncTimeout;->access$getNext$p(Lokio/AsyncTimeout;)Lokio/AsyncTimeout;
move-result-object p0
if-nez p0, :cond_0
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v3
sub-long/2addr v3, v1
invoke-static {}, Lokio/AsyncTimeout;->access$getIDLE_TIMEOUT_NANOS$cp()J
move-result-wide v1
cmp-long p0, v3, v1
if-ltz p0, :cond_0
.line 302
invoke-static {}, Lokio/AsyncTimeout;->access$getHead$cp()Lokio/AsyncTimeout;
move-result-object v0
:cond_0
return-object v0
.line 308
:cond_1
invoke-static {}, Ljava/lang/System;->nanoTime()J
move-result-wide v1
invoke-static {p0, v1, v2}, Lokio/AsyncTimeout;->access$remainingNanos(Lokio/AsyncTimeout;J)J
move-result-wide v1
const-wide/16 v3, 0x0
cmp-long v3, v1, v3
if-lez v3, :cond_2
const-wide/32 v3, 0xf4240
.line 314
div-long v5, v1, v3
mul-long/2addr v3, v5
sub-long/2addr v1, v3
.line 316
const-class p0, Lokio/AsyncTimeout;
check-cast p0, Ljava/lang/Object;
long-to-int v1, v1
invoke-virtual {p0, v5, v6, v1}, Ljava/lang/Object;->wait(JI)V
return-object v0
.line 321
:cond_2
invoke-static {}, Lokio/AsyncTimeout;->access$getHead$cp()Lokio/AsyncTimeout;
move-result-object v1
invoke-static {v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
invoke-static {p0}, Lokio/AsyncTimeout;->access$getNext$p(Lokio/AsyncTimeout;)Lokio/AsyncTimeout;
move-result-object v2
invoke-static {v1, v2}, Lokio/AsyncTimeout;->access$setNext$p(Lokio/AsyncTimeout;Lokio/AsyncTimeout;)V
.line 322
move-object v1, v0
check-cast v1, Lokio/AsyncTimeout;
invoke-static {p0, v0}, Lokio/AsyncTimeout;->access$setNext$p(Lokio/AsyncTimeout;Lokio/AsyncTimeout;)V
return-object p0
.end method