Code.smali

.class public final Lcom/tencent/tinker/android/dex/Code;
.super Lcom/tencent/tinker/android/dex/TableOfContents$Section$Item;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/tencent/tinker/android/dex/Code$CatchHandler;,
        Lcom/tencent/tinker/android/dex/Code$Try;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/tencent/tinker/android/dex/TableOfContents$Section$Item",
        "<",
        "Lcom/tencent/tinker/android/dex/Code;",
        ">;"
    }
.end annotation


# instance fields
.field public catchHandlers:[Lcom/tencent/tinker/android/dex/Code$CatchHandler;

.field public debugInfoOffset:I

.field public insSize:I

.field public instructions:[S

.field public outsSize:I

.field public registersSize:I

.field public tries:[Lcom/tencent/tinker/android/dex/Code$Try;


# direct methods
.method public constructor <init>(IIIII[S[Lcom/tencent/tinker/android/dex/Code$Try;[Lcom/tencent/tinker/android/dex/Code$CatchHandler;)V
    .registers 9

    invoke-direct {p0, p1}, Lcom/tencent/tinker/android/dex/TableOfContents$Section$Item;-><init>(I)V

    iput p2, p0, Lcom/tencent/tinker/android/dex/Code;->registersSize:I

    iput p3, p0, Lcom/tencent/tinker/android/dex/Code;->insSize:I

    iput p4, p0, Lcom/tencent/tinker/android/dex/Code;->outsSize:I

    iput p5, p0, Lcom/tencent/tinker/android/dex/Code;->debugInfoOffset:I

    iput-object p6, p0, Lcom/tencent/tinker/android/dex/Code;->instructions:[S

    iput-object p7, p0, Lcom/tencent/tinker/android/dex/Code;->tries:[Lcom/tencent/tinker/android/dex/Code$Try;

    iput-object p8, p0, Lcom/tencent/tinker/android/dex/Code;->catchHandlers:[Lcom/tencent/tinker/android/dex/Code$CatchHandler;

    return-void
.end method


# virtual methods
.method public byteCountInDex()I
    .registers 11

    const/4 v1, 0x0

    iget-object v0, p0, Lcom/tencent/tinker/android/dex/Code;->instructions:[S

    array-length v2, v0

    mul-int/lit8 v0, v2, 0x2

    add-int/lit8 v0, v0, 0x10

    iget-object v3, p0, Lcom/tencent/tinker/android/dex/Code;->tries:[Lcom/tencent/tinker/android/dex/Code$Try;

    array-length v3, v3

    if-lez v3, :cond_63

    and-int/lit8 v2, v2, 0x1

    const/4 v3, 0x1

    if-ne v2, v3, :cond_14

    add-int/lit8 v0, v0, 0x2

    :cond_14
    iget-object v2, p0, Lcom/tencent/tinker/android/dex/Code;->tries:[Lcom/tencent/tinker/android/dex/Code$Try;

    array-length v2, v2

    mul-int/lit8 v2, v2, 0x8

    add-int/2addr v0, v2

    iget-object v2, p0, Lcom/tencent/tinker/android/dex/Code;->catchHandlers:[Lcom/tencent/tinker/android/dex/Code$CatchHandler;

    array-length v2, v2

    invoke-static {v2}, Lcom/tencent/tinker/android/dex/Leb128;->unsignedLeb128Size(I)I

    move-result v2

    add-int/2addr v0, v2

    iget-object v4, p0, Lcom/tencent/tinker/android/dex/Code;->catchHandlers:[Lcom/tencent/tinker/android/dex/Code$CatchHandler;

    array-length v5, v4

    move v3, v1

    :goto_26
    if-ge v3, v5, :cond_63

    aget-object v6, v4, v3

    iget-object v2, v6, Lcom/tencent/tinker/android/dex/Code$CatchHandler;->typeIndexes:[I

    array-length v7, v2

    iget v2, v6, Lcom/tencent/tinker/android/dex/Code$CatchHandler;->catchAllAddress:I

    const/4 v8, -0x1

    if-eq v2, v8, :cond_58

    neg-int v2, v7

    invoke-static {v2}, Lcom/tencent/tinker/android/dex/Leb128;->signedLeb128Size(I)I

    move-result v2

    iget v8, v6, Lcom/tencent/tinker/android/dex/Code$CatchHandler;->catchAllAddress:I

    invoke-static {v8}, Lcom/tencent/tinker/android/dex/Leb128;->unsignedLeb128Size(I)I

    move-result v8

    add-int/2addr v2, v8

    add-int/2addr v0, v2

    :goto_3f
    move v2, v0

    move v0, v1

    :goto_41
    if-ge v0, v7, :cond_5e

    iget-object v8, v6, Lcom/tencent/tinker/android/dex/Code$CatchHandler;->typeIndexes:[I

    aget v8, v8, v0

    invoke-static {v8}, Lcom/tencent/tinker/android/dex/Leb128;->unsignedLeb128Size(I)I

    move-result v8

    iget-object v9, v6, Lcom/tencent/tinker/android/dex/Code$CatchHandler;->addresses:[I

    aget v9, v9, v0

    invoke-static {v9}, Lcom/tencent/tinker/android/dex/Leb128;->unsignedLeb128Size(I)I

    move-result v9

    add-int/2addr v8, v9

    add-int/2addr v2, v8

    add-int/lit8 v0, v0, 0x1

    goto :goto_41

    :cond_58
    invoke-static {v7}, Lcom/tencent/tinker/android/dex/Leb128;->signedLeb128Size(I)I

    move-result v2

    add-int/2addr v0, v2

    goto :goto_3f

    :cond_5e
    add-int/lit8 v0, v3, 0x1

    move v3, v0

    move v0, v2

    goto :goto_26

    :cond_63
    return v0
.end method

.method public compareTo(Lcom/tencent/tinker/android/dex/Code;)I
    .registers 4

    iget v0, p0, Lcom/tencent/tinker/android/dex/Code;->registersSize:I

    iget v1, p1, Lcom/tencent/tinker/android/dex/Code;->registersSize:I

    invoke-static {v0, v1}, Lcom/tencent/tinker/android/dex/util/CompareUtils;->sCompare(II)I

    move-result v0

    if-eqz v0, :cond_b

    :cond_a
    :goto_a
    return v0

    :cond_b
    iget v0, p0, Lcom/tencent/tinker/android/dex/Code;->insSize:I

    iget v1, p1, Lcom/tencent/tinker/android/dex/Code;->insSize:I

    invoke-static {v0, v1}, Lcom/tencent/tinker/android/dex/util/CompareUtils;->sCompare(II)I

    move-result v0

    if-nez v0, :cond_a

    iget v0, p0, Lcom/tencent/tinker/android/dex/Code;->outsSize:I

    iget v1, p1, Lcom/tencent/tinker/android/dex/Code;->outsSize:I

    invoke-static {v0, v1}, Lcom/tencent/tinker/android/dex/util/CompareUtils;->sCompare(II)I

    move-result v0

    if-nez v0, :cond_a

    iget v0, p0, Lcom/tencent/tinker/android/dex/Code;->debugInfoOffset:I

    iget v1, p1, Lcom/tencent/tinker/android/dex/Code;->debugInfoOffset:I

    invoke-static {v0, v1}, Lcom/tencent/tinker/android/dex/util/CompareUtils;->sCompare(II)I

    move-result v0

    if-nez v0, :cond_a

    iget-object v0, p0, Lcom/tencent/tinker/android/dex/Code;->instructions:[S

    iget-object v1, p1, Lcom/tencent/tinker/android/dex/Code;->instructions:[S

    invoke-static {v0, v1}, Lcom/tencent/tinker/android/dex/util/CompareUtils;->uArrCompare([S[S)I

    move-result v0

    if-nez v0, :cond_a

    iget-object v0, p0, Lcom/tencent/tinker/android/dex/Code;->tries:[Lcom/tencent/tinker/android/dex/Code$Try;

    iget-object v1, p1, Lcom/tencent/tinker/android/dex/Code;->tries:[Lcom/tencent/tinker/android/dex/Code$Try;

    invoke-static {v0, v1}, Lcom/tencent/tinker/android/dex/util/CompareUtils;->aArrCompare([Ljava/lang/Comparable;[Ljava/lang/Comparable;)I

    move-result v0

    if-nez v0, :cond_a

    iget-object v0, p0, Lcom/tencent/tinker/android/dex/Code;->catchHandlers:[Lcom/tencent/tinker/android/dex/Code$CatchHandler;

    iget-object v1, p1, Lcom/tencent/tinker/android/dex/Code;->catchHandlers:[Lcom/tencent/tinker/android/dex/Code$CatchHandler;

    invoke-static {v0, v1}, Lcom/tencent/tinker/android/dex/util/CompareUtils;->aArrCompare([Ljava/lang/Comparable;[Ljava/lang/Comparable;)I

    move-result v0

    goto :goto_a
.end method

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

    check-cast p1, Lcom/tencent/tinker/android/dex/Code;

    invoke-virtual {p0, p1}, Lcom/tencent/tinker/android/dex/Code;->compareTo(Lcom/tencent/tinker/android/dex/Code;)I

    move-result v0

    return v0
.end method