.class public final Lb/a/d/p;
.super Ljava/lang/Object;

# interfaces
.implements Lb/aa;


# instance fields
.field private final a:Ljava/util/List;

.field private final b:Lb/a/b/g;

.field private final c:Lb/a/d/o;

.field private final d:Lb/l;

.field private final e:I

.field private final f:Lb/af;

.field private g:I


# direct methods
.method public constructor <init>(Ljava/util/List;Lb/a/b/g;Lb/a/d/o;Lb/l;ILb/af;)V
    .locals 0

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

    iput-object p1, p0, Lb/a/d/p;->a:Ljava/util/List;

    iput-object p4, p0, Lb/a/d/p;->d:Lb/l;

    iput-object p2, p0, Lb/a/d/p;->b:Lb/a/b/g;

    iput-object p3, p0, Lb/a/d/p;->c:Lb/a/d/o;

    iput p5, p0, Lb/a/d/p;->e:I

    iput-object p6, p0, Lb/a/d/p;->f:Lb/af;

    return-void
.end method


# virtual methods
.method public final a()Lb/af;
    .locals 1

    iget-object v0, p0, Lb/a/d/p;->f:Lb/af;

    return-object v0
.end method

.method public final a(Lb/af;)Lb/ai;
    .locals 3

    iget-object v0, p0, Lb/a/d/p;->b:Lb/a/b/g;

    iget-object v1, p0, Lb/a/d/p;->c:Lb/a/d/o;

    iget-object v2, p0, Lb/a/d/p;->d:Lb/l;

    invoke-virtual {p0, p1, v0, v1, v2}, Lb/a/d/p;->a(Lb/af;Lb/a/b/g;Lb/a/d/o;Lb/l;)Lb/ai;

    move-result-object v0

    return-object v0
.end method

.method public final a(Lb/af;Lb/a/b/g;Lb/a/d/o;Lb/l;)Lb/ai;
    .locals 8

    const/4 v7, 0x1

    iget v0, p0, Lb/a/d/p;->e:I

    iget-object v1, p0, Lb/a/d/p;->a:Ljava/util/List;

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

    move-result v1

    if-lt v0, v1, :cond_0

    new-instance v0, Ljava/lang/AssertionError;

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

    throw v0

    :cond_0
    iget v0, p0, Lb/a/d/p;->g:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lb/a/d/p;->g:I

    iget-object v0, p0, Lb/a/d/p;->c:Lb/a/d/o;

    if-eqz v0, :cond_2

    invoke-virtual {p1}, Lb/af;->g()Lb/w;

    move-result-object v0

    invoke-virtual {v0}, Lb/w;->g()Ljava/lang/String;

    move-result-object v1

    iget-object v2, p0, Lb/a/d/p;->d:Lb/l;

    invoke-interface {v2}, Lb/l;->a()Lb/al;

    move-result-object v2

    invoke-virtual {v2}, Lb/al;->a()Lb/a;

    move-result-object v2

    invoke-virtual {v2}, Lb/a;->k()Lb/w;

    move-result-object v2

    invoke-virtual {v2}, Lb/w;->g()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_1

    invoke-virtual {v0}, Lb/w;->j()I

    move-result v0

    iget-object v1, p0, Lb/a/d/p;->d:Lb/l;

    invoke-interface {v1}, Lb/l;->a()Lb/al;

    move-result-object v1

    invoke-virtual {v1}, Lb/al;->a()Lb/a;

    move-result-object v1

    invoke-virtual {v1}, Lb/a;->k()Lb/w;

    move-result-object v1

    invoke-virtual {v1}, Lb/w;->j()I

    move-result v1

    if-ne v0, v1, :cond_1

    move v0, v7

    :goto_0
    if-nez v0, :cond_2

    new-instance v0, Ljava/lang/IllegalStateException;

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "network interceptor "

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

    iget-object v2, p0, Lb/a/d/p;->a:Ljava/util/List;

    iget v3, p0, Lb/a/d/p;->e:I

    add-int/lit8 v3, v3, -0x1

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

    move-result-object v2

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

    move-result-object v1

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

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

    move-result-object v1

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

    move-result-object v1

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

    throw v0

    :cond_1
    const/4 v0, 0x0

    goto :goto_0

    :cond_2
    iget-object v0, p0, Lb/a/d/p;->c:Lb/a/d/o;

    if-eqz v0, :cond_3

    iget v0, p0, Lb/a/d/p;->g:I

    if-le v0, v7, :cond_3

    new-instance v0, Ljava/lang/IllegalStateException;

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "network interceptor "

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

    iget-object v2, p0, Lb/a/d/p;->a:Ljava/util/List;

    iget v3, p0, Lb/a/d/p;->e:I

    add-int/lit8 v3, v3, -0x1

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

    move-result-object v2

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

    move-result-object v1

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

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

    move-result-object v1

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

    move-result-object v1

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

    throw v0

    :cond_3
    new-instance v0, Lb/a/d/p;

    iget-object v1, p0, Lb/a/d/p;->a:Ljava/util/List;

    iget v2, p0, Lb/a/d/p;->e:I

    add-int/lit8 v5, v2, 0x1

    move-object v2, p2

    move-object v3, p3

    move-object v4, p4

    move-object v6, p1

    invoke-direct/range {v0 .. v6}, Lb/a/d/p;-><init>(Ljava/util/List;Lb/a/b/g;Lb/a/d/o;Lb/l;ILb/af;)V

    iget-object v1, p0, Lb/a/d/p;->a:Ljava/util/List;

    iget v2, p0, Lb/a/d/p;->e:I

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

    move-result-object v1

    check-cast v1, Lb/z;

    invoke-interface {v1, v0}, Lb/z;->a(Lb/aa;)Lb/ai;

    move-result-object v2

    if-eqz p3, :cond_4

    iget v3, p0, Lb/a/d/p;->e:I

    add-int/lit8 v3, v3, 0x1

    iget-object v4, p0, Lb/a/d/p;->a:Ljava/util/List;

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

    move-result v4

    if-ge v3, v4, :cond_4

    iget v0, v0, Lb/a/d/p;->g:I

    if-eq v0, v7, :cond_4

    new-instance v0, Ljava/lang/IllegalStateException;

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "network interceptor "

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

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

    move-result-object v1

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

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

    move-result-object v1

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

    move-result-object v1

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

    throw v0

    :cond_4
    if-nez v2, :cond_5

    new-instance v0, Ljava/lang/NullPointerException;

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "interceptor "

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

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

    move-result-object v1

    const-string v2, " returned null"

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

    move-result-object v1

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

    move-result-object v1

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

    throw v0

    :cond_5
    return-object v2
.end method

.method public final b()Lb/a/d/o;
    .locals 1

    iget-object v0, p0, Lb/a/d/p;->c:Lb/a/d/o;

    return-object v0
.end method

.method public final c()Lb/a/b/g;
    .locals 1

    iget-object v0, p0, Lb/a/d/p;->b:Lb/a/b/g;

    return-object v0
.end method
