.class public Lcom/badlogic/gdx/utils/IntArray;
.super Ljava/lang/Object;
.source "IntArray.java"


# instance fields
.field public a:[I

.field public b:I

.field public c:Z


# direct methods
.method public constructor <init>()V
    .locals 2

    const/4 v0, 0x1

    const/16 v1, 0x10

    .line 33
    invoke-direct {p0, v0, v1}, Lcom/badlogic/gdx/utils/IntArray;-><init>(ZI)V

    return-void
.end method

.method public constructor <init>(I)V
    .locals 1

    const/4 v0, 0x1

    .line 38
    invoke-direct {p0, v0, p1}, Lcom/badlogic/gdx/utils/IntArray;-><init>(ZI)V

    return-void
.end method

.method public constructor <init>(ZI)V
    .locals 0

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

    .line 45
    iput-boolean p1, p0, Lcom/badlogic/gdx/utils/IntArray;->c:Z

    .line 46
    new-array p1, p2, [I

    iput-object p1, p0, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    return-void
.end method


# virtual methods
.method public a()I
    .locals 2

    .line 227
    iget-object v0, p0, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    iget v1, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    add-int/lit8 v1, v1, -0x1

    iput v1, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    aget v0, v0, v1

    return v0
.end method

.method public a(I)V
    .locals 3

    .line 76
    iget-object v0, p0, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    .line 77
    iget v1, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    array-length v2, v0

    if-ne v1, v2, :cond_0

    const/16 v0, 0x8

    iget v1, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    int-to-float v1, v1

    const/high16 v2, 0x3fe00000    # 1.75f

    mul-float v1, v1, v2

    float-to-int v1, v1

    invoke-static {v0, v1}, Ljava/lang/Math;->max(II)I

    move-result v0

    invoke-virtual {p0, v0}, Lcom/badlogic/gdx/utils/IntArray;->f(I)[I

    move-result-object v0

    .line 78
    :cond_0
    iget v1, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    add-int/lit8 v2, v1, 0x1

    iput v2, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    aput p1, v0, v1

    return-void
.end method

.method public a(II)V
    .locals 3

    .line 124
    iget v0, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    if-gt p1, v0, :cond_2

    .line 125
    iget-object v0, p0, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    .line 126
    iget v1, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    array-length v2, v0

    if-ne v1, v2, :cond_0

    const/16 v0, 0x8

    iget v1, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    int-to-float v1, v1

    const/high16 v2, 0x3fe00000    # 1.75f

    mul-float v1, v1, v2

    float-to-int v1, v1

    invoke-static {v0, v1}, Ljava/lang/Math;->max(II)I

    move-result v0

    invoke-virtual {p0, v0}, Lcom/badlogic/gdx/utils/IntArray;->f(I)[I

    move-result-object v0

    .line 127
    :cond_0
    iget-boolean v1, p0, Lcom/badlogic/gdx/utils/IntArray;->c:Z

    if-eqz v1, :cond_1

    add-int/lit8 v1, p1, 0x1

    .line 128
    iget v2, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    sub-int/2addr v2, p1

    invoke-static {v0, p1, v0, v1, v2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    goto :goto_0

    .line 130
    :cond_1
    iget v1, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    aget v2, v0, p1

    aput v2, v0, v1

    .line 131
    :goto_0
    iget v1, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    add-int/lit8 v1, v1, 0x1

    iput v1, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    .line 132
    aput p2, v0, p1

    return-void

    .line 124
    :cond_2
    new-instance p2, Ljava/lang/IndexOutOfBoundsException;

    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string v1, "index can\'t be > size: "

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p1, " > "

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget p1, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {p2, p1}, Ljava/lang/IndexOutOfBoundsException;-><init>(Ljava/lang/String;)V

    throw p2
.end method

.method public b(I)I
    .locals 3

    .line 104
    iget v0, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    if-ge p1, v0, :cond_0

    .line 105
    iget-object v0, p0, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    aget p1, v0, p1

    return p1

    .line 104
    :cond_0
    new-instance v0, Ljava/lang/IndexOutOfBoundsException;

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "index can\'t be >= size: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p1, " >= "

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget p1, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v0, p1}, Ljava/lang/IndexOutOfBoundsException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public b()V
    .locals 1

    const/4 v0, 0x0

    .line 242
    iput v0, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    return-void
.end method

.method public c(I)I
    .locals 4

    .line 179
    iget v0, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    if-ge p1, v0, :cond_1

    .line 180
    iget-object v0, p0, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    .line 181
    aget v1, v0, p1

    .line 182
    iget v2, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

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

    iput v2, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    .line 183
    iget-boolean v2, p0, Lcom/badlogic/gdx/utils/IntArray;->c:Z

    if-eqz v2, :cond_0

    add-int/lit8 v2, p1, 0x1

    .line 184
    iget v3, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    sub-int/2addr v3, p1

    invoke-static {v0, v2, v0, p1, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    goto :goto_0

    .line 186
    :cond_0
    iget v2, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    aget v2, v0, v2

    aput v2, v0, p1

    :goto_0
    return v1

    .line 179
    :cond_1
    new-instance v0, Ljava/lang/IndexOutOfBoundsException;

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "index can\'t be >= size: "

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p1, " >= "

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget p1, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-direct {v0, p1}, Ljava/lang/IndexOutOfBoundsException;-><init>(Ljava/lang/String;)V

    throw v0
.end method

.method public c()[I
    .locals 4

    .line 315
    iget v0, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    new-array v0, v0, [I

    .line 316
    iget-object v1, p0, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    iget v2, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    const/4 v3, 0x0

    invoke-static {v1, v3, v0, v3, v2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    return-object v0
.end method

.method public d(I)[I
    .locals 1

    .line 257
    iget v0, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    add-int/2addr v0, p1

    .line 258
    iget-object p1, p0, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    array-length p1, p1

    if-le v0, p1, :cond_0

    const/16 p1, 0x8

    invoke-static {p1, v0}, Ljava/lang/Math;->max(II)I

    move-result p1

    invoke-virtual {p0, p1}, Lcom/badlogic/gdx/utils/IntArray;->f(I)[I

    .line 259
    :cond_0
    iget-object p1, p0, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    return-object p1
.end method

.method public e(I)[I
    .locals 1

    .line 265
    iget-object v0, p0, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    array-length v0, v0

    if-le p1, v0, :cond_0

    const/16 v0, 0x8

    invoke-static {v0, p1}, Ljava/lang/Math;->max(II)I

    move-result v0

    invoke-virtual {p0, v0}, Lcom/badlogic/gdx/utils/IntArray;->f(I)[I

    .line 266
    :cond_0
    iput p1, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    .line 267
    iget-object p1, p0, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    return-object p1
.end method

.method public equals(Ljava/lang/Object;)Z
    .locals 6

    const/4 v0, 0x1

    if-ne p1, p0, :cond_0

    return v0

    .line 331
    :cond_0
    iget-boolean v1, p0, Lcom/badlogic/gdx/utils/IntArray;->c:Z

    const/4 v2, 0x0

    if-nez v1, :cond_1

    return v2

    .line 332
    :cond_1
    instance-of v1, p1, Lcom/badlogic/gdx/utils/IntArray;

    if-nez v1, :cond_2

    return v2

    .line 333
    :cond_2
    check-cast p1, Lcom/badlogic/gdx/utils/IntArray;

    .line 334
    iget-boolean v1, p1, Lcom/badlogic/gdx/utils/IntArray;->c:Z

    if-nez v1, :cond_3

    return v2

    .line 335
    :cond_3
    iget v1, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    .line 336
    iget v3, p1, Lcom/badlogic/gdx/utils/IntArray;->b:I

    if-eq v1, v3, :cond_4

    return v2

    .line 337
    :cond_4
    iget-object v3, p0, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    .line 338
    iget-object v3, p1, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    const/4 v3, 0x0

    :goto_0
    if-ge v3, v1, :cond_6

    .line 340
    iget-object v4, p0, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    aget v4, v4, v3

    iget-object v5, p1, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    aget v5, v5, v3

    if-eq v4, v5, :cond_5

    return v2

    :cond_5
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    :cond_6
    return v0
.end method

.method protected f(I)[I
    .locals 3

    .line 271
    new-array p1, p1, [I

    .line 272
    iget-object v0, p0, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    .line 273
    iget v1, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    array-length v2, p1

    invoke-static {v1, v2}, Ljava/lang/Math;->min(II)I

    move-result v1

    const/4 v2, 0x0

    invoke-static {v0, v2, p1, v2, v1}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 274
    iput-object p1, p0, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    return-object p1
.end method

.method public hashCode()I
    .locals 5

    .line 321
    iget-boolean v0, p0, Lcom/badlogic/gdx/utils/IntArray;->c:Z

    if-nez v0, :cond_0

    invoke-super {p0}, Ljava/lang/Object;->hashCode()I

    move-result v0

    return v0

    .line 322
    :cond_0
    iget-object v0, p0, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    const/4 v1, 0x0

    .line 324
    iget v2, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    const/4 v3, 0x1

    :goto_0
    if-ge v1, v2, :cond_1

    mul-int/lit8 v3, v3, 0x1f

    .line 325
    aget v4, v0, v1

    add-int/2addr v3, v4

    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :cond_1
    return v3
.end method

.method public toString()Ljava/lang/String;
    .locals 4

    .line 345
    iget v0, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    if-nez v0, :cond_0

    const-string v0, "[]"

    return-object v0

    .line 346
    :cond_0
    iget-object v0, p0, Lcom/badlogic/gdx/utils/IntArray;->a:[I

    .line 347
    new-instance v1, Lcom/badlogic/gdx/utils/StringBuilder;

    const/16 v2, 0x20

    invoke-direct {v1, v2}, Lcom/badlogic/gdx/utils/StringBuilder;-><init>(I)V

    const/16 v2, 0x5b

    .line 348
    invoke-virtual {v1, v2}, Lcom/badlogic/gdx/utils/StringBuilder;->b(C)Lcom/badlogic/gdx/utils/StringBuilder;

    const/4 v2, 0x0

    .line 349
    aget v2, v0, v2

    invoke-virtual {v1, v2}, Lcom/badlogic/gdx/utils/StringBuilder;->b(I)Lcom/badlogic/gdx/utils/StringBuilder;

    const/4 v2, 0x1

    .line 350
    :goto_0
    iget v3, p0, Lcom/badlogic/gdx/utils/IntArray;->b:I

    if-ge v2, v3, :cond_1

    const-string v3, ", "

    .line 351
    invoke-virtual {v1, v3}, Lcom/badlogic/gdx/utils/StringBuilder;->b(Ljava/lang/String;)Lcom/badlogic/gdx/utils/StringBuilder;

    .line 352
    aget v3, v0, v2

    invoke-virtual {v1, v3}, Lcom/badlogic/gdx/utils/StringBuilder;->b(I)Lcom/badlogic/gdx/utils/StringBuilder;

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_1
    const/16 v0, 0x5d

    .line 354
    invoke-virtual {v1, v0}, Lcom/badlogic/gdx/utils/StringBuilder;->b(C)Lcom/badlogic/gdx/utils/StringBuilder;

    .line 355
    invoke-virtual {v1}, Lcom/badlogic/gdx/utils/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method
