CircuitNodeChooser.smali
.class public Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser;
.super Ljava/lang/Object;
.source "CircuitNodeChooser.java"
# static fields
.field private static final logger:Ljava/util/logging/Logger;
# instance fields
.field public final bBs:Lcom/subgraph/orchid/j;
.field private final bCk:Lcom/subgraph/orchid/crypto/q;
.field private final bEX:Lcom/subgraph/orchid/circuits/path/k;
# direct methods
.method static constructor <clinit>()V
.registers 1
.prologue
.line 14
const-class v0, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser;
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Ljava/util/logging/Logger;->getLogger(Ljava/lang/String;)Ljava/util/logging/Logger;
move-result-object v0
sput-object v0, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser;->logger:Ljava/util/logging/Logger;
return-void
.end method
.method public constructor <init>(Lcom/subgraph/orchid/TorConfig;Lcom/subgraph/orchid/j;)V
.registers 4
.prologue
.line 23
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 18
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/CircuitNodeChooser;->bCk:Lcom/subgraph/orchid/crypto/q;
.line 24
iput-object p2, p0, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser;->bBs:Lcom/subgraph/orchid/j;
.line 25
new-instance v0, Lcom/subgraph/orchid/circuits/path/k;
invoke-direct {v0, p1}, Lcom/subgraph/orchid/circuits/path/k;-><init>(Lcom/subgraph/orchid/TorConfig;)V
iput-object v0, p0, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser;->bEX:Lcom/subgraph/orchid/circuits/path/k;
.line 26
return-void
.end method
.method private static a(ZDD)D
.registers 12
.prologue
const-wide/high16 v2, 0x3ff0000000000000L # 1.0
const-wide/16 v0, 0x0
.line 164
if-nez p0, :cond_f
const-wide v4, 0x3fb999999999999aL # 0.1
cmpg-double v4, p1, v4
if-gez v4, :cond_11
:cond_f
move-wide v0, v2
.line 171
:cond_10
:goto_10
return-wide v0
.line 167
:cond_11
const-wide/high16 v4, 0x4008000000000000L # 3.0
mul-double/2addr v4, p1
div-double v4, p3, v4
sub-double/2addr v2, v4
.line 168
cmpg-double v4, v2, v0
if-lez v4, :cond_10
move-wide v0, v2
.line 171
goto :goto_10
.end method
.method private b(Ljava/util/List;Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser$WeightRule;)Lcom/subgraph/orchid/v;
.registers 15
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List",
"<",
"Lcom/subgraph/orchid/v;",
">;",
"Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser$WeightRule;",
")",
"Lcom/subgraph/orchid/v;"
}
.end annotation
.prologue
const-wide/16 v6, -0x1
const/4 v2, 0x0
const/4 v1, 0x1
.line 128
new-instance v3, Lcom/subgraph/orchid/circuits/path/a;
invoke-direct {v3}, Lcom/subgraph/orchid/circuits/path/a;-><init>()V
.line 129
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v8
:goto_d
invoke-interface {v8}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_56
invoke-interface {v8}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/subgraph/orchid/v;
.line 11176
invoke-interface {v0}, Lcom/subgraph/orchid/v;->JJ()Z
move-result v4
if-nez v4, :cond_39
move-wide v4, v6
.line 131
:goto_20
cmp-long v9, v4, v6
if-nez v9, :cond_51
.line 12074
new-instance v4, Lcom/subgraph/orchid/circuits/path/b;
const-wide/16 v10, 0x0
invoke-direct {v4, v0, v10, v11}, Lcom/subgraph/orchid/circuits/path/b;-><init>(Lcom/subgraph/orchid/v;D)V
.line 13010
iput-boolean v1, v4, Lcom/subgraph/orchid/circuits/path/b;->bEU:Z
.line 12076
iget-object v0, v3, Lcom/subgraph/orchid/circuits/path/a;->bEO:Ljava/util/List;
invoke-interface {v0, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
.line 12077
iget v0, v3, Lcom/subgraph/orchid/circuits/path/a;->bET:I
add-int/lit8 v0, v0, 0x1
iput v0, v3, Lcom/subgraph/orchid/circuits/path/a;->bET:I
goto :goto_d
.line 11179
:cond_39
invoke-interface {v0}, Lcom/subgraph/orchid/v;->JK()I
move-result v4
int-to-long v4, v4
.line 11184
const-wide v10, 0x20c49ba5e353f7L
cmp-long v9, v4, v10
if-lez v9, :cond_4d
const-wide v4, 0x7fffffffffffffffL
goto :goto_20
:cond_4d
const-wide/16 v10, 0x3e8
mul-long/2addr v4, v10
goto :goto_20
.line 134
:cond_51
long-to-double v4, v4
invoke-virtual {v3, v0, v4, v5}, Lcom/subgraph/orchid/circuits/path/a;->a(Lcom/subgraph/orchid/v;D)V
goto :goto_d
.line 13089
:cond_56
iget v0, v3, Lcom/subgraph/orchid/circuits/path/a;->bET:I
if-eqz v0, :cond_68
.line 13092
invoke-virtual {v3}, Lcom/subgraph/orchid/circuits/path/a;->LA()Z
move-result v0
if-eqz v0, :cond_76
.line 13093
const-wide/32 v4, 0x9c40
const-wide/16 v6, 0x4e20
invoke-virtual {v3, v4, v5, v6, v7}, Lcom/subgraph/orchid/circuits/path/a;->f(JJ)V
.line 138
:cond_68
:goto_68
invoke-virtual {v3}, Lcom/subgraph/orchid/circuits/path/a;->LA()Z
move-result v0
if-eqz v0, :cond_9b
.line 139
invoke-interface {p1}, Ljava/util/List;->size()I
move-result v0
if-nez v0, :cond_8a
.line 140
const/4 v0, 0x0
.line 148
:goto_75
return-object v0
.line 13095
:cond_76
iget-object v0, v3, Lcom/subgraph/orchid/circuits/path/a;->bEO:Ljava/util/List;
invoke-interface {v0}, Ljava/util/List;->size()I
move-result v0
iget v4, v3, Lcom/subgraph/orchid/circuits/path/a;->bET:I
sub-int/2addr v0, v4
.line 13096
invoke-virtual {v3}, Lcom/subgraph/orchid/circuits/path/a;->LB()D
move-result-wide v4
int-to-double v6, v0
div-double/2addr v4, v6
double-to-long v4, v4
.line 13097
invoke-virtual {v3, v4, v5, v4, v5}, Lcom/subgraph/orchid/circuits/path/a;->f(JJ)V
goto :goto_68
.line 143
:cond_8a
iget-object v0, p0, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser;->bCk:Lcom/subgraph/orchid/crypto/q;
invoke-interface {p1}, Ljava/util/List;->size()I
move-result v1
invoke-virtual {v0, v1}, Lcom/subgraph/orchid/crypto/q;->nextInt(I)I
move-result v0
.line 144
invoke-interface {p1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/subgraph/orchid/v;
goto :goto_75
.line 13155
:cond_9b
sget-object v0, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser$WeightRule;->WEIGHT_FOR_EXIT:Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser$WeightRule;
if-ne p2, v0, :cond_e0
move v0, v1
.line 14059
:goto_a0
iget-wide v4, v3, Lcom/subgraph/orchid/circuits/path/a;->bEP:D
.line 13156
invoke-virtual {v3}, Lcom/subgraph/orchid/circuits/path/a;->LB()D
move-result-wide v6
.line 13155
invoke-static {v0, v4, v5, v6, v7}, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser;->a(ZDD)D
move-result-wide v4
.line 13157
sget-object v0, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser$WeightRule;->WEIGHT_FOR_GUARD:Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser$WeightRule;
if-ne p2, v0, :cond_e2
.line 15054
:goto_ae
iget-wide v6, v3, Lcom/subgraph/orchid/circuits/path/a;->bER:D
.line 13158
invoke-virtual {v3}, Lcom/subgraph/orchid/circuits/path/a;->LB()D
move-result-wide v8
.line 13157
invoke-static {v1, v6, v7, v8, v9}, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser;->a(ZDD)D
move-result-wide v6
.line 15127
iget-object v0, v3, 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_be
:goto_be
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_fc
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/subgraph/orchid/circuits/path/b;
.line 16010
iget-object v2, v0, Lcom/subgraph/orchid/circuits/path/b;->router:Lcom/subgraph/orchid/v;
.line 15129
invoke-interface {v2}, Lcom/subgraph/orchid/v;->JO()Z
move-result v8
if-eqz v8, :cond_e4
invoke-interface {v2}, Lcom/subgraph/orchid/v;->JN()Z
move-result v8
if-eqz v8, :cond_e4
.line 17010
iget-wide v8, v0, Lcom/subgraph/orchid/circuits/path/b;->bEV:D
.line 15130
mul-double v10, v4, v6
mul-double/2addr v8, v10
.line 18010
iput-wide v8, v0, Lcom/subgraph/orchid/circuits/path/b;->bEV:D
goto :goto_be
:cond_e0
move v0, v2
.line 13155
goto :goto_a0
:cond_e2
move v1, v2
.line 13157
goto :goto_ae
.line 15131
:cond_e4
invoke-interface {v2}, Lcom/subgraph/orchid/v;->JN()Z
move-result v8
if-eqz v8, :cond_f0
.line 19010
iget-wide v8, v0, Lcom/subgraph/orchid/circuits/path/b;->bEV:D
.line 15132
mul-double/2addr v8, v6
.line 20010
iput-wide v8, v0, Lcom/subgraph/orchid/circuits/path/b;->bEV:D
goto :goto_be
.line 15133
:cond_f0
invoke-interface {v2}, Lcom/subgraph/orchid/v;->JO()Z
move-result v2
if-eqz v2, :cond_be
.line 21010
iget-wide v8, v0, Lcom/subgraph/orchid/circuits/path/b;->bEV:D
.line 15134
mul-double/2addr v8, v4
.line 22010
iput-wide v8, v0, Lcom/subgraph/orchid/circuits/path/b;->bEV:D
goto :goto_be
.line 15137
:cond_fc
invoke-virtual {v3}, Lcom/subgraph/orchid/circuits/path/a;->LD()V
.line 148
invoke-virtual {v3}, Lcom/subgraph/orchid/circuits/path/a;->LC()Lcom/subgraph/orchid/v;
move-result-object v0
goto/16 :goto_75
.end method
# virtual methods
.method public final a(Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser$WeightRule;Lcom/subgraph/orchid/circuits/path/j;)Lcom/subgraph/orchid/v;
.registers 4
.prologue
.line 60
const/4 v0, 0x1
invoke-virtual {p0, p2, v0}, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser;->a(Lcom/subgraph/orchid/circuits/path/j;Z)Ljava/util/List;
move-result-object v0
.line 61
invoke-virtual {p0, v0, p1}, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser;->a(Ljava/util/List;Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser$WeightRule;)Lcom/subgraph/orchid/v;
move-result-object v0
.line 62
if-nez v0, :cond_c
.line 64
const/4 v0, 0x0
.line 66
:cond_c
return-object v0
.end method
.method public final a(Ljava/util/List;Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser$WeightRule;)Lcom/subgraph/orchid/v;
.registers 13
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List",
"<",
"Lcom/subgraph/orchid/v;",
">;",
"Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser$WeightRule;",
")",
"Lcom/subgraph/orchid/v;"
}
.end annotation
.prologue
.line 95
.line 1104
iget-object v0, p0, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser;->bBs:Lcom/subgraph/orchid/j;
invoke-interface {v0}, Lcom/subgraph/orchid/j;->Jd()Lcom/subgraph/orchid/ConsensusDocument;
move-result-object v1
.line 1105
if-nez v1, :cond_c
.line 1106
const/4 v0, 0x0
.line 96
:goto_9
if-eqz v0, :cond_1ef
.line 99
:goto_b
return-object v0
.line 2021
:cond_c
const/16 v0, 0x8
new-array v2, v0, [D
.line 2022
invoke-interface {v1}, Lcom/subgraph/orchid/ConsensusDocument;->IO()I
move-result v0
int-to-long v4, v0
.line 2054
sget-object v0, Lcom/subgraph/orchid/circuits/path/c$1;->bFb:[I
invoke-virtual {p2}, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser$WeightRule;->ordinal()I
move-result v3
aget v0, v0, v3
packed-switch v0, :pswitch_data_1f6
.line 2080
new-instance v0, Ljava/lang/IllegalArgumentException;
new-instance v1, Ljava/lang/StringBuilder;
const-string v2, "Unhandled WeightRule type: "
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)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/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
.line 2056
:pswitch_35
const/16 v0, 0x8
new-array v0, v0, [Ljava/lang/String;
const/4 v3, 0x0
const-string v6, "Wgg"
aput-object v6, v0, v3
const/4 v3, 0x1
const-string v6, "Wgm"
aput-object v6, v0, v3
const/4 v3, 0x2
const-string v6, "zero"
aput-object v6, v0, v3
const/4 v3, 0x3
const-string v6, "Wgd"
aput-object v6, v0, v3
const/4 v3, 0x4
const-string v6, "Wgb"
aput-object v6, v0, v3
const/4 v3, 0x5
const-string v6, "Wmb"
aput-object v6, v0, v3
const/4 v3, 0x6
const-string v6, "Web"
aput-object v6, v0, v3
const/4 v3, 0x7
const-string v6, "Wdb"
aput-object v6, v0, v3
.line 2024
:goto_61
invoke-static {v1, v4, v5, v0, v2}, Lcom/subgraph/orchid/circuits/path/c;->a(Lcom/subgraph/orchid/ConsensusDocument;J[Ljava/lang/String;[D)Z
move-result v0
if-nez v0, :cond_139
.line 2025
new-instance v0, Lcom/subgraph/orchid/circuits/path/c;
const/16 v1, 0x8
new-array v1, v1, [D
const/4 v2, 0x0
invoke-direct {v0, v1, v2}, Lcom/subgraph/orchid/circuits/path/c;-><init>([DZ)V
move-object v1, v0
.line 2093
:goto_72
iget-boolean v0, v1, Lcom/subgraph/orchid/circuits/path/c;->bFa:Z
.line 1115
if-nez v0, :cond_142
.line 1116
sget-object v0, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser;->logger:Ljava/util/logging/Logger;
const-string v1, "Got invalid bandwidth weights. Falling back to old selection method"
invoke-virtual {v0, v1}, Ljava/util/logging/Logger;->warning(Ljava/lang/String;)V
.line 1117
const/4 v0, 0x0
.line 1109
:goto_7e
invoke-virtual {v0}, Lcom/subgraph/orchid/circuits/path/a;->LC()Lcom/subgraph/orchid/v;
move-result-object v0
goto :goto_9
.line 2061
:pswitch_83
const/16 v0, 0x8
new-array v0, v0, [Ljava/lang/String;
const/4 v3, 0x0
const-string v6, "Wmg"
aput-object v6, v0, v3
const/4 v3, 0x1
const-string v6, "Wmm"
aput-object v6, v0, v3
const/4 v3, 0x2
const-string v6, "Wme"
aput-object v6, v0, v3
const/4 v3, 0x3
const-string v6, "Wmd"
aput-object v6, v0, v3
const/4 v3, 0x4
const-string v6, "Wgb"
aput-object v6, v0, v3
const/4 v3, 0x5
const-string v6, "Wmb"
aput-object v6, v0, v3
const/4 v3, 0x6
const-string v6, "Web"
aput-object v6, v0, v3
const/4 v3, 0x7
const-string v6, "Wdb"
aput-object v6, v0, v3
goto :goto_61
.line 2066
:pswitch_b0
const/16 v0, 0x8
new-array v0, v0, [Ljava/lang/String;
const/4 v3, 0x0
const-string v6, "Wee"
aput-object v6, v0, v3
const/4 v3, 0x1
const-string v6, "Wem"
aput-object v6, v0, v3
const/4 v3, 0x2
const-string v6, "Wed"
aput-object v6, v0, v3
const/4 v3, 0x3
const-string v6, "Weg"
aput-object v6, v0, v3
const/4 v3, 0x4
const-string v6, "Wgb"
aput-object v6, v0, v3
const/4 v3, 0x5
const-string v6, "Wmb"
aput-object v6, v0, v3
const/4 v3, 0x6
const-string v6, "Web"
aput-object v6, v0, v3
const/4 v3, 0x7
const-string v6, "Wdb"
aput-object v6, v0, v3
goto :goto_61
.line 2071
:pswitch_dd
const/16 v0, 0x8
new-array v0, v0, [Ljava/lang/String;
const/4 v3, 0x0
const-string v6, "Wbe"
aput-object v6, v0, v3
const/4 v3, 0x1
const-string v6, "Wbm"
aput-object v6, v0, v3
const/4 v3, 0x2
const-string v6, "Wbd"
aput-object v6, v0, v3
const/4 v3, 0x3
const-string v6, "Wbg"
aput-object v6, v0, v3
const/4 v3, 0x4
const-string v6, "one"
aput-object v6, v0, v3
const/4 v3, 0x5
const-string v6, "one"
aput-object v6, v0, v3
const/4 v3, 0x6
const-string v6, "one"
aput-object v6, v0, v3
const/4 v3, 0x7
const-string v6, "one"
aput-object v6, v0, v3
goto/16 :goto_61
.line 2076
:pswitch_10b
const/16 v0, 0x8
new-array v0, v0, [Ljava/lang/String;
const/4 v3, 0x0
const-string v6, "one"
aput-object v6, v0, v3
const/4 v3, 0x1
const-string v6, "one"
aput-object v6, v0, v3
const/4 v3, 0x2
const-string v6, "one"
aput-object v6, v0, v3
const/4 v3, 0x3
const-string v6, "one"
aput-object v6, v0, v3
const/4 v3, 0x4
const-string v6, "one"
aput-object v6, v0, v3
const/4 v3, 0x5
const-string v6, "one"
aput-object v6, v0, v3
const/4 v3, 0x6
const-string v6, "one"
aput-object v6, v0, v3
const/4 v3, 0x7
const-string v6, "one"
aput-object v6, v0, v3
goto/16 :goto_61
.line 2027
:cond_139
new-instance v0, Lcom/subgraph/orchid/circuits/path/c;
const/4 v1, 0x1
invoke-direct {v0, v2, v1}, Lcom/subgraph/orchid/circuits/path/c;-><init>([DZ)V
move-object v1, v0
goto/16 :goto_72
.line 1119
:cond_142
new-instance v6, Lcom/subgraph/orchid/circuits/path/a;
invoke-direct {v6}, Lcom/subgraph/orchid/circuits/path/a;-><init>()V
.line 1120
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v7
:goto_14b
invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_1ec
invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/subgraph/orchid/v;
.line 2126
invoke-interface {v0}, Lcom/subgraph/orchid/v;->JK()I
move-result v2
int-to-long v2, v2
.line 2135
const-wide v4, 0x20c49ba5e353f7L
cmp-long v4, v2, v4
if-lez v4, :cond_19d
const-wide v2, 0x7fffffffffffffffL
move-wide v4, v2
.line 2128
:goto_16b
invoke-interface {v0}, Lcom/subgraph/orchid/v;->JO()Z
move-result v2
if-eqz v2, :cond_1a2
invoke-interface {v0}, Lcom/subgraph/orchid/v;->JM()Z
move-result v2
if-nez v2, :cond_1a2
const/4 v2, 0x1
.line 2129
:goto_178
invoke-interface {v0}, Lcom/subgraph/orchid/v;->JN()Z
move-result v8
.line 2130
invoke-interface {v0}, Lcom/subgraph/orchid/v;->JE()I
move-result v3
if-eqz v3, :cond_1a4
const/4 v3, 0x1
.line 2139
:goto_183
if-eqz v8, :cond_1ac
if-eqz v2, :cond_1ac
.line 2140
if-eqz v3, :cond_1a6
.line 3122
iget-object v2, v1, Lcom/subgraph/orchid/circuits/path/c;->bEZ:[D
const/4 v3, 0x7
aget-wide v2, v2, v3
.line 4109
iget-object v8, v1, Lcom/subgraph/orchid/circuits/path/c;->bEZ:[D
const/4 v9, 0x3
aget-wide v8, v8, v9
.line 2140
mul-double/2addr v2, v8
.line 2131
:goto_194
long-to-double v4, v4
mul-double/2addr v2, v4
const-wide/high16 v4, 0x3fe0000000000000L # 0.5
add-double/2addr v2, v4
.line 1122
invoke-virtual {v6, v0, v2, v3}, Lcom/subgraph/orchid/circuits/path/a;->a(Lcom/subgraph/orchid/v;D)V
goto :goto_14b
.line 2135
:cond_19d
const-wide/16 v4, 0x3e8
mul-long/2addr v2, v4
move-wide v4, v2
goto :goto_16b
.line 2128
:cond_1a2
const/4 v2, 0x0
goto :goto_178
.line 2130
:cond_1a4
const/4 v3, 0x0
goto :goto_183
.line 5109
:cond_1a6
iget-object v2, v1, Lcom/subgraph/orchid/circuits/path/c;->bEZ:[D
const/4 v3, 0x3
aget-wide v2, v2, v3
goto :goto_194
.line 2141
:cond_1ac
if-eqz v8, :cond_1c2
.line 2142
if-eqz v3, :cond_1bc
.line 5113
iget-object v2, v1, Lcom/subgraph/orchid/circuits/path/c;->bEZ:[D
const/4 v3, 0x4
aget-wide v2, v2, v3
.line 6097
iget-object v8, v1, Lcom/subgraph/orchid/circuits/path/c;->bEZ:[D
const/4 v9, 0x0
aget-wide v8, v8, v9
.line 2142
mul-double/2addr v2, v8
goto :goto_194
.line 7097
:cond_1bc
iget-object v2, v1, Lcom/subgraph/orchid/circuits/path/c;->bEZ:[D
const/4 v3, 0x0
aget-wide v2, v2, v3
goto :goto_194
.line 2143
:cond_1c2
if-eqz v2, :cond_1d8
.line 2144
if-eqz v3, :cond_1d2
.line 7119
iget-object v2, v1, Lcom/subgraph/orchid/circuits/path/c;->bEZ:[D
const/4 v3, 0x6
aget-wide v2, v2, v3
.line 8105
iget-object v8, v1, Lcom/subgraph/orchid/circuits/path/c;->bEZ:[D
const/4 v9, 0x2
aget-wide v8, v8, v9
.line 2144
mul-double/2addr v2, v8
goto :goto_194
.line 9105
:cond_1d2
iget-object v2, v1, Lcom/subgraph/orchid/circuits/path/c;->bEZ:[D
const/4 v3, 0x2
aget-wide v2, v2, v3
goto :goto_194
.line 2146
:cond_1d8
if-eqz v3, :cond_1e6
.line 9116
iget-object v2, v1, Lcom/subgraph/orchid/circuits/path/c;->bEZ:[D
const/4 v3, 0x5
aget-wide v2, v2, v3
.line 10101
iget-object v8, v1, Lcom/subgraph/orchid/circuits/path/c;->bEZ:[D
const/4 v9, 0x1
aget-wide v8, v8, v9
.line 2146
mul-double/2addr v2, v8
goto :goto_194
.line 11101
:cond_1e6
iget-object v2, v1, Lcom/subgraph/orchid/circuits/path/c;->bEZ:[D
const/4 v3, 0x1
aget-wide v2, v2, v3
goto :goto_194
:cond_1ec
move-object v0, v6
.line 1124
goto/16 :goto_7e
.line 99
:cond_1ef
invoke-direct {p0, p1, p2}, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser;->b(Ljava/util/List;Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser$WeightRule;)Lcom/subgraph/orchid/v;
move-result-object v0
goto/16 :goto_b
.line 2054
nop
:pswitch_data_1f6
.packed-switch 0x1
:pswitch_35
:pswitch_83
:pswitch_b0
:pswitch_dd
:pswitch_10b
.end packed-switch
.end method
.method public final a(Lcom/subgraph/orchid/circuits/path/j;Z)Ljava/util/List;
.registers 7
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/subgraph/orchid/circuits/path/j;",
"Z)",
"Ljava/util/List",
"<",
"Lcom/subgraph/orchid/v;",
">;"
}
.end annotation
.prologue
.line 70
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
.line 71
invoke-virtual {p0, p2}, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser;->bh(Z)Ljava/util/List;
move-result-object v0
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v2
:cond_d
:goto_d
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_23
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/subgraph/orchid/v;
.line 72
invoke-interface {p1, v0}, Lcom/subgraph/orchid/circuits/path/j;->h(Lcom/subgraph/orchid/v;)Z
move-result v3
if-eqz v3, :cond_d
.line 73
invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_d
.line 76
:cond_23
return-object v1
.end method
.method public final ah(Ljava/util/List;)Lcom/subgraph/orchid/v;
.registers 9
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List",
"<",
"Lcom/subgraph/orchid/v;",
">;)",
"Lcom/subgraph/orchid/v;"
}
.end annotation
.prologue
const/4 v2, 0x1
.line 34
iget-object v3, p0, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser;->bEX:Lcom/subgraph/orchid/circuits/path/k;
.line 1040
new-instance v4, Ljava/util/ArrayList;
invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V
.line 1041
invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v5
:cond_c
:goto_c
invoke-interface {v5}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_4b
invoke-interface {v5}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/subgraph/orchid/v;
.line 1050
const-string v1, "ExitNodes"
.line 1056
iget-object v6, v3, Lcom/subgraph/orchid/circuits/path/k;->bFl:Ljava/util/Map;
invoke-interface {v6, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/subgraph/orchid/circuits/path/e;
.line 1057
if-eqz v1, :cond_2a
invoke-virtual {v1}, Lcom/subgraph/orchid/circuits/path/e;->isEmpty()Z
move-result v6
if-eqz v6, :cond_44
:cond_2a
move v1, v2
.line 1050
:goto_2b
if-eqz v1, :cond_49
const-string v1, "ExcludeExitNodes"
.line 1051
invoke-virtual {v3, v0, v1}, Lcom/subgraph/orchid/circuits/path/k;->a(Lcom/subgraph/orchid/v;Ljava/lang/String;)Z
move-result v1
if-nez v1, :cond_49
const-string v1, "ExcludeNodes"
.line 1052
invoke-virtual {v3, v0, v1}, Lcom/subgraph/orchid/circuits/path/k;->a(Lcom/subgraph/orchid/v;Ljava/lang/String;)Z
move-result v1
if-nez v1, :cond_49
move v1, v2
.line 1042
:goto_3e
if-eqz v1, :cond_c
.line 1043
invoke-interface {v4, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_c
.line 1060
:cond_44
invoke-virtual {v1, v0}, Lcom/subgraph/orchid/circuits/path/e;->h(Lcom/subgraph/orchid/v;)Z
move-result v1
goto :goto_2b
.line 1052
:cond_49
const/4 v1, 0x0
goto :goto_3e
.line 35
:cond_4b
sget-object v0, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser$WeightRule;->WEIGHT_FOR_EXIT:Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser$WeightRule;
invoke-virtual {p0, v4, v0}, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser;->a(Ljava/util/List;Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser$WeightRule;)Lcom/subgraph/orchid/v;
move-result-object v0
return-object v0
.end method
.method final bh(Z)Ljava/util/List;
.registers 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(Z)",
"Ljava/util/List",
"<",
"Lcom/subgraph/orchid/v;",
">;"
}
.end annotation
.prologue
.line 80
new-instance v1, Ljava/util/ArrayList;
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
.line 81
iget-object v0, p0, Lcom/subgraph/orchid/circuits/path/CircuitNodeChooser;->bBs:Lcom/subgraph/orchid/j;
invoke-interface {v0}, Lcom/subgraph/orchid/j;->Jg()Ljava/util/List;
move-result-object v0
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
move-result-object v2
:cond_f
:goto_f
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v0
if-eqz v0, :cond_39
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v0
check-cast v0, Lcom/subgraph/orchid/v;
.line 82
invoke-interface {v0}, Lcom/subgraph/orchid/v;->isRunning()Z
move-result v3
if-eqz v3, :cond_f
.line 83
invoke-interface {v0}, Lcom/subgraph/orchid/v;->isValid()Z
move-result v3
if-eqz v3, :cond_f
.line 84
invoke-interface {v0}, Lcom/subgraph/orchid/v;->JL()Z
move-result v3
if-nez v3, :cond_f
if-eqz p1, :cond_35
.line 85
invoke-interface {v0}, Lcom/subgraph/orchid/v;->JH()Lcom/subgraph/orchid/Descriptor;
move-result-object v3
if-eqz v3, :cond_f
.line 87
:cond_35
invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_f
.line 91
:cond_39
return-object v1
.end method