.class public final Lcom/badlogic/gdx/graphics/VertexAttributes;
.super Ljava/lang/Object;
.source "VertexAttributes.java"

# interfaces
.implements Ljava/lang/Comparable;
.implements Ljava/lang/Iterable;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/badlogic/gdx/graphics/VertexAttributes$ReadonlyIterable;,
        Lcom/badlogic/gdx/graphics/VertexAttributes$ReadonlyIterator;,
        Lcom/badlogic/gdx/graphics/VertexAttributes$Usage;
    }
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Ljava/lang/Comparable<",
        "Lcom/badlogic/gdx/graphics/VertexAttributes;",
        ">;",
        "Ljava/lang/Iterable<",
        "Lcom/badlogic/gdx/graphics/VertexAttribute;",
        ">;"
    }
.end annotation


# instance fields
.field public final a:I

.field private final b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

.field private c:J

.field private d:Lcom/badlogic/gdx/graphics/VertexAttributes$ReadonlyIterable;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/badlogic/gdx/graphics/VertexAttributes$ReadonlyIterable<",
            "Lcom/badlogic/gdx/graphics/VertexAttribute;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public varargs constructor <init>([Lcom/badlogic/gdx/graphics/VertexAttribute;)V
    .locals 3

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

    const-wide/16 v0, -0x1

    .line 51
    iput-wide v0, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->c:J

    .line 57
    array-length v0, p1

    if-eqz v0, :cond_1

    .line 59
    array-length v0, p1

    new-array v0, v0, [Lcom/badlogic/gdx/graphics/VertexAttribute;

    const/4 v1, 0x0

    .line 60
    :goto_0
    array-length v2, p1

    if-ge v1, v2, :cond_0

    .line 61
    aget-object v2, p1, v1

    aput-object v2, v0, v1

    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 63
    :cond_0
    iput-object v0, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    .line 64
    invoke-direct {p0}, Lcom/badlogic/gdx/graphics/VertexAttributes;->c()I

    move-result p1

    iput p1, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->a:I

    return-void

    .line 57
    :cond_1
    new-instance p1, Ljava/lang/IllegalArgumentException;

    const-string v0, "attributes must be >= 1"

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

    throw p1
.end method

.method private c()I
    .locals 3

    const/4 v0, 0x0

    const/4 v1, 0x0

    .line 92
    :goto_0
    iget-object v2, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    array-length v2, v2

    if-ge v0, v2, :cond_0

    .line 93
    iget-object v2, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    aget-object v2, v2, v0

    .line 94
    iput v1, v2, Lcom/badlogic/gdx/graphics/VertexAttribute;->e:I

    .line 95
    invoke-virtual {v2}, Lcom/badlogic/gdx/graphics/VertexAttribute;->b()I

    move-result v2

    add-int/2addr v1, v2

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_0
    return v1
.end method


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

    .line 103
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    array-length v0, v0

    return v0
.end method

.method public a(Lcom/badlogic/gdx/graphics/VertexAttributes;)I
    .locals 7

    .line 167
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    array-length v0, v0

    iget-object v1, p1, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    array-length v1, v1

    if-eq v0, v1, :cond_0

    iget-object v0, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    array-length v0, v0

    iget-object p1, p1, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    array-length p1, p1

    sub-int/2addr v0, p1

    return v0

    .line 168
    :cond_0
    invoke-virtual {p0}, Lcom/badlogic/gdx/graphics/VertexAttributes;->b()J

    move-result-wide v0

    .line 169
    invoke-virtual {p1}, Lcom/badlogic/gdx/graphics/VertexAttributes;->b()J

    move-result-wide v2

    const/4 v4, -0x1

    const/4 v5, 0x1

    cmp-long v6, v0, v2

    if-eqz v6, :cond_2

    cmp-long p1, v0, v2

    if-gez p1, :cond_1

    goto :goto_0

    :cond_1
    const/4 v4, 0x1

    :goto_0
    return v4

    .line 171
    :cond_2
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    array-length v0, v0

    sub-int/2addr v0, v5

    :goto_1
    if-ltz v0, :cond_9

    .line 172
    iget-object v1, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    aget-object v1, v1, v0

    .line 173
    iget-object v2, p1, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    aget-object v2, v2, v0

    .line 174
    iget v3, v1, Lcom/badlogic/gdx/graphics/VertexAttribute;->a:I

    iget v6, v2, Lcom/badlogic/gdx/graphics/VertexAttribute;->a:I

    if-eq v3, v6, :cond_3

    iget p1, v1, Lcom/badlogic/gdx/graphics/VertexAttribute;->a:I

    iget v0, v2, Lcom/badlogic/gdx/graphics/VertexAttribute;->a:I

    sub-int/2addr p1, v0

    return p1

    .line 175
    :cond_3
    iget v3, v1, Lcom/badlogic/gdx/graphics/VertexAttribute;->g:I

    iget v6, v2, Lcom/badlogic/gdx/graphics/VertexAttribute;->g:I

    if-eq v3, v6, :cond_4

    iget p1, v1, Lcom/badlogic/gdx/graphics/VertexAttribute;->g:I

    iget v0, v2, Lcom/badlogic/gdx/graphics/VertexAttribute;->g:I

    sub-int/2addr p1, v0

    return p1

    .line 176
    :cond_4
    iget v3, v1, Lcom/badlogic/gdx/graphics/VertexAttribute;->b:I

    iget v6, v2, Lcom/badlogic/gdx/graphics/VertexAttribute;->b:I

    if-eq v3, v6, :cond_5

    iget p1, v1, Lcom/badlogic/gdx/graphics/VertexAttribute;->b:I

    iget v0, v2, Lcom/badlogic/gdx/graphics/VertexAttribute;->b:I

    sub-int/2addr p1, v0

    return p1

    .line 177
    :cond_5
    iget-boolean v3, v1, Lcom/badlogic/gdx/graphics/VertexAttribute;->c:Z

    iget-boolean v6, v2, Lcom/badlogic/gdx/graphics/VertexAttribute;->c:Z

    if-eq v3, v6, :cond_7

    iget-boolean p1, v1, Lcom/badlogic/gdx/graphics/VertexAttribute;->c:Z

    if-eqz p1, :cond_6

    const/4 v4, 0x1

    :cond_6
    return v4

    .line 178
    :cond_7
    iget v3, v1, Lcom/badlogic/gdx/graphics/VertexAttribute;->d:I

    iget v6, v2, Lcom/badlogic/gdx/graphics/VertexAttribute;->d:I

    if-eq v3, v6, :cond_8

    iget p1, v1, Lcom/badlogic/gdx/graphics/VertexAttribute;->d:I

    iget v0, v2, Lcom/badlogic/gdx/graphics/VertexAttribute;->d:I

    sub-int/2addr p1, v0

    return p1

    :cond_8
    add-int/lit8 v0, v0, -0x1

    goto :goto_1

    :cond_9
    const/4 p1, 0x0

    return p1
.end method

.method public a(I)Lcom/badlogic/gdx/graphics/VertexAttribute;
    .locals 1

    .line 109
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    aget-object p1, v0, p1

    return-object p1
.end method

.method public b()J
    .locals 5

    .line 155
    iget-wide v0, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->c:J

    const-wide/16 v2, -0x1

    cmp-long v4, v0, v2

    if-nez v4, :cond_1

    const-wide/16 v0, 0x0

    const/4 v2, 0x0

    .line 157
    :goto_0
    iget-object v3, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    array-length v3, v3

    if-ge v2, v3, :cond_0

    .line 158
    iget-object v3, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    aget-object v3, v3, v2

    iget v3, v3, Lcom/badlogic/gdx/graphics/VertexAttribute;->a:I

    int-to-long v3, v3

    or-long/2addr v0, v3

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    .line 160
    :cond_0
    iput-wide v0, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->c:J

    .line 162
    :cond_1
    iget-wide v0, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->c:J

    return-wide v0
.end method

.method public synthetic compareTo(Ljava/lang/Object;)I
    .locals 0

    .line 28
    check-cast p1, Lcom/badlogic/gdx/graphics/VertexAttributes;

    invoke-virtual {p0, p1}, Lcom/badlogic/gdx/graphics/VertexAttributes;->a(Lcom/badlogic/gdx/graphics/VertexAttributes;)I

    move-result p1

    return p1
.end method

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

    const/4 v0, 0x1

    if-ne p1, p0, :cond_0

    return v0

    .line 134
    :cond_0
    instance-of v1, p1, Lcom/badlogic/gdx/graphics/VertexAttributes;

    const/4 v2, 0x0

    if-nez v1, :cond_1

    return v2

    .line 135
    :cond_1
    check-cast p1, Lcom/badlogic/gdx/graphics/VertexAttributes;

    .line 136
    iget-object v1, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    array-length v1, v1

    iget-object v3, p1, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    array-length v3, v3

    if-eq v1, v3, :cond_2

    return v2

    :cond_2
    const/4 v1, 0x0

    .line 137
    :goto_0
    iget-object v3, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    array-length v3, v3

    if-ge v1, v3, :cond_4

    .line 138
    iget-object v3, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    aget-object v3, v3, v1

    iget-object v4, p1, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    aget-object v4, v4, v1

    invoke-virtual {v3, v4}, Lcom/badlogic/gdx/graphics/VertexAttribute;->a(Lcom/badlogic/gdx/graphics/VertexAttribute;)Z

    move-result v3

    if-nez v3, :cond_3

    return v2

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

    goto :goto_0

    :cond_4
    return v0
.end method

.method public hashCode()I
    .locals 5

    .line 145
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    array-length v0, v0

    mul-int/lit8 v0, v0, 0x3d

    int-to-long v0, v0

    const/4 v2, 0x0

    .line 146
    :goto_0
    iget-object v3, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    array-length v3, v3

    if-ge v2, v3, :cond_0

    const-wide/16 v3, 0x3d

    mul-long v0, v0, v3

    .line 147
    iget-object v3, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    aget-object v3, v3, v2

    invoke-virtual {v3}, Lcom/badlogic/gdx/graphics/VertexAttribute;->hashCode()I

    move-result v3

    int-to-long v3, v3

    add-long/2addr v0, v3

    add-int/lit8 v2, v2, 0x1

    goto :goto_0

    :cond_0
    const/16 v2, 0x20

    shr-long v2, v0, v2

    xor-long/2addr v0, v2

    long-to-int v0, v0

    return v0
.end method

.method public iterator()Ljava/util/Iterator;
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()",
            "Ljava/util/Iterator<",
            "Lcom/badlogic/gdx/graphics/VertexAttribute;",
            ">;"
        }
    .end annotation

    .line 185
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->d:Lcom/badlogic/gdx/graphics/VertexAttributes$ReadonlyIterable;

    if-nez v0, :cond_0

    new-instance v0, Lcom/badlogic/gdx/graphics/VertexAttributes$ReadonlyIterable;

    iget-object v1, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    invoke-direct {v0, v1}, Lcom/badlogic/gdx/graphics/VertexAttributes$ReadonlyIterable;-><init>([Ljava/lang/Object;)V

    iput-object v0, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->d:Lcom/badlogic/gdx/graphics/VertexAttributes$ReadonlyIterable;

    .line 186
    :cond_0
    iget-object v0, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->d:Lcom/badlogic/gdx/graphics/VertexAttributes$ReadonlyIterable;

    invoke-virtual {v0}, Lcom/badlogic/gdx/graphics/VertexAttributes$ReadonlyIterable;->iterator()Ljava/util/Iterator;

    move-result-object v0

    return-object v0
.end method

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

    .line 113
    new-instance v0, Ljava/lang/StringBuilder;

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

    const-string v1, "["

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

    const/4 v1, 0x0

    .line 115
    :goto_0
    iget-object v2, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    array-length v2, v2

    if-ge v1, v2, :cond_0

    const-string v2, "("

    .line 116
    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 117
    iget-object v2, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    aget-object v2, v2, v1

    iget-object v2, v2, Lcom/badlogic/gdx/graphics/VertexAttribute;->f:Ljava/lang/String;

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

    const-string v2, ", "

    .line 118
    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 119
    iget-object v2, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    aget-object v2, v2, v1

    iget v2, v2, Lcom/badlogic/gdx/graphics/VertexAttribute;->a:I

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

    const-string v2, ", "

    .line 120
    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 121
    iget-object v2, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    aget-object v2, v2, v1

    iget v2, v2, Lcom/badlogic/gdx/graphics/VertexAttribute;->b:I

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

    const-string v2, ", "

    .line 122
    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 123
    iget-object v2, p0, Lcom/badlogic/gdx/graphics/VertexAttributes;->b:[Lcom/badlogic/gdx/graphics/VertexAttribute;

    aget-object v2, v2, v1

    iget v2, v2, Lcom/badlogic/gdx/graphics/VertexAttribute;->e:I

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

    const-string v2, ")"

    .line 124
    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v2, "\n"

    .line 125
    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    :cond_0
    const-string v1, "]"

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

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

    move-result-object v0

    return-object v0
.end method
