Created
June 6, 2018 12:19
-
-
Save KristianLyng/80763b905418e72288ee6319a5e4f57e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00000000000005c0 <main>: | |
#include <limits.h> | |
int main() { | |
int si = INT_MAX; | |
unsigned int ui = UINT_MAX; | |
printf ("si: %d (INT_MAX)\n", si); | |
5c0: 48 8d 3d fd 01 00 00 lea 0x1fd(%rip),%rdi # 7c4 <_IO_stdin_used+0x4> | |
int main() { | |
5c7: 48 83 ec 08 sub $0x8,%rsp | |
printf ("si: %d (INT_MAX)\n", si); | |
5cb: be ff ff ff 7f mov $0x7fffffff,%esi | |
5d0: 31 c0 xor %eax,%eax | |
5d2: e8 c9 ff ff ff callq 5a0 <printf@plt> | |
printf ("ui: %u (UINT_MAX)\n", ui); | |
5d7: 48 8d 3d f8 01 00 00 lea 0x1f8(%rip),%rdi # 7d6 <_IO_stdin_used+0x16> | |
5de: be ff ff ff ff mov $0xffffffff,%esi | |
5e3: 31 c0 xor %eax,%eax | |
5e5: e8 b6 ff ff ff callq 5a0 <printf@plt> | |
if (si > si + 1) | |
printf("si larger than si + 1\n"); | |
else | |
printf("si not larger than si + 1\n"); | |
5ea: 48 8d 3d f8 01 00 00 lea 0x1f8(%rip),%rdi # 7e9 <_IO_stdin_used+0x29> | |
5f1: e8 9a ff ff ff callq 590 <puts@plt> | |
if (ui > ui + 1) | |
printf("ui larger than ui + 1\n"); | |
5f6: 48 8d 3d 06 02 00 00 lea 0x206(%rip),%rdi # 803 <_IO_stdin_used+0x43> | |
5fd: e8 8e ff ff ff callq 590 <puts@plt> | |
else | |
printf("ui not larger than ui + 1\n"); | |
return 0; | |
} | |
602: 31 c0 xor %eax,%eax | |
604: 48 83 c4 08 add $0x8,%rsp | |
608: c3 retq | |
609: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment