.class public final Laa/b;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Lv9/x;


# instance fields
.field public final a:Z


# direct methods
.method public constructor <init>(Z)V
    .registers 2

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

    iput-boolean p1, p0, Laa/b;->a:Z

    return-void
.end method


# virtual methods
.method public a(Lv9/x$a;)Lv9/g0;
    .registers 29

    const-string v1, "call"

    move-object/from16 v0, p1

    check-cast v0, Laa/g;

    .line 1
    iget-object v2, v0, Laa/g;->e:Lz9/b;

    .line 2
    invoke-static {v2}, Lx/e;->d(Ljava/lang/Object;)V

    .line 3
    iget-object v0, v0, Laa/g;->f:Lv9/c0;

    .line 4
    iget-object v3, v0, Lv9/c0;->e:Lv9/f0;

    .line 5
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    .line 6
    :try_start_13
    iget-object v6, v2, Lz9/b;->d:Lv9/r;

    iget-object v7, v2, Lz9/b;->c:Lz9/d;

    invoke-static {v6}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 7
    invoke-static {v7, v1}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    .line 8
    iget-object v6, v2, Lz9/b;->f:Laa/d;

    invoke-interface {v6, v0}, Laa/d;->b(Lv9/c0;)V

    iget-object v6, v2, Lz9/b;->d:Lv9/r;

    iget-object v7, v2, Lz9/b;->c:Lz9/d;

    invoke-static {v6}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 9
    invoke-static {v7, v1}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V
    :try_end_2c
    .catch Ljava/io/IOException; {:try_start_13 .. :try_end_2c} :catch_2ad

    .line 10
    iget-object v6, v0, Lv9/c0;->c:Ljava/lang/String;

    .line 11
    invoke-static {v6}, Laa/f;->a(Ljava/lang/String;)Z

    move-result v6

    const/4 v7, 0x0

    const/4 v8, 0x1

    const/4 v9, 0x0

    if-eqz v6, :cond_92

    if-eqz v3, :cond_92

    const-string v6, "Expect"

    invoke-virtual {v0, v6}, Lv9/c0;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    const-string v10, "100-continue"

    invoke-static {v10, v6, v8}, Lp9/h;->r(Ljava/lang/String;Ljava/lang/String;Z)Z

    move-result v6

    if-eqz v6, :cond_64

    .line 12
    :try_start_47
    iget-object v6, v2, Lz9/b;->f:Laa/d;

    invoke-interface {v6}, Laa/d;->d()V
    :try_end_4c
    .catch Ljava/io/IOException; {:try_start_47 .. :try_end_4c} :catch_55

    .line 13
    invoke-virtual {v2, v8}, Lz9/b;->c(Z)Lv9/g0$a;

    move-result-object v6

    invoke-virtual {v2}, Lz9/b;->d()V

    move v10, v7

    goto :goto_66

    :catch_55
    move-exception v0

    .line 14
    iget-object v3, v2, Lz9/b;->d:Lv9/r;

    iget-object v4, v2, Lz9/b;->c:Lz9/d;

    invoke-static {v3}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 15
    invoke-static {v4, v1}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    .line 16
    invoke-virtual {v2, v0}, Lz9/b;->e(Ljava/io/IOException;)V

    throw v0

    :cond_64
    move v10, v8

    move-object v6, v9

    :goto_66
    if-nez v6, :cond_79

    .line 17
    invoke-virtual {v2, v0, v7}, Lz9/b;->b(Lv9/c0;Z)Lha/x;

    move-result-object v8

    invoke-static {v8}, Le/h;->a(Lha/x;)Lha/g;

    move-result-object v8

    invoke-virtual {v3, v8}, Lv9/f0;->c(Lha/g;)V

    check-cast v8, Lha/s;

    invoke-virtual {v8}, Lha/s;->close()V

    goto :goto_8f

    .line 18
    :cond_79
    iget-object v3, v2, Lz9/b;->c:Lz9/d;

    invoke-virtual {v3, v2, v8, v7, v9}, Lz9/d;->j(Lz9/b;ZZLjava/io/IOException;)Ljava/io/IOException;

    .line 19
    iget-object v3, v2, Lz9/b;->b:Lz9/h;

    .line 20
    invoke-virtual {v3}, Lz9/h;->j()Z

    move-result v3

    if-nez v3, :cond_8f

    .line 21
    iget-object v3, v2, Lz9/b;->f:Laa/d;

    invoke-interface {v3}, Laa/d;->h()Lz9/h;

    move-result-object v3

    invoke-virtual {v3}, Lz9/h;->l()V

    :cond_8f
    :goto_8f
    move-object v9, v6

    move v8, v10

    goto :goto_97

    .line 22
    :cond_92
    iget-object v3, v2, Lz9/b;->c:Lz9/d;

    invoke-virtual {v3, v2, v8, v7, v9}, Lz9/d;->j(Lz9/b;ZZLjava/io/IOException;)Ljava/io/IOException;

    .line 23
    :goto_97
    :try_start_97
    iget-object v3, v2, Lz9/b;->f:Laa/d;

    invoke-interface {v3}, Laa/d;->c()V
    :try_end_9c
    .catch Ljava/io/IOException; {:try_start_97 .. :try_end_9c} :catch_29e

    if-nez v9, :cond_ab

    .line 24
    invoke-virtual {v2, v7}, Lz9/b;->c(Z)Lv9/g0$a;

    move-result-object v9

    invoke-static {v9}, Lx/e;->d(Ljava/lang/Object;)V

    if-eqz v8, :cond_ab

    invoke-virtual {v2}, Lz9/b;->d()V

    move v8, v7

    :cond_ab
    invoke-virtual {v9, v0}, Lv9/g0$a;->g(Lv9/c0;)Lv9/g0$a;

    .line 25
    iget-object v3, v2, Lz9/b;->b:Lz9/h;

    .line 26
    iget-object v3, v3, Lz9/h;->d:Lv9/u;

    .line 27
    iput-object v3, v9, Lv9/g0$a;->e:Lv9/u;

    .line 28
    iput-wide v4, v9, Lv9/g0$a;->k:J

    .line 29
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v10

    .line 30
    iput-wide v10, v9, Lv9/g0$a;->l:J

    .line 31
    invoke-virtual {v9}, Lv9/g0$a;->a()Lv9/g0;

    move-result-object v3

    .line 32
    iget v6, v3, Lv9/g0;->u:I

    const/16 v9, 0x64

    if-ne v6, v9, :cond_e9

    .line 33
    invoke-virtual {v2, v7}, Lz9/b;->c(Z)Lv9/g0$a;

    move-result-object v3

    invoke-static {v3}, Lx/e;->d(Ljava/lang/Object;)V

    if-eqz v8, :cond_d2

    invoke-virtual {v2}, Lz9/b;->d()V

    :cond_d2
    invoke-virtual {v3, v0}, Lv9/g0$a;->g(Lv9/c0;)Lv9/g0$a;

    .line 34
    iget-object v0, v2, Lz9/b;->b:Lz9/h;

    .line 35
    iget-object v0, v0, Lz9/h;->d:Lv9/u;

    .line 36
    iput-object v0, v3, Lv9/g0$a;->e:Lv9/u;

    .line 37
    iput-wide v4, v3, Lv9/g0$a;->k:J

    .line 38
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    .line 39
    iput-wide v4, v3, Lv9/g0$a;->l:J

    .line 40
    invoke-virtual {v3}, Lv9/g0$a;->a()Lv9/g0;

    move-result-object v3

    .line 41
    iget v6, v3, Lv9/g0;->u:I

    .line 42
    :cond_e9
    iget-object v0, v2, Lz9/b;->d:Lv9/r;

    iget-object v4, v2, Lz9/b;->c:Lz9/d;

    invoke-static {v0}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 43
    invoke-static {v4, v1}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    move-object/from16 v4, p0

    .line 44
    iget-boolean v0, v4, Laa/b;->a:Z

    const-string v5, "message == null"

    const-string v7, "protocol == null"

    const-string v8, "request == null"

    const-string v9, "code < 0: "

    if-eqz v0, :cond_183

    const/16 v0, 0x65

    if-ne v6, v0, :cond_183

    .line 45
    iget-object v11, v3, Lv9/g0;->r:Lv9/c0;

    .line 46
    iget-object v12, v3, Lv9/g0;->s:Lv9/b0;

    .line 47
    iget v14, v3, Lv9/g0;->u:I

    .line 48
    iget-object v13, v3, Lv9/g0;->t:Ljava/lang/String;

    .line 49
    iget-object v15, v3, Lv9/g0;->v:Lv9/u;

    .line 50
    iget-object v0, v3, Lv9/g0;->w:Lv9/v;

    .line 51
    invoke-virtual {v0}, Lv9/v;->e()Lv9/v$a;

    move-result-object v0

    .line 52
    iget-object v1, v3, Lv9/g0;->y:Lv9/g0;

    .line 53
    iget-object v10, v3, Lv9/g0;->z:Lv9/g0;

    .line 54
    iget-object v4, v3, Lv9/g0;->A:Lv9/g0;

    move-object/from16 p1, v8

    move-object/from16 v16, v9

    .line 55
    iget-wide v8, v3, Lv9/g0;->B:J

    move/from16 v26, v6

    move-object/from16 v17, v7

    .line 56
    iget-wide v6, v3, Lv9/g0;->C:J

    .line 57
    iget-object v3, v3, Lv9/g0;->D:Lz9/b;

    .line 58
    sget-object v18, Lw9/c;->c:Lv9/h0;

    if-ltz v14, :cond_130

    const/16 v19, 0x1

    goto :goto_132

    :cond_130
    const/16 v19, 0x0

    :goto_132
    if-eqz v19, :cond_173

    if-eqz v11, :cond_169

    if-eqz v12, :cond_15f

    if-eqz v13, :cond_155

    .line 59
    invoke-virtual {v0}, Lv9/v$a;->c()Lv9/v;

    move-result-object v16

    new-instance v0, Lv9/g0;

    move-object v5, v10

    move-object v10, v0

    move-object/from16 v17, v18

    move-object/from16 v18, v1

    move-object/from16 v19, v5

    move-object/from16 v20, v4

    move-wide/from16 v21, v8

    move-wide/from16 v23, v6

    move-object/from16 v25, v3

    invoke-direct/range {v10 .. v25}, Lv9/g0;-><init>(Lv9/c0;Lv9/b0;Ljava/lang/String;ILv9/u;Lv9/v;Lv9/h0;Lv9/g0;Lv9/g0;Lv9/g0;JJLz9/b;)V

    goto/16 :goto_1fa

    :cond_155
    new-instance v0, Ljava/lang/IllegalStateException;

    invoke-virtual {v5}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

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

    throw v0

    :cond_15f
    new-instance v0, Ljava/lang/IllegalStateException;

    invoke-virtual/range {v17 .. v17}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

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

    throw v0

    :cond_169
    new-instance v0, Ljava/lang/IllegalStateException;

    invoke-virtual/range {p1 .. p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

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

    throw v0

    :cond_173
    move-object/from16 v0, v16

    invoke-static {v0, v14}, Landroidx/appcompat/widget/e0;->a(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v0

    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

    :cond_183
    move/from16 v26, v6

    move-object/from16 v17, v7

    move-object/from16 p1, v8

    move-object v0, v9

    .line 60
    iget-object v4, v3, Lv9/g0;->r:Lv9/c0;

    .line 61
    iget-object v6, v3, Lv9/g0;->s:Lv9/b0;

    .line 62
    iget v7, v3, Lv9/g0;->u:I

    .line 63
    iget-object v8, v3, Lv9/g0;->t:Ljava/lang/String;

    .line 64
    iget-object v9, v3, Lv9/g0;->v:Lv9/u;

    .line 65
    iget-object v10, v3, Lv9/g0;->w:Lv9/v;

    .line 66
    invoke-virtual {v10}, Lv9/v;->e()Lv9/v$a;

    move-result-object v10

    .line 67
    iget-object v11, v3, Lv9/g0;->y:Lv9/g0;

    .line 68
    iget-object v12, v3, Lv9/g0;->z:Lv9/g0;

    .line 69
    iget-object v13, v3, Lv9/g0;->A:Lv9/g0;

    .line 70
    iget-wide v14, v3, Lv9/g0;->B:J

    move-object/from16 v18, v0

    move-object/from16 v16, v1

    .line 71
    iget-wide v0, v3, Lv9/g0;->C:J

    move-wide/from16 v19, v0

    .line 72
    iget-object v0, v3, Lv9/g0;->D:Lz9/b;

    :try_start_1ac
    const-string v1, "Content-Type"

    move-object/from16 v21, v5

    const/4 v5, 0x0

    move-object/from16 v22, v0

    const/4 v0, 0x2

    .line 73
    invoke-static {v3, v1, v5, v0}, Lv9/g0;->b(Lv9/g0;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v0

    iget-object v1, v2, Lz9/b;->f:Laa/d;

    move-wide/from16 v23, v14

    invoke-interface {v1, v3}, Laa/d;->a(Lv9/g0;)J

    move-result-wide v14

    iget-object v1, v2, Lz9/b;->f:Laa/d;

    invoke-interface {v1, v3}, Laa/d;->f(Lv9/g0;)Lha/z;

    move-result-object v1

    new-instance v3, Lz9/b$b;

    invoke-direct {v3, v2, v1, v14, v15}, Lz9/b$b;-><init>(Lz9/b;Lha/z;J)V

    new-instance v1, Laa/h;

    .line 74
    new-instance v5, Lha/t;

    invoke-direct {v5, v3}, Lha/t;-><init>(Lha/z;)V

    .line 75
    invoke-direct {v1, v0, v14, v15, v5}, Laa/h;-><init>(Ljava/lang/String;JLha/h;)V
    :try_end_1d5
    .catch Ljava/io/IOException; {:try_start_1ac .. :try_end_1d5} :catch_28d

    if-ltz v7, :cond_1d9

    const/4 v0, 0x1

    goto :goto_1da

    :cond_1d9
    const/4 v0, 0x0

    :goto_1da
    if-eqz v0, :cond_27d

    if-eqz v4, :cond_273

    if-eqz v6, :cond_269

    if-eqz v8, :cond_25f

    .line 76
    invoke-virtual {v10}, Lv9/v$a;->c()Lv9/v;

    move-result-object v0

    new-instance v21, Lv9/g0;

    move-object/from16 v3, v21

    move-object v5, v6

    move-object v6, v8

    move-object v8, v9

    move-object v9, v0

    move-object v10, v1

    move-wide/from16 v14, v23

    move-wide/from16 v16, v19

    move-object/from16 v18, v22

    invoke-direct/range {v3 .. v18}, Lv9/g0;-><init>(Lv9/c0;Lv9/b0;Ljava/lang/String;ILv9/u;Lv9/v;Lv9/h0;Lv9/g0;Lv9/g0;Lv9/g0;JJLz9/b;)V

    move-object/from16 v0, v21

    .line 77
    :goto_1fa
    iget-object v1, v0, Lv9/g0;->r:Lv9/c0;

    const-string v3, "Connection"

    .line 78
    invoke-virtual {v1, v3}, Lv9/c0;->b(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    const-string v4, "close"

    const/4 v5, 0x1

    invoke-static {v4, v1, v5}, Lp9/h;->r(Ljava/lang/String;Ljava/lang/String;Z)Z

    move-result v1

    if-nez v1, :cond_218

    const/4 v1, 0x2

    const/4 v6, 0x0

    invoke-static {v0, v3, v6, v1}, Lv9/g0;->b(Lv9/g0;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v1

    invoke-static {v4, v1, v5}, Lp9/h;->r(Ljava/lang/String;Ljava/lang/String;Z)Z

    move-result v1

    if-eqz v1, :cond_222

    goto :goto_219

    :cond_218
    const/4 v6, 0x0

    .line 79
    :goto_219
    iget-object v1, v2, Lz9/b;->f:Laa/d;

    invoke-interface {v1}, Laa/d;->h()Lz9/h;

    move-result-object v1

    invoke-virtual {v1}, Lz9/h;->l()V

    :cond_222
    const/16 v1, 0xcc

    move/from16 v2, v26

    if-eq v2, v1, :cond_22c

    const/16 v1, 0xcd

    if-ne v2, v1, :cond_25e

    .line 80
    :cond_22c
    iget-object v1, v0, Lv9/g0;->x:Lv9/h0;

    if-eqz v1, :cond_235

    .line 81
    invoke-virtual {v1}, Lv9/h0;->e()J

    move-result-wide v3

    goto :goto_237

    :cond_235
    const-wide/16 v3, -0x1

    :goto_237
    const-wide/16 v7, 0x0

    cmp-long v1, v3, v7

    if-lez v1, :cond_25e

    new-instance v1, Ljava/net/ProtocolException;

    const-string v3, "HTTP "

    const-string v4, " had non-zero Content-Length: "

    invoke-static {v3, v2, v4}, Landroidx/appcompat/widget/a1;->a(Ljava/lang/String;ILjava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    .line 82
    iget-object v0, v0, Lv9/g0;->x:Lv9/h0;

    if-eqz v0, :cond_253

    .line 83
    invoke-virtual {v0}, Lv9/h0;->e()J

    move-result-wide v3

    invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v6

    :cond_253
    invoke-virtual {v2, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

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

    throw v1

    :cond_25e
    return-object v0

    .line 84
    :cond_25f
    new-instance v0, Ljava/lang/IllegalStateException;

    invoke-virtual/range {v21 .. v21}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

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

    throw v0

    :cond_269
    new-instance v0, Ljava/lang/IllegalStateException;

    invoke-virtual/range {v17 .. v17}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

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

    throw v0

    :cond_273
    new-instance v0, Ljava/lang/IllegalStateException;

    invoke-virtual/range {p1 .. p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v1

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

    throw v0

    :cond_27d
    move-object/from16 v0, v18

    invoke-static {v0, v7}, Landroidx/appcompat/widget/e0;->a(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v0

    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

    :catch_28d
    move-exception v0

    .line 85
    iget-object v1, v2, Lz9/b;->d:Lv9/r;

    iget-object v3, v2, Lz9/b;->c:Lz9/d;

    invoke-static {v1}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    move-object/from16 v1, v16

    .line 86
    invoke-static {v3, v1}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    .line 87
    invoke-virtual {v2, v0}, Lz9/b;->e(Ljava/io/IOException;)V

    throw v0

    :catch_29e
    move-exception v0

    .line 88
    iget-object v3, v2, Lz9/b;->d:Lv9/r;

    iget-object v4, v2, Lz9/b;->c:Lz9/d;

    invoke-static {v3}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 89
    invoke-static {v4, v1}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    .line 90
    invoke-virtual {v2, v0}, Lz9/b;->e(Ljava/io/IOException;)V

    throw v0

    :catch_2ad
    move-exception v0

    .line 91
    iget-object v3, v2, Lz9/b;->d:Lv9/r;

    iget-object v4, v2, Lz9/b;->c:Lz9/d;

    invoke-static {v3}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;

    .line 92
    invoke-static {v4, v1}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

    .line 93
    invoke-virtual {v2, v0}, Lz9/b;->e(Ljava/io/IOException;)V

    throw v0
.end method
