mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
306 lines
5.3 KiB
Smali
306 lines
5.3 KiB
Smali
.class public final Lcom/google/common/primitives/SignedBytes;
|
|
.super Ljava/lang/Object;
|
|
.source "SignedBytes.java"
|
|
|
|
|
|
# annotations
|
|
.annotation runtime Lcom/google/common/primitives/ElementTypesAreNonnullByDefault;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/google/common/primitives/SignedBytes$LexicographicalComparator;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final MAX_POWER_OF_TWO:B = 0x40t
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 41
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static checkedCast(J)B
|
|
.locals 3
|
|
|
|
long-to-int v0, p0
|
|
|
|
int-to-byte v0, v0
|
|
|
|
int-to-long v1, v0
|
|
|
|
cmp-long v1, v1, p0
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
const-string v2, "Out of range: %s"
|
|
|
|
.line 60
|
|
invoke-static {v1, v2, p0, p1}, Lcom/google/common/base/Preconditions;->checkArgument(ZLjava/lang/String;J)V
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public static compare(BB)I
|
|
.locals 0
|
|
|
|
sub-int/2addr p0, p1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static varargs join(Ljava/lang/String;[B)Ljava/lang/String;
|
|
.locals 4
|
|
|
|
.line 145
|
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 146
|
|
array-length v0, p1
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-string p0, ""
|
|
|
|
return-object p0
|
|
|
|
.line 151
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
array-length v1, p1
|
|
|
|
mul-int/lit8 v1, v1, 0x5
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(I)V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 152
|
|
aget-byte v1, p1, v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 153
|
|
:goto_0
|
|
array-length v2, p1
|
|
|
|
if-ge v1, v2, :cond_1
|
|
|
|
.line 154
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v2
|
|
|
|
aget-byte v3, p1, v1
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 156
|
|
:cond_1
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static lexicographicalComparator()Ljava/util/Comparator;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/Comparator<",
|
|
"[B>;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 174
|
|
sget-object v0, Lcom/google/common/primitives/SignedBytes$LexicographicalComparator;->INSTANCE:Lcom/google/common/primitives/SignedBytes$LexicographicalComparator;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static varargs max([B)B
|
|
.locals 3
|
|
|
|
.line 126
|
|
array-length v0, p0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
move v0, v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move v0, v1
|
|
|
|
:goto_0
|
|
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
|
|
|
|
.line 127
|
|
aget-byte v0, p0, v1
|
|
|
|
.line 128
|
|
:goto_1
|
|
array-length v1, p0
|
|
|
|
if-ge v2, v1, :cond_2
|
|
|
|
.line 129
|
|
aget-byte v1, p0, v2
|
|
|
|
if-le v1, v0, :cond_1
|
|
|
|
move v0, v1
|
|
|
|
:cond_1
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
return v0
|
|
.end method
|
|
|
|
.method public static varargs min([B)B
|
|
.locals 3
|
|
|
|
.line 107
|
|
array-length v0, p0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
move v0, v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move v0, v1
|
|
|
|
:goto_0
|
|
invoke-static {v0}, Lcom/google/common/base/Preconditions;->checkArgument(Z)V
|
|
|
|
.line 108
|
|
aget-byte v0, p0, v1
|
|
|
|
.line 109
|
|
:goto_1
|
|
array-length v1, p0
|
|
|
|
if-ge v2, v1, :cond_2
|
|
|
|
.line 110
|
|
aget-byte v1, p0, v2
|
|
|
|
if-ge v1, v0, :cond_1
|
|
|
|
move v0, v1
|
|
|
|
:cond_1
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
return v0
|
|
.end method
|
|
|
|
.method public static saturatedCast(J)B
|
|
.locals 2
|
|
|
|
const-wide/16 v0, 0x7f
|
|
|
|
cmp-long v0, p0, v0
|
|
|
|
if-lez v0, :cond_0
|
|
|
|
const/16 p0, 0x7f
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
const-wide/16 v0, -0x80
|
|
|
|
cmp-long v0, p0, v0
|
|
|
|
if-gez v0, :cond_1
|
|
|
|
const/16 p0, -0x80
|
|
|
|
return p0
|
|
|
|
:cond_1
|
|
long-to-int p0, p0
|
|
|
|
int-to-byte p0, p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static sortDescending([B)V
|
|
.locals 2
|
|
|
|
.line 204
|
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 205
|
|
array-length v1, p0
|
|
|
|
invoke-static {p0, v0, v1}, Lcom/google/common/primitives/SignedBytes;->sortDescending([BII)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static sortDescending([BII)V
|
|
.locals 1
|
|
|
|
.line 215
|
|
invoke-static {p0}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 216
|
|
array-length v0, p0
|
|
|
|
invoke-static {p1, p2, v0}, Lcom/google/common/base/Preconditions;->checkPositionIndexes(III)V
|
|
|
|
.line 217
|
|
invoke-static {p0, p1, p2}, Ljava/util/Arrays;->sort([BII)V
|
|
|
|
.line 218
|
|
invoke-static {p0, p1, p2}, Lcom/google/common/primitives/Bytes;->reverse([BII)V
|
|
|
|
return-void
|
|
.end method
|