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

1164 lines
26 KiB
Smali

.class public final Lokio/Pipe$sink$1;
.super Ljava/lang/Object;
.source "Pipe.kt"
# interfaces
.implements Lokio/Sink;
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lokio/Pipe;-><init>(J)V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = null
.end annotation
.annotation system Ldalvik/annotation/SourceDebugExtension;
value = "SMAP\nPipe.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Pipe.kt\nokio/Pipe$sink$1\n+ 2 -Platform.kt\nokio/-Platform\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 4 Pipe.kt\nokio/Pipe\n+ 5 Timeout.kt\nokio/Timeout\n*L\n1#1,248:1\n28#2:249\n28#2:283\n28#2:316\n1#3:250\n210#4:251\n211#4:282\n210#4:284\n211#4:315\n210#4:317\n211#4:348\n186#5,30:252\n186#5,30:285\n186#5,30:318\n*E\n*S KotlinDebug\n*F\n+ 1 Pipe.kt\nokio/Pipe$sink$1\n*L\n54#1:249\n85#1:283\n104#1:316\n80#1:251\n80#1:282\n99#1:284\n99#1:315\n117#1:317\n117#1:348\n80#1,30:252\n99#1,30:285\n117#1,30:318\n*E\n"
.end annotation
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u0000%\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0000*\u0001\u0000\u0008\n\u0018\u00002\u00020\u0001J\u0008\u0010\u0004\u001a\u00020\u0005H\u0016J\u0008\u0010\u0006\u001a\u00020\u0005H\u0016J\u0008\u0010\u0002\u001a\u00020\u0003H\u0016J\u0018\u0010\u0007\u001a\u00020\u00052\u0006\u0010\u0008\u001a\u00020\t2\u0006\u0010\n\u001a\u00020\u000bH\u0016R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u000c"
}
d2 = {
"okio/Pipe$sink$1",
"Lokio/Sink;",
"timeout",
"Lokio/Timeout;",
"close",
"",
"flush",
"write",
"source",
"Lokio/Buffer;",
"byteCount",
"",
"okio"
}
k = 0x1
mv = {
0x1,
0x4,
0x0
}
.end annotation
# instance fields
.field final synthetic this$0:Lokio/Pipe;
.field private final timeout:Lokio/Timeout;
# direct methods
.method constructor <init>(Lokio/Pipe;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"()V"
}
.end annotation
iput-object p1, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 48
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 49
new-instance p1, Lokio/Timeout;
invoke-direct {p1}, Lokio/Timeout;-><init>()V
iput-object p1, p0, Lokio/Pipe$sink$1;->timeout:Lokio/Timeout;
return-void
.end method
# virtual methods
.method public close()V
.locals 10
const/4 v0, 0x0
.line 103
move-object v1, v0
check-cast v1, Lokio/Sink;
iget-object v1, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 104
invoke-virtual {v1}, Lokio/Pipe;->getBuffer$okio()Lokio/Buffer;
move-result-object v1
.line 316
monitor-enter v1
:try_start_0
iget-object v2, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 105
invoke-virtual {v2}, Lokio/Pipe;->getSinkClosed$okio()Z
move-result v2
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_2
if-eqz v2, :cond_0
monitor-exit v1
return-void
:cond_0
:try_start_1
iget-object v2, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 107
invoke-virtual {v2}, Lokio/Pipe;->getFoldedSink$okio()Lokio/Sink;
move-result-object v2
if-eqz v2, :cond_1
move-object v0, v2
goto :goto_1
:cond_1
iget-object v2, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 112
invoke-virtual {v2}, Lokio/Pipe;->getSourceClosed$okio()Z
move-result v2
if-eqz v2, :cond_3
iget-object v2, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
invoke-virtual {v2}, Lokio/Pipe;->getBuffer$okio()Lokio/Buffer;
move-result-object v2
invoke-virtual {v2}, Lokio/Buffer;->size()J
move-result-wide v2
const-wide/16 v4, 0x0
cmp-long v2, v2, v4
if-gtz v2, :cond_2
goto :goto_0
:cond_2
new-instance p0, Ljava/io/IOException;
const-string v0, "source is closed"
invoke-direct {p0, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
:cond_3
:goto_0
iget-object v2, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
const/4 v3, 0x1
.line 113
invoke-virtual {v2, v3}, Lokio/Pipe;->setSinkClosed$okio(Z)V
iget-object v2, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 114
invoke-virtual {v2}, Lokio/Pipe;->getBuffer$okio()Lokio/Buffer;
move-result-object v2
if-eqz v2, :cond_a
check-cast v2, Ljava/lang/Object;
invoke-virtual {v2}, Ljava/lang/Object;->notifyAll()V
.line 115
:goto_1
sget-object v2, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_2
monitor-exit v1
if-eqz v0, :cond_9
iget-object p0, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 317
invoke-interface {v0}, Lokio/Sink;->timeout()Lokio/Timeout;
move-result-object v1
invoke-virtual {p0}, Lokio/Pipe;->sink()Lokio/Sink;
move-result-object p0
invoke-interface {p0}, Lokio/Sink;->timeout()Lokio/Timeout;
move-result-object p0
.line 318
invoke-virtual {v1}, Lokio/Timeout;->timeoutNanos()J
move-result-wide v2
.line 319
sget-object v4, Lokio/Timeout;->Companion:Lokio/Timeout$Companion;
invoke-virtual {p0}, Lokio/Timeout;->timeoutNanos()J
move-result-wide v5
invoke-virtual {v1}, Lokio/Timeout;->timeoutNanos()J
move-result-wide v7
invoke-virtual {v4, v5, v6, v7, v8}, Lokio/Timeout$Companion;->minTimeout(JJ)J
move-result-wide v4
sget-object v6, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v1, v4, v5, v6}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
.line 321
invoke-virtual {v1}, Lokio/Timeout;->hasDeadline()Z
move-result v4
if-eqz v4, :cond_6
.line 322
invoke-virtual {v1}, Lokio/Timeout;->deadlineNanoTime()J
move-result-wide v4
.line 323
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result v6
if-eqz v6, :cond_4
.line 324
invoke-virtual {v1}, Lokio/Timeout;->deadlineNanoTime()J
move-result-wide v6
invoke-virtual {p0}, Lokio/Timeout;->deadlineNanoTime()J
move-result-wide v8
invoke-static {v6, v7, v8, v9}, Ljava/lang/Math;->min(JJ)J
move-result-wide v6
invoke-virtual {v1, v6, v7}, Lokio/Timeout;->deadlineNanoTime(J)Lokio/Timeout;
.line 117
:cond_4
:try_start_2
invoke-interface {v0}, Lokio/Sink;->close()V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 329
sget-object v0, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v1, v2, v3, v0}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
.line 330
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result p0
if-eqz p0, :cond_9
.line 331
invoke-virtual {v1, v4, v5}, Lokio/Timeout;->deadlineNanoTime(J)Lokio/Timeout;
goto :goto_2
:catchall_0
move-exception v0
.line 329
sget-object v6, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v1, v2, v3, v6}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
.line 330
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result p0
if-eqz p0, :cond_5
.line 331
invoke-virtual {v1, v4, v5}, Lokio/Timeout;->deadlineNanoTime(J)Lokio/Timeout;
:cond_5
throw v0
.line 335
:cond_6
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result v4
if-eqz v4, :cond_7
.line 336
invoke-virtual {p0}, Lokio/Timeout;->deadlineNanoTime()J
move-result-wide v4
invoke-virtual {v1, v4, v5}, Lokio/Timeout;->deadlineNanoTime(J)Lokio/Timeout;
.line 117
:cond_7
:try_start_3
invoke-interface {v0}, Lokio/Sink;->close()V
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_1
.line 341
sget-object v0, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v1, v2, v3, v0}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
.line 342
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result p0
if-eqz p0, :cond_9
.line 343
invoke-virtual {v1}, Lokio/Timeout;->clearDeadline()Lokio/Timeout;
goto :goto_2
:catchall_1
move-exception v0
.line 341
sget-object v4, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v1, v2, v3, v4}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
.line 342
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result p0
if-eqz p0, :cond_8
.line 343
invoke-virtual {v1}, Lokio/Timeout;->clearDeadline()Lokio/Timeout;
:cond_8
throw v0
:cond_9
:goto_2
return-void
.line 114
:cond_a
:try_start_4
new-instance p0, Ljava/lang/NullPointerException;
const-string v0, "null cannot be cast to non-null type java.lang.Object"
invoke-direct {p0, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p0
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_2
:catchall_2
move-exception p0
.line 115
monitor-exit v1
throw p0
.end method
.method public flush()V
.locals 10
const/4 v0, 0x0
.line 84
move-object v1, v0
check-cast v1, Lokio/Sink;
iget-object v1, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 85
invoke-virtual {v1}, Lokio/Pipe;->getBuffer$okio()Lokio/Buffer;
move-result-object v1
.line 283
monitor-enter v1
:try_start_0
iget-object v2, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 86
invoke-virtual {v2}, Lokio/Pipe;->getSinkClosed$okio()Z
move-result v2
xor-int/lit8 v2, v2, 0x1
if-eqz v2, :cond_a
iget-object v2, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 87
invoke-virtual {v2}, Lokio/Pipe;->getCanceled$okio()Z
move-result v2
if-nez v2, :cond_9
iget-object v2, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 89
invoke-virtual {v2}, Lokio/Pipe;->getFoldedSink$okio()Lokio/Sink;
move-result-object v2
if-eqz v2, :cond_0
move-object v0, v2
goto :goto_0
:cond_0
iget-object v2, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 94
invoke-virtual {v2}, Lokio/Pipe;->getSourceClosed$okio()Z
move-result v2
if-eqz v2, :cond_2
iget-object v2, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
invoke-virtual {v2}, Lokio/Pipe;->getBuffer$okio()Lokio/Buffer;
move-result-object v2
invoke-virtual {v2}, Lokio/Buffer;->size()J
move-result-wide v2
const-wide/16 v4, 0x0
cmp-long v2, v2, v4
if-gtz v2, :cond_1
goto :goto_0
.line 95
:cond_1
new-instance p0, Ljava/io/IOException;
const-string v0, "source is closed"
invoke-direct {p0, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.line 97
:cond_2
:goto_0
sget-object v2, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_2
monitor-exit v1
if-eqz v0, :cond_8
iget-object p0, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 284
invoke-interface {v0}, Lokio/Sink;->timeout()Lokio/Timeout;
move-result-object v1
invoke-virtual {p0}, Lokio/Pipe;->sink()Lokio/Sink;
move-result-object p0
invoke-interface {p0}, Lokio/Sink;->timeout()Lokio/Timeout;
move-result-object p0
.line 285
invoke-virtual {v1}, Lokio/Timeout;->timeoutNanos()J
move-result-wide v2
.line 286
sget-object v4, Lokio/Timeout;->Companion:Lokio/Timeout$Companion;
invoke-virtual {p0}, Lokio/Timeout;->timeoutNanos()J
move-result-wide v5
invoke-virtual {v1}, Lokio/Timeout;->timeoutNanos()J
move-result-wide v7
invoke-virtual {v4, v5, v6, v7, v8}, Lokio/Timeout$Companion;->minTimeout(JJ)J
move-result-wide v4
sget-object v6, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v1, v4, v5, v6}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
.line 288
invoke-virtual {v1}, Lokio/Timeout;->hasDeadline()Z
move-result v4
if-eqz v4, :cond_5
.line 289
invoke-virtual {v1}, Lokio/Timeout;->deadlineNanoTime()J
move-result-wide v4
.line 290
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result v6
if-eqz v6, :cond_3
.line 291
invoke-virtual {v1}, Lokio/Timeout;->deadlineNanoTime()J
move-result-wide v6
invoke-virtual {p0}, Lokio/Timeout;->deadlineNanoTime()J
move-result-wide v8
invoke-static {v6, v7, v8, v9}, Ljava/lang/Math;->min(JJ)J
move-result-wide v6
invoke-virtual {v1, v6, v7}, Lokio/Timeout;->deadlineNanoTime(J)Lokio/Timeout;
.line 99
:cond_3
:try_start_1
invoke-interface {v0}, Lokio/Sink;->flush()V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 296
sget-object v0, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v1, v2, v3, v0}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
.line 297
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result p0
if-eqz p0, :cond_8
.line 298
invoke-virtual {v1, v4, v5}, Lokio/Timeout;->deadlineNanoTime(J)Lokio/Timeout;
goto :goto_1
:catchall_0
move-exception v0
.line 296
sget-object v6, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v1, v2, v3, v6}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
.line 297
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result p0
if-eqz p0, :cond_4
.line 298
invoke-virtual {v1, v4, v5}, Lokio/Timeout;->deadlineNanoTime(J)Lokio/Timeout;
:cond_4
throw v0
.line 302
:cond_5
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result v4
if-eqz v4, :cond_6
.line 303
invoke-virtual {p0}, Lokio/Timeout;->deadlineNanoTime()J
move-result-wide v4
invoke-virtual {v1, v4, v5}, Lokio/Timeout;->deadlineNanoTime(J)Lokio/Timeout;
.line 99
:cond_6
:try_start_2
invoke-interface {v0}, Lokio/Sink;->flush()V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
.line 308
sget-object v0, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v1, v2, v3, v0}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
.line 309
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result p0
if-eqz p0, :cond_8
.line 310
invoke-virtual {v1}, Lokio/Timeout;->clearDeadline()Lokio/Timeout;
goto :goto_1
:catchall_1
move-exception v0
.line 308
sget-object v4, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v1, v2, v3, v4}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
.line 309
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result p0
if-eqz p0, :cond_7
.line 310
invoke-virtual {v1}, Lokio/Timeout;->clearDeadline()Lokio/Timeout;
:cond_7
throw v0
:cond_8
:goto_1
return-void
.line 87
:cond_9
:try_start_3
new-instance p0, Ljava/io/IOException;
const-string v0, "canceled"
invoke-direct {p0, v0}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
:cond_a
const-string p0, "closed"
.line 86
new-instance v0, Ljava/lang/IllegalStateException;
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast v0, Ljava/lang/Throwable;
throw v0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_2
:catchall_2
move-exception p0
.line 97
monitor-exit v1
throw p0
.end method
.method public timeout()Lokio/Timeout;
.locals 0
iget-object p0, p0, Lokio/Pipe$sink$1;->timeout:Lokio/Timeout;
return-object p0
.end method
.method public write(Lokio/Buffer;J)V
.locals 10
const-string v0, "source"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const/4 v0, 0x0
.line 53
move-object v1, v0
check-cast v1, Lokio/Sink;
iget-object v1, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 54
invoke-virtual {v1}, Lokio/Pipe;->getBuffer$okio()Lokio/Buffer;
move-result-object v1
.line 249
monitor-enter v1
:try_start_0
iget-object v2, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 55
invoke-virtual {v2}, Lokio/Pipe;->getSinkClosed$okio()Z
move-result v2
xor-int/lit8 v2, v2, 0x1
if-eqz v2, :cond_d
iget-object v2, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 56
invoke-virtual {v2}, Lokio/Pipe;->getCanceled$okio()Z
move-result v2
if-nez v2, :cond_c
:goto_0
const-wide/16 v2, 0x0
cmp-long v4, p2, v2
if-lez v4, :cond_5
iget-object v4, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 59
invoke-virtual {v4}, Lokio/Pipe;->getFoldedSink$okio()Lokio/Sink;
move-result-object v4
if-eqz v4, :cond_0
move-object v0, v4
goto :goto_1
:cond_0
iget-object v4, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 64
invoke-virtual {v4}, Lokio/Pipe;->getSourceClosed$okio()Z
move-result v4
if-nez v4, :cond_4
iget-object v4, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 66
invoke-virtual {v4}, Lokio/Pipe;->getMaxBufferSize$okio()J
move-result-wide v4
iget-object v6, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
invoke-virtual {v6}, Lokio/Pipe;->getBuffer$okio()Lokio/Buffer;
move-result-object v6
invoke-virtual {v6}, Lokio/Buffer;->size()J
move-result-wide v6
sub-long/2addr v4, v6
cmp-long v2, v4, v2
if-nez v2, :cond_2
iget-object v2, p0, Lokio/Pipe$sink$1;->timeout:Lokio/Timeout;
iget-object v3, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 68
invoke-virtual {v3}, Lokio/Pipe;->getBuffer$okio()Lokio/Buffer;
move-result-object v3
invoke-virtual {v2, v3}, Lokio/Timeout;->waitUntilNotified(Ljava/lang/Object;)V
iget-object v2, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 69
invoke-virtual {v2}, Lokio/Pipe;->getCanceled$okio()Z
move-result v2
if-nez v2, :cond_1
goto :goto_0
:cond_1
new-instance p0, Ljava/io/IOException;
const-string p1, "canceled"
invoke-direct {p0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.line 73
:cond_2
invoke-static {v4, v5, p2, p3}, Ljava/lang/Math;->min(JJ)J
move-result-wide v2
iget-object v4, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 74
invoke-virtual {v4}, Lokio/Pipe;->getBuffer$okio()Lokio/Buffer;
move-result-object v4
invoke-virtual {v4, p1, v2, v3}, Lokio/Buffer;->write(Lokio/Buffer;J)V
sub-long/2addr p2, v2
iget-object v2, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 76
invoke-virtual {v2}, Lokio/Pipe;->getBuffer$okio()Lokio/Buffer;
move-result-object v2
if-eqz v2, :cond_3
check-cast v2, Ljava/lang/Object;
invoke-virtual {v2}, Ljava/lang/Object;->notifyAll()V
goto :goto_0
:cond_3
new-instance p0, Ljava/lang/NullPointerException;
const-string p1, "null cannot be cast to non-null type java.lang.Object"
invoke-direct {p0, p1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw p0
.line 64
:cond_4
new-instance p0, Ljava/io/IOException;
const-string p1, "source is closed"
invoke-direct {p0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.line 78
:cond_5
:goto_1
sget-object v2, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_2
monitor-exit v1
if-eqz v0, :cond_b
iget-object p0, p0, Lokio/Pipe$sink$1;->this$0:Lokio/Pipe;
.line 251
invoke-interface {v0}, Lokio/Sink;->timeout()Lokio/Timeout;
move-result-object v1
invoke-virtual {p0}, Lokio/Pipe;->sink()Lokio/Sink;
move-result-object p0
invoke-interface {p0}, Lokio/Sink;->timeout()Lokio/Timeout;
move-result-object p0
.line 252
invoke-virtual {v1}, Lokio/Timeout;->timeoutNanos()J
move-result-wide v2
.line 253
sget-object v4, Lokio/Timeout;->Companion:Lokio/Timeout$Companion;
invoke-virtual {p0}, Lokio/Timeout;->timeoutNanos()J
move-result-wide v5
invoke-virtual {v1}, Lokio/Timeout;->timeoutNanos()J
move-result-wide v7
invoke-virtual {v4, v5, v6, v7, v8}, Lokio/Timeout$Companion;->minTimeout(JJ)J
move-result-wide v4
sget-object v6, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v1, v4, v5, v6}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
.line 255
invoke-virtual {v1}, Lokio/Timeout;->hasDeadline()Z
move-result v4
if-eqz v4, :cond_8
.line 256
invoke-virtual {v1}, Lokio/Timeout;->deadlineNanoTime()J
move-result-wide v4
.line 257
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result v6
if-eqz v6, :cond_6
.line 258
invoke-virtual {v1}, Lokio/Timeout;->deadlineNanoTime()J
move-result-wide v6
invoke-virtual {p0}, Lokio/Timeout;->deadlineNanoTime()J
move-result-wide v8
invoke-static {v6, v7, v8, v9}, Ljava/lang/Math;->min(JJ)J
move-result-wide v6
invoke-virtual {v1, v6, v7}, Lokio/Timeout;->deadlineNanoTime(J)Lokio/Timeout;
.line 80
:cond_6
:try_start_1
invoke-interface {v0, p1, p2, p3}, Lokio/Sink;->write(Lokio/Buffer;J)V
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 263
sget-object p1, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v1, v2, v3, p1}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
.line 264
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result p0
if-eqz p0, :cond_b
.line 265
invoke-virtual {v1, v4, v5}, Lokio/Timeout;->deadlineNanoTime(J)Lokio/Timeout;
goto :goto_2
:catchall_0
move-exception p1
.line 263
sget-object p2, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v1, v2, v3, p2}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
.line 264
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result p0
if-eqz p0, :cond_7
.line 265
invoke-virtual {v1, v4, v5}, Lokio/Timeout;->deadlineNanoTime(J)Lokio/Timeout;
:cond_7
throw p1
.line 269
:cond_8
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result v4
if-eqz v4, :cond_9
.line 270
invoke-virtual {p0}, Lokio/Timeout;->deadlineNanoTime()J
move-result-wide v4
invoke-virtual {v1, v4, v5}, Lokio/Timeout;->deadlineNanoTime(J)Lokio/Timeout;
.line 80
:cond_9
:try_start_2
invoke-interface {v0, p1, p2, p3}, Lokio/Sink;->write(Lokio/Buffer;J)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_1
.line 275
sget-object p1, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v1, v2, v3, p1}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
.line 276
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result p0
if-eqz p0, :cond_b
.line 277
invoke-virtual {v1}, Lokio/Timeout;->clearDeadline()Lokio/Timeout;
goto :goto_2
:catchall_1
move-exception p1
.line 275
sget-object p2, Ljava/util/concurrent/TimeUnit;->NANOSECONDS:Ljava/util/concurrent/TimeUnit;
invoke-virtual {v1, v2, v3, p2}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
.line 276
invoke-virtual {p0}, Lokio/Timeout;->hasDeadline()Z
move-result p0
if-eqz p0, :cond_a
.line 277
invoke-virtual {v1}, Lokio/Timeout;->clearDeadline()Lokio/Timeout;
:cond_a
throw p1
:cond_b
:goto_2
return-void
.line 56
:cond_c
:try_start_3
new-instance p0, Ljava/io/IOException;
const-string p1, "canceled"
invoke-direct {p0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
:cond_d
const-string p0, "closed"
.line 55
new-instance p1, Ljava/lang/IllegalStateException;
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {p1, p0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_2
:catchall_2
move-exception p0
.line 78
monitor-exit v1
throw p0
.end method