]> git.proxmox.com Git - rustc.git/blob - src/binaryen/test/torture-s/arith-rand-ll.c.s
New upstream version 1.23.0+dfsg1
[rustc.git] / src / binaryen / test / torture-s / arith-rand-ll.c.s
1 .text
2 .file "arith-rand-ll.c"
3 .section .text.simple_rand,"ax",@progbits
4 .hidden simple_rand # -- Begin function simple_rand
5 .globl simple_rand
6 .type simple_rand,@function
7 simple_rand: # @simple_rand
8 .result i64
9 .local i64
10 # BB#0: # %entry
11 i32.const $push0=, 0
12 i32.const $push9=, 0
13 i64.load $push1=, simple_rand.seed($pop9)
14 i64.const $push2=, 1103515245
15 i64.mul $push3=, $pop1, $pop2
16 i64.const $push4=, 12345
17 i64.add $push8=, $pop3, $pop4
18 tee_local $push7=, $0=, $pop8
19 i64.store simple_rand.seed($pop0), $pop7
20 i64.const $push5=, 8
21 i64.shr_u $push6=, $0, $pop5
22 # fallthrough-return: $pop6
23 .endfunc
24 .Lfunc_end0:
25 .size simple_rand, .Lfunc_end0-simple_rand
26 # -- End function
27 .section .text.random_bitstring,"ax",@progbits
28 .hidden random_bitstring # -- Begin function random_bitstring
29 .globl random_bitstring
30 .type random_bitstring,@function
31 random_bitstring: # @random_bitstring
32 .result i64
33 .local i32, i32, i64, i64, i64
34 # BB#0: # %entry
35 i32.const $push23=, 0
36 i32.const $push22=, 0
37 i64.load $push0=, simple_rand.seed($pop22)
38 i64.const $push21=, 1103515245
39 i64.mul $push1=, $pop0, $pop21
40 i64.const $push20=, 12345
41 i64.add $push19=, $pop1, $pop20
42 tee_local $push18=, $3=, $pop19
43 i64.store simple_rand.seed($pop23), $pop18
44 i64.const $4=, 0
45 block
46 i64.const $push17=, 9
47 i64.shr_u $push16=, $3, $pop17
48 tee_local $push15=, $2=, $pop16
49 i32.wrap/i64 $push2=, $pop15
50 i32.const $push14=, 15
51 i32.and $push13=, $pop2, $pop14
52 tee_local $push12=, $0=, $pop13
53 i32.eqz $push40=, $pop12
54 br_if 0, $pop40 # 0: down to label0
55 # BB#1: # %if.else.preheader
56 copy_local $1=, $0
57 .LBB1_2: # %if.else
58 # =>This Inner Loop Header: Depth=1
59 loop # label1:
60 i64.const $push25=, 15
61 i64.and $push3=, $2, $pop25
62 i64.shl $4=, $4, $pop3
63 block
64 i64.const $push24=, 256
65 i64.and $push4=, $3, $pop24
66 i64.eqz $push5=, $pop4
67 br_if 0, $pop5 # 0: down to label2
68 # BB#3: # %if.then2
69 # in Loop: Header=BB1_2 Depth=1
70 i32.const $push27=, 1
71 i32.shl $push6=, $pop27, $1
72 i32.const $push26=, -1
73 i32.add $push7=, $pop6, $pop26
74 i64.extend_s/i32 $push8=, $pop7
75 i64.or $4=, $4, $pop8
76 .LBB1_4: # %if.end
77 # in Loop: Header=BB1_2 Depth=1
78 end_block # label2:
79 i32.const $push28=, 71
80 i32.ge_u $push9=, $0, $pop28
81 br_if 1, $pop9 # 1: down to label0
82 # BB#5: # %for.cond
83 # in Loop: Header=BB1_2 Depth=1
84 i32.const $push39=, 0
85 i64.const $push38=, 1103515245
86 i64.mul $push10=, $3, $pop38
87 i64.const $push37=, 12345
88 i64.add $push36=, $pop10, $pop37
89 tee_local $push35=, $3=, $pop36
90 i64.store simple_rand.seed($pop39), $pop35
91 i64.const $push34=, 9
92 i64.shr_u $push33=, $3, $pop34
93 tee_local $push32=, $2=, $pop33
94 i32.wrap/i64 $push11=, $pop32
95 i32.const $push31=, 15
96 i32.and $push30=, $pop11, $pop31
97 tee_local $push29=, $1=, $pop30
98 i32.add $0=, $pop29, $0
99 br_if 0, $1 # 0: up to label1
100 .LBB1_6: # %cleanup
101 end_loop
102 end_block # label0:
103 copy_local $push41=, $4
104 # fallthrough-return: $pop41
105 .endfunc
106 .Lfunc_end1:
107 .size random_bitstring, .Lfunc_end1-random_bitstring
108 # -- End function
109 .section .text.main,"ax",@progbits
110 .hidden main # -- Begin function main
111 .globl main
112 .type main,@function
113 main: # @main
114 .result i32
115 .local i64, i64, i64, i32, i32, i32, i32, i32, i32, i32, i64, i64
116 # BB#0: # %entry
117 i32.const $push80=, 0
118 i64.load $2=, simple_rand.seed($pop80)
119 i64.const $1=, 0
120 .LBB2_1: # %for.body
121 # =>This Loop Header: Depth=1
122 # Child Loop BB2_3 Depth 2
123 # Child Loop BB2_10 Depth 2
124 block
125 block
126 block
127 block
128 loop # label7:
129 copy_local $0=, $1
130 block
131 block
132 i64.const $push90=, 1103515245
133 i64.mul $push0=, $2, $pop90
134 i64.const $push89=, 12345
135 i64.add $push88=, $pop0, $pop89
136 tee_local $push87=, $1=, $pop88
137 i64.const $push86=, 9
138 i64.shr_u $push85=, $pop87, $pop86
139 tee_local $push84=, $2=, $pop85
140 i32.wrap/i64 $push1=, $pop84
141 i32.const $push83=, 15
142 i32.and $push82=, $pop1, $pop83
143 tee_local $push81=, $8=, $pop82
144 i32.eqz $push208=, $pop81
145 br_if 0, $pop208 # 0: down to label9
146 # BB#2: # %if.else.i.preheader
147 # in Loop: Header=BB2_1 Depth=1
148 i64.const $10=, 0
149 copy_local $9=, $8
150 .LBB2_3: # %if.else.i
151 # Parent Loop BB2_1 Depth=1
152 # => This Inner Loop Header: Depth=2
153 loop # label10:
154 i64.const $push92=, 15
155 i64.and $push2=, $2, $pop92
156 i64.shl $10=, $10, $pop2
157 block
158 i64.const $push91=, 256
159 i64.and $push3=, $1, $pop91
160 i64.eqz $push4=, $pop3
161 br_if 0, $pop4 # 0: down to label11
162 # BB#4: # %if.then2.i
163 # in Loop: Header=BB2_3 Depth=2
164 i32.const $push94=, 1
165 i32.shl $push5=, $pop94, $9
166 i32.const $push93=, -1
167 i32.add $push6=, $pop5, $pop93
168 i64.extend_s/i32 $push7=, $pop6
169 i64.or $10=, $10, $pop7
170 .LBB2_5: # %if.end.i
171 # in Loop: Header=BB2_3 Depth=2
172 end_block # label11:
173 i32.const $push95=, 71
174 i32.ge_u $push8=, $8, $pop95
175 br_if 2, $pop8 # 2: down to label8
176 # BB#6: # %for.cond.i
177 # in Loop: Header=BB2_3 Depth=2
178 i64.const $push105=, 1103515245
179 i64.mul $push9=, $1, $pop105
180 i64.const $push104=, 12345
181 i64.add $push103=, $pop9, $pop104
182 tee_local $push102=, $1=, $pop103
183 i64.const $push101=, 9
184 i64.shr_u $push100=, $pop102, $pop101
185 tee_local $push99=, $2=, $pop100
186 i32.wrap/i64 $push10=, $pop99
187 i32.const $push98=, 15
188 i32.and $push97=, $pop10, $pop98
189 tee_local $push96=, $9=, $pop97
190 i32.add $8=, $pop96, $8
191 br_if 0, $9 # 0: up to label10
192 br 2 # 2: down to label8
193 .LBB2_7: # in Loop: Header=BB2_1 Depth=1
194 end_loop
195 end_block # label9:
196 i64.const $10=, 0
197 .LBB2_8: # %random_bitstring.exit
198 # in Loop: Header=BB2_1 Depth=1
199 end_block # label8:
200 block
201 i64.const $push115=, 1103515245
202 i64.mul $push11=, $1, $pop115
203 i64.const $push114=, 12345
204 i64.add $push113=, $pop11, $pop114
205 tee_local $push112=, $2=, $pop113
206 i64.const $push111=, 9
207 i64.shr_u $push110=, $pop112, $pop111
208 tee_local $push109=, $11=, $pop110
209 i32.wrap/i64 $push12=, $pop109
210 i32.const $push108=, 15
211 i32.and $push107=, $pop12, $pop108
212 tee_local $push106=, $8=, $pop107
213 i32.eqz $push209=, $pop106
214 br_if 0, $pop209 # 0: down to label12
215 # BB#9: # %if.else.i459.preheader
216 # in Loop: Header=BB2_1 Depth=1
217 i64.const $1=, 0
218 copy_local $9=, $8
219 .LBB2_10: # %if.else.i459
220 # Parent Loop BB2_1 Depth=1
221 # => This Inner Loop Header: Depth=2
222 loop # label13:
223 i64.const $push117=, 15
224 i64.and $push13=, $11, $pop117
225 i64.shl $1=, $1, $pop13
226 block
227 i64.const $push116=, 256
228 i64.and $push14=, $2, $pop116
229 i64.eqz $push15=, $pop14
230 br_if 0, $pop15 # 0: down to label14
231 # BB#11: # %if.then2.i464
232 # in Loop: Header=BB2_10 Depth=2
233 i32.const $push119=, 1
234 i32.shl $push16=, $pop119, $9
235 i32.const $push118=, -1
236 i32.add $push17=, $pop16, $pop118
237 i64.extend_s/i32 $push18=, $pop17
238 i64.or $1=, $1, $pop18
239 .LBB2_12: # %if.end.i467
240 # in Loop: Header=BB2_10 Depth=2
241 end_block # label14:
242 block
243 i32.const $push120=, 71
244 i32.ge_u $push19=, $8, $pop120
245 br_if 0, $pop19 # 0: down to label15
246 # BB#13: # %for.cond.i451
247 # in Loop: Header=BB2_10 Depth=2
248 i64.const $push130=, 1103515245
249 i64.mul $push20=, $2, $pop130
250 i64.const $push129=, 12345
251 i64.add $push128=, $pop20, $pop129
252 tee_local $push127=, $2=, $pop128
253 i64.const $push126=, 9
254 i64.shr_u $push125=, $pop127, $pop126
255 tee_local $push124=, $11=, $pop125
256 i32.wrap/i64 $push21=, $pop124
257 i32.const $push123=, 15
258 i32.and $push122=, $pop21, $pop123
259 tee_local $push121=, $9=, $pop122
260 i32.add $8=, $pop121, $8
261 br_if 1, $9 # 1: up to label13
262 .LBB2_14: # %random_bitstring.exit469
263 # in Loop: Header=BB2_1 Depth=1
264 end_block # label15:
265 end_loop
266 i64.eqz $push22=, $1
267 br_if 0, $pop22 # 0: down to label12
268 # BB#15: # %cleanup.cont
269 # in Loop: Header=BB2_1 Depth=1
270 block
271 i64.const $push132=, 9223372036854775807
272 i64.and $push23=, $10, $pop132
273 i64.const $push131=, 0
274 i64.ne $push24=, $pop23, $pop131
275 br_if 0, $pop24 # 0: down to label16
276 # BB#16: # %cleanup.cont
277 # in Loop: Header=BB2_1 Depth=1
278 i64.const $push133=, -1
279 i64.eq $push25=, $1, $pop133
280 br_if 1, $pop25 # 1: down to label12
281 .LBB2_17: # %if.end17
282 # in Loop: Header=BB2_1 Depth=1
283 end_block # label16:
284 i64.rem_s $push141=, $10, $1
285 tee_local $push140=, $11=, $pop141
286 i64.const $push139=, 63
287 i64.shr_s $push138=, $11, $pop139
288 tee_local $push137=, $11=, $pop138
289 i64.add $push28=, $pop140, $pop137
290 i64.xor $push29=, $pop28, $11
291 i64.const $push136=, 63
292 i64.shr_s $push135=, $1, $pop136
293 tee_local $push134=, $11=, $pop135
294 i64.add $push26=, $1, $pop134
295 i64.xor $push27=, $pop26, $11
296 i64.ge_u $push30=, $pop29, $pop27
297 br_if 2, $pop30 # 2: down to label6
298 # BB#18: # %save_time
299 # in Loop: Header=BB2_1 Depth=1
300 i32.wrap/i64 $push143=, $1
301 tee_local $push142=, $8=, $pop143
302 i32.eqz $push210=, $pop142
303 br_if 0, $pop210 # 0: down to label12
304 # BB#19: # %cleanup.cont65
305 # in Loop: Header=BB2_1 Depth=1
306 block
307 i32.wrap/i64 $push146=, $10
308 tee_local $push145=, $9=, $pop146
309 i32.const $push144=, 2147483647
310 i32.and $push32=, $pop145, $pop144
311 br_if 0, $pop32 # 0: down to label17
312 # BB#20: # %cleanup.cont65
313 # in Loop: Header=BB2_1 Depth=1
314 i32.const $push147=, -1
315 i32.eq $push33=, $8, $pop147
316 br_if 1, $pop33 # 1: down to label12
317 .LBB2_21: # %if.end79
318 # in Loop: Header=BB2_1 Depth=1
319 end_block # label17:
320 i32.rem_s $push155=, $9, $8
321 tee_local $push154=, $3=, $pop155
322 i32.const $push153=, 31
323 i32.shr_s $push152=, $3, $pop153
324 tee_local $push151=, $5=, $pop152
325 i32.add $push36=, $pop154, $pop151
326 i32.xor $push37=, $pop36, $5
327 i32.const $push150=, 31
328 i32.shr_s $push149=, $8, $pop150
329 tee_local $push148=, $5=, $pop149
330 i32.add $push34=, $8, $pop148
331 i32.xor $push35=, $pop34, $5
332 i32.ge_u $push38=, $pop37, $pop35
333 br_if 3, $pop38 # 3: down to label5
334 # BB#22: # %lor.lhs.false103
335 # in Loop: Header=BB2_1 Depth=1
336 block
337 i32.eqz $push211=, $3
338 br_if 0, $pop211 # 0: down to label18
339 # BB#23: # %lor.lhs.false103
340 # in Loop: Header=BB2_1 Depth=1
341 i32.xor $push39=, $3, $9
342 i32.const $push156=, -1
343 i32.le_s $push40=, $pop39, $pop156
344 br_if 4, $pop40 # 4: down to label5
345 .LBB2_24: # %cleanup.cont118
346 # in Loop: Header=BB2_1 Depth=1
347 end_block # label18:
348 i32.const $push157=, 65535
349 i32.and $push41=, $8, $pop157
350 i32.eqz $push212=, $pop41
351 br_if 0, $pop212 # 0: down to label12
352 # BB#25: # %cleanup.cont158
353 # in Loop: Header=BB2_1 Depth=1
354 i32.const $push178=, 16
355 i32.shl $push42=, $9, $pop178
356 i32.const $push177=, 16
357 i32.shr_s $push176=, $pop42, $pop177
358 tee_local $push175=, $5=, $pop176
359 i32.const $push174=, 16
360 i32.shl $push173=, $8, $pop174
361 tee_local $push172=, $6=, $pop173
362 i32.const $push171=, 16
363 i32.shr_s $push170=, $pop172, $pop171
364 tee_local $push169=, $3=, $pop170
365 i32.rem_s $push43=, $pop175, $pop169
366 i32.const $push168=, 16
367 i32.shl $push167=, $pop43, $pop168
368 tee_local $push166=, $7=, $pop167
369 i32.const $push165=, 16
370 i32.shr_s $push164=, $pop166, $pop165
371 tee_local $push163=, $4=, $pop164
372 i32.const $push162=, 0
373 i32.sub $push45=, $pop162, $4
374 i32.const $push161=, -65536
375 i32.gt_s $push44=, $7, $pop161
376 i32.select $push46=, $pop163, $pop45, $pop44
377 i32.const $push160=, 0
378 i32.sub $push48=, $pop160, $3
379 i32.const $push159=, -65536
380 i32.gt_s $push47=, $6, $pop159
381 i32.select $push49=, $3, $pop48, $pop47
382 i32.const $push158=, 65535
383 i32.and $push50=, $pop49, $pop158
384 i32.ge_s $push51=, $pop46, $pop50
385 br_if 4, $pop51 # 4: down to label4
386 # BB#26: # %lor.lhs.false197
387 # in Loop: Header=BB2_1 Depth=1
388 i32.div_s $push52=, $5, $3
389 i32.mul $push53=, $pop52, $3
390 i32.add $push54=, $pop53, $4
391 i32.const $push180=, 16
392 i32.shl $push55=, $pop54, $pop180
393 i32.const $push179=, 16
394 i32.shr_s $push56=, $pop55, $pop179
395 i32.ne $push57=, $pop56, $5
396 br_if 4, $pop57 # 4: down to label4
397 # BB#27: # %if.end209
398 # in Loop: Header=BB2_1 Depth=1
399 i32.const $push181=, 255
400 i32.and $push59=, $8, $pop181
401 i32.eqz $push213=, $pop59
402 br_if 0, $pop213 # 0: down to label12
403 # BB#28: # %cleanup.cont249
404 # in Loop: Header=BB2_1 Depth=1
405 i32.const $push202=, 24
406 i32.shl $push60=, $9, $pop202
407 i32.const $push201=, 24
408 i32.shr_s $push200=, $pop60, $pop201
409 tee_local $push199=, $9=, $pop200
410 i32.const $push198=, 24
411 i32.shl $push197=, $8, $pop198
412 tee_local $push196=, $5=, $pop197
413 i32.const $push195=, 24
414 i32.shr_s $push194=, $pop196, $pop195
415 tee_local $push193=, $8=, $pop194
416 i32.rem_s $push61=, $pop199, $pop193
417 i32.const $push192=, 24
418 i32.shl $push191=, $pop61, $pop192
419 tee_local $push190=, $4=, $pop191
420 i32.const $push189=, 24
421 i32.shr_s $push188=, $pop190, $pop189
422 tee_local $push187=, $3=, $pop188
423 i32.const $push186=, 0
424 i32.sub $push63=, $pop186, $3
425 i32.const $push185=, -16777216
426 i32.gt_s $push62=, $4, $pop185
427 i32.select $push64=, $pop187, $pop63, $pop62
428 i32.const $push184=, 0
429 i32.sub $push66=, $pop184, $8
430 i32.const $push183=, -16777216
431 i32.gt_s $push65=, $5, $pop183
432 i32.select $push67=, $8, $pop66, $pop65
433 i32.const $push182=, 255
434 i32.and $push68=, $pop67, $pop182
435 i32.ge_s $push69=, $pop64, $pop68
436 br_if 5, $pop69 # 5: down to label3
437 # BB#29: # %lor.lhs.false288
438 # in Loop: Header=BB2_1 Depth=1
439 i32.div_s $push70=, $9, $8
440 i32.mul $push71=, $pop70, $8
441 i32.add $push72=, $pop71, $3
442 i32.const $push204=, 24
443 i32.shl $push73=, $pop72, $pop204
444 i32.const $push203=, 24
445 i32.shr_s $push74=, $pop73, $pop203
446 i32.ne $push75=, $pop74, $9
447 br_if 5, $pop75 # 5: down to label3
448 .LBB2_30: # %cleanup301
449 # in Loop: Header=BB2_1 Depth=1
450 end_block # label12:
451 i64.const $push206=, 1
452 i64.add $1=, $0, $pop206
453 i64.const $push205=, 9999
454 i64.lt_u $push78=, $0, $pop205
455 br_if 0, $pop78 # 0: up to label7
456 # BB#31: # %for.end
457 end_loop
458 i32.const $push79=, 0
459 i64.store simple_rand.seed($pop79), $2
460 i32.const $push207=, 0
461 call exit@FUNCTION, $pop207
462 unreachable
463 .LBB2_32: # %if.then32
464 end_block # label6:
465 i32.const $push31=, 0
466 i64.store simple_rand.seed($pop31), $2
467 call abort@FUNCTION
468 unreachable
469 .LBB2_33: # %if.then111
470 end_block # label5:
471 i32.const $push77=, 0
472 i64.store simple_rand.seed($pop77), $2
473 call abort@FUNCTION
474 unreachable
475 .LBB2_34: # %if.then208
476 end_block # label4:
477 i32.const $push58=, 0
478 i64.store simple_rand.seed($pop58), $2
479 call abort@FUNCTION
480 unreachable
481 .LBB2_35: # %if.then299
482 end_block # label3:
483 i32.const $push76=, 0
484 i64.store simple_rand.seed($pop76), $2
485 call abort@FUNCTION
486 unreachable
487 .endfunc
488 .Lfunc_end2:
489 .size main, .Lfunc_end2-main
490 # -- End function
491 .type simple_rand.seed,@object # @simple_rand.seed
492 .section .data.simple_rand.seed,"aw",@progbits
493 .p2align 3
494 simple_rand.seed:
495 .int64 47114711 # 0x2cee9d7
496 .size simple_rand.seed, 8
497
498
499 .ident "clang version 6.0.0 (https://llvm.googlesource.com/clang.git a1774cccdccfa673c057f93ccf23bc2d8cb04932) (https://llvm.googlesource.com/llvm.git fc50e1c6121255333bc42d6faf2b524c074eae25)"
500 .functype abort, void
501 .functype exit, void, i32