GF2Vector.smali
.class public Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
.super Lorg/spongycastle/pqc/math/linearalgebra/Vector;
.source "GF2Vector.java"
# instance fields
.field private v:[I
# direct methods
.method public constructor <init>(I)V
.registers 4
.prologue
.line 28
invoke-direct {p0}, Lorg/spongycastle/pqc/math/linearalgebra/Vector;-><init>()V
.line 29
if-gez p1, :cond_d
.line 31
new-instance v0, Ljava/lang/ArithmeticException;
const-string v1, "Negative length."
invoke-direct {v0, v1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw v0
.line 33
:cond_d
iput p1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
.line 34
add-int/lit8 v0, p1, 0x1f
shr-int/lit8 v0, v0, 0x5
new-array v0, v0, [I
iput-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
.line 35
return-void
.end method
.method public constructor <init>(IILjava/security/SecureRandom;)V
.registers 8
.prologue
const/4 v0, 0x0
.line 74
invoke-direct {p0}, Lorg/spongycastle/pqc/math/linearalgebra/Vector;-><init>()V
.line 75
if-le p2, p1, :cond_e
.line 77
new-instance v0, Ljava/lang/ArithmeticException;
const-string v1, "The hamming weight is greater than the length of vector."
invoke-direct {v0, v1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw v0
.line 80
:cond_e
iput p1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
.line 82
add-int/lit8 v1, p1, 0x1f
shr-int/lit8 v1, v1, 0x5
.line 83
new-array v1, v1, [I
iput-object v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
.line 85
new-array v2, p1, [I
move v1, v0
.line 86
:goto_1b
if-ge v1, p1, :cond_22
.line 88
aput v1, v2, v1
.line 86
add-int/lit8 v1, v1, 0x1
goto :goto_1b
.line 92
:cond_22
:goto_22
if-ge v0, p2, :cond_36
.line 94
invoke-static {p3, p1}, Lorg/spongycastle/pqc/math/linearalgebra/RandUtils;->nextInt(Ljava/security/SecureRandom;I)I
move-result v1
.line 95
aget v3, v2, v1
invoke-virtual {p0, v3}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->setBit(I)V
.line 96
add-int/lit8 p1, p1, -0x1
.line 97
aget v3, v2, p1
aput v3, v2, v1
.line 92
add-int/lit8 v0, v0, 0x1
goto :goto_22
.line 99
:cond_36
return-void
.end method
.method public constructor <init>(ILjava/security/SecureRandom;)V
.registers 8
.prologue
.line 44
invoke-direct {p0}, Lorg/spongycastle/pqc/math/linearalgebra/Vector;-><init>()V
.line 45
iput p1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
.line 47
add-int/lit8 v0, p1, 0x1f
shr-int/lit8 v1, v0, 0x5
.line 48
new-array v0, v1, [I
iput-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
.line 51
add-int/lit8 v0, v1, -0x1
:goto_f
if-ltz v0, :cond_1c
.line 53
iget-object v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
invoke-virtual {p2}, Ljava/security/SecureRandom;->nextInt()I
move-result v3
aput v3, v2, v0
.line 51
add-int/lit8 v0, v0, -0x1
goto :goto_f
.line 57
:cond_1c
and-int/lit8 v0, p1, 0x1f
.line 58
if-eqz v0, :cond_2e
.line 61
iget-object v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
add-int/lit8 v1, v1, -0x1
aget v3, v2, v1
const/4 v4, 0x1
shl-int v0, v4, v0
add-int/lit8 v0, v0, -0x1
and-int/2addr v0, v3
aput v0, v2, v1
.line 63
:cond_2e
return-void
.end method
.method public constructor <init>(I[I)V
.registers 8
.prologue
.line 109
invoke-direct {p0}, Lorg/spongycastle/pqc/math/linearalgebra/Vector;-><init>()V
.line 110
if-gez p1, :cond_d
.line 112
new-instance v0, Ljava/lang/ArithmeticException;
const-string v1, "negative length"
invoke-direct {v0, v1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw v0
.line 114
:cond_d
iput p1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
.line 116
add-int/lit8 v0, p1, 0x1f
shr-int/lit8 v0, v0, 0x5
.line 118
array-length v1, p2
if-eq v1, v0, :cond_1e
.line 120
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 123
:cond_1e
invoke-static {p2}, Lorg/spongycastle/pqc/math/linearalgebra/IntUtils;->clone([I)[I
move-result-object v1
iput-object v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
.line 125
and-int/lit8 v1, p1, 0x1f
.line 126
if-eqz v1, :cond_36
.line 129
iget-object v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
add-int/lit8 v0, v0, -0x1
aget v3, v2, v0
const/4 v4, 0x1
shl-int v1, v4, v1
add-int/lit8 v1, v1, -0x1
and-int/2addr v1, v3
aput v1, v2, v0
.line 131
:cond_36
return-void
.end method
.method public constructor <init>(Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;)V
.registers 3
.prologue
.line 139
invoke-direct {p0}, Lorg/spongycastle/pqc/math/linearalgebra/Vector;-><init>()V
.line 140
iget v0, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
iput v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
.line 141
iget-object v0, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
invoke-static {v0}, Lorg/spongycastle/pqc/math/linearalgebra/IntUtils;->clone([I)[I
move-result-object v0
iput-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
.line 142
return-void
.end method
.method protected constructor <init>([II)V
.registers 3
.prologue
.line 153
invoke-direct {p0}, Lorg/spongycastle/pqc/math/linearalgebra/Vector;-><init>()V
.line 154
iput-object p1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
.line 155
iput p2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
.line 156
return-void
.end method
.method public static OS2VP(I[B)Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
.registers 4
.prologue
.line 168
if-gez p0, :cond_a
.line 170
new-instance v0, Ljava/lang/ArithmeticException;
const-string v1, "negative length"
invoke-direct {v0, v1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw v0
.line 173
:cond_a
add-int/lit8 v0, p0, 0x7
shr-int/lit8 v0, v0, 0x3
.line 175
array-length v1, p1
if-le v1, v0, :cond_19
.line 177
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 180
:cond_19
new-instance v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
invoke-static {p1}, Lorg/spongycastle/pqc/math/linearalgebra/LittleEndianConversions;->toIntArray([B)[I
move-result-object v1
invoke-direct {v0, p0, v1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;-><init>(I[I)V
return-object v0
.end method
# virtual methods
.method public add(Lorg/spongycastle/pqc/math/linearalgebra/Vector;)Lorg/spongycastle/pqc/math/linearalgebra/Vector;
.registers 6
.prologue
.line 284
instance-of v0, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
if-nez v0, :cond_c
.line 286
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
:cond_c
move-object v0, p1
.line 289
check-cast v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
.line 290
iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
iget v0, v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
if-eq v1, v0, :cond_1d
.line 292
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 295
:cond_1d
check-cast p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
iget-object v0, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
invoke-static {v0}, Lorg/spongycastle/pqc/math/linearalgebra/IntUtils;->clone([I)[I
move-result-object v1
.line 297
array-length v0, v1
add-int/lit8 v0, v0, -0x1
:goto_28
if-ltz v0, :cond_36
.line 299
aget v2, v1, v0
iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
aget v3, v3, v0
xor-int/2addr v2, v3
aput v2, v1, v0
.line 297
add-int/lit8 v0, v0, -0x1
goto :goto_28
.line 302
:cond_36
new-instance v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
invoke-direct {v0, v2, v1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;-><init>(I[I)V
return-object v0
.end method
.method public equals(Ljava/lang/Object;)Z
.registers 5
.prologue
const/4 v0, 0x0
.line 493
instance-of v1, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
if-nez v1, :cond_6
.line 499
:cond_5
:goto_5
return v0
.line 497
:cond_6
check-cast p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
.line 499
iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
iget v2, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
if-ne v1, v2, :cond_5
iget-object v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
iget-object v2, p1, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
invoke-static {v1, v2}, Lorg/spongycastle/pqc/math/linearalgebra/IntUtils;->equals([I[I)Z
move-result v1
if-eqz v1, :cond_5
const/4 v0, 0x1
goto :goto_5
.end method
.method public extractLeftVector(I)Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
.registers 8
.prologue
const/4 v5, 0x0
.line 373
iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
if-le p1, v0, :cond_d
.line 375
new-instance v0, Ljava/lang/ArithmeticException;
const-string v1, "invalid length"
invoke-direct {v0, v1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw v0
.line 378
:cond_d
iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
if-ne p1, v0, :cond_17
.line 380
new-instance v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
invoke-direct {v0, p0}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;-><init>(Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;)V
.line 394
:cond_16
:goto_16
return-object v0
.line 383
:cond_17
new-instance v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
invoke-direct {v0, p1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;-><init>(I)V
.line 385
shr-int/lit8 v1, p1, 0x5
.line 386
and-int/lit8 v2, p1, 0x1f
.line 388
iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
iget-object v4, v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
invoke-static {v3, v5, v4, v5, v1}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 389
if-eqz v2, :cond_16
.line 391
iget-object v3, v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
iget-object v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
aget v4, v4, v1
const/4 v5, 0x1
shl-int v2, v5, v2
add-int/lit8 v2, v2, -0x1
and-int/2addr v2, v4
aput v2, v3, v1
goto :goto_16
.end method
.method public extractRightVector(I)Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
.registers 11
.prologue
const/4 v2, 0x0
.line 407
iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
if-le p1, v0, :cond_d
.line 409
new-instance v0, Ljava/lang/ArithmeticException;
const-string v1, "invalid length"
invoke-direct {v0, v1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw v0
.line 412
:cond_d
iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
if-ne p1, v0, :cond_17
.line 414
new-instance v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
invoke-direct {v0, p0}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;-><init>(Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;)V
.line 445
:cond_16
:goto_16
return-object v0
.line 417
:cond_17
new-instance v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
invoke-direct {v0, p1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;-><init>(I)V
.line 419
iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
sub-int/2addr v1, p1
shr-int/lit8 v1, v1, 0x5
.line 420
iget v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
sub-int/2addr v3, p1
and-int/lit8 v4, v3, 0x1f
.line 421
add-int/lit8 v3, p1, 0x1f
shr-int/lit8 v5, v3, 0x5
.line 425
if-eqz v4, :cond_6d
move v3, v2
.line 428
:goto_2d
add-int/lit8 v2, v5, -0x1
if-ge v3, v2, :cond_49
.line 430
iget-object v6, v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
iget-object v7, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
add-int/lit8 v2, v1, 0x1
aget v1, v7, v1
ushr-int/2addr v1, v4
iget-object v7, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
aget v7, v7, v2
rsub-int/lit8 v8, v4, 0x20
shl-int/2addr v7, v8
or-int/2addr v1, v7
aput v1, v6, v3
.line 428
add-int/lit8 v1, v3, 0x1
move v3, v1
move v1, v2
goto :goto_2d
.line 433
:cond_49
iget-object v2, v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
add-int/lit8 v3, v5, -0x1
iget-object v6, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
add-int/lit8 v7, v1, 0x1
aget v1, v6, v1
ushr-int/2addr v1, v4
aput v1, v2, v3
.line 434
iget-object v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
array-length v1, v1
if-ge v7, v1, :cond_16
.line 436
iget-object v1, v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
add-int/lit8 v2, v5, -0x1
aget v3, v1, v2
iget-object v5, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
aget v5, v5, v7
rsub-int/lit8 v4, v4, 0x20
shl-int v4, v5, v4
or-int/2addr v3, v4
aput v3, v1, v2
goto :goto_16
.line 442
:cond_6d
iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
iget-object v4, v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
invoke-static {v3, v1, v4, v2, v5}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
goto :goto_16
.end method
.method public extractVector([I)Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
.registers 10
.prologue
const/4 v7, 0x1
.line 343
array-length v1, p1
.line 344
add-int/lit8 v0, v1, -0x1
aget v0, p1, v0
iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
if-le v0, v2, :cond_12
.line 346
new-instance v0, Ljava/lang/ArithmeticException;
const-string v1, "invalid index set"
invoke-direct {v0, v1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw v0
.line 349
:cond_12
new-instance v2, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
invoke-direct {v2, v1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;-><init>(I)V
.line 351
const/4 v0, 0x0
:goto_18
if-ge v0, v1, :cond_3b
.line 353
iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
aget v4, p1, v0
shr-int/lit8 v4, v4, 0x5
aget v3, v3, v4
aget v4, p1, v0
and-int/lit8 v4, v4, 0x1f
shl-int v4, v7, v4
and-int/2addr v3, v4
.line 354
if-eqz v3, :cond_38
.line 356
iget-object v3, v2, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
shr-int/lit8 v4, v0, 0x5
aget v5, v3, v4
and-int/lit8 v6, v0, 0x1f
shl-int v6, v7, v6
or-int/2addr v5, v6
aput v5, v3, v4
.line 351
:cond_38
add-int/lit8 v0, v0, 0x1
goto :goto_18
.line 360
:cond_3b
return-object v2
.end method
.method public getBit(I)I
.registers 5
.prologue
.line 250
iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
if-lt p1, v0, :cond_a
.line 252
new-instance v0, Ljava/lang/IndexOutOfBoundsException;
invoke-direct {v0}, Ljava/lang/IndexOutOfBoundsException;-><init>()V
throw v0
.line 254
:cond_a
shr-int/lit8 v0, p1, 0x5
.line 255
and-int/lit8 v1, p1, 0x1f
.line 256
iget-object v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
aget v0, v2, v0
const/4 v2, 0x1
shl-int/2addr v2, v1
and-int/2addr v0, v2
ushr-int/2addr v0, v1
return v0
.end method
.method public getEncoded()[B
.registers 3
.prologue
.line 190
iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
add-int/lit8 v0, v0, 0x7
shr-int/lit8 v0, v0, 0x3
.line 191
iget-object v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
invoke-static {v1, v0}, Lorg/spongycastle/pqc/math/linearalgebra/LittleEndianConversions;->toByteArray([II)[B
move-result-object v0
return-object v0
.end method
.method public getHammingWeight()I
.registers 7
.prologue
const/4 v1, 0x0
.line 210
move v0, v1
move v2, v1
.line 211
:goto_3
iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
array-length v3, v3
if-ge v0, v3, :cond_20
.line 213
iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
aget v3, v3, v0
move v4, v3
move v3, v1
.line 214
:goto_e
const/16 v5, 0x20
if-ge v3, v5, :cond_1d
.line 216
and-int/lit8 v5, v4, 0x1
.line 217
if-eqz v5, :cond_18
.line 219
add-int/lit8 v2, v2, 0x1
.line 221
:cond_18
ushr-int/lit8 v4, v4, 0x1
.line 214
add-int/lit8 v3, v3, 0x1
goto :goto_e
.line 211
:cond_1d
add-int/lit8 v0, v0, 0x1
goto :goto_3
.line 224
:cond_20
return v2
.end method
.method public getVecArray()[I
.registers 2
.prologue
.line 199
iget-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
return-object v0
.end method
.method public hashCode()I
.registers 3
.prologue
.line 507
iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
.line 508
mul-int/lit8 v0, v0, 0x1f
iget-object v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
invoke-virtual {v1}, Ljava/lang/Object;->hashCode()I
move-result v1
add-int/2addr v0, v1
.line 509
return v0
.end method
.method public isZero()Z
.registers 3
.prologue
.line 232
iget-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
array-length v0, v0
add-int/lit8 v0, v0, -0x1
:goto_5
if-ltz v0, :cond_12
.line 234
iget-object v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
aget v1, v1, v0
if-eqz v1, :cond_f
.line 236
const/4 v0, 0x0
.line 239
:goto_e
return v0
.line 232
:cond_f
add-int/lit8 v0, v0, -0x1
goto :goto_5
.line 239
:cond_12
const/4 v0, 0x1
goto :goto_e
.end method
.method public multiply(Lorg/spongycastle/pqc/math/linearalgebra/Permutation;)Lorg/spongycastle/pqc/math/linearalgebra/Vector;
.registers 10
.prologue
const/4 v7, 0x1
.line 313
invoke-virtual {p1}, Lorg/spongycastle/pqc/math/linearalgebra/Permutation;->getVector()[I
move-result-object v1
.line 314
iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
array-length v2, v1
if-eq v0, v2, :cond_12
.line 316
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 319
:cond_12
new-instance v2, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;
iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
invoke-direct {v2, v0}, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;-><init>(I)V
.line 321
const/4 v0, 0x0
:goto_1a
array-length v3, v1
if-ge v0, v3, :cond_3e
.line 323
iget-object v3, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
aget v4, v1, v0
shr-int/lit8 v4, v4, 0x5
aget v3, v3, v4
aget v4, v1, v0
and-int/lit8 v4, v4, 0x1f
shl-int v4, v7, v4
and-int/2addr v3, v4
.line 324
if-eqz v3, :cond_3b
.line 326
iget-object v3, v2, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
shr-int/lit8 v4, v0, 0x5
aget v5, v3, v4
and-int/lit8 v6, v0, 0x1f
shl-int v6, v7, v6
or-int/2addr v5, v6
aput v5, v3, v4
.line 321
:cond_3b
add-int/lit8 v0, v0, 0x1
goto :goto_1a
.line 330
:cond_3e
return-object v2
.end method
.method public setBit(I)V
.registers 7
.prologue
.line 267
iget v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
if-lt p1, v0, :cond_a
.line 269
new-instance v0, Ljava/lang/IndexOutOfBoundsException;
invoke-direct {v0}, Ljava/lang/IndexOutOfBoundsException;-><init>()V
throw v0
.line 271
:cond_a
iget-object v0, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
shr-int/lit8 v1, p1, 0x5
aget v2, v0, v1
const/4 v3, 0x1
and-int/lit8 v4, p1, 0x1f
shl-int/2addr v3, v4
or-int/2addr v2, v3
aput v2, v0, v1
.line 272
return-void
.end method
.method public toExtensionFieldVector(Lorg/spongycastle/pqc/math/linearalgebra/GF2mField;)Lorg/spongycastle/pqc/math/linearalgebra/GF2mVector;
.registers 10
.prologue
const/4 v7, 0x1
.line 457
invoke-virtual {p1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2mField;->getDegree()I
move-result v0
.line 458
iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
rem-int/2addr v1, v0
if-eqz v1, :cond_12
.line 460
new-instance v0, Ljava/lang/ArithmeticException;
const-string v1, "conversion is impossible"
invoke-direct {v0, v1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw v0
.line 463
:cond_12
iget v1, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
div-int v0, v1, v0
.line 464
new-array v3, v0, [I
.line 465
const/4 v1, 0x0
.line 466
add-int/lit8 v0, v0, -0x1
move v2, v0
:goto_1c
if-ltz v2, :cond_43
.line 468
invoke-virtual {p1}, Lorg/spongycastle/pqc/math/linearalgebra/GF2mField;->getDegree()I
move-result v0
add-int/lit8 v0, v0, -0x1
:goto_24
if-ltz v0, :cond_3f
.line 470
ushr-int/lit8 v4, v1, 0x5
.line 471
and-int/lit8 v5, v1, 0x1f
.line 473
iget-object v6, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
aget v4, v6, v4
ushr-int/2addr v4, v5
and-int/lit8 v4, v4, 0x1
.line 474
if-ne v4, v7, :cond_3a
.line 476
aget v4, v3, v2
shl-int v5, v7, v0
xor-int/2addr v4, v5
aput v4, v3, v2
.line 478
:cond_3a
add-int/lit8 v1, v1, 0x1
.line 468
add-int/lit8 v0, v0, -0x1
goto :goto_24
.line 466
:cond_3f
add-int/lit8 v0, v2, -0x1
move v2, v0
goto :goto_1c
.line 481
:cond_43
new-instance v0, Lorg/spongycastle/pqc/math/linearalgebra/GF2mVector;
invoke-direct {v0, p1, v3}, Lorg/spongycastle/pqc/math/linearalgebra/GF2mVector;-><init>(Lorg/spongycastle/pqc/math/linearalgebra/GF2mField;[I)V
return-object v0
.end method
.method public toString()Ljava/lang/String;
.registers 6
.prologue
.line 517
new-instance v1, Ljava/lang/StringBuffer;
invoke-direct {v1}, Ljava/lang/StringBuffer;-><init>()V
.line 518
const/4 v0, 0x0
:goto_6
iget v2, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->length:I
if-ge v0, v2, :cond_31
.line 520
if-eqz v0, :cond_15
and-int/lit8 v2, v0, 0x1f
if-nez v2, :cond_15
.line 522
const/16 v2, 0x20
invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;
.line 524
:cond_15
shr-int/lit8 v2, v0, 0x5
.line 525
and-int/lit8 v3, v0, 0x1f
.line 526
iget-object v4, p0, Lorg/spongycastle/pqc/math/linearalgebra/GF2Vector;->v:[I
aget v2, v4, v2
const/4 v4, 0x1
shl-int v3, v4, v3
and-int/2addr v2, v3
.line 527
if-nez v2, :cond_2b
.line 529
const/16 v2, 0x30
invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;
.line 518
:goto_28
add-int/lit8 v0, v0, 0x1
goto :goto_6
.line 533
:cond_2b
const/16 v2, 0x31
invoke-virtual {v1, v2}, Ljava/lang/StringBuffer;->append(C)Ljava/lang/StringBuffer;
goto :goto_28
.line 536
:cond_31
invoke-virtual {v1}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method