]> git.proxmox.com Git - rustc.git/blob - src/binaryen/test/torture-s/920501-2.c.s
New upstream version 1.23.0+dfsg1
[rustc.git] / src / binaryen / test / torture-s / 920501-2.c.s
1 .text
2 .file "920501-2.c"
3 .section .text.gcd_ll,"ax",@progbits
4 .hidden gcd_ll # -- Begin function gcd_ll
5 .globl gcd_ll
6 .type gcd_ll,@function
7 gcd_ll: # @gcd_ll
8 .param i64, i64
9 .result i32
10 # BB#0: # %entry
11 block
12 block
13 i64.eqz $push0=, $1
14 br_if 0, $pop0 # 0: down to label1
15 # BB#1: # %if.end.preheader
16 .LBB0_2: # %if.end
17 # =>This Inner Loop Header: Depth=1
18 loop # label2:
19 i64.rem_u $push7=, $0, $1
20 tee_local $push6=, $0=, $pop7
21 i64.eqz $push1=, $pop6
22 br_if 2, $pop1 # 2: down to label0
23 # BB#3: # %if.end5
24 # in Loop: Header=BB0_2 Depth=1
25 i64.rem_u $push10=, $1, $0
26 tee_local $push9=, $1=, $pop10
27 i64.const $push8=, 0
28 i64.ne $push2=, $pop9, $pop8
29 br_if 0, $pop2 # 0: up to label2
30 .LBB0_4: # %return
31 end_loop
32 end_block # label1:
33 i32.wrap/i64 $push4=, $0
34 return $pop4
35 .LBB0_5:
36 end_block # label0:
37 copy_local $push5=, $1
38 i32.wrap/i64 $push3=, $pop5
39 # fallthrough-return: $pop3
40 .endfunc
41 .Lfunc_end0:
42 .size gcd_ll, .Lfunc_end0-gcd_ll
43 # -- End function
44 .section .text.powmod_ll,"ax",@progbits
45 .hidden powmod_ll # -- Begin function powmod_ll
46 .globl powmod_ll
47 .type powmod_ll,@function
48 powmod_ll: # @powmod_ll
49 .param i64, i32, i64
50 .result i64
51 .local i32, i32, i64
52 # BB#0: # %entry
53 block
54 block
55 i32.eqz $push22=, $1
56 br_if 0, $pop22 # 0: down to label4
57 # BB#1: # %for.body.preheader
58 i32.const $3=, 0
59 copy_local $4=, $1
60 .LBB1_2: # %for.body
61 # =>This Inner Loop Header: Depth=1
62 loop # label5:
63 i32.const $push13=, 1
64 i32.add $3=, $3, $pop13
65 i32.const $push12=, 1
66 i32.shr_u $push11=, $4, $pop12
67 tee_local $push10=, $4=, $pop11
68 br_if 0, $pop10 # 0: up to label5
69 # BB#3: # %for.end
70 end_loop
71 i32.const $push15=, -1
72 i32.add $push0=, $3, $pop15
73 i32.const $push14=, 1
74 i32.lt_s $push1=, $pop0, $pop14
75 br_if 1, $pop1 # 1: down to label3
76 # BB#4: # %for.body4.preheader
77 copy_local $5=, $0
78 .LBB1_5: # %for.body4
79 # =>This Inner Loop Header: Depth=1
80 loop # label6:
81 i64.mul $push2=, $5, $5
82 i64.rem_u $5=, $pop2, $2
83 block
84 i32.const $push17=, 1
85 i32.const $push16=, -2
86 i32.add $push3=, $3, $pop16
87 i32.shl $push4=, $pop17, $pop3
88 i32.and $push5=, $pop4, $1
89 i32.eqz $push23=, $pop5
90 br_if 0, $pop23 # 0: down to label7
91 # BB#6: # %if.then5
92 # in Loop: Header=BB1_5 Depth=1
93 i64.mul $push6=, $5, $0
94 i64.rem_u $5=, $pop6, $2
95 .LBB1_7: # %for.inc9
96 # in Loop: Header=BB1_5 Depth=1
97 end_block # label7:
98 i32.const $push21=, -1
99 i32.add $push20=, $3, $pop21
100 tee_local $push19=, $3=, $pop20
101 i32.const $push18=, 1
102 i32.gt_s $push7=, $pop19, $pop18
103 br_if 0, $pop7 # 0: up to label6
104 # BB#8: # %cleanup
105 end_loop
106 return $5
107 .LBB1_9:
108 end_block # label4:
109 i64.const $push9=, 1
110 return $pop9
111 .LBB1_10:
112 end_block # label3:
113 copy_local $push8=, $0
114 # fallthrough-return: $pop8
115 .endfunc
116 .Lfunc_end1:
117 .size powmod_ll, .Lfunc_end1-powmod_ll
118 # -- End function
119 .section .text.facts,"ax",@progbits
120 .hidden facts # -- Begin function facts
121 .globl facts
122 .type facts,@function
123 facts: # @facts
124 .param i64, i32, i32, i32
125 .local i64, i64, i32, i64, i64, i64, i32, i32, i64, i64, i64, i32, i32, i32
126 # BB#0: # %entry
127 i64.extend_s/i32 $push40=, $1
128 tee_local $push39=, $4=, $pop40
129 i64.const $push38=, 1
130 i64.add $5=, $pop39, $pop38
131 i32.const $15=, factab
132 i32.const $17=, 0
133 i32.const $16=, 1
134 i32.const $1=, 1
135 i64.const $8=, 1
136 i64.extend_s/i32 $push37=, $2
137 tee_local $push36=, $9=, $pop37
138 copy_local $13=, $pop36
139 .LBB2_1: # %for.body
140 # =>This Loop Header: Depth=1
141 # Child Loop BB2_3 Depth 2
142 # Child Loop BB2_6 Depth 2
143 # Child Loop BB2_11 Depth 2
144 # Child Loop BB2_14 Depth 2
145 # Child Loop BB2_19 Depth 2
146 # Child Loop BB2_22 Depth 2
147 # Child Loop BB2_29 Depth 2
148 loop # label8:
149 copy_local $7=, $13
150 copy_local $6=, $1
151 copy_local $13=, $5
152 i64.const $14=, 1
153 block
154 i32.eqz $push104=, $3
155 br_if 0, $pop104 # 0: down to label9
156 # BB#2: # %for.body.i.preheader
157 # in Loop: Header=BB2_1 Depth=1
158 i32.const $2=, -1
159 i32.const $10=, 1
160 copy_local $11=, $3
161 .LBB2_3: # %for.body.i
162 # Parent Loop BB2_1 Depth=1
163 # => This Inner Loop Header: Depth=2
164 loop # label10:
165 copy_local $push47=, $10
166 tee_local $push46=, $1=, $pop47
167 i32.const $push45=, 1
168 i32.add $10=, $pop46, $pop45
169 i32.const $push44=, 1
170 i32.add $2=, $2, $pop44
171 i32.const $push43=, 1
172 i32.shr_u $push42=, $11, $pop43
173 tee_local $push41=, $11=, $pop42
174 br_if 0, $pop41 # 0: up to label10
175 # BB#4: # %for.end.i
176 # in Loop: Header=BB2_1 Depth=1
177 end_loop
178 block
179 block
180 i32.const $push48=, 1
181 i32.lt_s $push0=, $2, $pop48
182 br_if 0, $pop0 # 0: down to label12
183 # BB#5: # %for.body4.i.preheader
184 # in Loop: Header=BB2_1 Depth=1
185 copy_local $12=, $7
186 .LBB2_6: # %for.body4.i
187 # Parent Loop BB2_1 Depth=1
188 # => This Inner Loop Header: Depth=2
189 loop # label13:
190 i64.mul $push1=, $12, $12
191 i64.rem_u $12=, $pop1, $0
192 block
193 i32.const $push50=, 1
194 i32.const $push49=, -2
195 i32.add $push2=, $1, $pop49
196 i32.shl $push3=, $pop50, $pop2
197 i32.and $push4=, $pop3, $3
198 i32.eqz $push105=, $pop4
199 br_if 0, $pop105 # 0: down to label14
200 # BB#7: # %if.then5.i
201 # in Loop: Header=BB2_6 Depth=2
202 i64.mul $push5=, $12, $7
203 i64.rem_u $12=, $pop5, $0
204 .LBB2_8: # %for.inc9.i
205 # in Loop: Header=BB2_6 Depth=2
206 end_block # label14:
207 i32.const $push54=, -1
208 i32.add $push53=, $1, $pop54
209 tee_local $push52=, $1=, $pop53
210 i32.const $push51=, 1
211 i32.gt_s $push6=, $pop52, $pop51
212 br_if 0, $pop6 # 0: up to label13
213 br 2 # 2: down to label11
214 .LBB2_9: # in Loop: Header=BB2_1 Depth=1
215 end_loop
216 end_block # label12:
217 copy_local $12=, $7
218 .LBB2_10: # %for.body.lr.ph.i110
219 # in Loop: Header=BB2_1 Depth=1
220 end_block # label11:
221 i64.add $13=, $12, $4
222 i32.const $2=, -1
223 i32.const $10=, 1
224 copy_local $11=, $3
225 .LBB2_11: # %for.body.i116
226 # Parent Loop BB2_1 Depth=1
227 # => This Inner Loop Header: Depth=2
228 loop # label15:
229 copy_local $push61=, $10
230 tee_local $push60=, $1=, $pop61
231 i32.const $push59=, 1
232 i32.add $10=, $pop60, $pop59
233 i32.const $push58=, 1
234 i32.add $2=, $2, $pop58
235 i32.const $push57=, 1
236 i32.shr_u $push56=, $11, $pop57
237 tee_local $push55=, $11=, $pop56
238 br_if 0, $pop55 # 0: up to label15
239 # BB#12: # %for.end.i118
240 # in Loop: Header=BB2_1 Depth=1
241 end_loop
242 block
243 block
244 i32.const $push62=, 1
245 i32.lt_s $push7=, $2, $pop62
246 br_if 0, $pop7 # 0: down to label17
247 # BB#13: # %for.body4.i128.preheader
248 # in Loop: Header=BB2_1 Depth=1
249 copy_local $12=, $9
250 .LBB2_14: # %for.body4.i128
251 # Parent Loop BB2_1 Depth=1
252 # => This Inner Loop Header: Depth=2
253 loop # label18:
254 i64.mul $push8=, $12, $12
255 i64.rem_u $12=, $pop8, $0
256 block
257 i32.const $push64=, 1
258 i32.const $push63=, -2
259 i32.add $push9=, $1, $pop63
260 i32.shl $push10=, $pop64, $pop9
261 i32.and $push11=, $pop10, $3
262 i32.eqz $push106=, $pop11
263 br_if 0, $pop106 # 0: down to label19
264 # BB#15: # %if.then5.i131
265 # in Loop: Header=BB2_14 Depth=2
266 i64.mul $push12=, $12, $9
267 i64.rem_u $12=, $pop12, $0
268 .LBB2_16: # %for.inc9.i134
269 # in Loop: Header=BB2_14 Depth=2
270 end_block # label19:
271 i32.const $push68=, -1
272 i32.add $push67=, $1, $pop68
273 tee_local $push66=, $1=, $pop67
274 i32.const $push65=, 1
275 i32.gt_s $push13=, $pop66, $pop65
276 br_if 0, $pop13 # 0: up to label18
277 br 2 # 2: down to label16
278 .LBB2_17: # in Loop: Header=BB2_1 Depth=1
279 end_loop
280 end_block # label17:
281 copy_local $12=, $9
282 .LBB2_18: # %for.body.lr.ph.i82
283 # in Loop: Header=BB2_1 Depth=1
284 end_block # label16:
285 i64.add $14=, $12, $4
286 i32.const $2=, -1
287 i32.const $10=, 1
288 copy_local $11=, $3
289 .LBB2_19: # %for.body.i88
290 # Parent Loop BB2_1 Depth=1
291 # => This Inner Loop Header: Depth=2
292 loop # label20:
293 copy_local $push75=, $10
294 tee_local $push74=, $1=, $pop75
295 i32.const $push73=, 1
296 i32.add $10=, $pop74, $pop73
297 i32.const $push72=, 1
298 i32.add $2=, $2, $pop72
299 i32.const $push71=, 1
300 i32.shr_u $push70=, $11, $pop71
301 tee_local $push69=, $11=, $pop70
302 br_if 0, $pop69 # 0: up to label20
303 # BB#20: # %for.end.i90
304 # in Loop: Header=BB2_1 Depth=1
305 end_loop
306 i32.const $push76=, 1
307 i32.lt_s $push14=, $2, $pop76
308 br_if 0, $pop14 # 0: down to label9
309 # BB#21: # %for.body4.i100.preheader
310 # in Loop: Header=BB2_1 Depth=1
311 copy_local $12=, $14
312 .LBB2_22: # %for.body4.i100
313 # Parent Loop BB2_1 Depth=1
314 # => This Inner Loop Header: Depth=2
315 loop # label21:
316 i64.mul $push15=, $12, $12
317 i64.rem_u $12=, $pop15, $0
318 block
319 i32.const $push78=, 1
320 i32.const $push77=, -2
321 i32.add $push16=, $1, $pop77
322 i32.shl $push17=, $pop78, $pop16
323 i32.and $push18=, $pop17, $3
324 i32.eqz $push107=, $pop18
325 br_if 0, $pop107 # 0: down to label22
326 # BB#23: # %if.then5.i103
327 # in Loop: Header=BB2_22 Depth=2
328 i64.mul $push19=, $12, $14
329 i64.rem_u $12=, $pop19, $0
330 .LBB2_24: # %for.inc9.i106
331 # in Loop: Header=BB2_22 Depth=2
332 end_block # label22:
333 i32.const $push82=, -1
334 i32.add $push81=, $1, $pop82
335 tee_local $push80=, $1=, $pop81
336 i32.const $push79=, 1
337 i32.gt_s $push20=, $pop80, $pop79
338 br_if 0, $pop20 # 0: up to label21
339 # BB#25: # in Loop: Header=BB2_1 Depth=1
340 end_loop
341 copy_local $14=, $12
342 .LBB2_26: # %powmod_ll.exit108
343 # in Loop: Header=BB2_1 Depth=1
344 end_block # label9:
345 block
346 i64.add $push86=, $14, $4
347 tee_local $push85=, $9=, $pop86
348 i64.sub $push23=, $13, $pop85
349 i64.sub $push22=, $9, $13
350 i64.gt_u $push21=, $13, $9
351 i64.select $push24=, $pop23, $pop22, $pop21
352 i64.const $push84=, 4294967295
353 i64.and $push25=, $pop24, $pop84
354 i64.const $push83=, 4294967295
355 i64.and $push26=, $8, $pop83
356 i64.mul $push27=, $pop25, $pop26
357 i64.rem_u $8=, $pop27, $0
358 block
359 i32.ne $push28=, $6, $16
360 br_if 0, $pop28 # 0: down to label24
361 # BB#27: # %if.then18
362 # in Loop: Header=BB2_1 Depth=1
363 i64.const $push88=, 4294967295
364 i64.and $12=, $8, $pop88
365 i32.const $push87=, 1
366 i32.add $17=, $17, $pop87
367 block
368 i64.eqz $push29=, $0
369 br_if 0, $pop29 # 0: down to label25
370 # BB#28: # %if.end.i.preheader
371 # in Loop: Header=BB2_1 Depth=1
372 copy_local $14=, $0
373 .LBB2_29: # %if.end.i
374 # Parent Loop BB2_1 Depth=1
375 # => This Inner Loop Header: Depth=2
376 block
377 loop # label27:
378 i64.rem_u $push90=, $12, $14
379 tee_local $push89=, $12=, $pop90
380 i64.eqz $push30=, $pop89
381 br_if 1, $pop30 # 1: down to label26
382 # BB#30: # %if.end5.i
383 # in Loop: Header=BB2_29 Depth=2
384 i64.rem_u $push93=, $14, $12
385 tee_local $push92=, $14=, $pop93
386 i64.const $push91=, 0
387 i64.ne $push31=, $pop92, $pop91
388 br_if 0, $pop31 # 0: up to label27
389 br 2 # 2: down to label25
390 .LBB2_31: # in Loop: Header=BB2_1 Depth=1
391 end_loop
392 end_block # label26:
393 copy_local $12=, $14
394 .LBB2_32: # %gcd_ll.exit
395 # in Loop: Header=BB2_1 Depth=1
396 end_block # label25:
397 i32.add $16=, $17, $16
398 i32.wrap/i64 $push96=, $12
399 tee_local $push95=, $1=, $pop96
400 i32.const $push94=, 1
401 i32.eq $push32=, $pop95, $pop94
402 br_if 0, $pop32 # 0: down to label24
403 # BB#33: # %if.then25
404 # in Loop: Header=BB2_1 Depth=1
405 i32.store 0($15), $1
406 i64.const $push100=, 4294967295
407 i64.and $push33=, $12, $pop100
408 i64.div_u $push99=, $0, $pop33
409 tee_local $push98=, $0=, $pop99
410 i64.const $push97=, 1
411 i64.eq $push34=, $pop98, $pop97
412 br_if 1, $pop34 # 1: down to label23
413 # BB#34: # in Loop: Header=BB2_1 Depth=1
414 i32.const $push101=, 4
415 i32.add $15=, $15, $pop101
416 .LBB2_35: # %for.inc
417 # in Loop: Header=BB2_1 Depth=1
418 end_block # label24:
419 i32.const $push103=, 1
420 i32.add $1=, $6, $pop103
421 i32.const $push102=, 9999
422 i32.lt_u $push35=, $6, $pop102
423 br_if 1, $pop35 # 1: up to label8
424 .LBB2_36: # %cleanup
425 end_block # label23:
426 end_loop
427 # fallthrough-return
428 .endfunc
429 .Lfunc_end2:
430 .size facts, .Lfunc_end2-facts
431 # -- End function
432 .section .text.main,"ax",@progbits
433 .hidden main # -- Begin function main
434 .globl main
435 .type main,@function
436 main: # @main
437 .result i32
438 # BB#0: # %entry
439 i64.const $push5=, 134217727
440 i32.const $push4=, -1
441 i32.const $push3=, 3
442 i32.const $push2=, 27
443 call facts@FUNCTION, $pop5, $pop4, $pop3, $pop2
444 block
445 i32.const $push14=, 0
446 i32.load $push6=, factab($pop14)
447 i32.const $push7=, 7
448 i32.ne $push8=, $pop6, $pop7
449 br_if 0, $pop8 # 0: down to label28
450 # BB#1: # %entry
451 i32.const $push15=, 0
452 i32.load $push0=, factab+4($pop15)
453 i32.const $push9=, 73
454 i32.ne $push10=, $pop0, $pop9
455 br_if 0, $pop10 # 0: down to label28
456 # BB#2: # %entry
457 i32.const $push16=, 0
458 i32.load $push1=, factab+8($pop16)
459 i32.const $push11=, 262657
460 i32.ne $push12=, $pop1, $pop11
461 br_if 0, $pop12 # 0: down to label28
462 # BB#3: # %if.end
463 i32.const $push13=, 0
464 call exit@FUNCTION, $pop13
465 unreachable
466 .LBB3_4: # %if.then
467 end_block # label28:
468 call abort@FUNCTION
469 unreachable
470 .endfunc
471 .Lfunc_end3:
472 .size main, .Lfunc_end3-main
473 # -- End function
474 .hidden factab # @factab
475 .type factab,@object
476 .section .bss.factab,"aw",@nobits
477 .globl factab
478 .p2align 4
479 factab:
480 .skip 40
481 .size factab, 40
482
483
484 .ident "clang version 6.0.0 (https://llvm.googlesource.com/clang.git a1774cccdccfa673c057f93ccf23bc2d8cb04932) (https://llvm.googlesource.com/llvm.git fc50e1c6121255333bc42d6faf2b524c074eae25)"
485 .functype abort, void
486 .functype exit, void, i32