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 |
End of preview. Expand
in Dataset Viewer.
This is a test dataset of compiled c programs
- Downloads last month
- 8