apkfuckery/com.discord/smali_classes2/okhttp3/Headers$b.smali
2020-04-27 22:53:11 +02:00

495 lines
8.8 KiB
Smali

.class public final Lokhttp3/Headers$b;
.super Ljava/lang/Object;
.source "Headers.kt"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokhttp3/Headers;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "b"
.end annotation
# direct methods
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public final a([Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
.locals 5
array-length v0, p1
const/4 v1, 0x2
sub-int/2addr v0, v1
const/4 v2, 0x0
invoke-static {v0, v2}, Lx/x/f;->downTo(II)Lkotlin/ranges/IntProgression;
move-result-object v0
invoke-static {v0, v1}, Lx/x/f;->step(Lkotlin/ranges/IntProgression;I)Lkotlin/ranges/IntProgression;
move-result-object v0
invoke-virtual {v0}, Lkotlin/ranges/IntProgression;->getFirst()I
move-result v1
invoke-virtual {v0}, Lkotlin/ranges/IntProgression;->getLast()I
move-result v2
invoke-virtual {v0}, Lkotlin/ranges/IntProgression;->getStep()I
move-result v0
if-ltz v0, :cond_0
if-gt v1, v2, :cond_2
goto :goto_0
:cond_0
if-lt v1, v2, :cond_2
:goto_0
aget-object v3, p1, v1
const/4 v4, 0x1
invoke-static {p2, v3, v4}, Lx/a0/p;->equals(Ljava/lang/String;Ljava/lang/String;Z)Z
move-result v3
if-eqz v3, :cond_1
add-int/2addr v1, v4
aget-object p1, p1, v1
return-object p1
:cond_1
if-eq v1, v2, :cond_2
add-int/2addr v1, v0
goto :goto_0
:cond_2
const/4 p1, 0x0
return-object p1
.end method
.method public final varargs a([Ljava/lang/String;)Lokhttp3/Headers;
.locals 7
const/4 v0, 0x0
if-eqz p1, :cond_9
array-length v1, p1
const/4 v2, 0x2
rem-int/2addr v1, v2
const/4 v3, 0x1
const/4 v4, 0x0
if-nez v1, :cond_0
const/4 v1, 0x1
goto :goto_0
:cond_0
const/4 v1, 0x0
:goto_0
if-eqz v1, :cond_8
invoke-virtual {p1}, Ljava/lang/Object;->clone()Ljava/lang/Object;
move-result-object p1
if-eqz p1, :cond_7
check-cast p1, [Ljava/lang/String;
array-length v1, p1
const/4 v5, 0x0
:goto_1
if-ge v5, v1, :cond_4
aget-object v6, p1, v5
if-eqz v6, :cond_1
const/4 v6, 0x1
goto :goto_2
:cond_1
const/4 v6, 0x0
:goto_2
if-eqz v6, :cond_3
aget-object v6, p1, v5
if-eqz v6, :cond_2
invoke-static {v6}, Lx/a0/u;->trim(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v6
aput-object v6, p1, v5
add-int/lit8 v5, v5, 0x1
goto :goto_1
:cond_2
new-instance p1, Lx/l;
const-string v0, "null cannot be cast to non-null type kotlin.CharSequence"
invoke-direct {p1, v0}, Lx/l;-><init>(Ljava/lang/String;)V
throw p1
:cond_3
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "Headers cannot be null"
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
:cond_4
array-length v1, p1
invoke-static {v4, v1}, Lx/x/f;->until(II)Lkotlin/ranges/IntRange;
move-result-object v1
invoke-static {v1, v2}, Lx/x/f;->step(Lkotlin/ranges/IntProgression;I)Lkotlin/ranges/IntProgression;
move-result-object v1
invoke-virtual {v1}, Lkotlin/ranges/IntProgression;->getFirst()I
move-result v2
invoke-virtual {v1}, Lkotlin/ranges/IntProgression;->getLast()I
move-result v3
invoke-virtual {v1}, Lkotlin/ranges/IntProgression;->getStep()I
move-result v1
if-ltz v1, :cond_5
if-gt v2, v3, :cond_6
goto :goto_3
:cond_5
if-lt v2, v3, :cond_6
:goto_3
aget-object v4, p1, v2
add-int/lit8 v5, v2, 0x1
aget-object v5, p1, v5
invoke-virtual {p0, v4}, Lokhttp3/Headers$b;->a(Ljava/lang/String;)V
invoke-virtual {p0, v5, v4}, Lokhttp3/Headers$b;->a(Ljava/lang/String;Ljava/lang/String;)V
if-eq v2, v3, :cond_6
add-int/2addr v2, v1
goto :goto_3
:cond_6
new-instance v1, Lokhttp3/Headers;
invoke-direct {v1, p1, v0}, Lokhttp3/Headers;-><init>([Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
return-object v1
:cond_7
new-instance p1, Lx/l;
const-string v0, "null cannot be cast to non-null type kotlin.Array<kotlin.String>"
invoke-direct {p1, v0}, Lx/l;-><init>(Ljava/lang/String;)V
throw p1
:cond_8
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "Expected alternating header names and values"
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
:cond_9
const-string p1, "namesAndValues"
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
throw v0
.end method
.method public final a(Ljava/lang/String;)V
.locals 7
invoke-interface {p1}, Ljava/lang/CharSequence;->length()I
move-result v0
const/4 v1, 0x1
const/4 v2, 0x0
if-lez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_5
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
const/4 v3, 0x0
:goto_1
if-ge v3, v0, :cond_4
invoke-virtual {p1, v3}, Ljava/lang/String;->charAt(I)C
move-result v4
const/16 v5, 0x7e
const/16 v6, 0x21
if-le v6, v4, :cond_1
goto :goto_2
:cond_1
if-lt v5, v4, :cond_2
const/4 v5, 0x1
goto :goto_3
:cond_2
:goto_2
const/4 v5, 0x0
:goto_3
if-eqz v5, :cond_3
add-int/lit8 v3, v3, 0x1
goto :goto_1
:cond_3
const/4 v0, 0x3
new-array v0, v0, [Ljava/lang/Object;
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v4
aput-object v4, v0, v2
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v2
aput-object v2, v0, v1
const/4 v1, 0x2
aput-object p1, v0, v1
const-string p1, "Unexpected char %#04x at %d in header name: %s"
invoke-static {p1, v0}, Lb0/c0/a;->a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
new-instance v0, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
:cond_4
return-void
:cond_5
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string v0, "name is empty"
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method
.method public final a(Ljava/lang/String;Ljava/lang/String;)V
.locals 7
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
const/4 v1, 0x0
const/4 v2, 0x0
:goto_0
if-ge v2, v0, :cond_4
invoke-virtual {p1, v2}, Ljava/lang/String;->charAt(I)C
move-result v3
const/16 v4, 0x9
const/4 v5, 0x1
if-eq v3, v4, :cond_2
const/16 v4, 0x7e
const/16 v6, 0x20
if-le v6, v3, :cond_0
goto :goto_1
:cond_0
if-lt v4, v3, :cond_1
goto :goto_2
:cond_1
:goto_1
const/4 v4, 0x0
goto :goto_3
:cond_2
:goto_2
const/4 v4, 0x1
:goto_3
if-eqz v4, :cond_3
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_3
const/4 v0, 0x4
new-array v0, v0, [Ljava/lang/Object;
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v3
aput-object v3, v0, v1
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v1
aput-object v1, v0, v5
const/4 v1, 0x2
aput-object p2, v0, v1
const/4 p2, 0x3
aput-object p1, v0, p2
const-string p1, "Unexpected char %#04x at %d in %s value: %s"
invoke-static {p1, v0}, Lb0/c0/a;->a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p1
new-instance p2, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p2
:cond_4
return-void
.end method