- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
498 lines
10 KiB
Smali
498 lines
10 KiB
Smali
.class public final Lkotlin/jvm/internal/CollectionToArray;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation build Lkotlin/jvm/internal/SourceDebugExtension;
|
|
value = {
|
|
"SMAP\nCollectionToArray.kt\nKotlin\n*S Kotlin\n*F\n+ 1 CollectionToArray.kt\nkotlin/jvm/internal/CollectionToArray\n+ 2 ArrayIntrinsics.kt\nkotlin/ArrayIntrinsicsKt\n*L\n1#1,88:1\n63#1,22:89\n63#1,22:111\n26#2:133\n*S KotlinDebug\n*F\n+ 1 CollectionToArray.kt\nkotlin/jvm/internal/CollectionToArray\n*L\n22#1:89,22\n37#1:111,22\n14#1:133\n*E\n"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final EMPTY:[Ljava/lang/Object;
|
|
|
|
.field private static final MAX_SIZE:I = 0x7ffffffd
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
new-array v0, v0, [Ljava/lang/Object;
|
|
|
|
sput-object v0, Lkotlin/jvm/internal/CollectionToArray;->EMPTY:[Ljava/lang/Object;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final toArray(Ljava/util/Collection;)[Ljava/lang/Object;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Collection<",
|
|
"*>;)[",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "collection"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 63
|
|
invoke-interface {p0}, Ljava/util/Collection;->size()I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
:goto_0
|
|
sget-object p0, Lkotlin/jvm/internal/CollectionToArray;->EMPTY:[Ljava/lang/Object;
|
|
|
|
goto :goto_3
|
|
|
|
.line 65
|
|
:cond_0
|
|
invoke-interface {p0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 66
|
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
.line 25
|
|
:cond_1
|
|
new-array v0, v0, [Ljava/lang/Object;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_1
|
|
add-int/lit8 v2, v1, 0x1
|
|
|
|
.line 71
|
|
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
aput-object v3, v0, v1
|
|
|
|
.line 72
|
|
array-length v1, v0
|
|
|
|
const-string v3, "copyOf(...)"
|
|
|
|
if-lt v2, v1, :cond_6
|
|
|
|
.line 73
|
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
move-object p0, v0
|
|
|
|
goto :goto_3
|
|
|
|
:cond_2
|
|
mul-int/lit8 v1, v2, 0x3
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
ushr-int/lit8 v1, v1, 0x1
|
|
|
|
if-gt v1, v2, :cond_4
|
|
|
|
const v1, 0x7ffffffd
|
|
|
|
if-ge v2, v1, :cond_3
|
|
|
|
goto :goto_2
|
|
|
|
.line 79
|
|
:cond_3
|
|
new-instance p0, Ljava/lang/OutOfMemoryError;
|
|
|
|
invoke-direct {p0}, Ljava/lang/OutOfMemoryError;-><init>()V
|
|
|
|
throw p0
|
|
|
|
.line 82
|
|
:cond_4
|
|
:goto_2
|
|
invoke-static {v0, v1}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, v3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
:cond_5
|
|
move v1, v2
|
|
|
|
goto :goto_1
|
|
|
|
.line 84
|
|
:cond_6
|
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_5
|
|
|
|
.line 26
|
|
invoke-static {v0, v2}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-static {p0, v3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
:goto_3
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final toArray(Ljava/util/Collection;[Ljava/lang/Object;)[Ljava/lang/Object;
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Collection<",
|
|
"*>;[",
|
|
"Ljava/lang/Object;",
|
|
")[",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "collection"
|
|
|
|
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 36
|
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
.line 63
|
|
invoke-interface {p0}, Ljava/util/Collection;->size()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 40
|
|
array-length p0, p1
|
|
|
|
if-lez p0, :cond_9
|
|
|
|
aput-object v1, p1, v2
|
|
|
|
goto/16 :goto_2
|
|
|
|
.line 65
|
|
:cond_0
|
|
invoke-interface {p0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 66
|
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_1
|
|
|
|
.line 40
|
|
array-length p0, p1
|
|
|
|
if-lez p0, :cond_9
|
|
|
|
aput-object v1, p1, v2
|
|
|
|
goto :goto_2
|
|
|
|
.line 45
|
|
:cond_1
|
|
array-length v3, p1
|
|
|
|
if-gt v0, v3, :cond_2
|
|
|
|
move-object v0, p1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
invoke-virtual {p1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Class;->getComponentType()Ljava/lang/Class;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v3, v0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v3, "null cannot be cast to non-null type kotlin.Array<kotlin.Any?>"
|
|
|
|
invoke-static {v0, v3}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast v0, [Ljava/lang/Object;
|
|
|
|
:goto_0
|
|
add-int/lit8 v3, v2, 0x1
|
|
|
|
.line 71
|
|
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
aput-object v4, v0, v2
|
|
|
|
.line 72
|
|
array-length v2, v0
|
|
|
|
const-string v4, "copyOf(...)"
|
|
|
|
if-lt v3, v2, :cond_7
|
|
|
|
.line 73
|
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_3
|
|
|
|
move-object p1, v0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
mul-int/lit8 v2, v3, 0x3
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
ushr-int/lit8 v2, v2, 0x1
|
|
|
|
if-gt v2, v3, :cond_5
|
|
|
|
const v2, 0x7ffffffd
|
|
|
|
if-ge v3, v2, :cond_4
|
|
|
|
goto :goto_1
|
|
|
|
.line 79
|
|
:cond_4
|
|
new-instance p0, Ljava/lang/OutOfMemoryError;
|
|
|
|
invoke-direct {p0}, Ljava/lang/OutOfMemoryError;-><init>()V
|
|
|
|
throw p0
|
|
|
|
.line 82
|
|
:cond_5
|
|
:goto_1
|
|
invoke-static {v0, v2}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, v4}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
:cond_6
|
|
move v2, v3
|
|
|
|
goto :goto_0
|
|
|
|
.line 84
|
|
:cond_7
|
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_6
|
|
|
|
if-ne v0, p1, :cond_8
|
|
|
|
.line 49
|
|
aput-object v1, p1, v3
|
|
|
|
goto :goto_2
|
|
|
|
.line 52
|
|
:cond_8
|
|
invoke-static {v0, v3}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1, v4}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
:cond_9
|
|
:goto_2
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private static final toArrayImpl(Ljava/util/Collection;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)[Ljava/lang/Object;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Collection<",
|
|
"*>;",
|
|
"Lkotlin/jvm/functions/Function0;",
|
|
"Lkotlin/jvm/functions/Function1;",
|
|
"Lkotlin/jvm/functions/Function2;",
|
|
")[",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 63
|
|
invoke-interface {p0}, Ljava/util/Collection;->size()I
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 64
|
|
invoke-interface {p1}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, [Ljava/lang/Object;
|
|
|
|
return-object p0
|
|
|
|
.line 65
|
|
:cond_0
|
|
invoke-interface {p0}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p0
|
|
|
|
.line 66
|
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
invoke-interface {p1}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, [Ljava/lang/Object;
|
|
|
|
return-object p0
|
|
|
|
.line 67
|
|
:cond_1
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p2, p1}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, [Ljava/lang/Object;
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:goto_0
|
|
add-int/lit8 v0, p2, 0x1
|
|
|
|
.line 71
|
|
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
aput-object v1, p1, p2
|
|
|
|
.line 72
|
|
array-length p2, p1
|
|
|
|
if-lt v0, p2, :cond_6
|
|
|
|
.line 73
|
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result p2
|
|
|
|
if-nez p2, :cond_2
|
|
|
|
return-object p1
|
|
|
|
:cond_2
|
|
mul-int/lit8 p2, v0, 0x3
|
|
|
|
add-int/lit8 p2, p2, 0x1
|
|
|
|
ushr-int/lit8 p2, p2, 0x1
|
|
|
|
if-gt p2, v0, :cond_4
|
|
|
|
const p2, 0x7ffffffd
|
|
|
|
if-ge v0, p2, :cond_3
|
|
|
|
goto :goto_1
|
|
|
|
.line 79
|
|
:cond_3
|
|
new-instance p0, Ljava/lang/OutOfMemoryError;
|
|
|
|
invoke-direct {p0}, Ljava/lang/OutOfMemoryError;-><init>()V
|
|
|
|
throw p0
|
|
|
|
.line 82
|
|
:cond_4
|
|
:goto_1
|
|
invoke-static {p1, p2}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "copyOf(...)"
|
|
|
|
invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
:cond_5
|
|
move p2, v0
|
|
|
|
goto :goto_0
|
|
|
|
.line 84
|
|
:cond_6
|
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result p2
|
|
|
|
if-nez p2, :cond_5
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-interface {p3, p1, p0}, Lkotlin/jvm/functions/Function2;->invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, [Ljava/lang/Object;
|
|
|
|
return-object p0
|
|
.end method
|