Skip to content

Instantly share code, notes, and snippets.

@carlosmn
Created May 2, 2014 14:20
Show Gist options
  • Save carlosmn/f369af725cc0526f07e4 to your computer and use it in GitHub Desktop.
Save carlosmn/f369af725cc0526f07e4 to your computer and use it in GitHub Desktop.
Clang being weird
000000000045ad40 <p_open>:
45ad40: 48 81 ec c8 00 00 00 sub $0xc8,%rsp
45ad47: 49 89 d2 mov %rdx,%r10
45ad4a: 84 c0 test %al,%al
45ad4c: 74 31 je 45ad7f <p_open+0x3f>
45ad4e: 0f 29 44 24 30 movaps %xmm0,0x30(%rsp)
45ad53: 0f 29 4c 24 40 movaps %xmm1,0x40(%rsp)
45ad58: 0f 29 54 24 50 movaps %xmm2,0x50(%rsp)
45ad5d: 0f 29 5c 24 60 movaps %xmm3,0x60(%rsp)
45ad62: 0f 29 64 24 70 movaps %xmm4,0x70(%rsp)
45ad67: 0f 29 ac 24 80 00 00 movaps %xmm5,0x80(%rsp)
45ad6e: 00
45ad6f: 0f 29 b4 24 90 00 00 movaps %xmm6,0x90(%rsp)
45ad76: 00
45ad77: 0f 29 bc 24 a0 00 00 movaps %xmm7,0xa0(%rsp)
45ad7e: 00
45ad7f: 31 d2 xor %edx,%edx
45ad81: 4c 89 4c 24 28 mov %r9,0x28(%rsp)
45ad86: 4c 89 44 24 20 mov %r8,0x20(%rsp)
45ad8b: 48 89 4c 24 18 mov %rcx,0x18(%rsp)
45ad90: 4c 89 54 24 10 mov %r10,0x10(%rsp)
45ad95: 74 6d je 45ae04 <p_open+0xc4>
45ad97: 48 8d 04 24 lea (%rsp),%rax
45ad9b: 48 89 84 24 c0 00 00 mov %rax,0xc0(%rsp)
45ada2: 00
45ada3: 48 8d 84 24 d0 00 00 lea 0xd0(%rsp),%rax
45adaa: 00
45adab: 48 89 84 24 b8 00 00 mov %rax,0xb8(%rsp)
45adb2: 00
45adb3: c7 84 24 b4 00 00 00 movl $0x30,0xb4(%rsp)
45adba: 30 00 00 00
45adbe: c7 84 24 b0 00 00 00 movl $0x10,0xb0(%rsp)
45adc5: 10 00 00 00
45adc9: 48 63 8c 24 b0 00 00 movslq 0xb0(%rsp),%rcx
45add0: 00
45add1: 48 83 f9 28 cmp $0x28,%rcx
45add5: 77 17 ja 45adee <p_open+0xae>
45add7: 48 89 c8 mov %rcx,%rax
45adda: 48 03 84 24 c0 00 00 add 0xc0(%rsp),%rax
45ade1: 00
45ade2: 8d 49 08 lea 0x8(%rcx),%ecx
45ade5: 89 8c 24 b0 00 00 00 mov %ecx,0xb0(%rsp)
45adec: eb 14 jmp 45ae02 <p_open+0xc2>
45adee: 48 8b 84 24 b8 00 00 mov 0xb8(%rsp),%rax
45adf5: 00
45adf6: 48 8d 48 08 lea 0x8(%rax),%rcx
45adfa: 48 89 8c 24 b8 00 00 mov %rcx,0xb8(%rsp)
45ae01: 00
45ae02: 8b 10 mov (%rax),%edx
45ae04: 81 ce 00 00 08 00 or $0x80000,%esi
45ae0a: 31 c0 xor %eax,%eax
45ae0c: e8 9f 2f fb ff callq 40ddb0 <open64@plt>
45ae11: 48 81 c4 c8 00 00 00 add $0xc8,%rsp
45ae18: c3 retq
45ae19: 0f 1f 80 00 00 00 00 nopl 0x0(%rax)
000000000045ad40 <p_open>:
45ad40: 48 81 ec d8 00 00 00 sub $0xd8,%rsp
45ad47: 84 c0 test %al,%al
45ad49: 74 31 je 45ad7c <p_open+0x3c>
45ad4b: 0f 29 44 24 30 movaps %xmm0,0x30(%rsp)
45ad50: 0f 29 4c 24 40 movaps %xmm1,0x40(%rsp)
45ad55: 0f 29 54 24 50 movaps %xmm2,0x50(%rsp)
45ad5a: 0f 29 5c 24 60 movaps %xmm3,0x60(%rsp)
45ad5f: 0f 29 64 24 70 movaps %xmm4,0x70(%rsp)
45ad64: 0f 29 ac 24 80 00 00 movaps %xmm5,0x80(%rsp)
45ad6b: 00
45ad6c: 0f 29 b4 24 90 00 00 movaps %xmm6,0x90(%rsp)
45ad73: 00
45ad74: 0f 29 bc 24 a0 00 00 movaps %xmm7,0xa0(%rsp)
45ad7b: 00
45ad7c: 4c 89 4c 24 28 mov %r9,0x28(%rsp)
45ad81: 4c 89 44 24 20 mov %r8,0x20(%rsp)
45ad86: 48 89 4c 24 18 mov %rcx,0x18(%rsp)
45ad8b: 48 89 54 24 10 mov %rdx,0x10(%rsp)
45ad90: 89 b4 24 d4 00 00 00 mov %esi,0xd4(%rsp)
45ad97: 8b 84 24 d4 00 00 00 mov 0xd4(%rsp),%eax
45ad9e: 31 d2 xor %edx,%edx
45ada0: a8 40 test $0x40,%al
45ada2: 74 6d je 45ae11 <p_open+0xd1>
45ada4: 48 8d 04 24 lea (%rsp),%rax
45ada8: 48 89 84 24 c0 00 00 mov %rax,0xc0(%rsp)
45adaf: 00
45adb0: 48 8d 84 24 e0 00 00 lea 0xe0(%rsp),%rax
45adb7: 00
45adb8: 48 89 84 24 b8 00 00 mov %rax,0xb8(%rsp)
45adbf: 00
45adc0: c7 84 24 b4 00 00 00 movl $0x30,0xb4(%rsp)
45adc7: 30 00 00 00
45adcb: c7 84 24 b0 00 00 00 movl $0x10,0xb0(%rsp)
45add2: 10 00 00 00
45add6: 48 63 8c 24 b0 00 00 movslq 0xb0(%rsp),%rcx
45addd: 00
45adde: 48 83 f9 28 cmp $0x28,%rcx
45ade2: 77 17 ja 45adfb <p_open+0xbb>
45ade4: 48 89 c8 mov %rcx,%rax
45ade7: 48 03 84 24 c0 00 00 add 0xc0(%rsp),%rax
45adee: 00
45adef: 8d 49 08 lea 0x8(%rcx),%ecx
45adf2: 89 8c 24 b0 00 00 00 mov %ecx,0xb0(%rsp)
45adf9: eb 14 jmp 45ae0f <p_open+0xcf>
45adfb: 48 8b 84 24 b8 00 00 mov 0xb8(%rsp),%rax
45ae02: 00
45ae03: 48 8d 48 08 lea 0x8(%rax),%rcx
45ae07: 48 89 8c 24 b8 00 00 mov %rcx,0xb8(%rsp)
45ae0e: 00
45ae0f: 8b 10 mov (%rax),%edx
45ae11: 8b b4 24 d4 00 00 00 mov 0xd4(%rsp),%esi
45ae18: 81 ce 00 00 08 00 or $0x80000,%esi
45ae1e: 31 c0 xor %eax,%eax
45ae20: e8 8b 2f fb ff callq 40ddb0 <open64@plt>
45ae25: 48 81 c4 d8 00 00 00 add $0xd8,%rsp
45ae2c: c3 retq
45ae2d: 0f 1f 00 nopl (%rax)
000000000045ad40 <p_open>:
45ad40: 48 81 ec c8 00 00 00 sub $0xc8,%rsp
45ad47: 84 c0 test %al,%al
45ad49: 74 31 je 45ad7c <p_open+0x3c>
45ad4b: 0f 29 44 24 30 movaps %xmm0,0x30(%rsp)
45ad50: 0f 29 4c 24 40 movaps %xmm1,0x40(%rsp)
45ad55: 0f 29 54 24 50 movaps %xmm2,0x50(%rsp)
45ad5a: 0f 29 5c 24 60 movaps %xmm3,0x60(%rsp)
45ad5f: 0f 29 64 24 70 movaps %xmm4,0x70(%rsp)
45ad64: 0f 29 ac 24 80 00 00 movaps %xmm5,0x80(%rsp)
45ad6b: 00
45ad6c: 0f 29 b4 24 90 00 00 movaps %xmm6,0x90(%rsp)
45ad73: 00
45ad74: 0f 29 bc 24 a0 00 00 movaps %xmm7,0xa0(%rsp)
45ad7b: 00
45ad7c: 4c 89 4c 24 28 mov %r9,0x28(%rsp)
45ad81: 4c 89 44 24 20 mov %r8,0x20(%rsp)
45ad86: 48 89 4c 24 18 mov %rcx,0x18(%rsp)
45ad8b: 48 89 54 24 10 mov %rdx,0x10(%rsp)
45ad90: 31 d2 xor %edx,%edx
45ad92: 40 f6 c6 40 test $0x40,%sil
45ad96: 74 6d je 45ae05 <p_open+0xc5>
45ad98: 48 8d 04 24 lea (%rsp),%rax
45ad9c: 48 89 84 24 c0 00 00 mov %rax,0xc0(%rsp)
45ada3: 00
45ada4: 48 8d 84 24 d0 00 00 lea 0xd0(%rsp),%rax
45adab: 00
45adac: 48 89 84 24 b8 00 00 mov %rax,0xb8(%rsp)
45adb3: 00
45adb4: c7 84 24 b4 00 00 00 movl $0x30,0xb4(%rsp)
45adbb: 30 00 00 00
45adbf: c7 84 24 b0 00 00 00 movl $0x10,0xb0(%rsp)
45adc6: 10 00 00 00
45adca: 48 63 8c 24 b0 00 00 movslq 0xb0(%rsp),%rcx
45add1: 00
45add2: 48 83 f9 28 cmp $0x28,%rcx
45add6: 77 17 ja 45adef <p_open+0xaf>
45add8: 48 89 c8 mov %rcx,%rax
45addb: 48 03 84 24 c0 00 00 add 0xc0(%rsp),%rax
45ade2: 00
45ade3: 8d 49 08 lea 0x8(%rcx),%ecx
45ade6: 89 8c 24 b0 00 00 00 mov %ecx,0xb0(%rsp)
45aded: eb 14 jmp 45ae03 <p_open+0xc3>
45adef: 48 8b 84 24 b8 00 00 mov 0xb8(%rsp),%rax
45adf6: 00
45adf7: 48 8d 48 08 lea 0x8(%rax),%rcx
45adfb: 48 89 8c 24 b8 00 00 mov %rcx,0xb8(%rsp)
45ae02: 00
45ae03: 8b 10 mov (%rax),%edx
45ae05: 81 ce 00 00 08 00 or $0x80000,%esi
45ae0b: 31 c0 xor %eax,%eax
45ae0d: e8 9e 2f fb ff callq 40ddb0 <open64@plt>
45ae12: 48 81 c4 c8 00 00 00 add $0xc8,%rsp
45ae19: c3 retq
45ae1a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment