ByteKeyAnalyzer.smali

.class public Lorg/ardverk/collection/ByteKeyAnalyzer;
.super Ldxoptimizer/csk;

# interfaces
.implements Ljava/io/Serializable;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ldxoptimizer/csk",
        "<",
        "Ljava/lang/Byte;",
        ">;",
        "Ljava/io/Serializable;"
    }
.end annotation


# static fields
.field public static final INSTANCE:Lorg/ardverk/collection/ByteKeyAnalyzer;

.field private static final MSB:I = 0x80

.field private static final serialVersionUID:J = -0x4979e4e5faa8056aL


# direct methods
.method static constructor <clinit>()V
    .registers 1

    new-instance v0, Lorg/ardverk/collection/ByteKeyAnalyzer;

    invoke-direct {v0}, Lorg/ardverk/collection/ByteKeyAnalyzer;-><init>()V

    sput-object v0, Lorg/ardverk/collection/ByteKeyAnalyzer;->INSTANCE:Lorg/ardverk/collection/ByteKeyAnalyzer;

    return-void
.end method

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

    invoke-direct {p0}, Ldxoptimizer/csk;-><init>()V

    return-void
.end method

.method private static mask(I)I
    .registers 2

    const/16 v0, 0x80

    ushr-int/2addr v0, p0

    return v0
.end method


# virtual methods
.method public bitIndex(Ljava/lang/Byte;Ljava/lang/Byte;)I
    .registers 6

    invoke-virtual {p1}, Ljava/lang/Byte;->byteValue()B

    move-result v0

    if-nez v0, :cond_8

    const/4 v0, -0x1

    :cond_7
    :goto_7
    return v0

    :cond_8
    invoke-virtual {p2}, Ljava/lang/Byte;->byteValue()B

    move-result v1

    if-eq v0, v1, :cond_1e

    xor-int/2addr v1, v0

    const/4 v0, 0x0

    :goto_10
    const/16 v2, 0x8

    if-ge v0, v2, :cond_1e

    invoke-static {v0}, Lorg/ardverk/collection/ByteKeyAnalyzer;->mask(I)I

    move-result v2

    and-int/2addr v2, v1

    if-nez v2, :cond_7

    add-int/lit8 v0, v0, 0x1

    goto :goto_10

    :cond_1e
    const/4 v0, -0x2

    goto :goto_7
.end method

.method public bridge synthetic bitIndex(Ljava/lang/Object;Ljava/lang/Object;)I
    .registers 4

    check-cast p1, Ljava/lang/Byte;

    check-cast p2, Ljava/lang/Byte;

    invoke-virtual {p0, p1, p2}, Lorg/ardverk/collection/ByteKeyAnalyzer;->bitIndex(Ljava/lang/Byte;Ljava/lang/Byte;)I

    move-result v0

    return v0
.end method

.method public isBitSet(Ljava/lang/Byte;I)Z
    .registers 5

    invoke-virtual {p1}, Ljava/lang/Byte;->byteValue()B

    move-result v0

    invoke-static {p2}, Lorg/ardverk/collection/ByteKeyAnalyzer;->mask(I)I

    move-result v1

    and-int/2addr v0, v1

    if-eqz v0, :cond_d

    const/4 v0, 0x1

    :goto_c
    return v0

    :cond_d
    const/4 v0, 0x0

    goto :goto_c
.end method

.method public bridge synthetic isBitSet(Ljava/lang/Object;I)Z
    .registers 4

    check-cast p1, Ljava/lang/Byte;

    invoke-virtual {p0, p1, p2}, Lorg/ardverk/collection/ByteKeyAnalyzer;->isBitSet(Ljava/lang/Byte;I)Z

    move-result v0

    return v0
.end method

.method public isPrefix(Ljava/lang/Byte;Ljava/lang/Byte;)Z
    .registers 4

    invoke-virtual {p1, p2}, Ljava/lang/Byte;->equals(Ljava/lang/Object;)Z

    move-result v0

    return v0
.end method

.method public bridge synthetic isPrefix(Ljava/lang/Object;Ljava/lang/Object;)Z
    .registers 4

    check-cast p1, Ljava/lang/Byte;

    check-cast p2, Ljava/lang/Byte;

    invoke-virtual {p0, p1, p2}, Lorg/ardverk/collection/ByteKeyAnalyzer;->isPrefix(Ljava/lang/Byte;Ljava/lang/Byte;)Z

    move-result v0

    return v0
.end method

.method public lengthInBits(Ljava/lang/Byte;)I
    .registers 3

    const/16 v0, 0x8

    return v0
.end method

.method public bridge synthetic lengthInBits(Ljava/lang/Object;)I
    .registers 3

    check-cast p1, Ljava/lang/Byte;

    invoke-virtual {p0, p1}, Lorg/ardverk/collection/ByteKeyAnalyzer;->lengthInBits(Ljava/lang/Byte;)I

    move-result v0

    return v0
.end method