Util.smali
4.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
.class final Lokio/Util;
.super Ljava/lang/Object;
.source "Util.java"
# static fields
.field public static final UTF_8:Ljava/nio/charset/Charset;
# direct methods
.method static constructor <clinit>()V
.locals 1
const-string v0, "UTF-8"
.line 22
invoke-static {v0}, Ljava/nio/charset/Charset;->forName(Ljava/lang/String;)Ljava/nio/charset/Charset;
move-result-object v0
sput-object v0, Lokio/Util;->UTF_8:Ljava/nio/charset/Charset;
return-void
.end method
.method private constructor <init>()V
.locals 0
.line 24
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static arrayRangeEquals([BI[BII)Z
.locals 4
const/4 v0, 0x0
move v1, v0
:goto_0
if-ge v1, p4, :cond_1
add-int v2, v1, p1
.line 76
aget-byte v2, p0, v2
add-int v3, v1, p3
aget-byte v3, p2, v3
if-eq v2, v3, :cond_0
return v0
:cond_0
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_1
const/4 p0, 0x1
return p0
.end method
.method public static checkOffsetAndCount(JJJ)V
.locals 4
or-long v0, p2, p4
const-wide/16 v2, 0x0
cmp-long v0, v0, v2
if-ltz v0, :cond_0
cmp-long v0, p2, p0
if-gtz v0, :cond_0
sub-long v0, p0, p2
cmp-long v0, v0, p4
if-ltz v0, :cond_0
return-void
.line 29
:cond_0
new-instance v0, Ljava/lang/ArrayIndexOutOfBoundsException;
const/4 v1, 0x3
new-array v1, v1, [Ljava/lang/Object;
const/4 v2, 0x0
.line 30
invoke-static {p0, p1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p0
aput-object p0, v1, v2
const/4 p0, 0x1
invoke-static {p2, p3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p1
aput-object p1, v1, p0
const/4 p0, 0x2
invoke-static {p4, p5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p1
aput-object p1, v1, p0
const-string p0, "size=%s offset=%s byteCount=%s"
invoke-static {p0, v1}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
move-result-object p0
invoke-direct {v0, p0}, Ljava/lang/ArrayIndexOutOfBoundsException;-><init>(Ljava/lang/String;)V
throw v0
.end method
.method public static reverseBytesInt(I)I
.locals 2
const/high16 v0, -0x1000000
and-int/2addr v0, p0
ushr-int/lit8 v0, v0, 0x18
const/high16 v1, 0xff0000
and-int/2addr v1, p0
ushr-int/lit8 v1, v1, 0x8
or-int/2addr v0, v1
const v1, 0xff00
and-int/2addr v1, p0
shl-int/lit8 v1, v1, 0x8
or-int/2addr v0, v1
and-int/lit16 p0, p0, 0xff
shl-int/lit8 p0, p0, 0x18
or-int/2addr p0, v0
return p0
.end method
.method public static reverseBytesLong(J)J
.locals 8
const-wide/high16 v0, -0x100000000000000L
and-long/2addr v0, p0
const/16 v2, 0x38
ushr-long/2addr v0, v2
const-wide/high16 v3, 0xff000000000000L
and-long/2addr v3, p0
const/16 v5, 0x28
ushr-long/2addr v3, v5
or-long/2addr v0, v3
const-wide v3, 0xff0000000000L
and-long/2addr v3, p0
const/16 v6, 0x18
ushr-long/2addr v3, v6
or-long/2addr v0, v3
const-wide v3, 0xff00000000L
and-long/2addr v3, p0
const/16 v7, 0x8
ushr-long/2addr v3, v7
or-long/2addr v0, v3
const-wide v3, 0xff000000L
and-long/2addr v3, p0
shl-long/2addr v3, v7
or-long/2addr v0, v3
const-wide/32 v3, 0xff0000
and-long/2addr v3, p0
shl-long/2addr v3, v6
or-long/2addr v0, v3
const-wide/32 v3, 0xff00
and-long/2addr v3, p0
shl-long/2addr v3, v5
or-long/2addr v0, v3
const-wide/16 v3, 0xff
and-long/2addr p0, v3
shl-long/2addr p0, v2
or-long/2addr p0, v0
return-wide p0
.end method
.method public static reverseBytesShort(S)S
.locals 1
const v0, 0xffff
and-int/2addr p0, v0
const v0, 0xff00
and-int/2addr v0, p0
ushr-int/lit8 v0, v0, 0x8
and-int/lit16 p0, p0, 0xff
shl-int/lit8 p0, p0, 0x8
or-int/2addr p0, v0
int-to-short p0, p0
return p0
.end method
.method public static sneakyRethrow(Ljava/lang/Throwable;)V
.locals 0
.line 65
invoke-static {p0}, Lokio/Util;->sneakyThrow2(Ljava/lang/Throwable;)V
return-void
.end method
.method private static sneakyThrow2(Ljava/lang/Throwable;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Throwable;",
">(",
"Ljava/lang/Throwable;",
")V^TT;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/lang/Throwable;
}
.end annotation
.line 70
throw p0
.end method