.class public final Lz5/sq1;
.super Ljava/lang/Object;
.source ""


# instance fields
.field public final a:Ljava/util/Random;

.field public final b:[I

.field public final c:[I


# direct methods
.method public constructor <init>([ILjava/util/Random;)V
    .registers 5

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

    iput-object p1, p0, Lz5/sq1;->b:[I

    iput-object p2, p0, Lz5/sq1;->a:Ljava/util/Random;

    array-length p2, p1

    new-array p2, p2, [I

    iput-object p2, p0, Lz5/sq1;->c:[I

    const/4 p2, 0x0

    :goto_d
    array-length v0, p1

    if-ge p2, v0, :cond_19

    iget-object v0, p0, Lz5/sq1;->c:[I

    aget v1, p1, p2

    aput p2, v0, v1

    add-int/lit8 p2, p2, 0x1

    goto :goto_d

    :cond_19
    return-void
.end method


# virtual methods
.method public final a(II)Lz5/sq1;
    .registers 10

    new-array p1, p2, [I

    new-array v0, p2, [I

    const/4 v1, 0x0

    move v2, v1

    :goto_6
    if-ge v2, p2, :cond_25

    iget-object v3, p0, Lz5/sq1;->a:Ljava/util/Random;

    iget-object v4, p0, Lz5/sq1;->b:[I

    array-length v4, v4

    add-int/lit8 v4, v4, 0x1

    invoke-virtual {v3, v4}, Ljava/util/Random;->nextInt(I)I

    move-result v3

    aput v3, p1, v2

    add-int/lit8 v3, v2, 0x1

    iget-object v4, p0, Lz5/sq1;->a:Ljava/util/Random;

    invoke-virtual {v4, v3}, Ljava/util/Random;->nextInt(I)I

    move-result v4

    aget v5, v0, v4

    aput v5, v0, v2

    aput v2, v0, v4

    move v2, v3

    goto :goto_6

    :cond_25
    invoke-static {p1}, Ljava/util/Arrays;->sort([I)V

    iget-object v2, p0, Lz5/sq1;->b:[I

    array-length v2, v2

    add-int/2addr v2, p2

    new-array v2, v2, [I

    move v3, v1

    move v4, v3

    :goto_30
    iget-object v5, p0, Lz5/sq1;->b:[I

    array-length v6, v5

    add-int/2addr v6, p2

    if-ge v1, v6, :cond_53

    if-ge v3, p2, :cond_44

    aget v6, p1, v3

    if-ne v4, v6, :cond_44

    add-int/lit8 v5, v3, 0x1

    aget v3, v0, v3

    aput v3, v2, v1

    move v3, v5

    goto :goto_50

    :cond_44
    add-int/lit8 v6, v4, 0x1

    aget v4, v5, v4

    aput v4, v2, v1

    if-ltz v4, :cond_4f

    add-int/2addr v4, p2

    aput v4, v2, v1

    :cond_4f
    move v4, v6

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

    goto :goto_30

    :cond_53
    new-instance p1, Lz5/sq1;

    new-instance p2, Ljava/util/Random;

    iget-object v0, p0, Lz5/sq1;->a:Ljava/util/Random;

    invoke-virtual {v0}, Ljava/util/Random;->nextLong()J

    move-result-wide v0

    invoke-direct {p2, v0, v1}, Ljava/util/Random;-><init>(J)V

    invoke-direct {p1, v2, p2}, Lz5/sq1;-><init>([ILjava/util/Random;)V

    return-object p1
.end method
