tmap/smali/j1/a.smali
2022-06-10 21:38:30 +09:00

467 lines
7.1 KiB
Smali

.class public Lj1/a;
.super Ljava/lang/Object;
.source "MathUtils.java"
# direct methods
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static a(II)I
.locals 1
add-int v0, p0, p1
xor-int/2addr p0, v0
xor-int/2addr p1, v0
and-int/2addr p0, p1
if-ltz p0, :cond_0
return v0
.line 1
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
const-string p1, "integer overflow"
invoke-direct {p0, p1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static b(JJ)J
.locals 2
add-long v0, p0, p2
xor-long/2addr p0, v0
xor-long/2addr p2, v0
and-long/2addr p0, p2
const-wide/16 p2, 0x0
cmp-long p0, p0, p2
if-ltz p0, :cond_0
return-wide v0
.line 1
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
const-string p1, "long overflow"
invoke-direct {p0, p1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static c(DDD)D
.locals 1
cmpg-double v0, p0, p2
if-gez v0, :cond_0
return-wide p2
:cond_0
cmpl-double p2, p0, p4
if-lez p2, :cond_1
return-wide p4
:cond_1
return-wide p0
.end method
.method public static d(FFF)F
.locals 1
cmpg-float v0, p0, p1
if-gez v0, :cond_0
return p1
:cond_0
cmpl-float p1, p0, p2
if-lez p1, :cond_1
return p2
:cond_1
return p0
.end method
.method public static e(III)I
.locals 0
if-ge p0, p1, :cond_0
return p1
:cond_0
if-le p0, p2, :cond_1
return p2
:cond_1
return p0
.end method
.method public static f(JJJ)J
.locals 1
cmp-long v0, p0, p2
if-gez v0, :cond_0
return-wide p2
:cond_0
cmp-long p2, p0, p4
if-lez p2, :cond_1
return-wide p4
:cond_1
return-wide p0
.end method
.method public static g(I)I
.locals 1
const/high16 v0, -0x80000000
if-eq p0, v0, :cond_0
add-int/lit8 p0, p0, -0x1
return p0
.line 1
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
const-string v0, "integer overflow"
invoke-direct {p0, v0}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static h(J)J
.locals 2
const-wide/high16 v0, -0x8000000000000000L
cmp-long v0, p0, v0
if-eqz v0, :cond_0
const-wide/16 v0, 0x1
sub-long/2addr p0, v0
return-wide p0
.line 1
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
const-string p1, "long overflow"
invoke-direct {p0, p1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static i(I)I
.locals 1
const v0, 0x7fffffff
if-eq p0, v0, :cond_0
add-int/lit8 p0, p0, 0x1
return p0
.line 1
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
const-string v0, "integer overflow"
invoke-direct {p0, v0}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static j(J)J
.locals 2
const-wide v0, 0x7fffffffffffffffL
cmp-long v0, p0, v0
if-eqz v0, :cond_0
const-wide/16 v0, 0x1
add-long/2addr p0, v0
return-wide p0
.line 1
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
const-string p1, "long overflow"
invoke-direct {p0, p1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static k(II)I
.locals 4
int-to-long v0, p0
int-to-long p0, p1
mul-long/2addr v0, p0
long-to-int p0, v0
int-to-long v2, p0
cmp-long p1, v2, v0
if-nez p1, :cond_0
return p0
.line 1
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
const-string p1, "integer overflow"
invoke-direct {p0, p1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static l(JJ)J
.locals 6
mul-long v0, p0, p2
.line 1
invoke-static {p0, p1}, Ljava/lang/Math;->abs(J)J
move-result-wide v2
.line 2
invoke-static {p2, p3}, Ljava/lang/Math;->abs(J)J
move-result-wide v4
or-long/2addr v2, v4
const/16 v4, 0x1f
ushr-long/2addr v2, v4
const-wide/16 v4, 0x0
cmp-long v2, v2, v4
if-eqz v2, :cond_2
cmp-long v2, p2, v4
if-eqz v2, :cond_0
.line 3
div-long v2, v0, p2
cmp-long v2, v2, p0
if-nez v2, :cond_1
:cond_0
const-wide/high16 v2, -0x8000000000000000L
cmp-long p0, p0, v2
if-nez p0, :cond_2
const-wide/16 p0, -0x1
cmp-long p0, p2, p0
if-eqz p0, :cond_1
goto :goto_0
.line 4
:cond_1
new-instance p0, Ljava/lang/ArithmeticException;
const-string p1, "long overflow"
invoke-direct {p0, p1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
:cond_2
:goto_0
return-wide v0
.end method
.method public static m(I)I
.locals 1
const/high16 v0, -0x80000000
if-eq p0, v0, :cond_0
neg-int p0, p0
return p0
.line 1
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
const-string v0, "integer overflow"
invoke-direct {p0, v0}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static n(J)J
.locals 2
const-wide/high16 v0, -0x8000000000000000L
cmp-long v0, p0, v0
if-eqz v0, :cond_0
neg-long p0, p0
return-wide p0
.line 1
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
const-string p1, "long overflow"
invoke-direct {p0, p1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static o(II)I
.locals 1
sub-int v0, p0, p1
xor-int/2addr p1, p0
xor-int/2addr p0, v0
and-int/2addr p0, p1
if-ltz p0, :cond_0
return v0
.line 1
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
const-string p1, "integer overflow"
invoke-direct {p0, p1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static p(JJ)J
.locals 2
sub-long v0, p0, p2
xor-long/2addr p2, p0
xor-long/2addr p0, v0
and-long/2addr p0, p2
const-wide/16 p2, 0x0
cmp-long p0, p0, p2
if-ltz p0, :cond_0
return-wide v0
.line 1
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
const-string p1, "long overflow"
invoke-direct {p0, p1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
.end method
.method public static q(J)I
.locals 3
long-to-int v0, p0
int-to-long v1, v0
cmp-long p0, v1, p0
if-nez p0, :cond_0
return v0
.line 1
:cond_0
new-instance p0, Ljava/lang/ArithmeticException;
const-string p1, "integer overflow"
invoke-direct {p0, p1}, Ljava/lang/ArithmeticException;-><init>(Ljava/lang/String;)V
throw p0
.end method