-
-
Save Saren-Arterius/0bcd52c4756318f60c99121021c107ff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(int argc, char const *argv[]) { | |
int cnt = 2; | |
for (int i = 1; i < 1000000000; i++) { | |
cnt += i % 2 == 0 ? -i : i; | |
} | |
printf("%d\n", cnt); | |
return 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a_clang: 檔案格式 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__> | |
100f: 48 85 c0 test %rax,%rax | |
1012: 74 02 je 1016 <_init+0x16> | |
1014: ff d0 callq *%rax | |
1016: 48 83 c4 08 add $0x8,%rsp | |
101a: c3 retq | |
Disassembly of section .plt: | |
0000000000001020 <.plt>: | |
1020: ff 35 e2 2f 00 00 pushq 0x2fe2(%rip) # 4008 <_GLOBAL_OFFSET_TABLE_+0x8> | |
1026: ff 25 e4 2f 00 00 jmpq *0x2fe4(%rip) # 4010 <_GLOBAL_OFFSET_TABLE_+0x10> | |
102c: 0f 1f 40 00 nopl 0x0(%rax) | |
0000000000001030 <printf@plt>: | |
1030: ff 25 e2 2f 00 00 jmpq *0x2fe2(%rip) # 4018 <printf@GLIBC_2.2.5> | |
1036: 68 00 00 00 00 pushq $0x0 | |
103b: e9 e0 ff ff ff jmpq 1020 <.plt> | |
Disassembly of section .text: | |
0000000000001040 <_start>: | |
1040: f3 0f 1e fa endbr64 | |
1044: 31 ed xor %ebp,%ebp | |
1046: 49 89 d1 mov %rdx,%r9 | |
1049: 5e pop %rsi | |
104a: 48 89 e2 mov %rsp,%rdx | |
104d: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp | |
1051: 50 push %rax | |
1052: 54 push %rsp | |
1053: 4c 8d 05 b6 02 00 00 lea 0x2b6(%rip),%r8 # 1310 <__libc_csu_fini> | |
105a: 48 8d 0d 3f 02 00 00 lea 0x23f(%rip),%rcx # 12a0 <__libc_csu_init> | |
1061: 48 8d 3d d8 00 00 00 lea 0xd8(%rip),%rdi # 1140 <main> | |
1068: ff 15 72 2f 00 00 callq *0x2f72(%rip) # 3fe0 <__libc_start_main@GLIBC_2.2.5> | |
106e: f4 hlt | |
106f: 90 nop | |
0000000000001070 <deregister_tm_clones>: | |
1070: 48 8d 3d b9 2f 00 00 lea 0x2fb9(%rip),%rdi # 4030 <__TMC_END__> | |
1077: 48 8d 05 b2 2f 00 00 lea 0x2fb2(%rip),%rax # 4030 <__TMC_END__> | |
107e: 48 39 f8 cmp %rdi,%rax | |
1081: 74 15 je 1098 <deregister_tm_clones+0x28> | |
1083: 48 8b 05 4e 2f 00 00 mov 0x2f4e(%rip),%rax # 3fd8 <_ITM_deregisterTMCloneTable> | |
108a: 48 85 c0 test %rax,%rax | |
108d: 74 09 je 1098 <deregister_tm_clones+0x28> | |
108f: ff e0 jmpq *%rax | |
1091: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) | |
1098: c3 retq | |
1099: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) | |
00000000000010a0 <register_tm_clones>: | |
10a0: 48 8d 3d 89 2f 00 00 lea 0x2f89(%rip),%rdi # 4030 <__TMC_END__> | |
10a7: 48 8d 35 82 2f 00 00 lea 0x2f82(%rip),%rsi # 4030 <__TMC_END__> | |
10ae: 48 29 fe sub %rdi,%rsi | |
10b1: 48 c1 fe 03 sar $0x3,%rsi | |
10b5: 48 89 f0 mov %rsi,%rax | |
10b8: 48 c1 e8 3f shr $0x3f,%rax | |
10bc: 48 01 c6 add %rax,%rsi | |
10bf: 48 d1 fe sar %rsi | |
10c2: 74 14 je 10d8 <register_tm_clones+0x38> | |
10c4: 48 8b 05 25 2f 00 00 mov 0x2f25(%rip),%rax # 3ff0 <_ITM_registerTMCloneTable> | |
10cb: 48 85 c0 test %rax,%rax | |
10ce: 74 08 je 10d8 <register_tm_clones+0x38> | |
10d0: ff e0 jmpq *%rax | |
10d2: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) | |
10d8: c3 retq | |
10d9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) | |
00000000000010e0 <__do_global_dtors_aux>: | |
10e0: f3 0f 1e fa endbr64 | |
10e4: 80 3d 45 2f 00 00 00 cmpb $0x0,0x2f45(%rip) # 4030 <__TMC_END__> | |
10eb: 75 33 jne 1120 <__do_global_dtors_aux+0x40> | |
10ed: 55 push %rbp | |
10ee: 48 83 3d 02 2f 00 00 cmpq $0x0,0x2f02(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> | |
10f5: 00 | |
10f6: 48 89 e5 mov %rsp,%rbp | |
10f9: 74 0d je 1108 <__do_global_dtors_aux+0x28> | |
10fb: 48 8b 3d 26 2f 00 00 mov 0x2f26(%rip),%rdi # 4028 <__dso_handle> | |
1102: ff 15 f0 2e 00 00 callq *0x2ef0(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> | |
1108: e8 63 ff ff ff callq 1070 <deregister_tm_clones> | |
110d: c6 05 1c 2f 00 00 01 movb $0x1,0x2f1c(%rip) # 4030 <__TMC_END__> | |
1114: 5d pop %rbp | |
1115: c3 retq | |
1116: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) | |
111d: 00 00 00 | |
1120: c3 retq | |
1121: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) | |
1128: 00 00 00 00 | |
112c: 0f 1f 40 00 nopl 0x0(%rax) | |
0000000000001130 <frame_dummy>: | |
1130: f3 0f 1e fa endbr64 | |
1134: e9 67 ff ff ff jmpq 10a0 <register_tm_clones> | |
1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) | |
0000000000001140 <main>: | |
1140: b8 02 00 00 00 mov $0x2,%eax | |
1145: 66 0f 6e f0 movd %eax,%xmm6 | |
1149: 66 45 0f ef ff pxor %xmm15,%xmm15 | |
114e: 66 44 0f 6f 15 b9 0e movdqa 0xeb9(%rip),%xmm10 # 2010 <_IO_stdin_used+0x10> | |
1155: 00 00 | |
1157: b8 f0 c9 9a 3b mov $0x3b9ac9f0,%eax | |
115c: 66 44 0f 6f 0d cb 0e movdqa 0xecb(%rip),%xmm9 # 2030 <_IO_stdin_used+0x30> | |
1163: 00 00 | |
1165: 66 44 0f 6f 05 d2 0e movdqa 0xed2(%rip),%xmm8 # 2040 <_IO_stdin_used+0x40> | |
116c: 00 00 | |
116e: 66 44 0f 6f 1d f9 0e movdqa 0xef9(%rip),%xmm11 # 2070 <_IO_stdin_used+0x70> | |
1175: 00 00 | |
1177: 66 44 0f 6f 35 00 0f movdqa 0xf00(%rip),%xmm14 # 2080 <_IO_stdin_used+0x80> | |
117e: 00 00 | |
1180: 66 44 0f 6f 2d 07 0f movdqa 0xf07(%rip),%xmm13 # 2090 <_IO_stdin_used+0x90> | |
1187: 00 00 | |
1189: 66 0f ef ff pxor %xmm7,%xmm7 | |
118d: eb 73 jmp 1202 <main+0xc2> | |
118f: 90 nop | |
1190: 66 41 0f 6f d2 movdqa %xmm10,%xmm2 | |
1195: 66 0f fe 15 b3 0e 00 paddd 0xeb3(%rip),%xmm2 # 2050 <_IO_stdin_used+0x50> | |
119c: 00 | |
119d: 66 41 0f 6f ea movdqa %xmm10,%xmm5 | |
11a2: 66 0f fe 2d b6 0e 00 paddd 0xeb6(%rip),%xmm5 # 2060 <_IO_stdin_used+0x60> | |
11a9: 00 | |
11aa: 66 0f 6f f2 movdqa %xmm2,%xmm6 | |
11ae: 66 41 0f db f1 pand %xmm9,%xmm6 | |
11b3: 66 0f 6f fd movdqa %xmm5,%xmm7 | |
11b7: 66 41 0f db f9 pand %xmm9,%xmm7 | |
11bc: 66 41 0f 76 f7 pcmpeqd %xmm15,%xmm6 | |
11c1: 66 41 0f 76 ff pcmpeqd %xmm15,%xmm7 | |
11c6: 66 41 0f 6f db movdqa %xmm11,%xmm3 | |
11cb: 66 41 0f fa da psubd %xmm10,%xmm3 | |
11d0: 66 41 0f 6f c6 movdqa %xmm14,%xmm0 | |
11d5: 66 41 0f fa c2 psubd %xmm10,%xmm0 | |
11da: 66 0f db de pand %xmm6,%xmm3 | |
11de: 66 0f df f2 pandn %xmm2,%xmm6 | |
11e2: 66 0f eb f3 por %xmm3,%xmm6 | |
11e6: 66 0f db c7 pand %xmm7,%xmm0 | |
11ea: 66 0f df fd pandn %xmm5,%xmm7 | |
11ee: 66 0f eb f8 por %xmm0,%xmm7 | |
11f2: 66 0f fe f1 paddd %xmm1,%xmm6 | |
11f6: 66 0f fe fc paddd %xmm4,%xmm7 | |
11fa: 66 45 0f fe d5 paddd %xmm13,%xmm10 | |
11ff: 83 c0 f0 add $0xfffffff0,%eax | |
1202: 66 41 0f 6f d2 movdqa %xmm10,%xmm2 | |
1207: 66 0f fe 15 11 0e 00 paddd 0xe11(%rip),%xmm2 # 2020 <_IO_stdin_used+0x20> | |
120e: 00 | |
120f: 66 41 0f 6f ea movdqa %xmm10,%xmm5 | |
1214: 66 41 0f db e9 pand %xmm9,%xmm5 | |
1219: 66 0f 6f e2 movdqa %xmm2,%xmm4 | |
121d: 66 41 0f db e1 pand %xmm9,%xmm4 | |
1222: 66 41 0f 76 ef pcmpeqd %xmm15,%xmm5 | |
1227: 66 41 0f 76 e7 pcmpeqd %xmm15,%xmm4 | |
122c: 66 45 0f 6f e0 movdqa %xmm8,%xmm12 | |
1231: 66 45 0f fa e2 psubd %xmm10,%xmm12 | |
1236: 66 41 0f 6f ca movdqa %xmm10,%xmm1 | |
123b: 66 0f ef cd pxor %xmm5,%xmm1 | |
123f: 66 0f fa cd psubd %xmm5,%xmm1 | |
1243: 66 0f fe ce paddd %xmm6,%xmm1 | |
1247: 66 44 0f db e4 pand %xmm4,%xmm12 | |
124c: 66 0f df e2 pandn %xmm2,%xmm4 | |
1250: 66 41 0f eb e4 por %xmm12,%xmm4 | |
1255: 66 0f fe e7 paddd %xmm7,%xmm4 | |
1259: 85 c0 test %eax,%eax | |
125b: 0f 85 2f ff ff ff jne 1190 <main+0x50> | |
1261: 50 push %rax | |
1262: 66 0f fe e1 paddd %xmm1,%xmm4 | |
1266: 66 0f 70 c4 4e pshufd $0x4e,%xmm4,%xmm0 | |
126b: 66 0f fe c4 paddd %xmm4,%xmm0 | |
126f: 66 0f 70 c8 e5 pshufd $0xe5,%xmm0,%xmm1 | |
1274: 66 0f fe c8 paddd %xmm0,%xmm1 | |
1278: 66 0f 7e ce movd %xmm1,%esi | |
127c: 81 c6 fc c9 9a 3b add $0x3b9ac9fc,%esi | |
1282: 48 8d 3d 17 0e 00 00 lea 0xe17(%rip),%rdi # 20a0 <_IO_stdin_used+0xa0> | |
1289: 31 c0 xor %eax,%eax | |
128b: e8 a0 fd ff ff callq 1030 <printf@plt> | |
1290: 31 c0 xor %eax,%eax | |
1292: 59 pop %rcx | |
1293: c3 retq | |
1294: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) | |
129b: 00 00 00 | |
129e: 66 90 xchg %ax,%ax | |
00000000000012a0 <__libc_csu_init>: | |
12a0: f3 0f 1e fa endbr64 | |
12a4: 41 57 push %r15 | |
12a6: 49 89 d7 mov %rdx,%r15 | |
12a9: 41 56 push %r14 | |
12ab: 49 89 f6 mov %rsi,%r14 | |
12ae: 41 55 push %r13 | |
12b0: 41 89 fd mov %edi,%r13d | |
12b3: 41 54 push %r12 | |
12b5: 4c 8d 25 1c 2b 00 00 lea 0x2b1c(%rip),%r12 # 3dd8 <__frame_dummy_init_array_entry> | |
12bc: 55 push %rbp | |
12bd: 48 8d 2d 1c 2b 00 00 lea 0x2b1c(%rip),%rbp # 3de0 <__init_array_end> | |
12c4: 53 push %rbx | |
12c5: 4c 29 e5 sub %r12,%rbp | |
12c8: 48 83 ec 08 sub $0x8,%rsp | |
12cc: 67 e8 2e fd ff ff addr32 callq 1000 <_init> | |
12d2: 48 c1 fd 03 sar $0x3,%rbp | |
12d6: 74 1e je 12f6 <__libc_csu_init+0x56> | |
12d8: 31 db xor %ebx,%ebx | |
12da: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) | |
12e0: 4c 89 fa mov %r15,%rdx | |
12e3: 4c 89 f6 mov %r14,%rsi | |
12e6: 44 89 ef mov %r13d,%edi | |
12e9: 41 ff 14 dc callq *(%r12,%rbx,8) | |
12ed: 48 83 c3 01 add $0x1,%rbx | |
12f1: 48 39 dd cmp %rbx,%rbp | |
12f4: 75 ea jne 12e0 <__libc_csu_init+0x40> | |
12f6: 48 83 c4 08 add $0x8,%rsp | |
12fa: 5b pop %rbx | |
12fb: 5d pop %rbp | |
12fc: 41 5c pop %r12 | |
12fe: 41 5d pop %r13 | |
1300: 41 5e pop %r14 | |
1302: 41 5f pop %r15 | |
1304: c3 retq | |
1305: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) | |
130c: 00 00 00 00 | |
0000000000001310 <__libc_csu_fini>: | |
1310: f3 0f 1e fa endbr64 | |
1314: c3 retq | |
Disassembly of section .fini: | |
0000000000001318 <_fini>: | |
1318: f3 0f 1e fa endbr64 | |
131c: 48 83 ec 08 sub $0x8,%rsp | |
1320: 48 83 c4 08 add $0x8,%rsp | |
1324: c3 retq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a_gcc: 檔案格式 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__> | |
100f: 48 85 c0 test %rax,%rax | |
1012: 74 02 je 1016 <_init+0x16> | |
1014: ff d0 callq *%rax | |
1016: 48 83 c4 08 add $0x8,%rsp | |
101a: c3 retq | |
Disassembly of section .plt: | |
0000000000001020 <.plt>: | |
1020: ff 35 e2 2f 00 00 pushq 0x2fe2(%rip) # 4008 <_GLOBAL_OFFSET_TABLE_+0x8> | |
1026: ff 25 e4 2f 00 00 jmpq *0x2fe4(%rip) # 4010 <_GLOBAL_OFFSET_TABLE_+0x10> | |
102c: 0f 1f 40 00 nopl 0x0(%rax) | |
0000000000001030 <printf@plt>: | |
1030: ff 25 e2 2f 00 00 jmpq *0x2fe2(%rip) # 4018 <printf@GLIBC_2.2.5> | |
1036: 68 00 00 00 00 pushq $0x0 | |
103b: e9 e0 ff ff ff jmpq 1020 <.plt> | |
Disassembly of section .text: | |
0000000000001040 <main>: | |
1040: 48 83 ec 08 sub $0x8,%rsp | |
1044: 66 0f ef db pxor %xmm3,%xmm3 | |
1048: 31 c0 xor %eax,%eax | |
104a: 66 0f 6f 15 be 0f 00 movdqa 0xfbe(%rip),%xmm2 # 2010 <_IO_stdin_used+0x10> | |
1051: 00 | |
1052: 66 0f 6f 0d c6 0f 00 movdqa 0xfc6(%rip),%xmm1 # 2020 <_IO_stdin_used+0x20> | |
1059: 00 | |
105a: 66 0f 6f 25 ce 0f 00 movdqa 0xfce(%rip),%xmm4 # 2030 <_IO_stdin_used+0x30> | |
1061: 00 | |
1062: 66 0f 6f f3 movdqa %xmm3,%xmm6 | |
1066: 66 0f 6f 3d d2 0f 00 movdqa 0xfd2(%rip),%xmm7 # 2040 <_IO_stdin_used+0x40> | |
106d: 00 | |
106e: 66 90 xchg %ax,%ax | |
1070: 66 0f 6f c1 movdqa %xmm1,%xmm0 | |
1074: 66 0f 6f ea movdqa %xmm2,%xmm5 | |
1078: 66 0f fe d4 paddd %xmm4,%xmm2 | |
107c: 83 c0 01 add $0x1,%eax | |
107f: 66 0f db c7 pand %xmm7,%xmm0 | |
1083: 66 0f 76 c6 pcmpeqd %xmm6,%xmm0 | |
1087: 66 0f df e8 pandn %xmm0,%xmm5 | |
108b: 66 0f df c1 pandn %xmm1,%xmm0 | |
108f: 66 0f fe cc paddd %xmm4,%xmm1 | |
1093: 66 0f eb c5 por %xmm5,%xmm0 | |
1097: 66 0f fe d8 paddd %xmm0,%xmm3 | |
109b: 3d 7f b2 e6 0e cmp $0xee6b27f,%eax | |
10a0: 75 ce jne 1070 <main+0x30> | |
10a2: 66 0f 6f c3 movdqa %xmm3,%xmm0 | |
10a6: 48 8d 3d 57 0f 00 00 lea 0xf57(%rip),%rdi # 2004 <_IO_stdin_used+0x4> | |
10ad: 31 c0 xor %eax,%eax | |
10af: 66 0f 73 d8 08 psrldq $0x8,%xmm0 | |
10b4: 66 0f fe d8 paddd %xmm0,%xmm3 | |
10b8: 66 0f 6f c3 movdqa %xmm3,%xmm0 | |
10bc: 66 0f 73 d8 04 psrldq $0x4,%xmm0 | |
10c1: 66 0f fe d8 paddd %xmm0,%xmm3 | |
10c5: 66 0f 7e de movd %xmm3,%esi | |
10c9: 83 c6 04 add $0x4,%esi | |
10cc: e8 5f ff ff ff callq 1030 <printf@plt> | |
10d1: 31 c0 xor %eax,%eax | |
10d3: 48 83 c4 08 add $0x8,%rsp | |
10d7: c3 retq | |
10d8: 0f 1f 84 00 00 00 00 nopl 0x0(%rax,%rax,1) | |
10df: 00 | |
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: 4c 8d 05 56 01 00 00 lea 0x156(%rip),%r8 # 1250 <__libc_csu_fini> | |
10fa: 48 8d 0d df 00 00 00 lea 0xdf(%rip),%rcx # 11e0 <__libc_csu_init> | |
1101: 48 8d 3d 38 ff ff ff lea -0xc8(%rip),%rdi # 1040 <main> | |
1108: ff 15 d2 2e 00 00 callq *0x2ed2(%rip) # 3fe0 <__libc_start_main@GLIBC_2.2.5> | |
110e: f4 hlt | |
110f: 90 nop | |
0000000000001110 <deregister_tm_clones>: | |
1110: 48 8d 3d 19 2f 00 00 lea 0x2f19(%rip),%rdi # 4030 <__TMC_END__> | |
1117: 48 8d 05 12 2f 00 00 lea 0x2f12(%rip),%rax # 4030 <__TMC_END__> | |
111e: 48 39 f8 cmp %rdi,%rax | |
1121: 74 15 je 1138 <deregister_tm_clones+0x28> | |
1123: 48 8b 05 ae 2e 00 00 mov 0x2eae(%rip),%rax # 3fd8 <_ITM_deregisterTMCloneTable> | |
112a: 48 85 c0 test %rax,%rax | |
112d: 74 09 je 1138 <deregister_tm_clones+0x28> | |
112f: ff e0 jmpq *%rax | |
1131: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) | |
1138: c3 retq | |
1139: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) | |
0000000000001140 <register_tm_clones>: | |
1140: 48 8d 3d e9 2e 00 00 lea 0x2ee9(%rip),%rdi # 4030 <__TMC_END__> | |
1147: 48 8d 35 e2 2e 00 00 lea 0x2ee2(%rip),%rsi # 4030 <__TMC_END__> | |
114e: 48 29 fe sub %rdi,%rsi | |
1151: 48 c1 fe 03 sar $0x3,%rsi | |
1155: 48 89 f0 mov %rsi,%rax | |
1158: 48 c1 e8 3f shr $0x3f,%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> | |
116b: 48 85 c0 test %rax,%rax | |
116e: 74 08 je 1178 <register_tm_clones+0x38> | |
1170: ff e0 jmpq *%rax | |
1172: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) | |
1178: c3 retq | |
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 a5 2e 00 00 00 cmpb $0x0,0x2ea5(%rip) # 4030 <__TMC_END__> | |
118b: 75 33 jne 11c0 <__do_global_dtors_aux+0x40> | |
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 0d je 11a8 <__do_global_dtors_aux+0x28> | |
119b: 48 8b 3d 86 2e 00 00 mov 0x2e86(%rip),%rdi # 4028 <__dso_handle> | |
11a2: ff 15 50 2e 00 00 callq *0x2e50(%rip) # 3ff8 <__cxa_finalize@GLIBC_2.2.5> | |
11a8: e8 63 ff ff ff callq 1110 <deregister_tm_clones> | |
11ad: c6 05 7c 2e 00 00 01 movb $0x1,0x2e7c(%rip) # 4030 <__TMC_END__> | |
11b4: 5d pop %rbp | |
11b5: c3 retq | |
11b6: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) | |
11bd: 00 00 00 | |
11c0: c3 retq | |
11c1: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) | |
11c8: 00 00 00 00 | |
11cc: 0f 1f 40 00 nopl 0x0(%rax) | |
00000000000011d0 <frame_dummy>: | |
11d0: f3 0f 1e fa endbr64 | |
11d4: e9 67 ff ff ff jmpq 1140 <register_tm_clones> | |
11d9: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) | |
00000000000011e0 <__libc_csu_init>: | |
11e0: f3 0f 1e fa endbr64 | |
11e4: 41 57 push %r15 | |
11e6: 49 89 d7 mov %rdx,%r15 | |
11e9: 41 56 push %r14 | |
11eb: 49 89 f6 mov %rsi,%r14 | |
11ee: 41 55 push %r13 | |
11f0: 41 89 fd mov %edi,%r13d | |
11f3: 41 54 push %r12 | |
11f5: 4c 8d 25 ec 2b 00 00 lea 0x2bec(%rip),%r12 # 3de8 <__frame_dummy_init_array_entry> | |
11fc: 55 push %rbp | |
11fd: 48 8d 2d ec 2b 00 00 lea 0x2bec(%rip),%rbp # 3df0 <__init_array_end> | |
1204: 53 push %rbx | |
1205: 4c 29 e5 sub %r12,%rbp | |
1208: 48 83 ec 08 sub $0x8,%rsp | |
120c: 67 e8 ee fd ff ff addr32 callq 1000 <_init> | |
1212: 48 c1 fd 03 sar $0x3,%rbp | |
1216: 74 1e je 1236 <__libc_csu_init+0x56> | |
1218: 31 db xor %ebx,%ebx | |
121a: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) | |
1220: 4c 89 fa mov %r15,%rdx | |
1223: 4c 89 f6 mov %r14,%rsi | |
1226: 44 89 ef mov %r13d,%edi | |
1229: 41 ff 14 dc callq *(%r12,%rbx,8) | |
122d: 48 83 c3 01 add $0x1,%rbx | |
1231: 48 39 dd cmp %rbx,%rbp | |
1234: 75 ea jne 1220 <__libc_csu_init+0x40> | |
1236: 48 83 c4 08 add $0x8,%rsp | |
123a: 5b pop %rbx | |
123b: 5d pop %rbp | |
123c: 41 5c pop %r12 | |
123e: 41 5d pop %r13 | |
1240: 41 5e pop %r14 | |
1242: 41 5f pop %r15 | |
1244: c3 retq | |
1245: 66 66 2e 0f 1f 84 00 data16 nopw %cs:0x0(%rax,%rax,1) | |
124c: 00 00 00 00 | |
0000000000001250 <__libc_csu_fini>: | |
1250: f3 0f 1e fa endbr64 | |
1254: c3 retq | |
Disassembly of section .fini: | |
0000000000001258 <_fini>: | |
1258: f3 0f 1e fa endbr64 | |
125c: 48 83 ec 08 sub $0x8,%rsp | |
1260: 48 83 c4 08 add $0x8,%rsp | |
1264: c3 retq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[saren@Saren-Workstation ~ ]% gcc -O3 b.c | |
[saren@Saren-Workstation ~ ]% time ./a.out | |
500000002 | |
./a.out 0.24s user 0.00s system 116% cpu 0.203 total | |
[saren@Saren-Workstation ~ ]% clang -O3 b.c | |
[saren@Saren-Workstation ~ ]% time ./a.out | |
500000002 | |
./a.out 0.20s user 0.00s system 109% cpu 0.184 total |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment