Rabbit-R1/original r1/smali/smali_classes3/okhttp3/internal/cache2/Relay$RelaySource.smali
2024-05-21 17:08:36 -04:00

853 lines
22 KiB
Smali

.class public final Lokhttp3/internal/cache2/Relay$RelaySource;
.super Ljava/lang/Object;
.source "Relay.kt"
# interfaces
.implements Lokio/Source;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/internal/cache2/Relay;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x11
name = "RelaySource"
.end annotation
.annotation system Ldalvik/annotation/SourceDebugExtension;
value = "SMAP\nRelay.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Relay.kt\nokhttp3/internal/cache2/Relay$RelaySource\n+ 2 Util.kt\nokhttp3/internal/Util\n*L\n1#1,356:1\n556#2:357\n*E\n*S KotlinDebug\n*F\n+ 1 Relay.kt\nokhttp3/internal/cache2/Relay$RelaySource\n*L\n267#1:357\n*E\n"
.end annotation
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u0000.\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\u0008\u0080\u0004\u0018\u00002\u00020\u0001B\u0005\u00a2\u0006\u0002\u0010\u0002J\u0008\u0010\t\u001a\u00020\nH\u0016J\u0018\u0010\u000b\u001a\u00020\u00062\u0006\u0010\u000c\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\u0006H\u0016J\u0008\u0010\u0007\u001a\u00020\u0008H\u0016R\u0010\u0010\u0003\u001a\u0004\u0018\u00010\u0004X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0006X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\u0008X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u000f"
}
d2 = {
"Lokhttp3/internal/cache2/Relay$RelaySource;",
"Lokio/Source;",
"(Lokhttp3/internal/cache2/Relay;)V",
"fileOperator",
"Lokhttp3/internal/cache2/FileOperator;",
"sourcePos",
"",
"timeout",
"Lokio/Timeout;",
"close",
"",
"read",
"sink",
"Lokio/Buffer;",
"byteCount",
"okhttp"
}
k = 0x1
mv = {
0x1,
0x4,
0x0
}
.end annotation
# instance fields
.field private fileOperator:Lokhttp3/internal/cache2/FileOperator;
.field private sourcePos:J
.field final synthetic this$0:Lokhttp3/internal/cache2/Relay;
.field private final timeout:Lokio/Timeout;
# direct methods
.method public constructor <init>(Lokhttp3/internal/cache2/Relay;)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()V"
}
.end annotation
iput-object p1, p0, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 156
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 157
new-instance v0, Lokio/Timeout;
invoke-direct {v0}, Lokio/Timeout;-><init>()V
iput-object v0, p0, Lokhttp3/internal/cache2/Relay$RelaySource;->timeout:Lokio/Timeout;
.line 160
new-instance v0, Lokhttp3/internal/cache2/FileOperator;
invoke-virtual {p1}, Lokhttp3/internal/cache2/Relay;->getFile()Ljava/io/RandomAccessFile;
move-result-object p1
invoke-static {p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
invoke-virtual {p1}, Ljava/io/RandomAccessFile;->getChannel()Ljava/nio/channels/FileChannel;
move-result-object p1
const-string v1, "file!!.channel"
invoke-static {p1, v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-direct {v0, p1}, Lokhttp3/internal/cache2/FileOperator;-><init>(Ljava/nio/channels/FileChannel;)V
iput-object v0, p0, Lokhttp3/internal/cache2/Relay$RelaySource;->fileOperator:Lokhttp3/internal/cache2/FileOperator;
return-void
.end method
# virtual methods
.method public close()V
.locals 4
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
iget-object v0, p0, Lokhttp3/internal/cache2/Relay$RelaySource;->fileOperator:Lokhttp3/internal/cache2/FileOperator;
if-nez v0, :cond_0
return-void
:cond_0
const/4 v0, 0x0
.line 277
move-object v1, v0
check-cast v1, Lokhttp3/internal/cache2/FileOperator;
iput-object v0, p0, Lokhttp3/internal/cache2/Relay$RelaySource;->fileOperator:Lokhttp3/internal/cache2/FileOperator;
.line 279
move-object v1, v0
check-cast v1, Ljava/io/RandomAccessFile;
iget-object v1, p0, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 280
monitor-enter v1
:try_start_0
iget-object v2, p0, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 281
invoke-virtual {v2}, Lokhttp3/internal/cache2/Relay;->getSourceCount()I
move-result v3
add-int/lit8 v3, v3, -0x1
invoke-virtual {v2, v3}, Lokhttp3/internal/cache2/Relay;->setSourceCount(I)V
iget-object v2, p0, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 282
invoke-virtual {v2}, Lokhttp3/internal/cache2/Relay;->getSourceCount()I
move-result v2
if-nez v2, :cond_1
iget-object v2, p0, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 283
invoke-virtual {v2}, Lokhttp3/internal/cache2/Relay;->getFile()Ljava/io/RandomAccessFile;
move-result-object v2
iget-object p0, p0, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 284
move-object v3, v0
check-cast v3, Ljava/io/RandomAccessFile;
invoke-virtual {p0, v0}, Lokhttp3/internal/cache2/Relay;->setFile(Ljava/io/RandomAccessFile;)V
move-object v0, v2
.line 286
:cond_1
sget-object p0, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 280
monitor-exit v1
if-eqz v0, :cond_2
.line 288
check-cast v0, Ljava/io/Closeable;
invoke-static {v0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
:cond_2
return-void
:catchall_0
move-exception p0
.line 280
monitor-exit v1
throw p0
.end method
.method public read(Lokio/Buffer;J)J
.locals 19
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
move-object/from16 v1, p0
move-wide/from16 v2, p2
const-string v0, "sink"
move-object/from16 v5, p1
invoke-static {v5, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->fileOperator:Lokhttp3/internal/cache2/FileOperator;
const/4 v4, 0x1
if-eqz v0, :cond_0
move v0, v4
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_b
iget-object v8, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 190
monitor-enter v8
:goto_1
:try_start_0
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 193
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getUpstreamPos()J
move-result-wide v6
iget-wide v9, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->sourcePos:J
cmp-long v0, v9, v6
const/4 v6, 0x2
const-wide/16 v9, -0x1
if-eqz v0, :cond_2
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 210
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getUpstreamPos()J
move-result-wide v11
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getBuffer()Lokio/Buffer;
move-result-object v0
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v13
sub-long/2addr v11, v13
iget-wide v13, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->sourcePos:J
cmp-long v0, v13, v11
if-gez v0, :cond_1
move v4, v6
goto :goto_2
:cond_1
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 218
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getUpstreamPos()J
move-result-wide v6
iget-wide v9, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->sourcePos:J
sub-long/2addr v6, v9
invoke-static {v2, v3, v6, v7}, Ljava/lang/Math;->min(JJ)J
move-result-wide v9
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 219
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getBuffer()Lokio/Buffer;
move-result-object v2
iget-wide v3, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->sourcePos:J
sub-long v6, v3, v11
move-object/from16 v3, p1
move-wide v4, v6
move-wide v6, v9
invoke-virtual/range {v2 .. v7}, Lokio/Buffer;->copyTo(Lokio/Buffer;JJ)Lokio/Buffer;
iget-wide v2, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->sourcePos:J
add-long/2addr v2, v9
iput-wide v2, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->sourcePos:J
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_5
.line 221
monitor-exit v8
return-wide v9
:cond_2
:try_start_1
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 197
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getComplete()Z
move-result v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_5
if-eqz v0, :cond_3
monitor-exit v8
return-wide v9
:cond_3
:try_start_2
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 200
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getUpstreamReader()Ljava/lang/Thread;
move-result-object v0
if-eqz v0, :cond_4
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->timeout:Lokio/Timeout;
iget-object v6, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 201
invoke-virtual {v0, v6}, Lokio/Timeout;->waitUntilNotified(Ljava/lang/Object;)V
goto :goto_1
:cond_4
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 206
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
move-result-object v7
invoke-virtual {v0, v7}, Lokhttp3/internal/cache2/Relay;->setUpstreamReader(Ljava/lang/Thread;)V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_5
.line 190
:goto_2
monitor-exit v8
const-wide/16 v11, 0x20
if-ne v4, v6, :cond_5
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 226
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getUpstreamPos()J
move-result-wide v6
iget-wide v8, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->sourcePos:J
sub-long/2addr v6, v8
invoke-static {v2, v3, v6, v7}, Ljava/lang/Math;->min(JJ)J
move-result-wide v8
iget-object v2, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->fileOperator:Lokhttp3/internal/cache2/FileOperator;
.line 227
invoke-static {v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
iget-wide v3, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->sourcePos:J
add-long/2addr v3, v11
move-object/from16 v5, p1
move-wide v6, v8
invoke-virtual/range {v2 .. v7}, Lokhttp3/internal/cache2/FileOperator;->read(JLokio/Buffer;J)V
iget-wide v2, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->sourcePos:J
add-long/2addr v2, v8
iput-wide v2, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->sourcePos:J
return-wide v8
:cond_5
const/4 v8, 0x0
:try_start_3
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 235
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getUpstream()Lokio/Source;
move-result-object v0
invoke-static {v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
iget-object v4, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
invoke-virtual {v4}, Lokhttp3/internal/cache2/Relay;->getUpstreamBuffer()Lokio/Buffer;
move-result-object v4
iget-object v6, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
invoke-virtual {v6}, Lokhttp3/internal/cache2/Relay;->getBufferMaxSize()J
move-result-wide v6
invoke-interface {v0, v4, v6, v7}, Lokio/Source;->read(Lokio/Buffer;J)J
move-result-wide v14
cmp-long v0, v14, v9
if-nez v0, :cond_7
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 239
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getUpstreamPos()J
move-result-wide v2
invoke-virtual {v0, v2, v3}, Lokhttp3/internal/cache2/Relay;->commit(J)V
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_3
iget-object v2, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 265
monitor-enter v2
:try_start_4
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 266
move-object v3, v8
check-cast v3, Ljava/lang/Thread;
invoke-virtual {v0, v8}, Lokhttp3/internal/cache2/Relay;->setUpstreamReader(Ljava/lang/Thread;)V
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
if-eqz v0, :cond_6
.line 357
check-cast v0, Ljava/lang/Object;
invoke-virtual {v0}, Ljava/lang/Object;->notifyAll()V
.line 268
sget-object v0, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_0
.line 265
monitor-exit v2
return-wide v9
.line 357
:cond_6
:try_start_5
new-instance v0, Ljava/lang/NullPointerException;
const-string v1, "null cannot be cast to non-null type java.lang.Object"
invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw v0
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_0
:catchall_0
move-exception v0
.line 265
monitor-exit v2
throw v0
.line 244
:cond_7
:try_start_6
invoke-static {v14, v15, v2, v3}, Ljava/lang/Math;->min(JJ)J
move-result-wide v9
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 245
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getUpstreamBuffer()Lokio/Buffer;
move-result-object v2
const-wide/16 v6, 0x0
move-object/from16 v3, p1
move-wide v4, v6
move-wide v6, v9
invoke-virtual/range {v2 .. v7}, Lokio/Buffer;->copyTo(Lokio/Buffer;JJ)Lokio/Buffer;
iget-wide v2, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->sourcePos:J
add-long/2addr v2, v9
iput-wide v2, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->sourcePos:J
iget-object v13, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->fileOperator:Lokhttp3/internal/cache2/FileOperator;
.line 249
invoke-static {v13}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 250
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getUpstreamPos()J
move-result-wide v2
add-long/2addr v2, v11
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getUpstreamBuffer()Lokio/Buffer;
move-result-object v0
invoke-virtual {v0}, Lokio/Buffer;->clone()Lokio/Buffer;
move-result-object v16
move-wide v4, v14
move-wide v14, v2
move-wide/from16 v17, v4
.line 249
invoke-virtual/range {v13 .. v18}, Lokhttp3/internal/cache2/FileOperator;->write(JLokio/Buffer;J)V
iget-object v2, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 252
monitor-enter v2
:try_end_6
.catchall {:try_start_6 .. :try_end_6} :catchall_3
:try_start_7
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 254
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getBuffer()Lokio/Buffer;
move-result-object v0
iget-object v3, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
invoke-virtual {v3}, Lokhttp3/internal/cache2/Relay;->getUpstreamBuffer()Lokio/Buffer;
move-result-object v3
invoke-virtual {v0, v3, v4, v5}, Lokio/Buffer;->write(Lokio/Buffer;J)V
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 255
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getBuffer()Lokio/Buffer;
move-result-object v0
invoke-virtual {v0}, Lokio/Buffer;->size()J
move-result-wide v6
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getBufferMaxSize()J
move-result-wide v11
cmp-long v0, v6, v11
if-lez v0, :cond_8
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 256
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getBuffer()Lokio/Buffer;
move-result-object v0
iget-object v3, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
invoke-virtual {v3}, Lokhttp3/internal/cache2/Relay;->getBuffer()Lokio/Buffer;
move-result-object v3
invoke-virtual {v3}, Lokio/Buffer;->size()J
move-result-wide v6
iget-object v3, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
invoke-virtual {v3}, Lokhttp3/internal/cache2/Relay;->getBufferMaxSize()J
move-result-wide v11
sub-long/2addr v6, v11
invoke-virtual {v0, v6, v7}, Lokio/Buffer;->skip(J)V
:cond_8
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 260
invoke-virtual {v0}, Lokhttp3/internal/cache2/Relay;->getUpstreamPos()J
move-result-wide v6
add-long/2addr v6, v4
invoke-virtual {v0, v6, v7}, Lokhttp3/internal/cache2/Relay;->setUpstreamPos(J)V
.line 261
sget-object v0, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
:try_end_7
.catchall {:try_start_7 .. :try_end_7} :catchall_2
.line 252
:try_start_8
monitor-exit v2
:try_end_8
.catchall {:try_start_8 .. :try_end_8} :catchall_3
iget-object v2, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 265
monitor-enter v2
:try_start_9
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 266
move-object v3, v8
check-cast v3, Ljava/lang/Thread;
invoke-virtual {v0, v8}, Lokhttp3/internal/cache2/Relay;->setUpstreamReader(Ljava/lang/Thread;)V
iget-object v0, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
if-eqz v0, :cond_9
.line 357
check-cast v0, Ljava/lang/Object;
invoke-virtual {v0}, Ljava/lang/Object;->notifyAll()V
.line 268
sget-object v0, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
:try_end_9
.catchall {:try_start_9 .. :try_end_9} :catchall_1
.line 265
monitor-exit v2
return-wide v9
.line 357
:cond_9
:try_start_a
new-instance v0, Ljava/lang/NullPointerException;
const-string v1, "null cannot be cast to non-null type java.lang.Object"
invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw v0
:try_end_a
.catchall {:try_start_a .. :try_end_a} :catchall_1
:catchall_1
move-exception v0
.line 265
monitor-exit v2
throw v0
:catchall_2
move-exception v0
.line 252
:try_start_b
monitor-exit v2
throw v0
:try_end_b
.catchall {:try_start_b .. :try_end_b} :catchall_3
:catchall_3
move-exception v0
iget-object v2, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 265
monitor-enter v2
:try_start_c
iget-object v3, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
.line 266
move-object v4, v8
check-cast v4, Ljava/lang/Thread;
invoke-virtual {v3, v8}, Lokhttp3/internal/cache2/Relay;->setUpstreamReader(Ljava/lang/Thread;)V
iget-object v1, v1, Lokhttp3/internal/cache2/Relay$RelaySource;->this$0:Lokhttp3/internal/cache2/Relay;
if-nez v1, :cond_a
.line 357
new-instance v0, Ljava/lang/NullPointerException;
const-string v1, "null cannot be cast to non-null type java.lang.Object"
invoke-direct {v0, v1}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
throw v0
:cond_a
check-cast v1, Ljava/lang/Object;
invoke-virtual {v1}, Ljava/lang/Object;->notifyAll()V
.line 268
sget-object v1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit;
:try_end_c
.catchall {:try_start_c .. :try_end_c} :catchall_4
.line 265
monitor-exit v2
throw v0
:catchall_4
move-exception v0
monitor-exit v2
throw v0
:catchall_5
move-exception v0
.line 190
monitor-exit v8
throw v0
:cond_b
const-string v0, "Check failed."
.line 188
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
check-cast v1, Ljava/lang/Throwable;
throw v1
.end method
.method public timeout()Lokio/Timeout;
.locals 0
iget-object p0, p0, Lokhttp3/internal/cache2/Relay$RelaySource;->timeout:Lokio/Timeout;
return-object p0
.end method