GF2Matrix.smali

.class public Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;
.super Lorg/spongycastle/pqc/math/linearalgebra/Matrix;
.source "GF2Matrix.java"


# instance fields
.field private length:I

.field private matrix:[[I


# direct methods
.method public constructor <init>(IC)V
    .registers 4

    .prologue
    .line 116
    new-instance v0, Ljava/security/SecureRandom;

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

    invoke-direct {p0, p1, p2, v0}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;-><init>(ICLjava/security/SecureRandom;)V

    .line 117
    return-void
.end method

.method public constructor <init>(ICLjava/security/SecureRandom;)V
    .registers 6

    .prologue
    .line 127
    invoke-direct {p0}, Lorg/spongycastle/pqc/math/linearalgebra/Matrix;-><init>()V

    .line 128
    if-gtz p1, :cond_d

    .line 130
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "Size of matrix is non-positive."

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

    throw v0

    .line 133
    :cond_d
    sparse-switch p2, :sswitch_data_2c

    .line 157
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "Unknown matrix type."

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

    throw v0

    .line 137
    :sswitch_18
    invoke-direct {p0, p1, p1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->assignZeroMatrix(II)V

    .line 154
    :goto_1b
    return-void

    .line 141
    :sswitch_1c
    invoke-direct {p0, p1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->assignUnitMatrix(I)V

    goto :goto_1b

    .line 145
    :sswitch_20
    invoke-direct {p0, p1, p3}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->assignRandomLowerTriangularMatrix(ILjava/security/SecureRandom;)V

    goto :goto_1b

    .line 149
    :sswitch_24
    invoke-direct {p0, p1, p3}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->assignRandomUpperTriangularMatrix(ILjava/security/SecureRandom;)V

    goto :goto_1b

    .line 153
    :sswitch_28
    invoke-direct {p0, p1, p3}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->assignRandomRegularMatrix(ILjava/security/SecureRandom;)V

    goto :goto_1b

    .line 133
    :sswitch_data_2c
    .sparse-switch
        0x49 -> :sswitch_1c
        0x4c -> :sswitch_20
        0x52 -> :sswitch_28
        0x55 -> :sswitch_24
        0x5a -> :sswitch_18
    .end sparse-switch
.end method

.method private constructor <init>(II)V
    .registers 5

    .prologue
    .line 183
    invoke-direct {p0}, Lorg/spongycastle/pqc/math/linearalgebra/Matrix;-><init>()V

    .line 184
    if-lez p2, :cond_7

    if-gtz p1, :cond_f

    .line 186
    :cond_7
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "size of matrix is non-positive"

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

    throw v0

    .line 189
    :cond_f
    invoke-direct {p0, p1, p2}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->assignZeroMatrix(II)V

    .line 190
    return-void
.end method

.method public constructor <init>(I[[I)V
    .registers 8

    .prologue
    const/4 v1, 0x0

    .line 81
    invoke-direct {p0}, Lorg/spongycastle/pqc/math/linearalgebra/Matrix;-><init>()V

    .line 82
    aget-object v0, p2, v1

    array-length v0, v0

    add-int/lit8 v2, p1, 0x1f

    shr-int/lit8 v2, v2, 0x5

    if-eq v0, v2, :cond_15

    .line 84
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "Int array does not match given number of columns."

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

    throw v0

    .line 87
    :cond_15
    iput p1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    .line 88
    array-length v0, p2

    iput v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    .line 89
    aget-object v0, p2, v1

    array-length v0, v0

    iput v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    .line 90
    and-int/lit8 v0, p1, 0x1f

    .line 92
    if-nez v0, :cond_36

    .line 94
    const/4 v0, -0x1

    .line 100
    :goto_24
    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v1, v2, :cond_3c

    .line 102
    aget-object v2, p2, v1

    iget v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

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

    aget v4, v2, v3

    and-int/2addr v4, v0

    aput v4, v2, v3

    .line 100
    add-int/lit8 v1, v1, 0x1

    goto :goto_24

    .line 98
    :cond_36
    const/4 v2, 0x1

    shl-int v0, v2, v0

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

    goto :goto_24

    .line 104
    :cond_3c
    iput-object p2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    .line 105
    return-void
.end method

.method public constructor <init>(Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;)V
    .registers 5

    .prologue
    .line 167
    invoke-direct {p0}, Lorg/spongycastle/pqc/math/linearalgebra/Matrix;-><init>()V

    .line 168
    invoke-virtual {p1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->getNumColumns()I

    move-result v0

    iput v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    .line 169
    invoke-virtual {p1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->getNumRows()I

    move-result v0

    iput v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    .line 170
    iget v0, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    iput v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    .line 171
    iget-object v0, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    array-length v0, v0

    new-array v0, v0, [[I

    iput-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    .line 172
    const/4 v0, 0x0

    :goto_1b
    iget-object v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    array-length v1, v1

    if-ge v0, v1, :cond_2f

    .line 174
    iget-object v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    iget-object v2, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v2, v2, v0

    invoke-static {v2}, Lorg/spongycastle/pqc/math/linearalgebra/IntUtils;->clone([I)[I

    move-result-object v2

    aput-object v2, v1, v0

    .line 172
    add-int/lit8 v0, v0, 0x1

    goto :goto_1b

    .line 177
    :cond_2f
    return-void
.end method

.method public constructor <init>([B)V
    .registers 11

    .prologue
    const/4 v1, 0x0

    .line 33
    invoke-direct {p0}, Lorg/spongycastle/pqc/math/linearalgebra/Matrix;-><init>()V

    .line 34
    array-length v0, p1

    const/16 v2, 0x9

    if-ge v0, v2, :cond_11

    .line 36
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "given array is not an encoded matrix over GF(2)"

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

    throw v0

    .line 40
    :cond_11
    invoke-static {p1, v1}, Lorg/spongycastle/pqc/math/linearalgebra/LittleEndianConversions;->OS2IP([BI)I

    move-result v0

    iput v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    .line 41
    const/4 v0, 0x4

    invoke-static {p1, v0}, Lorg/spongycastle/pqc/math/linearalgebra/LittleEndianConversions;->OS2IP([BI)I

    move-result v0

    iput v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    .line 43
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    add-int/lit8 v0, v0, 0x7

    ushr-int/lit8 v0, v0, 0x3

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    mul-int/2addr v0, v2

    .line 45
    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-lez v2, :cond_30

    array-length v2, p1

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

    if-eq v0, v2, :cond_38

    .line 47
    :cond_30
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "given array is not an encoded matrix over GF(2)"

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

    throw v0

    .line 51
    :cond_38
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    add-int/lit8 v0, v0, 0x1f

    ushr-int/lit8 v0, v0, 0x5

    iput v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    .line 52
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    filled-new-array {v0, v2}, [I

    move-result-object v0

    sget-object v2, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    invoke-static {v2, v0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [[I

    iput-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    .line 55
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    shr-int/lit8 v5, v0, 0x5

    .line 57
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    and-int/lit8 v6, v0, 0x1f

    .line 59
    const/16 v0, 0x8

    move v2, v0

    move v0, v1

    .line 60
    :goto_5e
    iget v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v0, v3, :cond_8f

    move v3, v1

    .line 62
    :goto_63
    if-ge v3, v5, :cond_74

    .line 64
    iget-object v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v4, v4, v0

    invoke-static {p1, v2}, Lorg/spongycastle/pqc/math/linearalgebra/LittleEndianConversions;->OS2IP([BI)I

    move-result v7

    aput v7, v4, v3

    .line 62
    add-int/lit8 v3, v3, 0x1

    add-int/lit8 v2, v2, 0x4

    goto :goto_63

    :cond_74
    move v3, v1

    .line 66
    :goto_75
    if-ge v3, v6, :cond_8c

    .line 68
    iget-object v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v7, v4, v0

    aget v8, v7, v5

    add-int/lit8 v4, v2, 0x1

    aget-byte v2, p1, v2

    and-int/lit16 v2, v2, 0xff

    shl-int/2addr v2, v3

    xor-int/2addr v2, v8

    aput v2, v7, v5

    .line 66
    add-int/lit8 v2, v3, 0x8

    move v3, v2

    move v2, v4

    goto :goto_75

    .line 60
    :cond_8c
    add-int/lit8 v0, v0, 0x1

    goto :goto_5e

    .line 71
    :cond_8f
    return-void
.end method

.method private static addToRow([I[II)V
    .registers 6

    .prologue
    .line 1317
    array-length v0, p1

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

    :goto_3
    if-lt v0, p2, :cond_f

    .line 1319
    aget v1, p0, v0

    aget v2, p1, v0

    xor-int/2addr v1, v2

    aput v1, p1, v0

    .line 1317
    add-int/lit8 v0, v0, -0x1

    goto :goto_3

    .line 1321
    :cond_f
    return-void
.end method

.method private assignRandomLowerTriangularMatrix(ILjava/security/SecureRandom;)V
    .registers 11

    .prologue
    const/4 v1, 0x0

    .line 246
    iput p1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    .line 247
    iput p1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    .line 248
    add-int/lit8 v0, p1, 0x1f

    ushr-int/lit8 v0, v0, 0x5

    iput v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    .line 249
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    filled-new-array {v0, v2}, [I

    move-result-object v0

    sget-object v2, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    invoke-static {v2, v0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [[I

    iput-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    move v0, v1

    .line 250
    :goto_1e
    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v0, v2, :cond_59

    .line 252
    ushr-int/lit8 v3, v0, 0x5

    .line 253
    and-int/lit8 v2, v0, 0x1f

    .line 254
    rsub-int/lit8 v4, v2, 0x1f

    .line 255
    const/4 v5, 0x1

    shl-int/2addr v5, v2

    move v2, v1

    .line 256
    :goto_2b
    if-ge v2, v3, :cond_3a

    .line 258
    iget-object v6, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v6, v6, v0

    invoke-virtual {p2}, Ljava/security/SecureRandom;->nextInt()I

    move-result v7

    aput v7, v6, v2

    .line 256
    add-int/lit8 v2, v2, 0x1

    goto :goto_2b

    .line 260
    :cond_3a
    iget-object v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v2, v2, v0

    invoke-virtual {p2}, Ljava/security/SecureRandom;->nextInt()I

    move-result v6

    ushr-int v4, v6, v4

    or-int/2addr v4, v5

    aput v4, v2, v3

    .line 261
    add-int/lit8 v2, v3, 0x1

    :goto_49
    iget v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    if-ge v2, v3, :cond_56

    .line 263
    iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v3, v3, v0

    aput v1, v3, v2

    .line 261
    add-int/lit8 v2, v2, 0x1

    goto :goto_49

    .line 250
    :cond_56
    add-int/lit8 v0, v0, 0x1

    goto :goto_1e

    .line 268
    :cond_59
    return-void
.end method

.method private assignRandomRegularMatrix(ILjava/security/SecureRandom;)V
    .registers 10

    .prologue
    const/4 v2, 0x0

    .line 320
    iput p1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    .line 321
    iput p1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    .line 322
    add-int/lit8 v0, p1, 0x1f

    ushr-int/lit8 v0, v0, 0x5

    iput v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    .line 323
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    filled-new-array {v0, v1}, [I

    move-result-object v0

    sget-object v1, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    invoke-static {v1, v0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [[I

    iput-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    .line 324
    new-instance v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    const/16 v1, 0x4c

    invoke-direct {v0, p1, v1, p2}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;-><init>(ICLjava/security/SecureRandom;)V

    .line 325
    new-instance v1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    const/16 v3, 0x55

    invoke-direct {v1, p1, v3, p2}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;-><init>(ICLjava/security/SecureRandom;)V

    .line 326
    invoke-virtual {v0, v1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->rightMultiply(Lorg/spongycastle/pqc/math/linearalgebra/Matrix;)Lorg/spongycastle/pqc/math/linearalgebra/Matrix;

    move-result-object v0

    check-cast v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    .line 327
    new-instance v1, Lorg/spongycastle/pqc/math/linearalgebra/Permutation;

    invoke-direct {v1, p1, p2}, Lorg/spongycastle/pqc/math/linearalgebra/Permutation;-><init>(ILjava/security/SecureRandom;)V

    .line 328
    invoke-virtual {v1}, Lorg/spongycastle/pqc/math/linearalgebra/Permutation;->getVector()[I

    move-result-object v3

    move v1, v2

    .line 329
    :goto_3b
    if-ge v1, p1, :cond_4f

    .line 331
    iget-object v4, v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v4, v4, v1

    iget-object v5, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget v6, v3, v1

    aget-object v5, v5, v6

    iget v6, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    invoke-static {v4, v2, v5, v2, v6}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 329
    add-int/lit8 v1, v1, 0x1

    goto :goto_3b

    .line 333
    :cond_4f
    return-void
.end method

.method private assignRandomUpperTriangularMatrix(ILjava/security/SecureRandom;)V
    .registers 12

    .prologue
    const/4 v8, 0x1

    const/4 v2, 0x0

    .line 278
    iput p1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    .line 279
    iput p1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    .line 280
    add-int/lit8 v0, p1, 0x1f

    ushr-int/lit8 v0, v0, 0x5

    iput v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    .line 281
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    filled-new-array {v0, v1}, [I

    move-result-object v0

    sget-object v1, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    invoke-static {v1, v0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [[I

    iput-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    .line 282
    and-int/lit8 v0, p1, 0x1f

    .line 284
    if-nez v0, :cond_3a

    .line 286
    const/4 v0, -0x1

    :goto_23
    move v1, v2

    .line 292
    :goto_24
    iget v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v1, v3, :cond_6f

    .line 294
    ushr-int/lit8 v4, v1, 0x5

    .line 295
    and-int/lit8 v5, v1, 0x1f

    .line 297
    shl-int v6, v8, v5

    move v3, v2

    .line 298
    :goto_2f
    if-ge v3, v4, :cond_3f

    .line 300
    iget-object v7, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v7, v7, v1

    aput v2, v7, v3

    .line 298
    add-int/lit8 v3, v3, 0x1

    goto :goto_2f

    .line 290
    :cond_3a
    shl-int v0, v8, v0

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

    goto :goto_23

    .line 302
    :cond_3f
    iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v3, v3, v1

    invoke-virtual {p2}, Ljava/security/SecureRandom;->nextInt()I

    move-result v7

    shl-int v5, v7, v5

    or-int/2addr v5, v6

    aput v5, v3, v4

    .line 303
    add-int/lit8 v3, v4, 0x1

    :goto_4e
    iget v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    if-ge v3, v4, :cond_5f

    .line 305
    iget-object v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v4, v4, v1

    invoke-virtual {p2}, Ljava/security/SecureRandom;->nextInt()I

    move-result v5

    aput v5, v4, v3

    .line 303
    add-int/lit8 v3, v3, 0x1

    goto :goto_4e

    .line 307
    :cond_5f
    iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v3, v3, v1

    iget v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

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

    aget v5, v3, v4

    and-int/2addr v5, v0

    aput v5, v3, v4

    .line 292
    add-int/lit8 v1, v1, 0x1

    goto :goto_24

    .line 310
    :cond_6f
    return-void
.end method

.method private assignUnitMatrix(I)V
    .registers 7

    .prologue
    const/4 v1, 0x0

    .line 220
    iput p1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    .line 221
    iput p1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    .line 222
    add-int/lit8 v0, p1, 0x1f

    ushr-int/lit8 v0, v0, 0x5

    iput v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    .line 223
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    filled-new-array {v0, v2}, [I

    move-result-object v0

    sget-object v2, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    invoke-static {v2, v0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [[I

    iput-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    move v0, v1

    .line 224
    :goto_1e
    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v0, v2, :cond_33

    move v2, v1

    .line 226
    :goto_23
    iget v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    if-ge v2, v3, :cond_30

    .line 228
    iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v3, v3, v0

    aput v1, v3, v2

    .line 226
    add-int/lit8 v2, v2, 0x1

    goto :goto_23

    .line 224
    :cond_30
    add-int/lit8 v0, v0, 0x1

    goto :goto_1e

    .line 231
    :cond_33
    :goto_33
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v1, v0, :cond_47

    .line 233
    and-int/lit8 v0, v1, 0x1f

    .line 234
    iget-object v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v2, v2, v1

    ushr-int/lit8 v3, v1, 0x5

    const/4 v4, 0x1

    shl-int v0, v4, v0

    aput v0, v2, v3

    .line 231
    add-int/lit8 v1, v1, 0x1

    goto :goto_33

    .line 236
    :cond_47
    return-void
.end method

.method private assignZeroMatrix(II)V
    .registers 7

    .prologue
    const/4 v1, 0x0

    .line 200
    iput p1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    .line 201
    iput p2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    .line 202
    add-int/lit8 v0, p2, 0x1f

    ushr-int/lit8 v0, v0, 0x5

    iput v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    .line 203
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    filled-new-array {v0, v2}, [I

    move-result-object v0

    sget-object v2, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    invoke-static {v2, v0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [[I

    iput-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    move v0, v1

    .line 204
    :goto_1e
    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v0, v2, :cond_33

    move v2, v1

    .line 206
    :goto_23
    iget v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    if-ge v2, v3, :cond_30

    .line 208
    iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v3, v3, v0

    aput v1, v3, v2

    .line 206
    add-int/lit8 v2, v2, 0x1

    goto :goto_23

    .line 204
    :cond_30
    add-int/lit8 v0, v0, 0x1

    goto :goto_1e

    .line 211
    :cond_33
    return-void
.end method

.method public static createRandomRegularMatrixAndItsInverse(ILjava/security/SecureRandom;)[Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;
    .registers 16

    .prologue
    .line 346
    const/4 v0, 0x2

    new-array v4, v0, [Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    .line 353
    add-int/lit8 v0, p0, 0x1f

    shr-int/lit8 v5, v0, 0x5

    .line 354
    new-instance v3, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    const/16 v0, 0x4c

    invoke-direct {v3, p0, v0, p1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;-><init>(ICLjava/security/SecureRandom;)V

    .line 355
    new-instance v6, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    const/16 v0, 0x55

    invoke-direct {v6, p0, v0, p1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;-><init>(ICLjava/security/SecureRandom;)V

    .line 356
    invoke-virtual {v3, v6}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->rightMultiply(Lorg/spongycastle/pqc/math/linearalgebra/Matrix;)Lorg/spongycastle/pqc/math/linearalgebra/Matrix;

    move-result-object v0

    check-cast v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    .line 357
    new-instance v7, Lorg/spongycastle/pqc/math/linearalgebra/Permutation;

    invoke-direct {v7, p0, p1}, Lorg/spongycastle/pqc/math/linearalgebra/Permutation;-><init>(ILjava/security/SecureRandom;)V

    .line 358
    invoke-virtual {v7}, Lorg/spongycastle/pqc/math/linearalgebra/Permutation;->getVector()[I

    move-result-object v8

    .line 360
    filled-new-array {p0, v5}, [I

    move-result-object v1

    sget-object v2, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    invoke-static {v2, v1}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, [[I

    .line 361
    const/4 v2, 0x0

    :goto_31
    if-ge v2, p0, :cond_43

    .line 363
    iget-object v9, v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget v10, v8, v2

    aget-object v9, v9, v10

    const/4 v10, 0x0

    aget-object v11, v1, v2

    const/4 v12, 0x0

    invoke-static {v9, v10, v11, v12, v5}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 361
    add-int/lit8 v2, v2, 0x1

    goto :goto_31

    .line 366
    :cond_43
    const/4 v0, 0x0

    new-instance v2, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    invoke-direct {v2, p0, v1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;-><init>(I[[I)V

    aput-object v2, v4, v0

    .line 373
    new-instance v8, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    const/16 v0, 0x49

    invoke-direct {v8, p0, v0}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;-><init>(IC)V

    .line 374
    const/4 v0, 0x0

    :goto_53
    if-ge v0, p0, :cond_86

    .line 376
    and-int/lit8 v1, v0, 0x1f

    .line 377
    ushr-int/lit8 v9, v0, 0x5

    .line 378
    const/4 v2, 0x1

    shl-int v10, v2, v1

    .line 379
    add-int/lit8 v1, v0, 0x1

    move v2, v1

    :goto_5f
    if-ge v2, p0, :cond_83

    .line 381
    iget-object v1, v3, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v1, v1, v2

    aget v1, v1, v9

    and-int/2addr v1, v10

    .line 382
    if-eqz v1, :cond_7f

    .line 384
    const/4 v1, 0x0

    :goto_6b
    if-gt v1, v9, :cond_7f

    .line 386
    iget-object v11, v8, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v11, v11, v2

    aget v12, v11, v1

    iget-object v13, v8, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v13, v13, v0

    aget v13, v13, v1

    xor-int/2addr v12, v13

    aput v12, v11, v1

    .line 384
    add-int/lit8 v1, v1, 0x1

    goto :goto_6b

    .line 379
    :cond_7f
    add-int/lit8 v1, v2, 0x1

    move v2, v1

    goto :goto_5f

    .line 374
    :cond_83
    add-int/lit8 v0, v0, 0x1

    goto :goto_53

    .line 392
    :cond_86
    new-instance v9, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    const/16 v0, 0x49

    invoke-direct {v9, p0, v0}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;-><init>(IC)V

    .line 393
    add-int/lit8 v0, p0, -0x1

    :goto_8f
    if-ltz v0, :cond_c2

    .line 395
    and-int/lit8 v1, v0, 0x1f

    .line 396
    ushr-int/lit8 v2, v0, 0x5

    .line 397
    const/4 v3, 0x1

    shl-int v10, v3, v1

    .line 398
    add-int/lit8 v1, v0, -0x1

    move v3, v1

    :goto_9b
    if-ltz v3, :cond_bf

    .line 400
    iget-object v1, v6, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v1, v1, v3

    aget v1, v1, v2

    and-int/2addr v1, v10

    .line 401
    if-eqz v1, :cond_bb

    move v1, v2

    .line 403
    :goto_a7
    if-ge v1, v5, :cond_bb

    .line 405
    iget-object v11, v9, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v11, v11, v3

    aget v12, v11, v1

    iget-object v13, v9, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v13, v13, v0

    aget v13, v13, v1

    xor-int/2addr v12, v13

    aput v12, v11, v1

    .line 403
    add-int/lit8 v1, v1, 0x1

    goto :goto_a7

    .line 398
    :cond_bb
    add-int/lit8 v1, v3, -0x1

    move v3, v1

    goto :goto_9b

    .line 393
    :cond_bf
    add-int/lit8 v0, v0, -0x1

    goto :goto_8f

    .line 412
    :cond_c2
    const/4 v1, 0x1

    invoke-virtual {v8, v7}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->rightMultiply(Lorg/spongycastle/pqc/math/linearalgebra/Permutation;)Lorg/spongycastle/pqc/math/linearalgebra/Matrix;

    move-result-object v0

    invoke-virtual {v9, v0}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->rightMultiply(Lorg/spongycastle/pqc/math/linearalgebra/Matrix;)Lorg/spongycastle/pqc/math/linearalgebra/Matrix;

    move-result-object v0

    check-cast v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    aput-object v0, v4, v1

    .line 414
    return-object v4
.end method

.method private static swapRows([[III)V
    .registers 5

    .prologue
    .line 1303
    aget-object v0, p0, p1

    .line 1304
    aget-object v1, p0, p2

    aput-object v1, p0, p1

    .line 1305
    aput-object v0, p0, p2

    .line 1306
    return-void
.end method


# virtual methods
.method public computeInverse()Lorg/spongycastle/pqc/math/linearalgebra/Matrix;
    .registers 11

    .prologue
    const/4 v6, 0x1

    const/4 v3, 0x0

    .line 732
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    if-eq v0, v1, :cond_10

    .line 734
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "Matrix is not invertible."

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

    throw v0

    .line 738
    :cond_10
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    filled-new-array {v0, v1}, [I

    move-result-object v0

    sget-object v1, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    invoke-static {v1, v0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [[I

    .line 739
    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

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

    :goto_24
    if-ltz v1, :cond_33

    .line 741
    iget-object v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v2, v2, v1

    invoke-static {v2}, Lorg/spongycastle/pqc/math/linearalgebra/IntUtils;->clone([I)[I

    move-result-object v2

    aput-object v2, v0, v1

    .line 739
    add-int/lit8 v1, v1, -0x1

    goto :goto_24

    .line 745
    :cond_33
    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    filled-new-array {v1, v2}, [I

    move-result-object v1

    sget-object v2, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    invoke-static {v2, v1}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, [[I

    .line 746
    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

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

    :goto_47
    if-ltz v2, :cond_56

    .line 748
    shr-int/lit8 v4, v2, 0x5

    .line 749
    and-int/lit8 v5, v2, 0x1f

    .line 750
    aget-object v7, v1, v2

    shl-int v5, v6, v5

    aput v5, v7, v4

    .line 746
    add-int/lit8 v2, v2, -0x1

    goto :goto_47

    :cond_56
    move v2, v3

    .line 755
    :goto_57
    iget v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v2, v4, :cond_af

    .line 758
    shr-int/lit8 v7, v2, 0x5

    .line 759
    and-int/lit8 v4, v2, 0x1f

    shl-int v8, v6, v4

    .line 761
    aget-object v4, v0, v2

    aget v4, v4, v7

    and-int/2addr v4, v8

    if-nez v4, :cond_8c

    .line 765
    add-int/lit8 v4, v2, 0x1

    move v5, v3

    :goto_6b
    iget v9, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v4, v9, :cond_82

    .line 767
    aget-object v9, v0, v4

    aget v9, v9, v7

    and-int/2addr v9, v8

    if-eqz v9, :cond_7f

    .line 771
    invoke-static {v0, v2, v4}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->swapRows([[III)V

    .line 772
    invoke-static {v1, v2, v4}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->swapRows([[III)V

    .line 774
    iget v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    move v5, v6

    .line 765
    :cond_7f
    add-int/lit8 v4, v4, 0x1

    goto :goto_6b

    .line 779
    :cond_82
    if-nez v5, :cond_8c

    .line 782
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "Matrix is not invertible."

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

    throw v0

    .line 787
    :cond_8c
    iget v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

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

    :goto_90
    if-ltz v4, :cond_ac

    .line 789
    if-eq v4, v2, :cond_a9

    aget-object v5, v0, v4

    aget v5, v5, v7

    and-int/2addr v5, v8

    if-eqz v5, :cond_a9

    .line 791
    aget-object v5, v0, v2

    aget-object v9, v0, v4

    invoke-static {v5, v9, v7}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->addToRow([I[II)V

    .line 792
    aget-object v5, v1, v2

    aget-object v9, v1, v4

    invoke-static {v5, v9, v3}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->addToRow([I[II)V

    .line 787
    :cond_a9
    add-int/lit8 v4, v4, -0x1

    goto :goto_90

    .line 755
    :cond_ac
    add-int/lit8 v2, v2, 0x1

    goto :goto_57

    .line 797
    :cond_af
    new-instance v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    invoke-direct {v0, v2, v1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;-><init>(I[[I)V

    return-object v0
.end method

.method public computeTranspose()Lorg/spongycastle/pqc/math/linearalgebra/Matrix;
    .registers 10

    .prologue
    const/4 v8, 0x1

    const/4 v2, 0x0

    .line 704
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    add-int/lit8 v1, v1, 0x1f

    ushr-int/lit8 v1, v1, 0x5

    filled-new-array {v0, v1}, [I

    move-result-object v0

    sget-object v1, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    invoke-static {v1, v0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [[I

    move v1, v2

    .line 705
    :goto_17
    iget v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v1, v3, :cond_42

    move v3, v2

    .line 707
    :goto_1c
    iget v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    if-ge v3, v4, :cond_3f

    .line 709
    ushr-int/lit8 v4, v3, 0x5

    .line 710
    and-int/lit8 v5, v3, 0x1f

    .line 711
    iget-object v6, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v6, v6, v1

    aget v4, v6, v4

    ushr-int/2addr v4, v5

    and-int/lit8 v4, v4, 0x1

    .line 712
    ushr-int/lit8 v5, v1, 0x5

    .line 713
    and-int/lit8 v6, v1, 0x1f

    .line 714
    if-ne v4, v8, :cond_3c

    .line 716
    aget-object v4, v0, v3

    aget v7, v4, v5

    shl-int v6, v8, v6

    or-int/2addr v6, v7

    aput v6, v4, v5

    .line 707
    :cond_3c
    add-int/lit8 v3, v3, 0x1

    goto :goto_1c

    .line 705
    :cond_3f
    add-int/lit8 v1, v1, 0x1

    goto :goto_17

    .line 721
    :cond_42
    new-instance v1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    invoke-direct {v1, v2, v0}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;-><init>(I[[I)V

    return-object v1
.end method

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

    .prologue
    const/4 v1, 0x0

    .line 1201
    instance-of v0, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    if-nez v0, :cond_6

    .line 1222
    :cond_5
    :goto_5
    return v1

    .line 1205
    :cond_6
    check-cast p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    .line 1207
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    iget v2, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ne v0, v2, :cond_5

    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    iget v2, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    if-ne v0, v2, :cond_5

    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    iget v2, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    if-ne v0, v2, :cond_5

    move v0, v1

    .line 1214
    :goto_1b
    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v0, v2, :cond_30

    .line 1216
    iget-object v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v2, v2, v0

    iget-object v3, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v3, v3, v0

    invoke-static {v2, v3}, Lorg/spongycastle/pqc/math/linearalgebra/IntUtils;->equals([I[I)Z

    move-result v2

    if-eqz v2, :cond_5

    .line 1214
    add-int/lit8 v0, v0, 0x1

    goto :goto_1b

    .line 1222
    :cond_30
    const/4 v1, 0x1

    goto :goto_5
.end method

.method public extendLeftCompactForm()Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;
    .registers 10

    .prologue
    const/4 v8, 0x0

    .line 582
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    add-int/2addr v0, v1

    .line 583
    new-instance v2, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    invoke-direct {v2, v1, v0}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;-><init>(II)V

    .line 585
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

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

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    add-int/2addr v1, v0

    .line 586
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

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

    :goto_18
    if-ltz v0, :cond_3b

    .line 589
    iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v3, v3, v0

    iget-object v4, v2, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v4, v4, v0

    iget v5, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    invoke-static {v3, v8, v4, v8, v5}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 591
    iget-object v3, v2, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v3, v3, v0

    shr-int/lit8 v4, v1, 0x5

    aget v5, v3, v4

    const/4 v6, 0x1

    and-int/lit8 v7, v1, 0x1f

    shl-int/2addr v6, v7

    or-int/2addr v5, v6

    aput v5, v3, v4

    .line 586
    add-int/lit8 v0, v0, -0x1

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

    goto :goto_18

    .line 594
    :cond_3b
    return-object v2
.end method

.method public extendRightCompactForm()Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;
    .registers 13

    .prologue
    const/4 v1, 0x0

    .line 654
    new-instance v6, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    iget v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    add-int/2addr v2, v3

    invoke-direct {v6, v0, v2}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;-><init>(II)V

    .line 656
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    shr-int/lit8 v3, v0, 0x5

    .line 657
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    and-int/lit8 v7, v0, 0x1f

    .line 659
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

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

    move v5, v0

    :goto_1a
    if-ltz v5, :cond_91

    .line 662
    iget-object v0, v6, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v0, v0, v5

    shr-int/lit8 v2, v5, 0x5

    aget v4, v0, v2

    const/4 v8, 0x1

    and-int/lit8 v9, v5, 0x1f

    shl-int/2addr v8, v9

    or-int/2addr v4, v8

    aput v4, v0, v2

    .line 667
    if-eqz v7, :cond_83

    move v0, v1

    move v2, v3

    .line 671
    :goto_2f
    iget v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

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

    if-ge v0, v4, :cond_58

    .line 674
    iget-object v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v4, v4, v5

    aget v8, v4, v0

    .line 676
    iget-object v4, v6, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v9, v4, v5

    add-int/lit8 v4, v2, 0x1

    aget v10, v9, v2

    shl-int v11, v8, v7

    or-int/2addr v10, v11

    aput v10, v9, v2

    .line 677
    iget-object v2, v6, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v2, v2, v5

    aget v9, v2, v4

    rsub-int/lit8 v10, v7, 0x20

    ushr-int/2addr v8, v10

    or-int/2addr v8, v9

    aput v8, v2, v4

    .line 671
    add-int/lit8 v0, v0, 0x1

    move v2, v4

    goto :goto_2f

    .line 680
    :cond_58
    iget-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v0, v0, v5

    iget v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

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

    aget v0, v0, v4

    .line 681
    iget-object v4, v6, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v4, v4, v5

    add-int/lit8 v8, v2, 0x1

    aget v9, v4, v2

    shl-int v10, v0, v7

    or-int/2addr v9, v10

    aput v9, v4, v2

    .line 682
    iget v2, v6, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    if-ge v8, v2, :cond_7f

    .line 684
    iget-object v2, v6, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v2, v2, v5

    aget v4, v2, v8

    rsub-int/lit8 v9, v7, 0x20

    ushr-int/2addr v0, v9

    or-int/2addr v0, v4

    aput v0, v2, v8

    .line 659
    :cond_7f
    :goto_7f
    add-int/lit8 v0, v5, -0x1

    move v5, v0

    goto :goto_1a

    .line 690
    :cond_83
    iget-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v0, v0, v5

    iget-object v2, v6, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v2, v2, v5

    iget v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

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

    goto :goto_7f

    .line 694
    :cond_91
    return-object v6
.end method

.method public getEncoded()[B
    .registers 10

    .prologue
    const/4 v1, 0x0

    .line 451
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    add-int/lit8 v0, v0, 0x7

    ushr-int/lit8 v0, v0, 0x3

    .line 452
    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    mul-int/2addr v0, v2

    .line 453
    add-int/lit8 v0, v0, 0x8

    .line 454
    new-array v5, v0, [B

    .line 456
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    invoke-static {v0, v5, v1}, Lorg/spongycastle/pqc/math/linearalgebra/LittleEndianConversions;->I2OSP(I[BI)V

    .line 457
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    const/4 v2, 0x4

    invoke-static {v0, v5, v2}, Lorg/spongycastle/pqc/math/linearalgebra/LittleEndianConversions;->I2OSP(I[BI)V

    .line 460
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    ushr-int/lit8 v6, v0, 0x5

    .line 462
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    and-int/lit8 v7, v0, 0x1f

    .line 464
    const/16 v0, 0x8

    move v2, v0

    move v0, v1

    .line 465
    :goto_25
    iget v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v0, v3, :cond_51

    move v3, v1

    .line 467
    :goto_2a
    if-ge v3, v6, :cond_3a

    .line 469
    iget-object v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v4, v4, v0

    aget v4, v4, v3

    invoke-static {v4, v5, v2}, Lorg/spongycastle/pqc/math/linearalgebra/LittleEndianConversions;->I2OSP(I[BI)V

    .line 467
    add-int/lit8 v3, v3, 0x1

    add-int/lit8 v2, v2, 0x4

    goto :goto_2a

    :cond_3a
    move v3, v1

    .line 471
    :goto_3b
    if-ge v3, v7, :cond_4e

    .line 473
    add-int/lit8 v4, v2, 0x1

    iget-object v8, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v8, v8, v0

    aget v8, v8, v6

    ushr-int/2addr v8, v3

    int-to-byte v8, v8

    aput-byte v8, v5, v2

    .line 471
    add-int/lit8 v2, v3, 0x8

    move v3, v2

    move v2, v4

    goto :goto_3b

    .line 465
    :cond_4e
    add-int/lit8 v0, v0, 0x1

    goto :goto_25

    .line 477
    :cond_51
    return-object v5
.end method

.method public getHammingWeight()D
    .registers 16

    .prologue
    .line 488
    const-wide/16 v4, 0x0

    .line 489
    const-wide/16 v2, 0x0

    .line 490
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    and-int/lit8 v10, v0, 0x1f

    .line 492
    if-nez v10, :cond_2f

    .line 494
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    .line 501
    :goto_c
    const/4 v1, 0x0

    :goto_d
    iget v6, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v1, v6, :cond_5b

    .line 504
    const/4 v6, 0x0

    move v14, v6

    move-wide v6, v4

    move-wide v4, v2

    move v3, v14

    :goto_16
    if-ge v3, v0, :cond_38

    .line 506
    iget-object v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v2, v2, v1

    aget v8, v2, v3

    .line 507
    const/4 v2, 0x0

    :goto_1f
    const/16 v9, 0x20

    if-ge v2, v9, :cond_34

    .line 509
    ushr-int v9, v8, v2

    and-int/lit8 v9, v9, 0x1

    .line 510
    int-to-double v12, v9

    add-double/2addr v6, v12

    .line 511
    const-wide/high16 v12, 0x3ff0000000000000L    # 1.0

    add-double/2addr v4, v12

    .line 507
    add-int/lit8 v2, v2, 0x1

    goto :goto_1f

    .line 498
    :cond_2f
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

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

    goto :goto_c

    .line 504
    :cond_34
    add-int/lit8 v2, v3, 0x1

    move v3, v2

    goto :goto_16

    .line 514
    :cond_38
    iget-object v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v2, v2, v1

    iget v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

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

    aget v11, v2, v3

    .line 515
    const/4 v2, 0x0

    move v14, v2

    move-wide v2, v4

    move-wide v4, v6

    move v6, v14

    :goto_47
    if-ge v6, v10, :cond_58

    .line 517
    ushr-int v7, v11, v6

    and-int/lit8 v7, v7, 0x1

    .line 518
    int-to-double v8, v7

    add-double/2addr v8, v4

    .line 519
    const-wide/high16 v4, 0x3ff0000000000000L    # 1.0

    add-double/2addr v4, v2

    .line 515
    add-int/lit8 v2, v6, 0x1

    move v6, v2

    move-wide v2, v4

    move-wide v4, v8

    goto :goto_47

    .line 501
    :cond_58
    add-int/lit8 v1, v1, 0x1

    goto :goto_d

    .line 523
    :cond_5b
    div-double v0, v4, v2

    return-wide v0
.end method

.method public getIntArray()[[I
    .registers 2

    .prologue
    .line 422
    iget-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    return-object v0
.end method

.method public getLeftSubMatrix()Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;
    .registers 9

    .prologue
    const/4 v7, 0x0

    .line 554
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-gt v0, v1, :cond_f

    .line 556
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "empty submatrix"

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

    throw v0

    .line 558
    :cond_f
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    add-int/lit8 v0, v0, 0x1f

    shr-int/lit8 v3, v0, 0x5

    .line 559
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    filled-new-array {v0, v3}, [I

    move-result-object v0

    sget-object v1, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;

    invoke-static {v1, v0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, [[I

    .line 560
    const/4 v1, 0x1

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    and-int/lit8 v2, v2, 0x1f

    shl-int/2addr v1, v2

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

    .line 561
    if-nez v1, :cond_2e

    .line 563
    const/4 v1, -0x1

    .line 565
    :cond_2e
    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

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

    :goto_32
    if-ltz v2, :cond_49

    .line 567
    iget-object v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v4, v4, v2

    aget-object v5, v0, v2

    invoke-static {v4, v7, v5, v7, v3}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V

    .line 568
    aget-object v4, v0, v2

    add-int/lit8 v5, v3, -0x1

    aget v6, v4, v5

    and-int/2addr v6, v1

    aput v6, v4, v5

    .line 565
    add-int/lit8 v2, v2, -0x1

    goto :goto_32

    .line 570
    :cond_49
    new-instance v1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    invoke-direct {v1, v2, v0}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;-><init>(I[[I)V

    return-object v1
.end method

.method public getLength()I
    .registers 2

    .prologue
    .line 430
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    return v0
.end method

.method public getRightSubMatrix()Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;
    .registers 12

    .prologue
    const/4 v1, 0x0

    .line 605
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-gt v0, v2, :cond_f

    .line 607
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "empty submatrix"

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

    throw v0

    .line 610
    :cond_f
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    shr-int/lit8 v3, v0, 0x5

    .line 611
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    and-int/lit8 v6, v0, 0x1f

    .line 613
    new-instance v7, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    iget v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    sub-int/2addr v2, v4

    invoke-direct {v7, v0, v2}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;-><init>(II)V

    .line 615
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

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

    move v5, v0

    :goto_28
    if-ltz v5, :cond_90

    .line 618
    if-eqz v6, :cond_82

    move v0, v1

    move v2, v3

    .line 622
    :goto_2e
    iget v4, v7, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

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

    if-ge v0, v4, :cond_51

    .line 625
    iget-object v4, v7, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v8, v4, v5

    iget-object v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v9, v4, v5

    add-int/lit8 v4, v2, 0x1

    aget v2, v9, v2

    ushr-int/2addr v2, v6

    iget-object v9, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v9, v9, v5

    aget v9, v9, v4

    rsub-int/lit8 v10, v6, 0x20

    shl-int/2addr v9, v10

    or-int/2addr v2, v9

    aput v2, v8, v0

    .line 622
    add-int/lit8 v0, v0, 0x1

    move v2, v4

    goto :goto_2e

    .line 629
    :cond_51
    iget-object v0, v7, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v0, v0, v5

    iget v4, v7, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

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

    iget-object v8, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v8, v8, v5

    add-int/lit8 v9, v2, 0x1

    aget v2, v8, v2

    ushr-int/2addr v2, v6

    aput v2, v0, v4

    .line 630
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    if-ge v9, v0, :cond_7e

    .line 632
    iget-object v0, v7, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v0, v0, v5

    iget v2, v7, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

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

    aget v4, v0, v2

    iget-object v8, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v8, v8, v5

    aget v8, v8, v9

    rsub-int/lit8 v9, v6, 0x20

    shl-int/2addr v8, v9

    or-int/2addr v4, v8

    aput v4, v0, v2

    .line 615
    :cond_7e
    :goto_7e
    add-int/lit8 v0, v5, -0x1

    move v5, v0

    goto :goto_28

    .line 638
    :cond_82
    iget-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v0, v0, v5

    iget-object v2, v7, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v2, v2, v5

    iget v4, v7, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

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

    goto :goto_7e

    .line 642
    :cond_90
    return-object v7
.end method

.method public getRow(I)[I
    .registers 3

    .prologue
    .line 441
    iget-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v0, v0, p1

    return-object v0
.end method

.method public hashCode()I
    .registers 4

    .prologue
    .line 1230
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    mul-int/lit8 v0, v0, 0x1f

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    add-int/2addr v0, v1

    mul-int/lit8 v0, v0, 0x1f

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    add-int/2addr v1, v0

    .line 1231
    const/4 v0, 0x0

    :goto_d
    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v0, v2, :cond_1f

    .line 1233
    mul-int/lit8 v1, v1, 0x1f

    iget-object v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v2, v2, v0

    invoke-virtual {v2}, Ljava/lang/Object;->hashCode()I

    move-result v2

    add-int/2addr v1, v2

    .line 1231
    add-int/lit8 v0, v0, 0x1

    goto :goto_d

    .line 1235
    :cond_1f
    return v1
.end method

.method public isZero()Z
    .registers 5

    .prologue
    const/4 v1, 0x0

    .line 533
    move v0, v1

    :goto_2
    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v0, v2, :cond_1a

    move v2, v1

    .line 535
    :goto_7
    iget v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    if-ge v2, v3, :cond_17

    .line 537
    iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v3, v3, v0

    aget v3, v3, v2

    if-eqz v3, :cond_14

    .line 543
    :goto_13
    return v1

    .line 535
    :cond_14
    add-int/lit8 v2, v2, 0x1

    goto :goto_7

    .line 533
    :cond_17
    add-int/lit8 v0, v0, 0x1

    goto :goto_2

    .line 543
    :cond_1a
    const/4 v1, 0x1

    goto :goto_13
.end method

.method public leftMultiply(Lorg/spongycastle/pqc/math/linearalgebra/Permutation;)Lorg/spongycastle/pqc/math/linearalgebra/Matrix;
    .registers 7

    .prologue
    .line 809
    invoke-virtual {p1}, Lorg/spongycastle/pqc/math/linearalgebra/Permutation;->getVector()[I

    move-result-object v1

    .line 810
    array-length v0, v1

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-eq v0, v2, :cond_11

    .line 812
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "length mismatch"

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

    throw v0

    .line 815
    :cond_11
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    new-array v2, v0, [[I

    .line 817
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

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

    :goto_19
    if-ltz v0, :cond_2a

    .line 819
    iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget v4, v1, v0

    aget-object v3, v3, v4

    invoke-static {v3}, Lorg/spongycastle/pqc/math/linearalgebra/IntUtils;->clone([I)[I

    move-result-object v3

    aput-object v3, v2, v0

    .line 817
    add-int/lit8 v0, v0, -0x1

    goto :goto_19

    .line 822
    :cond_2a
    new-instance v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    invoke-direct {v0, v1, v2}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;-><init>(I[[I)V

    return-object v0
.end method

.method public leftMultiply(Lorg/spongycastle/pqc/math/linearalgebra/Vector;)Lorg/spongycastle/pqc/math/linearalgebra/Vector;
    .registers 14

    .prologue
    const/4 v1, 0x1

    const/4 v4, 0x0

    .line 834
    instance-of v0, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;

    if-nez v0, :cond_e

    .line 836
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "vector is not defined over GF(2)"

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

    throw v0

    .line 839
    :cond_e
    iget v0, p1, Lorg/spongycastle/pqc/math/linearalgebra/Vector;->length:I

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-eq v0, v2, :cond_1c

    .line 841
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "length mismatch"

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

    throw v0

    .line 844
    :cond_1c
    check-cast p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;

    invoke-virtual {p1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->getVecArray()[I

    move-result-object v6

    .line 845
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    new-array v7, v0, [I

    .line 847
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    shr-int/lit8 v8, v0, 0x5

    .line 848
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    and-int/lit8 v0, v0, 0x1f

    shl-int v9, v1, v0

    move v5, v4

    move v0, v4

    .line 852
    :goto_32
    if-ge v5, v8, :cond_59

    move v2, v0

    move v0, v1

    .line 857
    :cond_36
    aget v3, v6, v5

    and-int/2addr v3, v0

    .line 858
    if-eqz v3, :cond_4e

    move v3, v4

    .line 860
    :goto_3c
    iget v10, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    if-ge v3, v10, :cond_4e

    .line 862
    aget v10, v7, v3

    iget-object v11, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v11, v11, v2

    aget v11, v11, v3

    xor-int/2addr v10, v11

    aput v10, v7, v3

    .line 860
    add-int/lit8 v3, v3, 0x1

    goto :goto_3c

    .line 865
    :cond_4e
    add-int/lit8 v2, v2, 0x1

    .line 866
    shl-int/lit8 v0, v0, 0x1

    .line 868
    if-nez v0, :cond_36

    .line 852
    add-int/lit8 v0, v5, 0x1

    move v5, v0

    move v0, v2

    goto :goto_32

    :cond_59
    move v2, v0

    .line 873
    :goto_5a
    if-eq v1, v9, :cond_7a

    .line 875
    aget v0, v6, v8

    and-int/2addr v0, v1

    .line 876
    if-eqz v0, :cond_74

    move v0, v4

    .line 878
    :goto_62
    iget v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    if-ge v0, v3, :cond_74

    .line 880
    aget v3, v7, v0

    iget-object v5, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v5, v5, v2

    aget v5, v5, v0

    xor-int/2addr v3, v5

    aput v3, v7, v0

    .line 878
    add-int/lit8 v0, v0, 0x1

    goto :goto_62

    .line 883
    :cond_74
    add-int/lit8 v0, v2, 0x1

    .line 884
    shl-int/lit8 v1, v1, 0x1

    move v2, v0

    .line 885
    goto :goto_5a

    .line 887
    :cond_7a
    new-instance v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    invoke-direct {v0, v7, v1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;-><init>([II)V

    return-object v0
.end method

.method public leftMultiplyLeftCompactForm(Lorg/spongycastle/pqc/math/linearalgebra/Vector;)Lorg/spongycastle/pqc/math/linearalgebra/Vector;
    .registers 13

    .prologue
    const/4 v4, 0x0

    const/4 v1, 0x1

    .line 900
    instance-of v0, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;

    if-nez v0, :cond_e

    .line 902
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "vector is not defined over GF(2)"

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

    throw v0

    .line 905
    :cond_e
    iget v0, p1, Lorg/spongycastle/pqc/math/linearalgebra/Vector;->length:I

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-eq v0, v2, :cond_1c

    .line 907
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "length mismatch"

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

    throw v0

    .line 910
    :cond_1c
    check-cast p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;

    invoke-virtual {p1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->getVecArray()[I

    move-result-object v6

    .line 911
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    add-int/2addr v0, v2

    add-int/lit8 v0, v0, 0x1f

    ushr-int/lit8 v0, v0, 0x5

    new-array v7, v0, [I

    .line 914
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    ushr-int/lit8 v8, v0, 0x5

    move v5, v4

    move v0, v4

    .line 916
    :goto_33
    if-ge v5, v8, :cond_6b

    move v2, v0

    move v0, v1

    .line 921
    :cond_37
    aget v3, v6, v5

    and-int/2addr v3, v0

    .line 922
    if-eqz v3, :cond_60

    move v3, v4

    .line 925
    :goto_3d
    iget v9, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    if-ge v3, v9, :cond_4f

    .line 927
    aget v9, v7, v3

    iget-object v10, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v10, v10, v2

    aget v10, v10, v3

    xor-int/2addr v9, v10

    aput v9, v7, v3

    .line 925
    add-int/lit8 v3, v3, 0x1

    goto :goto_3d

    .line 930
    :cond_4f
    iget v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    add-int/2addr v3, v2

    ushr-int/lit8 v3, v3, 0x5

    .line 931
    iget v9, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    add-int/2addr v9, v2

    and-int/lit8 v9, v9, 0x1f

    .line 932
    aget v10, v7, v3

    shl-int v9, v1, v9

    or-int/2addr v9, v10

    aput v9, v7, v3

    .line 934
    :cond_60
    add-int/lit8 v2, v2, 0x1

    .line 935
    shl-int/lit8 v0, v0, 0x1

    .line 937
    if-nez v0, :cond_37

    .line 916
    add-int/lit8 v0, v5, 0x1

    move v5, v0

    move v0, v2

    goto :goto_33

    .line 941
    :cond_6b
    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    and-int/lit8 v2, v2, 0x1f

    shl-int v5, v1, v2

    move v2, v1

    move v3, v0

    .line 943
    :goto_73
    if-eq v2, v5, :cond_a4

    .line 945
    aget v0, v6, v8

    and-int/2addr v0, v2

    .line 946
    if-eqz v0, :cond_9e

    move v0, v4

    .line 949
    :goto_7b
    iget v9, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    if-ge v0, v9, :cond_8d

    .line 951
    aget v9, v7, v0

    iget-object v10, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v10, v10, v3

    aget v10, v10, v0

    xor-int/2addr v9, v10

    aput v9, v7, v0

    .line 949
    add-int/lit8 v0, v0, 0x1

    goto :goto_7b

    .line 954
    :cond_8d
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    add-int/2addr v0, v3

    ushr-int/lit8 v0, v0, 0x5

    .line 955
    iget v9, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    add-int/2addr v9, v3

    and-int/lit8 v9, v9, 0x1f

    .line 956
    aget v10, v7, v0

    shl-int v9, v1, v9

    or-int/2addr v9, v10

    aput v9, v7, v0

    .line 958
    :cond_9e
    add-int/lit8 v3, v3, 0x1

    .line 959
    shl-int/lit8 v0, v2, 0x1

    move v2, v0

    .line 960
    goto :goto_73

    .line 962
    :cond_a4
    new-instance v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    add-int/2addr v1, v2

    invoke-direct {v0, v7, v1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;-><init>([II)V

    return-object v0
.end method

.method public rightMultiply(Lorg/spongycastle/pqc/math/linearalgebra/Matrix;)Lorg/spongycastle/pqc/math/linearalgebra/Matrix;
    .registers 15

    .prologue
    .line 973
    instance-of v0, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    if-nez v0, :cond_c

    .line 975
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "matrix is not defined over GF(2)"

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

    throw v0

    .line 978
    :cond_c
    iget v0, p1, Lorg/spongycastle/pqc/math/linearalgebra/Matrix;->numRows:I

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    if-eq v0, v1, :cond_1a

    .line 980
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "length mismatch"

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

    throw v0

    :cond_1a
    move-object v0, p1

    .line 983
    check-cast v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    .line 984
    new-instance v7, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    iget v2, p1, Lorg/spongycastle/pqc/math/linearalgebra/Matrix;->numColumns:I

    invoke-direct {v7, v1, v2}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;-><init>(II)V

    .line 987
    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    and-int/lit8 v8, v1, 0x1f

    .line 988
    if-nez v8, :cond_61

    .line 990
    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    .line 996
    :goto_2e
    const/4 v2, 0x0

    :goto_2f
    iget v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v2, v3, :cond_a5

    .line 998
    const/4 v4, 0x0

    .line 999
    const/4 v3, 0x0

    move v6, v3

    :goto_36
    if-ge v6, v1, :cond_71

    .line 1001
    iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v3, v3, v2

    aget v9, v3, v6

    .line 1002
    const/4 v3, 0x0

    move v5, v4

    move v4, v3

    :goto_41
    const/16 v3, 0x20

    if-ge v4, v3, :cond_6c

    .line 1004
    const/4 v3, 0x1

    shl-int/2addr v3, v4

    and-int/2addr v3, v9

    .line 1005
    if-eqz v3, :cond_66

    .line 1007
    const/4 v3, 0x0

    :goto_4b
    iget v10, v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    if-ge v3, v10, :cond_66

    .line 1009
    iget-object v10, v7, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v10, v10, v2

    aget v11, v10, v3

    iget-object v12, v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v12, v12, v5

    aget v12, v12, v3

    xor-int/2addr v11, v12

    aput v11, v10, v3

    .line 1007
    add-int/lit8 v3, v3, 0x1

    goto :goto_4b

    .line 994
    :cond_61
    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

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

    goto :goto_2e

    .line 1012
    :cond_66
    add-int/lit8 v5, v5, 0x1

    .line 1002
    add-int/lit8 v3, v4, 0x1

    move v4, v3

    goto :goto_41

    .line 999
    :cond_6c
    add-int/lit8 v3, v6, 0x1

    move v6, v3

    move v4, v5

    goto :goto_36

    .line 1015
    :cond_71
    iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v3, v3, v2

    iget v5, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

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

    aget v6, v3, v5

    .line 1016
    const/4 v3, 0x0

    move v5, v4

    move v4, v3

    :goto_7e
    if-ge v4, v8, :cond_a2

    .line 1018
    const/4 v3, 0x1

    shl-int/2addr v3, v4

    and-int/2addr v3, v6

    .line 1019
    if-eqz v3, :cond_9c

    .line 1021
    const/4 v3, 0x0

    :goto_86
    iget v9, v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    if-ge v3, v9, :cond_9c

    .line 1023
    iget-object v9, v7, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v9, v9, v2

    aget v10, v9, v3

    iget-object v11, v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v11, v11, v5

    aget v11, v11, v3

    xor-int/2addr v10, v11

    aput v10, v9, v3

    .line 1021
    add-int/lit8 v3, v3, 0x1

    goto :goto_86

    .line 1026
    :cond_9c
    add-int/lit8 v5, v5, 0x1

    .line 1016
    add-int/lit8 v3, v4, 0x1

    move v4, v3

    goto :goto_7e

    .line 996
    :cond_a2
    add-int/lit8 v2, v2, 0x1

    goto :goto_2f

    .line 1031
    :cond_a5
    return-object v7
.end method

.method public rightMultiply(Lorg/spongycastle/pqc/math/linearalgebra/Permutation;)Lorg/spongycastle/pqc/math/linearalgebra/Matrix;
    .registers 13

    .prologue
    .line 1044
    invoke-virtual {p1}, Lorg/spongycastle/pqc/math/linearalgebra/Permutation;->getVector()[I

    move-result-object v2

    .line 1045
    array-length v0, v2

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    if-eq v0, v1, :cond_11

    .line 1047
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "length mismatch"

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

    throw v0

    .line 1050
    :cond_11
    new-instance v3, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;

    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    invoke-direct {v3, v0, v1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;-><init>(II)V

    .line 1052
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

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

    move v1, v0

    :goto_1f
    if-ltz v1, :cond_4d

    .line 1054
    ushr-int/lit8 v4, v1, 0x5

    .line 1055
    and-int/lit8 v5, v1, 0x1f

    .line 1056
    aget v0, v2, v1

    ushr-int/lit8 v6, v0, 0x5

    .line 1057
    aget v0, v2, v1

    and-int/lit8 v7, v0, 0x1f

    .line 1058
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

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

    :goto_31
    if-ltz v0, :cond_49

    .line 1060
    iget-object v8, v3, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v8, v8, v0

    aget v9, v8, v4

    iget-object v10, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v10, v10, v0

    aget v10, v10, v6

    ushr-int/2addr v10, v7

    and-int/lit8 v10, v10, 0x1

    shl-int/2addr v10, v5

    or-int/2addr v9, v10

    aput v9, v8, v4

    .line 1058
    add-int/lit8 v0, v0, -0x1

    goto :goto_31

    .line 1052
    :cond_49
    add-int/lit8 v0, v1, -0x1

    move v1, v0

    goto :goto_1f

    .line 1064
    :cond_4d
    return-object v3
.end method

.method public rightMultiply(Lorg/spongycastle/pqc/math/linearalgebra/Vector;)Lorg/spongycastle/pqc/math/linearalgebra/Vector;
    .registers 11

    .prologue
    const/4 v8, 0x1

    const/4 v1, 0x0

    .line 1075
    instance-of v0, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;

    if-nez v0, :cond_e

    .line 1077
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "vector is not defined over GF(2)"

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

    throw v0

    .line 1080
    :cond_e
    iget v0, p1, Lorg/spongycastle/pqc/math/linearalgebra/Vector;->length:I

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    if-eq v0, v2, :cond_1c

    .line 1082
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "length mismatch"

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

    throw v0

    .line 1085
    :cond_1c
    check-cast p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;

    invoke-virtual {p1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->getVecArray()[I

    move-result-object v5

    .line 1086
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    add-int/lit8 v0, v0, 0x1f

    ushr-int/lit8 v0, v0, 0x5

    new-array v6, v0, [I

    move v0, v1

    .line 1088
    :goto_2b
    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v0, v2, :cond_60

    move v2, v1

    move v3, v1

    .line 1092
    :goto_31
    iget v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    if-ge v2, v4, :cond_42

    .line 1094
    iget-object v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v4, v4, v0

    aget v4, v4, v2

    aget v7, v5, v2

    and-int/2addr v4, v7

    xor-int/2addr v3, v4

    .line 1092
    add-int/lit8 v2, v2, 0x1

    goto :goto_31

    :cond_42
    move v2, v1

    move v4, v1

    .line 1098
    :goto_44
    const/16 v7, 0x20

    if-ge v2, v7, :cond_50

    .line 1100
    ushr-int v7, v3, v2

    and-int/lit8 v7, v7, 0x1

    xor-int/2addr v4, v7

    .line 1098
    add-int/lit8 v2, v2, 0x1

    goto :goto_44

    .line 1103
    :cond_50
    if-ne v4, v8, :cond_5d

    .line 1105
    ushr-int/lit8 v2, v0, 0x5

    aget v3, v6, v2

    and-int/lit8 v4, v0, 0x1f

    shl-int v4, v8, v4

    or-int/2addr v3, v4

    aput v3, v6, v2

    .line 1088
    :cond_5d
    add-int/lit8 v0, v0, 0x1

    goto :goto_2b

    .line 1109
    :cond_60
    new-instance v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    invoke-direct {v0, v6, v1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;-><init>([II)V

    return-object v0
.end method

.method public rightMultiplyRightCompactForm(Lorg/spongycastle/pqc/math/linearalgebra/Vector;)Lorg/spongycastle/pqc/math/linearalgebra/Vector;
    .registers 15

    .prologue
    const/4 v12, 0x1

    const/4 v1, 0x0

    .line 1122
    instance-of v0, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;

    if-nez v0, :cond_e

    .line 1124
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "vector is not defined over GF(2)"

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

    throw v0

    .line 1127
    :cond_e
    iget v0, p1, Lorg/spongycastle/pqc/math/linearalgebra/Vector;->length:I

    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    iget v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    add-int/2addr v2, v3

    if-eq v0, v2, :cond_1f

    .line 1129
    new-instance v0, Ljava/lang/ArithmeticException;

    const-string v1, "length mismatch"

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

    throw v0

    .line 1132
    :cond_1f
    check-cast p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;

    invoke-virtual {p1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->getVecArray()[I

    move-result-object v7

    .line 1133
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    add-int/lit8 v0, v0, 0x1f

    ushr-int/lit8 v0, v0, 0x5

    new-array v8, v0, [I

    .line 1135
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    shr-int/lit8 v4, v0, 0x5

    .line 1136
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    and-int/lit8 v9, v0, 0x1f

    move v0, v1

    .line 1139
    :goto_36
    iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v0, v2, :cond_b6

    .line 1142
    shr-int/lit8 v2, v0, 0x5

    aget v2, v7, v2

    and-int/lit8 v3, v0, 0x1f

    ushr-int/2addr v2, v3

    and-int/lit8 v2, v2, 0x1

    .line 1147
    if-eqz v9, :cond_8e

    move v3, v4

    move v6, v2

    move v2, v1

    .line 1151
    :goto_48
    iget v5, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

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

    if-ge v2, v5, :cond_66

    .line 1154
    add-int/lit8 v5, v3, 0x1

    aget v3, v7, v3

    ushr-int/2addr v3, v9

    aget v10, v7, v5

    rsub-int/lit8 v11, v9, 0x20

    shl-int/2addr v10, v11

    or-int/2addr v3, v10

    .line 1155
    iget-object v10, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v10, v10, v0

    aget v10, v10, v2

    and-int/2addr v3, v10

    xor-int/2addr v3, v6

    .line 1151
    add-int/lit8 v2, v2, 0x1

    move v6, v3

    move v3, v5

    goto :goto_48

    .line 1158
    :cond_66
    add-int/lit8 v5, v3, 0x1

    aget v2, v7, v3

    ushr-int/2addr v2, v9

    .line 1159
    array-length v3, v7

    if-ge v5, v3, :cond_74

    .line 1161
    aget v3, v7, v5

    rsub-int/lit8 v5, v9, 0x20

    shl-int/2addr v3, v5

    or-int/2addr v2, v3

    .line 1163
    :cond_74
    iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v3, v3, v0

    iget v5, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

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

    aget v3, v3, v5

    and-int/2addr v2, v3

    xor-int/2addr v6, v2

    :cond_80
    move v2, v1

    move v3, v1

    .line 1176
    :goto_82
    const/16 v5, 0x20

    if-ge v2, v5, :cond_a6

    .line 1178
    and-int/lit8 v5, v6, 0x1

    xor-int/2addr v3, v5

    .line 1179
    ushr-int/lit8 v6, v6, 0x1

    .line 1176
    add-int/lit8 v2, v2, 0x1

    goto :goto_82

    :cond_8e
    move v3, v4

    move v6, v2

    move v2, v1

    .line 1168
    :goto_91
    iget v5, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    if-ge v2, v5, :cond_80

    .line 1170
    iget-object v5, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v5, v5, v0

    aget v10, v5, v2

    add-int/lit8 v5, v3, 0x1

    aget v3, v7, v3

    and-int/2addr v3, v10

    xor-int/2addr v3, v6

    .line 1168
    add-int/lit8 v2, v2, 0x1

    move v6, v3

    move v3, v5

    goto :goto_91

    .line 1183
    :cond_a6
    if-ne v3, v12, :cond_b3

    .line 1185
    shr-int/lit8 v2, v0, 0x5

    aget v3, v8, v2

    and-int/lit8 v5, v0, 0x1f

    shl-int v5, v12, v5

    or-int/2addr v3, v5

    aput v3, v8, v2

    .line 1139
    :cond_b3
    add-int/lit8 v0, v0, 0x1

    goto :goto_36

    .line 1189
    :cond_b6
    new-instance v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;

    iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    invoke-direct {v0, v8, v1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;-><init>([II)V

    return-object v0
.end method

.method public toString()Ljava/lang/String;
    .registers 13

    .prologue
    const/16 v11, 0x31

    const/16 v10, 0x30

    const/16 v9, 0x20

    const/4 v2, 0x0

    .line 1243
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numColumns:I

    and-int/lit8 v5, v0, 0x1f

    .line 1245
    if-nez v5, :cond_47

    .line 1247
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

    .line 1254
    :goto_f
    new-instance v6, Ljava/lang/StringBuffer;

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

    move v1, v2

    .line 1255
    :goto_15
    iget v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->numRows:I

    if-ge v1, v3, :cond_7c

    .line 1257
    new-instance v3, Ljava/lang/StringBuilder;

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

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

    move-result-object v3

    const-string v4, ": "

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

    move-result-object v3

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

    move-result-object v3

    invoke-virtual {v6, v3}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move v4, v2

    .line 1258
    :goto_30
    if-ge v4, v0, :cond_57

    .line 1260
    iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v3, v3, v1

    aget v7, v3, v4

    move v3, v2

    .line 1261
    :goto_39
    if-ge v3, v9, :cond_50

    .line 1263
    ushr-int v8, v7, v3

    and-int/lit8 v8, v8, 0x1

    .line 1264
    if-nez v8, :cond_4c

    .line 1266
    invoke-virtual {v6, v10}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;

    .line 1261
    :goto_44
    add-int/lit8 v3, v3, 0x1

    goto :goto_39

    .line 1251
    :cond_47
    iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

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

    goto :goto_f

    .line 1270
    :cond_4c
    invoke-virtual {v6, v11}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;

    goto :goto_44

    .line 1273
    :cond_50
    invoke-virtual {v6, v9}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;

    .line 1258
    add-int/lit8 v3, v4, 0x1

    move v4, v3

    goto :goto_30

    .line 1275
    :cond_57
    iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->matrix:[[I

    aget-object v3, v3, v1

    iget v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Matrix;->length:I

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

    aget v4, v3, v4

    move v3, v2

    .line 1276
    :goto_62
    if-ge v3, v5, :cond_74

    .line 1278
    ushr-int v7, v4, v3

    and-int/lit8 v7, v7, 0x1

    .line 1279
    if-nez v7, :cond_70

    .line 1281
    invoke-virtual {v6, v10}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;

    .line 1276
    :goto_6d
    add-int/lit8 v3, v3, 0x1

    goto :goto_62

    .line 1285
    :cond_70
    invoke-virtual {v6, v11}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;

    goto :goto_6d

    .line 1288
    :cond_74
    const/16 v3, 0xa

    invoke-virtual {v6, v3}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;

    .line 1255
    add-int/lit8 v1, v1, 0x1

    goto :goto_15

    .line 1291
    :cond_7c
    invoke-virtual {v6}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method