program
stringlengths
98
1.22k
disassembly
stringlengths
6.09k
13.1k
flags
stringclasses
4 values
architecture
stringclasses
1 value
#include <stdio.h> int main() { int a = 5; int b = 10; printf("Sum: %d\n", a + b); return 0; }
/data/compiled/sample_program_1_O0_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <printf@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <printf@GLIBC_2.2.5> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 55 push %rbp 114e: 48 89 e5 mov %rsp,%rbp 1151: 48 83 ec 10 sub $0x10,%rsp 1155: c7 45 f8 05 00 00 00 movl $0x5,-0x8(%rbp) 115c: c7 45 fc 0a 00 00 00 movl $0xa,-0x4(%rbp) 1163: 8b 55 f8 mov -0x8(%rbp),%edx 1166: 8b 45 fc mov -0x4(%rbp),%eax 1169: 01 d0 add %edx,%eax 116b: 89 c6 mov %eax,%esi 116d: 48 8d 05 90 0e 00 00 lea 0xe90(%rip),%rax # 2004 <_IO_stdin_used+0x4> 1174: 48 89 c7 mov %rax,%rdi 1177: b8 00 00 00 00 mov $0x0,%eax 117c: e8 cf fe ff ff call 1050 <printf@plt> 1181: b8 00 00 00 00 mov $0x0,%eax 1186: c9 leave 1187: c3 ret Disassembly of section .fini: 0000000000001188 <_fini>: 1188: f3 0f 1e fa endbr64 118c: 48 83 ec 08 sub $0x8,%rsp 1190: 48 83 c4 08 add $0x8,%rsp 1194: c3 ret
-O0
x86
#include <stdio.h> int main() { int a = 5; int b = 10; printf("Sum: %d\n", a + b); return 0; }
/data/compiled/sample_program_1_O1_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 48 83 ec 08 sub $0x8,%rsp 1151: ba 0f 00 00 00 mov $0xf,%edx 1156: 48 8d 35 a7 0e 00 00 lea 0xea7(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 115d: bf 01 00 00 00 mov $0x1,%edi 1162: b8 00 00 00 00 mov $0x0,%eax 1167: e8 e4 fe ff ff call 1050 <__printf_chk@plt> 116c: b8 00 00 00 00 mov $0x0,%eax 1171: 48 83 c4 08 add $0x8,%rsp 1175: c3 ret Disassembly of section .fini: 0000000000001178 <_fini>: 1178: f3 0f 1e fa endbr64 117c: 48 83 ec 08 sub $0x8,%rsp 1180: 48 83 c4 08 add $0x8,%rsp 1184: c3 ret
-O1
x86
#include <stdio.h> int main() { int a = 5; int b = 10; printf("Sum: %d\n", a + b); return 0; }
/data/compiled/sample_program_1_O2_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 0f 00 00 00 mov $0xf,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O2
x86
#include <stdio.h> int main() { int a = 5; int b = 10; printf("Sum: %d\n", a + b); return 0; }
/data/compiled/sample_program_1_O3_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 0f 00 00 00 mov $0xf,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O3
x86
#include <stdio.h> int main() { int a = 5, b = 10; printf("Less than: %d\n", a < b); return 0; }
/data/compiled/sample_program_10_O0_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <printf@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <printf@GLIBC_2.2.5> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 55 push %rbp 114e: 48 89 e5 mov %rsp,%rbp 1151: 48 83 ec 10 sub $0x10,%rsp 1155: c7 45 f8 05 00 00 00 movl $0x5,-0x8(%rbp) 115c: c7 45 fc 0a 00 00 00 movl $0xa,-0x4(%rbp) 1163: 8b 45 f8 mov -0x8(%rbp),%eax 1166: 3b 45 fc cmp -0x4(%rbp),%eax 1169: 0f 9c c0 setl %al 116c: 0f b6 c0 movzbl %al,%eax 116f: 89 c6 mov %eax,%esi 1171: 48 8d 05 8c 0e 00 00 lea 0xe8c(%rip),%rax # 2004 <_IO_stdin_used+0x4> 1178: 48 89 c7 mov %rax,%rdi 117b: b8 00 00 00 00 mov $0x0,%eax 1180: e8 cb fe ff ff call 1050 <printf@plt> 1185: b8 00 00 00 00 mov $0x0,%eax 118a: c9 leave 118b: c3 ret Disassembly of section .fini: 000000000000118c <_fini>: 118c: f3 0f 1e fa endbr64 1190: 48 83 ec 08 sub $0x8,%rsp 1194: 48 83 c4 08 add $0x8,%rsp 1198: c3 ret
-O0
x86
#include <stdio.h> int main() { int a = 5, b = 10; printf("Less than: %d\n", a < b); return 0; }
/data/compiled/sample_program_10_O1_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 48 83 ec 08 sub $0x8,%rsp 1151: ba 01 00 00 00 mov $0x1,%edx 1156: 48 8d 35 a7 0e 00 00 lea 0xea7(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 115d: bf 01 00 00 00 mov $0x1,%edi 1162: b8 00 00 00 00 mov $0x0,%eax 1167: e8 e4 fe ff ff call 1050 <__printf_chk@plt> 116c: b8 00 00 00 00 mov $0x0,%eax 1171: 48 83 c4 08 add $0x8,%rsp 1175: c3 ret Disassembly of section .fini: 0000000000001178 <_fini>: 1178: f3 0f 1e fa endbr64 117c: 48 83 ec 08 sub $0x8,%rsp 1180: 48 83 c4 08 add $0x8,%rsp 1184: c3 ret
-O1
x86
#include <stdio.h> int main() { int a = 5, b = 10; printf("Less than: %d\n", a < b); return 0; }
/data/compiled/sample_program_10_O2_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 01 00 00 00 mov $0x1,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O2
x86
#include <stdio.h> int main() { int a = 5, b = 10; printf("Less than: %d\n", a < b); return 0; }
/data/compiled/sample_program_10_O3_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 01 00 00 00 mov $0x1,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O3
x86
#include <stdio.h> int main() { FILE *fp; fp = fopen("testfile1.txt", "w"); if (fp != NULL) { fprintf(fp, "Hello, world!\n"); fclose(fp); } return 0; }
/data/compiled/sample_program_11_O0_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 8a 2f 00 00 push 0x2f8a(%rip) # 3fb0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 8b 2f 00 00 bnd jmp *0x2f8b(%rip) # 3fb8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop Disassembly of section .plt.got: 0000000000001060 <__cxa_finalize@plt>: 1060: f3 0f 1e fa endbr64 1064: f2 ff 25 8d 2f 00 00 bnd jmp *0x2f8d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 106b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001070 <fclose@plt>: 1070: f3 0f 1e fa endbr64 1074: f2 ff 25 45 2f 00 00 bnd jmp *0x2f45(%rip) # 3fc0 <fclose@GLIBC_2.2.5> 107b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001080 <fopen@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 3d 2f 00 00 bnd jmp *0x2f3d(%rip) # 3fc8 <fopen@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001090 <fwrite@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 35 2f 00 00 bnd jmp *0x2f35(%rip) # 3fd0 <fwrite@GLIBC_2.2.5> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010a0 <_start>: 10a0: f3 0f 1e fa endbr64 10a4: 31 ed xor %ebp,%ebp 10a6: 49 89 d1 mov %rdx,%r9 10a9: 5e pop %rsi 10aa: 48 89 e2 mov %rsp,%rdx 10ad: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10b1: 50 push %rax 10b2: 54 push %rsp 10b3: 45 31 c0 xor %r8d,%r8d 10b6: 31 c9 xor %ecx,%ecx 10b8: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1189 <main> 10bf: ff 15 13 2f 00 00 call *0x2f13(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10c5: f4 hlt 10c6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10cd: 00 00 00 00000000000010d0 <deregister_tm_clones>: 10d0: 48 8d 3d 39 2f 00 00 lea 0x2f39(%rip),%rdi # 4010 <__TMC_END__> 10d7: 48 8d 05 32 2f 00 00 lea 0x2f32(%rip),%rax # 4010 <__TMC_END__> 10de: 48 39 f8 cmp %rdi,%rax 10e1: 74 15 je 10f8 <deregister_tm_clones+0x28> 10e3: 48 8b 05 f6 2e 00 00 mov 0x2ef6(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10ea: 48 85 c0 test %rax,%rax 10ed: 74 09 je 10f8 <deregister_tm_clones+0x28> 10ef: ff e0 jmp *%rax 10f1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <register_tm_clones>: 1100: 48 8d 3d 09 2f 00 00 lea 0x2f09(%rip),%rdi # 4010 <__TMC_END__> 1107: 48 8d 35 02 2f 00 00 lea 0x2f02(%rip),%rsi # 4010 <__TMC_END__> 110e: 48 29 fe sub %rdi,%rsi 1111: 48 89 f0 mov %rsi,%rax 1114: 48 c1 ee 3f shr $0x3f,%rsi 1118: 48 c1 f8 03 sar $0x3,%rax 111c: 48 01 c6 add %rax,%rsi 111f: 48 d1 fe sar %rsi 1122: 74 14 je 1138 <register_tm_clones+0x38> 1124: 48 8b 05 c5 2e 00 00 mov 0x2ec5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 112b: 48 85 c0 test %rax,%rax 112e: 74 08 je 1138 <register_tm_clones+0x38> 1130: ff e0 jmp *%rax 1132: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <__do_global_dtors_aux>: 1140: f3 0f 1e fa endbr64 1144: 80 3d c5 2e 00 00 00 cmpb $0x0,0x2ec5(%rip) # 4010 <__TMC_END__> 114b: 75 2b jne 1178 <__do_global_dtors_aux+0x38> 114d: 55 push %rbp 114e: 48 83 3d a2 2e 00 00 cmpq $0x0,0x2ea2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1155: 00 1156: 48 89 e5 mov %rsp,%rbp 1159: 74 0c je 1167 <__do_global_dtors_aux+0x27> 115b: 48 8b 3d a6 2e 00 00 mov 0x2ea6(%rip),%rdi # 4008 <__dso_handle> 1162: e8 f9 fe ff ff call 1060 <__cxa_finalize@plt> 1167: e8 64 ff ff ff call 10d0 <deregister_tm_clones> 116c: c6 05 9d 2e 00 00 01 movb $0x1,0x2e9d(%rip) # 4010 <__TMC_END__> 1173: 5d pop %rbp 1174: c3 ret 1175: 0f 1f 00 nopl (%rax) 1178: c3 ret 1179: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001180 <frame_dummy>: 1180: f3 0f 1e fa endbr64 1184: e9 77 ff ff ff jmp 1100 <register_tm_clones> 0000000000001189 <main>: 1189: f3 0f 1e fa endbr64 118d: 55 push %rbp 118e: 48 89 e5 mov %rsp,%rbp 1191: 48 83 ec 10 sub $0x10,%rsp 1195: 48 8d 05 68 0e 00 00 lea 0xe68(%rip),%rax # 2004 <_IO_stdin_used+0x4> 119c: 48 89 c6 mov %rax,%rsi 119f: 48 8d 05 60 0e 00 00 lea 0xe60(%rip),%rax # 2006 <_IO_stdin_used+0x6> 11a6: 48 89 c7 mov %rax,%rdi 11a9: e8 d2 fe ff ff call 1080 <fopen@plt> 11ae: 48 89 45 f8 mov %rax,-0x8(%rbp) 11b2: 48 83 7d f8 00 cmpq $0x0,-0x8(%rbp) 11b7: 74 2c je 11e5 <main+0x5c> 11b9: 48 8b 45 f8 mov -0x8(%rbp),%rax 11bd: 48 89 c1 mov %rax,%rcx 11c0: ba 0e 00 00 00 mov $0xe,%edx 11c5: be 01 00 00 00 mov $0x1,%esi 11ca: 48 8d 05 43 0e 00 00 lea 0xe43(%rip),%rax # 2014 <_IO_stdin_used+0x14> 11d1: 48 89 c7 mov %rax,%rdi 11d4: e8 b7 fe ff ff call 1090 <fwrite@plt> 11d9: 48 8b 45 f8 mov -0x8(%rbp),%rax 11dd: 48 89 c7 mov %rax,%rdi 11e0: e8 8b fe ff ff call 1070 <fclose@plt> 11e5: b8 00 00 00 00 mov $0x0,%eax 11ea: c9 leave 11eb: c3 ret Disassembly of section .fini: 00000000000011ec <_fini>: 11ec: f3 0f 1e fa endbr64 11f0: 48 83 ec 08 sub $0x8,%rsp 11f4: 48 83 c4 08 add $0x8,%rsp 11f8: c3 ret
-O0
x86
#include <stdio.h> int main() { FILE *fp; fp = fopen("testfile1.txt", "w"); if (fp != NULL) { fprintf(fp, "Hello, world!\n"); fclose(fp); } return 0; }
/data/compiled/sample_program_11_O1_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 8a 2f 00 00 push 0x2f8a(%rip) # 3fb0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 8b 2f 00 00 bnd jmp *0x2f8b(%rip) # 3fb8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop Disassembly of section .plt.got: 0000000000001060 <__cxa_finalize@plt>: 1060: f3 0f 1e fa endbr64 1064: f2 ff 25 8d 2f 00 00 bnd jmp *0x2f8d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 106b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001070 <fclose@plt>: 1070: f3 0f 1e fa endbr64 1074: f2 ff 25 45 2f 00 00 bnd jmp *0x2f45(%rip) # 3fc0 <fclose@GLIBC_2.2.5> 107b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001080 <fopen@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 3d 2f 00 00 bnd jmp *0x2f3d(%rip) # 3fc8 <fopen@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001090 <fwrite@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 35 2f 00 00 bnd jmp *0x2f35(%rip) # 3fd0 <fwrite@GLIBC_2.2.5> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010a0 <_start>: 10a0: f3 0f 1e fa endbr64 10a4: 31 ed xor %ebp,%ebp 10a6: 49 89 d1 mov %rdx,%r9 10a9: 5e pop %rsi 10aa: 48 89 e2 mov %rsp,%rdx 10ad: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10b1: 50 push %rax 10b2: 54 push %rsp 10b3: 45 31 c0 xor %r8d,%r8d 10b6: 31 c9 xor %ecx,%ecx 10b8: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1189 <main> 10bf: ff 15 13 2f 00 00 call *0x2f13(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10c5: f4 hlt 10c6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10cd: 00 00 00 00000000000010d0 <deregister_tm_clones>: 10d0: 48 8d 3d 39 2f 00 00 lea 0x2f39(%rip),%rdi # 4010 <__TMC_END__> 10d7: 48 8d 05 32 2f 00 00 lea 0x2f32(%rip),%rax # 4010 <__TMC_END__> 10de: 48 39 f8 cmp %rdi,%rax 10e1: 74 15 je 10f8 <deregister_tm_clones+0x28> 10e3: 48 8b 05 f6 2e 00 00 mov 0x2ef6(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10ea: 48 85 c0 test %rax,%rax 10ed: 74 09 je 10f8 <deregister_tm_clones+0x28> 10ef: ff e0 jmp *%rax 10f1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <register_tm_clones>: 1100: 48 8d 3d 09 2f 00 00 lea 0x2f09(%rip),%rdi # 4010 <__TMC_END__> 1107: 48 8d 35 02 2f 00 00 lea 0x2f02(%rip),%rsi # 4010 <__TMC_END__> 110e: 48 29 fe sub %rdi,%rsi 1111: 48 89 f0 mov %rsi,%rax 1114: 48 c1 ee 3f shr $0x3f,%rsi 1118: 48 c1 f8 03 sar $0x3,%rax 111c: 48 01 c6 add %rax,%rsi 111f: 48 d1 fe sar %rsi 1122: 74 14 je 1138 <register_tm_clones+0x38> 1124: 48 8b 05 c5 2e 00 00 mov 0x2ec5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 112b: 48 85 c0 test %rax,%rax 112e: 74 08 je 1138 <register_tm_clones+0x38> 1130: ff e0 jmp *%rax 1132: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <__do_global_dtors_aux>: 1140: f3 0f 1e fa endbr64 1144: 80 3d c5 2e 00 00 00 cmpb $0x0,0x2ec5(%rip) # 4010 <__TMC_END__> 114b: 75 2b jne 1178 <__do_global_dtors_aux+0x38> 114d: 55 push %rbp 114e: 48 83 3d a2 2e 00 00 cmpq $0x0,0x2ea2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1155: 00 1156: 48 89 e5 mov %rsp,%rbp 1159: 74 0c je 1167 <__do_global_dtors_aux+0x27> 115b: 48 8b 3d a6 2e 00 00 mov 0x2ea6(%rip),%rdi # 4008 <__dso_handle> 1162: e8 f9 fe ff ff call 1060 <__cxa_finalize@plt> 1167: e8 64 ff ff ff call 10d0 <deregister_tm_clones> 116c: c6 05 9d 2e 00 00 01 movb $0x1,0x2e9d(%rip) # 4010 <__TMC_END__> 1173: 5d pop %rbp 1174: c3 ret 1175: 0f 1f 00 nopl (%rax) 1178: c3 ret 1179: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001180 <frame_dummy>: 1180: f3 0f 1e fa endbr64 1184: e9 77 ff ff ff jmp 1100 <register_tm_clones> 0000000000001189 <main>: 1189: f3 0f 1e fa endbr64 118d: 53 push %rbx 118e: 48 8d 35 6f 0e 00 00 lea 0xe6f(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 1195: 48 8d 3d 6a 0e 00 00 lea 0xe6a(%rip),%rdi # 2006 <_IO_stdin_used+0x6> 119c: e8 df fe ff ff call 1080 <fopen@plt> 11a1: 48 85 c0 test %rax,%rax 11a4: 74 24 je 11ca <main+0x41> 11a6: 48 89 c3 mov %rax,%rbx 11a9: 48 89 c1 mov %rax,%rcx 11ac: ba 0e 00 00 00 mov $0xe,%edx 11b1: be 01 00 00 00 mov $0x1,%esi 11b6: 48 8d 3d 57 0e 00 00 lea 0xe57(%rip),%rdi # 2014 <_IO_stdin_used+0x14> 11bd: e8 ce fe ff ff call 1090 <fwrite@plt> 11c2: 48 89 df mov %rbx,%rdi 11c5: e8 a6 fe ff ff call 1070 <fclose@plt> 11ca: b8 00 00 00 00 mov $0x0,%eax 11cf: 5b pop %rbx 11d0: c3 ret Disassembly of section .fini: 00000000000011d4 <_fini>: 11d4: f3 0f 1e fa endbr64 11d8: 48 83 ec 08 sub $0x8,%rsp 11dc: 48 83 c4 08 add $0x8,%rsp 11e0: c3 ret
-O1
x86
#include <stdio.h> int main() { FILE *fp; fp = fopen("testfile1.txt", "w"); if (fp != NULL) { fprintf(fp, "Hello, world!\n"); fclose(fp); } return 0; }
/data/compiled/sample_program_11_O2_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 8a 2f 00 00 push 0x2f8a(%rip) # 3fb0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 8b 2f 00 00 bnd jmp *0x2f8b(%rip) # 3fb8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop Disassembly of section .plt.got: 0000000000001060 <__cxa_finalize@plt>: 1060: f3 0f 1e fa endbr64 1064: f2 ff 25 8d 2f 00 00 bnd jmp *0x2f8d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 106b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001070 <fclose@plt>: 1070: f3 0f 1e fa endbr64 1074: f2 ff 25 45 2f 00 00 bnd jmp *0x2f45(%rip) # 3fc0 <fclose@GLIBC_2.2.5> 107b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001080 <fopen@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 3d 2f 00 00 bnd jmp *0x2f3d(%rip) # 3fc8 <fopen@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001090 <fwrite@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 35 2f 00 00 bnd jmp *0x2f35(%rip) # 3fd0 <fwrite@GLIBC_2.2.5> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010a0 <main>: 10a0: f3 0f 1e fa endbr64 10a4: 55 push %rbp 10a5: 48 8d 35 58 0f 00 00 lea 0xf58(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 10ac: 48 8d 3d 53 0f 00 00 lea 0xf53(%rip),%rdi # 2006 <_IO_stdin_used+0x6> 10b3: e8 c8 ff ff ff call 1080 <fopen@plt> 10b8: 48 85 c0 test %rax,%rax 10bb: 74 24 je 10e1 <main+0x41> 10bd: 48 89 c5 mov %rax,%rbp 10c0: 48 89 c1 mov %rax,%rcx 10c3: ba 0e 00 00 00 mov $0xe,%edx 10c8: be 01 00 00 00 mov $0x1,%esi 10cd: 48 8d 3d 40 0f 00 00 lea 0xf40(%rip),%rdi # 2014 <_IO_stdin_used+0x14> 10d4: e8 b7 ff ff ff call 1090 <fwrite@plt> 10d9: 48 89 ef mov %rbp,%rdi 10dc: e8 8f ff ff ff call 1070 <fclose@plt> 10e1: 31 c0 xor %eax,%eax 10e3: 5d pop %rbp 10e4: c3 ret 10e5: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10ec: 00 00 00 10ef: 90 nop 00000000000010f0 <_start>: 10f0: f3 0f 1e fa endbr64 10f4: 31 ed xor %ebp,%ebp 10f6: 49 89 d1 mov %rdx,%r9 10f9: 5e pop %rsi 10fa: 48 89 e2 mov %rsp,%rdx 10fd: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1101: 50 push %rax 1102: 54 push %rsp 1103: 45 31 c0 xor %r8d,%r8d 1106: 31 c9 xor %ecx,%ecx 1108: 48 8d 3d 91 ff ff ff lea -0x6f(%rip),%rdi # 10a0 <main> 110f: ff 15 c3 2e 00 00 call *0x2ec3(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1115: f4 hlt 1116: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 111d: 00 00 00 0000000000001120 <deregister_tm_clones>: 1120: 48 8d 3d e9 2e 00 00 lea 0x2ee9(%rip),%rdi # 4010 <__TMC_END__> 1127: 48 8d 05 e2 2e 00 00 lea 0x2ee2(%rip),%rax # 4010 <__TMC_END__> 112e: 48 39 f8 cmp %rdi,%rax 1131: 74 15 je 1148 <deregister_tm_clones+0x28> 1133: 48 8b 05 a6 2e 00 00 mov 0x2ea6(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 113a: 48 85 c0 test %rax,%rax 113d: 74 09 je 1148 <deregister_tm_clones+0x28> 113f: ff e0 jmp *%rax 1141: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 1148: c3 ret 1149: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001150 <register_tm_clones>: 1150: 48 8d 3d b9 2e 00 00 lea 0x2eb9(%rip),%rdi # 4010 <__TMC_END__> 1157: 48 8d 35 b2 2e 00 00 lea 0x2eb2(%rip),%rsi # 4010 <__TMC_END__> 115e: 48 29 fe sub %rdi,%rsi 1161: 48 89 f0 mov %rsi,%rax 1164: 48 c1 ee 3f shr $0x3f,%rsi 1168: 48 c1 f8 03 sar $0x3,%rax 116c: 48 01 c6 add %rax,%rsi 116f: 48 d1 fe sar %rsi 1172: 74 14 je 1188 <register_tm_clones+0x38> 1174: 48 8b 05 75 2e 00 00 mov 0x2e75(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 117b: 48 85 c0 test %rax,%rax 117e: 74 08 je 1188 <register_tm_clones+0x38> 1180: ff e0 jmp *%rax 1182: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1188: c3 ret 1189: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001190 <__do_global_dtors_aux>: 1190: f3 0f 1e fa endbr64 1194: 80 3d 75 2e 00 00 00 cmpb $0x0,0x2e75(%rip) # 4010 <__TMC_END__> 119b: 75 2b jne 11c8 <__do_global_dtors_aux+0x38> 119d: 55 push %rbp 119e: 48 83 3d 52 2e 00 00 cmpq $0x0,0x2e52(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 11a5: 00 11a6: 48 89 e5 mov %rsp,%rbp 11a9: 74 0c je 11b7 <__do_global_dtors_aux+0x27> 11ab: 48 8b 3d 56 2e 00 00 mov 0x2e56(%rip),%rdi # 4008 <__dso_handle> 11b2: e8 a9 fe ff ff call 1060 <__cxa_finalize@plt> 11b7: e8 64 ff ff ff call 1120 <deregister_tm_clones> 11bc: c6 05 4d 2e 00 00 01 movb $0x1,0x2e4d(%rip) # 4010 <__TMC_END__> 11c3: 5d pop %rbp 11c4: c3 ret 11c5: 0f 1f 00 nopl (%rax) 11c8: c3 ret 11c9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011d0 <frame_dummy>: 11d0: f3 0f 1e fa endbr64 11d4: e9 77 ff ff ff jmp 1150 <register_tm_clones> Disassembly of section .fini: 00000000000011dc <_fini>: 11dc: f3 0f 1e fa endbr64 11e0: 48 83 ec 08 sub $0x8,%rsp 11e4: 48 83 c4 08 add $0x8,%rsp 11e8: c3 ret
-O2
x86
#include <stdio.h> int main() { FILE *fp; fp = fopen("testfile1.txt", "w"); if (fp != NULL) { fprintf(fp, "Hello, world!\n"); fclose(fp); } return 0; }
/data/compiled/sample_program_11_O3_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 8a 2f 00 00 push 0x2f8a(%rip) # 3fb0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 8b 2f 00 00 bnd jmp *0x2f8b(%rip) # 3fb8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop Disassembly of section .plt.got: 0000000000001060 <__cxa_finalize@plt>: 1060: f3 0f 1e fa endbr64 1064: f2 ff 25 8d 2f 00 00 bnd jmp *0x2f8d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 106b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001070 <fclose@plt>: 1070: f3 0f 1e fa endbr64 1074: f2 ff 25 45 2f 00 00 bnd jmp *0x2f45(%rip) # 3fc0 <fclose@GLIBC_2.2.5> 107b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001080 <fopen@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 3d 2f 00 00 bnd jmp *0x2f3d(%rip) # 3fc8 <fopen@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001090 <fwrite@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 35 2f 00 00 bnd jmp *0x2f35(%rip) # 3fd0 <fwrite@GLIBC_2.2.5> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010a0 <main>: 10a0: f3 0f 1e fa endbr64 10a4: 55 push %rbp 10a5: 48 8d 35 58 0f 00 00 lea 0xf58(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 10ac: 48 8d 3d 53 0f 00 00 lea 0xf53(%rip),%rdi # 2006 <_IO_stdin_used+0x6> 10b3: e8 c8 ff ff ff call 1080 <fopen@plt> 10b8: 48 85 c0 test %rax,%rax 10bb: 74 24 je 10e1 <main+0x41> 10bd: 48 89 c5 mov %rax,%rbp 10c0: 48 89 c1 mov %rax,%rcx 10c3: ba 0e 00 00 00 mov $0xe,%edx 10c8: be 01 00 00 00 mov $0x1,%esi 10cd: 48 8d 3d 40 0f 00 00 lea 0xf40(%rip),%rdi # 2014 <_IO_stdin_used+0x14> 10d4: e8 b7 ff ff ff call 1090 <fwrite@plt> 10d9: 48 89 ef mov %rbp,%rdi 10dc: e8 8f ff ff ff call 1070 <fclose@plt> 10e1: 31 c0 xor %eax,%eax 10e3: 5d pop %rbp 10e4: c3 ret 10e5: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10ec: 00 00 00 10ef: 90 nop 00000000000010f0 <_start>: 10f0: f3 0f 1e fa endbr64 10f4: 31 ed xor %ebp,%ebp 10f6: 49 89 d1 mov %rdx,%r9 10f9: 5e pop %rsi 10fa: 48 89 e2 mov %rsp,%rdx 10fd: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1101: 50 push %rax 1102: 54 push %rsp 1103: 45 31 c0 xor %r8d,%r8d 1106: 31 c9 xor %ecx,%ecx 1108: 48 8d 3d 91 ff ff ff lea -0x6f(%rip),%rdi # 10a0 <main> 110f: ff 15 c3 2e 00 00 call *0x2ec3(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1115: f4 hlt 1116: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 111d: 00 00 00 0000000000001120 <deregister_tm_clones>: 1120: 48 8d 3d e9 2e 00 00 lea 0x2ee9(%rip),%rdi # 4010 <__TMC_END__> 1127: 48 8d 05 e2 2e 00 00 lea 0x2ee2(%rip),%rax # 4010 <__TMC_END__> 112e: 48 39 f8 cmp %rdi,%rax 1131: 74 15 je 1148 <deregister_tm_clones+0x28> 1133: 48 8b 05 a6 2e 00 00 mov 0x2ea6(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 113a: 48 85 c0 test %rax,%rax 113d: 74 09 je 1148 <deregister_tm_clones+0x28> 113f: ff e0 jmp *%rax 1141: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 1148: c3 ret 1149: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001150 <register_tm_clones>: 1150: 48 8d 3d b9 2e 00 00 lea 0x2eb9(%rip),%rdi # 4010 <__TMC_END__> 1157: 48 8d 35 b2 2e 00 00 lea 0x2eb2(%rip),%rsi # 4010 <__TMC_END__> 115e: 48 29 fe sub %rdi,%rsi 1161: 48 89 f0 mov %rsi,%rax 1164: 48 c1 ee 3f shr $0x3f,%rsi 1168: 48 c1 f8 03 sar $0x3,%rax 116c: 48 01 c6 add %rax,%rsi 116f: 48 d1 fe sar %rsi 1172: 74 14 je 1188 <register_tm_clones+0x38> 1174: 48 8b 05 75 2e 00 00 mov 0x2e75(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 117b: 48 85 c0 test %rax,%rax 117e: 74 08 je 1188 <register_tm_clones+0x38> 1180: ff e0 jmp *%rax 1182: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1188: c3 ret 1189: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001190 <__do_global_dtors_aux>: 1190: f3 0f 1e fa endbr64 1194: 80 3d 75 2e 00 00 00 cmpb $0x0,0x2e75(%rip) # 4010 <__TMC_END__> 119b: 75 2b jne 11c8 <__do_global_dtors_aux+0x38> 119d: 55 push %rbp 119e: 48 83 3d 52 2e 00 00 cmpq $0x0,0x2e52(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 11a5: 00 11a6: 48 89 e5 mov %rsp,%rbp 11a9: 74 0c je 11b7 <__do_global_dtors_aux+0x27> 11ab: 48 8b 3d 56 2e 00 00 mov 0x2e56(%rip),%rdi # 4008 <__dso_handle> 11b2: e8 a9 fe ff ff call 1060 <__cxa_finalize@plt> 11b7: e8 64 ff ff ff call 1120 <deregister_tm_clones> 11bc: c6 05 4d 2e 00 00 01 movb $0x1,0x2e4d(%rip) # 4010 <__TMC_END__> 11c3: 5d pop %rbp 11c4: c3 ret 11c5: 0f 1f 00 nopl (%rax) 11c8: c3 ret 11c9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011d0 <frame_dummy>: 11d0: f3 0f 1e fa endbr64 11d4: e9 77 ff ff ff jmp 1150 <register_tm_clones> Disassembly of section .fini: 00000000000011dc <_fini>: 11dc: f3 0f 1e fa endbr64 11e0: 48 83 ec 08 sub $0x8,%rsp 11e4: 48 83 c4 08 add $0x8,%rsp 11e8: c3 ret
-O3
x86
#include <stdio.h> int main() { FILE *fp; char buffer[100]; fp = fopen("testfile2.txt", "r"); if (fp != NULL) { while (fgets(buffer, 100, fp) != NULL) { printf("%s", buffer); } fclose(fp); } return 0; }
/data/compiled/sample_program_12_O0_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 7a 2f 00 00 push 0x2f7a(%rip) # 3fa0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 7b 2f 00 00 bnd jmp *0x2f7b(%rip) # 3fa8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop 1070: f3 0f 1e fa endbr64 1074: 68 04 00 00 00 push $0x4 1079: f2 e9 a1 ff ff ff bnd jmp 1020 <_init+0x20> 107f: 90 nop Disassembly of section .plt.got: 0000000000001080 <__cxa_finalize@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 6d 2f 00 00 bnd jmp *0x2f6d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001090 <fclose@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 15 2f 00 00 bnd jmp *0x2f15(%rip) # 3fb0 <fclose@GLIBC_2.2.5> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010a0 <__stack_chk_fail@plt>: 10a0: f3 0f 1e fa endbr64 10a4: f2 ff 25 0d 2f 00 00 bnd jmp *0x2f0d(%rip) # 3fb8 <__stack_chk_fail@GLIBC_2.4> 10ab: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010b0 <printf@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 05 2f 00 00 bnd jmp *0x2f05(%rip) # 3fc0 <printf@GLIBC_2.2.5> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010c0 <fgets@plt>: 10c0: f3 0f 1e fa endbr64 10c4: f2 ff 25 fd 2e 00 00 bnd jmp *0x2efd(%rip) # 3fc8 <fgets@GLIBC_2.2.5> 10cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010d0 <fopen@plt>: 10d0: f3 0f 1e fa endbr64 10d4: f2 ff 25 f5 2e 00 00 bnd jmp *0x2ef5(%rip) # 3fd0 <fopen@GLIBC_2.2.5> 10db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010e0 <_start>: 10e0: f3 0f 1e fa endbr64 10e4: 31 ed xor %ebp,%ebp 10e6: 49 89 d1 mov %rdx,%r9 10e9: 5e pop %rsi 10ea: 48 89 e2 mov %rsp,%rdx 10ed: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10f1: 50 push %rax 10f2: 54 push %rsp 10f3: 45 31 c0 xor %r8d,%r8d 10f6: 31 c9 xor %ecx,%ecx 10f8: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 11c9 <main> 10ff: ff 15 d3 2e 00 00 call *0x2ed3(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1105: f4 hlt 1106: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 110d: 00 00 00 0000000000001110 <deregister_tm_clones>: 1110: 48 8d 3d f9 2e 00 00 lea 0x2ef9(%rip),%rdi # 4010 <__TMC_END__> 1117: 48 8d 05 f2 2e 00 00 lea 0x2ef2(%rip),%rax # 4010 <__TMC_END__> 111e: 48 39 f8 cmp %rdi,%rax 1121: 74 15 je 1138 <deregister_tm_clones+0x28> 1123: 48 8b 05 b6 2e 00 00 mov 0x2eb6(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 112a: 48 85 c0 test %rax,%rax 112d: 74 09 je 1138 <deregister_tm_clones+0x28> 112f: ff e0 jmp *%rax 1131: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <register_tm_clones>: 1140: 48 8d 3d c9 2e 00 00 lea 0x2ec9(%rip),%rdi # 4010 <__TMC_END__> 1147: 48 8d 35 c2 2e 00 00 lea 0x2ec2(%rip),%rsi # 4010 <__TMC_END__> 114e: 48 29 fe sub %rdi,%rsi 1151: 48 89 f0 mov %rsi,%rax 1154: 48 c1 ee 3f shr $0x3f,%rsi 1158: 48 c1 f8 03 sar $0x3,%rax 115c: 48 01 c6 add %rax,%rsi 115f: 48 d1 fe sar %rsi 1162: 74 14 je 1178 <register_tm_clones+0x38> 1164: 48 8b 05 85 2e 00 00 mov 0x2e85(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 116b: 48 85 c0 test %rax,%rax 116e: 74 08 je 1178 <register_tm_clones+0x38> 1170: ff e0 jmp *%rax 1172: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1178: c3 ret 1179: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001180 <__do_global_dtors_aux>: 1180: f3 0f 1e fa endbr64 1184: 80 3d 85 2e 00 00 00 cmpb $0x0,0x2e85(%rip) # 4010 <__TMC_END__> 118b: 75 2b jne 11b8 <__do_global_dtors_aux+0x38> 118d: 55 push %rbp 118e: 48 83 3d 62 2e 00 00 cmpq $0x0,0x2e62(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1195: 00 1196: 48 89 e5 mov %rsp,%rbp 1199: 74 0c je 11a7 <__do_global_dtors_aux+0x27> 119b: 48 8b 3d 66 2e 00 00 mov 0x2e66(%rip),%rdi # 4008 <__dso_handle> 11a2: e8 d9 fe ff ff call 1080 <__cxa_finalize@plt> 11a7: e8 64 ff ff ff call 1110 <deregister_tm_clones> 11ac: c6 05 5d 2e 00 00 01 movb $0x1,0x2e5d(%rip) # 4010 <__TMC_END__> 11b3: 5d pop %rbp 11b4: c3 ret 11b5: 0f 1f 00 nopl (%rax) 11b8: c3 ret 11b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011c0 <frame_dummy>: 11c0: f3 0f 1e fa endbr64 11c4: e9 77 ff ff ff jmp 1140 <register_tm_clones> 00000000000011c9 <main>: 11c9: f3 0f 1e fa endbr64 11cd: 55 push %rbp 11ce: 48 89 e5 mov %rsp,%rbp 11d1: 48 83 c4 80 add $0xffffffffffffff80,%rsp 11d5: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 11dc: 00 00 11de: 48 89 45 f8 mov %rax,-0x8(%rbp) 11e2: 31 c0 xor %eax,%eax 11e4: 48 8d 05 19 0e 00 00 lea 0xe19(%rip),%rax # 2004 <_IO_stdin_used+0x4> 11eb: 48 89 c6 mov %rax,%rsi 11ee: 48 8d 05 11 0e 00 00 lea 0xe11(%rip),%rax # 2006 <_IO_stdin_used+0x6> 11f5: 48 89 c7 mov %rax,%rdi 11f8: e8 d3 fe ff ff call 10d0 <fopen@plt> 11fd: 48 89 45 88 mov %rax,-0x78(%rbp) 1201: 48 83 7d 88 00 cmpq $0x0,-0x78(%rbp) 1206: 74 43 je 124b <main+0x82> 1208: eb 1b jmp 1225 <main+0x5c> 120a: 48 8d 45 90 lea -0x70(%rbp),%rax 120e: 48 89 c6 mov %rax,%rsi 1211: 48 8d 05 fc 0d 00 00 lea 0xdfc(%rip),%rax # 2014 <_IO_stdin_used+0x14> 1218: 48 89 c7 mov %rax,%rdi 121b: b8 00 00 00 00 mov $0x0,%eax 1220: e8 8b fe ff ff call 10b0 <printf@plt> 1225: 48 8b 55 88 mov -0x78(%rbp),%rdx 1229: 48 8d 45 90 lea -0x70(%rbp),%rax 122d: be 64 00 00 00 mov $0x64,%esi 1232: 48 89 c7 mov %rax,%rdi 1235: e8 86 fe ff ff call 10c0 <fgets@plt> 123a: 48 85 c0 test %rax,%rax 123d: 75 cb jne 120a <main+0x41> 123f: 48 8b 45 88 mov -0x78(%rbp),%rax 1243: 48 89 c7 mov %rax,%rdi 1246: e8 45 fe ff ff call 1090 <fclose@plt> 124b: b8 00 00 00 00 mov $0x0,%eax 1250: 48 8b 55 f8 mov -0x8(%rbp),%rdx 1254: 64 48 2b 14 25 28 00 sub %fs:0x28,%rdx 125b: 00 00 125d: 74 05 je 1264 <main+0x9b> 125f: e8 3c fe ff ff call 10a0 <__stack_chk_fail@plt> 1264: c9 leave 1265: c3 ret Disassembly of section .fini: 0000000000001268 <_fini>: 1268: f3 0f 1e fa endbr64 126c: 48 83 ec 08 sub $0x8,%rsp 1270: 48 83 c4 08 add $0x8,%rsp 1274: c3 ret
-O0
x86
#include <stdio.h> int main() { FILE *fp; char buffer[100]; fp = fopen("testfile2.txt", "r"); if (fp != NULL) { while (fgets(buffer, 100, fp) != NULL) { printf("%s", buffer); } fclose(fp); } return 0; }
/data/compiled/sample_program_12_O1_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 7a 2f 00 00 push 0x2f7a(%rip) # 3fa0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 7b 2f 00 00 bnd jmp *0x2f7b(%rip) # 3fa8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop 1070: f3 0f 1e fa endbr64 1074: 68 04 00 00 00 push $0x4 1079: f2 e9 a1 ff ff ff bnd jmp 1020 <_init+0x20> 107f: 90 nop Disassembly of section .plt.got: 0000000000001080 <__cxa_finalize@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 6d 2f 00 00 bnd jmp *0x2f6d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001090 <fclose@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 15 2f 00 00 bnd jmp *0x2f15(%rip) # 3fb0 <fclose@GLIBC_2.2.5> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010a0 <__stack_chk_fail@plt>: 10a0: f3 0f 1e fa endbr64 10a4: f2 ff 25 0d 2f 00 00 bnd jmp *0x2f0d(%rip) # 3fb8 <__stack_chk_fail@GLIBC_2.4> 10ab: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010b0 <fgets@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 05 2f 00 00 bnd jmp *0x2f05(%rip) # 3fc0 <fgets@GLIBC_2.2.5> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010c0 <__printf_chk@plt>: 10c0: f3 0f 1e fa endbr64 10c4: f2 ff 25 fd 2e 00 00 bnd jmp *0x2efd(%rip) # 3fc8 <__printf_chk@GLIBC_2.3.4> 10cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010d0 <fopen@plt>: 10d0: f3 0f 1e fa endbr64 10d4: f2 ff 25 f5 2e 00 00 bnd jmp *0x2ef5(%rip) # 3fd0 <fopen@GLIBC_2.2.5> 10db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010e0 <_start>: 10e0: f3 0f 1e fa endbr64 10e4: 31 ed xor %ebp,%ebp 10e6: 49 89 d1 mov %rdx,%r9 10e9: 5e pop %rsi 10ea: 48 89 e2 mov %rsp,%rdx 10ed: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10f1: 50 push %rax 10f2: 54 push %rsp 10f3: 45 31 c0 xor %r8d,%r8d 10f6: 31 c9 xor %ecx,%ecx 10f8: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 11c9 <main> 10ff: ff 15 d3 2e 00 00 call *0x2ed3(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1105: f4 hlt 1106: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 110d: 00 00 00 0000000000001110 <deregister_tm_clones>: 1110: 48 8d 3d f9 2e 00 00 lea 0x2ef9(%rip),%rdi # 4010 <__TMC_END__> 1117: 48 8d 05 f2 2e 00 00 lea 0x2ef2(%rip),%rax # 4010 <__TMC_END__> 111e: 48 39 f8 cmp %rdi,%rax 1121: 74 15 je 1138 <deregister_tm_clones+0x28> 1123: 48 8b 05 b6 2e 00 00 mov 0x2eb6(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 112a: 48 85 c0 test %rax,%rax 112d: 74 09 je 1138 <deregister_tm_clones+0x28> 112f: ff e0 jmp *%rax 1131: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <register_tm_clones>: 1140: 48 8d 3d c9 2e 00 00 lea 0x2ec9(%rip),%rdi # 4010 <__TMC_END__> 1147: 48 8d 35 c2 2e 00 00 lea 0x2ec2(%rip),%rsi # 4010 <__TMC_END__> 114e: 48 29 fe sub %rdi,%rsi 1151: 48 89 f0 mov %rsi,%rax 1154: 48 c1 ee 3f shr $0x3f,%rsi 1158: 48 c1 f8 03 sar $0x3,%rax 115c: 48 01 c6 add %rax,%rsi 115f: 48 d1 fe sar %rsi 1162: 74 14 je 1178 <register_tm_clones+0x38> 1164: 48 8b 05 85 2e 00 00 mov 0x2e85(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 116b: 48 85 c0 test %rax,%rax 116e: 74 08 je 1178 <register_tm_clones+0x38> 1170: ff e0 jmp *%rax 1172: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1178: c3 ret 1179: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001180 <__do_global_dtors_aux>: 1180: f3 0f 1e fa endbr64 1184: 80 3d 85 2e 00 00 00 cmpb $0x0,0x2e85(%rip) # 4010 <__TMC_END__> 118b: 75 2b jne 11b8 <__do_global_dtors_aux+0x38> 118d: 55 push %rbp 118e: 48 83 3d 62 2e 00 00 cmpq $0x0,0x2e62(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1195: 00 1196: 48 89 e5 mov %rsp,%rbp 1199: 74 0c je 11a7 <__do_global_dtors_aux+0x27> 119b: 48 8b 3d 66 2e 00 00 mov 0x2e66(%rip),%rdi # 4008 <__dso_handle> 11a2: e8 d9 fe ff ff call 1080 <__cxa_finalize@plt> 11a7: e8 64 ff ff ff call 1110 <deregister_tm_clones> 11ac: c6 05 5d 2e 00 00 01 movb $0x1,0x2e5d(%rip) # 4010 <__TMC_END__> 11b3: 5d pop %rbp 11b4: c3 ret 11b5: 0f 1f 00 nopl (%rax) 11b8: c3 ret 11b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011c0 <frame_dummy>: 11c0: f3 0f 1e fa endbr64 11c4: e9 77 ff ff ff jmp 1140 <register_tm_clones> 00000000000011c9 <main>: 11c9: f3 0f 1e fa endbr64 11cd: 55 push %rbp 11ce: 53 push %rbx 11cf: 48 83 ec 78 sub $0x78,%rsp 11d3: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 11da: 00 00 11dc: 48 89 44 24 68 mov %rax,0x68(%rsp) 11e1: 31 c0 xor %eax,%eax 11e3: 48 8d 35 1a 0e 00 00 lea 0xe1a(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 11ea: 48 8d 3d 15 0e 00 00 lea 0xe15(%rip),%rdi # 2006 <_IO_stdin_used+0x6> 11f1: e8 da fe ff ff call 10d0 <fopen@plt> 11f6: 48 85 c0 test %rax,%rax 11f9: 74 3e je 1239 <main+0x70> 11fb: 48 89 c3 mov %rax,%rbx 11fe: 48 8d 2d 0f 0e 00 00 lea 0xe0f(%rip),%rbp # 2014 <_IO_stdin_used+0x14> 1205: eb 15 jmp 121c <main+0x53> 1207: 48 89 e2 mov %rsp,%rdx 120a: 48 89 ee mov %rbp,%rsi 120d: bf 01 00 00 00 mov $0x1,%edi 1212: b8 00 00 00 00 mov $0x0,%eax 1217: e8 a4 fe ff ff call 10c0 <__printf_chk@plt> 121c: 48 89 e7 mov %rsp,%rdi 121f: 48 89 da mov %rbx,%rdx 1222: be 64 00 00 00 mov $0x64,%esi 1227: e8 84 fe ff ff call 10b0 <fgets@plt> 122c: 48 85 c0 test %rax,%rax 122f: 75 d6 jne 1207 <main+0x3e> 1231: 48 89 df mov %rbx,%rdi 1234: e8 57 fe ff ff call 1090 <fclose@plt> 1239: 48 8b 44 24 68 mov 0x68(%rsp),%rax 123e: 64 48 2b 04 25 28 00 sub %fs:0x28,%rax 1245: 00 00 1247: 75 0c jne 1255 <main+0x8c> 1249: b8 00 00 00 00 mov $0x0,%eax 124e: 48 83 c4 78 add $0x78,%rsp 1252: 5b pop %rbx 1253: 5d pop %rbp 1254: c3 ret 1255: e8 46 fe ff ff call 10a0 <__stack_chk_fail@plt> Disassembly of section .fini: 000000000000125c <_fini>: 125c: f3 0f 1e fa endbr64 1260: 48 83 ec 08 sub $0x8,%rsp 1264: 48 83 c4 08 add $0x8,%rsp 1268: c3 ret
-O1
x86
#include <stdio.h> int main() { FILE *fp; char buffer[100]; fp = fopen("testfile2.txt", "r"); if (fp != NULL) { while (fgets(buffer, 100, fp) != NULL) { printf("%s", buffer); } fclose(fp); } return 0; }
/data/compiled/sample_program_12_O2_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 7a 2f 00 00 push 0x2f7a(%rip) # 3fa0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 7b 2f 00 00 bnd jmp *0x2f7b(%rip) # 3fa8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop 1070: f3 0f 1e fa endbr64 1074: 68 04 00 00 00 push $0x4 1079: f2 e9 a1 ff ff ff bnd jmp 1020 <_init+0x20> 107f: 90 nop Disassembly of section .plt.got: 0000000000001080 <__cxa_finalize@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 6d 2f 00 00 bnd jmp *0x2f6d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001090 <fclose@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 15 2f 00 00 bnd jmp *0x2f15(%rip) # 3fb0 <fclose@GLIBC_2.2.5> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010a0 <__stack_chk_fail@plt>: 10a0: f3 0f 1e fa endbr64 10a4: f2 ff 25 0d 2f 00 00 bnd jmp *0x2f0d(%rip) # 3fb8 <__stack_chk_fail@GLIBC_2.4> 10ab: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010b0 <fgets@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 05 2f 00 00 bnd jmp *0x2f05(%rip) # 3fc0 <fgets@GLIBC_2.2.5> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010c0 <__printf_chk@plt>: 10c0: f3 0f 1e fa endbr64 10c4: f2 ff 25 fd 2e 00 00 bnd jmp *0x2efd(%rip) # 3fc8 <__printf_chk@GLIBC_2.3.4> 10cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010d0 <fopen@plt>: 10d0: f3 0f 1e fa endbr64 10d4: f2 ff 25 f5 2e 00 00 bnd jmp *0x2ef5(%rip) # 3fd0 <fopen@GLIBC_2.2.5> 10db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010e0 <main>: 10e0: f3 0f 1e fa endbr64 10e4: 41 54 push %r12 10e6: 48 8d 35 17 0f 00 00 lea 0xf17(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 10ed: 48 8d 3d 12 0f 00 00 lea 0xf12(%rip),%rdi # 2006 <_IO_stdin_used+0x6> 10f4: 55 push %rbp 10f5: 53 push %rbx 10f6: 48 83 ec 70 sub $0x70,%rsp 10fa: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 1101: 00 00 1103: 48 89 44 24 68 mov %rax,0x68(%rsp) 1108: 31 c0 xor %eax,%eax 110a: e8 c1 ff ff ff call 10d0 <fopen@plt> 110f: 48 85 c0 test %rax,%rax 1112: 74 43 je 1157 <main+0x77> 1114: 48 89 c5 mov %rax,%rbp 1117: 48 89 e3 mov %rsp,%rbx 111a: 4c 8d 25 f3 0e 00 00 lea 0xef3(%rip),%r12 # 2014 <_IO_stdin_used+0x14> 1121: eb 17 jmp 113a <main+0x5a> 1123: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 1128: 48 89 da mov %rbx,%rdx 112b: 4c 89 e6 mov %r12,%rsi 112e: bf 01 00 00 00 mov $0x1,%edi 1133: 31 c0 xor %eax,%eax 1135: e8 86 ff ff ff call 10c0 <__printf_chk@plt> 113a: 48 89 ea mov %rbp,%rdx 113d: be 64 00 00 00 mov $0x64,%esi 1142: 48 89 df mov %rbx,%rdi 1145: e8 66 ff ff ff call 10b0 <fgets@plt> 114a: 48 85 c0 test %rax,%rax 114d: 75 d9 jne 1128 <main+0x48> 114f: 48 89 ef mov %rbp,%rdi 1152: e8 39 ff ff ff call 1090 <fclose@plt> 1157: 48 8b 44 24 68 mov 0x68(%rsp),%rax 115c: 64 48 2b 04 25 28 00 sub %fs:0x28,%rax 1163: 00 00 1165: 75 0b jne 1172 <main+0x92> 1167: 48 83 c4 70 add $0x70,%rsp 116b: 31 c0 xor %eax,%eax 116d: 5b pop %rbx 116e: 5d pop %rbp 116f: 41 5c pop %r12 1171: c3 ret 1172: e8 29 ff ff ff call 10a0 <__stack_chk_fail@plt> 1177: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 117e: 00 00 0000000000001180 <_start>: 1180: f3 0f 1e fa endbr64 1184: 31 ed xor %ebp,%ebp 1186: 49 89 d1 mov %rdx,%r9 1189: 5e pop %rsi 118a: 48 89 e2 mov %rsp,%rdx 118d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1191: 50 push %rax 1192: 54 push %rsp 1193: 45 31 c0 xor %r8d,%r8d 1196: 31 c9 xor %ecx,%ecx 1198: 48 8d 3d 41 ff ff ff lea -0xbf(%rip),%rdi # 10e0 <main> 119f: ff 15 33 2e 00 00 call *0x2e33(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 11a5: f4 hlt 11a6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 11ad: 00 00 00 00000000000011b0 <deregister_tm_clones>: 11b0: 48 8d 3d 59 2e 00 00 lea 0x2e59(%rip),%rdi # 4010 <__TMC_END__> 11b7: 48 8d 05 52 2e 00 00 lea 0x2e52(%rip),%rax # 4010 <__TMC_END__> 11be: 48 39 f8 cmp %rdi,%rax 11c1: 74 15 je 11d8 <deregister_tm_clones+0x28> 11c3: 48 8b 05 16 2e 00 00 mov 0x2e16(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 11ca: 48 85 c0 test %rax,%rax 11cd: 74 09 je 11d8 <deregister_tm_clones+0x28> 11cf: ff e0 jmp *%rax 11d1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 11d8: c3 ret 11d9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011e0 <register_tm_clones>: 11e0: 48 8d 3d 29 2e 00 00 lea 0x2e29(%rip),%rdi # 4010 <__TMC_END__> 11e7: 48 8d 35 22 2e 00 00 lea 0x2e22(%rip),%rsi # 4010 <__TMC_END__> 11ee: 48 29 fe sub %rdi,%rsi 11f1: 48 89 f0 mov %rsi,%rax 11f4: 48 c1 ee 3f shr $0x3f,%rsi 11f8: 48 c1 f8 03 sar $0x3,%rax 11fc: 48 01 c6 add %rax,%rsi 11ff: 48 d1 fe sar %rsi 1202: 74 14 je 1218 <register_tm_clones+0x38> 1204: 48 8b 05 e5 2d 00 00 mov 0x2de5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 120b: 48 85 c0 test %rax,%rax 120e: 74 08 je 1218 <register_tm_clones+0x38> 1210: ff e0 jmp *%rax 1212: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1218: c3 ret 1219: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001220 <__do_global_dtors_aux>: 1220: f3 0f 1e fa endbr64 1224: 80 3d e5 2d 00 00 00 cmpb $0x0,0x2de5(%rip) # 4010 <__TMC_END__> 122b: 75 2b jne 1258 <__do_global_dtors_aux+0x38> 122d: 55 push %rbp 122e: 48 83 3d c2 2d 00 00 cmpq $0x0,0x2dc2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1235: 00 1236: 48 89 e5 mov %rsp,%rbp 1239: 74 0c je 1247 <__do_global_dtors_aux+0x27> 123b: 48 8b 3d c6 2d 00 00 mov 0x2dc6(%rip),%rdi # 4008 <__dso_handle> 1242: e8 39 fe ff ff call 1080 <__cxa_finalize@plt> 1247: e8 64 ff ff ff call 11b0 <deregister_tm_clones> 124c: c6 05 bd 2d 00 00 01 movb $0x1,0x2dbd(%rip) # 4010 <__TMC_END__> 1253: 5d pop %rbp 1254: c3 ret 1255: 0f 1f 00 nopl (%rax) 1258: c3 ret 1259: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001260 <frame_dummy>: 1260: f3 0f 1e fa endbr64 1264: e9 77 ff ff ff jmp 11e0 <register_tm_clones> Disassembly of section .fini: 000000000000126c <_fini>: 126c: f3 0f 1e fa endbr64 1270: 48 83 ec 08 sub $0x8,%rsp 1274: 48 83 c4 08 add $0x8,%rsp 1278: c3 ret
-O2
x86
#include <stdio.h> int main() { FILE *fp; char buffer[100]; fp = fopen("testfile2.txt", "r"); if (fp != NULL) { while (fgets(buffer, 100, fp) != NULL) { printf("%s", buffer); } fclose(fp); } return 0; }
/data/compiled/sample_program_12_O3_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 7a 2f 00 00 push 0x2f7a(%rip) # 3fa0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 7b 2f 00 00 bnd jmp *0x2f7b(%rip) # 3fa8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop 1070: f3 0f 1e fa endbr64 1074: 68 04 00 00 00 push $0x4 1079: f2 e9 a1 ff ff ff bnd jmp 1020 <_init+0x20> 107f: 90 nop Disassembly of section .plt.got: 0000000000001080 <__cxa_finalize@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 6d 2f 00 00 bnd jmp *0x2f6d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001090 <fclose@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 15 2f 00 00 bnd jmp *0x2f15(%rip) # 3fb0 <fclose@GLIBC_2.2.5> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010a0 <__stack_chk_fail@plt>: 10a0: f3 0f 1e fa endbr64 10a4: f2 ff 25 0d 2f 00 00 bnd jmp *0x2f0d(%rip) # 3fb8 <__stack_chk_fail@GLIBC_2.4> 10ab: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010b0 <fgets@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 05 2f 00 00 bnd jmp *0x2f05(%rip) # 3fc0 <fgets@GLIBC_2.2.5> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010c0 <__printf_chk@plt>: 10c0: f3 0f 1e fa endbr64 10c4: f2 ff 25 fd 2e 00 00 bnd jmp *0x2efd(%rip) # 3fc8 <__printf_chk@GLIBC_2.3.4> 10cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010d0 <fopen@plt>: 10d0: f3 0f 1e fa endbr64 10d4: f2 ff 25 f5 2e 00 00 bnd jmp *0x2ef5(%rip) # 3fd0 <fopen@GLIBC_2.2.5> 10db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010e0 <main>: 10e0: f3 0f 1e fa endbr64 10e4: 41 54 push %r12 10e6: 48 8d 35 17 0f 00 00 lea 0xf17(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 10ed: 48 8d 3d 12 0f 00 00 lea 0xf12(%rip),%rdi # 2006 <_IO_stdin_used+0x6> 10f4: 55 push %rbp 10f5: 53 push %rbx 10f6: 48 83 ec 70 sub $0x70,%rsp 10fa: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 1101: 00 00 1103: 48 89 44 24 68 mov %rax,0x68(%rsp) 1108: 31 c0 xor %eax,%eax 110a: e8 c1 ff ff ff call 10d0 <fopen@plt> 110f: 48 85 c0 test %rax,%rax 1112: 74 43 je 1157 <main+0x77> 1114: 48 89 c5 mov %rax,%rbp 1117: 48 89 e3 mov %rsp,%rbx 111a: 4c 8d 25 f3 0e 00 00 lea 0xef3(%rip),%r12 # 2014 <_IO_stdin_used+0x14> 1121: eb 17 jmp 113a <main+0x5a> 1123: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 1128: 48 89 da mov %rbx,%rdx 112b: 4c 89 e6 mov %r12,%rsi 112e: bf 01 00 00 00 mov $0x1,%edi 1133: 31 c0 xor %eax,%eax 1135: e8 86 ff ff ff call 10c0 <__printf_chk@plt> 113a: 48 89 ea mov %rbp,%rdx 113d: be 64 00 00 00 mov $0x64,%esi 1142: 48 89 df mov %rbx,%rdi 1145: e8 66 ff ff ff call 10b0 <fgets@plt> 114a: 48 85 c0 test %rax,%rax 114d: 75 d9 jne 1128 <main+0x48> 114f: 48 89 ef mov %rbp,%rdi 1152: e8 39 ff ff ff call 1090 <fclose@plt> 1157: 48 8b 44 24 68 mov 0x68(%rsp),%rax 115c: 64 48 2b 04 25 28 00 sub %fs:0x28,%rax 1163: 00 00 1165: 75 0b jne 1172 <main+0x92> 1167: 48 83 c4 70 add $0x70,%rsp 116b: 31 c0 xor %eax,%eax 116d: 5b pop %rbx 116e: 5d pop %rbp 116f: 41 5c pop %r12 1171: c3 ret 1172: e8 29 ff ff ff call 10a0 <__stack_chk_fail@plt> 1177: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 117e: 00 00 0000000000001180 <_start>: 1180: f3 0f 1e fa endbr64 1184: 31 ed xor %ebp,%ebp 1186: 49 89 d1 mov %rdx,%r9 1189: 5e pop %rsi 118a: 48 89 e2 mov %rsp,%rdx 118d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1191: 50 push %rax 1192: 54 push %rsp 1193: 45 31 c0 xor %r8d,%r8d 1196: 31 c9 xor %ecx,%ecx 1198: 48 8d 3d 41 ff ff ff lea -0xbf(%rip),%rdi # 10e0 <main> 119f: ff 15 33 2e 00 00 call *0x2e33(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 11a5: f4 hlt 11a6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 11ad: 00 00 00 00000000000011b0 <deregister_tm_clones>: 11b0: 48 8d 3d 59 2e 00 00 lea 0x2e59(%rip),%rdi # 4010 <__TMC_END__> 11b7: 48 8d 05 52 2e 00 00 lea 0x2e52(%rip),%rax # 4010 <__TMC_END__> 11be: 48 39 f8 cmp %rdi,%rax 11c1: 74 15 je 11d8 <deregister_tm_clones+0x28> 11c3: 48 8b 05 16 2e 00 00 mov 0x2e16(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 11ca: 48 85 c0 test %rax,%rax 11cd: 74 09 je 11d8 <deregister_tm_clones+0x28> 11cf: ff e0 jmp *%rax 11d1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 11d8: c3 ret 11d9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011e0 <register_tm_clones>: 11e0: 48 8d 3d 29 2e 00 00 lea 0x2e29(%rip),%rdi # 4010 <__TMC_END__> 11e7: 48 8d 35 22 2e 00 00 lea 0x2e22(%rip),%rsi # 4010 <__TMC_END__> 11ee: 48 29 fe sub %rdi,%rsi 11f1: 48 89 f0 mov %rsi,%rax 11f4: 48 c1 ee 3f shr $0x3f,%rsi 11f8: 48 c1 f8 03 sar $0x3,%rax 11fc: 48 01 c6 add %rax,%rsi 11ff: 48 d1 fe sar %rsi 1202: 74 14 je 1218 <register_tm_clones+0x38> 1204: 48 8b 05 e5 2d 00 00 mov 0x2de5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 120b: 48 85 c0 test %rax,%rax 120e: 74 08 je 1218 <register_tm_clones+0x38> 1210: ff e0 jmp *%rax 1212: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1218: c3 ret 1219: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001220 <__do_global_dtors_aux>: 1220: f3 0f 1e fa endbr64 1224: 80 3d e5 2d 00 00 00 cmpb $0x0,0x2de5(%rip) # 4010 <__TMC_END__> 122b: 75 2b jne 1258 <__do_global_dtors_aux+0x38> 122d: 55 push %rbp 122e: 48 83 3d c2 2d 00 00 cmpq $0x0,0x2dc2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1235: 00 1236: 48 89 e5 mov %rsp,%rbp 1239: 74 0c je 1247 <__do_global_dtors_aux+0x27> 123b: 48 8b 3d c6 2d 00 00 mov 0x2dc6(%rip),%rdi # 4008 <__dso_handle> 1242: e8 39 fe ff ff call 1080 <__cxa_finalize@plt> 1247: e8 64 ff ff ff call 11b0 <deregister_tm_clones> 124c: c6 05 bd 2d 00 00 01 movb $0x1,0x2dbd(%rip) # 4010 <__TMC_END__> 1253: 5d pop %rbp 1254: c3 ret 1255: 0f 1f 00 nopl (%rax) 1258: c3 ret 1259: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001260 <frame_dummy>: 1260: f3 0f 1e fa endbr64 1264: e9 77 ff ff ff jmp 11e0 <register_tm_clones> Disassembly of section .fini: 000000000000126c <_fini>: 126c: f3 0f 1e fa endbr64 1270: 48 83 ec 08 sub $0x8,%rsp 1274: 48 83 c4 08 add $0x8,%rsp 1278: c3 ret
-O3
x86
#include <stdio.h> int main() { FILE *fp; int numbers[] = {1, 2, 3, 4, 5}; fp = fopen("testfile3.txt", "w"); if (fp != NULL) { for (int i = 0; i < 5; i++) { fprintf(fp, "%d\n", numbers[i]); } fclose(fp); } return 0; }
/data/compiled/sample_program_13_O0_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 82 2f 00 00 push 0x2f82(%rip) # 3fa8 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 83 2f 00 00 bnd jmp *0x2f83(%rip) # 3fb0 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop Disassembly of section .plt.got: 0000000000001070 <__cxa_finalize@plt>: 1070: f3 0f 1e fa endbr64 1074: f2 ff 25 7d 2f 00 00 bnd jmp *0x2f7d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 107b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001080 <fclose@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 2d 2f 00 00 bnd jmp *0x2f2d(%rip) # 3fb8 <fclose@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001090 <__stack_chk_fail@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 25 2f 00 00 bnd jmp *0x2f25(%rip) # 3fc0 <__stack_chk_fail@GLIBC_2.4> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010a0 <fprintf@plt>: 10a0: f3 0f 1e fa endbr64 10a4: f2 ff 25 1d 2f 00 00 bnd jmp *0x2f1d(%rip) # 3fc8 <fprintf@GLIBC_2.2.5> 10ab: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010b0 <fopen@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 15 2f 00 00 bnd jmp *0x2f15(%rip) # 3fd0 <fopen@GLIBC_2.2.5> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010c0 <_start>: 10c0: f3 0f 1e fa endbr64 10c4: 31 ed xor %ebp,%ebp 10c6: 49 89 d1 mov %rdx,%r9 10c9: 5e pop %rsi 10ca: 48 89 e2 mov %rsp,%rdx 10cd: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10d1: 50 push %rax 10d2: 54 push %rsp 10d3: 45 31 c0 xor %r8d,%r8d 10d6: 31 c9 xor %ecx,%ecx 10d8: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 11a9 <main> 10df: ff 15 f3 2e 00 00 call *0x2ef3(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10e5: f4 hlt 10e6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10ed: 00 00 00 00000000000010f0 <deregister_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 05 12 2f 00 00 lea 0x2f12(%rip),%rax # 4010 <__TMC_END__> 10fe: 48 39 f8 cmp %rdi,%rax 1101: 74 15 je 1118 <deregister_tm_clones+0x28> 1103: 48 8b 05 d6 2e 00 00 mov 0x2ed6(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 110a: 48 85 c0 test %rax,%rax 110d: 74 09 je 1118 <deregister_tm_clones+0x28> 110f: ff e0 jmp *%rax 1111: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 1118: c3 ret 1119: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001120 <register_tm_clones>: 1120: 48 8d 3d e9 2e 00 00 lea 0x2ee9(%rip),%rdi # 4010 <__TMC_END__> 1127: 48 8d 35 e2 2e 00 00 lea 0x2ee2(%rip),%rsi # 4010 <__TMC_END__> 112e: 48 29 fe sub %rdi,%rsi 1131: 48 89 f0 mov %rsi,%rax 1134: 48 c1 ee 3f shr $0x3f,%rsi 1138: 48 c1 f8 03 sar $0x3,%rax 113c: 48 01 c6 add %rax,%rsi 113f: 48 d1 fe sar %rsi 1142: 74 14 je 1158 <register_tm_clones+0x38> 1144: 48 8b 05 a5 2e 00 00 mov 0x2ea5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 114b: 48 85 c0 test %rax,%rax 114e: 74 08 je 1158 <register_tm_clones+0x38> 1150: ff e0 jmp *%rax 1152: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1158: c3 ret 1159: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001160 <__do_global_dtors_aux>: 1160: f3 0f 1e fa endbr64 1164: 80 3d a5 2e 00 00 00 cmpb $0x0,0x2ea5(%rip) # 4010 <__TMC_END__> 116b: 75 2b jne 1198 <__do_global_dtors_aux+0x38> 116d: 55 push %rbp 116e: 48 83 3d 82 2e 00 00 cmpq $0x0,0x2e82(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1175: 00 1176: 48 89 e5 mov %rsp,%rbp 1179: 74 0c je 1187 <__do_global_dtors_aux+0x27> 117b: 48 8b 3d 86 2e 00 00 mov 0x2e86(%rip),%rdi # 4008 <__dso_handle> 1182: e8 e9 fe ff ff call 1070 <__cxa_finalize@plt> 1187: e8 64 ff ff ff call 10f0 <deregister_tm_clones> 118c: c6 05 7d 2e 00 00 01 movb $0x1,0x2e7d(%rip) # 4010 <__TMC_END__> 1193: 5d pop %rbp 1194: c3 ret 1195: 0f 1f 00 nopl (%rax) 1198: c3 ret 1199: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011a0 <frame_dummy>: 11a0: f3 0f 1e fa endbr64 11a4: e9 77 ff ff ff jmp 1120 <register_tm_clones> 00000000000011a9 <main>: 11a9: f3 0f 1e fa endbr64 11ad: 55 push %rbp 11ae: 48 89 e5 mov %rsp,%rbp 11b1: 48 83 ec 30 sub $0x30,%rsp 11b5: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 11bc: 00 00 11be: 48 89 45 f8 mov %rax,-0x8(%rbp) 11c2: 31 c0 xor %eax,%eax 11c4: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%rbp) 11cb: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%rbp) 11d2: c7 45 e8 03 00 00 00 movl $0x3,-0x18(%rbp) 11d9: c7 45 ec 04 00 00 00 movl $0x4,-0x14(%rbp) 11e0: c7 45 f0 05 00 00 00 movl $0x5,-0x10(%rbp) 11e7: 48 8d 05 16 0e 00 00 lea 0xe16(%rip),%rax # 2004 <_IO_stdin_used+0x4> 11ee: 48 89 c6 mov %rax,%rsi 11f1: 48 8d 05 0e 0e 00 00 lea 0xe0e(%rip),%rax # 2006 <_IO_stdin_used+0x6> 11f8: 48 89 c7 mov %rax,%rdi 11fb: e8 b0 fe ff ff call 10b0 <fopen@plt> 1200: 48 89 45 d8 mov %rax,-0x28(%rbp) 1204: 48 83 7d d8 00 cmpq $0x0,-0x28(%rbp) 1209: 74 43 je 124e <main+0xa5> 120b: c7 45 d4 00 00 00 00 movl $0x0,-0x2c(%rbp) 1212: eb 28 jmp 123c <main+0x93> 1214: 8b 45 d4 mov -0x2c(%rbp),%eax 1217: 48 98 cltq 1219: 8b 54 85 e0 mov -0x20(%rbp,%rax,4),%edx 121d: 48 8b 45 d8 mov -0x28(%rbp),%rax 1221: 48 8d 0d ec 0d 00 00 lea 0xdec(%rip),%rcx # 2014 <_IO_stdin_used+0x14> 1228: 48 89 ce mov %rcx,%rsi 122b: 48 89 c7 mov %rax,%rdi 122e: b8 00 00 00 00 mov $0x0,%eax 1233: e8 68 fe ff ff call 10a0 <fprintf@plt> 1238: 83 45 d4 01 addl $0x1,-0x2c(%rbp) 123c: 83 7d d4 04 cmpl $0x4,-0x2c(%rbp) 1240: 7e d2 jle 1214 <main+0x6b> 1242: 48 8b 45 d8 mov -0x28(%rbp),%rax 1246: 48 89 c7 mov %rax,%rdi 1249: e8 32 fe ff ff call 1080 <fclose@plt> 124e: b8 00 00 00 00 mov $0x0,%eax 1253: 48 8b 55 f8 mov -0x8(%rbp),%rdx 1257: 64 48 2b 14 25 28 00 sub %fs:0x28,%rdx 125e: 00 00 1260: 74 05 je 1267 <main+0xbe> 1262: e8 29 fe ff ff call 1090 <__stack_chk_fail@plt> 1267: c9 leave 1268: c3 ret Disassembly of section .fini: 000000000000126c <_fini>: 126c: f3 0f 1e fa endbr64 1270: 48 83 ec 08 sub $0x8,%rsp 1274: 48 83 c4 08 add $0x8,%rsp 1278: c3 ret
-O0
x86
#include <stdio.h> int main() { FILE *fp; int numbers[] = {1, 2, 3, 4, 5}; fp = fopen("testfile3.txt", "w"); if (fp != NULL) { for (int i = 0; i < 5; i++) { fprintf(fp, "%d\n", numbers[i]); } fclose(fp); } return 0; }
/data/compiled/sample_program_13_O1_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 82 2f 00 00 push 0x2f82(%rip) # 3fa8 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 83 2f 00 00 bnd jmp *0x2f83(%rip) # 3fb0 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop Disassembly of section .plt.got: 0000000000001070 <__cxa_finalize@plt>: 1070: f3 0f 1e fa endbr64 1074: f2 ff 25 7d 2f 00 00 bnd jmp *0x2f7d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 107b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001080 <fclose@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 2d 2f 00 00 bnd jmp *0x2f2d(%rip) # 3fb8 <fclose@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001090 <__stack_chk_fail@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 25 2f 00 00 bnd jmp *0x2f25(%rip) # 3fc0 <__stack_chk_fail@GLIBC_2.4> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010a0 <fopen@plt>: 10a0: f3 0f 1e fa endbr64 10a4: f2 ff 25 1d 2f 00 00 bnd jmp *0x2f1d(%rip) # 3fc8 <fopen@GLIBC_2.2.5> 10ab: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010b0 <__fprintf_chk@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 15 2f 00 00 bnd jmp *0x2f15(%rip) # 3fd0 <__fprintf_chk@GLIBC_2.3.4> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010c0 <_start>: 10c0: f3 0f 1e fa endbr64 10c4: 31 ed xor %ebp,%ebp 10c6: 49 89 d1 mov %rdx,%r9 10c9: 5e pop %rsi 10ca: 48 89 e2 mov %rsp,%rdx 10cd: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10d1: 50 push %rax 10d2: 54 push %rsp 10d3: 45 31 c0 xor %r8d,%r8d 10d6: 31 c9 xor %ecx,%ecx 10d8: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 11a9 <main> 10df: ff 15 f3 2e 00 00 call *0x2ef3(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10e5: f4 hlt 10e6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10ed: 00 00 00 00000000000010f0 <deregister_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 05 12 2f 00 00 lea 0x2f12(%rip),%rax # 4010 <__TMC_END__> 10fe: 48 39 f8 cmp %rdi,%rax 1101: 74 15 je 1118 <deregister_tm_clones+0x28> 1103: 48 8b 05 d6 2e 00 00 mov 0x2ed6(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 110a: 48 85 c0 test %rax,%rax 110d: 74 09 je 1118 <deregister_tm_clones+0x28> 110f: ff e0 jmp *%rax 1111: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 1118: c3 ret 1119: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001120 <register_tm_clones>: 1120: 48 8d 3d e9 2e 00 00 lea 0x2ee9(%rip),%rdi # 4010 <__TMC_END__> 1127: 48 8d 35 e2 2e 00 00 lea 0x2ee2(%rip),%rsi # 4010 <__TMC_END__> 112e: 48 29 fe sub %rdi,%rsi 1131: 48 89 f0 mov %rsi,%rax 1134: 48 c1 ee 3f shr $0x3f,%rsi 1138: 48 c1 f8 03 sar $0x3,%rax 113c: 48 01 c6 add %rax,%rsi 113f: 48 d1 fe sar %rsi 1142: 74 14 je 1158 <register_tm_clones+0x38> 1144: 48 8b 05 a5 2e 00 00 mov 0x2ea5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 114b: 48 85 c0 test %rax,%rax 114e: 74 08 je 1158 <register_tm_clones+0x38> 1150: ff e0 jmp *%rax 1152: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1158: c3 ret 1159: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001160 <__do_global_dtors_aux>: 1160: f3 0f 1e fa endbr64 1164: 80 3d a5 2e 00 00 00 cmpb $0x0,0x2ea5(%rip) # 4010 <__TMC_END__> 116b: 75 2b jne 1198 <__do_global_dtors_aux+0x38> 116d: 55 push %rbp 116e: 48 83 3d 82 2e 00 00 cmpq $0x0,0x2e82(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1175: 00 1176: 48 89 e5 mov %rsp,%rbp 1179: 74 0c je 1187 <__do_global_dtors_aux+0x27> 117b: 48 8b 3d 86 2e 00 00 mov 0x2e86(%rip),%rdi # 4008 <__dso_handle> 1182: e8 e9 fe ff ff call 1070 <__cxa_finalize@plt> 1187: e8 64 ff ff ff call 10f0 <deregister_tm_clones> 118c: c6 05 7d 2e 00 00 01 movb $0x1,0x2e7d(%rip) # 4010 <__TMC_END__> 1193: 5d pop %rbp 1194: c3 ret 1195: 0f 1f 00 nopl (%rax) 1198: c3 ret 1199: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011a0 <frame_dummy>: 11a0: f3 0f 1e fa endbr64 11a4: e9 77 ff ff ff jmp 1120 <register_tm_clones> 00000000000011a9 <main>: 11a9: f3 0f 1e fa endbr64 11ad: 41 55 push %r13 11af: 41 54 push %r12 11b1: 55 push %rbp 11b2: 53 push %rbx 11b3: 48 83 ec 28 sub $0x28,%rsp 11b7: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 11be: 00 00 11c0: 48 89 44 24 18 mov %rax,0x18(%rsp) 11c5: 31 c0 xor %eax,%eax 11c7: c7 04 24 01 00 00 00 movl $0x1,(%rsp) 11ce: c7 44 24 04 02 00 00 movl $0x2,0x4(%rsp) 11d5: 00 11d6: c7 44 24 08 03 00 00 movl $0x3,0x8(%rsp) 11dd: 00 11de: c7 44 24 0c 04 00 00 movl $0x4,0xc(%rsp) 11e5: 00 11e6: c7 44 24 10 05 00 00 movl $0x5,0x10(%rsp) 11ed: 00 11ee: 48 8d 35 0f 0e 00 00 lea 0xe0f(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 11f5: 48 8d 3d 0a 0e 00 00 lea 0xe0a(%rip),%rdi # 2006 <_IO_stdin_used+0x6> 11fc: e8 9f fe ff ff call 10a0 <fopen@plt> 1201: 48 85 c0 test %rax,%rax 1204: 74 3a je 1240 <main+0x97> 1206: 48 89 c5 mov %rax,%rbp 1209: 48 89 e3 mov %rsp,%rbx 120c: 4c 8d 6c 24 14 lea 0x14(%rsp),%r13 1211: 4c 8d 25 fc 0d 00 00 lea 0xdfc(%rip),%r12 # 2014 <_IO_stdin_used+0x14> 1218: 8b 0b mov (%rbx),%ecx 121a: 4c 89 e2 mov %r12,%rdx 121d: be 01 00 00 00 mov $0x1,%esi 1222: 48 89 ef mov %rbp,%rdi 1225: b8 00 00 00 00 mov $0x0,%eax 122a: e8 81 fe ff ff call 10b0 <__fprintf_chk@plt> 122f: 48 83 c3 04 add $0x4,%rbx 1233: 4c 39 eb cmp %r13,%rbx 1236: 75 e0 jne 1218 <main+0x6f> 1238: 48 89 ef mov %rbp,%rdi 123b: e8 40 fe ff ff call 1080 <fclose@plt> 1240: 48 8b 44 24 18 mov 0x18(%rsp),%rax 1245: 64 48 2b 04 25 28 00 sub %fs:0x28,%rax 124c: 00 00 124e: 75 10 jne 1260 <main+0xb7> 1250: b8 00 00 00 00 mov $0x0,%eax 1255: 48 83 c4 28 add $0x28,%rsp 1259: 5b pop %rbx 125a: 5d pop %rbp 125b: 41 5c pop %r12 125d: 41 5d pop %r13 125f: c3 ret 1260: e8 2b fe ff ff call 1090 <__stack_chk_fail@plt> Disassembly of section .fini: 0000000000001268 <_fini>: 1268: f3 0f 1e fa endbr64 126c: 48 83 ec 08 sub $0x8,%rsp 1270: 48 83 c4 08 add $0x8,%rsp 1274: c3 ret
-O1
x86
#include <stdio.h> int main() { FILE *fp; int numbers[] = {1, 2, 3, 4, 5}; fp = fopen("testfile3.txt", "w"); if (fp != NULL) { for (int i = 0; i < 5; i++) { fprintf(fp, "%d\n", numbers[i]); } fclose(fp); } return 0; }
/data/compiled/sample_program_13_O2_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 82 2f 00 00 push 0x2f82(%rip) # 3fa8 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 83 2f 00 00 bnd jmp *0x2f83(%rip) # 3fb0 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop Disassembly of section .plt.got: 0000000000001070 <__cxa_finalize@plt>: 1070: f3 0f 1e fa endbr64 1074: f2 ff 25 7d 2f 00 00 bnd jmp *0x2f7d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 107b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001080 <fclose@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 2d 2f 00 00 bnd jmp *0x2f2d(%rip) # 3fb8 <fclose@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001090 <__stack_chk_fail@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 25 2f 00 00 bnd jmp *0x2f25(%rip) # 3fc0 <__stack_chk_fail@GLIBC_2.4> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010a0 <fopen@plt>: 10a0: f3 0f 1e fa endbr64 10a4: f2 ff 25 1d 2f 00 00 bnd jmp *0x2f1d(%rip) # 3fc8 <fopen@GLIBC_2.2.5> 10ab: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010b0 <__fprintf_chk@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 15 2f 00 00 bnd jmp *0x2f15(%rip) # 3fd0 <__fprintf_chk@GLIBC_2.3.4> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010c0 <main>: 10c0: f3 0f 1e fa endbr64 10c4: 41 55 push %r13 10c6: 48 8d 35 37 0f 00 00 lea 0xf37(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 10cd: 48 8d 3d 32 0f 00 00 lea 0xf32(%rip),%rdi # 2006 <_IO_stdin_used+0x6> 10d4: 41 54 push %r12 10d6: 55 push %rbp 10d7: 53 push %rbx 10d8: 48 83 ec 28 sub $0x28,%rsp 10dc: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 10e3: 00 00 10e5: 48 89 44 24 18 mov %rax,0x18(%rsp) 10ea: 48 b8 02 00 00 00 03 movabs $0x300000002,%rax 10f1: 00 00 00 10f4: 48 89 44 24 04 mov %rax,0x4(%rsp) 10f9: 48 b8 04 00 00 00 05 movabs $0x500000004,%rax 1100: 00 00 00 1103: 48 89 44 24 0c mov %rax,0xc(%rsp) 1108: e8 93 ff ff ff call 10a0 <fopen@plt> 110d: 48 85 c0 test %rax,%rax 1110: 74 46 je 1158 <main+0x98> 1112: 48 89 c5 mov %rax,%rbp 1115: 48 89 e3 mov %rsp,%rbx 1118: 4c 8d 6c 24 14 lea 0x14(%rsp),%r13 111d: b9 01 00 00 00 mov $0x1,%ecx 1122: 4c 8d 25 eb 0e 00 00 lea 0xeeb(%rip),%r12 # 2014 <_IO_stdin_used+0x14> 1129: 4c 89 e2 mov %r12,%rdx 112c: be 01 00 00 00 mov $0x1,%esi 1131: 48 89 ef mov %rbp,%rdi 1134: 31 c0 xor %eax,%eax 1136: e8 75 ff ff ff call 10b0 <__fprintf_chk@plt> 113b: 48 83 c3 04 add $0x4,%rbx 113f: 4c 39 eb cmp %r13,%rbx 1142: 74 0c je 1150 <main+0x90> 1144: 8b 0b mov (%rbx),%ecx 1146: eb e1 jmp 1129 <main+0x69> 1148: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) 114f: 00 1150: 48 89 ef mov %rbp,%rdi 1153: e8 28 ff ff ff call 1080 <fclose@plt> 1158: 48 8b 44 24 18 mov 0x18(%rsp),%rax 115d: 64 48 2b 04 25 28 00 sub %fs:0x28,%rax 1164: 00 00 1166: 75 0d jne 1175 <main+0xb5> 1168: 48 83 c4 28 add $0x28,%rsp 116c: 31 c0 xor %eax,%eax 116e: 5b pop %rbx 116f: 5d pop %rbp 1170: 41 5c pop %r12 1172: 41 5d pop %r13 1174: c3 ret 1175: e8 16 ff ff ff call 1090 <__stack_chk_fail@plt> 117a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 0000000000001180 <_start>: 1180: f3 0f 1e fa endbr64 1184: 31 ed xor %ebp,%ebp 1186: 49 89 d1 mov %rdx,%r9 1189: 5e pop %rsi 118a: 48 89 e2 mov %rsp,%rdx 118d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1191: 50 push %rax 1192: 54 push %rsp 1193: 45 31 c0 xor %r8d,%r8d 1196: 31 c9 xor %ecx,%ecx 1198: 48 8d 3d 21 ff ff ff lea -0xdf(%rip),%rdi # 10c0 <main> 119f: ff 15 33 2e 00 00 call *0x2e33(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 11a5: f4 hlt 11a6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 11ad: 00 00 00 00000000000011b0 <deregister_tm_clones>: 11b0: 48 8d 3d 59 2e 00 00 lea 0x2e59(%rip),%rdi # 4010 <__TMC_END__> 11b7: 48 8d 05 52 2e 00 00 lea 0x2e52(%rip),%rax # 4010 <__TMC_END__> 11be: 48 39 f8 cmp %rdi,%rax 11c1: 74 15 je 11d8 <deregister_tm_clones+0x28> 11c3: 48 8b 05 16 2e 00 00 mov 0x2e16(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 11ca: 48 85 c0 test %rax,%rax 11cd: 74 09 je 11d8 <deregister_tm_clones+0x28> 11cf: ff e0 jmp *%rax 11d1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 11d8: c3 ret 11d9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011e0 <register_tm_clones>: 11e0: 48 8d 3d 29 2e 00 00 lea 0x2e29(%rip),%rdi # 4010 <__TMC_END__> 11e7: 48 8d 35 22 2e 00 00 lea 0x2e22(%rip),%rsi # 4010 <__TMC_END__> 11ee: 48 29 fe sub %rdi,%rsi 11f1: 48 89 f0 mov %rsi,%rax 11f4: 48 c1 ee 3f shr $0x3f,%rsi 11f8: 48 c1 f8 03 sar $0x3,%rax 11fc: 48 01 c6 add %rax,%rsi 11ff: 48 d1 fe sar %rsi 1202: 74 14 je 1218 <register_tm_clones+0x38> 1204: 48 8b 05 e5 2d 00 00 mov 0x2de5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 120b: 48 85 c0 test %rax,%rax 120e: 74 08 je 1218 <register_tm_clones+0x38> 1210: ff e0 jmp *%rax 1212: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1218: c3 ret 1219: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001220 <__do_global_dtors_aux>: 1220: f3 0f 1e fa endbr64 1224: 80 3d e5 2d 00 00 00 cmpb $0x0,0x2de5(%rip) # 4010 <__TMC_END__> 122b: 75 2b jne 1258 <__do_global_dtors_aux+0x38> 122d: 55 push %rbp 122e: 48 83 3d c2 2d 00 00 cmpq $0x0,0x2dc2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1235: 00 1236: 48 89 e5 mov %rsp,%rbp 1239: 74 0c je 1247 <__do_global_dtors_aux+0x27> 123b: 48 8b 3d c6 2d 00 00 mov 0x2dc6(%rip),%rdi # 4008 <__dso_handle> 1242: e8 29 fe ff ff call 1070 <__cxa_finalize@plt> 1247: e8 64 ff ff ff call 11b0 <deregister_tm_clones> 124c: c6 05 bd 2d 00 00 01 movb $0x1,0x2dbd(%rip) # 4010 <__TMC_END__> 1253: 5d pop %rbp 1254: c3 ret 1255: 0f 1f 00 nopl (%rax) 1258: c3 ret 1259: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001260 <frame_dummy>: 1260: f3 0f 1e fa endbr64 1264: e9 77 ff ff ff jmp 11e0 <register_tm_clones> Disassembly of section .fini: 000000000000126c <_fini>: 126c: f3 0f 1e fa endbr64 1270: 48 83 ec 08 sub $0x8,%rsp 1274: 48 83 c4 08 add $0x8,%rsp 1278: c3 ret
-O2
x86
#include <stdio.h> int main() { FILE *fp; int numbers[] = {1, 2, 3, 4, 5}; fp = fopen("testfile3.txt", "w"); if (fp != NULL) { for (int i = 0; i < 5; i++) { fprintf(fp, "%d\n", numbers[i]); } fclose(fp); } return 0; }
/data/compiled/sample_program_13_O3_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 82 2f 00 00 push 0x2f82(%rip) # 3fa8 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 83 2f 00 00 bnd jmp *0x2f83(%rip) # 3fb0 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop Disassembly of section .plt.got: 0000000000001070 <__cxa_finalize@plt>: 1070: f3 0f 1e fa endbr64 1074: f2 ff 25 7d 2f 00 00 bnd jmp *0x2f7d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 107b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001080 <fclose@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 2d 2f 00 00 bnd jmp *0x2f2d(%rip) # 3fb8 <fclose@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001090 <__stack_chk_fail@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 25 2f 00 00 bnd jmp *0x2f25(%rip) # 3fc0 <__stack_chk_fail@GLIBC_2.4> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010a0 <fopen@plt>: 10a0: f3 0f 1e fa endbr64 10a4: f2 ff 25 1d 2f 00 00 bnd jmp *0x2f1d(%rip) # 3fc8 <fopen@GLIBC_2.2.5> 10ab: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010b0 <__fprintf_chk@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 15 2f 00 00 bnd jmp *0x2f15(%rip) # 3fd0 <__fprintf_chk@GLIBC_2.3.4> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010c0 <main>: 10c0: f3 0f 1e fa endbr64 10c4: 41 55 push %r13 10c6: 48 8d 35 37 0f 00 00 lea 0xf37(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 10cd: 48 8d 3d 32 0f 00 00 lea 0xf32(%rip),%rdi # 2006 <_IO_stdin_used+0x6> 10d4: 41 54 push %r12 10d6: 55 push %rbp 10d7: 53 push %rbx 10d8: 48 83 ec 28 sub $0x28,%rsp 10dc: 66 0f 6f 05 3c 0f 00 movdqa 0xf3c(%rip),%xmm0 # 2020 <_IO_stdin_used+0x20> 10e3: 00 10e4: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 10eb: 00 00 10ed: 48 89 44 24 18 mov %rax,0x18(%rsp) 10f2: 31 c0 xor %eax,%eax 10f4: c7 44 24 10 05 00 00 movl $0x5,0x10(%rsp) 10fb: 00 10fc: 0f 29 04 24 movaps %xmm0,(%rsp) 1100: e8 9b ff ff ff call 10a0 <fopen@plt> 1105: 48 85 c0 test %rax,%rax 1108: 74 37 je 1141 <main+0x81> 110a: 48 89 c5 mov %rax,%rbp 110d: 48 89 e3 mov %rsp,%rbx 1110: 4c 8d 6c 24 14 lea 0x14(%rsp),%r13 1115: 4c 8d 25 f8 0e 00 00 lea 0xef8(%rip),%r12 # 2014 <_IO_stdin_used+0x14> 111c: 8b 0b mov (%rbx),%ecx 111e: 4c 89 e2 mov %r12,%rdx 1121: be 01 00 00 00 mov $0x1,%esi 1126: 48 89 ef mov %rbp,%rdi 1129: 31 c0 xor %eax,%eax 112b: 48 83 c3 04 add $0x4,%rbx 112f: e8 7c ff ff ff call 10b0 <__fprintf_chk@plt> 1134: 4c 39 eb cmp %r13,%rbx 1137: 75 e3 jne 111c <main+0x5c> 1139: 48 89 ef mov %rbp,%rdi 113c: e8 3f ff ff ff call 1080 <fclose@plt> 1141: 48 8b 44 24 18 mov 0x18(%rsp),%rax 1146: 64 48 2b 04 25 28 00 sub %fs:0x28,%rax 114d: 00 00 114f: 75 0d jne 115e <main+0x9e> 1151: 48 83 c4 28 add $0x28,%rsp 1155: 31 c0 xor %eax,%eax 1157: 5b pop %rbx 1158: 5d pop %rbp 1159: 41 5c pop %r12 115b: 41 5d pop %r13 115d: c3 ret 115e: e8 2d ff ff ff call 1090 <__stack_chk_fail@plt> 1163: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 116a: 00 00 00 116d: 0f 1f 00 nopl (%rax) 0000000000001170 <_start>: 1170: f3 0f 1e fa endbr64 1174: 31 ed xor %ebp,%ebp 1176: 49 89 d1 mov %rdx,%r9 1179: 5e pop %rsi 117a: 48 89 e2 mov %rsp,%rdx 117d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1181: 50 push %rax 1182: 54 push %rsp 1183: 45 31 c0 xor %r8d,%r8d 1186: 31 c9 xor %ecx,%ecx 1188: 48 8d 3d 31 ff ff ff lea -0xcf(%rip),%rdi # 10c0 <main> 118f: ff 15 43 2e 00 00 call *0x2e43(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1195: f4 hlt 1196: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 119d: 00 00 00 00000000000011a0 <deregister_tm_clones>: 11a0: 48 8d 3d 69 2e 00 00 lea 0x2e69(%rip),%rdi # 4010 <__TMC_END__> 11a7: 48 8d 05 62 2e 00 00 lea 0x2e62(%rip),%rax # 4010 <__TMC_END__> 11ae: 48 39 f8 cmp %rdi,%rax 11b1: 74 15 je 11c8 <deregister_tm_clones+0x28> 11b3: 48 8b 05 26 2e 00 00 mov 0x2e26(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 11ba: 48 85 c0 test %rax,%rax 11bd: 74 09 je 11c8 <deregister_tm_clones+0x28> 11bf: ff e0 jmp *%rax 11c1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 11c8: c3 ret 11c9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011d0 <register_tm_clones>: 11d0: 48 8d 3d 39 2e 00 00 lea 0x2e39(%rip),%rdi # 4010 <__TMC_END__> 11d7: 48 8d 35 32 2e 00 00 lea 0x2e32(%rip),%rsi # 4010 <__TMC_END__> 11de: 48 29 fe sub %rdi,%rsi 11e1: 48 89 f0 mov %rsi,%rax 11e4: 48 c1 ee 3f shr $0x3f,%rsi 11e8: 48 c1 f8 03 sar $0x3,%rax 11ec: 48 01 c6 add %rax,%rsi 11ef: 48 d1 fe sar %rsi 11f2: 74 14 je 1208 <register_tm_clones+0x38> 11f4: 48 8b 05 f5 2d 00 00 mov 0x2df5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 11fb: 48 85 c0 test %rax,%rax 11fe: 74 08 je 1208 <register_tm_clones+0x38> 1200: ff e0 jmp *%rax 1202: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1208: c3 ret 1209: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001210 <__do_global_dtors_aux>: 1210: f3 0f 1e fa endbr64 1214: 80 3d f5 2d 00 00 00 cmpb $0x0,0x2df5(%rip) # 4010 <__TMC_END__> 121b: 75 2b jne 1248 <__do_global_dtors_aux+0x38> 121d: 55 push %rbp 121e: 48 83 3d d2 2d 00 00 cmpq $0x0,0x2dd2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1225: 00 1226: 48 89 e5 mov %rsp,%rbp 1229: 74 0c je 1237 <__do_global_dtors_aux+0x27> 122b: 48 8b 3d d6 2d 00 00 mov 0x2dd6(%rip),%rdi # 4008 <__dso_handle> 1232: e8 39 fe ff ff call 1070 <__cxa_finalize@plt> 1237: e8 64 ff ff ff call 11a0 <deregister_tm_clones> 123c: c6 05 cd 2d 00 00 01 movb $0x1,0x2dcd(%rip) # 4010 <__TMC_END__> 1243: 5d pop %rbp 1244: c3 ret 1245: 0f 1f 00 nopl (%rax) 1248: c3 ret 1249: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001250 <frame_dummy>: 1250: f3 0f 1e fa endbr64 1254: e9 77 ff ff ff jmp 11d0 <register_tm_clones> Disassembly of section .fini: 000000000000125c <_fini>: 125c: f3 0f 1e fa endbr64 1260: 48 83 ec 08 sub $0x8,%rsp 1264: 48 83 c4 08 add $0x8,%rsp 1268: c3 ret
-O3
x86
#include <stdio.h> int main() { FILE *fp; int number; fp = fopen("testfile4.txt", "r"); if (fp != NULL) { while (fscanf(fp, "%d", &number) == 1) { printf("%d\n", number); } fclose(fp); } return 0; }
/data/compiled/sample_program_14_O0_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 7a 2f 00 00 push 0x2f7a(%rip) # 3fa0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 7b 2f 00 00 bnd jmp *0x2f7b(%rip) # 3fa8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop 1070: f3 0f 1e fa endbr64 1074: 68 04 00 00 00 push $0x4 1079: f2 e9 a1 ff ff ff bnd jmp 1020 <_init+0x20> 107f: 90 nop Disassembly of section .plt.got: 0000000000001080 <__cxa_finalize@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 6d 2f 00 00 bnd jmp *0x2f6d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001090 <__isoc99_fscanf@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 15 2f 00 00 bnd jmp *0x2f15(%rip) # 3fb0 <__isoc99_fscanf@GLIBC_2.7> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010a0 <fclose@plt>: 10a0: f3 0f 1e fa endbr64 10a4: f2 ff 25 0d 2f 00 00 bnd jmp *0x2f0d(%rip) # 3fb8 <fclose@GLIBC_2.2.5> 10ab: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010b0 <__stack_chk_fail@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 05 2f 00 00 bnd jmp *0x2f05(%rip) # 3fc0 <__stack_chk_fail@GLIBC_2.4> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010c0 <printf@plt>: 10c0: f3 0f 1e fa endbr64 10c4: f2 ff 25 fd 2e 00 00 bnd jmp *0x2efd(%rip) # 3fc8 <printf@GLIBC_2.2.5> 10cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010d0 <fopen@plt>: 10d0: f3 0f 1e fa endbr64 10d4: f2 ff 25 f5 2e 00 00 bnd jmp *0x2ef5(%rip) # 3fd0 <fopen@GLIBC_2.2.5> 10db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010e0 <_start>: 10e0: f3 0f 1e fa endbr64 10e4: 31 ed xor %ebp,%ebp 10e6: 49 89 d1 mov %rdx,%r9 10e9: 5e pop %rsi 10ea: 48 89 e2 mov %rsp,%rdx 10ed: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10f1: 50 push %rax 10f2: 54 push %rsp 10f3: 45 31 c0 xor %r8d,%r8d 10f6: 31 c9 xor %ecx,%ecx 10f8: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 11c9 <main> 10ff: ff 15 d3 2e 00 00 call *0x2ed3(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1105: f4 hlt 1106: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 110d: 00 00 00 0000000000001110 <deregister_tm_clones>: 1110: 48 8d 3d f9 2e 00 00 lea 0x2ef9(%rip),%rdi # 4010 <__TMC_END__> 1117: 48 8d 05 f2 2e 00 00 lea 0x2ef2(%rip),%rax # 4010 <__TMC_END__> 111e: 48 39 f8 cmp %rdi,%rax 1121: 74 15 je 1138 <deregister_tm_clones+0x28> 1123: 48 8b 05 b6 2e 00 00 mov 0x2eb6(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 112a: 48 85 c0 test %rax,%rax 112d: 74 09 je 1138 <deregister_tm_clones+0x28> 112f: ff e0 jmp *%rax 1131: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <register_tm_clones>: 1140: 48 8d 3d c9 2e 00 00 lea 0x2ec9(%rip),%rdi # 4010 <__TMC_END__> 1147: 48 8d 35 c2 2e 00 00 lea 0x2ec2(%rip),%rsi # 4010 <__TMC_END__> 114e: 48 29 fe sub %rdi,%rsi 1151: 48 89 f0 mov %rsi,%rax 1154: 48 c1 ee 3f shr $0x3f,%rsi 1158: 48 c1 f8 03 sar $0x3,%rax 115c: 48 01 c6 add %rax,%rsi 115f: 48 d1 fe sar %rsi 1162: 74 14 je 1178 <register_tm_clones+0x38> 1164: 48 8b 05 85 2e 00 00 mov 0x2e85(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 116b: 48 85 c0 test %rax,%rax 116e: 74 08 je 1178 <register_tm_clones+0x38> 1170: ff e0 jmp *%rax 1172: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1178: c3 ret 1179: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001180 <__do_global_dtors_aux>: 1180: f3 0f 1e fa endbr64 1184: 80 3d 85 2e 00 00 00 cmpb $0x0,0x2e85(%rip) # 4010 <__TMC_END__> 118b: 75 2b jne 11b8 <__do_global_dtors_aux+0x38> 118d: 55 push %rbp 118e: 48 83 3d 62 2e 00 00 cmpq $0x0,0x2e62(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1195: 00 1196: 48 89 e5 mov %rsp,%rbp 1199: 74 0c je 11a7 <__do_global_dtors_aux+0x27> 119b: 48 8b 3d 66 2e 00 00 mov 0x2e66(%rip),%rdi # 4008 <__dso_handle> 11a2: e8 d9 fe ff ff call 1080 <__cxa_finalize@plt> 11a7: e8 64 ff ff ff call 1110 <deregister_tm_clones> 11ac: c6 05 5d 2e 00 00 01 movb $0x1,0x2e5d(%rip) # 4010 <__TMC_END__> 11b3: 5d pop %rbp 11b4: c3 ret 11b5: 0f 1f 00 nopl (%rax) 11b8: c3 ret 11b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011c0 <frame_dummy>: 11c0: f3 0f 1e fa endbr64 11c4: e9 77 ff ff ff jmp 1140 <register_tm_clones> 00000000000011c9 <main>: 11c9: f3 0f 1e fa endbr64 11cd: 55 push %rbp 11ce: 48 89 e5 mov %rsp,%rbp 11d1: 48 83 ec 20 sub $0x20,%rsp 11d5: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 11dc: 00 00 11de: 48 89 45 f8 mov %rax,-0x8(%rbp) 11e2: 31 c0 xor %eax,%eax 11e4: 48 8d 05 19 0e 00 00 lea 0xe19(%rip),%rax # 2004 <_IO_stdin_used+0x4> 11eb: 48 89 c6 mov %rax,%rsi 11ee: 48 8d 05 11 0e 00 00 lea 0xe11(%rip),%rax # 2006 <_IO_stdin_used+0x6> 11f5: 48 89 c7 mov %rax,%rdi 11f8: e8 d3 fe ff ff call 10d0 <fopen@plt> 11fd: 48 89 45 f0 mov %rax,-0x10(%rbp) 1201: 48 83 7d f0 00 cmpq $0x0,-0x10(%rbp) 1206: 74 4b je 1253 <main+0x8a> 1208: eb 19 jmp 1223 <main+0x5a> 120a: 8b 45 ec mov -0x14(%rbp),%eax 120d: 89 c6 mov %eax,%esi 120f: 48 8d 05 fe 0d 00 00 lea 0xdfe(%rip),%rax # 2014 <_IO_stdin_used+0x14> 1216: 48 89 c7 mov %rax,%rdi 1219: b8 00 00 00 00 mov $0x0,%eax 121e: e8 9d fe ff ff call 10c0 <printf@plt> 1223: 48 8d 55 ec lea -0x14(%rbp),%rdx 1227: 48 8b 45 f0 mov -0x10(%rbp),%rax 122b: 48 8d 0d e6 0d 00 00 lea 0xde6(%rip),%rcx # 2018 <_IO_stdin_used+0x18> 1232: 48 89 ce mov %rcx,%rsi 1235: 48 89 c7 mov %rax,%rdi 1238: b8 00 00 00 00 mov $0x0,%eax 123d: e8 4e fe ff ff call 1090 <__isoc99_fscanf@plt> 1242: 83 f8 01 cmp $0x1,%eax 1245: 74 c3 je 120a <main+0x41> 1247: 48 8b 45 f0 mov -0x10(%rbp),%rax 124b: 48 89 c7 mov %rax,%rdi 124e: e8 4d fe ff ff call 10a0 <fclose@plt> 1253: b8 00 00 00 00 mov $0x0,%eax 1258: 48 8b 55 f8 mov -0x8(%rbp),%rdx 125c: 64 48 2b 14 25 28 00 sub %fs:0x28,%rdx 1263: 00 00 1265: 74 05 je 126c <main+0xa3> 1267: e8 44 fe ff ff call 10b0 <__stack_chk_fail@plt> 126c: c9 leave 126d: c3 ret Disassembly of section .fini: 0000000000001270 <_fini>: 1270: f3 0f 1e fa endbr64 1274: 48 83 ec 08 sub $0x8,%rsp 1278: 48 83 c4 08 add $0x8,%rsp 127c: c3 ret
-O0
x86
#include <stdio.h> int main() { FILE *fp; int number; fp = fopen("testfile4.txt", "r"); if (fp != NULL) { while (fscanf(fp, "%d", &number) == 1) { printf("%d\n", number); } fclose(fp); } return 0; }
/data/compiled/sample_program_14_O1_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 7a 2f 00 00 push 0x2f7a(%rip) # 3fa0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 7b 2f 00 00 bnd jmp *0x2f7b(%rip) # 3fa8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop 1070: f3 0f 1e fa endbr64 1074: 68 04 00 00 00 push $0x4 1079: f2 e9 a1 ff ff ff bnd jmp 1020 <_init+0x20> 107f: 90 nop Disassembly of section .plt.got: 0000000000001080 <__cxa_finalize@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 6d 2f 00 00 bnd jmp *0x2f6d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001090 <__isoc99_fscanf@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 15 2f 00 00 bnd jmp *0x2f15(%rip) # 3fb0 <__isoc99_fscanf@GLIBC_2.7> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010a0 <fclose@plt>: 10a0: f3 0f 1e fa endbr64 10a4: f2 ff 25 0d 2f 00 00 bnd jmp *0x2f0d(%rip) # 3fb8 <fclose@GLIBC_2.2.5> 10ab: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010b0 <__stack_chk_fail@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 05 2f 00 00 bnd jmp *0x2f05(%rip) # 3fc0 <__stack_chk_fail@GLIBC_2.4> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010c0 <__printf_chk@plt>: 10c0: f3 0f 1e fa endbr64 10c4: f2 ff 25 fd 2e 00 00 bnd jmp *0x2efd(%rip) # 3fc8 <__printf_chk@GLIBC_2.3.4> 10cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010d0 <fopen@plt>: 10d0: f3 0f 1e fa endbr64 10d4: f2 ff 25 f5 2e 00 00 bnd jmp *0x2ef5(%rip) # 3fd0 <fopen@GLIBC_2.2.5> 10db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010e0 <_start>: 10e0: f3 0f 1e fa endbr64 10e4: 31 ed xor %ebp,%ebp 10e6: 49 89 d1 mov %rdx,%r9 10e9: 5e pop %rsi 10ea: 48 89 e2 mov %rsp,%rdx 10ed: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10f1: 50 push %rax 10f2: 54 push %rsp 10f3: 45 31 c0 xor %r8d,%r8d 10f6: 31 c9 xor %ecx,%ecx 10f8: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 11c9 <main> 10ff: ff 15 d3 2e 00 00 call *0x2ed3(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1105: f4 hlt 1106: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 110d: 00 00 00 0000000000001110 <deregister_tm_clones>: 1110: 48 8d 3d f9 2e 00 00 lea 0x2ef9(%rip),%rdi # 4010 <__TMC_END__> 1117: 48 8d 05 f2 2e 00 00 lea 0x2ef2(%rip),%rax # 4010 <__TMC_END__> 111e: 48 39 f8 cmp %rdi,%rax 1121: 74 15 je 1138 <deregister_tm_clones+0x28> 1123: 48 8b 05 b6 2e 00 00 mov 0x2eb6(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 112a: 48 85 c0 test %rax,%rax 112d: 74 09 je 1138 <deregister_tm_clones+0x28> 112f: ff e0 jmp *%rax 1131: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <register_tm_clones>: 1140: 48 8d 3d c9 2e 00 00 lea 0x2ec9(%rip),%rdi # 4010 <__TMC_END__> 1147: 48 8d 35 c2 2e 00 00 lea 0x2ec2(%rip),%rsi # 4010 <__TMC_END__> 114e: 48 29 fe sub %rdi,%rsi 1151: 48 89 f0 mov %rsi,%rax 1154: 48 c1 ee 3f shr $0x3f,%rsi 1158: 48 c1 f8 03 sar $0x3,%rax 115c: 48 01 c6 add %rax,%rsi 115f: 48 d1 fe sar %rsi 1162: 74 14 je 1178 <register_tm_clones+0x38> 1164: 48 8b 05 85 2e 00 00 mov 0x2e85(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 116b: 48 85 c0 test %rax,%rax 116e: 74 08 je 1178 <register_tm_clones+0x38> 1170: ff e0 jmp *%rax 1172: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1178: c3 ret 1179: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001180 <__do_global_dtors_aux>: 1180: f3 0f 1e fa endbr64 1184: 80 3d 85 2e 00 00 00 cmpb $0x0,0x2e85(%rip) # 4010 <__TMC_END__> 118b: 75 2b jne 11b8 <__do_global_dtors_aux+0x38> 118d: 55 push %rbp 118e: 48 83 3d 62 2e 00 00 cmpq $0x0,0x2e62(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1195: 00 1196: 48 89 e5 mov %rsp,%rbp 1199: 74 0c je 11a7 <__do_global_dtors_aux+0x27> 119b: 48 8b 3d 66 2e 00 00 mov 0x2e66(%rip),%rdi # 4008 <__dso_handle> 11a2: e8 d9 fe ff ff call 1080 <__cxa_finalize@plt> 11a7: e8 64 ff ff ff call 1110 <deregister_tm_clones> 11ac: c6 05 5d 2e 00 00 01 movb $0x1,0x2e5d(%rip) # 4010 <__TMC_END__> 11b3: 5d pop %rbp 11b4: c3 ret 11b5: 0f 1f 00 nopl (%rax) 11b8: c3 ret 11b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011c0 <frame_dummy>: 11c0: f3 0f 1e fa endbr64 11c4: e9 77 ff ff ff jmp 1140 <register_tm_clones> 00000000000011c9 <main>: 11c9: f3 0f 1e fa endbr64 11cd: 41 55 push %r13 11cf: 41 54 push %r12 11d1: 55 push %rbp 11d2: 53 push %rbx 11d3: 48 83 ec 18 sub $0x18,%rsp 11d7: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 11de: 00 00 11e0: 48 89 44 24 08 mov %rax,0x8(%rsp) 11e5: 31 c0 xor %eax,%eax 11e7: 48 8d 35 16 0e 00 00 lea 0xe16(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 11ee: 48 8d 3d 11 0e 00 00 lea 0xe11(%rip),%rdi # 2006 <_IO_stdin_used+0x6> 11f5: e8 d6 fe ff ff call 10d0 <fopen@plt> 11fa: 48 85 c0 test %rax,%rax 11fd: 74 4e je 124d <main+0x84> 11ff: 48 89 c3 mov %rax,%rbx 1202: 4c 8d 64 24 04 lea 0x4(%rsp),%r12 1207: 48 8d 2d 0a 0e 00 00 lea 0xe0a(%rip),%rbp # 2018 <_IO_stdin_used+0x18> 120e: 4c 8d 2d ff 0d 00 00 lea 0xdff(%rip),%r13 # 2014 <_IO_stdin_used+0x14> 1215: eb 16 jmp 122d <main+0x64> 1217: 8b 54 24 04 mov 0x4(%rsp),%edx 121b: 4c 89 ee mov %r13,%rsi 121e: bf 01 00 00 00 mov $0x1,%edi 1223: b8 00 00 00 00 mov $0x0,%eax 1228: e8 93 fe ff ff call 10c0 <__printf_chk@plt> 122d: 4c 89 e2 mov %r12,%rdx 1230: 48 89 ee mov %rbp,%rsi 1233: 48 89 df mov %rbx,%rdi 1236: b8 00 00 00 00 mov $0x0,%eax 123b: e8 50 fe ff ff call 1090 <__isoc99_fscanf@plt> 1240: 83 f8 01 cmp $0x1,%eax 1243: 74 d2 je 1217 <main+0x4e> 1245: 48 89 df mov %rbx,%rdi 1248: e8 53 fe ff ff call 10a0 <fclose@plt> 124d: 48 8b 44 24 08 mov 0x8(%rsp),%rax 1252: 64 48 2b 04 25 28 00 sub %fs:0x28,%rax 1259: 00 00 125b: 75 10 jne 126d <main+0xa4> 125d: b8 00 00 00 00 mov $0x0,%eax 1262: 48 83 c4 18 add $0x18,%rsp 1266: 5b pop %rbx 1267: 5d pop %rbp 1268: 41 5c pop %r12 126a: 41 5d pop %r13 126c: c3 ret 126d: e8 3e fe ff ff call 10b0 <__stack_chk_fail@plt> Disassembly of section .fini: 0000000000001274 <_fini>: 1274: f3 0f 1e fa endbr64 1278: 48 83 ec 08 sub $0x8,%rsp 127c: 48 83 c4 08 add $0x8,%rsp 1280: c3 ret
-O1
x86
#include <stdio.h> int main() { FILE *fp; int number; fp = fopen("testfile4.txt", "r"); if (fp != NULL) { while (fscanf(fp, "%d", &number) == 1) { printf("%d\n", number); } fclose(fp); } return 0; }
/data/compiled/sample_program_14_O2_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 7a 2f 00 00 push 0x2f7a(%rip) # 3fa0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 7b 2f 00 00 bnd jmp *0x2f7b(%rip) # 3fa8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop 1070: f3 0f 1e fa endbr64 1074: 68 04 00 00 00 push $0x4 1079: f2 e9 a1 ff ff ff bnd jmp 1020 <_init+0x20> 107f: 90 nop Disassembly of section .plt.got: 0000000000001080 <__cxa_finalize@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 6d 2f 00 00 bnd jmp *0x2f6d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001090 <__isoc99_fscanf@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 15 2f 00 00 bnd jmp *0x2f15(%rip) # 3fb0 <__isoc99_fscanf@GLIBC_2.7> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010a0 <fclose@plt>: 10a0: f3 0f 1e fa endbr64 10a4: f2 ff 25 0d 2f 00 00 bnd jmp *0x2f0d(%rip) # 3fb8 <fclose@GLIBC_2.2.5> 10ab: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010b0 <__stack_chk_fail@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 05 2f 00 00 bnd jmp *0x2f05(%rip) # 3fc0 <__stack_chk_fail@GLIBC_2.4> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010c0 <__printf_chk@plt>: 10c0: f3 0f 1e fa endbr64 10c4: f2 ff 25 fd 2e 00 00 bnd jmp *0x2efd(%rip) # 3fc8 <__printf_chk@GLIBC_2.3.4> 10cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010d0 <fopen@plt>: 10d0: f3 0f 1e fa endbr64 10d4: f2 ff 25 f5 2e 00 00 bnd jmp *0x2ef5(%rip) # 3fd0 <fopen@GLIBC_2.2.5> 10db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010e0 <main>: 10e0: f3 0f 1e fa endbr64 10e4: 41 55 push %r13 10e6: 48 8d 35 17 0f 00 00 lea 0xf17(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 10ed: 48 8d 3d 12 0f 00 00 lea 0xf12(%rip),%rdi # 2006 <_IO_stdin_used+0x6> 10f4: 41 54 push %r12 10f6: 55 push %rbp 10f7: 53 push %rbx 10f8: 48 83 ec 18 sub $0x18,%rsp 10fc: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 1103: 00 00 1105: 48 89 44 24 08 mov %rax,0x8(%rsp) 110a: 31 c0 xor %eax,%eax 110c: e8 bf ff ff ff call 10d0 <fopen@plt> 1111: 48 85 c0 test %rax,%rax 1114: 74 4a je 1160 <main+0x80> 1116: 48 89 c5 mov %rax,%rbp 1119: 4c 8d 64 24 04 lea 0x4(%rsp),%r12 111e: 48 8d 1d f3 0e 00 00 lea 0xef3(%rip),%rbx # 2018 <_IO_stdin_used+0x18> 1125: 4c 8d 2d e8 0e 00 00 lea 0xee8(%rip),%r13 # 2014 <_IO_stdin_used+0x14> 112c: eb 15 jmp 1143 <main+0x63> 112e: 66 90 xchg %ax,%ax 1130: 8b 54 24 04 mov 0x4(%rsp),%edx 1134: 4c 89 ee mov %r13,%rsi 1137: bf 01 00 00 00 mov $0x1,%edi 113c: 31 c0 xor %eax,%eax 113e: e8 7d ff ff ff call 10c0 <__printf_chk@plt> 1143: 31 c0 xor %eax,%eax 1145: 4c 89 e2 mov %r12,%rdx 1148: 48 89 de mov %rbx,%rsi 114b: 48 89 ef mov %rbp,%rdi 114e: e8 3d ff ff ff call 1090 <__isoc99_fscanf@plt> 1153: 83 f8 01 cmp $0x1,%eax 1156: 74 d8 je 1130 <main+0x50> 1158: 48 89 ef mov %rbp,%rdi 115b: e8 40 ff ff ff call 10a0 <fclose@plt> 1160: 48 8b 44 24 08 mov 0x8(%rsp),%rax 1165: 64 48 2b 04 25 28 00 sub %fs:0x28,%rax 116c: 00 00 116e: 75 0d jne 117d <main+0x9d> 1170: 48 83 c4 18 add $0x18,%rsp 1174: 31 c0 xor %eax,%eax 1176: 5b pop %rbx 1177: 5d pop %rbp 1178: 41 5c pop %r12 117a: 41 5d pop %r13 117c: c3 ret 117d: e8 2e ff ff ff call 10b0 <__stack_chk_fail@plt> 1182: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 1189: 00 00 00 118c: 0f 1f 40 00 nopl 0x0(%rax) 0000000000001190 <_start>: 1190: f3 0f 1e fa endbr64 1194: 31 ed xor %ebp,%ebp 1196: 49 89 d1 mov %rdx,%r9 1199: 5e pop %rsi 119a: 48 89 e2 mov %rsp,%rdx 119d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 11a1: 50 push %rax 11a2: 54 push %rsp 11a3: 45 31 c0 xor %r8d,%r8d 11a6: 31 c9 xor %ecx,%ecx 11a8: 48 8d 3d 31 ff ff ff lea -0xcf(%rip),%rdi # 10e0 <main> 11af: ff 15 23 2e 00 00 call *0x2e23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 11b5: f4 hlt 11b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 11bd: 00 00 00 00000000000011c0 <deregister_tm_clones>: 11c0: 48 8d 3d 49 2e 00 00 lea 0x2e49(%rip),%rdi # 4010 <__TMC_END__> 11c7: 48 8d 05 42 2e 00 00 lea 0x2e42(%rip),%rax # 4010 <__TMC_END__> 11ce: 48 39 f8 cmp %rdi,%rax 11d1: 74 15 je 11e8 <deregister_tm_clones+0x28> 11d3: 48 8b 05 06 2e 00 00 mov 0x2e06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 11da: 48 85 c0 test %rax,%rax 11dd: 74 09 je 11e8 <deregister_tm_clones+0x28> 11df: ff e0 jmp *%rax 11e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 11e8: c3 ret 11e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011f0 <register_tm_clones>: 11f0: 48 8d 3d 19 2e 00 00 lea 0x2e19(%rip),%rdi # 4010 <__TMC_END__> 11f7: 48 8d 35 12 2e 00 00 lea 0x2e12(%rip),%rsi # 4010 <__TMC_END__> 11fe: 48 29 fe sub %rdi,%rsi 1201: 48 89 f0 mov %rsi,%rax 1204: 48 c1 ee 3f shr $0x3f,%rsi 1208: 48 c1 f8 03 sar $0x3,%rax 120c: 48 01 c6 add %rax,%rsi 120f: 48 d1 fe sar %rsi 1212: 74 14 je 1228 <register_tm_clones+0x38> 1214: 48 8b 05 d5 2d 00 00 mov 0x2dd5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 121b: 48 85 c0 test %rax,%rax 121e: 74 08 je 1228 <register_tm_clones+0x38> 1220: ff e0 jmp *%rax 1222: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1228: c3 ret 1229: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001230 <__do_global_dtors_aux>: 1230: f3 0f 1e fa endbr64 1234: 80 3d d5 2d 00 00 00 cmpb $0x0,0x2dd5(%rip) # 4010 <__TMC_END__> 123b: 75 2b jne 1268 <__do_global_dtors_aux+0x38> 123d: 55 push %rbp 123e: 48 83 3d b2 2d 00 00 cmpq $0x0,0x2db2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1245: 00 1246: 48 89 e5 mov %rsp,%rbp 1249: 74 0c je 1257 <__do_global_dtors_aux+0x27> 124b: 48 8b 3d b6 2d 00 00 mov 0x2db6(%rip),%rdi # 4008 <__dso_handle> 1252: e8 29 fe ff ff call 1080 <__cxa_finalize@plt> 1257: e8 64 ff ff ff call 11c0 <deregister_tm_clones> 125c: c6 05 ad 2d 00 00 01 movb $0x1,0x2dad(%rip) # 4010 <__TMC_END__> 1263: 5d pop %rbp 1264: c3 ret 1265: 0f 1f 00 nopl (%rax) 1268: c3 ret 1269: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001270 <frame_dummy>: 1270: f3 0f 1e fa endbr64 1274: e9 77 ff ff ff jmp 11f0 <register_tm_clones> Disassembly of section .fini: 000000000000127c <_fini>: 127c: f3 0f 1e fa endbr64 1280: 48 83 ec 08 sub $0x8,%rsp 1284: 48 83 c4 08 add $0x8,%rsp 1288: c3 ret
-O2
x86
#include <stdio.h> int main() { FILE *fp; int number; fp = fopen("testfile4.txt", "r"); if (fp != NULL) { while (fscanf(fp, "%d", &number) == 1) { printf("%d\n", number); } fclose(fp); } return 0; }
/data/compiled/sample_program_14_O3_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 7a 2f 00 00 push 0x2f7a(%rip) # 3fa0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 7b 2f 00 00 bnd jmp *0x2f7b(%rip) # 3fa8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop 1070: f3 0f 1e fa endbr64 1074: 68 04 00 00 00 push $0x4 1079: f2 e9 a1 ff ff ff bnd jmp 1020 <_init+0x20> 107f: 90 nop Disassembly of section .plt.got: 0000000000001080 <__cxa_finalize@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 6d 2f 00 00 bnd jmp *0x2f6d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001090 <__isoc99_fscanf@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 15 2f 00 00 bnd jmp *0x2f15(%rip) # 3fb0 <__isoc99_fscanf@GLIBC_2.7> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010a0 <fclose@plt>: 10a0: f3 0f 1e fa endbr64 10a4: f2 ff 25 0d 2f 00 00 bnd jmp *0x2f0d(%rip) # 3fb8 <fclose@GLIBC_2.2.5> 10ab: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010b0 <__stack_chk_fail@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 05 2f 00 00 bnd jmp *0x2f05(%rip) # 3fc0 <__stack_chk_fail@GLIBC_2.4> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010c0 <__printf_chk@plt>: 10c0: f3 0f 1e fa endbr64 10c4: f2 ff 25 fd 2e 00 00 bnd jmp *0x2efd(%rip) # 3fc8 <__printf_chk@GLIBC_2.3.4> 10cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010d0 <fopen@plt>: 10d0: f3 0f 1e fa endbr64 10d4: f2 ff 25 f5 2e 00 00 bnd jmp *0x2ef5(%rip) # 3fd0 <fopen@GLIBC_2.2.5> 10db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010e0 <main>: 10e0: f3 0f 1e fa endbr64 10e4: 41 55 push %r13 10e6: 48 8d 35 17 0f 00 00 lea 0xf17(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 10ed: 48 8d 3d 12 0f 00 00 lea 0xf12(%rip),%rdi # 2006 <_IO_stdin_used+0x6> 10f4: 41 54 push %r12 10f6: 55 push %rbp 10f7: 53 push %rbx 10f8: 48 83 ec 18 sub $0x18,%rsp 10fc: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 1103: 00 00 1105: 48 89 44 24 08 mov %rax,0x8(%rsp) 110a: 31 c0 xor %eax,%eax 110c: e8 bf ff ff ff call 10d0 <fopen@plt> 1111: 48 85 c0 test %rax,%rax 1114: 74 4a je 1160 <main+0x80> 1116: 48 89 c5 mov %rax,%rbp 1119: 4c 8d 64 24 04 lea 0x4(%rsp),%r12 111e: 48 8d 1d f3 0e 00 00 lea 0xef3(%rip),%rbx # 2018 <_IO_stdin_used+0x18> 1125: 4c 8d 2d e8 0e 00 00 lea 0xee8(%rip),%r13 # 2014 <_IO_stdin_used+0x14> 112c: eb 15 jmp 1143 <main+0x63> 112e: 66 90 xchg %ax,%ax 1130: 8b 54 24 04 mov 0x4(%rsp),%edx 1134: 4c 89 ee mov %r13,%rsi 1137: bf 01 00 00 00 mov $0x1,%edi 113c: 31 c0 xor %eax,%eax 113e: e8 7d ff ff ff call 10c0 <__printf_chk@plt> 1143: 31 c0 xor %eax,%eax 1145: 4c 89 e2 mov %r12,%rdx 1148: 48 89 de mov %rbx,%rsi 114b: 48 89 ef mov %rbp,%rdi 114e: e8 3d ff ff ff call 1090 <__isoc99_fscanf@plt> 1153: 83 f8 01 cmp $0x1,%eax 1156: 74 d8 je 1130 <main+0x50> 1158: 48 89 ef mov %rbp,%rdi 115b: e8 40 ff ff ff call 10a0 <fclose@plt> 1160: 48 8b 44 24 08 mov 0x8(%rsp),%rax 1165: 64 48 2b 04 25 28 00 sub %fs:0x28,%rax 116c: 00 00 116e: 75 0d jne 117d <main+0x9d> 1170: 48 83 c4 18 add $0x18,%rsp 1174: 31 c0 xor %eax,%eax 1176: 5b pop %rbx 1177: 5d pop %rbp 1178: 41 5c pop %r12 117a: 41 5d pop %r13 117c: c3 ret 117d: e8 2e ff ff ff call 10b0 <__stack_chk_fail@plt> 1182: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 1189: 00 00 00 118c: 0f 1f 40 00 nopl 0x0(%rax) 0000000000001190 <_start>: 1190: f3 0f 1e fa endbr64 1194: 31 ed xor %ebp,%ebp 1196: 49 89 d1 mov %rdx,%r9 1199: 5e pop %rsi 119a: 48 89 e2 mov %rsp,%rdx 119d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 11a1: 50 push %rax 11a2: 54 push %rsp 11a3: 45 31 c0 xor %r8d,%r8d 11a6: 31 c9 xor %ecx,%ecx 11a8: 48 8d 3d 31 ff ff ff lea -0xcf(%rip),%rdi # 10e0 <main> 11af: ff 15 23 2e 00 00 call *0x2e23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 11b5: f4 hlt 11b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 11bd: 00 00 00 00000000000011c0 <deregister_tm_clones>: 11c0: 48 8d 3d 49 2e 00 00 lea 0x2e49(%rip),%rdi # 4010 <__TMC_END__> 11c7: 48 8d 05 42 2e 00 00 lea 0x2e42(%rip),%rax # 4010 <__TMC_END__> 11ce: 48 39 f8 cmp %rdi,%rax 11d1: 74 15 je 11e8 <deregister_tm_clones+0x28> 11d3: 48 8b 05 06 2e 00 00 mov 0x2e06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 11da: 48 85 c0 test %rax,%rax 11dd: 74 09 je 11e8 <deregister_tm_clones+0x28> 11df: ff e0 jmp *%rax 11e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 11e8: c3 ret 11e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011f0 <register_tm_clones>: 11f0: 48 8d 3d 19 2e 00 00 lea 0x2e19(%rip),%rdi # 4010 <__TMC_END__> 11f7: 48 8d 35 12 2e 00 00 lea 0x2e12(%rip),%rsi # 4010 <__TMC_END__> 11fe: 48 29 fe sub %rdi,%rsi 1201: 48 89 f0 mov %rsi,%rax 1204: 48 c1 ee 3f shr $0x3f,%rsi 1208: 48 c1 f8 03 sar $0x3,%rax 120c: 48 01 c6 add %rax,%rsi 120f: 48 d1 fe sar %rsi 1212: 74 14 je 1228 <register_tm_clones+0x38> 1214: 48 8b 05 d5 2d 00 00 mov 0x2dd5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 121b: 48 85 c0 test %rax,%rax 121e: 74 08 je 1228 <register_tm_clones+0x38> 1220: ff e0 jmp *%rax 1222: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1228: c3 ret 1229: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001230 <__do_global_dtors_aux>: 1230: f3 0f 1e fa endbr64 1234: 80 3d d5 2d 00 00 00 cmpb $0x0,0x2dd5(%rip) # 4010 <__TMC_END__> 123b: 75 2b jne 1268 <__do_global_dtors_aux+0x38> 123d: 55 push %rbp 123e: 48 83 3d b2 2d 00 00 cmpq $0x0,0x2db2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1245: 00 1246: 48 89 e5 mov %rsp,%rbp 1249: 74 0c je 1257 <__do_global_dtors_aux+0x27> 124b: 48 8b 3d b6 2d 00 00 mov 0x2db6(%rip),%rdi # 4008 <__dso_handle> 1252: e8 29 fe ff ff call 1080 <__cxa_finalize@plt> 1257: e8 64 ff ff ff call 11c0 <deregister_tm_clones> 125c: c6 05 ad 2d 00 00 01 movb $0x1,0x2dad(%rip) # 4010 <__TMC_END__> 1263: 5d pop %rbp 1264: c3 ret 1265: 0f 1f 00 nopl (%rax) 1268: c3 ret 1269: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001270 <frame_dummy>: 1270: f3 0f 1e fa endbr64 1274: e9 77 ff ff ff jmp 11f0 <register_tm_clones> Disassembly of section .fini: 000000000000127c <_fini>: 127c: f3 0f 1e fa endbr64 1280: 48 83 ec 08 sub $0x8,%rsp 1284: 48 83 c4 08 add $0x8,%rsp 1288: c3 ret
-O3
x86
#include <stdio.h> int main() { FILE *fp; fp = fopen("testfile5.txt", "a"); if (fp != NULL) { fprintf(fp, "Appending text to file.\n"); fclose(fp); } return 0; }
/data/compiled/sample_program_15_O0_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 8a 2f 00 00 push 0x2f8a(%rip) # 3fb0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 8b 2f 00 00 bnd jmp *0x2f8b(%rip) # 3fb8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop Disassembly of section .plt.got: 0000000000001060 <__cxa_finalize@plt>: 1060: f3 0f 1e fa endbr64 1064: f2 ff 25 8d 2f 00 00 bnd jmp *0x2f8d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 106b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001070 <fclose@plt>: 1070: f3 0f 1e fa endbr64 1074: f2 ff 25 45 2f 00 00 bnd jmp *0x2f45(%rip) # 3fc0 <fclose@GLIBC_2.2.5> 107b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001080 <fopen@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 3d 2f 00 00 bnd jmp *0x2f3d(%rip) # 3fc8 <fopen@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001090 <fwrite@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 35 2f 00 00 bnd jmp *0x2f35(%rip) # 3fd0 <fwrite@GLIBC_2.2.5> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010a0 <_start>: 10a0: f3 0f 1e fa endbr64 10a4: 31 ed xor %ebp,%ebp 10a6: 49 89 d1 mov %rdx,%r9 10a9: 5e pop %rsi 10aa: 48 89 e2 mov %rsp,%rdx 10ad: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10b1: 50 push %rax 10b2: 54 push %rsp 10b3: 45 31 c0 xor %r8d,%r8d 10b6: 31 c9 xor %ecx,%ecx 10b8: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1189 <main> 10bf: ff 15 13 2f 00 00 call *0x2f13(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10c5: f4 hlt 10c6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10cd: 00 00 00 00000000000010d0 <deregister_tm_clones>: 10d0: 48 8d 3d 39 2f 00 00 lea 0x2f39(%rip),%rdi # 4010 <__TMC_END__> 10d7: 48 8d 05 32 2f 00 00 lea 0x2f32(%rip),%rax # 4010 <__TMC_END__> 10de: 48 39 f8 cmp %rdi,%rax 10e1: 74 15 je 10f8 <deregister_tm_clones+0x28> 10e3: 48 8b 05 f6 2e 00 00 mov 0x2ef6(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10ea: 48 85 c0 test %rax,%rax 10ed: 74 09 je 10f8 <deregister_tm_clones+0x28> 10ef: ff e0 jmp *%rax 10f1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <register_tm_clones>: 1100: 48 8d 3d 09 2f 00 00 lea 0x2f09(%rip),%rdi # 4010 <__TMC_END__> 1107: 48 8d 35 02 2f 00 00 lea 0x2f02(%rip),%rsi # 4010 <__TMC_END__> 110e: 48 29 fe sub %rdi,%rsi 1111: 48 89 f0 mov %rsi,%rax 1114: 48 c1 ee 3f shr $0x3f,%rsi 1118: 48 c1 f8 03 sar $0x3,%rax 111c: 48 01 c6 add %rax,%rsi 111f: 48 d1 fe sar %rsi 1122: 74 14 je 1138 <register_tm_clones+0x38> 1124: 48 8b 05 c5 2e 00 00 mov 0x2ec5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 112b: 48 85 c0 test %rax,%rax 112e: 74 08 je 1138 <register_tm_clones+0x38> 1130: ff e0 jmp *%rax 1132: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <__do_global_dtors_aux>: 1140: f3 0f 1e fa endbr64 1144: 80 3d c5 2e 00 00 00 cmpb $0x0,0x2ec5(%rip) # 4010 <__TMC_END__> 114b: 75 2b jne 1178 <__do_global_dtors_aux+0x38> 114d: 55 push %rbp 114e: 48 83 3d a2 2e 00 00 cmpq $0x0,0x2ea2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1155: 00 1156: 48 89 e5 mov %rsp,%rbp 1159: 74 0c je 1167 <__do_global_dtors_aux+0x27> 115b: 48 8b 3d a6 2e 00 00 mov 0x2ea6(%rip),%rdi # 4008 <__dso_handle> 1162: e8 f9 fe ff ff call 1060 <__cxa_finalize@plt> 1167: e8 64 ff ff ff call 10d0 <deregister_tm_clones> 116c: c6 05 9d 2e 00 00 01 movb $0x1,0x2e9d(%rip) # 4010 <__TMC_END__> 1173: 5d pop %rbp 1174: c3 ret 1175: 0f 1f 00 nopl (%rax) 1178: c3 ret 1179: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001180 <frame_dummy>: 1180: f3 0f 1e fa endbr64 1184: e9 77 ff ff ff jmp 1100 <register_tm_clones> 0000000000001189 <main>: 1189: f3 0f 1e fa endbr64 118d: 55 push %rbp 118e: 48 89 e5 mov %rsp,%rbp 1191: 48 83 ec 10 sub $0x10,%rsp 1195: 48 8d 05 68 0e 00 00 lea 0xe68(%rip),%rax # 2004 <_IO_stdin_used+0x4> 119c: 48 89 c6 mov %rax,%rsi 119f: 48 8d 05 60 0e 00 00 lea 0xe60(%rip),%rax # 2006 <_IO_stdin_used+0x6> 11a6: 48 89 c7 mov %rax,%rdi 11a9: e8 d2 fe ff ff call 1080 <fopen@plt> 11ae: 48 89 45 f8 mov %rax,-0x8(%rbp) 11b2: 48 83 7d f8 00 cmpq $0x0,-0x8(%rbp) 11b7: 74 2c je 11e5 <main+0x5c> 11b9: 48 8b 45 f8 mov -0x8(%rbp),%rax 11bd: 48 89 c1 mov %rax,%rcx 11c0: ba 18 00 00 00 mov $0x18,%edx 11c5: be 01 00 00 00 mov $0x1,%esi 11ca: 48 8d 05 43 0e 00 00 lea 0xe43(%rip),%rax # 2014 <_IO_stdin_used+0x14> 11d1: 48 89 c7 mov %rax,%rdi 11d4: e8 b7 fe ff ff call 1090 <fwrite@plt> 11d9: 48 8b 45 f8 mov -0x8(%rbp),%rax 11dd: 48 89 c7 mov %rax,%rdi 11e0: e8 8b fe ff ff call 1070 <fclose@plt> 11e5: b8 00 00 00 00 mov $0x0,%eax 11ea: c9 leave 11eb: c3 ret Disassembly of section .fini: 00000000000011ec <_fini>: 11ec: f3 0f 1e fa endbr64 11f0: 48 83 ec 08 sub $0x8,%rsp 11f4: 48 83 c4 08 add $0x8,%rsp 11f8: c3 ret
-O0
x86
#include <stdio.h> int main() { FILE *fp; fp = fopen("testfile5.txt", "a"); if (fp != NULL) { fprintf(fp, "Appending text to file.\n"); fclose(fp); } return 0; }
/data/compiled/sample_program_15_O1_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 8a 2f 00 00 push 0x2f8a(%rip) # 3fb0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 8b 2f 00 00 bnd jmp *0x2f8b(%rip) # 3fb8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop Disassembly of section .plt.got: 0000000000001060 <__cxa_finalize@plt>: 1060: f3 0f 1e fa endbr64 1064: f2 ff 25 8d 2f 00 00 bnd jmp *0x2f8d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 106b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001070 <fclose@plt>: 1070: f3 0f 1e fa endbr64 1074: f2 ff 25 45 2f 00 00 bnd jmp *0x2f45(%rip) # 3fc0 <fclose@GLIBC_2.2.5> 107b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001080 <fopen@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 3d 2f 00 00 bnd jmp *0x2f3d(%rip) # 3fc8 <fopen@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001090 <fwrite@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 35 2f 00 00 bnd jmp *0x2f35(%rip) # 3fd0 <fwrite@GLIBC_2.2.5> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010a0 <_start>: 10a0: f3 0f 1e fa endbr64 10a4: 31 ed xor %ebp,%ebp 10a6: 49 89 d1 mov %rdx,%r9 10a9: 5e pop %rsi 10aa: 48 89 e2 mov %rsp,%rdx 10ad: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10b1: 50 push %rax 10b2: 54 push %rsp 10b3: 45 31 c0 xor %r8d,%r8d 10b6: 31 c9 xor %ecx,%ecx 10b8: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1189 <main> 10bf: ff 15 13 2f 00 00 call *0x2f13(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10c5: f4 hlt 10c6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10cd: 00 00 00 00000000000010d0 <deregister_tm_clones>: 10d0: 48 8d 3d 39 2f 00 00 lea 0x2f39(%rip),%rdi # 4010 <__TMC_END__> 10d7: 48 8d 05 32 2f 00 00 lea 0x2f32(%rip),%rax # 4010 <__TMC_END__> 10de: 48 39 f8 cmp %rdi,%rax 10e1: 74 15 je 10f8 <deregister_tm_clones+0x28> 10e3: 48 8b 05 f6 2e 00 00 mov 0x2ef6(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10ea: 48 85 c0 test %rax,%rax 10ed: 74 09 je 10f8 <deregister_tm_clones+0x28> 10ef: ff e0 jmp *%rax 10f1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <register_tm_clones>: 1100: 48 8d 3d 09 2f 00 00 lea 0x2f09(%rip),%rdi # 4010 <__TMC_END__> 1107: 48 8d 35 02 2f 00 00 lea 0x2f02(%rip),%rsi # 4010 <__TMC_END__> 110e: 48 29 fe sub %rdi,%rsi 1111: 48 89 f0 mov %rsi,%rax 1114: 48 c1 ee 3f shr $0x3f,%rsi 1118: 48 c1 f8 03 sar $0x3,%rax 111c: 48 01 c6 add %rax,%rsi 111f: 48 d1 fe sar %rsi 1122: 74 14 je 1138 <register_tm_clones+0x38> 1124: 48 8b 05 c5 2e 00 00 mov 0x2ec5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 112b: 48 85 c0 test %rax,%rax 112e: 74 08 je 1138 <register_tm_clones+0x38> 1130: ff e0 jmp *%rax 1132: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <__do_global_dtors_aux>: 1140: f3 0f 1e fa endbr64 1144: 80 3d c5 2e 00 00 00 cmpb $0x0,0x2ec5(%rip) # 4010 <__TMC_END__> 114b: 75 2b jne 1178 <__do_global_dtors_aux+0x38> 114d: 55 push %rbp 114e: 48 83 3d a2 2e 00 00 cmpq $0x0,0x2ea2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1155: 00 1156: 48 89 e5 mov %rsp,%rbp 1159: 74 0c je 1167 <__do_global_dtors_aux+0x27> 115b: 48 8b 3d a6 2e 00 00 mov 0x2ea6(%rip),%rdi # 4008 <__dso_handle> 1162: e8 f9 fe ff ff call 1060 <__cxa_finalize@plt> 1167: e8 64 ff ff ff call 10d0 <deregister_tm_clones> 116c: c6 05 9d 2e 00 00 01 movb $0x1,0x2e9d(%rip) # 4010 <__TMC_END__> 1173: 5d pop %rbp 1174: c3 ret 1175: 0f 1f 00 nopl (%rax) 1178: c3 ret 1179: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001180 <frame_dummy>: 1180: f3 0f 1e fa endbr64 1184: e9 77 ff ff ff jmp 1100 <register_tm_clones> 0000000000001189 <main>: 1189: f3 0f 1e fa endbr64 118d: 53 push %rbx 118e: 48 8d 35 6f 0e 00 00 lea 0xe6f(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 1195: 48 8d 3d 6a 0e 00 00 lea 0xe6a(%rip),%rdi # 2006 <_IO_stdin_used+0x6> 119c: e8 df fe ff ff call 1080 <fopen@plt> 11a1: 48 85 c0 test %rax,%rax 11a4: 74 24 je 11ca <main+0x41> 11a6: 48 89 c3 mov %rax,%rbx 11a9: 48 89 c1 mov %rax,%rcx 11ac: ba 18 00 00 00 mov $0x18,%edx 11b1: be 01 00 00 00 mov $0x1,%esi 11b6: 48 8d 3d 57 0e 00 00 lea 0xe57(%rip),%rdi # 2014 <_IO_stdin_used+0x14> 11bd: e8 ce fe ff ff call 1090 <fwrite@plt> 11c2: 48 89 df mov %rbx,%rdi 11c5: e8 a6 fe ff ff call 1070 <fclose@plt> 11ca: b8 00 00 00 00 mov $0x0,%eax 11cf: 5b pop %rbx 11d0: c3 ret Disassembly of section .fini: 00000000000011d4 <_fini>: 11d4: f3 0f 1e fa endbr64 11d8: 48 83 ec 08 sub $0x8,%rsp 11dc: 48 83 c4 08 add $0x8,%rsp 11e0: c3 ret
-O1
x86
#include <stdio.h> int main() { FILE *fp; fp = fopen("testfile5.txt", "a"); if (fp != NULL) { fprintf(fp, "Appending text to file.\n"); fclose(fp); } return 0; }
/data/compiled/sample_program_15_O2_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 8a 2f 00 00 push 0x2f8a(%rip) # 3fb0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 8b 2f 00 00 bnd jmp *0x2f8b(%rip) # 3fb8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop Disassembly of section .plt.got: 0000000000001060 <__cxa_finalize@plt>: 1060: f3 0f 1e fa endbr64 1064: f2 ff 25 8d 2f 00 00 bnd jmp *0x2f8d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 106b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001070 <fclose@plt>: 1070: f3 0f 1e fa endbr64 1074: f2 ff 25 45 2f 00 00 bnd jmp *0x2f45(%rip) # 3fc0 <fclose@GLIBC_2.2.5> 107b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001080 <fopen@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 3d 2f 00 00 bnd jmp *0x2f3d(%rip) # 3fc8 <fopen@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001090 <fwrite@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 35 2f 00 00 bnd jmp *0x2f35(%rip) # 3fd0 <fwrite@GLIBC_2.2.5> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010a0 <main>: 10a0: f3 0f 1e fa endbr64 10a4: 55 push %rbp 10a5: 48 8d 35 58 0f 00 00 lea 0xf58(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 10ac: 48 8d 3d 53 0f 00 00 lea 0xf53(%rip),%rdi # 2006 <_IO_stdin_used+0x6> 10b3: e8 c8 ff ff ff call 1080 <fopen@plt> 10b8: 48 85 c0 test %rax,%rax 10bb: 74 24 je 10e1 <main+0x41> 10bd: 48 89 c5 mov %rax,%rbp 10c0: 48 89 c1 mov %rax,%rcx 10c3: ba 18 00 00 00 mov $0x18,%edx 10c8: be 01 00 00 00 mov $0x1,%esi 10cd: 48 8d 3d 40 0f 00 00 lea 0xf40(%rip),%rdi # 2014 <_IO_stdin_used+0x14> 10d4: e8 b7 ff ff ff call 1090 <fwrite@plt> 10d9: 48 89 ef mov %rbp,%rdi 10dc: e8 8f ff ff ff call 1070 <fclose@plt> 10e1: 31 c0 xor %eax,%eax 10e3: 5d pop %rbp 10e4: c3 ret 10e5: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10ec: 00 00 00 10ef: 90 nop 00000000000010f0 <_start>: 10f0: f3 0f 1e fa endbr64 10f4: 31 ed xor %ebp,%ebp 10f6: 49 89 d1 mov %rdx,%r9 10f9: 5e pop %rsi 10fa: 48 89 e2 mov %rsp,%rdx 10fd: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1101: 50 push %rax 1102: 54 push %rsp 1103: 45 31 c0 xor %r8d,%r8d 1106: 31 c9 xor %ecx,%ecx 1108: 48 8d 3d 91 ff ff ff lea -0x6f(%rip),%rdi # 10a0 <main> 110f: ff 15 c3 2e 00 00 call *0x2ec3(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1115: f4 hlt 1116: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 111d: 00 00 00 0000000000001120 <deregister_tm_clones>: 1120: 48 8d 3d e9 2e 00 00 lea 0x2ee9(%rip),%rdi # 4010 <__TMC_END__> 1127: 48 8d 05 e2 2e 00 00 lea 0x2ee2(%rip),%rax # 4010 <__TMC_END__> 112e: 48 39 f8 cmp %rdi,%rax 1131: 74 15 je 1148 <deregister_tm_clones+0x28> 1133: 48 8b 05 a6 2e 00 00 mov 0x2ea6(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 113a: 48 85 c0 test %rax,%rax 113d: 74 09 je 1148 <deregister_tm_clones+0x28> 113f: ff e0 jmp *%rax 1141: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 1148: c3 ret 1149: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001150 <register_tm_clones>: 1150: 48 8d 3d b9 2e 00 00 lea 0x2eb9(%rip),%rdi # 4010 <__TMC_END__> 1157: 48 8d 35 b2 2e 00 00 lea 0x2eb2(%rip),%rsi # 4010 <__TMC_END__> 115e: 48 29 fe sub %rdi,%rsi 1161: 48 89 f0 mov %rsi,%rax 1164: 48 c1 ee 3f shr $0x3f,%rsi 1168: 48 c1 f8 03 sar $0x3,%rax 116c: 48 01 c6 add %rax,%rsi 116f: 48 d1 fe sar %rsi 1172: 74 14 je 1188 <register_tm_clones+0x38> 1174: 48 8b 05 75 2e 00 00 mov 0x2e75(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 117b: 48 85 c0 test %rax,%rax 117e: 74 08 je 1188 <register_tm_clones+0x38> 1180: ff e0 jmp *%rax 1182: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1188: c3 ret 1189: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001190 <__do_global_dtors_aux>: 1190: f3 0f 1e fa endbr64 1194: 80 3d 75 2e 00 00 00 cmpb $0x0,0x2e75(%rip) # 4010 <__TMC_END__> 119b: 75 2b jne 11c8 <__do_global_dtors_aux+0x38> 119d: 55 push %rbp 119e: 48 83 3d 52 2e 00 00 cmpq $0x0,0x2e52(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 11a5: 00 11a6: 48 89 e5 mov %rsp,%rbp 11a9: 74 0c je 11b7 <__do_global_dtors_aux+0x27> 11ab: 48 8b 3d 56 2e 00 00 mov 0x2e56(%rip),%rdi # 4008 <__dso_handle> 11b2: e8 a9 fe ff ff call 1060 <__cxa_finalize@plt> 11b7: e8 64 ff ff ff call 1120 <deregister_tm_clones> 11bc: c6 05 4d 2e 00 00 01 movb $0x1,0x2e4d(%rip) # 4010 <__TMC_END__> 11c3: 5d pop %rbp 11c4: c3 ret 11c5: 0f 1f 00 nopl (%rax) 11c8: c3 ret 11c9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011d0 <frame_dummy>: 11d0: f3 0f 1e fa endbr64 11d4: e9 77 ff ff ff jmp 1150 <register_tm_clones> Disassembly of section .fini: 00000000000011dc <_fini>: 11dc: f3 0f 1e fa endbr64 11e0: 48 83 ec 08 sub $0x8,%rsp 11e4: 48 83 c4 08 add $0x8,%rsp 11e8: c3 ret
-O2
x86
#include <stdio.h> int main() { FILE *fp; fp = fopen("testfile5.txt", "a"); if (fp != NULL) { fprintf(fp, "Appending text to file.\n"); fclose(fp); } return 0; }
/data/compiled/sample_program_15_O3_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 8a 2f 00 00 push 0x2f8a(%rip) # 3fb0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 8b 2f 00 00 bnd jmp *0x2f8b(%rip) # 3fb8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop Disassembly of section .plt.got: 0000000000001060 <__cxa_finalize@plt>: 1060: f3 0f 1e fa endbr64 1064: f2 ff 25 8d 2f 00 00 bnd jmp *0x2f8d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 106b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001070 <fclose@plt>: 1070: f3 0f 1e fa endbr64 1074: f2 ff 25 45 2f 00 00 bnd jmp *0x2f45(%rip) # 3fc0 <fclose@GLIBC_2.2.5> 107b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001080 <fopen@plt>: 1080: f3 0f 1e fa endbr64 1084: f2 ff 25 3d 2f 00 00 bnd jmp *0x2f3d(%rip) # 3fc8 <fopen@GLIBC_2.2.5> 108b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001090 <fwrite@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 35 2f 00 00 bnd jmp *0x2f35(%rip) # 3fd0 <fwrite@GLIBC_2.2.5> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 00000000000010a0 <main>: 10a0: f3 0f 1e fa endbr64 10a4: 55 push %rbp 10a5: 48 8d 35 58 0f 00 00 lea 0xf58(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 10ac: 48 8d 3d 53 0f 00 00 lea 0xf53(%rip),%rdi # 2006 <_IO_stdin_used+0x6> 10b3: e8 c8 ff ff ff call 1080 <fopen@plt> 10b8: 48 85 c0 test %rax,%rax 10bb: 74 24 je 10e1 <main+0x41> 10bd: 48 89 c5 mov %rax,%rbp 10c0: 48 89 c1 mov %rax,%rcx 10c3: ba 18 00 00 00 mov $0x18,%edx 10c8: be 01 00 00 00 mov $0x1,%esi 10cd: 48 8d 3d 40 0f 00 00 lea 0xf40(%rip),%rdi # 2014 <_IO_stdin_used+0x14> 10d4: e8 b7 ff ff ff call 1090 <fwrite@plt> 10d9: 48 89 ef mov %rbp,%rdi 10dc: e8 8f ff ff ff call 1070 <fclose@plt> 10e1: 31 c0 xor %eax,%eax 10e3: 5d pop %rbp 10e4: c3 ret 10e5: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10ec: 00 00 00 10ef: 90 nop 00000000000010f0 <_start>: 10f0: f3 0f 1e fa endbr64 10f4: 31 ed xor %ebp,%ebp 10f6: 49 89 d1 mov %rdx,%r9 10f9: 5e pop %rsi 10fa: 48 89 e2 mov %rsp,%rdx 10fd: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1101: 50 push %rax 1102: 54 push %rsp 1103: 45 31 c0 xor %r8d,%r8d 1106: 31 c9 xor %ecx,%ecx 1108: 48 8d 3d 91 ff ff ff lea -0x6f(%rip),%rdi # 10a0 <main> 110f: ff 15 c3 2e 00 00 call *0x2ec3(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1115: f4 hlt 1116: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 111d: 00 00 00 0000000000001120 <deregister_tm_clones>: 1120: 48 8d 3d e9 2e 00 00 lea 0x2ee9(%rip),%rdi # 4010 <__TMC_END__> 1127: 48 8d 05 e2 2e 00 00 lea 0x2ee2(%rip),%rax # 4010 <__TMC_END__> 112e: 48 39 f8 cmp %rdi,%rax 1131: 74 15 je 1148 <deregister_tm_clones+0x28> 1133: 48 8b 05 a6 2e 00 00 mov 0x2ea6(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 113a: 48 85 c0 test %rax,%rax 113d: 74 09 je 1148 <deregister_tm_clones+0x28> 113f: ff e0 jmp *%rax 1141: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 1148: c3 ret 1149: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001150 <register_tm_clones>: 1150: 48 8d 3d b9 2e 00 00 lea 0x2eb9(%rip),%rdi # 4010 <__TMC_END__> 1157: 48 8d 35 b2 2e 00 00 lea 0x2eb2(%rip),%rsi # 4010 <__TMC_END__> 115e: 48 29 fe sub %rdi,%rsi 1161: 48 89 f0 mov %rsi,%rax 1164: 48 c1 ee 3f shr $0x3f,%rsi 1168: 48 c1 f8 03 sar $0x3,%rax 116c: 48 01 c6 add %rax,%rsi 116f: 48 d1 fe sar %rsi 1172: 74 14 je 1188 <register_tm_clones+0x38> 1174: 48 8b 05 75 2e 00 00 mov 0x2e75(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 117b: 48 85 c0 test %rax,%rax 117e: 74 08 je 1188 <register_tm_clones+0x38> 1180: ff e0 jmp *%rax 1182: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1188: c3 ret 1189: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001190 <__do_global_dtors_aux>: 1190: f3 0f 1e fa endbr64 1194: 80 3d 75 2e 00 00 00 cmpb $0x0,0x2e75(%rip) # 4010 <__TMC_END__> 119b: 75 2b jne 11c8 <__do_global_dtors_aux+0x38> 119d: 55 push %rbp 119e: 48 83 3d 52 2e 00 00 cmpq $0x0,0x2e52(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 11a5: 00 11a6: 48 89 e5 mov %rsp,%rbp 11a9: 74 0c je 11b7 <__do_global_dtors_aux+0x27> 11ab: 48 8b 3d 56 2e 00 00 mov 0x2e56(%rip),%rdi # 4008 <__dso_handle> 11b2: e8 a9 fe ff ff call 1060 <__cxa_finalize@plt> 11b7: e8 64 ff ff ff call 1120 <deregister_tm_clones> 11bc: c6 05 4d 2e 00 00 01 movb $0x1,0x2e4d(%rip) # 4010 <__TMC_END__> 11c3: 5d pop %rbp 11c4: c3 ret 11c5: 0f 1f 00 nopl (%rax) 11c8: c3 ret 11c9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011d0 <frame_dummy>: 11d0: f3 0f 1e fa endbr64 11d4: e9 77 ff ff ff jmp 1150 <register_tm_clones> Disassembly of section .fini: 00000000000011dc <_fini>: 11dc: f3 0f 1e fa endbr64 11e0: 48 83 ec 08 sub $0x8,%rsp 11e4: 48 83 c4 08 add $0x8,%rsp 11e8: c3 ret
-O3
x86
#include <stdio.h> #include <sys/socket.h> #include <netinet/in.h> #include <string.h> #include <arpa/inet.h> int main() { int clientSocket; char buffer[1024]; struct sockaddr_in serverAddr; socklen_t addr_size; // Create the socket. clientSocket = socket(PF_INET, SOCK_STREAM, 0); // Configure settings of the server address struct serverAddr.sin_family = AF_INET; serverAddr.sin_port = htons(7891); serverAddr.sin_addr.s_addr = inet_addr("127.0.0.1"); memset(serverAddr.sin_zero, '\0', sizeof serverAddr.sin_zero); // Connect the socket to the server using the address addr_size = sizeof serverAddr; connect(clientSocket, (struct sockaddr *) &serverAddr, addr_size); // Read the message from the server into the buffer recv(clientSocket, buffer, 1024, 0); // Print the received message printf("Data received: %s",buffer); return 0; }
/data/compiled/sample_program_16_O0_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 62 2f 00 00 push 0x2f62(%rip) # 3f88 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 63 2f 00 00 bnd jmp *0x2f63(%rip) # 3f90 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop 1070: f3 0f 1e fa endbr64 1074: 68 04 00 00 00 push $0x4 1079: f2 e9 a1 ff ff ff bnd jmp 1020 <_init+0x20> 107f: 90 nop 1080: f3 0f 1e fa endbr64 1084: 68 05 00 00 00 push $0x5 1089: f2 e9 91 ff ff ff bnd jmp 1020 <_init+0x20> 108f: 90 nop 1090: f3 0f 1e fa endbr64 1094: 68 06 00 00 00 push $0x6 1099: f2 e9 81 ff ff ff bnd jmp 1020 <_init+0x20> 109f: 90 nop 10a0: f3 0f 1e fa endbr64 10a4: 68 07 00 00 00 push $0x7 10a9: f2 e9 71 ff ff ff bnd jmp 1020 <_init+0x20> 10af: 90 nop Disassembly of section .plt.got: 00000000000010b0 <__cxa_finalize@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 3d 2f 00 00 bnd jmp *0x2f3d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 00000000000010c0 <recv@plt>: 10c0: f3 0f 1e fa endbr64 10c4: f2 ff 25 cd 2e 00 00 bnd jmp *0x2ecd(%rip) # 3f98 <recv@GLIBC_2.2.5> 10cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010d0 <__stack_chk_fail@plt>: 10d0: f3 0f 1e fa endbr64 10d4: f2 ff 25 c5 2e 00 00 bnd jmp *0x2ec5(%rip) # 3fa0 <__stack_chk_fail@GLIBC_2.4> 10db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010e0 <htons@plt>: 10e0: f3 0f 1e fa endbr64 10e4: f2 ff 25 bd 2e 00 00 bnd jmp *0x2ebd(%rip) # 3fa8 <htons@GLIBC_2.2.5> 10eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010f0 <printf@plt>: 10f0: f3 0f 1e fa endbr64 10f4: f2 ff 25 b5 2e 00 00 bnd jmp *0x2eb5(%rip) # 3fb0 <printf@GLIBC_2.2.5> 10fb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001100 <memset@plt>: 1100: f3 0f 1e fa endbr64 1104: f2 ff 25 ad 2e 00 00 bnd jmp *0x2ead(%rip) # 3fb8 <memset@GLIBC_2.2.5> 110b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001110 <inet_addr@plt>: 1110: f3 0f 1e fa endbr64 1114: f2 ff 25 a5 2e 00 00 bnd jmp *0x2ea5(%rip) # 3fc0 <inet_addr@GLIBC_2.2.5> 111b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001120 <connect@plt>: 1120: f3 0f 1e fa endbr64 1124: f2 ff 25 9d 2e 00 00 bnd jmp *0x2e9d(%rip) # 3fc8 <connect@GLIBC_2.2.5> 112b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001130 <socket@plt>: 1130: f3 0f 1e fa endbr64 1134: f2 ff 25 95 2e 00 00 bnd jmp *0x2e95(%rip) # 3fd0 <socket@GLIBC_2.2.5> 113b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001140 <_start>: 1140: f3 0f 1e fa endbr64 1144: 31 ed xor %ebp,%ebp 1146: 49 89 d1 mov %rdx,%r9 1149: 5e pop %rsi 114a: 48 89 e2 mov %rsp,%rdx 114d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1151: 50 push %rax 1152: 54 push %rsp 1153: 45 31 c0 xor %r8d,%r8d 1156: 31 c9 xor %ecx,%ecx 1158: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1229 <main> 115f: ff 15 73 2e 00 00 call *0x2e73(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1165: f4 hlt 1166: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 116d: 00 00 00 0000000000001170 <deregister_tm_clones>: 1170: 48 8d 3d 99 2e 00 00 lea 0x2e99(%rip),%rdi # 4010 <__TMC_END__> 1177: 48 8d 05 92 2e 00 00 lea 0x2e92(%rip),%rax # 4010 <__TMC_END__> 117e: 48 39 f8 cmp %rdi,%rax 1181: 74 15 je 1198 <deregister_tm_clones+0x28> 1183: 48 8b 05 56 2e 00 00 mov 0x2e56(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 118a: 48 85 c0 test %rax,%rax 118d: 74 09 je 1198 <deregister_tm_clones+0x28> 118f: ff e0 jmp *%rax 1191: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 1198: c3 ret 1199: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011a0 <register_tm_clones>: 11a0: 48 8d 3d 69 2e 00 00 lea 0x2e69(%rip),%rdi # 4010 <__TMC_END__> 11a7: 48 8d 35 62 2e 00 00 lea 0x2e62(%rip),%rsi # 4010 <__TMC_END__> 11ae: 48 29 fe sub %rdi,%rsi 11b1: 48 89 f0 mov %rsi,%rax 11b4: 48 c1 ee 3f shr $0x3f,%rsi 11b8: 48 c1 f8 03 sar $0x3,%rax 11bc: 48 01 c6 add %rax,%rsi 11bf: 48 d1 fe sar %rsi 11c2: 74 14 je 11d8 <register_tm_clones+0x38> 11c4: 48 8b 05 25 2e 00 00 mov 0x2e25(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 11cb: 48 85 c0 test %rax,%rax 11ce: 74 08 je 11d8 <register_tm_clones+0x38> 11d0: ff e0 jmp *%rax 11d2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 11d8: c3 ret 11d9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011e0 <__do_global_dtors_aux>: 11e0: f3 0f 1e fa endbr64 11e4: 80 3d 25 2e 00 00 00 cmpb $0x0,0x2e25(%rip) # 4010 <__TMC_END__> 11eb: 75 2b jne 1218 <__do_global_dtors_aux+0x38> 11ed: 55 push %rbp 11ee: 48 83 3d 02 2e 00 00 cmpq $0x0,0x2e02(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 11f5: 00 11f6: 48 89 e5 mov %rsp,%rbp 11f9: 74 0c je 1207 <__do_global_dtors_aux+0x27> 11fb: 48 8b 3d 06 2e 00 00 mov 0x2e06(%rip),%rdi # 4008 <__dso_handle> 1202: e8 a9 fe ff ff call 10b0 <__cxa_finalize@plt> 1207: e8 64 ff ff ff call 1170 <deregister_tm_clones> 120c: c6 05 fd 2d 00 00 01 movb $0x1,0x2dfd(%rip) # 4010 <__TMC_END__> 1213: 5d pop %rbp 1214: c3 ret 1215: 0f 1f 00 nopl (%rax) 1218: c3 ret 1219: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001220 <frame_dummy>: 1220: f3 0f 1e fa endbr64 1224: e9 77 ff ff ff jmp 11a0 <register_tm_clones> 0000000000001229 <main>: 1229: f3 0f 1e fa endbr64 122d: 55 push %rbp 122e: 48 89 e5 mov %rsp,%rbp 1231: 48 81 ec 30 04 00 00 sub $0x430,%rsp 1238: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 123f: 00 00 1241: 48 89 45 f8 mov %rax,-0x8(%rbp) 1245: 31 c0 xor %eax,%eax 1247: ba 00 00 00 00 mov $0x0,%edx 124c: be 01 00 00 00 mov $0x1,%esi 1251: bf 02 00 00 00 mov $0x2,%edi 1256: e8 d5 fe ff ff call 1130 <socket@plt> 125b: 89 85 d8 fb ff ff mov %eax,-0x428(%rbp) 1261: 66 c7 85 e0 fb ff ff movw $0x2,-0x420(%rbp) 1268: 02 00 126a: bf d3 1e 00 00 mov $0x1ed3,%edi 126f: e8 6c fe ff ff call 10e0 <htons@plt> 1274: 66 89 85 e2 fb ff ff mov %ax,-0x41e(%rbp) 127b: 48 8d 05 82 0d 00 00 lea 0xd82(%rip),%rax # 2004 <_IO_stdin_used+0x4> 1282: 48 89 c7 mov %rax,%rdi 1285: e8 86 fe ff ff call 1110 <inet_addr@plt> 128a: 89 85 e4 fb ff ff mov %eax,-0x41c(%rbp) 1290: 48 8d 85 e0 fb ff ff lea -0x420(%rbp),%rax 1297: 48 83 c0 08 add $0x8,%rax 129b: ba 08 00 00 00 mov $0x8,%edx 12a0: be 00 00 00 00 mov $0x0,%esi 12a5: 48 89 c7 mov %rax,%rdi 12a8: e8 53 fe ff ff call 1100 <memset@plt> 12ad: c7 85 dc fb ff ff 10 movl $0x10,-0x424(%rbp) 12b4: 00 00 00 12b7: 8b 95 dc fb ff ff mov -0x424(%rbp),%edx 12bd: 48 8d 8d e0 fb ff ff lea -0x420(%rbp),%rcx 12c4: 8b 85 d8 fb ff ff mov -0x428(%rbp),%eax 12ca: 48 89 ce mov %rcx,%rsi 12cd: 89 c7 mov %eax,%edi 12cf: e8 4c fe ff ff call 1120 <connect@plt> 12d4: 48 8d b5 f0 fb ff ff lea -0x410(%rbp),%rsi 12db: 8b 85 d8 fb ff ff mov -0x428(%rbp),%eax 12e1: b9 00 00 00 00 mov $0x0,%ecx 12e6: ba 00 04 00 00 mov $0x400,%edx 12eb: 89 c7 mov %eax,%edi 12ed: e8 ce fd ff ff call 10c0 <recv@plt> 12f2: 48 8d 85 f0 fb ff ff lea -0x410(%rbp),%rax 12f9: 48 89 c6 mov %rax,%rsi 12fc: 48 8d 05 0b 0d 00 00 lea 0xd0b(%rip),%rax # 200e <_IO_stdin_used+0xe> 1303: 48 89 c7 mov %rax,%rdi 1306: b8 00 00 00 00 mov $0x0,%eax 130b: e8 e0 fd ff ff call 10f0 <printf@plt> 1310: b8 00 00 00 00 mov $0x0,%eax 1315: 48 8b 55 f8 mov -0x8(%rbp),%rdx 1319: 64 48 2b 14 25 28 00 sub %fs:0x28,%rdx 1320: 00 00 1322: 74 05 je 1329 <main+0x100> 1324: e8 a7 fd ff ff call 10d0 <__stack_chk_fail@plt> 1329: c9 leave 132a: c3 ret Disassembly of section .fini: 000000000000132c <_fini>: 132c: f3 0f 1e fa endbr64 1330: 48 83 ec 08 sub $0x8,%rsp 1334: 48 83 c4 08 add $0x8,%rsp 1338: c3 ret
-O0
x86
#include <stdio.h> #include <sys/socket.h> #include <netinet/in.h> #include <string.h> #include <arpa/inet.h> int main() { int clientSocket; char buffer[1024]; struct sockaddr_in serverAddr; socklen_t addr_size; // Create the socket. clientSocket = socket(PF_INET, SOCK_STREAM, 0); // Configure settings of the server address struct serverAddr.sin_family = AF_INET; serverAddr.sin_port = htons(7891); serverAddr.sin_addr.s_addr = inet_addr("127.0.0.1"); memset(serverAddr.sin_zero, '\0', sizeof serverAddr.sin_zero); // Connect the socket to the server using the address addr_size = sizeof serverAddr; connect(clientSocket, (struct sockaddr *) &serverAddr, addr_size); // Read the message from the server into the buffer recv(clientSocket, buffer, 1024, 0); // Print the received message printf("Data received: %s",buffer); return 0; }
/data/compiled/sample_program_16_O1_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 72 2f 00 00 push 0x2f72(%rip) # 3f98 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 73 2f 00 00 bnd jmp *0x2f73(%rip) # 3fa0 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop 1070: f3 0f 1e fa endbr64 1074: 68 04 00 00 00 push $0x4 1079: f2 e9 a1 ff ff ff bnd jmp 1020 <_init+0x20> 107f: 90 nop 1080: f3 0f 1e fa endbr64 1084: 68 05 00 00 00 push $0x5 1089: f2 e9 91 ff ff ff bnd jmp 1020 <_init+0x20> 108f: 90 nop Disassembly of section .plt.got: 0000000000001090 <__cxa_finalize@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 5d 2f 00 00 bnd jmp *0x2f5d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 00000000000010a0 <recv@plt>: 10a0: f3 0f 1e fa endbr64 10a4: f2 ff 25 fd 2e 00 00 bnd jmp *0x2efd(%rip) # 3fa8 <recv@GLIBC_2.2.5> 10ab: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010b0 <__stack_chk_fail@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 f5 2e 00 00 bnd jmp *0x2ef5(%rip) # 3fb0 <__stack_chk_fail@GLIBC_2.4> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010c0 <inet_addr@plt>: 10c0: f3 0f 1e fa endbr64 10c4: f2 ff 25 ed 2e 00 00 bnd jmp *0x2eed(%rip) # 3fb8 <inet_addr@GLIBC_2.2.5> 10cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010d0 <__printf_chk@plt>: 10d0: f3 0f 1e fa endbr64 10d4: f2 ff 25 e5 2e 00 00 bnd jmp *0x2ee5(%rip) # 3fc0 <__printf_chk@GLIBC_2.3.4> 10db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010e0 <connect@plt>: 10e0: f3 0f 1e fa endbr64 10e4: f2 ff 25 dd 2e 00 00 bnd jmp *0x2edd(%rip) # 3fc8 <connect@GLIBC_2.2.5> 10eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010f0 <socket@plt>: 10f0: f3 0f 1e fa endbr64 10f4: f2 ff 25 d5 2e 00 00 bnd jmp *0x2ed5(%rip) # 3fd0 <socket@GLIBC_2.2.5> 10fb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001100 <_start>: 1100: f3 0f 1e fa endbr64 1104: 31 ed xor %ebp,%ebp 1106: 49 89 d1 mov %rdx,%r9 1109: 5e pop %rsi 110a: 48 89 e2 mov %rsp,%rdx 110d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1111: 50 push %rax 1112: 54 push %rsp 1113: 45 31 c0 xor %r8d,%r8d 1116: 31 c9 xor %ecx,%ecx 1118: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 11e9 <main> 111f: ff 15 b3 2e 00 00 call *0x2eb3(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1125: f4 hlt 1126: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 112d: 00 00 00 0000000000001130 <deregister_tm_clones>: 1130: 48 8d 3d d9 2e 00 00 lea 0x2ed9(%rip),%rdi # 4010 <__TMC_END__> 1137: 48 8d 05 d2 2e 00 00 lea 0x2ed2(%rip),%rax # 4010 <__TMC_END__> 113e: 48 39 f8 cmp %rdi,%rax 1141: 74 15 je 1158 <deregister_tm_clones+0x28> 1143: 48 8b 05 96 2e 00 00 mov 0x2e96(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 114a: 48 85 c0 test %rax,%rax 114d: 74 09 je 1158 <deregister_tm_clones+0x28> 114f: ff e0 jmp *%rax 1151: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 1158: c3 ret 1159: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001160 <register_tm_clones>: 1160: 48 8d 3d a9 2e 00 00 lea 0x2ea9(%rip),%rdi # 4010 <__TMC_END__> 1167: 48 8d 35 a2 2e 00 00 lea 0x2ea2(%rip),%rsi # 4010 <__TMC_END__> 116e: 48 29 fe sub %rdi,%rsi 1171: 48 89 f0 mov %rsi,%rax 1174: 48 c1 ee 3f shr $0x3f,%rsi 1178: 48 c1 f8 03 sar $0x3,%rax 117c: 48 01 c6 add %rax,%rsi 117f: 48 d1 fe sar %rsi 1182: 74 14 je 1198 <register_tm_clones+0x38> 1184: 48 8b 05 65 2e 00 00 mov 0x2e65(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 118b: 48 85 c0 test %rax,%rax 118e: 74 08 je 1198 <register_tm_clones+0x38> 1190: ff e0 jmp *%rax 1192: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1198: c3 ret 1199: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011a0 <__do_global_dtors_aux>: 11a0: f3 0f 1e fa endbr64 11a4: 80 3d 65 2e 00 00 00 cmpb $0x0,0x2e65(%rip) # 4010 <__TMC_END__> 11ab: 75 2b jne 11d8 <__do_global_dtors_aux+0x38> 11ad: 55 push %rbp 11ae: 48 83 3d 42 2e 00 00 cmpq $0x0,0x2e42(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 11b5: 00 11b6: 48 89 e5 mov %rsp,%rbp 11b9: 74 0c je 11c7 <__do_global_dtors_aux+0x27> 11bb: 48 8b 3d 46 2e 00 00 mov 0x2e46(%rip),%rdi # 4008 <__dso_handle> 11c2: e8 c9 fe ff ff call 1090 <__cxa_finalize@plt> 11c7: e8 64 ff ff ff call 1130 <deregister_tm_clones> 11cc: c6 05 3d 2e 00 00 01 movb $0x1,0x2e3d(%rip) # 4010 <__TMC_END__> 11d3: 5d pop %rbp 11d4: c3 ret 11d5: 0f 1f 00 nopl (%rax) 11d8: c3 ret 11d9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011e0 <frame_dummy>: 11e0: f3 0f 1e fa endbr64 11e4: e9 77 ff ff ff jmp 1160 <register_tm_clones> 00000000000011e9 <main>: 11e9: f3 0f 1e fa endbr64 11ed: 55 push %rbp 11ee: 53 push %rbx 11ef: 48 81 ec 28 04 00 00 sub $0x428,%rsp 11f6: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 11fd: 00 00 11ff: 48 89 84 24 18 04 00 mov %rax,0x418(%rsp) 1206: 00 1207: 31 c0 xor %eax,%eax 1209: ba 00 00 00 00 mov $0x0,%edx 120e: be 01 00 00 00 mov $0x1,%esi 1213: bf 02 00 00 00 mov $0x2,%edi 1218: e8 d3 fe ff ff call 10f0 <socket@plt> 121d: 89 c3 mov %eax,%ebx 121f: 66 c7 04 24 02 00 movw $0x2,(%rsp) 1225: 66 c7 44 24 02 1e d3 movw $0xd31e,0x2(%rsp) 122c: 48 8d 3d d1 0d 00 00 lea 0xdd1(%rip),%rdi # 2004 <_IO_stdin_used+0x4> 1233: e8 88 fe ff ff call 10c0 <inet_addr@plt> 1238: 89 44 24 04 mov %eax,0x4(%rsp) 123c: 48 89 e6 mov %rsp,%rsi 123f: 48 c7 44 24 08 00 00 movq $0x0,0x8(%rsp) 1246: 00 00 1248: ba 10 00 00 00 mov $0x10,%edx 124d: 89 df mov %ebx,%edi 124f: e8 8c fe ff ff call 10e0 <connect@plt> 1254: 48 8d 6c 24 10 lea 0x10(%rsp),%rbp 1259: b9 00 00 00 00 mov $0x0,%ecx 125e: ba 00 04 00 00 mov $0x400,%edx 1263: 48 89 ee mov %rbp,%rsi 1266: 89 df mov %ebx,%edi 1268: e8 33 fe ff ff call 10a0 <recv@plt> 126d: 48 89 ea mov %rbp,%rdx 1270: 48 8d 35 97 0d 00 00 lea 0xd97(%rip),%rsi # 200e <_IO_stdin_used+0xe> 1277: bf 01 00 00 00 mov $0x1,%edi 127c: b8 00 00 00 00 mov $0x0,%eax 1281: e8 4a fe ff ff call 10d0 <__printf_chk@plt> 1286: 48 8b 84 24 18 04 00 mov 0x418(%rsp),%rax 128d: 00 128e: 64 48 2b 04 25 28 00 sub %fs:0x28,%rax 1295: 00 00 1297: 75 0f jne 12a8 <main+0xbf> 1299: b8 00 00 00 00 mov $0x0,%eax 129e: 48 81 c4 28 04 00 00 add $0x428,%rsp 12a5: 5b pop %rbx 12a6: 5d pop %rbp 12a7: c3 ret 12a8: e8 03 fe ff ff call 10b0 <__stack_chk_fail@plt> Disassembly of section .fini: 00000000000012b0 <_fini>: 12b0: f3 0f 1e fa endbr64 12b4: 48 83 ec 08 sub $0x8,%rsp 12b8: 48 83 c4 08 add $0x8,%rsp 12bc: c3 ret
-O1
x86
#include <stdio.h> #include <sys/socket.h> #include <netinet/in.h> #include <string.h> #include <arpa/inet.h> int main() { int clientSocket; char buffer[1024]; struct sockaddr_in serverAddr; socklen_t addr_size; // Create the socket. clientSocket = socket(PF_INET, SOCK_STREAM, 0); // Configure settings of the server address struct serverAddr.sin_family = AF_INET; serverAddr.sin_port = htons(7891); serverAddr.sin_addr.s_addr = inet_addr("127.0.0.1"); memset(serverAddr.sin_zero, '\0', sizeof serverAddr.sin_zero); // Connect the socket to the server using the address addr_size = sizeof serverAddr; connect(clientSocket, (struct sockaddr *) &serverAddr, addr_size); // Read the message from the server into the buffer recv(clientSocket, buffer, 1024, 0); // Print the received message printf("Data received: %s",buffer); return 0; }
/data/compiled/sample_program_16_O2_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 72 2f 00 00 push 0x2f72(%rip) # 3f98 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 73 2f 00 00 bnd jmp *0x2f73(%rip) # 3fa0 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop 1070: f3 0f 1e fa endbr64 1074: 68 04 00 00 00 push $0x4 1079: f2 e9 a1 ff ff ff bnd jmp 1020 <_init+0x20> 107f: 90 nop 1080: f3 0f 1e fa endbr64 1084: 68 05 00 00 00 push $0x5 1089: f2 e9 91 ff ff ff bnd jmp 1020 <_init+0x20> 108f: 90 nop Disassembly of section .plt.got: 0000000000001090 <__cxa_finalize@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 5d 2f 00 00 bnd jmp *0x2f5d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 00000000000010a0 <recv@plt>: 10a0: f3 0f 1e fa endbr64 10a4: f2 ff 25 fd 2e 00 00 bnd jmp *0x2efd(%rip) # 3fa8 <recv@GLIBC_2.2.5> 10ab: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010b0 <__stack_chk_fail@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 f5 2e 00 00 bnd jmp *0x2ef5(%rip) # 3fb0 <__stack_chk_fail@GLIBC_2.4> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010c0 <inet_addr@plt>: 10c0: f3 0f 1e fa endbr64 10c4: f2 ff 25 ed 2e 00 00 bnd jmp *0x2eed(%rip) # 3fb8 <inet_addr@GLIBC_2.2.5> 10cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010d0 <__printf_chk@plt>: 10d0: f3 0f 1e fa endbr64 10d4: f2 ff 25 e5 2e 00 00 bnd jmp *0x2ee5(%rip) # 3fc0 <__printf_chk@GLIBC_2.3.4> 10db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010e0 <connect@plt>: 10e0: f3 0f 1e fa endbr64 10e4: f2 ff 25 dd 2e 00 00 bnd jmp *0x2edd(%rip) # 3fc8 <connect@GLIBC_2.2.5> 10eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010f0 <socket@plt>: 10f0: f3 0f 1e fa endbr64 10f4: f2 ff 25 d5 2e 00 00 bnd jmp *0x2ed5(%rip) # 3fd0 <socket@GLIBC_2.2.5> 10fb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001100 <main>: 1100: f3 0f 1e fa endbr64 1104: 41 54 push %r12 1106: 31 d2 xor %edx,%edx 1108: be 01 00 00 00 mov $0x1,%esi 110d: bf 02 00 00 00 mov $0x2,%edi 1112: 55 push %rbp 1113: 48 81 ec 28 04 00 00 sub $0x428,%rsp 111a: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 1121: 00 00 1123: 48 89 84 24 18 04 00 mov %rax,0x418(%rsp) 112a: 00 112b: 31 c0 xor %eax,%eax 112d: 4c 8d 64 24 10 lea 0x10(%rsp),%r12 1132: e8 b9 ff ff ff call 10f0 <socket@plt> 1137: 48 8d 3d c6 0e 00 00 lea 0xec6(%rip),%rdi # 2004 <_IO_stdin_used+0x4> 113e: c7 04 24 02 00 1e d3 movl $0xd31e0002,(%rsp) 1145: 89 c5 mov %eax,%ebp 1147: e8 74 ff ff ff call 10c0 <inet_addr@plt> 114c: 48 89 e6 mov %rsp,%rsi 114f: ba 10 00 00 00 mov $0x10,%edx 1154: 89 ef mov %ebp,%edi 1156: 89 44 24 04 mov %eax,0x4(%rsp) 115a: 48 c7 44 24 08 00 00 movq $0x0,0x8(%rsp) 1161: 00 00 1163: e8 78 ff ff ff call 10e0 <connect@plt> 1168: 31 c9 xor %ecx,%ecx 116a: ba 00 04 00 00 mov $0x400,%edx 116f: 4c 89 e6 mov %r12,%rsi 1172: 89 ef mov %ebp,%edi 1174: e8 27 ff ff ff call 10a0 <recv@plt> 1179: 31 c0 xor %eax,%eax 117b: 4c 89 e2 mov %r12,%rdx 117e: bf 01 00 00 00 mov $0x1,%edi 1183: 48 8d 35 84 0e 00 00 lea 0xe84(%rip),%rsi # 200e <_IO_stdin_used+0xe> 118a: e8 41 ff ff ff call 10d0 <__printf_chk@plt> 118f: 48 8b 84 24 18 04 00 mov 0x418(%rsp),%rax 1196: 00 1197: 64 48 2b 04 25 28 00 sub %fs:0x28,%rax 119e: 00 00 11a0: 75 0d jne 11af <main+0xaf> 11a2: 48 81 c4 28 04 00 00 add $0x428,%rsp 11a9: 31 c0 xor %eax,%eax 11ab: 5d pop %rbp 11ac: 41 5c pop %r12 11ae: c3 ret 11af: e8 fc fe ff ff call 10b0 <__stack_chk_fail@plt> 11b4: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 11bb: 00 00 00 11be: 66 90 xchg %ax,%ax 00000000000011c0 <_start>: 11c0: f3 0f 1e fa endbr64 11c4: 31 ed xor %ebp,%ebp 11c6: 49 89 d1 mov %rdx,%r9 11c9: 5e pop %rsi 11ca: 48 89 e2 mov %rsp,%rdx 11cd: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 11d1: 50 push %rax 11d2: 54 push %rsp 11d3: 45 31 c0 xor %r8d,%r8d 11d6: 31 c9 xor %ecx,%ecx 11d8: 48 8d 3d 21 ff ff ff lea -0xdf(%rip),%rdi # 1100 <main> 11df: ff 15 f3 2d 00 00 call *0x2df3(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 11e5: f4 hlt 11e6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 11ed: 00 00 00 00000000000011f0 <deregister_tm_clones>: 11f0: 48 8d 3d 19 2e 00 00 lea 0x2e19(%rip),%rdi # 4010 <__TMC_END__> 11f7: 48 8d 05 12 2e 00 00 lea 0x2e12(%rip),%rax # 4010 <__TMC_END__> 11fe: 48 39 f8 cmp %rdi,%rax 1201: 74 15 je 1218 <deregister_tm_clones+0x28> 1203: 48 8b 05 d6 2d 00 00 mov 0x2dd6(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 120a: 48 85 c0 test %rax,%rax 120d: 74 09 je 1218 <deregister_tm_clones+0x28> 120f: ff e0 jmp *%rax 1211: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 1218: c3 ret 1219: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001220 <register_tm_clones>: 1220: 48 8d 3d e9 2d 00 00 lea 0x2de9(%rip),%rdi # 4010 <__TMC_END__> 1227: 48 8d 35 e2 2d 00 00 lea 0x2de2(%rip),%rsi # 4010 <__TMC_END__> 122e: 48 29 fe sub %rdi,%rsi 1231: 48 89 f0 mov %rsi,%rax 1234: 48 c1 ee 3f shr $0x3f,%rsi 1238: 48 c1 f8 03 sar $0x3,%rax 123c: 48 01 c6 add %rax,%rsi 123f: 48 d1 fe sar %rsi 1242: 74 14 je 1258 <register_tm_clones+0x38> 1244: 48 8b 05 a5 2d 00 00 mov 0x2da5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 124b: 48 85 c0 test %rax,%rax 124e: 74 08 je 1258 <register_tm_clones+0x38> 1250: ff e0 jmp *%rax 1252: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1258: c3 ret 1259: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001260 <__do_global_dtors_aux>: 1260: f3 0f 1e fa endbr64 1264: 80 3d a5 2d 00 00 00 cmpb $0x0,0x2da5(%rip) # 4010 <__TMC_END__> 126b: 75 2b jne 1298 <__do_global_dtors_aux+0x38> 126d: 55 push %rbp 126e: 48 83 3d 82 2d 00 00 cmpq $0x0,0x2d82(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1275: 00 1276: 48 89 e5 mov %rsp,%rbp 1279: 74 0c je 1287 <__do_global_dtors_aux+0x27> 127b: 48 8b 3d 86 2d 00 00 mov 0x2d86(%rip),%rdi # 4008 <__dso_handle> 1282: e8 09 fe ff ff call 1090 <__cxa_finalize@plt> 1287: e8 64 ff ff ff call 11f0 <deregister_tm_clones> 128c: c6 05 7d 2d 00 00 01 movb $0x1,0x2d7d(%rip) # 4010 <__TMC_END__> 1293: 5d pop %rbp 1294: c3 ret 1295: 0f 1f 00 nopl (%rax) 1298: c3 ret 1299: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000012a0 <frame_dummy>: 12a0: f3 0f 1e fa endbr64 12a4: e9 77 ff ff ff jmp 1220 <register_tm_clones> Disassembly of section .fini: 00000000000012ac <_fini>: 12ac: f3 0f 1e fa endbr64 12b0: 48 83 ec 08 sub $0x8,%rsp 12b4: 48 83 c4 08 add $0x8,%rsp 12b8: c3 ret
-O2
x86
#include <stdio.h> #include <sys/socket.h> #include <netinet/in.h> #include <string.h> #include <arpa/inet.h> int main() { int clientSocket; char buffer[1024]; struct sockaddr_in serverAddr; socklen_t addr_size; // Create the socket. clientSocket = socket(PF_INET, SOCK_STREAM, 0); // Configure settings of the server address struct serverAddr.sin_family = AF_INET; serverAddr.sin_port = htons(7891); serverAddr.sin_addr.s_addr = inet_addr("127.0.0.1"); memset(serverAddr.sin_zero, '\0', sizeof serverAddr.sin_zero); // Connect the socket to the server using the address addr_size = sizeof serverAddr; connect(clientSocket, (struct sockaddr *) &serverAddr, addr_size); // Read the message from the server into the buffer recv(clientSocket, buffer, 1024, 0); // Print the received message printf("Data received: %s",buffer); return 0; }
/data/compiled/sample_program_16_O3_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 72 2f 00 00 push 0x2f72(%rip) # 3f98 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 73 2f 00 00 bnd jmp *0x2f73(%rip) # 3fa0 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop 1070: f3 0f 1e fa endbr64 1074: 68 04 00 00 00 push $0x4 1079: f2 e9 a1 ff ff ff bnd jmp 1020 <_init+0x20> 107f: 90 nop 1080: f3 0f 1e fa endbr64 1084: 68 05 00 00 00 push $0x5 1089: f2 e9 91 ff ff ff bnd jmp 1020 <_init+0x20> 108f: 90 nop Disassembly of section .plt.got: 0000000000001090 <__cxa_finalize@plt>: 1090: f3 0f 1e fa endbr64 1094: f2 ff 25 5d 2f 00 00 bnd jmp *0x2f5d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 109b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 00000000000010a0 <recv@plt>: 10a0: f3 0f 1e fa endbr64 10a4: f2 ff 25 fd 2e 00 00 bnd jmp *0x2efd(%rip) # 3fa8 <recv@GLIBC_2.2.5> 10ab: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010b0 <__stack_chk_fail@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 f5 2e 00 00 bnd jmp *0x2ef5(%rip) # 3fb0 <__stack_chk_fail@GLIBC_2.4> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010c0 <inet_addr@plt>: 10c0: f3 0f 1e fa endbr64 10c4: f2 ff 25 ed 2e 00 00 bnd jmp *0x2eed(%rip) # 3fb8 <inet_addr@GLIBC_2.2.5> 10cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010d0 <__printf_chk@plt>: 10d0: f3 0f 1e fa endbr64 10d4: f2 ff 25 e5 2e 00 00 bnd jmp *0x2ee5(%rip) # 3fc0 <__printf_chk@GLIBC_2.3.4> 10db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010e0 <connect@plt>: 10e0: f3 0f 1e fa endbr64 10e4: f2 ff 25 dd 2e 00 00 bnd jmp *0x2edd(%rip) # 3fc8 <connect@GLIBC_2.2.5> 10eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010f0 <socket@plt>: 10f0: f3 0f 1e fa endbr64 10f4: f2 ff 25 d5 2e 00 00 bnd jmp *0x2ed5(%rip) # 3fd0 <socket@GLIBC_2.2.5> 10fb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001100 <main>: 1100: f3 0f 1e fa endbr64 1104: 41 54 push %r12 1106: 31 d2 xor %edx,%edx 1108: be 01 00 00 00 mov $0x1,%esi 110d: bf 02 00 00 00 mov $0x2,%edi 1112: 55 push %rbp 1113: 48 81 ec 28 04 00 00 sub $0x428,%rsp 111a: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 1121: 00 00 1123: 48 89 84 24 18 04 00 mov %rax,0x418(%rsp) 112a: 00 112b: 31 c0 xor %eax,%eax 112d: 4c 8d 64 24 10 lea 0x10(%rsp),%r12 1132: e8 b9 ff ff ff call 10f0 <socket@plt> 1137: 48 8d 3d c6 0e 00 00 lea 0xec6(%rip),%rdi # 2004 <_IO_stdin_used+0x4> 113e: c7 04 24 02 00 1e d3 movl $0xd31e0002,(%rsp) 1145: 89 c5 mov %eax,%ebp 1147: e8 74 ff ff ff call 10c0 <inet_addr@plt> 114c: 48 89 e6 mov %rsp,%rsi 114f: ba 10 00 00 00 mov $0x10,%edx 1154: 89 ef mov %ebp,%edi 1156: 89 44 24 04 mov %eax,0x4(%rsp) 115a: 48 c7 44 24 08 00 00 movq $0x0,0x8(%rsp) 1161: 00 00 1163: e8 78 ff ff ff call 10e0 <connect@plt> 1168: 31 c9 xor %ecx,%ecx 116a: ba 00 04 00 00 mov $0x400,%edx 116f: 4c 89 e6 mov %r12,%rsi 1172: 89 ef mov %ebp,%edi 1174: e8 27 ff ff ff call 10a0 <recv@plt> 1179: 31 c0 xor %eax,%eax 117b: 4c 89 e2 mov %r12,%rdx 117e: bf 01 00 00 00 mov $0x1,%edi 1183: 48 8d 35 84 0e 00 00 lea 0xe84(%rip),%rsi # 200e <_IO_stdin_used+0xe> 118a: e8 41 ff ff ff call 10d0 <__printf_chk@plt> 118f: 48 8b 84 24 18 04 00 mov 0x418(%rsp),%rax 1196: 00 1197: 64 48 2b 04 25 28 00 sub %fs:0x28,%rax 119e: 00 00 11a0: 75 0d jne 11af <main+0xaf> 11a2: 48 81 c4 28 04 00 00 add $0x428,%rsp 11a9: 31 c0 xor %eax,%eax 11ab: 5d pop %rbp 11ac: 41 5c pop %r12 11ae: c3 ret 11af: e8 fc fe ff ff call 10b0 <__stack_chk_fail@plt> 11b4: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 11bb: 00 00 00 11be: 66 90 xchg %ax,%ax 00000000000011c0 <_start>: 11c0: f3 0f 1e fa endbr64 11c4: 31 ed xor %ebp,%ebp 11c6: 49 89 d1 mov %rdx,%r9 11c9: 5e pop %rsi 11ca: 48 89 e2 mov %rsp,%rdx 11cd: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 11d1: 50 push %rax 11d2: 54 push %rsp 11d3: 45 31 c0 xor %r8d,%r8d 11d6: 31 c9 xor %ecx,%ecx 11d8: 48 8d 3d 21 ff ff ff lea -0xdf(%rip),%rdi # 1100 <main> 11df: ff 15 f3 2d 00 00 call *0x2df3(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 11e5: f4 hlt 11e6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 11ed: 00 00 00 00000000000011f0 <deregister_tm_clones>: 11f0: 48 8d 3d 19 2e 00 00 lea 0x2e19(%rip),%rdi # 4010 <__TMC_END__> 11f7: 48 8d 05 12 2e 00 00 lea 0x2e12(%rip),%rax # 4010 <__TMC_END__> 11fe: 48 39 f8 cmp %rdi,%rax 1201: 74 15 je 1218 <deregister_tm_clones+0x28> 1203: 48 8b 05 d6 2d 00 00 mov 0x2dd6(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 120a: 48 85 c0 test %rax,%rax 120d: 74 09 je 1218 <deregister_tm_clones+0x28> 120f: ff e0 jmp *%rax 1211: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 1218: c3 ret 1219: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001220 <register_tm_clones>: 1220: 48 8d 3d e9 2d 00 00 lea 0x2de9(%rip),%rdi # 4010 <__TMC_END__> 1227: 48 8d 35 e2 2d 00 00 lea 0x2de2(%rip),%rsi # 4010 <__TMC_END__> 122e: 48 29 fe sub %rdi,%rsi 1231: 48 89 f0 mov %rsi,%rax 1234: 48 c1 ee 3f shr $0x3f,%rsi 1238: 48 c1 f8 03 sar $0x3,%rax 123c: 48 01 c6 add %rax,%rsi 123f: 48 d1 fe sar %rsi 1242: 74 14 je 1258 <register_tm_clones+0x38> 1244: 48 8b 05 a5 2d 00 00 mov 0x2da5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 124b: 48 85 c0 test %rax,%rax 124e: 74 08 je 1258 <register_tm_clones+0x38> 1250: ff e0 jmp *%rax 1252: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1258: c3 ret 1259: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001260 <__do_global_dtors_aux>: 1260: f3 0f 1e fa endbr64 1264: 80 3d a5 2d 00 00 00 cmpb $0x0,0x2da5(%rip) # 4010 <__TMC_END__> 126b: 75 2b jne 1298 <__do_global_dtors_aux+0x38> 126d: 55 push %rbp 126e: 48 83 3d 82 2d 00 00 cmpq $0x0,0x2d82(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1275: 00 1276: 48 89 e5 mov %rsp,%rbp 1279: 74 0c je 1287 <__do_global_dtors_aux+0x27> 127b: 48 8b 3d 86 2d 00 00 mov 0x2d86(%rip),%rdi # 4008 <__dso_handle> 1282: e8 09 fe ff ff call 1090 <__cxa_finalize@plt> 1287: e8 64 ff ff ff call 11f0 <deregister_tm_clones> 128c: c6 05 7d 2d 00 00 01 movb $0x1,0x2d7d(%rip) # 4010 <__TMC_END__> 1293: 5d pop %rbp 1294: c3 ret 1295: 0f 1f 00 nopl (%rax) 1298: c3 ret 1299: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000012a0 <frame_dummy>: 12a0: f3 0f 1e fa endbr64 12a4: e9 77 ff ff ff jmp 1220 <register_tm_clones> Disassembly of section .fini: 00000000000012ac <_fini>: 12ac: f3 0f 1e fa endbr64 12b0: 48 83 ec 08 sub $0x8,%rsp 12b4: 48 83 c4 08 add $0x8,%rsp 12b8: c3 ret
-O3
x86
#include <stdio.h> #include <sys/socket.h> #include <netinet/in.h> #include <string.h> #include <arpa/inet.h> int main(){ int welcomeSocket, newSocket; char buffer[1024]; struct sockaddr_in serverAddr; struct sockaddr_storage serverStorage; socklen_t addr_size; // Create the socket. welcomeSocket = socket(PF_INET, SOCK_STREAM, 0); // Configure settings of the server address struct serverAddr.sin_family = AF_INET; serverAddr.sin_port = htons(7891); serverAddr.sin_addr.s_addr = inet_addr("127.0.0.1"); memset(serverAddr.sin_zero, '\0', sizeof serverAddr.sin_zero); // Bind the address struct to the socket bind(welcomeSocket, (struct sockaddr *) &serverAddr, sizeof(serverAddr)); // Listen on the socket if(listen(welcomeSocket,5)==0) printf("Listening\n"); else printf("Error\n"); // Accept call creates a new socket for the incoming connection addr_size = sizeof serverStorage; newSocket = accept(welcomeSocket, (struct sockaddr *) &serverStorage, &addr_size); // Send message to the socket of the incoming connection strcpy(buffer,"Hello World\n"); send(newSocket,buffer,13,0); return 0; }
/data/compiled/sample_program_17_O0_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 52 2f 00 00 push 0x2f52(%rip) # 3f78 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 53 2f 00 00 bnd jmp *0x2f53(%rip) # 3f80 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop 1070: f3 0f 1e fa endbr64 1074: 68 04 00 00 00 push $0x4 1079: f2 e9 a1 ff ff ff bnd jmp 1020 <_init+0x20> 107f: 90 nop 1080: f3 0f 1e fa endbr64 1084: 68 05 00 00 00 push $0x5 1089: f2 e9 91 ff ff ff bnd jmp 1020 <_init+0x20> 108f: 90 nop 1090: f3 0f 1e fa endbr64 1094: 68 06 00 00 00 push $0x6 1099: f2 e9 81 ff ff ff bnd jmp 1020 <_init+0x20> 109f: 90 nop 10a0: f3 0f 1e fa endbr64 10a4: 68 07 00 00 00 push $0x7 10a9: f2 e9 71 ff ff ff bnd jmp 1020 <_init+0x20> 10af: 90 nop 10b0: f3 0f 1e fa endbr64 10b4: 68 08 00 00 00 push $0x8 10b9: f2 e9 61 ff ff ff bnd jmp 1020 <_init+0x20> 10bf: 90 nop 10c0: f3 0f 1e fa endbr64 10c4: 68 09 00 00 00 push $0x9 10c9: f2 e9 51 ff ff ff bnd jmp 1020 <_init+0x20> 10cf: 90 nop Disassembly of section .plt.got: 00000000000010d0 <__cxa_finalize@plt>: 10d0: f3 0f 1e fa endbr64 10d4: f2 ff 25 1d 2f 00 00 bnd jmp *0x2f1d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 10db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 00000000000010e0 <puts@plt>: 10e0: f3 0f 1e fa endbr64 10e4: f2 ff 25 9d 2e 00 00 bnd jmp *0x2e9d(%rip) # 3f88 <puts@GLIBC_2.2.5> 10eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010f0 <__stack_chk_fail@plt>: 10f0: f3 0f 1e fa endbr64 10f4: f2 ff 25 95 2e 00 00 bnd jmp *0x2e95(%rip) # 3f90 <__stack_chk_fail@GLIBC_2.4> 10fb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001100 <htons@plt>: 1100: f3 0f 1e fa endbr64 1104: f2 ff 25 8d 2e 00 00 bnd jmp *0x2e8d(%rip) # 3f98 <htons@GLIBC_2.2.5> 110b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001110 <send@plt>: 1110: f3 0f 1e fa endbr64 1114: f2 ff 25 85 2e 00 00 bnd jmp *0x2e85(%rip) # 3fa0 <send@GLIBC_2.2.5> 111b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001120 <memset@plt>: 1120: f3 0f 1e fa endbr64 1124: f2 ff 25 7d 2e 00 00 bnd jmp *0x2e7d(%rip) # 3fa8 <memset@GLIBC_2.2.5> 112b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001130 <inet_addr@plt>: 1130: f3 0f 1e fa endbr64 1134: f2 ff 25 75 2e 00 00 bnd jmp *0x2e75(%rip) # 3fb0 <inet_addr@GLIBC_2.2.5> 113b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001140 <listen@plt>: 1140: f3 0f 1e fa endbr64 1144: f2 ff 25 6d 2e 00 00 bnd jmp *0x2e6d(%rip) # 3fb8 <listen@GLIBC_2.2.5> 114b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001150 <bind@plt>: 1150: f3 0f 1e fa endbr64 1154: f2 ff 25 65 2e 00 00 bnd jmp *0x2e65(%rip) # 3fc0 <bind@GLIBC_2.2.5> 115b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001160 <accept@plt>: 1160: f3 0f 1e fa endbr64 1164: f2 ff 25 5d 2e 00 00 bnd jmp *0x2e5d(%rip) # 3fc8 <accept@GLIBC_2.2.5> 116b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001170 <socket@plt>: 1170: f3 0f 1e fa endbr64 1174: f2 ff 25 55 2e 00 00 bnd jmp *0x2e55(%rip) # 3fd0 <socket@GLIBC_2.2.5> 117b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001180 <_start>: 1180: f3 0f 1e fa endbr64 1184: 31 ed xor %ebp,%ebp 1186: 49 89 d1 mov %rdx,%r9 1189: 5e pop %rsi 118a: 48 89 e2 mov %rsp,%rdx 118d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1191: 50 push %rax 1192: 54 push %rsp 1193: 45 31 c0 xor %r8d,%r8d 1196: 31 c9 xor %ecx,%ecx 1198: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1269 <main> 119f: ff 15 33 2e 00 00 call *0x2e33(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 11a5: f4 hlt 11a6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 11ad: 00 00 00 00000000000011b0 <deregister_tm_clones>: 11b0: 48 8d 3d 59 2e 00 00 lea 0x2e59(%rip),%rdi # 4010 <__TMC_END__> 11b7: 48 8d 05 52 2e 00 00 lea 0x2e52(%rip),%rax # 4010 <__TMC_END__> 11be: 48 39 f8 cmp %rdi,%rax 11c1: 74 15 je 11d8 <deregister_tm_clones+0x28> 11c3: 48 8b 05 16 2e 00 00 mov 0x2e16(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 11ca: 48 85 c0 test %rax,%rax 11cd: 74 09 je 11d8 <deregister_tm_clones+0x28> 11cf: ff e0 jmp *%rax 11d1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 11d8: c3 ret 11d9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011e0 <register_tm_clones>: 11e0: 48 8d 3d 29 2e 00 00 lea 0x2e29(%rip),%rdi # 4010 <__TMC_END__> 11e7: 48 8d 35 22 2e 00 00 lea 0x2e22(%rip),%rsi # 4010 <__TMC_END__> 11ee: 48 29 fe sub %rdi,%rsi 11f1: 48 89 f0 mov %rsi,%rax 11f4: 48 c1 ee 3f shr $0x3f,%rsi 11f8: 48 c1 f8 03 sar $0x3,%rax 11fc: 48 01 c6 add %rax,%rsi 11ff: 48 d1 fe sar %rsi 1202: 74 14 je 1218 <register_tm_clones+0x38> 1204: 48 8b 05 e5 2d 00 00 mov 0x2de5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 120b: 48 85 c0 test %rax,%rax 120e: 74 08 je 1218 <register_tm_clones+0x38> 1210: ff e0 jmp *%rax 1212: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1218: c3 ret 1219: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001220 <__do_global_dtors_aux>: 1220: f3 0f 1e fa endbr64 1224: 80 3d e5 2d 00 00 00 cmpb $0x0,0x2de5(%rip) # 4010 <__TMC_END__> 122b: 75 2b jne 1258 <__do_global_dtors_aux+0x38> 122d: 55 push %rbp 122e: 48 83 3d c2 2d 00 00 cmpq $0x0,0x2dc2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1235: 00 1236: 48 89 e5 mov %rsp,%rbp 1239: 74 0c je 1247 <__do_global_dtors_aux+0x27> 123b: 48 8b 3d c6 2d 00 00 mov 0x2dc6(%rip),%rdi # 4008 <__dso_handle> 1242: e8 89 fe ff ff call 10d0 <__cxa_finalize@plt> 1247: e8 64 ff ff ff call 11b0 <deregister_tm_clones> 124c: c6 05 bd 2d 00 00 01 movb $0x1,0x2dbd(%rip) # 4010 <__TMC_END__> 1253: 5d pop %rbp 1254: c3 ret 1255: 0f 1f 00 nopl (%rax) 1258: c3 ret 1259: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001260 <frame_dummy>: 1260: f3 0f 1e fa endbr64 1264: e9 77 ff ff ff jmp 11e0 <register_tm_clones> 0000000000001269 <main>: 1269: f3 0f 1e fa endbr64 126d: 55 push %rbp 126e: 48 89 e5 mov %rsp,%rbp 1271: 48 81 ec b0 04 00 00 sub $0x4b0,%rsp 1278: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 127f: 00 00 1281: 48 89 45 f8 mov %rax,-0x8(%rbp) 1285: 31 c0 xor %eax,%eax 1287: ba 00 00 00 00 mov $0x0,%edx 128c: be 01 00 00 00 mov $0x1,%esi 1291: bf 02 00 00 00 mov $0x2,%edi 1296: e8 d5 fe ff ff call 1170 <socket@plt> 129b: 89 85 58 fb ff ff mov %eax,-0x4a8(%rbp) 12a1: 66 c7 85 60 fb ff ff movw $0x2,-0x4a0(%rbp) 12a8: 02 00 12aa: bf d3 1e 00 00 mov $0x1ed3,%edi 12af: e8 4c fe ff ff call 1100 <htons@plt> 12b4: 66 89 85 62 fb ff ff mov %ax,-0x49e(%rbp) 12bb: 48 8d 05 42 0d 00 00 lea 0xd42(%rip),%rax # 2004 <_IO_stdin_used+0x4> 12c2: 48 89 c7 mov %rax,%rdi 12c5: e8 66 fe ff ff call 1130 <inet_addr@plt> 12ca: 89 85 64 fb ff ff mov %eax,-0x49c(%rbp) 12d0: 48 8d 85 60 fb ff ff lea -0x4a0(%rbp),%rax 12d7: 48 83 c0 08 add $0x8,%rax 12db: ba 08 00 00 00 mov $0x8,%edx 12e0: be 00 00 00 00 mov $0x0,%esi 12e5: 48 89 c7 mov %rax,%rdi 12e8: e8 33 fe ff ff call 1120 <memset@plt> 12ed: 48 8d 8d 60 fb ff ff lea -0x4a0(%rbp),%rcx 12f4: 8b 85 58 fb ff ff mov -0x4a8(%rbp),%eax 12fa: ba 10 00 00 00 mov $0x10,%edx 12ff: 48 89 ce mov %rcx,%rsi 1302: 89 c7 mov %eax,%edi 1304: e8 47 fe ff ff call 1150 <bind@plt> 1309: 8b 85 58 fb ff ff mov -0x4a8(%rbp),%eax 130f: be 05 00 00 00 mov $0x5,%esi 1314: 89 c7 mov %eax,%edi 1316: e8 25 fe ff ff call 1140 <listen@plt> 131b: 85 c0 test %eax,%eax 131d: 75 11 jne 1330 <main+0xc7> 131f: 48 8d 05 e8 0c 00 00 lea 0xce8(%rip),%rax # 200e <_IO_stdin_used+0xe> 1326: 48 89 c7 mov %rax,%rdi 1329: e8 b2 fd ff ff call 10e0 <puts@plt> 132e: eb 0f jmp 133f <main+0xd6> 1330: 48 8d 05 e1 0c 00 00 lea 0xce1(%rip),%rax # 2018 <_IO_stdin_used+0x18> 1337: 48 89 c7 mov %rax,%rdi 133a: e8 a1 fd ff ff call 10e0 <puts@plt> 133f: c7 85 54 fb ff ff 80 movl $0x80,-0x4ac(%rbp) 1346: 00 00 00 1349: 48 8d 95 54 fb ff ff lea -0x4ac(%rbp),%rdx 1350: 48 8d 8d 70 fb ff ff lea -0x490(%rbp),%rcx 1357: 8b 85 58 fb ff ff mov -0x4a8(%rbp),%eax 135d: 48 89 ce mov %rcx,%rsi 1360: 89 c7 mov %eax,%edi 1362: e8 f9 fd ff ff call 1160 <accept@plt> 1367: 89 85 5c fb ff ff mov %eax,-0x4a4(%rbp) 136d: 48 8d 85 f0 fb ff ff lea -0x410(%rbp),%rax 1374: 48 b9 48 65 6c 6c 6f movabs $0x6f57206f6c6c6548,%rcx 137b: 20 57 6f 137e: 48 89 08 mov %rcx,(%rax) 1381: c7 40 08 72 6c 64 0a movl $0xa646c72,0x8(%rax) 1388: c6 40 0c 00 movb $0x0,0xc(%rax) 138c: 48 8d b5 f0 fb ff ff lea -0x410(%rbp),%rsi 1393: 8b 85 5c fb ff ff mov -0x4a4(%rbp),%eax 1399: b9 00 00 00 00 mov $0x0,%ecx 139e: ba 0d 00 00 00 mov $0xd,%edx 13a3: 89 c7 mov %eax,%edi 13a5: e8 66 fd ff ff call 1110 <send@plt> 13aa: b8 00 00 00 00 mov $0x0,%eax 13af: 48 8b 55 f8 mov -0x8(%rbp),%rdx 13b3: 64 48 2b 14 25 28 00 sub %fs:0x28,%rdx 13ba: 00 00 13bc: 74 05 je 13c3 <main+0x15a> 13be: e8 2d fd ff ff call 10f0 <__stack_chk_fail@plt> 13c3: c9 leave 13c4: c3 ret Disassembly of section .fini: 00000000000013c8 <_fini>: 13c8: f3 0f 1e fa endbr64 13cc: 48 83 ec 08 sub $0x8,%rsp 13d0: 48 83 c4 08 add $0x8,%rsp 13d4: c3 ret
-O0
x86
#include <stdio.h> #include <sys/socket.h> #include <netinet/in.h> #include <string.h> #include <arpa/inet.h> int main(){ int welcomeSocket, newSocket; char buffer[1024]; struct sockaddr_in serverAddr; struct sockaddr_storage serverStorage; socklen_t addr_size; // Create the socket. welcomeSocket = socket(PF_INET, SOCK_STREAM, 0); // Configure settings of the server address struct serverAddr.sin_family = AF_INET; serverAddr.sin_port = htons(7891); serverAddr.sin_addr.s_addr = inet_addr("127.0.0.1"); memset(serverAddr.sin_zero, '\0', sizeof serverAddr.sin_zero); // Bind the address struct to the socket bind(welcomeSocket, (struct sockaddr *) &serverAddr, sizeof(serverAddr)); // Listen on the socket if(listen(welcomeSocket,5)==0) printf("Listening\n"); else printf("Error\n"); // Accept call creates a new socket for the incoming connection addr_size = sizeof serverStorage; newSocket = accept(welcomeSocket, (struct sockaddr *) &serverStorage, &addr_size); // Send message to the socket of the incoming connection strcpy(buffer,"Hello World\n"); send(newSocket,buffer,13,0); return 0; }
/data/compiled/sample_program_17_O1_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 62 2f 00 00 push 0x2f62(%rip) # 3f88 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 63 2f 00 00 bnd jmp *0x2f63(%rip) # 3f90 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop 1070: f3 0f 1e fa endbr64 1074: 68 04 00 00 00 push $0x4 1079: f2 e9 a1 ff ff ff bnd jmp 1020 <_init+0x20> 107f: 90 nop 1080: f3 0f 1e fa endbr64 1084: 68 05 00 00 00 push $0x5 1089: f2 e9 91 ff ff ff bnd jmp 1020 <_init+0x20> 108f: 90 nop 1090: f3 0f 1e fa endbr64 1094: 68 06 00 00 00 push $0x6 1099: f2 e9 81 ff ff ff bnd jmp 1020 <_init+0x20> 109f: 90 nop 10a0: f3 0f 1e fa endbr64 10a4: 68 07 00 00 00 push $0x7 10a9: f2 e9 71 ff ff ff bnd jmp 1020 <_init+0x20> 10af: 90 nop Disassembly of section .plt.got: 00000000000010b0 <__cxa_finalize@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 3d 2f 00 00 bnd jmp *0x2f3d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 00000000000010c0 <puts@plt>: 10c0: f3 0f 1e fa endbr64 10c4: f2 ff 25 cd 2e 00 00 bnd jmp *0x2ecd(%rip) # 3f98 <puts@GLIBC_2.2.5> 10cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010d0 <__stack_chk_fail@plt>: 10d0: f3 0f 1e fa endbr64 10d4: f2 ff 25 c5 2e 00 00 bnd jmp *0x2ec5(%rip) # 3fa0 <__stack_chk_fail@GLIBC_2.4> 10db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010e0 <send@plt>: 10e0: f3 0f 1e fa endbr64 10e4: f2 ff 25 bd 2e 00 00 bnd jmp *0x2ebd(%rip) # 3fa8 <send@GLIBC_2.2.5> 10eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010f0 <inet_addr@plt>: 10f0: f3 0f 1e fa endbr64 10f4: f2 ff 25 b5 2e 00 00 bnd jmp *0x2eb5(%rip) # 3fb0 <inet_addr@GLIBC_2.2.5> 10fb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001100 <listen@plt>: 1100: f3 0f 1e fa endbr64 1104: f2 ff 25 ad 2e 00 00 bnd jmp *0x2ead(%rip) # 3fb8 <listen@GLIBC_2.2.5> 110b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001110 <bind@plt>: 1110: f3 0f 1e fa endbr64 1114: f2 ff 25 a5 2e 00 00 bnd jmp *0x2ea5(%rip) # 3fc0 <bind@GLIBC_2.2.5> 111b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001120 <accept@plt>: 1120: f3 0f 1e fa endbr64 1124: f2 ff 25 9d 2e 00 00 bnd jmp *0x2e9d(%rip) # 3fc8 <accept@GLIBC_2.2.5> 112b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001130 <socket@plt>: 1130: f3 0f 1e fa endbr64 1134: f2 ff 25 95 2e 00 00 bnd jmp *0x2e95(%rip) # 3fd0 <socket@GLIBC_2.2.5> 113b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001140 <_start>: 1140: f3 0f 1e fa endbr64 1144: 31 ed xor %ebp,%ebp 1146: 49 89 d1 mov %rdx,%r9 1149: 5e pop %rsi 114a: 48 89 e2 mov %rsp,%rdx 114d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1151: 50 push %rax 1152: 54 push %rsp 1153: 45 31 c0 xor %r8d,%r8d 1156: 31 c9 xor %ecx,%ecx 1158: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1229 <main> 115f: ff 15 73 2e 00 00 call *0x2e73(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1165: f4 hlt 1166: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 116d: 00 00 00 0000000000001170 <deregister_tm_clones>: 1170: 48 8d 3d 99 2e 00 00 lea 0x2e99(%rip),%rdi # 4010 <__TMC_END__> 1177: 48 8d 05 92 2e 00 00 lea 0x2e92(%rip),%rax # 4010 <__TMC_END__> 117e: 48 39 f8 cmp %rdi,%rax 1181: 74 15 je 1198 <deregister_tm_clones+0x28> 1183: 48 8b 05 56 2e 00 00 mov 0x2e56(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 118a: 48 85 c0 test %rax,%rax 118d: 74 09 je 1198 <deregister_tm_clones+0x28> 118f: ff e0 jmp *%rax 1191: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 1198: c3 ret 1199: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011a0 <register_tm_clones>: 11a0: 48 8d 3d 69 2e 00 00 lea 0x2e69(%rip),%rdi # 4010 <__TMC_END__> 11a7: 48 8d 35 62 2e 00 00 lea 0x2e62(%rip),%rsi # 4010 <__TMC_END__> 11ae: 48 29 fe sub %rdi,%rsi 11b1: 48 89 f0 mov %rsi,%rax 11b4: 48 c1 ee 3f shr $0x3f,%rsi 11b8: 48 c1 f8 03 sar $0x3,%rax 11bc: 48 01 c6 add %rax,%rsi 11bf: 48 d1 fe sar %rsi 11c2: 74 14 je 11d8 <register_tm_clones+0x38> 11c4: 48 8b 05 25 2e 00 00 mov 0x2e25(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 11cb: 48 85 c0 test %rax,%rax 11ce: 74 08 je 11d8 <register_tm_clones+0x38> 11d0: ff e0 jmp *%rax 11d2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 11d8: c3 ret 11d9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000011e0 <__do_global_dtors_aux>: 11e0: f3 0f 1e fa endbr64 11e4: 80 3d 25 2e 00 00 00 cmpb $0x0,0x2e25(%rip) # 4010 <__TMC_END__> 11eb: 75 2b jne 1218 <__do_global_dtors_aux+0x38> 11ed: 55 push %rbp 11ee: 48 83 3d 02 2e 00 00 cmpq $0x0,0x2e02(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 11f5: 00 11f6: 48 89 e5 mov %rsp,%rbp 11f9: 74 0c je 1207 <__do_global_dtors_aux+0x27> 11fb: 48 8b 3d 06 2e 00 00 mov 0x2e06(%rip),%rdi # 4008 <__dso_handle> 1202: e8 a9 fe ff ff call 10b0 <__cxa_finalize@plt> 1207: e8 64 ff ff ff call 1170 <deregister_tm_clones> 120c: c6 05 fd 2d 00 00 01 movb $0x1,0x2dfd(%rip) # 4010 <__TMC_END__> 1213: 5d pop %rbp 1214: c3 ret 1215: 0f 1f 00 nopl (%rax) 1218: c3 ret 1219: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001220 <frame_dummy>: 1220: f3 0f 1e fa endbr64 1224: e9 77 ff ff ff jmp 11a0 <register_tm_clones> 0000000000001229 <main>: 1229: f3 0f 1e fa endbr64 122d: 53 push %rbx 122e: 48 81 ec b0 04 00 00 sub $0x4b0,%rsp 1235: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 123c: 00 00 123e: 48 89 84 24 a8 04 00 mov %rax,0x4a8(%rsp) 1245: 00 1246: 31 c0 xor %eax,%eax 1248: ba 00 00 00 00 mov $0x0,%edx 124d: be 01 00 00 00 mov $0x1,%esi 1252: bf 02 00 00 00 mov $0x2,%edi 1257: e8 d4 fe ff ff call 1130 <socket@plt> 125c: 89 c3 mov %eax,%ebx 125e: 66 c7 44 24 10 02 00 movw $0x2,0x10(%rsp) 1265: 66 c7 44 24 12 1e d3 movw $0xd31e,0x12(%rsp) 126c: 48 8d 3d 91 0d 00 00 lea 0xd91(%rip),%rdi # 2004 <_IO_stdin_used+0x4> 1273: e8 78 fe ff ff call 10f0 <inet_addr@plt> 1278: 89 44 24 14 mov %eax,0x14(%rsp) 127c: 48 8d 74 24 10 lea 0x10(%rsp),%rsi 1281: 48 c7 44 24 18 00 00 movq $0x0,0x18(%rsp) 1288: 00 00 128a: ba 10 00 00 00 mov $0x10,%edx 128f: 89 df mov %ebx,%edi 1291: e8 7a fe ff ff call 1110 <bind@plt> 1296: be 05 00 00 00 mov $0x5,%esi 129b: 89 df mov %ebx,%edi 129d: e8 5e fe ff ff call 1100 <listen@plt> 12a2: 85 c0 test %eax,%eax 12a4: 0f 85 84 00 00 00 jne 132e <main+0x105> 12aa: 48 8d 3d 5d 0d 00 00 lea 0xd5d(%rip),%rdi # 200e <_IO_stdin_used+0xe> 12b1: e8 0a fe ff ff call 10c0 <puts@plt> 12b6: c7 44 24 0c 80 00 00 movl $0x80,0xc(%rsp) 12bd: 00 12be: 48 8d 54 24 0c lea 0xc(%rsp),%rdx 12c3: 48 8d 74 24 20 lea 0x20(%rsp),%rsi 12c8: 89 df mov %ebx,%edi 12ca: e8 51 fe ff ff call 1120 <accept@plt> 12cf: 89 c7 mov %eax,%edi 12d1: 48 8d b4 24 a0 00 00 lea 0xa0(%rsp),%rsi 12d8: 00 12d9: 48 b8 48 65 6c 6c 6f movabs $0x6f57206f6c6c6548,%rax 12e0: 20 57 6f 12e3: 48 89 84 24 a0 00 00 mov %rax,0xa0(%rsp) 12ea: 00 12eb: c7 84 24 a8 00 00 00 movl $0xa646c72,0xa8(%rsp) 12f2: 72 6c 64 0a 12f6: c6 84 24 ac 00 00 00 movb $0x0,0xac(%rsp) 12fd: 00 12fe: b9 00 00 00 00 mov $0x0,%ecx 1303: ba 0d 00 00 00 mov $0xd,%edx 1308: e8 d3 fd ff ff call 10e0 <send@plt> 130d: 48 8b 84 24 a8 04 00 mov 0x4a8(%rsp),%rax 1314: 00 1315: 64 48 2b 04 25 28 00 sub %fs:0x28,%rax 131c: 00 00 131e: 75 1f jne 133f <main+0x116> 1320: b8 00 00 00 00 mov $0x0,%eax 1325: 48 81 c4 b0 04 00 00 add $0x4b0,%rsp 132c: 5b pop %rbx 132d: c3 ret 132e: 48 8d 3d e3 0c 00 00 lea 0xce3(%rip),%rdi # 2018 <_IO_stdin_used+0x18> 1335: e8 86 fd ff ff call 10c0 <puts@plt> 133a: e9 77 ff ff ff jmp 12b6 <main+0x8d> 133f: e8 8c fd ff ff call 10d0 <__stack_chk_fail@plt> Disassembly of section .fini: 0000000000001344 <_fini>: 1344: f3 0f 1e fa endbr64 1348: 48 83 ec 08 sub $0x8,%rsp 134c: 48 83 c4 08 add $0x8,%rsp 1350: c3 ret
-O1
x86
#include <stdio.h> #include <sys/socket.h> #include <netinet/in.h> #include <string.h> #include <arpa/inet.h> int main(){ int welcomeSocket, newSocket; char buffer[1024]; struct sockaddr_in serverAddr; struct sockaddr_storage serverStorage; socklen_t addr_size; // Create the socket. welcomeSocket = socket(PF_INET, SOCK_STREAM, 0); // Configure settings of the server address struct serverAddr.sin_family = AF_INET; serverAddr.sin_port = htons(7891); serverAddr.sin_addr.s_addr = inet_addr("127.0.0.1"); memset(serverAddr.sin_zero, '\0', sizeof serverAddr.sin_zero); // Bind the address struct to the socket bind(welcomeSocket, (struct sockaddr *) &serverAddr, sizeof(serverAddr)); // Listen on the socket if(listen(welcomeSocket,5)==0) printf("Listening\n"); else printf("Error\n"); // Accept call creates a new socket for the incoming connection addr_size = sizeof serverStorage; newSocket = accept(welcomeSocket, (struct sockaddr *) &serverStorage, &addr_size); // Send message to the socket of the incoming connection strcpy(buffer,"Hello World\n"); send(newSocket,buffer,13,0); return 0; }
/data/compiled/sample_program_17_O2_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 62 2f 00 00 push 0x2f62(%rip) # 3f88 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 63 2f 00 00 bnd jmp *0x2f63(%rip) # 3f90 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop 1070: f3 0f 1e fa endbr64 1074: 68 04 00 00 00 push $0x4 1079: f2 e9 a1 ff ff ff bnd jmp 1020 <_init+0x20> 107f: 90 nop 1080: f3 0f 1e fa endbr64 1084: 68 05 00 00 00 push $0x5 1089: f2 e9 91 ff ff ff bnd jmp 1020 <_init+0x20> 108f: 90 nop 1090: f3 0f 1e fa endbr64 1094: 68 06 00 00 00 push $0x6 1099: f2 e9 81 ff ff ff bnd jmp 1020 <_init+0x20> 109f: 90 nop 10a0: f3 0f 1e fa endbr64 10a4: 68 07 00 00 00 push $0x7 10a9: f2 e9 71 ff ff ff bnd jmp 1020 <_init+0x20> 10af: 90 nop Disassembly of section .plt.got: 00000000000010b0 <__cxa_finalize@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 3d 2f 00 00 bnd jmp *0x2f3d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 00000000000010c0 <puts@plt>: 10c0: f3 0f 1e fa endbr64 10c4: f2 ff 25 cd 2e 00 00 bnd jmp *0x2ecd(%rip) # 3f98 <puts@GLIBC_2.2.5> 10cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010d0 <__stack_chk_fail@plt>: 10d0: f3 0f 1e fa endbr64 10d4: f2 ff 25 c5 2e 00 00 bnd jmp *0x2ec5(%rip) # 3fa0 <__stack_chk_fail@GLIBC_2.4> 10db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010e0 <send@plt>: 10e0: f3 0f 1e fa endbr64 10e4: f2 ff 25 bd 2e 00 00 bnd jmp *0x2ebd(%rip) # 3fa8 <send@GLIBC_2.2.5> 10eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010f0 <inet_addr@plt>: 10f0: f3 0f 1e fa endbr64 10f4: f2 ff 25 b5 2e 00 00 bnd jmp *0x2eb5(%rip) # 3fb0 <inet_addr@GLIBC_2.2.5> 10fb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001100 <listen@plt>: 1100: f3 0f 1e fa endbr64 1104: f2 ff 25 ad 2e 00 00 bnd jmp *0x2ead(%rip) # 3fb8 <listen@GLIBC_2.2.5> 110b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001110 <bind@plt>: 1110: f3 0f 1e fa endbr64 1114: f2 ff 25 a5 2e 00 00 bnd jmp *0x2ea5(%rip) # 3fc0 <bind@GLIBC_2.2.5> 111b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001120 <accept@plt>: 1120: f3 0f 1e fa endbr64 1124: f2 ff 25 9d 2e 00 00 bnd jmp *0x2e9d(%rip) # 3fc8 <accept@GLIBC_2.2.5> 112b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001130 <socket@plt>: 1130: f3 0f 1e fa endbr64 1134: f2 ff 25 95 2e 00 00 bnd jmp *0x2e95(%rip) # 3fd0 <socket@GLIBC_2.2.5> 113b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001140 <main>: 1140: f3 0f 1e fa endbr64 1144: 55 push %rbp 1145: 31 d2 xor %edx,%edx 1147: be 01 00 00 00 mov $0x1,%esi 114c: bf 02 00 00 00 mov $0x2,%edi 1151: 48 81 ec b0 04 00 00 sub $0x4b0,%rsp 1158: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 115f: 00 00 1161: 48 89 84 24 a8 04 00 mov %rax,0x4a8(%rsp) 1168: 00 1169: 31 c0 xor %eax,%eax 116b: e8 c0 ff ff ff call 1130 <socket@plt> 1170: 48 8d 3d 8d 0e 00 00 lea 0xe8d(%rip),%rdi # 2004 <_IO_stdin_used+0x4> 1177: c7 44 24 10 02 00 1e movl $0xd31e0002,0x10(%rsp) 117e: d3 117f: 89 c5 mov %eax,%ebp 1181: e8 6a ff ff ff call 10f0 <inet_addr@plt> 1186: 48 8d 74 24 10 lea 0x10(%rsp),%rsi 118b: 89 ef mov %ebp,%edi 118d: ba 10 00 00 00 mov $0x10,%edx 1192: 89 44 24 14 mov %eax,0x14(%rsp) 1196: 48 c7 44 24 18 00 00 movq $0x0,0x18(%rsp) 119d: 00 00 119f: e8 6c ff ff ff call 1110 <bind@plt> 11a4: be 05 00 00 00 mov $0x5,%esi 11a9: 89 ef mov %ebp,%edi 11ab: e8 50 ff ff ff call 1100 <listen@plt> 11b0: 85 c0 test %eax,%eax 11b2: 75 7e jne 1232 <main+0xf2> 11b4: 48 8d 3d 53 0e 00 00 lea 0xe53(%rip),%rdi # 200e <_IO_stdin_used+0xe> 11bb: e8 00 ff ff ff call 10c0 <puts@plt> 11c0: 48 8d 54 24 0c lea 0xc(%rsp),%rdx 11c5: 48 8d 74 24 20 lea 0x20(%rsp),%rsi 11ca: 89 ef mov %ebp,%edi 11cc: c7 44 24 0c 80 00 00 movl $0x80,0xc(%rsp) 11d3: 00 11d4: e8 47 ff ff ff call 1120 <accept@plt> 11d9: 31 c9 xor %ecx,%ecx 11db: 48 8d b4 24 a0 00 00 lea 0xa0(%rsp),%rsi 11e2: 00 11e3: ba 0d 00 00 00 mov $0xd,%edx 11e8: 89 c7 mov %eax,%edi 11ea: c6 84 24 ac 00 00 00 movb $0x0,0xac(%rsp) 11f1: 00 11f2: 48 b8 48 65 6c 6c 6f movabs $0x6f57206f6c6c6548,%rax 11f9: 20 57 6f 11fc: 48 89 84 24 a0 00 00 mov %rax,0xa0(%rsp) 1203: 00 1204: c7 84 24 a8 00 00 00 movl $0xa646c72,0xa8(%rsp) 120b: 72 6c 64 0a 120f: e8 cc fe ff ff call 10e0 <send@plt> 1214: 48 8b 84 24 a8 04 00 mov 0x4a8(%rsp),%rax 121b: 00 121c: 64 48 2b 04 25 28 00 sub %fs:0x28,%rax 1223: 00 00 1225: 75 19 jne 1240 <main+0x100> 1227: 48 81 c4 b0 04 00 00 add $0x4b0,%rsp 122e: 31 c0 xor %eax,%eax 1230: 5d pop %rbp 1231: c3 ret 1232: 48 8d 3d df 0d 00 00 lea 0xddf(%rip),%rdi # 2018 <_IO_stdin_used+0x18> 1239: e8 82 fe ff ff call 10c0 <puts@plt> 123e: eb 80 jmp 11c0 <main+0x80> 1240: e8 8b fe ff ff call 10d0 <__stack_chk_fail@plt> 1245: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 124c: 00 00 00 124f: 90 nop 0000000000001250 <_start>: 1250: f3 0f 1e fa endbr64 1254: 31 ed xor %ebp,%ebp 1256: 49 89 d1 mov %rdx,%r9 1259: 5e pop %rsi 125a: 48 89 e2 mov %rsp,%rdx 125d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1261: 50 push %rax 1262: 54 push %rsp 1263: 45 31 c0 xor %r8d,%r8d 1266: 31 c9 xor %ecx,%ecx 1268: 48 8d 3d d1 fe ff ff lea -0x12f(%rip),%rdi # 1140 <main> 126f: ff 15 63 2d 00 00 call *0x2d63(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1275: f4 hlt 1276: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 127d: 00 00 00 0000000000001280 <deregister_tm_clones>: 1280: 48 8d 3d 89 2d 00 00 lea 0x2d89(%rip),%rdi # 4010 <__TMC_END__> 1287: 48 8d 05 82 2d 00 00 lea 0x2d82(%rip),%rax # 4010 <__TMC_END__> 128e: 48 39 f8 cmp %rdi,%rax 1291: 74 15 je 12a8 <deregister_tm_clones+0x28> 1293: 48 8b 05 46 2d 00 00 mov 0x2d46(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 129a: 48 85 c0 test %rax,%rax 129d: 74 09 je 12a8 <deregister_tm_clones+0x28> 129f: ff e0 jmp *%rax 12a1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 12a8: c3 ret 12a9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000012b0 <register_tm_clones>: 12b0: 48 8d 3d 59 2d 00 00 lea 0x2d59(%rip),%rdi # 4010 <__TMC_END__> 12b7: 48 8d 35 52 2d 00 00 lea 0x2d52(%rip),%rsi # 4010 <__TMC_END__> 12be: 48 29 fe sub %rdi,%rsi 12c1: 48 89 f0 mov %rsi,%rax 12c4: 48 c1 ee 3f shr $0x3f,%rsi 12c8: 48 c1 f8 03 sar $0x3,%rax 12cc: 48 01 c6 add %rax,%rsi 12cf: 48 d1 fe sar %rsi 12d2: 74 14 je 12e8 <register_tm_clones+0x38> 12d4: 48 8b 05 15 2d 00 00 mov 0x2d15(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 12db: 48 85 c0 test %rax,%rax 12de: 74 08 je 12e8 <register_tm_clones+0x38> 12e0: ff e0 jmp *%rax 12e2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 12e8: c3 ret 12e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000012f0 <__do_global_dtors_aux>: 12f0: f3 0f 1e fa endbr64 12f4: 80 3d 15 2d 00 00 00 cmpb $0x0,0x2d15(%rip) # 4010 <__TMC_END__> 12fb: 75 2b jne 1328 <__do_global_dtors_aux+0x38> 12fd: 55 push %rbp 12fe: 48 83 3d f2 2c 00 00 cmpq $0x0,0x2cf2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1305: 00 1306: 48 89 e5 mov %rsp,%rbp 1309: 74 0c je 1317 <__do_global_dtors_aux+0x27> 130b: 48 8b 3d f6 2c 00 00 mov 0x2cf6(%rip),%rdi # 4008 <__dso_handle> 1312: e8 99 fd ff ff call 10b0 <__cxa_finalize@plt> 1317: e8 64 ff ff ff call 1280 <deregister_tm_clones> 131c: c6 05 ed 2c 00 00 01 movb $0x1,0x2ced(%rip) # 4010 <__TMC_END__> 1323: 5d pop %rbp 1324: c3 ret 1325: 0f 1f 00 nopl (%rax) 1328: c3 ret 1329: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001330 <frame_dummy>: 1330: f3 0f 1e fa endbr64 1334: e9 77 ff ff ff jmp 12b0 <register_tm_clones> Disassembly of section .fini: 000000000000133c <_fini>: 133c: f3 0f 1e fa endbr64 1340: 48 83 ec 08 sub $0x8,%rsp 1344: 48 83 c4 08 add $0x8,%rsp 1348: c3 ret
-O2
x86
#include <stdio.h> #include <sys/socket.h> #include <netinet/in.h> #include <string.h> #include <arpa/inet.h> int main(){ int welcomeSocket, newSocket; char buffer[1024]; struct sockaddr_in serverAddr; struct sockaddr_storage serverStorage; socklen_t addr_size; // Create the socket. welcomeSocket = socket(PF_INET, SOCK_STREAM, 0); // Configure settings of the server address struct serverAddr.sin_family = AF_INET; serverAddr.sin_port = htons(7891); serverAddr.sin_addr.s_addr = inet_addr("127.0.0.1"); memset(serverAddr.sin_zero, '\0', sizeof serverAddr.sin_zero); // Bind the address struct to the socket bind(welcomeSocket, (struct sockaddr *) &serverAddr, sizeof(serverAddr)); // Listen on the socket if(listen(welcomeSocket,5)==0) printf("Listening\n"); else printf("Error\n"); // Accept call creates a new socket for the incoming connection addr_size = sizeof serverStorage; newSocket = accept(welcomeSocket, (struct sockaddr *) &serverStorage, &addr_size); // Send message to the socket of the incoming connection strcpy(buffer,"Hello World\n"); send(newSocket,buffer,13,0); return 0; }
/data/compiled/sample_program_17_O3_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 62 2f 00 00 push 0x2f62(%rip) # 3f88 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 63 2f 00 00 bnd jmp *0x2f63(%rip) # 3f90 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop 1040: f3 0f 1e fa endbr64 1044: 68 01 00 00 00 push $0x1 1049: f2 e9 d1 ff ff ff bnd jmp 1020 <_init+0x20> 104f: 90 nop 1050: f3 0f 1e fa endbr64 1054: 68 02 00 00 00 push $0x2 1059: f2 e9 c1 ff ff ff bnd jmp 1020 <_init+0x20> 105f: 90 nop 1060: f3 0f 1e fa endbr64 1064: 68 03 00 00 00 push $0x3 1069: f2 e9 b1 ff ff ff bnd jmp 1020 <_init+0x20> 106f: 90 nop 1070: f3 0f 1e fa endbr64 1074: 68 04 00 00 00 push $0x4 1079: f2 e9 a1 ff ff ff bnd jmp 1020 <_init+0x20> 107f: 90 nop 1080: f3 0f 1e fa endbr64 1084: 68 05 00 00 00 push $0x5 1089: f2 e9 91 ff ff ff bnd jmp 1020 <_init+0x20> 108f: 90 nop 1090: f3 0f 1e fa endbr64 1094: 68 06 00 00 00 push $0x6 1099: f2 e9 81 ff ff ff bnd jmp 1020 <_init+0x20> 109f: 90 nop 10a0: f3 0f 1e fa endbr64 10a4: 68 07 00 00 00 push $0x7 10a9: f2 e9 71 ff ff ff bnd jmp 1020 <_init+0x20> 10af: 90 nop Disassembly of section .plt.got: 00000000000010b0 <__cxa_finalize@plt>: 10b0: f3 0f 1e fa endbr64 10b4: f2 ff 25 3d 2f 00 00 bnd jmp *0x2f3d(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 10bb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 00000000000010c0 <puts@plt>: 10c0: f3 0f 1e fa endbr64 10c4: f2 ff 25 cd 2e 00 00 bnd jmp *0x2ecd(%rip) # 3f98 <puts@GLIBC_2.2.5> 10cb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010d0 <__stack_chk_fail@plt>: 10d0: f3 0f 1e fa endbr64 10d4: f2 ff 25 c5 2e 00 00 bnd jmp *0x2ec5(%rip) # 3fa0 <__stack_chk_fail@GLIBC_2.4> 10db: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010e0 <send@plt>: 10e0: f3 0f 1e fa endbr64 10e4: f2 ff 25 bd 2e 00 00 bnd jmp *0x2ebd(%rip) # 3fa8 <send@GLIBC_2.2.5> 10eb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 00000000000010f0 <inet_addr@plt>: 10f0: f3 0f 1e fa endbr64 10f4: f2 ff 25 b5 2e 00 00 bnd jmp *0x2eb5(%rip) # 3fb0 <inet_addr@GLIBC_2.2.5> 10fb: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001100 <listen@plt>: 1100: f3 0f 1e fa endbr64 1104: f2 ff 25 ad 2e 00 00 bnd jmp *0x2ead(%rip) # 3fb8 <listen@GLIBC_2.2.5> 110b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001110 <bind@plt>: 1110: f3 0f 1e fa endbr64 1114: f2 ff 25 a5 2e 00 00 bnd jmp *0x2ea5(%rip) # 3fc0 <bind@GLIBC_2.2.5> 111b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001120 <accept@plt>: 1120: f3 0f 1e fa endbr64 1124: f2 ff 25 9d 2e 00 00 bnd jmp *0x2e9d(%rip) # 3fc8 <accept@GLIBC_2.2.5> 112b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) 0000000000001130 <socket@plt>: 1130: f3 0f 1e fa endbr64 1134: f2 ff 25 95 2e 00 00 bnd jmp *0x2e95(%rip) # 3fd0 <socket@GLIBC_2.2.5> 113b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001140 <main>: 1140: f3 0f 1e fa endbr64 1144: 55 push %rbp 1145: 31 d2 xor %edx,%edx 1147: be 01 00 00 00 mov $0x1,%esi 114c: bf 02 00 00 00 mov $0x2,%edi 1151: 48 81 ec b0 04 00 00 sub $0x4b0,%rsp 1158: 64 48 8b 04 25 28 00 mov %fs:0x28,%rax 115f: 00 00 1161: 48 89 84 24 a8 04 00 mov %rax,0x4a8(%rsp) 1168: 00 1169: 31 c0 xor %eax,%eax 116b: e8 c0 ff ff ff call 1130 <socket@plt> 1170: 48 8d 3d 8d 0e 00 00 lea 0xe8d(%rip),%rdi # 2004 <_IO_stdin_used+0x4> 1177: c7 44 24 10 02 00 1e movl $0xd31e0002,0x10(%rsp) 117e: d3 117f: 89 c5 mov %eax,%ebp 1181: e8 6a ff ff ff call 10f0 <inet_addr@plt> 1186: 48 8d 74 24 10 lea 0x10(%rsp),%rsi 118b: 89 ef mov %ebp,%edi 118d: ba 10 00 00 00 mov $0x10,%edx 1192: 89 44 24 14 mov %eax,0x14(%rsp) 1196: 48 c7 44 24 18 00 00 movq $0x0,0x18(%rsp) 119d: 00 00 119f: e8 6c ff ff ff call 1110 <bind@plt> 11a4: be 05 00 00 00 mov $0x5,%esi 11a9: 89 ef mov %ebp,%edi 11ab: e8 50 ff ff ff call 1100 <listen@plt> 11b0: 85 c0 test %eax,%eax 11b2: 75 7e jne 1232 <main+0xf2> 11b4: 48 8d 3d 53 0e 00 00 lea 0xe53(%rip),%rdi # 200e <_IO_stdin_used+0xe> 11bb: e8 00 ff ff ff call 10c0 <puts@plt> 11c0: 48 8d 54 24 0c lea 0xc(%rsp),%rdx 11c5: 48 8d 74 24 20 lea 0x20(%rsp),%rsi 11ca: 89 ef mov %ebp,%edi 11cc: c7 44 24 0c 80 00 00 movl $0x80,0xc(%rsp) 11d3: 00 11d4: e8 47 ff ff ff call 1120 <accept@plt> 11d9: 31 c9 xor %ecx,%ecx 11db: 48 8d b4 24 a0 00 00 lea 0xa0(%rsp),%rsi 11e2: 00 11e3: ba 0d 00 00 00 mov $0xd,%edx 11e8: 89 c7 mov %eax,%edi 11ea: c6 84 24 ac 00 00 00 movb $0x0,0xac(%rsp) 11f1: 00 11f2: 48 b8 48 65 6c 6c 6f movabs $0x6f57206f6c6c6548,%rax 11f9: 20 57 6f 11fc: 48 89 84 24 a0 00 00 mov %rax,0xa0(%rsp) 1203: 00 1204: c7 84 24 a8 00 00 00 movl $0xa646c72,0xa8(%rsp) 120b: 72 6c 64 0a 120f: e8 cc fe ff ff call 10e0 <send@plt> 1214: 48 8b 84 24 a8 04 00 mov 0x4a8(%rsp),%rax 121b: 00 121c: 64 48 2b 04 25 28 00 sub %fs:0x28,%rax 1223: 00 00 1225: 75 19 jne 1240 <main+0x100> 1227: 48 81 c4 b0 04 00 00 add $0x4b0,%rsp 122e: 31 c0 xor %eax,%eax 1230: 5d pop %rbp 1231: c3 ret 1232: 48 8d 3d df 0d 00 00 lea 0xddf(%rip),%rdi # 2018 <_IO_stdin_used+0x18> 1239: e8 82 fe ff ff call 10c0 <puts@plt> 123e: eb 80 jmp 11c0 <main+0x80> 1240: e8 8b fe ff ff call 10d0 <__stack_chk_fail@plt> 1245: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 124c: 00 00 00 124f: 90 nop 0000000000001250 <_start>: 1250: f3 0f 1e fa endbr64 1254: 31 ed xor %ebp,%ebp 1256: 49 89 d1 mov %rdx,%r9 1259: 5e pop %rsi 125a: 48 89 e2 mov %rsp,%rdx 125d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1261: 50 push %rax 1262: 54 push %rsp 1263: 45 31 c0 xor %r8d,%r8d 1266: 31 c9 xor %ecx,%ecx 1268: 48 8d 3d d1 fe ff ff lea -0x12f(%rip),%rdi # 1140 <main> 126f: ff 15 63 2d 00 00 call *0x2d63(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1275: f4 hlt 1276: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 127d: 00 00 00 0000000000001280 <deregister_tm_clones>: 1280: 48 8d 3d 89 2d 00 00 lea 0x2d89(%rip),%rdi # 4010 <__TMC_END__> 1287: 48 8d 05 82 2d 00 00 lea 0x2d82(%rip),%rax # 4010 <__TMC_END__> 128e: 48 39 f8 cmp %rdi,%rax 1291: 74 15 je 12a8 <deregister_tm_clones+0x28> 1293: 48 8b 05 46 2d 00 00 mov 0x2d46(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 129a: 48 85 c0 test %rax,%rax 129d: 74 09 je 12a8 <deregister_tm_clones+0x28> 129f: ff e0 jmp *%rax 12a1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 12a8: c3 ret 12a9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000012b0 <register_tm_clones>: 12b0: 48 8d 3d 59 2d 00 00 lea 0x2d59(%rip),%rdi # 4010 <__TMC_END__> 12b7: 48 8d 35 52 2d 00 00 lea 0x2d52(%rip),%rsi # 4010 <__TMC_END__> 12be: 48 29 fe sub %rdi,%rsi 12c1: 48 89 f0 mov %rsi,%rax 12c4: 48 c1 ee 3f shr $0x3f,%rsi 12c8: 48 c1 f8 03 sar $0x3,%rax 12cc: 48 01 c6 add %rax,%rsi 12cf: 48 d1 fe sar %rsi 12d2: 74 14 je 12e8 <register_tm_clones+0x38> 12d4: 48 8b 05 15 2d 00 00 mov 0x2d15(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 12db: 48 85 c0 test %rax,%rax 12de: 74 08 je 12e8 <register_tm_clones+0x38> 12e0: ff e0 jmp *%rax 12e2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 12e8: c3 ret 12e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000012f0 <__do_global_dtors_aux>: 12f0: f3 0f 1e fa endbr64 12f4: 80 3d 15 2d 00 00 00 cmpb $0x0,0x2d15(%rip) # 4010 <__TMC_END__> 12fb: 75 2b jne 1328 <__do_global_dtors_aux+0x38> 12fd: 55 push %rbp 12fe: 48 83 3d f2 2c 00 00 cmpq $0x0,0x2cf2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1305: 00 1306: 48 89 e5 mov %rsp,%rbp 1309: 74 0c je 1317 <__do_global_dtors_aux+0x27> 130b: 48 8b 3d f6 2c 00 00 mov 0x2cf6(%rip),%rdi # 4008 <__dso_handle> 1312: e8 99 fd ff ff call 10b0 <__cxa_finalize@plt> 1317: e8 64 ff ff ff call 1280 <deregister_tm_clones> 131c: c6 05 ed 2c 00 00 01 movb $0x1,0x2ced(%rip) # 4010 <__TMC_END__> 1323: 5d pop %rbp 1324: c3 ret 1325: 0f 1f 00 nopl (%rax) 1328: c3 ret 1329: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001330 <frame_dummy>: 1330: f3 0f 1e fa endbr64 1334: e9 77 ff ff ff jmp 12b0 <register_tm_clones> Disassembly of section .fini: 000000000000133c <_fini>: 133c: f3 0f 1e fa endbr64 1340: 48 83 ec 08 sub $0x8,%rsp 1344: 48 83 c4 08 add $0x8,%rsp 1348: c3 ret
-O3
x86
#include <stdio.h> int main() { int a = 10; int b = 5; printf("Difference: %d\n", a - b); return 0; }
/data/compiled/sample_program_2_O0_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <printf@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <printf@GLIBC_2.2.5> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 55 push %rbp 114e: 48 89 e5 mov %rsp,%rbp 1151: 48 83 ec 10 sub $0x10,%rsp 1155: c7 45 f8 0a 00 00 00 movl $0xa,-0x8(%rbp) 115c: c7 45 fc 05 00 00 00 movl $0x5,-0x4(%rbp) 1163: 8b 45 f8 mov -0x8(%rbp),%eax 1166: 2b 45 fc sub -0x4(%rbp),%eax 1169: 89 c6 mov %eax,%esi 116b: 48 8d 05 92 0e 00 00 lea 0xe92(%rip),%rax # 2004 <_IO_stdin_used+0x4> 1172: 48 89 c7 mov %rax,%rdi 1175: b8 00 00 00 00 mov $0x0,%eax 117a: e8 d1 fe ff ff call 1050 <printf@plt> 117f: b8 00 00 00 00 mov $0x0,%eax 1184: c9 leave 1185: c3 ret Disassembly of section .fini: 0000000000001188 <_fini>: 1188: f3 0f 1e fa endbr64 118c: 48 83 ec 08 sub $0x8,%rsp 1190: 48 83 c4 08 add $0x8,%rsp 1194: c3 ret
-O0
x86
#include <stdio.h> int main() { int a = 10; int b = 5; printf("Difference: %d\n", a - b); return 0; }
/data/compiled/sample_program_2_O1_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 48 83 ec 08 sub $0x8,%rsp 1151: ba 05 00 00 00 mov $0x5,%edx 1156: 48 8d 35 a7 0e 00 00 lea 0xea7(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 115d: bf 01 00 00 00 mov $0x1,%edi 1162: b8 00 00 00 00 mov $0x0,%eax 1167: e8 e4 fe ff ff call 1050 <__printf_chk@plt> 116c: b8 00 00 00 00 mov $0x0,%eax 1171: 48 83 c4 08 add $0x8,%rsp 1175: c3 ret Disassembly of section .fini: 0000000000001178 <_fini>: 1178: f3 0f 1e fa endbr64 117c: 48 83 ec 08 sub $0x8,%rsp 1180: 48 83 c4 08 add $0x8,%rsp 1184: c3 ret
-O1
x86
#include <stdio.h> int main() { int a = 10; int b = 5; printf("Difference: %d\n", a - b); return 0; }
/data/compiled/sample_program_2_O2_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 05 00 00 00 mov $0x5,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O2
x86
#include <stdio.h> int main() { int a = 10; int b = 5; printf("Difference: %d\n", a - b); return 0; }
/data/compiled/sample_program_2_O3_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 05 00 00 00 mov $0x5,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O3
x86
#include <stdio.h> int main() { int a = 5; int b = 10; printf("Product: %d\n", a * b); return 0; }
/data/compiled/sample_program_3_O0_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <printf@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <printf@GLIBC_2.2.5> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 55 push %rbp 114e: 48 89 e5 mov %rsp,%rbp 1151: 48 83 ec 10 sub $0x10,%rsp 1155: c7 45 f8 05 00 00 00 movl $0x5,-0x8(%rbp) 115c: c7 45 fc 0a 00 00 00 movl $0xa,-0x4(%rbp) 1163: 8b 45 f8 mov -0x8(%rbp),%eax 1166: 0f af 45 fc imul -0x4(%rbp),%eax 116a: 89 c6 mov %eax,%esi 116c: 48 8d 05 91 0e 00 00 lea 0xe91(%rip),%rax # 2004 <_IO_stdin_used+0x4> 1173: 48 89 c7 mov %rax,%rdi 1176: b8 00 00 00 00 mov $0x0,%eax 117b: e8 d0 fe ff ff call 1050 <printf@plt> 1180: b8 00 00 00 00 mov $0x0,%eax 1185: c9 leave 1186: c3 ret Disassembly of section .fini: 0000000000001188 <_fini>: 1188: f3 0f 1e fa endbr64 118c: 48 83 ec 08 sub $0x8,%rsp 1190: 48 83 c4 08 add $0x8,%rsp 1194: c3 ret
-O0
x86
#include <stdio.h> int main() { int a = 5; int b = 10; printf("Product: %d\n", a * b); return 0; }
/data/compiled/sample_program_3_O1_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 48 83 ec 08 sub $0x8,%rsp 1151: ba 32 00 00 00 mov $0x32,%edx 1156: 48 8d 35 a7 0e 00 00 lea 0xea7(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 115d: bf 01 00 00 00 mov $0x1,%edi 1162: b8 00 00 00 00 mov $0x0,%eax 1167: e8 e4 fe ff ff call 1050 <__printf_chk@plt> 116c: b8 00 00 00 00 mov $0x0,%eax 1171: 48 83 c4 08 add $0x8,%rsp 1175: c3 ret Disassembly of section .fini: 0000000000001178 <_fini>: 1178: f3 0f 1e fa endbr64 117c: 48 83 ec 08 sub $0x8,%rsp 1180: 48 83 c4 08 add $0x8,%rsp 1184: c3 ret
-O1
x86
#include <stdio.h> int main() { int a = 5; int b = 10; printf("Product: %d\n", a * b); return 0; }
/data/compiled/sample_program_3_O2_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 32 00 00 00 mov $0x32,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O2
x86
#include <stdio.h> int main() { int a = 5; int b = 10; printf("Product: %d\n", a * b); return 0; }
/data/compiled/sample_program_3_O3_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 32 00 00 00 mov $0x32,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O3
x86
#include <stdio.h> int main() { int a = 10; int b = 5; printf("Division: %d\n", a / b); return 0; }
/data/compiled/sample_program_4_O0_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <printf@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <printf@GLIBC_2.2.5> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 55 push %rbp 114e: 48 89 e5 mov %rsp,%rbp 1151: 48 83 ec 10 sub $0x10,%rsp 1155: c7 45 f8 0a 00 00 00 movl $0xa,-0x8(%rbp) 115c: c7 45 fc 05 00 00 00 movl $0x5,-0x4(%rbp) 1163: 8b 45 f8 mov -0x8(%rbp),%eax 1166: 99 cltd 1167: f7 7d fc idivl -0x4(%rbp) 116a: 89 c6 mov %eax,%esi 116c: 48 8d 05 91 0e 00 00 lea 0xe91(%rip),%rax # 2004 <_IO_stdin_used+0x4> 1173: 48 89 c7 mov %rax,%rdi 1176: b8 00 00 00 00 mov $0x0,%eax 117b: e8 d0 fe ff ff call 1050 <printf@plt> 1180: b8 00 00 00 00 mov $0x0,%eax 1185: c9 leave 1186: c3 ret Disassembly of section .fini: 0000000000001188 <_fini>: 1188: f3 0f 1e fa endbr64 118c: 48 83 ec 08 sub $0x8,%rsp 1190: 48 83 c4 08 add $0x8,%rsp 1194: c3 ret
-O0
x86
#include <stdio.h> int main() { int a = 10; int b = 5; printf("Division: %d\n", a / b); return 0; }
/data/compiled/sample_program_4_O1_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 48 83 ec 08 sub $0x8,%rsp 1151: ba 02 00 00 00 mov $0x2,%edx 1156: 48 8d 35 a7 0e 00 00 lea 0xea7(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 115d: bf 01 00 00 00 mov $0x1,%edi 1162: b8 00 00 00 00 mov $0x0,%eax 1167: e8 e4 fe ff ff call 1050 <__printf_chk@plt> 116c: b8 00 00 00 00 mov $0x0,%eax 1171: 48 83 c4 08 add $0x8,%rsp 1175: c3 ret Disassembly of section .fini: 0000000000001178 <_fini>: 1178: f3 0f 1e fa endbr64 117c: 48 83 ec 08 sub $0x8,%rsp 1180: 48 83 c4 08 add $0x8,%rsp 1184: c3 ret
-O1
x86
#include <stdio.h> int main() { int a = 10; int b = 5; printf("Division: %d\n", a / b); return 0; }
/data/compiled/sample_program_4_O2_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 02 00 00 00 mov $0x2,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O2
x86
#include <stdio.h> int main() { int a = 10; int b = 5; printf("Division: %d\n", a / b); return 0; }
/data/compiled/sample_program_4_O3_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 02 00 00 00 mov $0x2,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O3
x86
#include <stdio.h> int main() { int a = 5; printf("Increment: %d\n", ++a); return 0; }
/data/compiled/sample_program_5_O0_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <printf@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <printf@GLIBC_2.2.5> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 55 push %rbp 114e: 48 89 e5 mov %rsp,%rbp 1151: 48 83 ec 10 sub $0x10,%rsp 1155: c7 45 fc 05 00 00 00 movl $0x5,-0x4(%rbp) 115c: 83 45 fc 01 addl $0x1,-0x4(%rbp) 1160: 8b 45 fc mov -0x4(%rbp),%eax 1163: 89 c6 mov %eax,%esi 1165: 48 8d 05 98 0e 00 00 lea 0xe98(%rip),%rax # 2004 <_IO_stdin_used+0x4> 116c: 48 89 c7 mov %rax,%rdi 116f: b8 00 00 00 00 mov $0x0,%eax 1174: e8 d7 fe ff ff call 1050 <printf@plt> 1179: b8 00 00 00 00 mov $0x0,%eax 117e: c9 leave 117f: c3 ret Disassembly of section .fini: 0000000000001180 <_fini>: 1180: f3 0f 1e fa endbr64 1184: 48 83 ec 08 sub $0x8,%rsp 1188: 48 83 c4 08 add $0x8,%rsp 118c: c3 ret
-O0
x86
#include <stdio.h> int main() { int a = 5; printf("Increment: %d\n", ++a); return 0; }
/data/compiled/sample_program_5_O1_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 48 83 ec 08 sub $0x8,%rsp 1151: ba 06 00 00 00 mov $0x6,%edx 1156: 48 8d 35 a7 0e 00 00 lea 0xea7(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 115d: bf 01 00 00 00 mov $0x1,%edi 1162: b8 00 00 00 00 mov $0x0,%eax 1167: e8 e4 fe ff ff call 1050 <__printf_chk@plt> 116c: b8 00 00 00 00 mov $0x0,%eax 1171: 48 83 c4 08 add $0x8,%rsp 1175: c3 ret Disassembly of section .fini: 0000000000001178 <_fini>: 1178: f3 0f 1e fa endbr64 117c: 48 83 ec 08 sub $0x8,%rsp 1180: 48 83 c4 08 add $0x8,%rsp 1184: c3 ret
-O1
x86
#include <stdio.h> int main() { int a = 5; printf("Increment: %d\n", ++a); return 0; }
/data/compiled/sample_program_5_O2_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 06 00 00 00 mov $0x6,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O2
x86
#include <stdio.h> int main() { int a = 5; printf("Increment: %d\n", ++a); return 0; }
/data/compiled/sample_program_5_O3_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 06 00 00 00 mov $0x6,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O3
x86
#include <stdio.h> int main() { int a = 5; printf("Decrement: %d\n", --a); return 0; }
/data/compiled/sample_program_6_O0_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <printf@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <printf@GLIBC_2.2.5> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 55 push %rbp 114e: 48 89 e5 mov %rsp,%rbp 1151: 48 83 ec 10 sub $0x10,%rsp 1155: c7 45 fc 05 00 00 00 movl $0x5,-0x4(%rbp) 115c: 83 6d fc 01 subl $0x1,-0x4(%rbp) 1160: 8b 45 fc mov -0x4(%rbp),%eax 1163: 89 c6 mov %eax,%esi 1165: 48 8d 05 98 0e 00 00 lea 0xe98(%rip),%rax # 2004 <_IO_stdin_used+0x4> 116c: 48 89 c7 mov %rax,%rdi 116f: b8 00 00 00 00 mov $0x0,%eax 1174: e8 d7 fe ff ff call 1050 <printf@plt> 1179: b8 00 00 00 00 mov $0x0,%eax 117e: c9 leave 117f: c3 ret Disassembly of section .fini: 0000000000001180 <_fini>: 1180: f3 0f 1e fa endbr64 1184: 48 83 ec 08 sub $0x8,%rsp 1188: 48 83 c4 08 add $0x8,%rsp 118c: c3 ret
-O0
x86
#include <stdio.h> int main() { int a = 5; printf("Decrement: %d\n", --a); return 0; }
/data/compiled/sample_program_6_O1_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 48 83 ec 08 sub $0x8,%rsp 1151: ba 04 00 00 00 mov $0x4,%edx 1156: 48 8d 35 a7 0e 00 00 lea 0xea7(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 115d: bf 01 00 00 00 mov $0x1,%edi 1162: b8 00 00 00 00 mov $0x0,%eax 1167: e8 e4 fe ff ff call 1050 <__printf_chk@plt> 116c: b8 00 00 00 00 mov $0x0,%eax 1171: 48 83 c4 08 add $0x8,%rsp 1175: c3 ret Disassembly of section .fini: 0000000000001178 <_fini>: 1178: f3 0f 1e fa endbr64 117c: 48 83 ec 08 sub $0x8,%rsp 1180: 48 83 c4 08 add $0x8,%rsp 1184: c3 ret
-O1
x86
#include <stdio.h> int main() { int a = 5; printf("Decrement: %d\n", --a); return 0; }
/data/compiled/sample_program_6_O2_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 04 00 00 00 mov $0x4,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O2
x86
#include <stdio.h> int main() { int a = 5; printf("Decrement: %d\n", --a); return 0; }
/data/compiled/sample_program_6_O3_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 04 00 00 00 mov $0x4,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O3
x86
#include <stdio.h> int main() { int a = 5, b = 5; printf("Equal: %d\n", a == b); return 0; }
/data/compiled/sample_program_7_O0_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <printf@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <printf@GLIBC_2.2.5> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 55 push %rbp 114e: 48 89 e5 mov %rsp,%rbp 1151: 48 83 ec 10 sub $0x10,%rsp 1155: c7 45 f8 05 00 00 00 movl $0x5,-0x8(%rbp) 115c: c7 45 fc 05 00 00 00 movl $0x5,-0x4(%rbp) 1163: 8b 45 f8 mov -0x8(%rbp),%eax 1166: 3b 45 fc cmp -0x4(%rbp),%eax 1169: 0f 94 c0 sete %al 116c: 0f b6 c0 movzbl %al,%eax 116f: 89 c6 mov %eax,%esi 1171: 48 8d 05 8c 0e 00 00 lea 0xe8c(%rip),%rax # 2004 <_IO_stdin_used+0x4> 1178: 48 89 c7 mov %rax,%rdi 117b: b8 00 00 00 00 mov $0x0,%eax 1180: e8 cb fe ff ff call 1050 <printf@plt> 1185: b8 00 00 00 00 mov $0x0,%eax 118a: c9 leave 118b: c3 ret Disassembly of section .fini: 000000000000118c <_fini>: 118c: f3 0f 1e fa endbr64 1190: 48 83 ec 08 sub $0x8,%rsp 1194: 48 83 c4 08 add $0x8,%rsp 1198: c3 ret
-O0
x86
#include <stdio.h> int main() { int a = 5, b = 5; printf("Equal: %d\n", a == b); return 0; }
/data/compiled/sample_program_7_O1_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 48 83 ec 08 sub $0x8,%rsp 1151: ba 01 00 00 00 mov $0x1,%edx 1156: 48 8d 35 a7 0e 00 00 lea 0xea7(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 115d: bf 01 00 00 00 mov $0x1,%edi 1162: b8 00 00 00 00 mov $0x0,%eax 1167: e8 e4 fe ff ff call 1050 <__printf_chk@plt> 116c: b8 00 00 00 00 mov $0x0,%eax 1171: 48 83 c4 08 add $0x8,%rsp 1175: c3 ret Disassembly of section .fini: 0000000000001178 <_fini>: 1178: f3 0f 1e fa endbr64 117c: 48 83 ec 08 sub $0x8,%rsp 1180: 48 83 c4 08 add $0x8,%rsp 1184: c3 ret
-O1
x86
#include <stdio.h> int main() { int a = 5, b = 5; printf("Equal: %d\n", a == b); return 0; }
/data/compiled/sample_program_7_O2_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 01 00 00 00 mov $0x1,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O2
x86
#include <stdio.h> int main() { int a = 5, b = 5; printf("Equal: %d\n", a == b); return 0; }
/data/compiled/sample_program_7_O3_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 01 00 00 00 mov $0x1,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O3
x86
#include <stdio.h> int main() { int a = 5, b = 10; printf("Not equal: %d\n", a != b); return 0; }
/data/compiled/sample_program_8_O0_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <printf@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <printf@GLIBC_2.2.5> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 55 push %rbp 114e: 48 89 e5 mov %rsp,%rbp 1151: 48 83 ec 10 sub $0x10,%rsp 1155: c7 45 f8 05 00 00 00 movl $0x5,-0x8(%rbp) 115c: c7 45 fc 0a 00 00 00 movl $0xa,-0x4(%rbp) 1163: 8b 45 f8 mov -0x8(%rbp),%eax 1166: 3b 45 fc cmp -0x4(%rbp),%eax 1169: 0f 95 c0 setne %al 116c: 0f b6 c0 movzbl %al,%eax 116f: 89 c6 mov %eax,%esi 1171: 48 8d 05 8c 0e 00 00 lea 0xe8c(%rip),%rax # 2004 <_IO_stdin_used+0x4> 1178: 48 89 c7 mov %rax,%rdi 117b: b8 00 00 00 00 mov $0x0,%eax 1180: e8 cb fe ff ff call 1050 <printf@plt> 1185: b8 00 00 00 00 mov $0x0,%eax 118a: c9 leave 118b: c3 ret Disassembly of section .fini: 000000000000118c <_fini>: 118c: f3 0f 1e fa endbr64 1190: 48 83 ec 08 sub $0x8,%rsp 1194: 48 83 c4 08 add $0x8,%rsp 1198: c3 ret
-O0
x86
#include <stdio.h> int main() { int a = 5, b = 10; printf("Not equal: %d\n", a != b); return 0; }
/data/compiled/sample_program_8_O1_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 48 83 ec 08 sub $0x8,%rsp 1151: ba 01 00 00 00 mov $0x1,%edx 1156: 48 8d 35 a7 0e 00 00 lea 0xea7(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 115d: bf 01 00 00 00 mov $0x1,%edi 1162: b8 00 00 00 00 mov $0x0,%eax 1167: e8 e4 fe ff ff call 1050 <__printf_chk@plt> 116c: b8 00 00 00 00 mov $0x0,%eax 1171: 48 83 c4 08 add $0x8,%rsp 1175: c3 ret Disassembly of section .fini: 0000000000001178 <_fini>: 1178: f3 0f 1e fa endbr64 117c: 48 83 ec 08 sub $0x8,%rsp 1180: 48 83 c4 08 add $0x8,%rsp 1184: c3 ret
-O1
x86
#include <stdio.h> int main() { int a = 5, b = 10; printf("Not equal: %d\n", a != b); return 0; }
/data/compiled/sample_program_8_O2_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 01 00 00 00 mov $0x1,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O2
x86
#include <stdio.h> int main() { int a = 5, b = 10; printf("Not equal: %d\n", a != b); return 0; }
/data/compiled/sample_program_8_O3_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 01 00 00 00 mov $0x1,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O3
x86
#include <stdio.h> int main() { int a = 10, b = 5; printf("Greater than: %d\n", a > b); return 0; }
/data/compiled/sample_program_9_O0_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <printf@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <printf@GLIBC_2.2.5> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 55 push %rbp 114e: 48 89 e5 mov %rsp,%rbp 1151: 48 83 ec 10 sub $0x10,%rsp 1155: c7 45 f8 0a 00 00 00 movl $0xa,-0x8(%rbp) 115c: c7 45 fc 05 00 00 00 movl $0x5,-0x4(%rbp) 1163: 8b 45 f8 mov -0x8(%rbp),%eax 1166: 3b 45 fc cmp -0x4(%rbp),%eax 1169: 0f 9f c0 setg %al 116c: 0f b6 c0 movzbl %al,%eax 116f: 89 c6 mov %eax,%esi 1171: 48 8d 05 8c 0e 00 00 lea 0xe8c(%rip),%rax # 2004 <_IO_stdin_used+0x4> 1178: 48 89 c7 mov %rax,%rdi 117b: b8 00 00 00 00 mov $0x0,%eax 1180: e8 cb fe ff ff call 1050 <printf@plt> 1185: b8 00 00 00 00 mov $0x0,%eax 118a: c9 leave 118b: c3 ret Disassembly of section .fini: 000000000000118c <_fini>: 118c: f3 0f 1e fa endbr64 1190: 48 83 ec 08 sub $0x8,%rsp 1194: 48 83 c4 08 add $0x8,%rsp 1198: c3 ret
-O0
x86
#include <stdio.h> int main() { int a = 10, b = 5; printf("Greater than: %d\n", a > b); return 0; }
/data/compiled/sample_program_9_O1_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <_start>: 1060: f3 0f 1e fa endbr64 1064: 31 ed xor %ebp,%ebp 1066: 49 89 d1 mov %rdx,%r9 1069: 5e pop %rsi 106a: 48 89 e2 mov %rsp,%rdx 106d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 1071: 50 push %rax 1072: 54 push %rsp 1073: 45 31 c0 xor %r8d,%r8d 1076: 31 c9 xor %ecx,%ecx 1078: 48 8d 3d ca 00 00 00 lea 0xca(%rip),%rdi # 1149 <main> 107f: ff 15 53 2f 00 00 call *0x2f53(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 1085: f4 hlt 1086: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 108d: 00 00 00 0000000000001090 <deregister_tm_clones>: 1090: 48 8d 3d 79 2f 00 00 lea 0x2f79(%rip),%rdi # 4010 <__TMC_END__> 1097: 48 8d 05 72 2f 00 00 lea 0x2f72(%rip),%rax # 4010 <__TMC_END__> 109e: 48 39 f8 cmp %rdi,%rax 10a1: 74 15 je 10b8 <deregister_tm_clones+0x28> 10a3: 48 8b 05 36 2f 00 00 mov 0x2f36(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10aa: 48 85 c0 test %rax,%rax 10ad: 74 09 je 10b8 <deregister_tm_clones+0x28> 10af: ff e0 jmp *%rax 10b1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10b8: c3 ret 10b9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010c0 <register_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 35 42 2f 00 00 lea 0x2f42(%rip),%rsi # 4010 <__TMC_END__> 10ce: 48 29 fe sub %rdi,%rsi 10d1: 48 89 f0 mov %rsi,%rax 10d4: 48 c1 ee 3f shr $0x3f,%rsi 10d8: 48 c1 f8 03 sar $0x3,%rax 10dc: 48 01 c6 add %rax,%rsi 10df: 48 d1 fe sar %rsi 10e2: 74 14 je 10f8 <register_tm_clones+0x38> 10e4: 48 8b 05 05 2f 00 00 mov 0x2f05(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 10eb: 48 85 c0 test %rax,%rax 10ee: 74 08 je 10f8 <register_tm_clones+0x38> 10f0: ff e0 jmp *%rax 10f2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 10f8: c3 ret 10f9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001100 <__do_global_dtors_aux>: 1100: f3 0f 1e fa endbr64 1104: 80 3d 05 2f 00 00 00 cmpb $0x0,0x2f05(%rip) # 4010 <__TMC_END__> 110b: 75 2b jne 1138 <__do_global_dtors_aux+0x38> 110d: 55 push %rbp 110e: 48 83 3d e2 2e 00 00 cmpq $0x0,0x2ee2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1115: 00 1116: 48 89 e5 mov %rsp,%rbp 1119: 74 0c je 1127 <__do_global_dtors_aux+0x27> 111b: 48 8b 3d e6 2e 00 00 mov 0x2ee6(%rip),%rdi # 4008 <__dso_handle> 1122: e8 19 ff ff ff call 1040 <__cxa_finalize@plt> 1127: e8 64 ff ff ff call 1090 <deregister_tm_clones> 112c: c6 05 dd 2e 00 00 01 movb $0x1,0x2edd(%rip) # 4010 <__TMC_END__> 1133: 5d pop %rbp 1134: c3 ret 1135: 0f 1f 00 nopl (%rax) 1138: c3 ret 1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001140 <frame_dummy>: 1140: f3 0f 1e fa endbr64 1144: e9 77 ff ff ff jmp 10c0 <register_tm_clones> 0000000000001149 <main>: 1149: f3 0f 1e fa endbr64 114d: 48 83 ec 08 sub $0x8,%rsp 1151: ba 01 00 00 00 mov $0x1,%edx 1156: 48 8d 35 a7 0e 00 00 lea 0xea7(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 115d: bf 01 00 00 00 mov $0x1,%edi 1162: b8 00 00 00 00 mov $0x0,%eax 1167: e8 e4 fe ff ff call 1050 <__printf_chk@plt> 116c: b8 00 00 00 00 mov $0x0,%eax 1171: 48 83 c4 08 add $0x8,%rsp 1175: c3 ret Disassembly of section .fini: 0000000000001178 <_fini>: 1178: f3 0f 1e fa endbr64 117c: 48 83 ec 08 sub $0x8,%rsp 1180: 48 83 c4 08 add $0x8,%rsp 1184: c3 ret
-O1
x86
#include <stdio.h> int main() { int a = 10, b = 5; printf("Greater than: %d\n", a > b); return 0; }
/data/compiled/sample_program_9_O2_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 01 00 00 00 mov $0x1,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O2
x86
#include <stdio.h> int main() { int a = 10, b = 5; printf("Greater than: %d\n", a > b); return 0; }
/data/compiled/sample_program_9_O3_x86: file format elf64-x86-64 Disassembly of section .init: 0000000000001000 <_init>: 1000: f3 0f 1e fa endbr64 1004: 48 83 ec 08 sub $0x8,%rsp 1008: 48 8b 05 d9 2f 00 00 mov 0x2fd9(%rip),%rax # 3fe8 <__gmon_start__@Base> 100f: 48 85 c0 test %rax,%rax 1012: 74 02 je 1016 <_init+0x16> 1014: ff d0 call *%rax 1016: 48 83 c4 08 add $0x8,%rsp 101a: c3 ret Disassembly of section .plt: 0000000000001020 <.plt>: 1020: ff 35 9a 2f 00 00 push 0x2f9a(%rip) # 3fc0 <_GLOBAL_OFFSET_TABLE_+0x8> 1026: f2 ff 25 9b 2f 00 00 bnd jmp *0x2f9b(%rip) # 3fc8 <_GLOBAL_OFFSET_TABLE_+0x10> 102d: 0f 1f 00 nopl (%rax) 1030: f3 0f 1e fa endbr64 1034: 68 00 00 00 00 push $0x0 1039: f2 e9 e1 ff ff ff bnd jmp 1020 <_init+0x20> 103f: 90 nop Disassembly of section .plt.got: 0000000000001040 <__cxa_finalize@plt>: 1040: f3 0f 1e fa endbr64 1044: f2 ff 25 ad 2f 00 00 bnd jmp *0x2fad(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 104b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .plt.sec: 0000000000001050 <__printf_chk@plt>: 1050: f3 0f 1e fa endbr64 1054: f2 ff 25 75 2f 00 00 bnd jmp *0x2f75(%rip) # 3fd0 <__printf_chk@GLIBC_2.3.4> 105b: 0f 1f 44 00 00 nopl 0x0(%rax,%rax,1) Disassembly of section .text: 0000000000001060 <main>: 1060: f3 0f 1e fa endbr64 1064: 48 83 ec 08 sub $0x8,%rsp 1068: ba 01 00 00 00 mov $0x1,%edx 106d: bf 01 00 00 00 mov $0x1,%edi 1072: 31 c0 xor %eax,%eax 1074: 48 8d 35 89 0f 00 00 lea 0xf89(%rip),%rsi # 2004 <_IO_stdin_used+0x4> 107b: e8 d0 ff ff ff call 1050 <__printf_chk@plt> 1080: 31 c0 xor %eax,%eax 1082: 48 83 c4 08 add $0x8,%rsp 1086: c3 ret 1087: 66 0f 1f 84 00 00 00 nopw 0x0(%rax,%rax,1) 108e: 00 00 0000000000001090 <_start>: 1090: f3 0f 1e fa endbr64 1094: 31 ed xor %ebp,%ebp 1096: 49 89 d1 mov %rdx,%r9 1099: 5e pop %rsi 109a: 48 89 e2 mov %rsp,%rdx 109d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp 10a1: 50 push %rax 10a2: 54 push %rsp 10a3: 45 31 c0 xor %r8d,%r8d 10a6: 31 c9 xor %ecx,%ecx 10a8: 48 8d 3d b1 ff ff ff lea -0x4f(%rip),%rdi # 1060 <main> 10af: ff 15 23 2f 00 00 call *0x2f23(%rip) # 3fd8 <__libc_start_main@GLIBC_2.34> 10b5: f4 hlt 10b6: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 10bd: 00 00 00 00000000000010c0 <deregister_tm_clones>: 10c0: 48 8d 3d 49 2f 00 00 lea 0x2f49(%rip),%rdi # 4010 <__TMC_END__> 10c7: 48 8d 05 42 2f 00 00 lea 0x2f42(%rip),%rax # 4010 <__TMC_END__> 10ce: 48 39 f8 cmp %rdi,%rax 10d1: 74 15 je 10e8 <deregister_tm_clones+0x28> 10d3: 48 8b 05 06 2f 00 00 mov 0x2f06(%rip),%rax # 3fe0 <_ITM_deregisterTMCloneTable@Base> 10da: 48 85 c0 test %rax,%rax 10dd: 74 09 je 10e8 <deregister_tm_clones+0x28> 10df: ff e0 jmp *%rax 10e1: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 10e8: c3 ret 10e9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 00000000000010f0 <register_tm_clones>: 10f0: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4010 <__TMC_END__> 10f7: 48 8d 35 12 2f 00 00 lea 0x2f12(%rip),%rsi # 4010 <__TMC_END__> 10fe: 48 29 fe sub %rdi,%rsi 1101: 48 89 f0 mov %rsi,%rax 1104: 48 c1 ee 3f shr $0x3f,%rsi 1108: 48 c1 f8 03 sar $0x3,%rax 110c: 48 01 c6 add %rax,%rsi 110f: 48 d1 fe sar %rsi 1112: 74 14 je 1128 <register_tm_clones+0x38> 1114: 48 8b 05 d5 2e 00 00 mov 0x2ed5(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable@Base> 111b: 48 85 c0 test %rax,%rax 111e: 74 08 je 1128 <register_tm_clones+0x38> 1120: ff e0 jmp *%rax 1122: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1128: c3 ret 1129: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001130 <__do_global_dtors_aux>: 1130: f3 0f 1e fa endbr64 1134: 80 3d d5 2e 00 00 00 cmpb $0x0,0x2ed5(%rip) # 4010 <__TMC_END__> 113b: 75 2b jne 1168 <__do_global_dtors_aux+0x38> 113d: 55 push %rbp 113e: 48 83 3d b2 2e 00 00 cmpq $0x0,0x2eb2(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> 1145: 00 1146: 48 89 e5 mov %rsp,%rbp 1149: 74 0c je 1157 <__do_global_dtors_aux+0x27> 114b: 48 8b 3d b6 2e 00 00 mov 0x2eb6(%rip),%rdi # 4008 <__dso_handle> 1152: e8 e9 fe ff ff call 1040 <__cxa_finalize@plt> 1157: e8 64 ff ff ff call 10c0 <deregister_tm_clones> 115c: c6 05 ad 2e 00 00 01 movb $0x1,0x2ead(%rip) # 4010 <__TMC_END__> 1163: 5d pop %rbp 1164: c3 ret 1165: 0f 1f 00 nopl (%rax) 1168: c3 ret 1169: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 0000000000001170 <frame_dummy>: 1170: f3 0f 1e fa endbr64 1174: e9 77 ff ff ff jmp 10f0 <register_tm_clones> Disassembly of section .fini: 000000000000117c <_fini>: 117c: f3 0f 1e fa endbr64 1180: 48 83 ec 08 sub $0x8,%rsp 1184: 48 83 c4 08 add $0x8,%rsp 1188: c3 ret
-O3
x86