p.smali

.class public final Lokhttp3/internal/http2/p;
.super Ljava/lang/Object;
.source "Http2Stream.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lokhttp3/internal/http2/p$c;,
        Lokhttp3/internal/http2/p$a;,
        Lokhttp3/internal/http2/p$b;
    }
.end annotation


# instance fields
.field a:J

.field b:J

.field final c:I

.field final d:Lokhttp3/internal/http2/k;

.field private final e:Ljava/util/Deque;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Deque<",
            "Lokhttp3/u;",
            ">;"
        }
    .end annotation
.end field

.field private f:Lokhttp3/internal/http2/Header$Listener;

.field private g:Z

.field private final h:Lokhttp3/internal/http2/p$b;

.field final i:Lokhttp3/internal/http2/p$a;

.field final j:Lokhttp3/internal/http2/p$c;

.field final k:Lokhttp3/internal/http2/p$c;

.field l:Lokhttp3/internal/http2/ErrorCode;


# direct methods
.method constructor <init>(ILokhttp3/internal/http2/k;ZZLokhttp3/u;)V
    .registers 8

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const-wide/16 v0, 0x0

    .line 2
    iput-wide v0, p0, Lokhttp3/internal/http2/p;->a:J

    .line 3
    new-instance v0, Ljava/util/ArrayDeque;

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

    iput-object v0, p0, Lokhttp3/internal/http2/p;->e:Ljava/util/Deque;

    .line 4
    new-instance v0, Lokhttp3/internal/http2/p$c;

    invoke-direct {v0, p0}, Lokhttp3/internal/http2/p$c;-><init>(Lokhttp3/internal/http2/p;)V

    iput-object v0, p0, Lokhttp3/internal/http2/p;->j:Lokhttp3/internal/http2/p$c;

    .line 5
    new-instance v0, Lokhttp3/internal/http2/p$c;

    invoke-direct {v0, p0}, Lokhttp3/internal/http2/p$c;-><init>(Lokhttp3/internal/http2/p;)V

    iput-object v0, p0, Lokhttp3/internal/http2/p;->k:Lokhttp3/internal/http2/p$c;

    const/4 v0, 0x0

    .line 6
    iput-object v0, p0, Lokhttp3/internal/http2/p;->l:Lokhttp3/internal/http2/ErrorCode;

    if-eqz p2, :cond_75

    .line 7
    iput p1, p0, Lokhttp3/internal/http2/p;->c:I

    .line 8
    iput-object p2, p0, Lokhttp3/internal/http2/p;->d:Lokhttp3/internal/http2/k;

    .line 9
    iget-object p1, p2, Lokhttp3/internal/http2/k;->v:Lokhttp3/internal/http2/t;

    .line 10
    invoke-virtual {p1}, Lokhttp3/internal/http2/t;->c()I

    move-result p1

    int-to-long v0, p1

    iput-wide v0, p0, Lokhttp3/internal/http2/p;->b:J

    .line 11
    new-instance p1, Lokhttp3/internal/http2/p$b;

    iget-object p2, p2, Lokhttp3/internal/http2/k;->u:Lokhttp3/internal/http2/t;

    invoke-virtual {p2}, Lokhttp3/internal/http2/t;->c()I

    move-result p2

    int-to-long v0, p2

    invoke-direct {p1, p0, v0, v1}, Lokhttp3/internal/http2/p$b;-><init>(Lokhttp3/internal/http2/p;J)V

    iput-object p1, p0, Lokhttp3/internal/http2/p;->h:Lokhttp3/internal/http2/p$b;

    .line 12
    new-instance p1, Lokhttp3/internal/http2/p$a;

    invoke-direct {p1, p0}, Lokhttp3/internal/http2/p$a;-><init>(Lokhttp3/internal/http2/p;)V

    iput-object p1, p0, Lokhttp3/internal/http2/p;->i:Lokhttp3/internal/http2/p$a;

    .line 13
    iget-object p1, p0, Lokhttp3/internal/http2/p;->h:Lokhttp3/internal/http2/p$b;

    iput-boolean p4, p1, Lokhttp3/internal/http2/p$b;->e:Z

    .line 14
    iget-object p1, p0, Lokhttp3/internal/http2/p;->i:Lokhttp3/internal/http2/p$a;

    iput-boolean p3, p1, Lokhttp3/internal/http2/p$a;->c:Z

    if-eqz p5, :cond_52

    .line 15
    iget-object p1, p0, Lokhttp3/internal/http2/p;->e:Ljava/util/Deque;

    invoke-interface {p1, p5}, Ljava/util/Deque;->add(Ljava/lang/Object;)Z

    .line 16
    :cond_52
    invoke-virtual {p0}, Lokhttp3/internal/http2/p;->f()Z

    move-result p1

    if-eqz p1, :cond_63

    if-nez p5, :cond_5b

    goto :goto_63

    .line 17
    :cond_5b
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string p2, "locally-initiated streams shouldn\'t have headers yet"

    invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw p1

    .line 18
    :cond_63
    :goto_63
    invoke-virtual {p0}, Lokhttp3/internal/http2/p;->f()Z

    move-result p1

    if-nez p1, :cond_74

    if-eqz p5, :cond_6c

    goto :goto_74

    .line 19
    :cond_6c
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string p2, "remotely-initiated streams should have headers"

    invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw p1

    :cond_74
    :goto_74
    return-void

    .line 20
    :cond_75
    new-instance p1, Ljava/lang/NullPointerException;

    const-string p2, "connection == null"

    invoke-direct {p1, p2}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method static synthetic a(Lokhttp3/internal/http2/p;)Ljava/util/Deque;
    .registers 1

    .line 1
    iget-object p0, p0, Lokhttp3/internal/http2/p;->e:Ljava/util/Deque;

    return-object p0
.end method

.method static synthetic b(Lokhttp3/internal/http2/p;)Lokhttp3/internal/http2/Header$Listener;
    .registers 1

    .line 1
    iget-object p0, p0, Lokhttp3/internal/http2/p;->f:Lokhttp3/internal/http2/Header$Listener;

    return-object p0
.end method

.method private d(Lokhttp3/internal/http2/ErrorCode;)Z
    .registers 4

    .line 7
    monitor-enter p0

    .line 8
    :try_start_1
    iget-object v0, p0, Lokhttp3/internal/http2/p;->l:Lokhttp3/internal/http2/ErrorCode;

    const/4 v1, 0x0

    if-eqz v0, :cond_8

    .line 9
    monitor-exit p0

    return v1

    .line 10
    :cond_8
    iget-object v0, p0, Lokhttp3/internal/http2/p;->h:Lokhttp3/internal/http2/p$b;

    iget-boolean v0, v0, Lokhttp3/internal/http2/p$b;->e:Z

    if-eqz v0, :cond_16

    iget-object v0, p0, Lokhttp3/internal/http2/p;->i:Lokhttp3/internal/http2/p$a;

    iget-boolean v0, v0, Lokhttp3/internal/http2/p$a;->c:Z

    if-eqz v0, :cond_16

    .line 11
    monitor-exit p0

    return v1

    .line 12
    :cond_16
    iput-object p1, p0, Lokhttp3/internal/http2/p;->l:Lokhttp3/internal/http2/ErrorCode;

    .line 13
    invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V

    .line 14
    monitor-exit p0
    :try_end_1c
    .catchall {:try_start_1 .. :try_end_1c} :catchall_25

    .line 15
    iget-object p1, p0, Lokhttp3/internal/http2/p;->d:Lokhttp3/internal/http2/k;

    iget v0, p0, Lokhttp3/internal/http2/p;->c:I

    invoke-virtual {p1, v0}, Lokhttp3/internal/http2/k;->c(I)Lokhttp3/internal/http2/p;

    const/4 p1, 0x1

    return p1

    :catchall_25
    move-exception p1

    .line 16
    :try_start_26
    monitor-exit p0
    :try_end_27
    .catchall {:try_start_26 .. :try_end_27} :catchall_25

    throw p1
.end method


# virtual methods
.method a()V
    .registers 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 13
    monitor-enter p0

    .line 14
    :try_start_1
    iget-object v0, p0, Lokhttp3/internal/http2/p;->h:Lokhttp3/internal/http2/p$b;

    iget-boolean v0, v0, Lokhttp3/internal/http2/p$b;->e:Z

    if-nez v0, :cond_1b

    iget-object v0, p0, Lokhttp3/internal/http2/p;->h:Lokhttp3/internal/http2/p$b;

    iget-boolean v0, v0, Lokhttp3/internal/http2/p$b;->d:Z

    if-eqz v0, :cond_1b

    iget-object v0, p0, Lokhttp3/internal/http2/p;->i:Lokhttp3/internal/http2/p$a;

    iget-boolean v0, v0, Lokhttp3/internal/http2/p$a;->c:Z

    if-nez v0, :cond_19

    iget-object v0, p0, Lokhttp3/internal/http2/p;->i:Lokhttp3/internal/http2/p$a;

    iget-boolean v0, v0, Lokhttp3/internal/http2/p$a;->b:Z

    if-eqz v0, :cond_1b

    :cond_19
    const/4 v0, 0x1

    goto :goto_1c

    :cond_1b
    const/4 v0, 0x0

    .line 15
    :goto_1c
    invoke-virtual {p0}, Lokhttp3/internal/http2/p;->g()Z

    move-result v1

    .line 16
    monitor-exit p0
    :try_end_21
    .catchall {:try_start_1 .. :try_end_21} :catchall_33

    if-eqz v0, :cond_29

    .line 17
    sget-object v0, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode;

    invoke-virtual {p0, v0}, Lokhttp3/internal/http2/p;->a(Lokhttp3/internal/http2/ErrorCode;)V

    goto :goto_32

    :cond_29
    if-nez v1, :cond_32

    .line 18
    iget-object v0, p0, Lokhttp3/internal/http2/p;->d:Lokhttp3/internal/http2/k;

    iget v1, p0, Lokhttp3/internal/http2/p;->c:I

    invoke-virtual {v0, v1}, Lokhttp3/internal/http2/k;->c(I)Lokhttp3/internal/http2/p;

    :cond_32
    :goto_32
    return-void

    :catchall_33
    move-exception v0

    .line 19
    :try_start_34
    monitor-exit p0
    :try_end_35
    .catchall {:try_start_34 .. :try_end_35} :catchall_33

    throw v0
.end method

.method a(J)V
    .registers 6

    .line 20
    iget-wide v0, p0, Lokhttp3/internal/http2/p;->b:J

    add-long/2addr v0, p1

    iput-wide v0, p0, Lokhttp3/internal/http2/p;->b:J

    const-wide/16 v0, 0x0

    cmp-long v2, p1, v0

    if-lez v2, :cond_e

    .line 21
    invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V

    :cond_e
    return-void
.end method

.method a(Ljava/util/List;)V
    .registers 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lokhttp3/internal/http2/Header;",
            ">;)V"
        }
    .end annotation

    .line 4
    monitor-enter p0

    const/4 v0, 0x1

    .line 5
    :try_start_2
    iput-boolean v0, p0, Lokhttp3/internal/http2/p;->g:Z

    .line 6
    iget-object v0, p0, Lokhttp3/internal/http2/p;->e:Ljava/util/Deque;

    invoke-static {p1}, Lokhttp3/a/e;->b(Ljava/util/List;)Lokhttp3/u;

    move-result-object p1

    invoke-interface {v0, p1}, Ljava/util/Deque;->add(Ljava/lang/Object;)Z

    .line 7
    invoke-virtual {p0}, Lokhttp3/internal/http2/p;->g()Z

    move-result p1

    .line 8
    invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V

    .line 9
    monitor-exit p0
    :try_end_15
    .catchall {:try_start_2 .. :try_end_15} :catchall_1f

    if-nez p1, :cond_1e

    .line 10
    iget-object p1, p0, Lokhttp3/internal/http2/p;->d:Lokhttp3/internal/http2/k;

    iget v0, p0, Lokhttp3/internal/http2/p;->c:I

    invoke-virtual {p1, v0}, Lokhttp3/internal/http2/k;->c(I)Lokhttp3/internal/http2/p;

    :cond_1e
    return-void

    :catchall_1f
    move-exception p1

    .line 11
    :try_start_20
    monitor-exit p0
    :try_end_21
    .catchall {:try_start_20 .. :try_end_21} :catchall_1f

    throw p1
.end method

.method public a(Lokhttp3/internal/http2/ErrorCode;)V
    .registers 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 2
    invoke-direct {p0, p1}, Lokhttp3/internal/http2/p;->d(Lokhttp3/internal/http2/ErrorCode;)Z

    move-result v0

    if-nez v0, :cond_7

    return-void

    .line 3
    :cond_7
    iget-object v0, p0, Lokhttp3/internal/http2/p;->d:Lokhttp3/internal/http2/k;

    iget v1, p0, Lokhttp3/internal/http2/p;->c:I

    invoke-virtual {v0, v1, p1}, Lokhttp3/internal/http2/k;->b(ILokhttp3/internal/http2/ErrorCode;)V

    return-void
.end method

.method a(Lokio/BufferedSource;I)V
    .registers 6
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 12
    iget-object v0, p0, Lokhttp3/internal/http2/p;->h:Lokhttp3/internal/http2/p$b;

    int-to-long v1, p2

    invoke-virtual {v0, p1, v1, v2}, Lokhttp3/internal/http2/p$b;->a(Lokio/BufferedSource;J)V

    return-void
.end method

.method b()V
    .registers 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    .line 4
    iget-object v0, p0, Lokhttp3/internal/http2/p;->i:Lokhttp3/internal/http2/p$a;

    iget-boolean v1, v0, Lokhttp3/internal/http2/p$a;->b:Z

    if-nez v1, :cond_1d

    .line 5
    iget-boolean v0, v0, Lokhttp3/internal/http2/p$a;->c:Z

    if-nez v0, :cond_15

    .line 6
    iget-object v0, p0, Lokhttp3/internal/http2/p;->l:Lokhttp3/internal/http2/ErrorCode;

    if-nez v0, :cond_f

    return-void

    .line 7
    :cond_f
    new-instance v1, Lokhttp3/internal/http2/StreamResetException;

    invoke-direct {v1, v0}, Lokhttp3/internal/http2/StreamResetException;-><init>(Lokhttp3/internal/http2/ErrorCode;)V

    throw v1

    .line 8
    :cond_15
    new-instance v0, Ljava/io/IOException;

    const-string v1, "stream finished"

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

    throw v0

    .line 9
    :cond_1d
    new-instance v0, Ljava/io/IOException;

    const-string v1, "stream closed"

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

    throw v0
.end method

.method public b(Lokhttp3/internal/http2/ErrorCode;)V
    .registers 4

    .line 2
    invoke-direct {p0, p1}, Lokhttp3/internal/http2/p;->d(Lokhttp3/internal/http2/ErrorCode;)Z

    move-result v0

    if-nez v0, :cond_7

    return-void

    .line 3
    :cond_7
    iget-object v0, p0, Lokhttp3/internal/http2/p;->d:Lokhttp3/internal/http2/k;

    iget v1, p0, Lokhttp3/internal/http2/p;->c:I

    invoke-virtual {v0, v1, p1}, Lokhttp3/internal/http2/k;->c(ILokhttp3/internal/http2/ErrorCode;)V

    return-void
.end method

.method public c()I
    .registers 2

    .line 1
    iget v0, p0, Lokhttp3/internal/http2/p;->c:I

    return v0
.end method

.method declared-synchronized c(Lokhttp3/internal/http2/ErrorCode;)V
    .registers 3

    monitor-enter p0

    .line 2
    :try_start_1
    iget-object v0, p0, Lokhttp3/internal/http2/p;->l:Lokhttp3/internal/http2/ErrorCode;

    if-nez v0, :cond_a

    .line 3
    iput-object p1, p0, Lokhttp3/internal/http2/p;->l:Lokhttp3/internal/http2/ErrorCode;

    .line 4
    invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V
    :try_end_a
    .catchall {:try_start_1 .. :try_end_a} :catchall_c

    .line 5
    :cond_a
    monitor-exit p0

    return-void

    :catchall_c
    move-exception p1

    monitor-exit p0

    throw p1
.end method

.method public d()Lokio/Sink;
    .registers 3

    .line 1
    monitor-enter p0

    .line 2
    :try_start_1
    iget-boolean v0, p0, Lokhttp3/internal/http2/p;->g:Z

    if-nez v0, :cond_14

    invoke-virtual {p0}, Lokhttp3/internal/http2/p;->f()Z

    move-result v0

    if-eqz v0, :cond_c

    goto :goto_14

    .line 3
    :cond_c
    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "reply before requesting the sink"

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

    throw v0

    .line 4
    :cond_14
    :goto_14
    monitor-exit p0
    :try_end_15
    .catchall {:try_start_1 .. :try_end_15} :catchall_18

    .line 5
    iget-object v0, p0, Lokhttp3/internal/http2/p;->i:Lokhttp3/internal/http2/p$a;

    return-object v0

    :catchall_18
    move-exception v0

    .line 6
    :try_start_19
    monitor-exit p0
    :try_end_1a
    .catchall {:try_start_19 .. :try_end_1a} :catchall_18

    throw v0
.end method

.method public e()Lokio/Source;
    .registers 2

    .line 1
    iget-object v0, p0, Lokhttp3/internal/http2/p;->h:Lokhttp3/internal/http2/p$b;

    return-object v0
.end method

.method public f()Z
    .registers 5

    .line 1
    iget v0, p0, Lokhttp3/internal/http2/p;->c:I

    const/4 v1, 0x1

    and-int/2addr v0, v1

    const/4 v2, 0x0

    if-ne v0, v1, :cond_9

    const/4 v0, 0x1

    goto :goto_a

    :cond_9
    const/4 v0, 0x0

    .line 2
    :goto_a
    iget-object v3, p0, Lokhttp3/internal/http2/p;->d:Lokhttp3/internal/http2/k;

    iget-boolean v3, v3, Lokhttp3/internal/http2/k;->b:Z

    if-ne v3, v0, :cond_11

    goto :goto_12

    :cond_11
    const/4 v1, 0x0

    :goto_12
    return v1
.end method

.method public declared-synchronized g()Z
    .registers 3

    monitor-enter p0

    .line 1
    :try_start_1
    iget-object v0, p0, Lokhttp3/internal/http2/p;->l:Lokhttp3/internal/http2/ErrorCode;
    :try_end_3
    .catchall {:try_start_1 .. :try_end_3} :catchall_29

    const/4 v1, 0x0

    if-eqz v0, :cond_8

    .line 2
    monitor-exit p0

    return v1

    .line 3
    :cond_8
    :try_start_8
    iget-object v0, p0, Lokhttp3/internal/http2/p;->h:Lokhttp3/internal/http2/p$b;

    iget-boolean v0, v0, Lokhttp3/internal/http2/p$b;->e:Z

    if-nez v0, :cond_14

    iget-object v0, p0, Lokhttp3/internal/http2/p;->h:Lokhttp3/internal/http2/p$b;

    iget-boolean v0, v0, Lokhttp3/internal/http2/p$b;->d:Z

    if-eqz v0, :cond_26

    :cond_14
    iget-object v0, p0, Lokhttp3/internal/http2/p;->i:Lokhttp3/internal/http2/p$a;

    iget-boolean v0, v0, Lokhttp3/internal/http2/p$a;->c:Z

    if-nez v0, :cond_20

    iget-object v0, p0, Lokhttp3/internal/http2/p;->i:Lokhttp3/internal/http2/p$a;

    iget-boolean v0, v0, Lokhttp3/internal/http2/p$a;->b:Z

    if-eqz v0, :cond_26

    :cond_20
    iget-boolean v0, p0, Lokhttp3/internal/http2/p;->g:Z
    :try_end_22
    .catchall {:try_start_8 .. :try_end_22} :catchall_29

    if-eqz v0, :cond_26

    .line 4
    monitor-exit p0

    return v1

    :cond_26
    const/4 v0, 0x1

    .line 5
    monitor-exit p0

    return v0

    :catchall_29
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public h()Lokio/Timeout;
    .registers 2

    .line 1
    iget-object v0, p0, Lokhttp3/internal/http2/p;->j:Lokhttp3/internal/http2/p$c;

    return-object v0
.end method

.method i()V
    .registers 3

    .line 1
    monitor-enter p0

    .line 2
    :try_start_1
    iget-object v0, p0, Lokhttp3/internal/http2/p;->h:Lokhttp3/internal/http2/p$b;

    const/4 v1, 0x1

    iput-boolean v1, v0, Lokhttp3/internal/http2/p$b;->e:Z

    .line 3
    invoke-virtual {p0}, Lokhttp3/internal/http2/p;->g()Z

    move-result v0

    .line 4
    invoke-virtual {p0}, Ljava/lang/Object;->notifyAll()V

    .line 5
    monitor-exit p0
    :try_end_e
    .catchall {:try_start_1 .. :try_end_e} :catchall_18

    if-nez v0, :cond_17

    .line 6
    iget-object v0, p0, Lokhttp3/internal/http2/p;->d:Lokhttp3/internal/http2/k;

    iget v1, p0, Lokhttp3/internal/http2/p;->c:I

    invoke-virtual {v0, v1}, Lokhttp3/internal/http2/k;->c(I)Lokhttp3/internal/http2/p;

    :cond_17
    return-void

    :catchall_18
    move-exception v0

    .line 7
    :try_start_19
    monitor-exit p0
    :try_end_1a
    .catchall {:try_start_19 .. :try_end_1a} :catchall_18

    throw v0
.end method

.method public declared-synchronized j()Lokhttp3/u;
    .registers 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;
        }
    .end annotation

    monitor-enter p0

    .line 1
    :try_start_1
    iget-object v0, p0, Lokhttp3/internal/http2/p;->j:Lokhttp3/internal/http2/p$c;

    invoke-virtual {v0}, Lokio/AsyncTimeout;->enter()V
    :try_end_6
    .catchall {:try_start_1 .. :try_end_6} :catchall_3c

    .line 2
    :goto_6
    :try_start_6
    iget-object v0, p0, Lokhttp3/internal/http2/p;->e:Ljava/util/Deque;

    invoke-interface {v0}, Ljava/util/Deque;->isEmpty()Z

    move-result v0

    if-eqz v0, :cond_16

    iget-object v0, p0, Lokhttp3/internal/http2/p;->l:Lokhttp3/internal/http2/ErrorCode;

    if-nez v0, :cond_16

    .line 3
    invoke-virtual {p0}, Lokhttp3/internal/http2/p;->k()V
    :try_end_15
    .catchall {:try_start_6 .. :try_end_15} :catchall_35

    goto :goto_6

    .line 4
    :cond_16
    :try_start_16
    iget-object v0, p0, Lokhttp3/internal/http2/p;->j:Lokhttp3/internal/http2/p$c;

    invoke-virtual {v0}, Lokhttp3/internal/http2/p$c;->exitAndThrowIfTimedOut()V

    .line 5
    iget-object v0, p0, Lokhttp3/internal/http2/p;->e:Ljava/util/Deque;

    invoke-interface {v0}, Ljava/util/Deque;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_2d

    .line 6
    iget-object v0, p0, Lokhttp3/internal/http2/p;->e:Ljava/util/Deque;

    invoke-interface {v0}, Ljava/util/Deque;->removeFirst()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lokhttp3/u;
    :try_end_2b
    .catchall {:try_start_16 .. :try_end_2b} :catchall_3c

    monitor-exit p0

    return-object v0

    .line 7
    :cond_2d
    :try_start_2d
    new-instance v0, Lokhttp3/internal/http2/StreamResetException;

    iget-object v1, p0, Lokhttp3/internal/http2/p;->l:Lokhttp3/internal/http2/ErrorCode;

    invoke-direct {v0, v1}, Lokhttp3/internal/http2/StreamResetException;-><init>(Lokhttp3/internal/http2/ErrorCode;)V

    throw v0

    :catchall_35
    move-exception v0

    .line 8
    iget-object v1, p0, Lokhttp3/internal/http2/p;->j:Lokhttp3/internal/http2/p$c;

    invoke-virtual {v1}, Lokhttp3/internal/http2/p$c;->exitAndThrowIfTimedOut()V

    throw v0
    :try_end_3c
    .catchall {:try_start_2d .. :try_end_3c} :catchall_3c

    :catchall_3c
    move-exception v0

    monitor-exit p0

    goto :goto_40

    :goto_3f
    throw v0

    :goto_40
    goto :goto_3f
.end method

.method k()V
    .registers 2
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/InterruptedIOException;
        }
    .end annotation

    .line 1
    :try_start_0
    invoke-virtual {p0}, Ljava/lang/Object;->wait()V
    :try_end_3
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_3} :catch_4

    return-void

    .line 2
    :catch_4
    invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Thread;->interrupt()V

    .line 3
    new-instance v0, Ljava/io/InterruptedIOException;

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

    throw v0
.end method

.method public l()Lokio/Timeout;
    .registers 2

    .line 1
    iget-object v0, p0, Lokhttp3/internal/http2/p;->k:Lokhttp3/internal/http2/p$c;

    return-object v0
.end method