ContainerHelpers.smali

.class Lcom/cmcm/support/util/ContainerHelpers;
.super Ljava/lang/Object;


# static fields
.field static final EMPTY_BOOLEANS:[Z

.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
    .registers 2

    const/4 v1, 0x0

    new-array v0, v1, [Z

    sput-object v0, Lcom/cmcm/support/util/ContainerHelpers;->EMPTY_BOOLEANS:[Z

    new-array v0, v1, [I

    sput-object v0, Lcom/cmcm/support/util/ContainerHelpers;->EMPTY_INTS:[I

    new-array v0, v1, [J

    sput-object v0, Lcom/cmcm/support/util/ContainerHelpers;->EMPTY_LONGS:[J

    new-array v0, v1, [Ljava/lang/Object;

    sput-object v0, Lcom/cmcm/support/util/ContainerHelpers;->EMPTY_OBJECTS:[Ljava/lang/Object;

    return-void
.end method

.method constructor <init>()V
    .registers 1

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method static binarySearch([III)I
    .registers 7

    const/4 v1, 0x0

    add-int/lit8 v0, p1, -0x1

    :goto_3
    if-gt v1, v0, :cond_17

    add-int v2, v1, v0

    ushr-int/lit8 v2, v2, 0x1

    aget v3, p0, v2

    if-ge v3, p2, :cond_10

    add-int/lit8 v1, v2, 0x1

    goto :goto_3

    :cond_10
    if-le v3, p2, :cond_15

    add-int/lit8 v0, v2, -0x1

    goto :goto_3

    :cond_15
    move v0, v2

    :goto_16
    return v0

    :cond_17
    xor-int/lit8 v0, v1, -0x1

    goto :goto_16
.end method

.method static binarySearch([JIJ)I
    .registers 10

    const/4 v1, 0x0

    add-int/lit8 v0, p1, -0x1

    :goto_3
    if-gt v1, v0, :cond_1b

    add-int v2, v1, v0

    ushr-int/lit8 v2, v2, 0x1

    aget-wide v4, p0, v2

    cmp-long v3, v4, p2

    if-gez v3, :cond_12

    add-int/lit8 v1, v2, 0x1

    goto :goto_3

    :cond_12
    cmp-long v0, v4, p2

    if-lez v0, :cond_19

    add-int/lit8 v0, v2, -0x1

    goto :goto_3

    :cond_19
    move v0, v2

    :goto_1a
    return v0

    :cond_1b
    xor-int/lit8 v0, v1, -0x1

    goto :goto_1a
.end method