Rabbit-R1/switch port/smali/smali_classes3/kotlin/collections/CollectionsKt__CollectionsJVMKt.smali
2024-05-21 17:08:36 -04:00

545 lines
17 KiB
Smali

.class Lkotlin/collections/CollectionsKt__CollectionsJVMKt;
.super Ljava/lang/Object;
.source "CollectionsJVM.kt"
# annotations
.annotation system Ldalvik/annotation/SourceDebugExtension;
value = "SMAP\nCollectionsJVM.kt\nKotlin\n*S Kotlin\n*F\n+ 1 CollectionsJVM.kt\nkotlin/collections/CollectionsKt__CollectionsJVMKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,131:1\n1#2:132\n*E\n"
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000T\n\u0000\n\u0002\u0010 \n\u0002\u0008\u0002\n\u0002\u0010!\n\u0002\u0008\u0002\n\u0002\u0010\u0008\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0005\n\u0002\u0010\u0011\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u001e\n\u0002\u0008\r\n\u0002\u0010\u000b\n\u0002\u0008\u0002\n\u0002\u0010\u001c\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u001a\"\u0010\u0000\u001a\u0008\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\u0008\u0000\u0010\u00022\u000c\u0010\u0003\u001a\u0008\u0012\u0004\u0012\u0002H\u00020\u0004H\u0001\u001a?\u0010\u0005\u001a\u0008\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\u0008\u0000\u0010\u00022\u0006\u0010\u0006\u001a\u00020\u00072\u001d\u0010\u0008\u001a\u0019\u0012\n\u0012\u0008\u0012\u0004\u0012\u0002H\u00020\u0004\u0012\u0004\u0012\u00020\n0\t\u00a2\u0006\u0002\u0008\u000bH\u0081\u0008\u00f8\u0001\u0000\u001a7\u0010\u0005\u001a\u0008\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\u0008\u0000\u0010\u00022\u001d\u0010\u0008\u001a\u0019\u0012\n\u0012\u0008\u0012\u0004\u0012\u0002H\u00020\u0004\u0012\u0004\u0012\u00020\n0\t\u00a2\u0006\u0002\u0008\u000bH\u0081\u0008\u00f8\u0001\u0000\u001a\u0011\u0010\u000c\u001a\u00020\u00072\u0006\u0010\r\u001a\u00020\u0007H\u0081\u0008\u001a\u0011\u0010\u000e\u001a\u00020\u00072\u0006\u0010\u000f\u001a\u00020\u0007H\u0081\u0008\u001a\"\u0010\u0010\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00120\u00112\n\u0010\u0013\u001a\u0006\u0012\u0002\u0008\u00030\u0014H\u0081\u0008\u00a2\u0006\u0002\u0010\u0015\u001a4\u0010\u0010\u001a\u0008\u0012\u0004\u0012\u0002H\u00160\u0011\"\u0004\u0008\u0000\u0010\u00162\n\u0010\u0013\u001a\u0006\u0012\u0002\u0008\u00030\u00142\u000c\u0010\u0017\u001a\u0008\u0012\u0004\u0012\u0002H\u00160\u0011H\u0081\u0008\u00a2\u0006\u0002\u0010\u0018\u001a\u0014\u0010\u0019\u001a\u0008\u0012\u0004\u0012\u0002H\u00020\u0004\"\u0004\u0008\u0000\u0010\u0002H\u0001\u001a\u001c\u0010\u0019\u001a\u0008\u0012\u0004\u0012\u0002H\u00020\u0004\"\u0004\u0008\u0000\u0010\u00022\u0006\u0010\u0006\u001a\u00020\u0007H\u0001\u001a\u001f\u0010\u001a\u001a\u0008\u0012\u0004\u0012\u0002H\u00160\u0001\"\u0004\u0008\u0000\u0010\u00162\u0006\u0010\u001b\u001a\u0002H\u0016\u00a2\u0006\u0002\u0010\u001c\u001a/\u0010\u001d\u001a\u0008\u0012\u0004\u0012\u0002H\u00160\u0011\"\u0004\u0008\u0000\u0010\u00162\u0006\u0010\u001e\u001a\u00020\u00072\u000c\u0010\u0017\u001a\u0008\u0012\u0004\u0012\u0002H\u00160\u0011H\u0000\u00a2\u0006\u0002\u0010\u001f\u001a1\u0010 \u001a\u000c\u0012\u0008\u0008\u0001\u0012\u0004\u0018\u00010\u00120\u0011\"\u0004\u0008\u0000\u0010\u0016*\n\u0012\u0006\u0008\u0001\u0012\u0002H\u00160\u00112\u0006\u0010!\u001a\u00020\"H\u0000\u00a2\u0006\u0002\u0010#\u001a\u001e\u0010$\u001a\u0008\u0012\u0004\u0012\u0002H\u00160\u0001\"\u0004\u0008\u0000\u0010\u0016*\u0008\u0012\u0004\u0012\u0002H\u00160%H\u0007\u001a&\u0010$\u001a\u0008\u0012\u0004\u0012\u0002H\u00160\u0001\"\u0004\u0008\u0000\u0010\u0016*\u0008\u0012\u0004\u0012\u0002H\u00160%2\u0006\u0010&\u001a\u00020\'H\u0007\u001a\u001f\u0010(\u001a\u0008\u0012\u0004\u0012\u0002H\u00160\u0001\"\u0004\u0008\u0000\u0010\u0016*\u0008\u0012\u0004\u0012\u0002H\u00160)H\u0087\u0008\u0082\u0002\u0007\n\u0005\u0008\u009920\u0001\u00a8\u0006*"
}
d2 = {
"build",
"",
"E",
"builder",
"",
"buildListInternal",
"capacity",
"",
"builderAction",
"Lkotlin/Function1;",
"",
"Lkotlin/ExtensionFunctionType;",
"checkCountOverflow",
"count",
"checkIndexOverflow",
"index",
"collectionToArray",
"",
"",
"collection",
"",
"(Ljava/util/Collection;)[Ljava/lang/Object;",
"T",
"array",
"(Ljava/util/Collection;[Ljava/lang/Object;)[Ljava/lang/Object;",
"createListBuilder",
"listOf",
"element",
"(Ljava/lang/Object;)Ljava/util/List;",
"terminateCollectionToArray",
"collectionSize",
"(I[Ljava/lang/Object;)[Ljava/lang/Object;",
"copyToArrayOfAny",
"isVarargs",
"",
"([Ljava/lang/Object;Z)[Ljava/lang/Object;",
"shuffled",
"",
"random",
"Ljava/util/Random;",
"toList",
"Ljava/util/Enumeration;",
"kotlin-stdlib"
}
k = 0x5
mv = {
0x1,
0x9,
0x0
}
xi = 0x31
xs = "kotlin/collections/CollectionsKt"
.end annotation
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static final build(Ljava/util/List;)Ljava/util/List;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">(",
"Ljava/util/List<",
"TE;>;)",
"Ljava/util/List<",
"TE;>;"
}
.end annotation
const-string v0, "builder"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 53
check-cast p0, Lkotlin/collections/builders/ListBuilder;
invoke-virtual {p0}, Lkotlin/collections/builders/ListBuilder;->build()Ljava/util/List;
move-result-object p0
return-object p0
.end method
.method private static final buildListInternal(ILkotlin/jvm/functions/Function1;)Ljava/util/List;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">(I",
"Lkotlin/jvm/functions/Function1<",
"-",
"Ljava/util/List<",
"TE;>;",
"Lkotlin/Unit;",
">;)",
"Ljava/util/List<",
"TE;>;"
}
.end annotation
const-string v0, "builderAction"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 35
invoke-static {p0}, Lkotlin/collections/CollectionsKt;->createListBuilder(I)Ljava/util/List;
move-result-object p0
invoke-interface {p1, p0}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
invoke-static {p0}, Lkotlin/collections/CollectionsKt;->build(Ljava/util/List;)Ljava/util/List;
move-result-object p0
return-object p0
.end method
.method private static final buildListInternal(Lkotlin/jvm/functions/Function1;)Ljava/util/List;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">(",
"Lkotlin/jvm/functions/Function1<",
"-",
"Ljava/util/List<",
"TE;>;",
"Lkotlin/Unit;",
">;)",
"Ljava/util/List<",
"TE;>;"
}
.end annotation
const-string v0, "builderAction"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 28
invoke-static {}, Lkotlin/collections/CollectionsKt;->createListBuilder()Ljava/util/List;
move-result-object v0
invoke-interface {p0, v0}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
invoke-static {v0}, Lkotlin/collections/CollectionsKt;->build(Ljava/util/List;)Ljava/util/List;
move-result-object p0
return-object p0
.end method
.method private static final checkCountOverflow(I)I
.locals 3
if-gez p0, :cond_1
const/4 v0, 0x3
const/4 v1, 0x0
const/4 v2, 0x1
.line 124
invoke-static {v2, v0, v1}, Lkotlin/internal/PlatformImplementationsKt;->apiVersionIsAtLeast(III)Z
move-result v0
if-eqz v0, :cond_0
.line 125
invoke-static {}, Lkotlin/collections/CollectionsKt;->throwCountOverflow()V
goto :goto_0
.line 127
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
const-string v0, "Count overflow has happened."
invoke-direct {p0, v0}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
:cond_1
:goto_0
return p0
.end method
.method private static final checkIndexOverflow(I)I
.locals 3
if-gez p0, :cond_1
const/4 v0, 0x3
const/4 v1, 0x0
const/4 v2, 0x1
.line 111
invoke-static {v2, v0, v1}, Lkotlin/internal/PlatformImplementationsKt;->apiVersionIsAtLeast(III)Z
move-result v0
if-eqz v0, :cond_0
.line 112
invoke-static {}, Lkotlin/collections/CollectionsKt;->throwIndexOverflow()V
goto :goto_0
.line 114
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
const-string v0, "Index overflow has happened."
invoke-direct {p0, v0}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
:cond_1
:goto_0
return p0
.end method
.method private static final collectionToArray(Ljava/util/Collection;)[Ljava/lang/Object;
.locals 1
.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 82
invoke-static {p0}, Lkotlin/jvm/internal/CollectionToArray;->toArray(Ljava/util/Collection;)[Ljava/lang/Object;
move-result-object p0
return-object p0
.end method
.method private static final collectionToArray(Ljava/util/Collection;[Ljava/lang/Object;)[Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/util/Collection<",
"*>;[TT;)[TT;"
}
.end annotation
const-string v0, "collection"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "array"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 87
invoke-static {p0, p1}, Lkotlin/jvm/internal/CollectionToArray;->toArray(Ljava/util/Collection;[Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object p0
return-object p0
.end method
.method public static final copyToArrayOfAny([Ljava/lang/Object;Z)[Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">([TT;Z)[",
"Ljava/lang/Object;"
}
.end annotation
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
if-eqz p1, :cond_0
.line 99
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
move-result-object p1
const-class v0, [Ljava/lang/Object;
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result p1
if-eqz p1, :cond_0
goto :goto_0
.line 103
:cond_0
array-length p1, p0
const-class v0, [Ljava/lang/Object;
invoke-static {p0, p1, v0}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;ILjava/lang/Class;)[Ljava/lang/Object;
move-result-object p0
const-string p1, "copyOf(...)"
invoke-static {p0, p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
:goto_0
return-object p0
.end method
.method public static final createListBuilder()Ljava/util/List;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">()",
"Ljava/util/List<",
"TE;>;"
}
.end annotation
.line 41
new-instance v0, Lkotlin/collections/builders/ListBuilder;
invoke-direct {v0}, Lkotlin/collections/builders/ListBuilder;-><init>()V
check-cast v0, Ljava/util/List;
return-object v0
.end method
.method public static final createListBuilder(I)Ljava/util/List;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<E:",
"Ljava/lang/Object;",
">(I)",
"Ljava/util/List<",
"TE;>;"
}
.end annotation
.line 47
new-instance v0, Lkotlin/collections/builders/ListBuilder;
invoke-direct {v0, p0}, Lkotlin/collections/builders/ListBuilder;-><init>(I)V
check-cast v0, Ljava/util/List;
return-object v0
.end method
.method public static final listOf(Ljava/lang/Object;)Ljava/util/List;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(TT;)",
"Ljava/util/List<",
"TT;>;"
}
.end annotation
.line 22
invoke-static {p0}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;
move-result-object p0
const-string v0, "singletonList(...)"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
return-object p0
.end method
.method public static final shuffled(Ljava/lang/Iterable;)Ljava/util/List;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/Iterable<",
"+TT;>;)",
"Ljava/util/List<",
"TT;>;"
}
.end annotation
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 69
invoke-static {p0}, Lkotlin/collections/CollectionsKt;->toMutableList(Ljava/lang/Iterable;)Ljava/util/List;
move-result-object p0
invoke-static {p0}, Ljava/util/Collections;->shuffle(Ljava/util/List;)V
return-object p0
.end method
.method public static final shuffled(Ljava/lang/Iterable;Ljava/util/Random;)Ljava/util/List;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/Iterable<",
"+TT;>;",
"Ljava/util/Random;",
")",
"Ljava/util/List<",
"TT;>;"
}
.end annotation
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "random"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 76
invoke-static {p0}, Lkotlin/collections/CollectionsKt;->toMutableList(Ljava/lang/Iterable;)Ljava/util/List;
move-result-object p0
invoke-static {p0, p1}, Ljava/util/Collections;->shuffle(Ljava/util/List;Ljava/util/Random;)V
return-object p0
.end method
.method public static final terminateCollectionToArray(I[Ljava/lang/Object;)[Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(I[TT;)[TT;"
}
.end annotation
const-string v0, "array"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 90
array-length v0, p1
if-ge p0, v0, :cond_0
const/4 v0, 0x0
.line 92
aput-object v0, p1, p0
:cond_0
return-object p1
.end method
.method private static final toList(Ljava/util/Enumeration;)Ljava/util/List;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/util/Enumeration<",
"TT;>;)",
"Ljava/util/List<",
"TT;>;"
}
.end annotation
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 62
invoke-static {p0}, Ljava/util/Collections;->list(Ljava/util/Enumeration;)Ljava/util/ArrayList;
move-result-object p0
const-string v0, "list(...)"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
check-cast p0, Ljava/util/List;
return-object p0
.end method