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

# interfaces
.implements Lv9/x$a;


# instance fields
.field public a:I

.field public final b:Lz9/d;

.field public final c:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lv9/x;",
            ">;"
        }
    .end annotation
.end field

.field public final d:I

.field public final e:Lz9/b;

.field public final f:Lv9/c0;

.field public final g:I

.field public final h:I

.field public final i:I


# direct methods
.method public constructor <init>(Lz9/d;Ljava/util/List;ILz9/b;Lv9/c0;III)V
    .registers 10
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lz9/d;",
            "Ljava/util/List<",
            "+",
            "Lv9/x;",
            ">;I",
            "Lz9/b;",
            "Lv9/c0;",
            "III)V"
        }
    .end annotation

    const-string v0, "call"

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

    const-string v0, "interceptors"

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

    const-string v0, "request"

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

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

    iput-object p1, p0, Laa/g;->b:Lz9/d;

    iput-object p2, p0, Laa/g;->c:Ljava/util/List;

    iput p3, p0, Laa/g;->d:I

    iput-object p4, p0, Laa/g;->e:Lz9/b;

    iput-object p5, p0, Laa/g;->f:Lv9/c0;

    iput p6, p0, Laa/g;->g:I

    iput p7, p0, Laa/g;->h:I

    iput p8, p0, Laa/g;->i:I

    return-void
.end method

.method public static a(Laa/g;ILz9/b;Lv9/c0;IIII)Laa/g;
    .registers 19

    move-object v0, p0

    and-int/lit8 v1, p7, 0x1

    if-eqz v1, :cond_9

    iget v1, v0, Laa/g;->d:I

    move v5, v1

    goto :goto_a

    :cond_9
    move v5, p1

    :goto_a
    and-int/lit8 v1, p7, 0x2

    if-eqz v1, :cond_12

    iget-object v1, v0, Laa/g;->e:Lz9/b;

    move-object v6, v1

    goto :goto_13

    :cond_12
    move-object v6, p2

    :goto_13
    and-int/lit8 v1, p7, 0x4

    if-eqz v1, :cond_1b

    iget-object v1, v0, Laa/g;->f:Lv9/c0;

    move-object v7, v1

    goto :goto_1c

    :cond_1b
    move-object v7, p3

    :goto_1c
    and-int/lit8 v1, p7, 0x8

    if-eqz v1, :cond_24

    iget v1, v0, Laa/g;->g:I

    move v8, v1

    goto :goto_25

    :cond_24
    move v8, p4

    :goto_25
    and-int/lit8 v1, p7, 0x10

    if-eqz v1, :cond_2d

    iget v1, v0, Laa/g;->h:I

    move v9, v1

    goto :goto_2f

    :cond_2d
    move/from16 v9, p5

    :goto_2f
    and-int/lit8 v1, p7, 0x20

    if-eqz v1, :cond_37

    iget v1, v0, Laa/g;->i:I

    move v10, v1

    goto :goto_39

    :cond_37
    move/from16 v10, p6

    :goto_39
    const-string v1, "request"

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

    new-instance v1, Laa/g;

    iget-object v3, v0, Laa/g;->b:Lz9/d;

    iget-object v4, v0, Laa/g;->c:Ljava/util/List;

    move-object v2, v1

    invoke-direct/range {v2 .. v10}, Laa/g;-><init>(Lz9/d;Ljava/util/List;ILz9/b;Lv9/c0;III)V

    return-object v1
.end method


# virtual methods
.method public b(Lv9/c0;)Lv9/g0;
    .registers 15

    const-string v0, "request"

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

    iget v0, p0, Laa/g;->d:I

    iget-object v1, p0, Laa/g;->c:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    const/4 v2, 0x0

    const/4 v3, 0x1

    if-ge v0, v1, :cond_13

    move v0, v3

    goto :goto_14

    :cond_13
    move v0, v2

    :goto_14
    if-eqz v0, :cond_117

    iget v0, p0, Laa/g;->a:I

    add-int/2addr v0, v3

    iput v0, p0, Laa/g;->a:I

    iget-object v0, p0, Laa/g;->e:Lz9/b;

    const-string v1, " must call proceed() exactly once"

    const-string v4, "network interceptor "

    if-eqz v0, :cond_7f

    .line 1
    iget-object v0, v0, Lz9/b;->e:Lz9/c;

    .line 2
    iget-object v5, p1, Lv9/c0;->b:Lv9/w;

    .line 3
    invoke-virtual {v0, v5}, Lz9/c;->b(Lv9/w;)Z

    move-result v0

    if-eqz v0, :cond_5a

    iget v0, p0, Laa/g;->a:I

    if-ne v0, v3, :cond_33

    move v0, v3

    goto :goto_34

    :cond_33
    move v0, v2

    :goto_34
    if-eqz v0, :cond_37

    goto :goto_7f

    :cond_37
    invoke-static {v4}, Landroidx/activity/c;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object p1

    iget-object v0, p0, Laa/g;->c:Ljava/util/List;

    iget v2, p0, Laa/g;->d:I

    sub-int/2addr v2, v3

    invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lv9/x;

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

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

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

    move-result-object p1

    new-instance v0, Ljava/lang/IllegalStateException;

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

    move-result-object p1

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

    throw v0

    :cond_5a
    invoke-static {v4}, Landroidx/activity/c;->a(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object p1

    iget-object v0, p0, Laa/g;->c:Ljava/util/List;

    iget v1, p0, Laa/g;->d:I

    sub-int/2addr v1, v3

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lv9/x;

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

    const-string v0, " must retain the same host and port"

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

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

    move-result-object p1

    new-instance v0, Ljava/lang/IllegalStateException;

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

    move-result-object p1

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

    throw v0

    :cond_7f
    :goto_7f
    iget v0, p0, Laa/g;->d:I

    add-int/lit8 v6, v0, 0x1

    const/4 v7, 0x0

    const/4 v9, 0x0

    const/4 v10, 0x0

    const/4 v11, 0x0

    const/16 v12, 0x3a

    move-object v5, p0

    move-object v8, p1

    invoke-static/range {v5 .. v12}, Laa/g;->a(Laa/g;ILz9/b;Lv9/c0;IIII)Laa/g;

    move-result-object p1

    iget-object v0, p0, Laa/g;->c:Ljava/util/List;

    iget v5, p0, Laa/g;->d:I

    invoke-interface {v0, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lv9/x;

    invoke-interface {v0, p1}, Lv9/x;->a(Lv9/x$a;)Lv9/g0;

    move-result-object v5

    const-string v6, "interceptor "

    if-eqz v5, :cond_fd

    iget-object v7, p0, Laa/g;->e:Lz9/b;

    if-eqz v7, :cond_d7

    iget v7, p0, Laa/g;->d:I

    add-int/2addr v7, v3

    iget-object v8, p0, Laa/g;->c:Ljava/util/List;

    invoke-interface {v8}, Ljava/util/List;->size()I

    move-result v8

    if-ge v7, v8, :cond_b7

    iget p1, p1, Laa/g;->a:I

    if-ne p1, v3, :cond_b5

    goto :goto_b7

    :cond_b5
    move p1, v2

    goto :goto_b8

    :cond_b7
    :goto_b7
    move p1, v3

    :goto_b8
    if-eqz p1, :cond_bb

    goto :goto_d7

    :cond_bb
    new-instance p1, Ljava/lang/StringBuilder;

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

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

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

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

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

    move-result-object p1

    new-instance v0, Ljava/lang/IllegalStateException;

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

    move-result-object p1

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

    throw v0

    .line 4
    :cond_d7
    :goto_d7
    iget-object p1, v5, Lv9/g0;->x:Lv9/h0;

    if-eqz p1, :cond_dc

    move v2, v3

    :cond_dc
    if-eqz v2, :cond_df

    return-object v5

    .line 5
    :cond_df
    new-instance p1, Ljava/lang/StringBuilder;

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

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

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

    const-string v0, " returned a response with no body"

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

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

    move-result-object p1

    new-instance v0, Ljava/lang/IllegalStateException;

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

    move-result-object p1

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

    throw v0

    :cond_fd
    new-instance p1, Ljava/lang/NullPointerException;

    new-instance v1, Ljava/lang/StringBuilder;

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

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

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

    const-string v0, " returned null"

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

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

    move-result-object v0

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

    throw p1

    :cond_117
    new-instance p1, Ljava/lang/IllegalStateException;

    const-string v0, "Check failed."

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

    move-result-object v0

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

    throw p1
.end method
