Skip to content

Instantly share code, notes, and snippets.

@roxlu roxlu/gist:290fbea635d9021de25e Secret
Created Oct 30, 2013

Embed
What would you like to do?
gdb) disassemble /m
Dump of assembler code for function main:
0x0000000000406660 <+0>: push %r12
0x0000000000406662 <+2>: mov $0x249f00,%edx
0x0000000000406667 <+7>: mov $0x100,%esi
0x000000000040666c <+12>: push %rbp
0x000000000040666d <+13>: mov $0x6238c0,%edi
0x0000000000406672 <+18>: xor %r12d,%r12d
0x0000000000406675 <+21>: push %rbx
0x0000000000406676 <+22>: mov $0x64,%ebx
0x000000000040667b <+27>: sub $0x20,%rsp
0x000000000040667f <+31>: callq 0x405de0 <posix_memalign@plt>
0x0000000000406684 <+36>: vmovaps 0x15e84(%rip),%xmm3 # 0x41c510
0x000000000040668c <+44>: vmovaps 0x15e8c(%rip),%xmm2 # 0x41c520
0x0000000000406694 <+52>: mov 0x21d225(%rip),%rdi # 0x6238c0 <particles>
0x000000000040669b <+59>: mov $0x249f00,%edx
0x00000000004066a0 <+64>: xor %esi,%esi
0x00000000004066a2 <+66>: vmovaps %xmm2,0x10(%rsp)
0x00000000004066a8 <+72>: vmovaps %xmm3,(%rsp)
0x00000000004066ad <+77>: callq 0x405da0 <memset@plt>
0x00000000004066b2 <+82>: callq 0x406aad <uv_hrtime>
0x00000000004066b7 <+87>: mov 0x21d202(%rip),%rdx # 0x6238c0 <particles>
0x00000000004066be <+94>: vmovaps (%rsp),%xmm3
0x00000000004066c3 <+99>: mov %rax,%rbp
0x00000000004066c6 <+102>: mov $0xbb8,%eax
0x00000000004066cb <+107>: vmovaps 0x10(%rsp),%xmm2
0x00000000004066d1 <+113>: lea 0x60(%rdx),%rdi
0x00000000004066d5 <+117>: lea 0x20(%rdx),%rsi
0x00000000004066d9 <+121>: nopl 0x0(%rax)
0x00000000004066e0 <+128>: mov %rsi,%rdx
0x00000000004066e3 <+131>: mov $0x61a8,%ecx
0x00000000004066e8 <+136>: nopl 0x0(%rax,%rax,1)
0x00000000004066f0 <+144>: vaddps (%rdx),%xmm3,%xmm0
=> 0x00000000004066f4 <+148>: add $0x60,%rdx
0x00000000004066f8 <+152>: vmovaps %xmm0,-0x60(%rdx)
0x00000000004066fd <+157>: vaddps -0x50(%rdx),%xmm2,%xmm0
0x0000000000406702 <+162>: vmovaps %xmm0,-0x50(%rdx)
0x0000000000406707 <+167>: sub $0x1,%ecx
0x000000000040670a <+170>: jne 0x4066f0 <main+144>
0x000000000040670c <+172>: mov %rdi,%rcx
0x000000000040670f <+175>: xor %edx,%edx
0x0000000000406711 <+177>: jmp 0x406727 <main+199>
0x0000000000406713 <+179>: nopl 0x0(%rax,%rax,1)
0x0000000000406718 <+184>: add $0x1,%edx
0x000000000040671b <+187>: add $0x60,%rcx
0x000000000040671f <+191>: cmp $0x61a8,%edx
0x0000000000406725 <+197>: je 0x40673e <main+222>
0x0000000000406727 <+199>: test $0x1,%dl
0x000000000040672a <+202>: jne 0x406718 <main+184>
0x000000000040672c <+204>: add $0x1,%edx
0x000000000040672f <+207>: prefetcht0 (%rcx)
0x0000000000406732 <+210>: add $0x60,%rcx
0x0000000000406736 <+214>: cmp $0x61a8,%edx
0x000000000040673c <+220>: jne 0x406727 <main+199>
0x000000000040673e <+222>: sub $0x1,%eax
0x0000000000406741 <+225>: jne 0x4066e0 <main+128>
0x0000000000406743 <+227>: vmovaps %xmm2,0x10(%rsp)
0x0000000000406749 <+233>: vmovaps %xmm3,(%rsp)
0x000000000040674e <+238>: callq 0x406aad <uv_hrtime>
0x0000000000406753 <+243>: vmovaps (%rsp),%xmm3
0x0000000000406758 <+248>: sub %rbp,%rax
0x000000000040675b <+251>: vmovaps 0x10(%rsp),%xmm2
0x0000000000406761 <+257>: mov %rax,%rbp
0x0000000000406764 <+260>: js 0x4067fd <main+413>
0x000000000040676a <+266>: vcvtsi2sd %rax,%xmm1,%xmm1
0x000000000040676f <+271>: vmulsd 0x15dc1(%rip),%xmm1,%xmm0 # 0x41c538
0x0000000000406777 <+279>: mov %rbp,%rsi
0x000000000040677a <+282>: mov $0x41c4c8,%edi
0x000000000040677f <+287>: vmulsd 0x15da9(%rip),%xmm1,%xmm1 # 0x41c530
0x0000000000406787 <+295>: mov $0x2,%eax
0x000000000040678c <+300>: add %rbp,%r12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.