BigIntEuclidean.smali
.class public Lorg/spongycastle/pqc/math/ntru/euclid/BigIntEuclidean;
.super Ljava/lang/Object;
.source "BigIntEuclidean.java"
# instance fields
.field public gcd:Ljava/math/BigInteger;
.field public x:Ljava/math/BigInteger;
.field public y:Ljava/math/BigInteger;
# direct methods
.method private constructor <init>()V
.registers 1
.prologue
.line 13
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 14
return-void
.end method
.method public static calculate(Ljava/math/BigInteger;Ljava/math/BigInteger;)Lorg/spongycastle/pqc/math/ntru/euclid/BigIntEuclidean;
.registers 11
.prologue
.line 26
sget-object v3, Ljava/math/BigInteger;->ZERO:Ljava/math/BigInteger;
.line 27
sget-object v2, Ljava/math/BigInteger;->ONE:Ljava/math/BigInteger;
.line 28
sget-object v1, Ljava/math/BigInteger;->ONE:Ljava/math/BigInteger;
.line 29
sget-object v0, Ljava/math/BigInteger;->ZERO:Ljava/math/BigInteger;
.line 30
:goto_8
sget-object v4, Ljava/math/BigInteger;->ZERO:Ljava/math/BigInteger;
invoke-virtual {p1, v4}, Ljava/math/BigInteger;->equals(Ljava/lang/Object;)Z
move-result v4
if-nez v4, :cond_33
.line 32
invoke-virtual {p0, p1}, Ljava/math/BigInteger;->divideAndRemainder(Ljava/math/BigInteger;)[Ljava/math/BigInteger;
move-result-object v4
.line 33
const/4 v5, 0x0
aget-object v5, v4, v5
.line 37
const/4 v6, 0x1
aget-object v4, v4, v6
.line 40
invoke-virtual {v5, v3}, Ljava/math/BigInteger;->multiply(Ljava/math/BigInteger;)Ljava/math/BigInteger;
move-result-object v6
invoke-virtual {v2, v6}, Ljava/math/BigInteger;->subtract(Ljava/math/BigInteger;)Ljava/math/BigInteger;
move-result-object v2
.line 44
invoke-virtual {v5, v1}, Ljava/math/BigInteger;->multiply(Ljava/math/BigInteger;)Ljava/math/BigInteger;
move-result-object v5
invoke-virtual {v0, v5}, Ljava/math/BigInteger;->subtract(Ljava/math/BigInteger;)Ljava/math/BigInteger;
move-result-object v0
move-object p0, p1
move-object p1, v4
move-object v7, v3
move-object v3, v2
move-object v2, v7
move-object v8, v0
move-object v0, v1
move-object v1, v8
.line 46
goto :goto_8
.line 48
:cond_33
new-instance v1, Lorg/spongycastle/pqc/math/ntru/euclid/BigIntEuclidean;
invoke-direct {v1}, Lorg/spongycastle/pqc/math/ntru/euclid/BigIntEuclidean;-><init>()V
.line 49
iput-object v2, v1, Lorg/spongycastle/pqc/math/ntru/euclid/BigIntEuclidean;->x:Ljava/math/BigInteger;
.line 50
iput-object v0, v1, Lorg/spongycastle/pqc/math/ntru/euclid/BigIntEuclidean;->y:Ljava/math/BigInteger;
.line 51
iput-object p0, v1, Lorg/spongycastle/pqc/math/ntru/euclid/BigIntEuclidean;->gcd:Ljava/math/BigInteger;
.line 52
return-object v1
.end method