Debian Codegraph @

test/800-smali/smali/negLong.smali

raw
1 .class public LnegLong;
2 .super Ljava/lang/Object;
3 .source "negLong.java"
4 # static fields
5 .field public static final N:I = 0x64
6 .field public static i:I
7 # direct methods
8 .method static constructor <clinit>()V
9 .registers 1
10 .prologue
11 .line 5
12 const/16 v0, 0x44da
13 sput v0, LnegLong;->i:I
14 return-void
15 .end method
16 .method public constructor <init>()V
17 .registers 1
18 .prologue
19 .line 1
20 invoke-direct {p0}, Ljava/lang/Object;-><init>()V
21 return-void
22 .end method
23 .method public static checkSum1([S)J
24 .registers 7
25 .prologue
26 .line 14
27 array-length v3, p0
28 .line 15
29 const-wide/16 v0, 0x0
30 .line 16
31 const/4 v2, 0x0
32 :goto_4
33 if-ge v2, v3, :cond_d
34 .line 17
35 aget-short v4, p0, v2
36 int-to-long v4, v4
37 add-long/2addr v0, v4
38 .line 16
39 add-int/lit8 v2, v2, 0x1
40 goto :goto_4
41 .line 18
42 :cond_d
43 return-wide v0
44 .end method
45 .method public static init1([SS)V
46 .registers 4
47 .prologue
48 .line 8
49 array-length v1, p0
50 .line 9
51 const/4 v0, 0x0
52 :goto_2
53 if-ge v0, v1, :cond_9
54 .line 10
55 aput-short p1, p0, v0
56 .line 9
57 add-int/lit8 v0, v0, 0x1
58 goto :goto_2
59 .line 11
60 :cond_9
61 return-void
62 .end method
63 .method public static main([Ljava/lang/String;)V
64 .registers 6
65 .prologue
66 .line 50
67 invoke-static {}, LnegLong;->negLong()J
68 move-result-wide v0
69 .line 51
70 sget-object v2, Ljava/lang/System;->out:Ljava/io/PrintStream;
71 new-instance v3, Ljava/lang/StringBuilder;
72 invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
73 const-string v4, "nbp ztw p = "
74 invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
75 move-result-object v3
76 invoke-virtual {v3, v0, v1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
77 move-result-object v0
78 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
79 move-result-object v0
80 invoke-virtual {v2, v0}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
81 .line 52
82 return-void
83 .end method
84 .method public static negLong()J
85 .registers 17
86 .prologue
87 .line 23
88 const-wide v1, -0x4c4a1f4aa9b1db83L
89 .line 24
90 const v7, -0x3f727efa
91 .line 25
92 const/16 v4, -0x284b
93 const v3, 0xdc01
94 .line 26
95 const/16 v0, 0x64
96 new-array v8, v0, [S
97 .line 28
98 const/16 v0, 0x1c60
99 invoke-static {v8, v0}, LnegLong;->init1([SS)V
100 .line 29
101 const/4 v0, 0x2
102 move v6, v0
103 :goto_18
104 const/16 v0, 0x56
105 if-ge v6, v0, :cond_64
106 .line 30
107 const/4 v0, 0x1
108 move v5, v0
109 move v0, v3
110 move-wide v15, v1
111 move-wide v2, v15
112 :goto_21
113 if-ge v5, v6, :cond_5d
114 .line 31
115 int-to-float v0, v4
116 neg-float v1, v7
117 add-float/2addr v0, v1
118 float-to-int v1, v0
119 .line 32
120 const/4 v0, 0x1
121 move v4, v1
122 move-wide v15, v2
123 move-wide v1, v15
124 .line 33
125 :goto_2b
126 add-int/lit8 v3, v0, 0x1
127 const/16 v0, 0x1b
128 if-ge v3, v0, :cond_3a
129 .line 35
130 int-to-long v9, v5
131 mul-long v0, v9, v1
132 neg-long v1, v0
133 .line 38
134 sget v0, LnegLong;->i:I
135 move v4, v0
136 move v0, v3
137 goto :goto_2b
138 .line 40
139 :cond_3a
140 aget-short v0, v8, v6
141 int-to-double v9, v0
142 long-to-double v11, v1
143 const-wide v13, 0x403f9851eb851eb8L
144 sub-double/2addr v11, v13
145 add-double/2addr v9, v11
146 double-to-int v0, v9
147 int-to-short v0, v0
148 aput-short v0, v8, v6
149 .line 41
150 const/4 v0, 0x2
151 :goto_4a
152 const/16 v9, 0x43
153 if-ge v0, v9, :cond_56
154 .line 42
155 neg-long v9, v1
156 const-wide/16 v11, 0x1
157 or-long/2addr v9, v11
158 add-long/2addr v1, v9
159 .line 41
160 add-int/lit8 v0, v0, 0x1
161 goto :goto_4a
162 .line 30
163 :cond_56
164 add-int/lit8 v0, v5, 0x1
165 move v5, v0
166 move v0, v3
167 move-wide v15, v1
168 move-wide v2, v15
169 goto :goto_21
170 .line 29
171 :cond_5d
172 add-int/lit8 v1, v6, 0x1
173 move v6, v1
174 move-wide v15, v2
175 move-wide v1, v15
176 move v3, v0
177 goto :goto_18
178 .line 45
179 :cond_64
180 invoke-static {v8}, LnegLong;->checkSum1([S)J
181 move-result-wide v0
182 int-to-long v2, v3
183 add-long/2addr v0, v2
184 .line 46
185 return-wide v0
186 .end method