.class public Lz1/c;
.super Ljava/lang/Object;
.source ""


# static fields
.field public static final d:Ljava/nio/charset/CharsetDecoder;

.field public static final e:Ljava/nio/charset/CharsetDecoder;

.field public static final f:Ljava/util/logging/Logger;


# instance fields
.field public a:[I

.field public b:[B

.field public c:Z


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

    const-string v0, "UTF-16LE"

    invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;

    move-result-object v0

    invoke-virtual {v0}, Ljava/nio/charset/Charset;->newDecoder()Ljava/nio/charset/CharsetDecoder;

    move-result-object v0

    sput-object v0, Lz1/c;->d:Ljava/nio/charset/CharsetDecoder;

    const-string v0, "UTF-8"

    invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;

    move-result-object v0

    invoke-virtual {v0}, Ljava/nio/charset/Charset;->newDecoder()Ljava/nio/charset/CharsetDecoder;

    move-result-object v0

    sput-object v0, Lz1/c;->e:Ljava/nio/charset/CharsetDecoder;

    const-class v0, Lz1/c;

    invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ljava/util/logging/Logger;->getLogger(Ljava/lang/String;)Ljava/util/logging/Logger;

    move-result-object v0

    sput-object v0, Lz1/c;->f:Ljava/util/logging/Logger;

    return-void
.end method

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

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

    return-void
.end method

.method public static final b([BI)I
    .registers 3

    add-int/lit8 v0, p1, 0x1

    aget-byte v0, p0, v0

    and-int/lit16 v0, v0, 0xff

    shl-int/lit8 v0, v0, 0x8

    aget-byte p0, p0, p1

    and-int/lit16 p0, p0, 0xff

    or-int/2addr p0, v0

    return p0
.end method

.method public static final d([BI)[I
    .registers 7

    aget-byte v0, p0, p1

    and-int/lit16 v1, v0, 0x80

    const/4 v2, 0x0

    const/4 v3, 0x1

    if-eqz v1, :cond_a

    move v1, v3

    goto :goto_b

    :cond_a
    move v1, v2

    :goto_b
    and-int/lit8 v0, v0, 0x7f

    const/4 v4, 0x2

    if-nez v1, :cond_17

    new-array p0, v4, [I

    aput v0, p0, v2

    aput v3, p0, v3

    return-object p0

    :cond_17
    new-array v1, v4, [I

    shl-int/lit8 v0, v0, 0x8

    add-int/2addr p1, v3

    aget-byte p0, p0, p1

    and-int/lit16 p0, p0, 0xff

    or-int/2addr p0, v0

    aput p0, v1, v2

    aput v4, v1, v3

    return-object v1
.end method


# virtual methods
.method public a(Ljava/lang/String;)I
    .registers 9

    const/4 v0, 0x0

    move v1, v0

    :goto_2
    iget-object v2, p0, Lz1/c;->a:[I

    array-length v3, v2

    if-eq v1, v3, :cond_31

    aget v2, v2, v1

    iget-object v3, p0, Lz1/c;->b:[B

    invoke-static {v3, v2}, Lz1/c;->b([BI)I

    move-result v3

    invoke-virtual {p1}, Ljava/lang/String;->length()I

    move-result v4

    if-eq v3, v4, :cond_16

    goto :goto_2e

    :cond_16
    move v4, v0

    :goto_17
    if-eq v4, v3, :cond_2b

    add-int/lit8 v2, v2, 0x2

    invoke-virtual {p1, v4}, Ljava/lang/String;->charAt(I)C

    move-result v5

    iget-object v6, p0, Lz1/c;->b:[B

    invoke-static {v6, v2}, Lz1/c;->b([BI)I

    move-result v6

    if-eq v5, v6, :cond_28

    goto :goto_2b

    :cond_28
    add-int/lit8 v4, v4, 0x1

    goto :goto_17

    :cond_2b
    :goto_2b
    if-ne v4, v3, :cond_2e

    return v1

    :cond_2e
    :goto_2e
    add-int/lit8 v1, v1, 0x1

    goto :goto_2

    :cond_31
    const/4 p1, -0x1

    return p1
.end method

.method public c(I)Ljava/lang/String;
    .registers 6

    const/4 v0, 0x0

    if-ltz p1, :cond_52

    iget-object v1, p0, Lz1/c;->a:[I

    if-eqz v1, :cond_52

    array-length v2, v1

    if-lt p1, v2, :cond_b

    goto :goto_52

    :cond_b
    aget p1, v1, p1

    iget-boolean v1, p0, Lz1/c;->c:Z

    if-nez v1, :cond_1c

    iget-object v1, p0, Lz1/c;->b:[B

    invoke-static {v1, p1}, Lz1/c;->b([BI)I

    move-result v1

    mul-int/lit8 v1, v1, 0x2

    add-int/lit8 p1, p1, 0x2

    goto :goto_32

    :cond_1c
    iget-object v1, p0, Lz1/c;->b:[B

    invoke-static {v1, p1}, Lz1/c;->d([BI)[I

    move-result-object v1

    const/4 v2, 0x1

    aget v1, v1, v2

    add-int/2addr p1, v1

    iget-object v1, p0, Lz1/c;->b:[B

    invoke-static {v1, p1}, Lz1/c;->d([BI)[I

    move-result-object v1

    aget v2, v1, v2

    add-int/2addr p1, v2

    const/4 v2, 0x0

    aget v1, v1, v2

    .line 1
    :goto_32
    :try_start_32
    iget-boolean v2, p0, Lz1/c;->c:Z

    if-eqz v2, :cond_39

    sget-object v2, Lz1/c;->e:Ljava/nio/charset/CharsetDecoder;

    goto :goto_3b

    :cond_39
    sget-object v2, Lz1/c;->d:Ljava/nio/charset/CharsetDecoder;

    :goto_3b
    iget-object v3, p0, Lz1/c;->b:[B

    invoke-static {v3, p1, v1}, Ljava/nio/ByteBuffer;->wrap([BII)Ljava/nio/ByteBuffer;

    move-result-object p1

    invoke-virtual {v2, p1}, Ljava/nio/charset/CharsetDecoder;->decode(Ljava/nio/ByteBuffer;)Ljava/nio/CharBuffer;

    move-result-object p1

    invoke-virtual {p1}, Ljava/nio/CharBuffer;->toString()Ljava/lang/String;

    move-result-object v0
    :try_end_49
    .catch Ljava/nio/charset/CharacterCodingException; {:try_start_32 .. :try_end_49} :catch_4a

    goto :goto_52

    :catch_4a
    move-exception p1

    sget-object v1, Lz1/c;->f:Ljava/util/logging/Logger;

    sget-object v2, Ljava/util/logging/Level;->WARNING:Ljava/util/logging/Level;

    invoke-virtual {v1, v2, v0, p1}, Ljava/util/logging/Logger;->log(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V

    :cond_52
    :goto_52
    return-object v0
.end method
