38 lines · plain
1 .section __TEXT,__text,regular,pure_instructions2 3 .globl _form_func_ptr4_form_func_ptr:5 leaq _form_func_ptr(%rip), %rax6 leaq _other(%rip), %rax7 leaq _form_func_ptr(%rip), %rax8 nop9 leaq _form_func_ptr(%rip), %rax10 retq11 12 .globl _other13_other:14 leaq _form_func_ptr(%rip), %rax15 retq16 17# Return 0 if the pointers formed inside and outside the function are the same.18 .globl _main19_main:20 pushq %rbp21 movq %rsp, %rbp22 subq $32, %rsp23 movl $0, -4(%rbp)24 callq _form_func_ptr25 movq %rax, -16(%rbp)26 callq _other27 movq %rax, -24(%rbp)28 movq -16(%rbp), %rax29 cmpq -24(%rbp), %rax30 setne %al31 andb $1, %al32 movzbl %al, %eax33 addq $32, %rsp34 popq %rbp35 retq36 37 .subsections_via_symbols38