Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / X86 / cfi-instrs-reordered.s
blob8b2fe512f392ca7558709fe8cf16dfc075092857
1 # Check that llvm-bolt is able to read a file with DWARF Exception CFI
2 # information and fix CFI information after reordering.
4 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o
5 # RUN: llvm-strip --strip-unneeded %t.o
6 # RUN: %clangxx %cflags %t.o -o %t.exe
7 # RUN: llvm-bolt %t.exe -o %t --reorder-blocks=cache --print-after-lowering \
8 # RUN: --print-only=_Z10SolveCubicddddPiPd 2>&1 | FileCheck %s
10 # Entry BB
11 # CHECK: divsd %xmm0, %xmm1
12 # CHECK: pushq %rbx
13 # CHECK: !CFI $0 ; OpDefCfaOffset
14 # CHECK: !CFI $1 ; OpOffset
15 # CHECK: movq %rsi, %rbx
16 # CHECK: subq $0x70, %rsp
17 # CHECK: !CFI $2 ; OpDefCfaOffset
18 # CHECK: divsd %xmm0, %xmm2
19 # Duplicated tail
20 # CHECK: addq $0x70, %rsp
21 # CHECK: !CFI $3 ; OpDefCfaOffset
22 # CHECK: popq %rbx
23 # CHECK: !CFI $4 ; OpDefCfaOffset
24 # CHECK: retq
25 # CHECK: !CFI {{.*}} ; OpDefCfa
26 # Epilogue rescheduled to the middle of the function
27 # CHECK: addq $0x70, %rsp
28 # CHECK: !CFI $6 ; OpDefCfaOffset
29 # CHECK: popq %rbx
30 # CHECK: !CFI $7 ; OpDefCfaOffset
31 # CHECK: retq
32 # CHECK: !CFI {{.*}} ; OpDefCfa
34 .text
35 .globl main
36 .type main, %function
37 main:
38 # FDATA: 0 [unknown] 0 1 main 0 0 0
39 .cfi_startproc
40 LBB00:
41 pushq %r15
42 .cfi_def_cfa_offset 16
43 .cfi_offset %r15, -16
44 movl $0x401520, %edi
45 pushq %r14
46 .cfi_def_cfa_offset 24
47 .cfi_offset %r14, -24
48 pushq %r13
49 .cfi_def_cfa_offset 32
50 .cfi_offset %r13, -32
51 pushq %r12
52 .cfi_def_cfa_offset 40
53 .cfi_offset %r12, -40
54 xorl %r12d, %r12d
55 pushq %rbp
56 .cfi_def_cfa_offset 48
57 .cfi_offset %rbp, -48
58 pushq %rbx
59 .cfi_def_cfa_offset 56
60 .cfi_offset %rbx, -56
61 subq $0x98, %rsp
62 .cfi_def_cfa_offset 208
63 leaq 0x60(%rsp), %rbx
64 leaq 0x8c(%rsp), %rbp
65 callq puts@PLT
66 movsd DATAat0x401640(%rip), %xmm3
67 movq %rbx, %rsi
68 movsd DATAat0x401648(%rip), %xmm2
69 movq %rbp, %rdi
70 movsd DATAat0x401650(%rip), %xmm1
71 movq %rbx, %r13
72 movsd DATAat0x401658(%rip), %xmm0
73 callq _Z10SolveCubicddddPiPd
74 movl $0x4015d8, %edi
75 xorl %eax, %eax
76 callq printf@PLT
77 LBB00_br: jmp Ltmp0
78 # FDATA: 1 main #LBB00_br# 1 main #Ltmp0# 0 0
80 Ltmp1:
81 movsd (%r13), %xmm0
82 movl $0x4015e3, %edi
83 movl $0x1, %eax
84 addl $0x1, %r12d
85 addq $0x8, %r13
86 Ltmp1_br: callq printf@PLT
87 # FDATA: 1 main #Ltmp1_br# 1 main #Ltmp0# 0 0
89 Ltmp0:
90 cmpl 0x8c(%rsp), %r12d
91 Ltmp0_br: jl Ltmp1
92 # FDATA: 1 main #Ltmp0_br# 1 main #Ltmp1# 0 0
93 # FDATA: 1 main #Ltmp0_br# 1 main #LFT2# 0 0
95 LFT2:
96 movl $0xa, %edi
97 movq %rbx, %r13
98 xorl %r12d, %r12d
99 callq putchar@PLT
100 movsd DATAat0x401640(%rip), %xmm3
101 movq %rbx, %rsi
102 movsd DATAat0x401660(%rip), %xmm2
103 movq %rbp, %rdi
104 movsd DATAat0x401668(%rip), %xmm1
105 movsd DATAat0x401658(%rip), %xmm0
106 callq _Z10SolveCubicddddPiPd
107 movl $0x4015d8, %edi
108 xorl %eax, %eax
109 callq printf@PLT
110 LFT2_br: jmp Ltmp2
111 # FDATA: 1 main #LFT2_br# 1 main #Ltmp2# 0 0
113 Ltmp3:
114 movsd (%r13), %xmm0
115 movl $0x4015e3, %edi
116 movl $0x1, %eax
117 addl $0x1, %r12d
118 addq $0x8, %r13
119 Ltmp3_br: callq printf@PLT
120 # FDATA: 1 main #Ltmp3_br# 1 main #Ltmp2# 0 0
122 Ltmp2:
123 cmpl 0x8c(%rsp), %r12d
124 Ltmp2_br: jl Ltmp3
125 # FDATA: 1 main #Ltmp2_br# 1 main #Ltmp3# 0 0
126 # FDATA: 1 main #Ltmp2_br# 1 main #LFT4# 0 0
128 LFT4:
129 movl $0xa, %edi
130 callq putchar@PLT
131 movsd DATAat0x401670(%rip), %xmm3
132 movq %rbx, %rsi
133 movsd DATAat0x401678(%rip), %xmm2
134 movq %rbp, %rdi
135 movsd DATAat0x401680(%rip), %xmm1
136 movsd DATAat0x401658(%rip), %xmm0
137 callq _Z10SolveCubicddddPiPd
138 movl $0x4015d8, %edi
139 xorl %eax, %eax
140 callq printf@PLT
141 movq %rbx, %r12
142 xorl %r13d, %r13d
143 LFT4_br: jmp Ltmp4
144 # FDATA: 1 main #LFT4_br# 1 main #Ltmp4# 0 0
146 Ltmp5:
147 movsd (%r12), %xmm0
148 movl $0x4015e3, %edi
149 movl $0x1, %eax
150 callq printf@PLT
151 addl $0x1, %r13d
152 Ltmp5_br: addq $0x8, %r12
153 # FDATA: 1 main #Ltmp5_br# 1 main #Ltmp4# 0 0
155 Ltmp4:
156 cmpl 0x8c(%rsp), %r13d
157 Ltmp4_br: jl Ltmp5
158 # FDATA: 1 main #Ltmp4_br# 1 main #Ltmp5# 0 0
159 # FDATA: 1 main #Ltmp4_br# 1 main #LFT6# 0 0
161 LFT6:
162 movl $0xa, %edi
163 LFT6_br: callq putchar@PLT
164 # FDATA: 1 main #LFT6_br# 1 main #Ltmp27# 0 0
166 Ltmp27:
167 movsd DATAat0x401658(%rip), %xmm2
168 movq %rbx, %rsi
169 movsd DATAat0x401688(%rip), %xmm3
170 movq %rbp, %rdi
171 movsd DATAat0x401690(%rip), %xmm1
172 movq %rbx, %r13
173 movapd %xmm2, %xmm0
174 xorl %r12d, %r12d
175 callq _Z10SolveCubicddddPiPd
176 movl $0x4015d8, %edi
177 xorl %eax, %eax
178 callq printf@PLT
179 Ltmp27_br: jmp Ltmp6
180 # FDATA: 1 main #Ltmp27_br# 1 main #Ltmp6# 0 0
182 Ltmp7:
183 movsd (%r13), %xmm0
184 movl $0x4015e3, %edi
185 movl $0x1, %eax
186 addl $0x1, %r12d
187 addq $0x8, %r13
188 Ltmp7_br: callq printf@PLT
189 # FDATA: 1 main #Ltmp7_br# 1 main #Ltmp6# 0 0
191 Ltmp6:
192 cmpl 0x8c(%rsp), %r12d
193 Ltmp6_br: jl Ltmp7
194 # FDATA: 1 main #Ltmp6_br# 1 main #Ltmp7# 0 0
195 # FDATA: 1 main #Ltmp6_br# 1 main #LFT9# 0 0
197 LFT9:
198 movl $0xa, %edi
199 movq %rbx, %r13
200 xorl %r12d, %r12d
201 callq putchar@PLT
202 movsd DATAat0x401698(%rip), %xmm3
203 movq %rbx, %rsi
204 movsd DATAat0x4016a0(%rip), %xmm2
205 movq %rbp, %rdi
206 movsd DATAat0x4016a8(%rip), %xmm1
207 movsd DATAat0x4016b0(%rip), %xmm0
208 callq _Z10SolveCubicddddPiPd
209 movl $0x4015d8, %edi
210 xorl %eax, %eax
211 callq printf@PLT
212 LFT9_br: jmp Ltmp8
213 # FDATA: 1 main #LFT9_br# 1 main #Ltmp8# 0 0
215 Ltmp9:
216 movsd (%r13), %xmm0
217 movl $0x4015e3, %edi
218 movl $0x1, %eax
219 addl $0x1, %r12d
220 addq $0x8, %r13
221 Ltmp9_br: callq printf@PLT
222 # FDATA: 1 main #Ltmp9_br# 1 main #Ltmp8# 0 0
224 Ltmp8:
225 cmpl 0x8c(%rsp), %r12d
226 Ltmp8_br: jl Ltmp9
227 # FDATA: 1 main #Ltmp8_br# 1 main #Ltmp9# 0 0
228 # FDATA: 1 main #Ltmp8_br# 1 main #LFT11# 0 0
230 LFT11:
231 movl $0xa, %edi
232 movq %rbx, %r13
233 xorl %r12d, %r12d
234 callq putchar@PLT
235 movsd DATAat0x4016b8(%rip), %xmm3
236 movq %rbx, %rsi
237 movsd DATAat0x4016c0(%rip), %xmm2
238 movq %rbp, %rdi
239 movsd DATAat0x4016c8(%rip), %xmm1
240 movsd DATAat0x4016d0(%rip), %xmm0
241 callq _Z10SolveCubicddddPiPd
242 movl $0x4015d8, %edi
243 xorl %eax, %eax
244 callq printf@PLT
245 LFT11_br: jmp Ltmp10
246 # FDATA: 1 main #LFT11_br# 1 main #Ltmp10# 0 0
248 Ltmp11:
249 movsd (%r13), %xmm0
250 movl $0x4015e3, %edi
251 movl $0x1, %eax
252 addl $0x1, %r12d
253 addq $0x8, %r13
254 Ltmp11_br: callq printf@PLT
255 # FDATA: 1 main #Ltmp11_br# 1 main #Ltmp10# 0 0
257 Ltmp10:
258 cmpl 0x8c(%rsp), %r12d
259 Ltmp10_br: jl Ltmp11
260 # FDATA: 1 main #Ltmp10_br# 1 main #Ltmp11# 0 0
261 # FDATA: 1 main #Ltmp10_br# 1 main #LFT13# 0 0
263 LFT13:
264 movl $0xa, %edi
265 callq putchar@PLT
266 movsd DATAat0x4016d8(%rip), %xmm3
267 movq %rbx, %rsi
268 movsd DATAat0x4016e0(%rip), %xmm2
269 movq %rbp, %rdi
270 movsd DATAat0x4016e8(%rip), %xmm1
271 movsd DATAat0x4016f0(%rip), %xmm0
272 callq _Z10SolveCubicddddPiPd
273 movl $0x4015d8, %edi
274 xorl %eax, %eax
275 callq printf@PLT
276 movq %rbx, %r12
277 xorl %r13d, %r13d
278 LFT13_br: jmp Ltmp12
279 # FDATA: 1 main #LFT13_br# 1 main #Ltmp12# 0 0
281 Ltmp13:
282 movsd (%r12), %xmm0
283 movl $0x4015e3, %edi
284 movl $0x1, %eax
285 callq printf@PLT
286 addl $0x1, %r13d
287 Ltmp13_br: addq $0x8, %r12
288 # FDATA: 1 main #Ltmp13_br# 1 main #Ltmp12# 0 0
290 Ltmp12:
291 cmpl 0x8c(%rsp), %r13d
292 Ltmp12_br: jl Ltmp13
293 # FDATA: 1 main #Ltmp12_br# 1 main #Ltmp13# 0 0
294 # FDATA: 1 main #Ltmp12_br# 1 main #LFT15# 0 0
296 LFT15:
297 movl $0xa, %edi
298 LFT15_br: callq putchar@PLT
299 # FDATA: 1 main #LFT15_br# 1 main #Ltmp29# 0 0
301 Ltmp29:
302 movsd DATAat0x4016f8(%rip), %xmm3
303 movq %rbx, %rsi
304 movsd DATAat0x401700(%rip), %xmm2
305 movq %rbp, %rdi
306 movsd DATAat0x401708(%rip), %xmm1
307 movq %rbx, %r13
308 movsd DATAat0x401710(%rip), %xmm0
309 xorl %r12d, %r12d
310 callq _Z10SolveCubicddddPiPd
311 movl $0x4015d8, %edi
312 xorl %eax, %eax
313 callq printf@PLT
314 Ltmp29_br: jmp Ltmp14
315 # FDATA: 1 main #Ltmp29_br# 1 main #Ltmp14# 0 0
317 Ltmp15:
318 movsd (%r13), %xmm0
319 movl $0x4015e3, %edi
320 movl $0x1, %eax
321 addl $0x1, %r12d
322 addq $0x8, %r13
323 Ltmp15_br: callq printf@PLT
324 # FDATA: 1 main #Ltmp15_br# 1 main #Ltmp14# 0 0
326 Ltmp14:
327 cmpl 0x8c(%rsp), %r12d
328 Ltmp14_br: jl Ltmp15
329 # FDATA: 1 main #Ltmp14_br# 1 main #Ltmp15# 0 0
330 # FDATA: 1 main #Ltmp14_br# 1 main #LFT16# 0 0
332 LFT16:
333 movl $0xa, %edi
334 movabsq $-0x4010000000000000, %r14
335 callq putchar@PLT
336 movabsq $0x3ff0000000000000, %rsi
337 movl $0x0, 0x5c(%rsp)
338 LFT16_br: movq %rsi, 0x50(%rsp)
339 # FDATA: 1 main #LFT16_br# 1 main #Ltmp21# 0 0
341 Ltmp21:
342 movabsq $0x4024000000000000, %rax
343 xorl %r15d, %r15d
344 Ltmp21_br: movq %rax, 0x48(%rsp)
345 # FDATA: 1 main #Ltmp21_br# 1 main #Ltmp20# 0 0
347 Ltmp20:
348 movabsq $0x4014000000000000, %rdx
349 xorl %r13d, %r13d
350 Ltmp20_br: movq %rdx, 0x40(%rsp)
351 # FDATA: 1 main #Ltmp20_br# 1 main #Ltmp19# 0 0
353 Ltmp19:
354 xorl %r12d, %r12d
355 Ltmp19_br: movq %r14, 0x38(%rsp)
356 # FDATA: 1 main #Ltmp19_br# 1 main #Ltmp18# 0 0
358 Ltmp18:
359 movsd 0x38(%rsp), %xmm3
360 movq %rbx, %rsi
361 movsd 0x40(%rsp), %xmm2
362 movq %rbp, %rdi
363 movsd 0x48(%rsp), %xmm1
364 movsd 0x50(%rsp), %xmm0
365 callq _Z10SolveCubicddddPiPd
366 xorl %eax, %eax
367 movl $0x4015d8, %edi
368 callq printf@PLT
369 movl 0x8c(%rsp), %ecx
370 testl %ecx, %ecx
371 Ltmp18_br: jle Ltmp16
372 # FDATA: 1 main #Ltmp18_br# 1 main #Ltmp16# 0 0
373 # FDATA: 1 main #Ltmp18_br# 1 main #LFT17# 0 0
375 LFT17:
376 movq %rbx, %rcx
377 LFT17_br: xorl %edx, %edx
378 # FDATA: 1 main #LFT17_br# 1 main #Ltmp17# 0 0
380 Ltmp17:
381 movsd (%rcx), %xmm0
382 movl $0x4015e3, %edi
383 movl $0x1, %eax
384 movl %edx, 0x20(%rsp)
385 movq %rcx, 0x30(%rsp)
386 callq printf@PLT
387 movl 0x20(%rsp), %edx
388 movq 0x30(%rsp), %rcx
389 addl $0x1, %edx
390 addq $0x8, %rcx
391 cmpl %edx, 0x8c(%rsp)
392 Ltmp17_br: jg Ltmp17
393 # FDATA: 1 main #Ltmp17_br# 1 main #Ltmp17# 0 0
394 # FDATA: 1 main #Ltmp17_br# 1 main #Ltmp16# 0 0
396 Ltmp16:
397 movl $0xa, %edi
398 addl $0x1, %r12d
399 callq putchar@PLT
400 movsd 0x38(%rsp), %xmm0
401 cmpl $0x9, %r12d
402 subsd DATAat0x401718(%rip), %xmm0
403 movsd %xmm0, 0x38(%rsp)
404 Ltmp16_br: jne Ltmp18
405 # FDATA: 1 main #Ltmp16_br# 1 main #Ltmp18# 0 0
406 # FDATA: 1 main #Ltmp16_br# 1 main #LFT18# 0 0
408 LFT18:
409 movsd DATAat0x401720(%rip), %xmm0
410 addl $0x1, %r13d
411 cmpl $0x11, %r13d
412 addsd 0x40(%rsp), %xmm0
413 movsd %xmm0, 0x40(%rsp)
414 LFT18_br: jne Ltmp19
415 # FDATA: 1 main #LFT18_br# 1 main #Ltmp19# 0 0
416 # FDATA: 1 main #LFT18_br# 1 main #LFT19# 0 0
418 LFT19:
419 movsd 0x48(%rsp), %xmm0
420 addl $0x1, %r15d
421 cmpl $0x28, %r15d
422 subsd DATAat0x401728(%rip), %xmm0
423 movsd %xmm0, 0x48(%rsp)
424 LFT19_br: jne Ltmp20
425 # FDATA: 1 main #LFT19_br# 1 main #Ltmp20# 0 0
426 # FDATA: 1 main #LFT19_br# 1 main #LFT20# 0 0
428 LFT20:
429 movsd DATAat0x401658(%rip), %xmm0
430 addl $0x1, 0x5c(%rsp)
431 cmpl $0x9, 0x5c(%rsp)
432 addsd 0x50(%rsp), %xmm0
433 movsd %xmm0, 0x50(%rsp)
434 LFT20_br: jne Ltmp21
435 # FDATA: 1 main #LFT20_br# 1 main #Ltmp21# 0 0
436 # FDATA: 1 main #LFT20_br# 1 main #LFT21# 0 0
438 LFT21:
439 leaq 0x80(%rsp), %r12
440 movl $0x401548, %edi
441 movl $0xc350, %ebp
442 xorl %ebx, %ebx
443 LFT21_br: callq puts@PLT
444 # FDATA: 1 main #LFT21_br# 1 main #Ltmp22# 0 0
446 Ltmp22:
447 movslq %ebx, %rdi
448 movq %r12, %rsi
449 callq _Z5usqrtmP8int_sqrt
450 movl 0x80(%rsp), %edx
451 movl %ebx, %esi
452 xorl %eax, %eax
453 movl $0x4015f2, %edi
454 addl $0x2, %ebx
455 callq printf@PLT
456 subl $0x1, %ebp
457 Ltmp22_br: jne Ltmp22
458 # FDATA: 1 main #Ltmp22_br# 1 main #Ltmp22# 0 0
459 # FDATA: 1 main #Ltmp22_br# 1 main #LFT22# 0 0
461 LFT22:
462 movl $0xa, %edi
463 movl $0x3fed0169, %ebx
464 LFT22_br: callq putchar@PLT
465 # FDATA: 1 main #LFT22_br# 1 main #Ltmp23# 0 0
467 Ltmp23:
468 movq %rbx, %rdi
469 movq %r12, %rsi
470 callq _Z5usqrtmP8int_sqrt
471 movl 0x80(%rsp), %edx
472 movq %rbx, %rsi
473 xorl %eax, %eax
474 movl $0x401603, %edi
475 addq $0x1, %rbx
476 callq printf@PLT
477 cmpq $0x3fed4169, %rbx
478 Ltmp23_br: jne Ltmp23
479 # FDATA: 1 main #Ltmp23_br# 1 main #Ltmp23# 0 0
480 # FDATA: 1 main #Ltmp23_br# 1 main #LFT23# 0 0
482 LFT23:
483 movl $0x401570, %edi
484 xorl %ebx, %ebx
485 callq puts@PLT
486 movq %rbx, 0x8(%rsp)
487 movsd DATAat0x401748(%rip), %xmm3
488 LFT23_br: movsd 0x8(%rsp), %xmm2
489 # FDATA: 1 main #LFT23_br# 1 main #Ltmp24# 0 0
491 Ltmp24:
492 movsd DATAat0x401730(%rip), %xmm1
493 movl $0x401598, %edi
494 movapd %xmm2, %xmm0
495 movl $0x2, %eax
496 mulsd %xmm2, %xmm1
497 movsd %xmm2, 0x20(%rsp)
498 movsd %xmm3, 0x10(%rsp)
499 divsd DATAat0x401738(%rip), %xmm1
500 callq printf@PLT
501 movsd 0x20(%rsp), %xmm2
502 movsd 0x10(%rsp), %xmm3
503 addsd DATAat0x401740(%rip), %xmm2
504 ucomisd %xmm2, %xmm3
505 Ltmp24_br: jae Ltmp24
506 # FDATA: 1 main #Ltmp24_br# 1 main #Ltmp24# 0 0
507 # FDATA: 1 main #Ltmp24_br# 1 main #LFT24# 0 0
509 LFT24:
510 movl $0x401612, %edi
511 callq puts@PLT
512 movq %rbx, 0x8(%rsp)
513 movsd DATAat0x401758(%rip), %xmm3
514 LFT24_br: movsd 0x8(%rsp), %xmm2
515 # FDATA: 1 main #LFT24_br# 1 main #Ltmp25# 0 0
517 Ltmp25:
518 movsd DATAat0x401738(%rip), %xmm1
519 movl $0x4015b8, %edi
520 movapd %xmm2, %xmm0
521 movl $0x2, %eax
522 mulsd %xmm2, %xmm1
523 movsd %xmm2, 0x20(%rsp)
524 movsd %xmm3, 0x10(%rsp)
525 divsd DATAat0x401730(%rip), %xmm1
526 callq printf@PLT
527 movsd 0x20(%rsp), %xmm2
528 movsd 0x10(%rsp), %xmm3
529 addsd DATAat0x401750(%rip), %xmm2
530 ucomisd %xmm2, %xmm3
531 Ltmp25_br: jae Ltmp25
532 # FDATA: 1 main #Ltmp25_br# 1 main #Ltmp25# 0 0
533 # FDATA: 1 main #Ltmp25_br# 1 main #LFT25# 0 0
535 LFT25:
536 addq $0x98, %rsp
537 .cfi_def_cfa_offset 56
538 xorl %eax, %eax
539 popq %rbx
540 .cfi_def_cfa_offset 48
541 popq %rbp
542 .cfi_def_cfa_offset 40
543 popq %r12
544 .cfi_def_cfa_offset 32
545 popq %r13
546 .cfi_def_cfa_offset 24
547 popq %r14
548 .cfi_def_cfa_offset 16
549 popq %r15
550 .cfi_def_cfa_offset 8
551 retq
552 .cfi_def_cfa %rsp, 208
554 LLP0:
555 cmpq $0x1, %rdx
556 movq %rax, %rdi
557 LLP0_br: je Ltmp26
558 # FDATA: 1 main #LLP0_br# 1 main #Ltmp26# 0 0
559 # FDATA: 1 main #LLP0_br# 1 main #Ltmp28# 0 0
561 Ltmp28:
562 Ltmp28_br: callq _Unwind_Resume@PLT
563 # FDATA: 1 main #Ltmp28_br# 1 main #Ltmp26# 0 0
565 Ltmp26:
566 callq __cxa_begin_catch@PLT
567 movl $0x4015e7, %edi
568 callq puts@PLT
569 callq __cxa_end_catch@PLT
570 Ltmp26_br: jmp Ltmp27
571 # FDATA: 1 main #Ltmp26_br# 1 main #Ltmp27# 0 0
573 Ltmp30:
574 movq %rax, 0x30(%rsp)
575 callq __cxa_end_catch@PLT
576 movq 0x30(%rsp), %rdi
577 Ltmp30_br: jmp Ltmp28
578 # FDATA: 1 main #Ltmp30_br# 1 main #Ltmp28# 0 0
580 LLP1:
581 cmpq $0x1, %rdx
582 movq %rax, %rdi
583 LLP1_br: jne Ltmp28
584 # FDATA: 1 main #LLP1_br# 1 main #Ltmp28# 0 0
585 # FDATA: 1 main #LLP1_br# 1 main #LFT26# 0 0
587 LFT26:
588 callq __cxa_begin_catch@PLT
589 movl $0x4015e7, %edi
590 callq puts@PLT
591 callq __cxa_end_catch@PLT
592 LFT26_br: jmp Ltmp29
593 # FDATA: 1 main #LFT26_br# 1 main #Ltmp29# 0 0
595 LLP2:
596 LLP2_br: jmp Ltmp30
597 # FDATA: 1 main #LLP2_br# 1 main #Ltmp30# 0 0
599 .cfi_endproc
600 .size main, .-main
602 .section .rodata
603 "DATAat0x401738":
604 "DATAat0x401748":
605 "DATAat0x401728":
606 "DATAat0x401718":
607 "DATAat0x4016f8":
608 "DATAat0x401690":
609 "DATAat0x401668":
610 "DATAat0x401650":
611 "DATAat0x401700":
612 "DATAat0x401698":
613 "DATAat0x401688":
614 "DATAat0x401648":
615 "DATAat0x401680":
616 "DATAat0x4016c8":
617 "DATAat0x401750":
618 "DATAat0x401678":
619 "DATAat0x4016c0":
620 "DATAat0x401758":
621 "DATAat0x401660":
622 "DATAat0x4016b0":
623 "DATAat0x401640":
624 "DATAat0x401658":
625 "DATAat0x401720":
626 "DATAat0x4016f0":
627 "DATAat0x401710":
628 "DATAat0x4016a8":
629 "DATAat0x401730":
630 "DATAat0x4016b8":
631 "DATAat0x401708":
632 "DATAat0x401670":
633 "DATAat0x4016a0":
634 "DATAat0x4016d0":
635 "DATAat0x4016d8":
636 "DATAat0x4016e0":
637 "DATAat0x401740":
638 "DATAat0x4016e8":
639 .text
640 .globl _Z10SolveCubicddddPiPd
641 .type _Z10SolveCubicddddPiPd, %function
642 _Z10SolveCubicddddPiPd:
643 # FDATA: 0 [unknown] 0 1 _Z10SolveCubicddddPiPd 0 0 57
644 .cfi_startproc
645 LBB01:
646 divsd %xmm0, %xmm1
647 pushq %rbx
648 .cfi_def_cfa_offset 16
649 .cfi_offset %rbx, -16
650 movq %rsi, %rbx
651 subq $0x70, %rsp
652 .cfi_def_cfa_offset 128
653 divsd %xmm0, %xmm2
654 movsd %xmm1, 0x48(%rsp)
655 fldl 0x48(%rsp)
656 divsd %xmm0, %xmm3
657 movsd %xmm2, 0x48(%rsp)
658 fldl 0x48(%rsp)
659 fld %st(1)
660 fmul %st(2), %st
661 movsd %xmm3, 0x48(%rsp)
662 fld %st(1)
663 fmuls DATAat0x401760(%rip)
664 faddp %st, %st(1)
665 fdivs DATAat0x401764(%rip)
666 fld %st(2)
667 fadd %st(3), %st
668 fmul %st(3), %st
669 fmul %st(3), %st
670 fld %st(3)
671 fmuls DATAat0x401768(%rip)
672 fmulp %st, %st(3)
673 faddp %st, %st(2)
674 flds DATAat0x40176c(%rip)
675 fmull 0x48(%rsp)
676 faddp %st, %st(2)
677 fxch %st(1)
678 fdivs DATAat0x401770(%rip)
679 fld %st(1)
680 fmul %st(2), %st
681 fmul %st(2), %st
682 fld %st(1)
683 fmul %st(2), %st
684 fsub %st(1), %st
685 fstpl 0x68(%rsp)
686 movsd 0x68(%rsp), %xmm0
687 ucomisd DATAat0x401778(%rip), %xmm0
688 LBB01_br: jbe Ltmp31
689 # FDATA: 1 _Z10SolveCubicddddPiPd #LBB01_br# 1 _Z10SolveCubicddddPiPd #Ltmp31# 0 0
690 # FDATA: 1 _Z10SolveCubicddddPiPd #LBB01_br# 1 _Z10SolveCubicddddPiPd #LFT1# 0 0
692 LFT1:
693 fstp %st(0)
694 LFT1_br: jmp Ltmp32
695 # FDATA: 1 _Z10SolveCubicddddPiPd #LFT1_br# 1 _Z10SolveCubicddddPiPd #Ltmp32# 0 0
697 Ltmp37:
698 Ltmp37_br: fstp %st(0)
699 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp37_br# 1 _Z10SolveCubicddddPiPd #Ltmp32# 0 0
701 Ltmp32:
702 sqrtsd %xmm0, %xmm1
703 movl $0x1, (%rdi)
704 ucomisd %xmm1, %xmm1
705 Ltmp32_br: jp Ltmp33
706 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp32_br# 1 _Z10SolveCubicddddPiPd #Ltmp33# 0 0
707 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp32_br# 1 _Z10SolveCubicddddPiPd #LFT3# 0 0
709 LFT3:
710 LFT3_br: jne Ltmp33
711 # FDATA: 1 _Z10SolveCubicddddPiPd #LFT3_br# 1 _Z10SolveCubicddddPiPd #Ltmp33# 0 0
712 # FDATA: 1 _Z10SolveCubicddddPiPd #LFT3_br# 1 _Z10SolveCubicddddPiPd #Ltmp36# 0 0
714 Ltmp36:
715 fstl 0x68(%rsp)
716 movsd DATAat0x4017b0(%rip), %xmm2
717 fstpt 0x30(%rsp)
718 fxch %st(1)
719 movsd 0x68(%rsp), %xmm0
720 fstpt 0x10(%rsp)
721 andpd %xmm2, %xmm0
722 fstpt 0x20(%rsp)
723 addsd %xmm1, %xmm0
724 movsd DATAat0x401798(%rip), %xmm1
725 callq pow@PLT
726 movsd %xmm0, 0x8(%rsp)
727 fldl 0x8(%rsp)
728 fldz
729 fldt 0x30(%rsp)
730 fxch %st(1)
731 fucompi %st(1), %st
732 fstp %st(0)
733 fldt 0x10(%rsp)
734 fldt 0x20(%rsp)
735 Ltmp36_br: ja Ltmp34
736 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp36_br# 1 _Z10SolveCubicddddPiPd #Ltmp34# 0 0
737 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp36_br# 1 _Z10SolveCubicddddPiPd #LFT5# 0 0
739 LFT5:
740 LFT5_br: movsd DATAat0x4017a0(%rip), %xmm1
741 # FDATA: 1 _Z10SolveCubicddddPiPd #LFT5_br# 1 _Z10SolveCubicddddPiPd #Ltmp35# 0 0
743 Ltmp35:
744 fdiv %st(2), %st
745 faddp %st, %st(2)
746 fxch %st(1)
747 fstpl 0x68(%rsp)
748 fdivs DATAat0x401760(%rip)
749 movsd 0x68(%rsp), %xmm0
750 mulsd %xmm1, %xmm0
751 movsd %xmm0, 0x8(%rsp)
752 fldl 0x8(%rsp)
753 faddp %st, %st(1)
754 fstpl (%rbx)
755 addq $0x70, %rsp
756 .cfi_def_cfa_offset 16
757 popq %rbx
758 .cfi_def_cfa_offset 8
759 retq
760 .cfi_def_cfa %rsp, 128
762 Ltmp34:
763 movsd DATAat0x401658(%rip), %xmm1
764 Ltmp34_br: jmp Ltmp35
765 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp34_br# 1 _Z10SolveCubicddddPiPd #Ltmp35# 0 0
767 Ltmp33:
768 fstpt 0x30(%rsp)
769 fxch %st(1)
770 fstpt 0x10(%rsp)
771 fstpt 0x20(%rsp)
772 callq sqrt@PLT
773 movapd %xmm0, %xmm1
774 fldt 0x20(%rsp)
775 fldt 0x10(%rsp)
776 fldt 0x30(%rsp)
777 fxch %st(1)
778 fxch %st(2)
779 fxch %st(1)
780 Ltmp33_br: jmp Ltmp36
781 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp33_br# 1 _Z10SolveCubicddddPiPd #Ltmp36# 0 0
783 Ltmp31:
784 Ltmp31_br: jp Ltmp37
785 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp31_br# 1 _Z10SolveCubicddddPiPd #Ltmp37# 0 0
786 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp31_br# 1 _Z10SolveCubicddddPiPd #LFT7# 0 0
788 LFT7:
789 fstpl 0x68(%rsp)
790 movl $0x3, (%rdi)
791 movsd 0x68(%rsp), %xmm1
792 sqrtsd %xmm1, %xmm0
793 ucomisd %xmm0, %xmm0
794 LFT7_br: jp Ltmp38
795 # FDATA: 1 _Z10SolveCubicddddPiPd #LFT7_br# 1 _Z10SolveCubicddddPiPd #Ltmp38# 0 0
796 # FDATA: 1 _Z10SolveCubicddddPiPd #LFT7_br# 1 _Z10SolveCubicddddPiPd #LFT8# 0 0
798 LFT8:
799 LFT8_br: jne Ltmp38
800 # FDATA: 1 _Z10SolveCubicddddPiPd #LFT8_br# 1 _Z10SolveCubicddddPiPd #Ltmp38# 0 0
801 # FDATA: 1 _Z10SolveCubicddddPiPd #LFT8_br# 1 _Z10SolveCubicddddPiPd #Ltmp47# 0 0
803 Ltmp47:
804 movsd %xmm0, 0x8(%rsp)
805 fldl 0x8(%rsp)
806 fdivrp %st, %st(1)
807 fstpl 0x68(%rsp)
808 fxch %st(1)
809 fstpt 0x10(%rsp)
810 movsd 0x68(%rsp), %xmm0
811 fstpt 0x20(%rsp)
812 callq acos@PLT
813 movsd %xmm0, 0x48(%rsp)
814 fldt 0x20(%rsp)
815 fstpl 0x60(%rsp)
816 sqrtsd 0x60(%rsp), %xmm1
817 movapd %xmm1, %xmm2
818 ucomisd %xmm1, %xmm1
819 fldt 0x10(%rsp)
820 Ltmp47_br: jp Ltmp39
821 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp47_br# 1 _Z10SolveCubicddddPiPd #Ltmp39# 0 0
822 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp47_br# 1 _Z10SolveCubicddddPiPd #LFT10# 0 0
824 LFT10:
825 LFT10_br: jne Ltmp40
826 # FDATA: 1 _Z10SolveCubicddddPiPd #LFT10_br# 1 _Z10SolveCubicddddPiPd #Ltmp40# 0 0
827 # FDATA: 1 _Z10SolveCubicddddPiPd #LFT10_br# 1 _Z10SolveCubicddddPiPd #Ltmp46# 0 0
829 Ltmp46:
830 divsd DATAat0x4016b0(%rip), %xmm0
831 movsd %xmm1, 0x20(%rsp)
832 movsd %xmm2, 0x30(%rsp)
833 fstpt 0x10(%rsp)
834 callq cos@PLT
835 movsd 0x30(%rsp), %xmm2
836 movsd 0x20(%rsp), %xmm1
837 fldt 0x10(%rsp)
838 ucomisd %xmm1, %xmm1
839 mulsd DATAat0x401780(%rip), %xmm2
840 fdivs DATAat0x401760(%rip)
841 mulsd %xmm0, %xmm2
842 movsd %xmm2, 0x8(%rsp)
843 movapd %xmm1, %xmm2
844 fld %st(0)
845 fstpt 0x50(%rsp)
846 fldl 0x8(%rsp)
847 faddp %st, %st(1)
848 fstpl (%rbx)
849 Ltmp46_br: jp Ltmp41
850 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp46_br# 1 _Z10SolveCubicddddPiPd #Ltmp41# 0 0
851 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp46_br# 1 _Z10SolveCubicddddPiPd #LFT12# 0 0
853 LFT12:
854 LFT12_br: jne Ltmp41
855 # FDATA: 1 _Z10SolveCubicddddPiPd #LFT12_br# 1 _Z10SolveCubicddddPiPd #Ltmp41# 0 0
856 # FDATA: 1 _Z10SolveCubicddddPiPd #LFT12_br# 1 _Z10SolveCubicddddPiPd #Ltmp44# 0 0
858 Ltmp44:
859 movsd 0x48(%rsp), %xmm0
860 movsd %xmm1, 0x20(%rsp)
861 addsd DATAat0x401788(%rip), %xmm0
862 movsd %xmm2, 0x30(%rsp)
863 divsd DATAat0x4016b0(%rip), %xmm0
864 callq cos@PLT
865 movsd 0x30(%rsp), %xmm2
866 fldt 0x50(%rsp)
867 mulsd DATAat0x401780(%rip), %xmm2
868 movsd 0x20(%rsp), %xmm1
869 ucomisd %xmm1, %xmm1
870 mulsd %xmm0, %xmm2
871 movsd %xmm2, 0x8(%rsp)
872 fldl 0x8(%rsp)
873 faddp %st, %st(1)
874 fstpl 0x8(%rbx)
875 Ltmp44_br: jp Ltmp42
876 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp44_br# 1 _Z10SolveCubicddddPiPd #Ltmp42# 0 0
877 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp44_br# 1 _Z10SolveCubicddddPiPd #LFT14# 0 0
879 LFT14:
880 LFT14_br: jne Ltmp42
881 # FDATA: 1 _Z10SolveCubicddddPiPd #LFT14_br# 1 _Z10SolveCubicddddPiPd #Ltmp42# 0 0
882 # FDATA: 1 _Z10SolveCubicddddPiPd #LFT14_br# 1 _Z10SolveCubicddddPiPd #Ltmp43# 0 0
884 Ltmp43:
885 movsd 0x48(%rsp), %xmm0
886 movsd %xmm1, 0x20(%rsp)
887 addsd DATAat0x401790(%rip), %xmm0
888 divsd DATAat0x4016b0(%rip), %xmm0
889 callq cos@PLT
890 fldt 0x50(%rsp)
891 movsd DATAat0x401780(%rip), %xmm2
892 movsd 0x20(%rsp), %xmm1
893 mulsd %xmm1, %xmm2
894 mulsd %xmm0, %xmm2
895 movsd %xmm2, 0x8(%rsp)
896 fldl 0x8(%rsp)
897 faddp %st, %st(1)
898 fstpl 0x10(%rbx)
899 addq $0x70, %rsp
900 .cfi_def_cfa_offset 16
901 popq %rbx
902 .cfi_def_cfa_offset 8
903 retq
904 .cfi_def_cfa %rsp, 128
906 Ltmp42:
907 movsd 0x60(%rsp), %xmm0
908 callq sqrt@PLT
909 movapd %xmm0, %xmm1
910 Ltmp42_br: jmp Ltmp43
911 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp42_br# 1 _Z10SolveCubicddddPiPd #Ltmp43# 0 0
913 Ltmp41:
914 movsd 0x60(%rsp), %xmm0
915 callq sqrt@PLT
916 movsd 0x20(%rsp), %xmm1
917 movapd %xmm0, %xmm2
918 Ltmp41_br: jmp Ltmp44
919 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp41_br# 1 _Z10SolveCubicddddPiPd #Ltmp44# 0 0
921 Ltmp39:
922 fstp %st(0)
923 Ltmp39_br: jmp Ltmp45
924 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp39_br# 1 _Z10SolveCubicddddPiPd #Ltmp45# 0 0
926 Ltmp40:
927 Ltmp40_br: fstp %st(0)
928 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp40_br# 1 _Z10SolveCubicddddPiPd #Ltmp45# 0 0
930 Ltmp45:
931 movsd 0x60(%rsp), %xmm0
932 movsd %xmm1, 0x20(%rsp)
933 callq sqrt@PLT
934 movsd 0x20(%rsp), %xmm1
935 movapd %xmm0, %xmm2
936 movsd 0x48(%rsp), %xmm0
937 fldt 0x10(%rsp)
938 Ltmp45_br: jmp Ltmp46
939 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp45_br# 1 _Z10SolveCubicddddPiPd #Ltmp46# 0 0
941 Ltmp38:
942 fstpt 0x30(%rsp)
943 fxch %st(1)
944 movapd %xmm1, %xmm0
945 fstpt 0x10(%rsp)
946 fstpt 0x20(%rsp)
947 callq sqrt@PLT
948 fldt 0x20(%rsp)
949 fldt 0x10(%rsp)
950 fldt 0x30(%rsp)
951 fxch %st(1)
952 fxch %st(2)
953 fxch %st(1)
954 Ltmp38_br: jmp Ltmp47
955 # FDATA: 1 _Z10SolveCubicddddPiPd #Ltmp38_br# 1 _Z10SolveCubicddddPiPd #Ltmp47# 0 0
957 .cfi_endproc
958 .size _Z10SolveCubicddddPiPd, .-_Z10SolveCubicddddPiPd
959 .section .rodata
960 "DATAat0x401788":
961 "DATAat0x401790":
962 "DATAat0x401780":
963 "DATAat0x401770":
964 "DATAat0x40176c":
965 "DATAat0x401760":
966 "DATAat0x401768":
967 "DATAat0x401778":
968 "DATAat0x401764":
969 "DATAat0x401798":
970 "DATAat0x4017b0":
971 "DATAat0x4017a0":
973 .text
974 .globl _Z5usqrtmP8int_sqrt
975 .type _Z5usqrtmP8int_sqrt, %function
976 _Z5usqrtmP8int_sqrt:
977 # FDATA: 0 [unknown] 0 1 _Z5usqrtmP8int_sqrt 0 0 6
978 .cfi_startproc
979 LBB02:
980 xorl %r9d, %r9d
981 xorl %eax, %eax
982 LBB02_br: xorl %ecx, %ecx
983 # FDATA: 1 _Z5usqrtmP8int_sqrt #LBB02_br# 1 _Z5usqrtmP8int_sqrt #Ltmp48# 0 0
985 Ltmp48:
986 movq %rdi, %rdx
987 leaq (%rax,%rax), %r10
988 leaq 0x1(,%rax,4), %r8
989 andl $0xc0000000, %edx
990 shlq $0x2, %rdi
991 shrq $0x1e, %rdx
992 leaq 0x1(%r10), %rax
993 leaq (%rdx,%rcx,4), %rdx
994 movq %rdx, %rcx
995 subq %r8, %rcx
996 cmpq %r8, %rdx
997 cmovbq %rdx, %rcx
998 cmovbq %r10, %rax
999 addl $0x1, %r9d
1000 cmpl $0x20, %r9d
1001 Ltmp48_br: jne Ltmp48
1002 # FDATA: 1 _Z5usqrtmP8int_sqrt #Ltmp48_br# 1 _Z5usqrtmP8int_sqrt #Ltmp48# 0 0
1003 # FDATA: 1 _Z5usqrtmP8int_sqrt #Ltmp48_br# 1 _Z5usqrtmP8int_sqrt #LFT0# 0 0
1005 LFT0:
1006 movq %rax, (%rsi)
1007 retq
1009 .cfi_endproc
1010 .size _Z5usqrtmP8int_sqrt, .-_Z5usqrtmP8int_sqrt