apkfuckery/com.discord/smali_classes2/okhttp3/Headers$b.smali

415 lines
7.6 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.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
2020-07-08 16:44:49 +00:00
.method public constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
2020-05-17 12:40:10 +00:00
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.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"
2020-09-09 19:21:20 +00:00
invoke-static {p1, v0}, Lo0/h0/c;->l(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
2020-05-17 12:40:10 +00:00
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
2020-07-08 16:44:49 +00:00
.method public final b(Ljava/lang/String;Ljava/lang/String;)V
2020-05-17 12:40:10 +00:00
.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"
2020-09-09 19:21:20 +00:00
invoke-static {p1, v0}, Lo0/h0/c;->l(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
2020-05-17 12:40:10 +00:00
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
2020-07-08 16:44:49 +00:00
.method public final varargs c([Ljava/lang/String;)Lokhttp3/Headers;
2020-09-09 19:21:20 +00:00
.locals 6
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const-string v0, "namesAndValues"
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {p1, v0}, Lk0/n/c/i;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
array-length v0, p1
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const/4 v1, 0x2
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
rem-int/2addr v0, v1
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const/4 v2, 0x1
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const/4 v3, 0x0
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
if-nez v0, :cond_0
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const/4 v0, 0x1
2020-07-08 16:44:49 +00:00
goto :goto_0
:cond_0
2020-09-09 19:21:20 +00:00
const/4 v0, 0x0
2020-07-08 16:44:49 +00:00
:goto_0
2020-09-09 19:21:20 +00:00
if-eqz v0, :cond_8
2020-07-08 16:44:49 +00:00
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;
2020-09-09 19:21:20 +00:00
array-length v0, p1
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const/4 v4, 0x0
2020-07-08 16:44:49 +00:00
:goto_1
2020-09-09 19:21:20 +00:00
if-ge v4, v0, :cond_4
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
aget-object v5, p1, v4
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
if-eqz v5, :cond_1
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const/4 v5, 0x1
2020-07-08 16:44:49 +00:00
goto :goto_2
:cond_1
2020-09-09 19:21:20 +00:00
const/4 v5, 0x0
2020-07-08 16:44:49 +00:00
:goto_2
2020-09-09 19:21:20 +00:00
if-eqz v5, :cond_3
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
aget-object v5, p1, v4
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
if-eqz v5, :cond_2
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {v5}, Lk0/t/p;->trim(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
move-result-object v5
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-virtual {v5}, Ljava/lang/Object;->toString()Ljava/lang/String;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
move-result-object v5
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
aput-object v5, p1, v4
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
add-int/lit8 v4, v4, 0x1
2020-07-08 16:44:49 +00:00
goto :goto_1
:cond_2
new-instance p1, Lkotlin/TypeCastException;
const-string v0, "null cannot be cast to non-null type kotlin.CharSequence"
invoke-direct {p1, v0}, Lkotlin/TypeCastException;-><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
2020-09-09 19:21:20 +00:00
array-length v0, p1
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {v3, v0}, Lk0/q/f;->until(II)Lkotlin/ranges/IntRange;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
move-result-object v0
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-static {v0, v1}, Lk0/q/f;->step(Lkotlin/ranges/IntProgression;I)Lkotlin/ranges/IntProgression;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
move-result-object v0
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
iget v1, v0, Lkotlin/ranges/IntProgression;->d:I
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
iget v2, v0, Lkotlin/ranges/IntProgression;->e:I
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
iget v0, v0, Lkotlin/ranges/IntProgression;->f:I
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
if-ltz v0, :cond_5
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
if-gt v1, v2, :cond_6
2020-07-08 16:44:49 +00:00
goto :goto_3
:cond_5
2020-09-09 19:21:20 +00:00
if-lt v1, v2, :cond_6
2020-07-08 16:44:49 +00:00
:goto_3
2020-09-09 19:21:20 +00:00
aget-object v3, p1, v1
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
add-int/lit8 v4, v1, 0x1
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
aget-object v4, p1, v4
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-virtual {p0, v3}, Lokhttp3/Headers$b;->a(Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
invoke-virtual {p0, v4, v3}, Lokhttp3/Headers$b;->b(Ljava/lang/String;Ljava/lang/String;)V
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
if-eq v1, v2, :cond_6
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
add-int/2addr v1, v0
2020-07-08 16:44:49 +00:00
goto :goto_3
:cond_6
2020-09-09 19:21:20 +00:00
new-instance v0, Lokhttp3/Headers;
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
const/4 v1, 0x0
invoke-direct {v0, p1, v1}, Lokhttp3/Headers;-><init>([Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
2020-07-08 16:44:49 +00:00
2020-09-09 19:21:20 +00:00
return-object v0
2020-07-08 16:44:49 +00:00
:cond_7
new-instance p1, Lkotlin/TypeCastException;
const-string v0, "null cannot be cast to non-null type kotlin.Array<kotlin.String>"
invoke-direct {p1, v0}, Lkotlin/TypeCastException;-><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
.end method