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

# interfaces
.implements Lv9/x;


# instance fields
.field public final a:Lv9/o;


# direct methods
.method public constructor <init>(Lv9/o;)V
    .registers 3

    const-string v0, "cookieJar"

    invoke-static {p1, v0}, Lx/e;->f(Ljava/lang/Object;Ljava/lang/String;)V

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

    iput-object p1, p0, Laa/a;->a:Lv9/o;

    return-void
.end method


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

    move-object/from16 v0, p0

    move-object/from16 v1, p1

    check-cast v1, Laa/g;

    .line 1
    iget-object v3, v1, Laa/g;->f:Lv9/c0;

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

    .line 3
    new-instance v2, Lv9/c0$a;

    invoke-direct {v2, v3}, Lv9/c0$a;-><init>(Lv9/c0;)V

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

    const-string v5, "Content-Type"

    const-wide/16 v6, -0x1

    const-string v8, "Content-Length"

    if-eqz v4, :cond_46

    .line 5
    invoke-virtual {v4}, Lv9/f0;->b()Lv9/y;

    move-result-object v9

    if-eqz v9, :cond_25

    .line 6
    iget-object v9, v9, Lv9/y;->a:Ljava/lang/String;

    .line 7
    invoke-virtual {v2, v5, v9}, Lv9/c0$a;->b(Ljava/lang/String;Ljava/lang/String;)Lv9/c0$a;

    :cond_25
    invoke-virtual {v4}, Lv9/f0;->a()J

    move-result-wide v9

    cmp-long v4, v9, v6

    const-string v11, "Transfer-Encoding"

    if-eqz v4, :cond_3c

    invoke-static {v9, v10}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v8, v4}, Lv9/c0$a;->b(Ljava/lang/String;Ljava/lang/String;)Lv9/c0$a;

    .line 8
    iget-object v4, v2, Lv9/c0$a;->c:Lv9/v$a;

    invoke-virtual {v4, v11}, Lv9/v$a;->d(Ljava/lang/String;)Lv9/v$a;

    goto :goto_46

    :cond_3c
    const-string v4, "chunked"

    .line 9
    invoke-virtual {v2, v11, v4}, Lv9/c0$a;->b(Ljava/lang/String;Ljava/lang/String;)Lv9/c0$a;

    .line 10
    iget-object v4, v2, Lv9/c0$a;->c:Lv9/v$a;

    invoke-virtual {v4, v8}, Lv9/v$a;->d(Ljava/lang/String;)Lv9/v$a;

    :cond_46
    :goto_46
    const-string v4, "Host"

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

    move-result-object v9

    const/4 v10, 0x0

    if-nez v9, :cond_58

    .line 12
    iget-object v9, v3, Lv9/c0;->b:Lv9/w;

    .line 13
    invoke-static {v9, v10}, Lw9/c;->v(Lv9/w;Z)Ljava/lang/String;

    move-result-object v9

    .line 14
    invoke-virtual {v2, v4, v9}, Lv9/c0$a;->b(Ljava/lang/String;Ljava/lang/String;)Lv9/c0$a;

    :cond_58
    const-string v4, "Connection"

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

    move-result-object v9

    if-nez v9, :cond_65

    const-string v9, "Keep-Alive"

    invoke-virtual {v2, v4, v9}, Lv9/c0$a;->b(Ljava/lang/String;Ljava/lang/String;)Lv9/c0$a;

    :cond_65
    const-string v4, "Accept-Encoding"

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

    move-result-object v9

    const-string v11, "gzip"

    const/4 v12, 0x1

    if-nez v9, :cond_7d

    const-string v9, "Range"

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

    move-result-object v9

    if-nez v9, :cond_7d

    invoke-virtual {v2, v4, v11}, Lv9/c0$a;->b(Ljava/lang/String;Ljava/lang/String;)Lv9/c0$a;

    move v4, v12

    goto :goto_7e

    :cond_7d
    move v4, v10

    :goto_7e
    iget-object v9, v0, Laa/a;->a:Lv9/o;

    .line 15
    iget-object v13, v3, Lv9/c0;->b:Lv9/w;

    .line 16
    invoke-interface {v9, v13}, Lv9/o;->a(Lv9/w;)Ljava/util/List;

    move-result-object v9

    invoke-interface {v9}, Ljava/util/Collection;->isEmpty()Z

    move-result v13

    xor-int/2addr v13, v12

    const/4 v14, 0x0

    if-eqz v13, :cond_d6

    .line 17
    new-instance v13, Ljava/lang/StringBuilder;

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

    invoke-interface {v9}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;

    move-result-object v9

    move v15, v10

    :goto_98
    invoke-interface {v9}, Ljava/util/Iterator;->hasNext()Z

    move-result v16

    if-eqz v16, :cond_c8

    invoke-interface {v9}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v16

    add-int/lit8 v17, v15, 0x1

    if-ltz v15, :cond_c4

    move-object/from16 v10, v16

    check-cast v10, Lv9/m;

    if-lez v15, :cond_b1

    const-string v15, "; "

    invoke-virtual {v13, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 18
    :cond_b1
    iget-object v15, v10, Lv9/m;->a:Ljava/lang/String;

    .line 19
    invoke-virtual {v13, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const/16 v15, 0x3d

    invoke-virtual {v13, v15}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    .line 20
    iget-object v10, v10, Lv9/m;->b:Ljava/lang/String;

    .line 21
    invoke-virtual {v13, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move/from16 v15, v17

    const/4 v10, 0x0

    goto :goto_98

    :cond_c4
    invoke-static {}, Lo/b;->f()V

    throw v14

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

    move-result-object v9

    const-string v10, "StringBuilder().apply(builderAction).toString()"

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

    const-string v10, "Cookie"

    .line 22
    invoke-virtual {v2, v10, v9}, Lv9/c0$a;->b(Ljava/lang/String;Ljava/lang/String;)Lv9/c0$a;

    :cond_d6
    const-string v9, "User-Agent"

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

    move-result-object v10

    if-nez v10, :cond_e3

    const-string v10, "okhttp/4.9.1"

    invoke-virtual {v2, v9, v10}, Lv9/c0$a;->b(Ljava/lang/String;Ljava/lang/String;)Lv9/c0$a;

    :cond_e3
    invoke-virtual {v2}, Lv9/c0$a;->a()Lv9/c0;

    move-result-object v2

    invoke-virtual {v1, v2}, Laa/g;->b(Lv9/c0;)Lv9/g0;

    move-result-object v1

    iget-object v2, v0, Laa/a;->a:Lv9/o;

    .line 23
    iget-object v9, v3, Lv9/c0;->b:Lv9/w;

    .line 24
    iget-object v10, v1, Lv9/g0;->w:Lv9/v;

    .line 25
    invoke-static {v2, v9, v10}, Laa/e;->b(Lv9/o;Lv9/w;Lv9/v;)V

    .line 26
    iget-object v9, v1, Lv9/g0;->s:Lv9/b0;

    .line 27
    iget v10, v1, Lv9/g0;->u:I

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

    .line 29
    iget-object v15, v1, Lv9/g0;->v:Lv9/u;

    .line 30
    iget-object v2, v1, Lv9/g0;->w:Lv9/v;

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

    move-result-object v2

    .line 32
    iget-object v6, v1, Lv9/g0;->x:Lv9/h0;

    .line 33
    iget-object v7, v1, Lv9/g0;->y:Lv9/g0;

    .line 34
    iget-object v12, v1, Lv9/g0;->z:Lv9/g0;

    .line 35
    iget-object v14, v1, Lv9/g0;->A:Lv9/g0;

    move-object/from16 v19, v14

    move-object/from16 v18, v15

    .line 36
    iget-wide v14, v1, Lv9/g0;->B:J

    move-wide/from16 v20, v14

    .line 37
    iget-wide v14, v1, Lv9/g0;->C:J

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

    move-object/from16 v22, v2

    const-string v2, "request"

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

    if-eqz v4, :cond_16d

    const-string v2, "Content-Encoding"

    const/4 v4, 0x2

    move-object/from16 v23, v6

    move-object/from16 v24, v7

    const/4 v6, 0x0

    .line 40
    invoke-static {v1, v2, v6, v4}, Lv9/g0;->b(Lv9/g0;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v7

    const/4 v6, 0x1

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

    move-result v7

    if-eqz v7, :cond_172

    invoke-static {v1}, Laa/e;->a(Lv9/g0;)Z

    move-result v7

    if-eqz v7, :cond_172

    .line 41
    iget-object v7, v1, Lv9/g0;->x:Lv9/h0;

    if-eqz v7, :cond_172

    .line 42
    new-instance v11, Lha/m;

    invoke-virtual {v7}, Lv9/h0;->k()Lha/h;

    move-result-object v7

    invoke-direct {v11, v7}, Lha/m;-><init>(Lha/z;)V

    .line 43
    iget-object v7, v1, Lv9/g0;->w:Lv9/v;

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

    move-result-object v7

    invoke-virtual {v7, v2}, Lv9/v$a;->d(Ljava/lang/String;)Lv9/v$a;

    invoke-virtual {v7, v8}, Lv9/v$a;->d(Ljava/lang/String;)Lv9/v$a;

    invoke-virtual {v7}, Lv9/v$a;->c()Lv9/v;

    move-result-object v2

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

    move-result-object v2

    const/4 v7, 0x0

    .line 46
    invoke-static {v1, v5, v7, v4}, Lv9/g0;->b(Lv9/g0;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v1

    new-instance v4, Laa/h;

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

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

    const-wide/16 v7, -0x1

    .line 48
    invoke-direct {v4, v1, v7, v8, v5}, Laa/h;-><init>(Ljava/lang/String;JLha/h;)V

    move-object/from16 v23, v4

    goto :goto_174

    :cond_16d
    move-object/from16 v23, v6

    move-object/from16 v24, v7

    const/4 v6, 0x1

    :cond_172
    move-object/from16 v2, v22

    :goto_174
    if-ltz v10, :cond_177

    goto :goto_178

    :cond_177
    const/4 v6, 0x0

    :goto_178
    if-eqz v6, :cond_1b2

    if-eqz v9, :cond_1a6

    if-eqz v13, :cond_19a

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

    move-result-object v8

    new-instance v1, Lv9/g0;

    move-object v2, v1

    move-object v4, v9

    move-object v5, v13

    move v6, v10

    move-object/from16 v10, v24

    move-object/from16 v7, v18

    move-object/from16 v9, v23

    move-object v11, v12

    move-object/from16 v12, v19

    move-wide v15, v14

    move-wide/from16 v13, v20

    move-object/from16 v17, v0

    invoke-direct/range {v2 .. v17}, 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

    return-object v1

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

    const-string v1, "message == null"

    invoke-virtual {v1}, 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_1a6
    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "protocol == null"

    invoke-virtual {v1}, 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_1b2
    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string v1, "code < 0: "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, v10}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()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
.end method
