204 lines
3 KiB
Smali
204 lines
3 KiB
Smali
.class Landroidx/collection/ContainerHelpers;
|
|
.super Ljava/lang/Object;
|
|
|
|
|
|
# static fields
|
|
.field static final EMPTY_INTS:[I
|
|
|
|
.field static final EMPTY_LONGS:[J
|
|
|
|
.field static final EMPTY_OBJECTS:[Ljava/lang/Object;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
new-array v1, v0, [I
|
|
|
|
sput-object v1, Landroidx/collection/ContainerHelpers;->EMPTY_INTS:[I
|
|
|
|
new-array v1, v0, [J
|
|
|
|
sput-object v1, Landroidx/collection/ContainerHelpers;->EMPTY_LONGS:[J
|
|
|
|
new-array v0, v0, [Ljava/lang/Object;
|
|
|
|
sput-object v0, Landroidx/collection/ContainerHelpers;->EMPTY_OBJECTS:[Ljava/lang/Object;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static binarySearch([III)I
|
|
.locals 3
|
|
|
|
add-int/lit8 p1, p1, -0x1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-gt v0, p1, :cond_2
|
|
|
|
add-int v1, v0, p1
|
|
|
|
ushr-int/lit8 v1, v1, 0x1
|
|
|
|
aget v2, p0, v1
|
|
|
|
if-ge v2, p2, :cond_0
|
|
|
|
add-int/lit8 v0, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
if-le v2, p2, :cond_1
|
|
|
|
add-int/lit8 p1, v1, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return v1
|
|
|
|
:cond_2
|
|
xor-int/lit8 p0, v0, -0x1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method static binarySearch([JIJ)I
|
|
.locals 5
|
|
|
|
add-int/lit8 p1, p1, -0x1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-gt v0, p1, :cond_2
|
|
|
|
add-int v1, v0, p1
|
|
|
|
ushr-int/lit8 v1, v1, 0x1
|
|
|
|
aget-wide v2, p0, v1
|
|
|
|
cmp-long v4, v2, p2
|
|
|
|
if-gez v4, :cond_0
|
|
|
|
add-int/lit8 v0, v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
cmp-long p1, v2, p2
|
|
|
|
if-lez p1, :cond_1
|
|
|
|
add-int/lit8 p1, v1, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return v1
|
|
|
|
:cond_2
|
|
xor-int/lit8 p0, v0, -0x1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static equal(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
.locals 0
|
|
|
|
if-eq p0, p1, :cond_1
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
invoke-virtual {p0, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static idealByteArraySize(I)I
|
|
.locals 2
|
|
|
|
const/4 v0, 0x4
|
|
|
|
:goto_0
|
|
const/16 v1, 0x20
|
|
|
|
if-ge v0, v1, :cond_1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
shl-int/2addr v1, v0
|
|
|
|
add-int/lit8 v1, v1, -0xc
|
|
|
|
if-gt p0, v1, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return p0
|
|
.end method
|
|
|
|
.method public static idealIntArraySize(I)I
|
|
.locals 0
|
|
|
|
mul-int/lit8 p0, p0, 0x4
|
|
|
|
invoke-static {p0}, Landroidx/collection/ContainerHelpers;->idealByteArraySize(I)I
|
|
|
|
move-result p0
|
|
|
|
div-int/lit8 p0, p0, 0x4
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static idealLongArraySize(I)I
|
|
.locals 0
|
|
|
|
mul-int/lit8 p0, p0, 0x8
|
|
|
|
invoke-static {p0}, Landroidx/collection/ContainerHelpers;->idealByteArraySize(I)I
|
|
|
|
move-result p0
|
|
|
|
div-int/lit8 p0, p0, 0x8
|
|
|
|
return p0
|
|
.end method
|