a.smali

.class public final Lcom/subgraph/orchid/circuits/path/a;
.super Ljava/lang/Object;
.source "BandwidthWeightedRouters.java"


# instance fields
.field private final bCk:Lcom/subgraph/orchid/crypto/q;

.field final bEO:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/subgraph/orchid/circuits/path/b;",
            ">;"
        }
    .end annotation
.end field

.field bEP:D

.field private bEQ:D

.field bER:D

.field private bES:Z

.field bET:I


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

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

    .line 28
    new-instance v0, Ljava/util/ArrayList;

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

    iput-object v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bEO:Ljava/util/List;

    .line 29
    new-instance v0, Lcom/subgraph/orchid/crypto/q;

    invoke-direct {v0}, Lcom/subgraph/orchid/crypto/q;-><init>()V

    iput-object v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bCk:Lcom/subgraph/orchid/crypto/q;

    return-void
.end method

.method private b(Lcom/subgraph/orchid/v;D)V
    .registers 6

    .prologue
    .line 63
    invoke-interface {p1}, Lcom/subgraph/orchid/v;->JO()Z

    move-result v0

    if-eqz v0, :cond_17

    .line 64
    iget-wide v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bEP:D

    add-double/2addr v0, p2

    iput-wide v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bEP:D

    .line 68
    :goto_b
    invoke-interface {p1}, Lcom/subgraph/orchid/v;->JN()Z

    move-result v0

    if-eqz v0, :cond_16

    .line 69
    iget-wide v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bER:D

    add-double/2addr v0, p2

    iput-wide v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bER:D

    .line 71
    :cond_16
    return-void

    .line 66
    :cond_17
    iget-wide v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bEQ:D

    add-double/2addr v0, p2

    iput-wide v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bEQ:D

    goto :goto_b
.end method


# virtual methods
.method final LA()Z
    .registers 5

    .prologue
    .line 46
    invoke-virtual {p0}, Lcom/subgraph/orchid/circuits/path/a;->LB()D

    move-result-wide v0

    const-wide v2, 0x3fb999999999999aL    # 0.1

    cmpg-double v0, v0, v2

    if-gez v0, :cond_f

    const/4 v0, 0x1

    :goto_e
    return v0

    :cond_f
    const/4 v0, 0x0

    goto :goto_e
.end method

.method final LB()D
    .registers 5

    .prologue
    .line 50
    iget-wide v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bEP:D

    iget-wide v2, p0, Lcom/subgraph/orchid/circuits/path/a;->bEQ:D

    add-double/2addr v0, v2

    return-wide v0
.end method

.method final LC()Lcom/subgraph/orchid/v;
    .registers 13

    .prologue
    const/4 v6, 0x0

    const-wide/16 v4, 0x0

    .line 115
    .line 5174
    iget-boolean v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bES:Z

    if-nez v0, :cond_a

    .line 5175
    invoke-virtual {p0}, Lcom/subgraph/orchid/circuits/path/a;->LD()V

    .line 5178
    :cond_a
    iget-object v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bEO:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v7

    move-wide v2, v4

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

    move-result v0

    if-eqz v0, :cond_22

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

    move-result-object v0

    check-cast v0, Lcom/subgraph/orchid/circuits/path/b;

    .line 6010
    iget-wide v0, v0, Lcom/subgraph/orchid/circuits/path/b;->bEW:J

    .line 5179
    add-long/2addr v0, v2

    move-wide v2, v0

    .line 5180
    goto :goto_11

    .line 116
    :cond_22
    cmp-long v0, v2, v4

    if-nez v0, :cond_46

    .line 117
    iget-object v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bEO:Ljava/util/List;

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

    move-result v0

    if-nez v0, :cond_2f

    .line 7152
    :goto_2e
    return-object v6

    .line 120
    :cond_2f
    iget-object v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bCk:Lcom/subgraph/orchid/crypto/q;

    iget-object v1, p0, Lcom/subgraph/orchid/circuits/path/a;->bEO:Ljava/util/List;

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

    move-result v1

    invoke-virtual {v0, v1}, Lcom/subgraph/orchid/crypto/q;->nextInt(I)I

    move-result v0

    .line 121
    iget-object v1, p0, Lcom/subgraph/orchid/circuits/path/a;->bEO:Ljava/util/List;

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

    move-result-object v0

    check-cast v0, Lcom/subgraph/orchid/circuits/path/b;

    .line 7010
    iget-object v6, v0, Lcom/subgraph/orchid/circuits/path/b;->router:Lcom/subgraph/orchid/v;

    goto :goto_2e

    .line 123
    :cond_46
    iget-object v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bCk:Lcom/subgraph/orchid/crypto/q;

    invoke-virtual {v0, v2, v3}, Lcom/subgraph/orchid/crypto/q;->nextLong(J)J

    move-result-wide v2

    .line 7143
    iget-object v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bEO:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v7

    move-object v1, v6

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

    move-result v0

    if-eqz v0, :cond_71

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

    move-result-object v0

    check-cast v0, Lcom/subgraph/orchid/circuits/path/b;

    .line 8010
    iget-wide v8, v0, Lcom/subgraph/orchid/circuits/path/b;->bEW:J

    .line 7144
    add-long/2addr v4, v8

    .line 7145
    cmp-long v6, v4, v2

    if-lez v6, :cond_88

    .line 9010
    iget-object v2, v0, Lcom/subgraph/orchid/circuits/path/b;->router:Lcom/subgraph/orchid/v;

    .line 7148
    const-wide v0, 0x7fffffffffffffffL

    :goto_6d
    move-wide v10, v0

    move-object v1, v2

    move-wide v2, v10

    .line 7150
    goto :goto_53

    .line 7151
    :cond_71
    if-nez v1, :cond_86

    .line 7152
    iget-object v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bEO:Ljava/util/List;

    iget-object v1, p0, Lcom/subgraph/orchid/circuits/path/a;->bEO:Ljava/util/List;

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

    move-result v1

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

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

    move-result-object v0

    check-cast v0, Lcom/subgraph/orchid/circuits/path/b;

    .line 10010
    iget-object v6, v0, Lcom/subgraph/orchid/circuits/path/b;->router:Lcom/subgraph/orchid/v;

    goto :goto_2e

    :cond_86
    move-object v6, v1

    .line 123
    goto :goto_2e

    :cond_88
    move-wide v10, v2

    move-object v2, v1

    move-wide v0, v10

    goto :goto_6d
.end method

.method final LD()V
    .registers 8

    .prologue
    .line 166
    const-wide/high16 v4, 0x43c0000000000000L    # 2.305843009213694E18

    .line 10158
    const-wide/16 v0, 0x0

    .line 10159
    iget-object v2, p0, Lcom/subgraph/orchid/circuits/path/a;->bEO:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v6

    move-wide v2, v0

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

    move-result v0

    if-eqz v0, :cond_1c

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

    move-result-object v0

    check-cast v0, Lcom/subgraph/orchid/circuits/path/b;

    .line 11010
    iget-wide v0, v0, Lcom/subgraph/orchid/circuits/path/b;->bEV:D

    .line 10160
    add-double/2addr v0, v2

    move-wide v2, v0

    .line 10161
    goto :goto_b

    .line 166
    :cond_1c
    div-double v2, v4, v2

    .line 167
    iget-object v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bEO:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

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

    move-result v0

    if-eqz v0, :cond_3a

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

    move-result-object v0

    check-cast v0, Lcom/subgraph/orchid/circuits/path/b;

    .line 11022
    iget-wide v4, v0, Lcom/subgraph/orchid/circuits/path/b;->bEV:D

    mul-double/2addr v4, v2

    invoke-static {v4, v5}, Ljava/lang/Math;->round(D)J

    move-result-wide v4

    iput-wide v4, v0, Lcom/subgraph/orchid/circuits/path/b;->bEW:J

    goto :goto_24

    .line 170
    :cond_3a
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bES:Z

    .line 171
    return-void
.end method

.method final a(Lcom/subgraph/orchid/v;D)V
    .registers 6

    .prologue
    .line 39
    iget-object v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bEO:Ljava/util/List;

    new-instance v1, Lcom/subgraph/orchid/circuits/path/b;

    invoke-direct {v1, p1, p2, p3}, Lcom/subgraph/orchid/circuits/path/b;-><init>(Lcom/subgraph/orchid/v;D)V

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

    .line 40
    invoke-direct {p0, p1, p2, p3}, Lcom/subgraph/orchid/circuits/path/a;->b(Lcom/subgraph/orchid/v;D)V

    .line 41
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bES:Z

    .line 42
    return-void
.end method

.method final f(JJ)V
    .registers 12

    .prologue
    const/4 v6, 0x0

    .line 102
    iget-object v0, p0, Lcom/subgraph/orchid/circuits/path/a;->bEO:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :cond_7
    :goto_7
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_2e

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

    move-result-object v0

    check-cast v0, Lcom/subgraph/orchid/circuits/path/b;

    .line 1010
    iget-boolean v2, v0, Lcom/subgraph/orchid/circuits/path/b;->bEU:Z

    .line 103
    if-eqz v2, :cond_7

    .line 2010
    iget-object v2, v0, Lcom/subgraph/orchid/circuits/path/b;->router:Lcom/subgraph/orchid/v;

    .line 104
    invoke-interface {v2}, Lcom/subgraph/orchid/v;->JP()Z

    move-result v2

    if-eqz v2, :cond_2c

    move-wide v2, p1

    .line 105
    :goto_20
    long-to-double v4, v2

    .line 3010
    iput-wide v4, v0, Lcom/subgraph/orchid/circuits/path/b;->bEV:D

    .line 4010
    iput-boolean v6, v0, Lcom/subgraph/orchid/circuits/path/b;->bEU:Z

    .line 5010
    iget-object v0, v0, Lcom/subgraph/orchid/circuits/path/b;->router:Lcom/subgraph/orchid/v;

    .line 107
    long-to-double v2, v2

    invoke-direct {p0, v0, v2, v3}, Lcom/subgraph/orchid/circuits/path/a;->b(Lcom/subgraph/orchid/v;D)V

    goto :goto_7

    :cond_2c
    move-wide v2, p3

    .line 104
    goto :goto_20

    .line 110
    :cond_2e
    iput v6, p0, Lcom/subgraph/orchid/circuits/path/a;->bET:I

    .line 111
    iput-boolean v6, p0, Lcom/subgraph/orchid/circuits/path/a;->bES:Z

    .line 112
    return-void
.end method