A bit of a myth about compiled language code optimization
Recently, I’ve seen some people share their own experience of coding, such as the habit of changing the if statement to a ternary operator to reduce the number of lines of code. It is now customary to combine the same IF judgments together to reduce the number of if judgments and improve efficiency.
I thought so many years ago, but as I’ve gotten older, I think it doesn’t make much sense in compiled languages, and sometimes it even makes your code less readable.
example
There are two codes as follows:
#include <array>
#include <iostream>
int main(a)
{
std: :array<int, 122 >array{ 2700.2314.8429.7726.4817.8716.3598.6255.5056.8653.8571.5028.1259.3315.2896.1411.3847.879.7353.8056.8765.2344.6349.4156.8350.4164.4783.6800.8887.267.4478.6327.58.7961.756.5654.9546.5132.247.5514.7098.1156.795.2502.367.5330.2261.8692.2460.4823.8968.4976.1929.1051.9249.9713.2803.1743.3681.93.4967.2245.198.896.6372.4413.2615.6130.5766.5306.1236.888.8050.7080.3460.3473.1720.3913.3449.8420.1814.1261.1368.167.7938.4483.4843.4682.3301.4038.709.8655.598.3857.6285.2961.6817.1031.4007.1392.5717.5837.5695.9511.8891.7883.7035.2349.5752.3139.2442.3966.2007.9205.8434.5065.3795.6890.2715.1.5106.5083 };
auto x = 5330;
for (const auto &element : array)
{
if (element> 1000)
{
std: :cout << ""; }}for (const auto &element : array)
{
if (element> 1000)
{
if (element == x)
{
std: :cout << "hello, world" << std: :endl; }}}return 0;
}
Copy the code
#include <array>
#include <iostream>
int main(a)
{
std: :array<int, 122 >array{ 2700.2314.8429.7726.4817.8716.3598.6255.5056.8653.8571.5028.1259.3315.2896.1411.3847.879.7353.8056.8765.2344.6349.4156.8350.4164.4783.6800.8887.267.4478.6327.58.7961.756.5654.9546.5132.247.5514.7098.1156.795.2502.367.5330.2261.8692.2460.4823.8968.4976.1929.1051.9249.9713.2803.1743.3681.93.4967.2245.198.896.6372.4413.2615.6130.5766.5306.1236.888.8050.7080.3460.3473.1720.3913.3449.8420.1814.1261.1368.167.7938.4483.4843.4682.3301.4038.709.8655.598.3857.6285.2961.6817.1031.4007.1392.5717.5837.5695.9511.8891.7883.7035.2349.5752.3139.2442.3966.2007.9205.8434.5065.3795.6890.2715.1.5106.5083 };
auto x = 5330;
for (const auto &element : array)
{
if (element> 1000)
{
std: :cout << "";
if (element == x)
{
std: :cout << "hello, world" << std: :endl; }}}return 0;
}
Copy the code
The second piece of code should be better than the first from a code standpoint.
The corresponding assembly of the two pieces of code generated using LLVM is as follows:
.section __TEXT,__text,regular,pure_instructions
.macosx_version_min 10, 13
.globl _main ## -- Begin function main
.p2align 4, 0x90
_main: ## @main
.cfi_startproc
## BB#0:
pushq %rbp
Lcfi0:
.cfi_def_cfa_offset 16
Lcfi1:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi2:
.cfi_def_cfa_register %rbp
subq $640, %rsp ## imm = 0x280
leaq -544(%rbp), %rax
leaq l__ZZ4mainE5array(%rip), %rcx
movl $488, %edx ## imm = 0x1E8
## kill: %RDX<def> %EDX<kill>
movl $0, -52(%rbp)
movq %rax, %rsi
movq %rsi, %rdi
movq %rcx, %rsi
movq %rax, -624(%rbp) ## 8-byte Spill
callq _memcpy
movl $5330, -548(%rbp) ## imm = 0x14D2
movq -624(%rbp), %rax ## 8-byte Reload
movq %rax, -560(%rbp)
movq -560(%rbp), %rcx
movq %rcx, -48(%rbp)
movq -48(%rbp), %rcx
movq %rcx, -568(%rbp)
movq -560(%rbp), %rcx
movq %rcx, -24(%rbp)
movq -24(%rbp), %rcx
addq $488, %rcx ## imm = 0x1E8
movq %rcx, -576(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movq -568(%rbp), %rax
cmpq -576(%rbp), %rax
je LBB0_6
## BB#2: ## in Loop: Header=BB0_1 Depth=1
movq -568(%rbp), %rax
movq %rax, -584(%rbp)
movq -584(%rbp), %rax
cmpl $1000, (%rax) ## imm = 0x3E8
jle LBB0_4
## BB#3: ## in Loop: Header=BB0_1 Depth=1
movq __ZNSt3__14coutE@GOTPCREL(%rip), %rdi
leaq L_.str(%rip), %rsi
callq __ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc
movq %rax, -632(%rbp) ## 8-byte Spill
LBB0_4: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_5
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
movq -568(%rbp), %rax
addq $4, %rax
movq %rax, -568(%rbp)
jmp LBB0_1
LBB0_6:
leaq -544(%rbp), %rax
movq %rax, -592(%rbp)
movq -592(%rbp), %rax
movq %rax, -16(%rbp)
movq -16(%rbp), %rax
movq %rax, -600(%rbp)
movq -592(%rbp), %rax
movq %rax, -8(%rbp)
movq -8(%rbp), %rax
addq $488, %rax ## imm = 0x1E8
movq %rax, -608(%rbp)
LBB0_7: ## =>This Inner Loop Header: Depth=1
movq -600(%rbp), %rax
cmpq -608(%rbp), %rax
je LBB0_14
## BB#8: ## in Loop: Header=BB0_7 Depth=1
movq -600(%rbp), %rax
movq %rax, -616(%rbp)
movq -616(%rbp), %rax
cmpl $1000, (%rax) ## imm = 0x3E8
jle LBB0_12
## BB#9: ## in Loop: Header=BB0_7 Depth=1
movq -616(%rbp), %rax
movl (%rax), %ecx
cmpl -548(%rbp), %ecx
jne LBB0_11
## BB#10: ## in Loop: Header=BB0_7 Depth=1
movq __ZNSt3__14coutE@GOTPCREL(%rip), %rdi
leaq L_.str.1(%rip), %rsi
callq __ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc
leaq __ZNSt3__14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_(%rip), %rsi
movq %rax, -32(%rbp)
movq %rsi, -40(%rbp)
movq -32(%rbp), %rdi
callq *-40(%rbp)
movq %rax, -640(%rbp) ## 8-byte Spill
LBB0_11: ## in Loop: Header=BB0_7 Depth=1
jmp LBB0_12
LBB0_12: ## in Loop: Header=BB0_7 Depth=1
jmp LBB0_13
LBB0_13: ## in Loop: Header=BB0_7 Depth=1
movq -600(%rbp), %rax
addq $4, %rax
movq %rax, -600(%rbp)
jmp LBB0_7
LBB0_14:
xorl %eax, %eax
addq $640, %rsp ## imm = 0x280
popq %rbp
retq
.cfi_endproc
## -- End function
.globl __ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc ## -- Begin function _ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc
.weak_definition __ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc
.p2align 4, 0x90
__ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc: ## @_ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc
.cfi_startproc
## BB#0:
pushq %rbp
Lcfi3:
.cfi_def_cfa_offset 16
Lcfi4:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi5:
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq -8(%rbp), %rdi
movq -16(%rbp), %rsi
movq -16(%rbp), %rax
movq %rdi, -24(%rbp) ## 8-byte Spill
movq %rax, %rdi
movq %rsi, -32(%rbp) ## 8-byte Spill
callq __ZNSt3__111char_traitsIcE6lengthEPKc
movq -24(%rbp), %rdi ## 8-byte Reload
movq -32(%rbp), %rsi ## 8-byte Reload
movq %rax, %rdx
callq __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.private_extern __ZNSt3__14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_ ## -- Begin function _ZNSt3__14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_
.globl __ZNSt3__14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_
.weak_definition __ZNSt3__14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_
.p2align 4, 0x90
__ZNSt3__14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_: ## @_ZNSt3__14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_
Lfunc_begin0:
.cfi_startproc
.cfi_personality 155, ___gxx_personality_v0
.cfi_lsda 16, Lexception0
## BB#0:
pushq %rbp
Lcfi6:
.cfi_def_cfa_offset 16
Lcfi7:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi8:
.cfi_def_cfa_register %rbp
subq $144, %rsp
movq %rdi, -72(%rbp)
movq -72(%rbp), %rdi
movq (%rdi), %rax
movq -24(%rax), %rax
movq %rdi, %rcx
addq %rax, %rcx
movq %rcx, -32(%rbp)
movb $10, -33(%rbp)
movq -32(%rbp), %rsi
leaq -48(%rbp), %rax
movq %rdi, -80(%rbp) ## 8-byte Spill
movq %rax, %rdi
movq %rax, -88(%rbp) ## 8-byte Spill
callq __ZNKSt3__18ios_base6getlocEv
movq -88(%rbp), %rax ## 8-byte Reload
movq %rax, -24(%rbp)
movq -24(%rbp), %rdi
Ltmp0:
movq __ZNSt3__15ctypeIcE2idE@GOTPCREL(%rip), %rsi
callq __ZNKSt3__16locale9use_facetERNS0_2idE
Ltmp1:
movq %rax, -96(%rbp) ## 8-byte Spill
jmp LBB2_1
LBB2_1:
movb -33(%rbp), %al
movq -96(%rbp), %rcx ## 8-byte Reload
movq %rcx, -8(%rbp)
movb %al, -9(%rbp)
movq -8(%rbp), %rdx
movq (%rdx), %rsi
movq 56(%rsi), %rsi
movsbl -9(%rbp), %edi
Ltmp2:
movl %edi, -100(%rbp) ## 4-byte Spill
movq %rdx, %rdi
movl -100(%rbp), %r8d ## 4-byte Reload
movq %rsi, -112(%rbp) ## 8-byte Spill
movl %r8d, %esi
movq -112(%rbp), %rdx ## 8-byte Reload
callq *%rdx
Ltmp3:
movb %al, -113(%rbp) ## 1-byte Spill
jmp LBB2_3
LBB2_2:
Ltmp4:
leaq -48(%rbp), %rdi
movl %edx, %ecx
movq %rax, -56(%rbp)
movl %ecx, -60(%rbp)
callq __ZNSt3__16localeD1Ev
movq -56(%rbp), %rdi
callq __Unwind_Resume
LBB2_3:
leaq -48(%rbp), %rdi
callq __ZNSt3__16localeD1Ev
movq -80(%rbp), %rdi ## 8-byte Reload
movb -113(%rbp), %al ## 1-byte Reload
movsbl %al, %esi
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE3putEc
movq -72(%rbp), %rdi
movq %rax, -128(%rbp) ## 8-byte Spill
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5flushEv
movq -72(%rbp), %rdi
movq %rax, -136(%rbp) ## 8-byte Spill
movq %rdi, %rax
addq $144, %rsp
popq %rbp
retq
Lfunc_end0:
.cfi_endproc
.section __TEXT,__gcc_except_tab
.p2align 2
GCC_except_table2:
Lexception0:
.byte 255 ## @LPStart Encoding = omit
.byte 155 ## @TType Encoding = indirect pcrel sdata4
.byte 41 ## @TType base offset
.byte 3 ## Call site Encoding = udata4
.byte 39 ## Call site table length
Lset0 = Lfunc_begin0-Lfunc_begin0 ## >> Call Site 1 <<
.long Lset0
Lset1 = Ltmp0-Lfunc_begin0 ## Call between Lfunc_begin0 and Ltmp0
.long Lset1
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
Lset2 = Ltmp0-Lfunc_begin0 ## >> Call Site 2 <<
.long Lset2
Lset3 = Ltmp3-Ltmp0 ## Call between Ltmp0 and Ltmp3
.long Lset3
Lset4 = Ltmp4-Lfunc_begin0 ## jumps to Ltmp4
.long Lset4
.byte 0 ## On action: cleanup
Lset5 = Ltmp3-Lfunc_begin0 ## >> Call Site 3 <<
.long Lset5
Lset6 = Lfunc_end0-Ltmp3 ## Call between Ltmp3 and Lfunc_end0
.long Lset6
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
.p2align 2
## -- End function
.section __TEXT,__text,regular,pure_instructions
.globl __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m ## -- Begin function _ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
.weak_definition __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
.p2align 4, 0x90
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m: ## @_ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
Lfunc_begin1:
.cfi_startproc
.cfi_personality 155, ___gxx_personality_v0
.cfi_lsda 16, Lexception1
## BB#0:
pushq %rbp
Lcfi9:
.cfi_def_cfa_offset 16
Lcfi10:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi11:
.cfi_def_cfa_register %rbp
subq $384, %rsp ## imm = 0x180
movq %rdi, -184(%rbp)
movq %rsi, -192(%rbp)
movq %rdx, -200(%rbp)
movq -184(%rbp), %rsi
Ltmp5:
leaq -216(%rbp), %rdi
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_
Ltmp6:
jmp LBB3_1
LBB3_1:
leaq -216(%rbp), %rax
movq %rax, -176(%rbp)
movq -176(%rbp), %rax
movb (%rax), %cl
movb %cl, -249(%rbp) ## 1-byte Spill
## BB#2:
movb -249(%rbp), %al ## 1-byte Reload
testb $1, %al
jne LBB3_3
jmp LBB3_26
LBB3_3:
leaq -248(%rbp), %rax
movq -184(%rbp), %rcx
movq %rax, -160(%rbp)
movq %rcx, -168(%rbp)
movq -160(%rbp), %rax
movq -168(%rbp), %rcx
movq %rax, -144(%rbp)
movq %rcx, -152(%rbp)
movq -144(%rbp), %rax
movq -152(%rbp), %rcx
movq (%rcx), %rdx
movq -24(%rdx), %rdx
addq %rdx, %rcx
movq %rcx, -136(%rbp)
movq -136(%rbp), %rcx
movq %rcx, -128(%rbp)
movq -128(%rbp), %rcx
movq 40(%rcx), %rcx
movq %rcx, (%rax)
movq -192(%rbp), %rsi
movq -184(%rbp), %rax
movq (%rax), %rcx
movq -24(%rcx), %rcx
addq %rcx, %rax
movq %rax, -88(%rbp)
movq -88(%rbp), %rax
movl 8(%rax), %edi
movq %rsi, -264(%rbp) ## 8-byte Spill
movl %edi, -268(%rbp) ## 4-byte Spill
## BB#4:
movl -268(%rbp), %eax ## 4-byte Reload
andl $176, %eax
cmpl $32, %eax
jne LBB3_6
## BB#5:
movq -192(%rbp), %rax
addq -200(%rbp), %rax
movq %rax, -280(%rbp) ## 8-byte Spill
jmp LBB3_7
LBB3_6:
movq -192(%rbp), %rax
movq %rax, -280(%rbp) ## 8-byte Spill
LBB3_7:
movq -280(%rbp), %rax ## 8-byte Reload
movq -192(%rbp), %rcx
addq -200(%rbp), %rcx
movq -184(%rbp), %rdx
movq (%rdx), %rsi
movq -24(%rsi), %rsi
addq %rsi, %rdx
movq -184(%rbp), %rsi
movq (%rsi), %rdi
movq -24(%rdi), %rdi
addq %rdi, %rsi
movq %rsi, -72(%rbp)
movq -72(%rbp), %rsi
movq %rax, -288(%rbp) ## 8-byte Spill
movq %rcx, -296(%rbp) ## 8-byte Spill
movq %rdx, -304(%rbp) ## 8-byte Spill
movq %rsi, -312(%rbp) ## 8-byte Spill
callq __ZNSt3__111char_traitsIcE3eofEv
movq -312(%rbp), %rcx ## 8-byte Reload
movl 144(%rcx), %esi
movl %eax, %edi
callq __ZNSt3__111char_traitsIcE11eq_int_typeEii
testb $1, %al
jne LBB3_8
jmp LBB3_13
LBB3_8:
movq -312(%rbp), %rax ## 8-byte Reload
movq %rax, -32(%rbp)
movb $32, -33(%rbp)
movq -32(%rbp), %rsi
Ltmp8:
leaq -48(%rbp), %rdi
callq __ZNKSt3__18ios_base6getlocEv
Ltmp9:
jmp LBB3_9
LBB3_9:
leaq -48(%rbp), %rax
movq %rax, -24(%rbp)
movq -24(%rbp), %rdi
Ltmp10:
movq __ZNSt3__15ctypeIcE2idE@GOTPCREL(%rip), %rsi
callq __ZNKSt3__16locale9use_facetERNS0_2idE
Ltmp11:
movq %rax, -320(%rbp) ## 8-byte Spill
jmp LBB3_10
LBB3_10:
movb -33(%rbp), %al
movq -320(%rbp), %rcx ## 8-byte Reload
movq %rcx, -8(%rbp)
movb %al, -9(%rbp)
movq -8(%rbp), %rdx
movq (%rdx), %rsi
movq 56(%rsi), %rsi
movsbl -9(%rbp), %edi
Ltmp12:
movl %edi, -324(%rbp) ## 4-byte Spill
movq %rdx, %rdi
movl -324(%rbp), %r8d ## 4-byte Reload
movq %rsi, -336(%rbp) ## 8-byte Spill
movl %r8d, %esi
movq -336(%rbp), %rdx ## 8-byte Reload
callq *%rdx
Ltmp13:
movb %al, -337(%rbp) ## 1-byte Spill
jmp LBB3_12
LBB3_11:
Ltmp14:
movl %edx, %ecx
movq %rax, -56(%rbp)
movl %ecx, -60(%rbp)
leaq -48(%rbp), %rdi
callq __ZNSt3__16localeD1Ev
movq -56(%rbp), %rax
movl -60(%rbp), %ecx
movq %rax, -352(%rbp) ## 8-byte Spill
movl %ecx, -356(%rbp) ## 4-byte Spill
jmp LBB3_21
LBB3_12:
leaq -48(%rbp), %rdi
callq __ZNSt3__16localeD1Ev
movb -337(%rbp), %al ## 1-byte Reload
movsbl %al, %ecx
movq -312(%rbp), %rdi ## 8-byte Reload
movl %ecx, 144(%rdi)
LBB3_13:
movq -312(%rbp), %rax ## 8-byte Reload
movl 144(%rax), %ecx
movb %cl, %dl
movb %dl, -357(%rbp) ## 1-byte Spill
## BB#14:
movq -248(%rbp), %rdi
Ltmp15:
movb -357(%rbp), %al ## 1-byte Reload
movsbl %al, %r9d
movq -264(%rbp), %rsi ## 8-byte Reload
movq -288(%rbp), %rdx ## 8-byte Reload
movq -296(%rbp), %rcx ## 8-byte Reload
movq -304(%rbp), %r8 ## 8-byte Reload
callq __ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
Ltmp16:
movq %rax, -368(%rbp) ## 8-byte Spill
jmp LBB3_15
LBB3_15:
leaq -240(%rbp), %rax
movq -368(%rbp), %rcx ## 8-byte Reload
movq %rcx, -240(%rbp)
movq %rax, -80(%rbp)
movq -80(%rbp), %rax
cmpq $0, (%rax)
jne LBB3_25
## BB#16:
movq -184(%rbp), %rax
movq (%rax), %rcx
movq -24(%rcx), %rcx
addq %rcx, %rax
movq %rax, -112(%rbp)
movl $5, -116(%rbp)
movq -112(%rbp), %rax
movl -116(%rbp), %edx
movq %rax, -96(%rbp)
movl %edx, -100(%rbp)
movq -96(%rbp), %rax
movl 32(%rax), %edx
movl -100(%rbp), %esi
orl %esi, %edx
Ltmp17:
movq %rax, %rdi
movl %edx, %esi
callq __ZNSt3__18ios_base5clearEj
Ltmp18:
jmp LBB3_17
LBB3_17:
jmp LBB3_18
LBB3_18:
jmp LBB3_25
LBB3_19:
Ltmp7:
movl %edx, %ecx
movq %rax, -224(%rbp)
movl %ecx, -228(%rbp)
jmp LBB3_22
LBB3_20:
Ltmp19:
movl %edx, %ecx
movq %rax, -352(%rbp) ## 8-byte Spill
movl %ecx, -356(%rbp) ## 4-byte Spill
jmp LBB3_21
LBB3_21:
movl -356(%rbp), %eax ## 4-byte Reload
movq -352(%rbp), %rcx ## 8-byte Reload
leaq -216(%rbp), %rdi
movq %rcx, -224(%rbp)
movl %eax, -228(%rbp)
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev
LBB3_22:
movq -224(%rbp), %rdi
callq ___cxa_begin_catch
movq -184(%rbp), %rdi
movq (%rdi), %rcx
movq -24(%rcx), %rcx
addq %rcx, %rdi
Ltmp20:
movq %rax, -376(%rbp) ## 8-byte Spill
callq __ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv
Ltmp21:
jmp LBB3_23
LBB3_23:
callq ___cxa_end_catch
LBB3_24:
movq -184(%rbp), %rax
addq $384, %rsp ## imm = 0x180
popq %rbp
retq
LBB3_25:
jmp LBB3_26
LBB3_26:
leaq -216(%rbp), %rdi
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev
jmp LBB3_24
LBB3_27:
Ltmp22:
movl %edx, %ecx
movq %rax, -224(%rbp)
movl %ecx, -228(%rbp)
Ltmp23:
callq ___cxa_end_catch
Ltmp24:
jmp LBB3_28
LBB3_28:
jmp LBB3_29
LBB3_29:
movq -224(%rbp), %rdi
callq __Unwind_Resume
LBB3_30:
Ltmp25:
movl %edx, %ecx
movq %rax, %rdi
movl %ecx, -380(%rbp) ## 4-byte Spill
callq ___clang_call_terminate
Lfunc_end1:
.cfi_endproc
.section __TEXT,__gcc_except_tab
.p2align 2
GCC_except_table3:
Lexception1:
.byte 255 ## @LPStart Encoding = omit
.byte 155 ## @TType Encoding = indirect pcrel sdata4
.asciz "\201\201\200\200" ## @TType base offset
.byte 3 ## Call site Encoding = udata4
.byte 117 ## Call site table length
Lset7 = Ltmp5-Lfunc_begin1 ## >> Call Site 1 <<
.long Lset7
Lset8 = Ltmp6-Ltmp5 ## Call between Ltmp5 and Ltmp6
.long Lset8
Lset9 = Ltmp7-Lfunc_begin1 ## jumps to Ltmp7
.long Lset9
.byte 5 ## On action: 3
Lset10 = Ltmp8-Lfunc_begin1 ## >> Call Site 2 <<
.long Lset10
Lset11 = Ltmp9-Ltmp8 ## Call between Ltmp8 and Ltmp9
.long Lset11
Lset12 = Ltmp19-Lfunc_begin1 ## jumps to Ltmp19
.long Lset12
.byte 5 ## On action: 3
Lset13 = Ltmp10-Lfunc_begin1 ## >> Call Site 3 <<
.long Lset13
Lset14 = Ltmp13-Ltmp10 ## Call between Ltmp10 and Ltmp13
.long Lset14
Lset15 = Ltmp14-Lfunc_begin1 ## jumps to Ltmp14
.long Lset15
.byte 3 ## On action: 2
Lset16 = Ltmp15-Lfunc_begin1 ## >> Call Site 4 <<
.long Lset16
Lset17 = Ltmp18-Ltmp15 ## Call between Ltmp15 and Ltmp18
.long Lset17
Lset18 = Ltmp19-Lfunc_begin1 ## jumps to Ltmp19
.long Lset18
.byte 5 ## On action: 3
Lset19 = Ltmp18-Lfunc_begin1 ## >> Call Site 5 <<
.long Lset19
Lset20 = Ltmp20-Ltmp18 ## Call between Ltmp18 and Ltmp20
.long Lset20
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
Lset21 = Ltmp20-Lfunc_begin1 ## >> Call Site 6 <<
.long Lset21
Lset22 = Ltmp21-Ltmp20 ## Call between Ltmp20 and Ltmp21
.long Lset22
Lset23 = Ltmp22-Lfunc_begin1 ## jumps to Ltmp22
.long Lset23
.byte 0 ## On action: cleanup
Lset24 = Ltmp21-Lfunc_begin1 ## >> Call Site 7 <<
.long Lset24
Lset25 = Ltmp23-Ltmp21 ## Call between Ltmp21 and Ltmp23
.long Lset25
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
Lset26 = Ltmp23-Lfunc_begin1 ## >> Call Site 8 <<
.long Lset26
Lset27 = Ltmp24-Ltmp23 ## Call between Ltmp23 and Ltmp24
.long Lset27
Lset28 = Ltmp25-Lfunc_begin1 ## jumps to Ltmp25
.long Lset28
.byte 5 ## On action: 3
Lset29 = Ltmp24-Lfunc_begin1 ## >> Call Site 9 <<
.long Lset29
Lset30 = Lfunc_end1-Ltmp24 ## Call between Ltmp24 and Lfunc_end1
.long Lset30
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
.byte 0 ## >> Action Record 1 <<
## Cleanup
.byte 0 ## No further actions
.byte 1 ## >> Action Record 2 <<
## Catch TypeInfo 1
.byte 125 ## Continue to action 1
.byte 1 ## >> Action Record 3 <<
## Catch TypeInfo 1
.byte 0 ## No further actions
## >> Catch TypeInfos <<
.long 0 ## TypeInfo 1
.p2align 2
## -- End function
.section __TEXT,__text,regular,pure_instructions
.globl __ZNSt3__111char_traitsIcE6lengthEPKc ## -- Begin function _ZNSt3__111char_traitsIcE6lengthEPKc
.weak_definition __ZNSt3__111char_traitsIcE6lengthEPKc
.p2align 4, 0x90
__ZNSt3__111char_traitsIcE6lengthEPKc: ## @_ZNSt3__111char_traitsIcE6lengthEPKc
.cfi_startproc
## BB#0:
pushq %rbp
Lcfi12:
.cfi_def_cfa_offset 16
Lcfi13:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi14:
.cfi_def_cfa_register %rbp
subq $16, %rsp
movq %rdi, -8(%rbp)
movq -8(%rbp), %rdi
callq _strlen
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.private_extern __ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_ ## -- Begin function _ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
.globl __ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
.weak_definition __ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
.p2align 4, 0x90
__ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_: ## @_ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
Lfunc_begin2:
.cfi_startproc
.cfi_personality 155, ___gxx_personality_v0
.cfi_lsda 16, Lexception2
## BB#0:
pushq %rbp
Lcfi15:
.cfi_def_cfa_offset 16
Lcfi16:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi17:
.cfi_def_cfa_register %rbp
subq $480, %rsp ## imm = 0x1E0
movb %r9b, %al
movq %rdi, -320(%rbp)
movq %rsi, -328(%rbp)
movq %rdx, -336(%rbp)
movq %rcx, -344(%rbp)
movq %r8, -352(%rbp)
movb %al, -353(%rbp)
cmpq $0, -320(%rbp)
jne LBB5_2
## BB#1:
movq -320(%rbp), %rax
movq %rax, -312(%rbp)
jmp LBB5_26
LBB5_2:
movq -344(%rbp), %rax
movq -328(%rbp), %rcx
subq %rcx, %rax
movq %rax, -368(%rbp)
movq -352(%rbp), %rax
movq %rax, -304(%rbp)
movq -304(%rbp), %rax
movq 24(%rax), %rax
movq %rax, -376(%rbp)
movq -376(%rbp), %rax
cmpq -368(%rbp), %rax
jle LBB5_4
## BB#3:
movq -368(%rbp), %rax
movq -376(%rbp), %rcx
subq %rax, %rcx
movq %rcx, -376(%rbp)
jmp LBB5_5
LBB5_4:
movq $0, -376(%rbp)
LBB5_5:
movq -336(%rbp), %rax
movq -328(%rbp), %rcx
subq %rcx, %rax
movq %rax, -384(%rbp)
cmpq $0, -384(%rbp)
jle LBB5_9
## BB#6:
movq -320(%rbp), %rax
movq -328(%rbp), %rcx
movq -384(%rbp), %rdx
movq %rax, -232(%rbp)
movq %rcx, -240(%rbp)
movq %rdx, -248(%rbp)
movq -232(%rbp), %rax
movq (%rax), %rcx
movq 96(%rcx), %rcx
movq -240(%rbp), %rsi
movq -248(%rbp), %rdx
movq %rax, %rdi
callq *%rcx
cmpq -384(%rbp), %rax
je LBB5_8
## BB#7:
movq $0, -320(%rbp)
movq -320(%rbp), %rax
movq %rax, -312(%rbp)
jmp LBB5_26
LBB5_8:
jmp LBB5_9
LBB5_9:
cmpq $0, -376(%rbp)
jle LBB5_21
## BB#10:
xorl %esi, %esi
movl $24, %eax
movl %eax, %edx
leaq -408(%rbp), %rcx
movq -376(%rbp), %rdi
movb -353(%rbp), %r8b
movq %rcx, -208(%rbp)
movq %rdi, -216(%rbp)
movb %r8b, -217(%rbp)
movq -208(%rbp), %rcx
movq -216(%rbp), %rdi
movb -217(%rbp), %r8b
movq %rcx, -184(%rbp)
movq %rdi, -192(%rbp)
movb %r8b, -193(%rbp)
movq -184(%rbp), %rcx
movq %rcx, -176(%rbp)
movq -176(%rbp), %rdi
movq %rdi, -168(%rbp)
movq -168(%rbp), %rdi
movq %rdi, %r9
movq %r9, -160(%rbp)
movq -160(%rbp), %r9
movq %rdi, -432(%rbp) ## 8-byte Spill
movq %r9, %rdi
movq %rcx, -440(%rbp) ## 8-byte Spill
callq _memset
movq -432(%rbp), %rcx ## 8-byte Reload
movq %rcx, -152(%rbp)
movq -152(%rbp), %rcx
movq %rcx, -144(%rbp)
movq -192(%rbp), %rsi
movq -440(%rbp), %rdi ## 8-byte Reload
movsbl -193(%rbp), %edx
callq __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc
leaq -408(%rbp), %rcx
movq -320(%rbp), %rsi
movq %rcx, -136(%rbp)
movq -136(%rbp), %rcx
movq %rcx, -128(%rbp)
movq -128(%rbp), %rcx
movq %rcx, -120(%rbp)
movq -120(%rbp), %rdi
movq %rdi, -112(%rbp)
movq -112(%rbp), %rdi
movq %rdi, -104(%rbp)
movq -104(%rbp), %rdi
movzbl (%rdi), %eax
movl %eax, %edi
andq $1, %rdi
cmpq $0, %rdi
movq %rsi, -448(%rbp) ## 8-byte Spill
movq %rcx, -456(%rbp) ## 8-byte Spill
je LBB5_12
## BB#11:
movq -456(%rbp), %rax ## 8-byte Reload
movq %rax, -56(%rbp)
movq -56(%rbp), %rcx
movq %rcx, -48(%rbp)
movq -48(%rbp), %rcx
movq %rcx, -40(%rbp)
movq -40(%rbp), %rcx
movq 16(%rcx), %rcx
movq %rcx, -464(%rbp) ## 8-byte Spill
jmp LBB5_13
LBB5_12:
movq -456(%rbp), %rax ## 8-byte Reload
movq %rax, -96(%rbp)
movq -96(%rbp), %rcx
movq %rcx, -88(%rbp)
movq -88(%rbp), %rcx
movq %rcx, -80(%rbp)
movq -80(%rbp), %rcx
addq $1, %rcx
movq %rcx, -72(%rbp)
movq -72(%rbp), %rcx
movq %rcx, -64(%rbp)
movq -64(%rbp), %rcx
movq %rcx, -464(%rbp) ## 8-byte Spill
LBB5_13:
movq -464(%rbp), %rax ## 8-byte Reload
movq %rax, -32(%rbp)
movq -32(%rbp), %rax
movq -376(%rbp), %rcx
movq -448(%rbp), %rdx ## 8-byte Reload
movq %rdx, -8(%rbp)
movq %rax, -16(%rbp)
movq %rcx, -24(%rbp)
movq -8(%rbp), %rax
movq (%rax), %rcx
movq 96(%rcx), %rcx
movq -16(%rbp), %rsi
movq -24(%rbp), %rdx
Ltmp26:
movq %rax, %rdi
callq *%rcx
Ltmp27:
movq %rax, -472(%rbp) ## 8-byte Spill
jmp LBB5_14
LBB5_14:
jmp LBB5_15
LBB5_15:
movq -472(%rbp), %rax ## 8-byte Reload
cmpq -376(%rbp), %rax
je LBB5_18
## BB#16:
movq $0, -320(%rbp)
movq -320(%rbp), %rax
movq %rax, -312(%rbp)
movl $1, -424(%rbp)
jmp LBB5_19
LBB5_17:
Ltmp28:
leaq -408(%rbp), %rdi
movl %edx, %ecx
movq %rax, -416(%rbp)
movl %ecx, -420(%rbp)
callq __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev
jmp LBB5_27
LBB5_18:
movl $0, -424(%rbp)
LBB5_19:
leaq -408(%rbp), %rdi
callq __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev
movl -424(%rbp), %eax
testl %eax, %eax
movl %eax, -476(%rbp) ## 4-byte Spill
je LBB5_20
jmp LBB5_29
LBB5_29:
movl -476(%rbp), %eax ## 4-byte Reload
subl $1, %eax
movl %eax, -480(%rbp) ## 4-byte Spill
je LBB5_26
jmp LBB5_28
LBB5_20:
jmp LBB5_21
LBB5_21:
movq -344(%rbp), %rax
movq -336(%rbp), %rcx
subq %rcx, %rax
movq %rax, -384(%rbp)
cmpq $0, -384(%rbp)
jle LBB5_25
## BB#22:
movq -320(%rbp), %rax
movq -336(%rbp), %rcx
movq -384(%rbp), %rdx
movq %rax, -256(%rbp)
movq %rcx, -264(%rbp)
movq %rdx, -272(%rbp)
movq -256(%rbp), %rax
movq (%rax), %rcx
movq 96(%rcx), %rcx
movq -264(%rbp), %rsi
movq -272(%rbp), %rdx
movq %rax, %rdi
callq *%rcx
cmpq -384(%rbp), %rax
je LBB5_24
## BB#23:
movq $0, -320(%rbp)
movq -320(%rbp), %rax
movq %rax, -312(%rbp)
jmp LBB5_26
LBB5_24:
jmp LBB5_25
LBB5_25:
movq -352(%rbp), %rax
movq %rax, -280(%rbp)
movq $0, -288(%rbp)
movq -280(%rbp), %rax
movq 24(%rax), %rcx
movq %rcx, -296(%rbp)
movq -288(%rbp), %rcx
movq %rcx, 24(%rax)
movq -320(%rbp), %rax
movq %rax, -312(%rbp)
LBB5_26:
movq -312(%rbp), %rax
addq $480, %rsp ## imm = 0x1E0
popq %rbp
retq
LBB5_27:
movq -416(%rbp), %rdi
callq __Unwind_Resume
LBB5_28:
Lfunc_end2:
.cfi_endproc
.section __TEXT,__gcc_except_tab
.p2align 2
GCC_except_table5:
Lexception2:
.byte 255 ## @LPStart Encoding = omit
.byte 155 ## @TType Encoding = indirect pcrel sdata4
.byte 41 ## @TType base offset
.byte 3 ## Call site Encoding = udata4
.byte 39 ## Call site table length
Lset31 = Lfunc_begin2-Lfunc_begin2 ## >> Call Site 1 <<
.long Lset31
Lset32 = Ltmp26-Lfunc_begin2 ## Call between Lfunc_begin2 and Ltmp26
.long Lset32
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
Lset33 = Ltmp26-Lfunc_begin2 ## >> Call Site 2 <<
.long Lset33
Lset34 = Ltmp27-Ltmp26 ## Call between Ltmp26 and Ltmp27
.long Lset34
Lset35 = Ltmp28-Lfunc_begin2 ## jumps to Ltmp28
.long Lset35
.byte 0 ## On action: cleanup
Lset36 = Ltmp27-Lfunc_begin2 ## >> Call Site 3 <<
.long Lset36
Lset37 = Lfunc_end2-Ltmp27 ## Call between Ltmp27 and Lfunc_end2
.long Lset37
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
.p2align 2
## -- End function
.section __TEXT,__text,regular,pure_instructions
.private_extern ___clang_call_terminate ## -- Begin function __clang_call_terminate
.globl ___clang_call_terminate
.weak_definition ___clang_call_terminate
.p2align 4, 0x90
___clang_call_terminate: ## @__clang_call_terminate
## BB#0:
pushq %rax
callq ___cxa_begin_catch
movq %rax, (%rsp) ## 8-byte Spill
callq __ZSt9terminatev
## -- End function
.globl __ZNSt3__111char_traitsIcE11eq_int_typeEii ## -- Begin function _ZNSt3__111char_traitsIcE11eq_int_typeEii
.weak_definition __ZNSt3__111char_traitsIcE11eq_int_typeEii
.p2align 4, 0x90
__ZNSt3__111char_traitsIcE11eq_int_typeEii: ## @_ZNSt3__111char_traitsIcE11eq_int_typeEii
.cfi_startproc
## BB#0:
pushq %rbp
Lcfi18:
.cfi_def_cfa_offset 16
Lcfi19:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi20:
.cfi_def_cfa_register %rbp
movl %edi, -4(%rbp)
movl %esi, -8(%rbp)
movl -4(%rbp), %esi
cmpl -8(%rbp), %esi
sete %al
andb $1, %al
movzbl %al, %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.globl __ZNSt3__111char_traitsIcE3eofEv ## -- Begin function _ZNSt3__111char_traitsIcE3eofEv
.weak_definition __ZNSt3__111char_traitsIcE3eofEv
.p2align 4, 0x90
__ZNSt3__111char_traitsIcE3eofEv: ## @_ZNSt3__111char_traitsIcE3eofEv
.cfi_startproc
## BB#0:
pushq %rbp
Lcfi21:
.cfi_def_cfa_offset 16
Lcfi22:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi23:
.cfi_def_cfa_register %rbp
movl $4294967295, %eax ## imm = 0xFFFFFFFF
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__const
.p2align 2 ## @_ZZ4mainE5array
l__ZZ4mainE5array:
.long 2700 ## 0xa8c
.long 2314 ## 0x90a
.long 8429 ## 0x20ed
.long 7726 ## 0x1e2e
.long 4817 ## 0x12d1
.long 8716 ## 0x220c
.long 3598 ## 0xe0e
.long 6255 ## 0x186f
.long 5056 ## 0x13c0
.long 8653 ## 0x21cd
.long 8571 ## 0x217b
.long 5028 ## 0x13a4
.long 1259 ## 0x4eb
.long 3315 ## 0xcf3
.long 2896 ## 0xb50
.long 1411 ## 0x583
.long 3847 ## 0xf07
.long 879 ## 0x36f
.long 7353 ## 0x1cb9
.long 8056 ## 0x1f78
.long 8765 ## 0x223d
.long 2344 ## 0x928
.long 6349 ## 0x18cd
.long 4156 ## 0x103c
.long 8350 ## 0x209e
.long 4164 ## 0x1044
.long 4783 ## 0x12af
.long 6800 ## 0x1a90
.long 8887 ## 0x22b7
.long 267 ## 0x10b
.long 4478 ## 0x117e
.long 6327 ## 0x18b7
.long 58 ## 0x3a
.long 7961 ## 0x1f19
.long 756 ## 0x2f4
.long 5654 ## 0x1616
.long 9546 ## 0x254a
.long 5132 ## 0x140c
.long 247 ## 0xf7
.long 5514 ## 0x158a
.long 7098 ## 0x1bba
.long 1156 ## 0x484
.long 795 ## 0x31b
.long 2502 ## 0x9c6
.long 367 ## 0x16f
.long 5330 ## 0x14d2
.long 2261 ## 0x8d5
.long 8692 ## 0x21f4
.long 2460 ## 0x99c
.long 4823 ## 0x12d7
.long 8968 ## 0x2308
.long 4976 ## 0x1370
.long 1929 ## 0x789
.long 1051 ## 0x41b
.long 9249 ## 0x2421
.long 9713 ## 0x25f1
.long 2803 ## 0xaf3
.long 1743 ## 0x6cf
.long 3681 ## 0xe61
.long 93 ## 0x5d
.long 4967 ## 0x1367
.long 2245 ## 0x8c5
.long 198 ## 0xc6
.long 896 ## 0x380
.long 6372 ## 0x18e4
.long 4413 ## 0x113d
.long 2615 ## 0xa37
.long 6130 ## 0x17f2
.long 5766 ## 0x1686
.long 5306 ## 0x14ba
.long 1236 ## 0x4d4
.long 888 ## 0x378
.long 8050 ## 0x1f72
.long 7080 ## 0x1ba8
.long 3460 ## 0xd84
.long 3473 ## 0xd91
.long 1720 ## 0x6b8
.long 3913 ## 0xf49
.long 3449 ## 0xd79
.long 8420 ## 0x20e4
.long 1814 ## 0x716
.long 1261 ## 0x4ed
.long 1368 ## 0x558
.long 167 ## 0xa7
.long 7938 ## 0x1f02
.long 4483 ## 0x1183
.long 4843 ## 0x12eb
.long 4682 ## 0x124a
.long 3301 ## 0xce5
.long 4038 ## 0xfc6
.long 709 ## 0x2c5
.long 8655 ## 0x21cf
.long 598 ## 0x256
.long 3857 ## 0xf11
.long 6285 ## 0x188d
.long 2961 ## 0xb91
.long 6817 ## 0x1aa1
.long 1031 ## 0x407
.long 4007 ## 0xfa7
.long 1392 ## 0x570
.long 5717 ## 0x1655
.long 5837 ## 0x16cd
.long 5695 ## 0x163f
.long 9511 ## 0x2527
.long 8891 ## 0x22bb
.long 7883 ## 0x1ecb
.long 7035 ## 0x1b7b
.long 2349 ## 0x92d
.long 5752 ## 0x1678
.long 3139 ## 0xc43
.long 2442 ## 0x98a
.long 3966 ## 0xf7e
.long 2007 ## 0x7d7
.long 9205 ## 0x23f5
.long 8434 ## 0x20f2
.long 5065 ## 0x13c9
.long 3795 ## 0xed3
.long 6890 ## 0x1aea
.long 2715 ## 0xa9b
.long 1 ## 0x1
.long 5106 ## 0x13f2
.long 5083 ## 0x13db
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.space 1
L_.str.1: ## @.str.1
.asciz "hello, world"
.subsections_via_symbols
Copy the code
.section __TEXT,__text,regular,pure_instructions
.macosx_version_min 10, 13
.globl _main ## -- Begin function main
.p2align 4, 0x90
_main: ## @main
.cfi_startproc
## BB#0:
pushq %rbp
Lcfi0:
.cfi_def_cfa_offset 16
Lcfi1:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi2:
.cfi_def_cfa_register %rbp
subq $592, %rsp ## imm = 0x250
leaq -528(%rbp), %rax
leaq l__ZZ4mainE5array(%rip), %rcx
movl $488, %edx ## imm = 0x1E8
## kill: %RDX<def> %EDX<kill>
movl $0, -36(%rbp)
movq %rax, %rsi
movq %rsi, %rdi
movq %rcx, %rsi
movq %rax, -576(%rbp) ## 8-byte Spill
callq _memcpy
movl $5330, -532(%rbp) ## imm = 0x14D2
movq -576(%rbp), %rax ## 8-byte Reload
movq %rax, -544(%rbp)
movq -544(%rbp), %rcx
movq %rcx, -32(%rbp)
movq -32(%rbp), %rcx
movq %rcx, -552(%rbp)
movq -544(%rbp), %rcx
movq %rcx, -8(%rbp)
movq -8(%rbp), %rcx
addq $488, %rcx ## imm = 0x1E8
movq %rcx, -560(%rbp)
LBB0_1: ## =>This Inner Loop Header: Depth=1
movq -552(%rbp), %rax
cmpq -560(%rbp), %rax
je LBB0_8
## BB#2: ## in Loop: Header=BB0_1 Depth=1
movq -552(%rbp), %rax
movq %rax, -568(%rbp)
movq -568(%rbp), %rax
cmpl $1000, (%rax) ## imm = 0x3E8
jle LBB0_6
## BB#3: ## in Loop: Header=BB0_1 Depth=1
movq __ZNSt3__14coutE@GOTPCREL(%rip), %rdi
leaq L_.str(%rip), %rsi
callq __ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc
movq -568(%rbp), %rsi
movl (%rsi), %ecx
cmpl -532(%rbp), %ecx
movq %rax, -584(%rbp) ## 8-byte Spill
jne LBB0_5
## BB#4: ## in Loop: Header=BB0_1 Depth=1
movq __ZNSt3__14coutE@GOTPCREL(%rip), %rdi
leaq L_.str.1(%rip), %rsi
callq __ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc
leaq __ZNSt3__14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_(%rip), %rsi
movq %rax, -16(%rbp)
movq %rsi, -24(%rbp)
movq -16(%rbp), %rdi
callq *-24(%rbp)
movq %rax, -592(%rbp) ## 8-byte Spill
LBB0_5: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_6
LBB0_6: ## in Loop: Header=BB0_1 Depth=1
jmp LBB0_7
LBB0_7: ## in Loop: Header=BB0_1 Depth=1
movq -552(%rbp), %rax
addq $4, %rax
movq %rax, -552(%rbp)
jmp LBB0_1
LBB0_8:
xorl %eax, %eax
addq $592, %rsp ## imm = 0x250
popq %rbp
retq
.cfi_endproc
## -- End function
.globl __ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc ## -- Begin function _ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc
.weak_definition __ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc
.p2align 4, 0x90
__ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc: ## @_ZNSt3__1lsINS_11char_traitsIcEEEERNS_13basic_ostreamIcT_EES6_PKc
.cfi_startproc
## BB#0:
pushq %rbp
Lcfi3:
.cfi_def_cfa_offset 16
Lcfi4:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi5:
.cfi_def_cfa_register %rbp
subq $32, %rsp
movq %rdi, -8(%rbp)
movq %rsi, -16(%rbp)
movq -8(%rbp), %rdi
movq -16(%rbp), %rsi
movq -16(%rbp), %rax
movq %rdi, -24(%rbp) ## 8-byte Spill
movq %rax, %rdi
movq %rsi, -32(%rbp) ## 8-byte Spill
callq __ZNSt3__111char_traitsIcE6lengthEPKc
movq -24(%rbp), %rdi ## 8-byte Reload
movq -32(%rbp), %rsi ## 8-byte Reload
movq %rax, %rdx
callq __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
addq $32, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.private_extern __ZNSt3__14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_ ## -- Begin function _ZNSt3__14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_
.globl __ZNSt3__14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_
.weak_definition __ZNSt3__14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_
.p2align 4, 0x90
__ZNSt3__14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_: ## @_ZNSt3__14endlIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_
Lfunc_begin0:
.cfi_startproc
.cfi_personality 155, ___gxx_personality_v0
.cfi_lsda 16, Lexception0
## BB#0:
pushq %rbp
Lcfi6:
.cfi_def_cfa_offset 16
Lcfi7:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi8:
.cfi_def_cfa_register %rbp
subq $144, %rsp
movq %rdi, -72(%rbp)
movq -72(%rbp), %rdi
movq (%rdi), %rax
movq -24(%rax), %rax
movq %rdi, %rcx
addq %rax, %rcx
movq %rcx, -32(%rbp)
movb $10, -33(%rbp)
movq -32(%rbp), %rsi
leaq -48(%rbp), %rax
movq %rdi, -80(%rbp) ## 8-byte Spill
movq %rax, %rdi
movq %rax, -88(%rbp) ## 8-byte Spill
callq __ZNKSt3__18ios_base6getlocEv
movq -88(%rbp), %rax ## 8-byte Reload
movq %rax, -24(%rbp)
movq -24(%rbp), %rdi
Ltmp0:
movq __ZNSt3__15ctypeIcE2idE@GOTPCREL(%rip), %rsi
callq __ZNKSt3__16locale9use_facetERNS0_2idE
Ltmp1:
movq %rax, -96(%rbp) ## 8-byte Spill
jmp LBB2_1
LBB2_1:
movb -33(%rbp), %al
movq -96(%rbp), %rcx ## 8-byte Reload
movq %rcx, -8(%rbp)
movb %al, -9(%rbp)
movq -8(%rbp), %rdx
movq (%rdx), %rsi
movq 56(%rsi), %rsi
movsbl -9(%rbp), %edi
Ltmp2:
movl %edi, -100(%rbp) ## 4-byte Spill
movq %rdx, %rdi
movl -100(%rbp), %r8d ## 4-byte Reload
movq %rsi, -112(%rbp) ## 8-byte Spill
movl %r8d, %esi
movq -112(%rbp), %rdx ## 8-byte Reload
callq *%rdx
Ltmp3:
movb %al, -113(%rbp) ## 1-byte Spill
jmp LBB2_3
LBB2_2:
Ltmp4:
leaq -48(%rbp), %rdi
movl %edx, %ecx
movq %rax, -56(%rbp)
movl %ecx, -60(%rbp)
callq __ZNSt3__16localeD1Ev
movq -56(%rbp), %rdi
callq __Unwind_Resume
LBB2_3:
leaq -48(%rbp), %rdi
callq __ZNSt3__16localeD1Ev
movq -80(%rbp), %rdi ## 8-byte Reload
movb -113(%rbp), %al ## 1-byte Reload
movsbl %al, %esi
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE3putEc
movq -72(%rbp), %rdi
movq %rax, -128(%rbp) ## 8-byte Spill
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5flushEv
movq -72(%rbp), %rdi
movq %rax, -136(%rbp) ## 8-byte Spill
movq %rdi, %rax
addq $144, %rsp
popq %rbp
retq
Lfunc_end0:
.cfi_endproc
.section __TEXT,__gcc_except_tab
.p2align 2
GCC_except_table2:
Lexception0:
.byte 255 ## @LPStart Encoding = omit
.byte 155 ## @TType Encoding = indirect pcrel sdata4
.byte 41 ## @TType base offset
.byte 3 ## Call site Encoding = udata4
.byte 39 ## Call site table length
Lset0 = Lfunc_begin0-Lfunc_begin0 ## >> Call Site 1 <<
.long Lset0
Lset1 = Ltmp0-Lfunc_begin0 ## Call between Lfunc_begin0 and Ltmp0
.long Lset1
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
Lset2 = Ltmp0-Lfunc_begin0 ## >> Call Site 2 <<
.long Lset2
Lset3 = Ltmp3-Ltmp0 ## Call between Ltmp0 and Ltmp3
.long Lset3
Lset4 = Ltmp4-Lfunc_begin0 ## jumps to Ltmp4
.long Lset4
.byte 0 ## On action: cleanup
Lset5 = Ltmp3-Lfunc_begin0 ## >> Call Site 3 <<
.long Lset5
Lset6 = Lfunc_end0-Ltmp3 ## Call between Ltmp3 and Lfunc_end0
.long Lset6
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
.p2align 2
## -- End function
.section __TEXT,__text,regular,pure_instructions
.globl __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m ## -- Begin function _ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
.weak_definition __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
.p2align 4, 0x90
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m: ## @_ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
Lfunc_begin1:
.cfi_startproc
.cfi_personality 155, ___gxx_personality_v0
.cfi_lsda 16, Lexception1
## BB#0:
pushq %rbp
Lcfi9:
.cfi_def_cfa_offset 16
Lcfi10:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi11:
.cfi_def_cfa_register %rbp
subq $384, %rsp ## imm = 0x180
movq %rdi, -184(%rbp)
movq %rsi, -192(%rbp)
movq %rdx, -200(%rbp)
movq -184(%rbp), %rsi
Ltmp5:
leaq -216(%rbp), %rdi
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_
Ltmp6:
jmp LBB3_1
LBB3_1:
leaq -216(%rbp), %rax
movq %rax, -176(%rbp)
movq -176(%rbp), %rax
movb (%rax), %cl
movb %cl, -249(%rbp) ## 1-byte Spill
## BB#2:
movb -249(%rbp), %al ## 1-byte Reload
testb $1, %al
jne LBB3_3
jmp LBB3_26
LBB3_3:
leaq -248(%rbp), %rax
movq -184(%rbp), %rcx
movq %rax, -160(%rbp)
movq %rcx, -168(%rbp)
movq -160(%rbp), %rax
movq -168(%rbp), %rcx
movq %rax, -144(%rbp)
movq %rcx, -152(%rbp)
movq -144(%rbp), %rax
movq -152(%rbp), %rcx
movq (%rcx), %rdx
movq -24(%rdx), %rdx
addq %rdx, %rcx
movq %rcx, -136(%rbp)
movq -136(%rbp), %rcx
movq %rcx, -128(%rbp)
movq -128(%rbp), %rcx
movq 40(%rcx), %rcx
movq %rcx, (%rax)
movq -192(%rbp), %rsi
movq -184(%rbp), %rax
movq (%rax), %rcx
movq -24(%rcx), %rcx
addq %rcx, %rax
movq %rax, -88(%rbp)
movq -88(%rbp), %rax
movl 8(%rax), %edi
movq %rsi, -264(%rbp) ## 8-byte Spill
movl %edi, -268(%rbp) ## 4-byte Spill
## BB#4:
movl -268(%rbp), %eax ## 4-byte Reload
andl $176, %eax
cmpl $32, %eax
jne LBB3_6
## BB#5:
movq -192(%rbp), %rax
addq -200(%rbp), %rax
movq %rax, -280(%rbp) ## 8-byte Spill
jmp LBB3_7
LBB3_6:
movq -192(%rbp), %rax
movq %rax, -280(%rbp) ## 8-byte Spill
LBB3_7:
movq -280(%rbp), %rax ## 8-byte Reload
movq -192(%rbp), %rcx
addq -200(%rbp), %rcx
movq -184(%rbp), %rdx
movq (%rdx), %rsi
movq -24(%rsi), %rsi
addq %rsi, %rdx
movq -184(%rbp), %rsi
movq (%rsi), %rdi
movq -24(%rdi), %rdi
addq %rdi, %rsi
movq %rsi, -72(%rbp)
movq -72(%rbp), %rsi
movq %rax, -288(%rbp) ## 8-byte Spill
movq %rcx, -296(%rbp) ## 8-byte Spill
movq %rdx, -304(%rbp) ## 8-byte Spill
movq %rsi, -312(%rbp) ## 8-byte Spill
callq __ZNSt3__111char_traitsIcE3eofEv
movq -312(%rbp), %rcx ## 8-byte Reload
movl 144(%rcx), %esi
movl %eax, %edi
callq __ZNSt3__111char_traitsIcE11eq_int_typeEii
testb $1, %al
jne LBB3_8
jmp LBB3_13
LBB3_8:
movq -312(%rbp), %rax ## 8-byte Reload
movq %rax, -32(%rbp)
movb $32, -33(%rbp)
movq -32(%rbp), %rsi
Ltmp8:
leaq -48(%rbp), %rdi
callq __ZNKSt3__18ios_base6getlocEv
Ltmp9:
jmp LBB3_9
LBB3_9:
leaq -48(%rbp), %rax
movq %rax, -24(%rbp)
movq -24(%rbp), %rdi
Ltmp10:
movq __ZNSt3__15ctypeIcE2idE@GOTPCREL(%rip), %rsi
callq __ZNKSt3__16locale9use_facetERNS0_2idE
Ltmp11:
movq %rax, -320(%rbp) ## 8-byte Spill
jmp LBB3_10
LBB3_10:
movb -33(%rbp), %al
movq -320(%rbp), %rcx ## 8-byte Reload
movq %rcx, -8(%rbp)
movb %al, -9(%rbp)
movq -8(%rbp), %rdx
movq (%rdx), %rsi
movq 56(%rsi), %rsi
movsbl -9(%rbp), %edi
Ltmp12:
movl %edi, -324(%rbp) ## 4-byte Spill
movq %rdx, %rdi
movl -324(%rbp), %r8d ## 4-byte Reload
movq %rsi, -336(%rbp) ## 8-byte Spill
movl %r8d, %esi
movq -336(%rbp), %rdx ## 8-byte Reload
callq *%rdx
Ltmp13:
movb %al, -337(%rbp) ## 1-byte Spill
jmp LBB3_12
LBB3_11:
Ltmp14:
movl %edx, %ecx
movq %rax, -56(%rbp)
movl %ecx, -60(%rbp)
leaq -48(%rbp), %rdi
callq __ZNSt3__16localeD1Ev
movq -56(%rbp), %rax
movl -60(%rbp), %ecx
movq %rax, -352(%rbp) ## 8-byte Spill
movl %ecx, -356(%rbp) ## 4-byte Spill
jmp LBB3_21
LBB3_12:
leaq -48(%rbp), %rdi
callq __ZNSt3__16localeD1Ev
movb -337(%rbp), %al ## 1-byte Reload
movsbl %al, %ecx
movq -312(%rbp), %rdi ## 8-byte Reload
movl %ecx, 144(%rdi)
LBB3_13:
movq -312(%rbp), %rax ## 8-byte Reload
movl 144(%rax), %ecx
movb %cl, %dl
movb %dl, -357(%rbp) ## 1-byte Spill
## BB#14:
movq -248(%rbp), %rdi
Ltmp15:
movb -357(%rbp), %al ## 1-byte Reload
movsbl %al, %r9d
movq -264(%rbp), %rsi ## 8-byte Reload
movq -288(%rbp), %rdx ## 8-byte Reload
movq -296(%rbp), %rcx ## 8-byte Reload
movq -304(%rbp), %r8 ## 8-byte Reload
callq __ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
Ltmp16:
movq %rax, -368(%rbp) ## 8-byte Spill
jmp LBB3_15
LBB3_15:
leaq -240(%rbp), %rax
movq -368(%rbp), %rcx ## 8-byte Reload
movq %rcx, -240(%rbp)
movq %rax, -80(%rbp)
movq -80(%rbp), %rax
cmpq $0, (%rax)
jne LBB3_25
## BB#16:
movq -184(%rbp), %rax
movq (%rax), %rcx
movq -24(%rcx), %rcx
addq %rcx, %rax
movq %rax, -112(%rbp)
movl $5, -116(%rbp)
movq -112(%rbp), %rax
movl -116(%rbp), %edx
movq %rax, -96(%rbp)
movl %edx, -100(%rbp)
movq -96(%rbp), %rax
movl 32(%rax), %edx
movl -100(%rbp), %esi
orl %esi, %edx
Ltmp17:
movq %rax, %rdi
movl %edx, %esi
callq __ZNSt3__18ios_base5clearEj
Ltmp18:
jmp LBB3_17
LBB3_17:
jmp LBB3_18
LBB3_18:
jmp LBB3_25
LBB3_19:
Ltmp7:
movl %edx, %ecx
movq %rax, -224(%rbp)
movl %ecx, -228(%rbp)
jmp LBB3_22
LBB3_20:
Ltmp19:
movl %edx, %ecx
movq %rax, -352(%rbp) ## 8-byte Spill
movl %ecx, -356(%rbp) ## 4-byte Spill
jmp LBB3_21
LBB3_21:
movl -356(%rbp), %eax ## 4-byte Reload
movq -352(%rbp), %rcx ## 8-byte Reload
leaq -216(%rbp), %rdi
movq %rcx, -224(%rbp)
movl %eax, -228(%rbp)
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev
LBB3_22:
movq -224(%rbp), %rdi
callq ___cxa_begin_catch
movq -184(%rbp), %rdi
movq (%rdi), %rcx
movq -24(%rcx), %rcx
addq %rcx, %rdi
Ltmp20:
movq %rax, -376(%rbp) ## 8-byte Spill
callq __ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv
Ltmp21:
jmp LBB3_23
LBB3_23:
callq ___cxa_end_catch
LBB3_24:
movq -184(%rbp), %rax
addq $384, %rsp ## imm = 0x180
popq %rbp
retq
LBB3_25:
jmp LBB3_26
LBB3_26:
leaq -216(%rbp), %rdi
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev
jmp LBB3_24
LBB3_27:
Ltmp22:
movl %edx, %ecx
movq %rax, -224(%rbp)
movl %ecx, -228(%rbp)
Ltmp23:
callq ___cxa_end_catch
Ltmp24:
jmp LBB3_28
LBB3_28:
jmp LBB3_29
LBB3_29:
movq -224(%rbp), %rdi
callq __Unwind_Resume
LBB3_30:
Ltmp25:
movl %edx, %ecx
movq %rax, %rdi
movl %ecx, -380(%rbp) ## 4-byte Spill
callq ___clang_call_terminate
Lfunc_end1:
.cfi_endproc
.section __TEXT,__gcc_except_tab
.p2align 2
GCC_except_table3:
Lexception1:
.byte 255 ## @LPStart Encoding = omit
.byte 155 ## @TType Encoding = indirect pcrel sdata4
.asciz "\201\201\200\200" ## @TType base offset
.byte 3 ## Call site Encoding = udata4
.byte 117 ## Call site table length
Lset7 = Ltmp5-Lfunc_begin1 ## >> Call Site 1 <<
.long Lset7
Lset8 = Ltmp6-Ltmp5 ## Call between Ltmp5 and Ltmp6
.long Lset8
Lset9 = Ltmp7-Lfunc_begin1 ## jumps to Ltmp7
.long Lset9
.byte 5 ## On action: 3
Lset10 = Ltmp8-Lfunc_begin1 ## >> Call Site 2 <<
.long Lset10
Lset11 = Ltmp9-Ltmp8 ## Call between Ltmp8 and Ltmp9
.long Lset11
Lset12 = Ltmp19-Lfunc_begin1 ## jumps to Ltmp19
.long Lset12
.byte 5 ## On action: 3
Lset13 = Ltmp10-Lfunc_begin1 ## >> Call Site 3 <<
.long Lset13
Lset14 = Ltmp13-Ltmp10 ## Call between Ltmp10 and Ltmp13
.long Lset14
Lset15 = Ltmp14-Lfunc_begin1 ## jumps to Ltmp14
.long Lset15
.byte 3 ## On action: 2
Lset16 = Ltmp15-Lfunc_begin1 ## >> Call Site 4 <<
.long Lset16
Lset17 = Ltmp18-Ltmp15 ## Call between Ltmp15 and Ltmp18
.long Lset17
Lset18 = Ltmp19-Lfunc_begin1 ## jumps to Ltmp19
.long Lset18
.byte 5 ## On action: 3
Lset19 = Ltmp18-Lfunc_begin1 ## >> Call Site 5 <<
.long Lset19
Lset20 = Ltmp20-Ltmp18 ## Call between Ltmp18 and Ltmp20
.long Lset20
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
Lset21 = Ltmp20-Lfunc_begin1 ## >> Call Site 6 <<
.long Lset21
Lset22 = Ltmp21-Ltmp20 ## Call between Ltmp20 and Ltmp21
.long Lset22
Lset23 = Ltmp22-Lfunc_begin1 ## jumps to Ltmp22
.long Lset23
.byte 0 ## On action: cleanup
Lset24 = Ltmp21-Lfunc_begin1 ## >> Call Site 7 <<
.long Lset24
Lset25 = Ltmp23-Ltmp21 ## Call between Ltmp21 and Ltmp23
.long Lset25
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
Lset26 = Ltmp23-Lfunc_begin1 ## >> Call Site 8 <<
.long Lset26
Lset27 = Ltmp24-Ltmp23 ## Call between Ltmp23 and Ltmp24
.long Lset27
Lset28 = Ltmp25-Lfunc_begin1 ## jumps to Ltmp25
.long Lset28
.byte 5 ## On action: 3
Lset29 = Ltmp24-Lfunc_begin1 ## >> Call Site 9 <<
.long Lset29
Lset30 = Lfunc_end1-Ltmp24 ## Call between Ltmp24 and Lfunc_end1
.long Lset30
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
.byte 0 ## >> Action Record 1 <<
## Cleanup
.byte 0 ## No further actions
.byte 1 ## >> Action Record 2 <<
## Catch TypeInfo 1
.byte 125 ## Continue to action 1
.byte 1 ## >> Action Record 3 <<
## Catch TypeInfo 1
.byte 0 ## No further actions
## >> Catch TypeInfos <<
.long 0 ## TypeInfo 1
.p2align 2
## -- End function
.section __TEXT,__text,regular,pure_instructions
.globl __ZNSt3__111char_traitsIcE6lengthEPKc ## -- Begin function _ZNSt3__111char_traitsIcE6lengthEPKc
.weak_definition __ZNSt3__111char_traitsIcE6lengthEPKc
.p2align 4, 0x90
__ZNSt3__111char_traitsIcE6lengthEPKc: ## @_ZNSt3__111char_traitsIcE6lengthEPKc
.cfi_startproc
## BB#0:
pushq %rbp
Lcfi12:
.cfi_def_cfa_offset 16
Lcfi13:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi14:
.cfi_def_cfa_register %rbp
subq $16, %rsp
movq %rdi, -8(%rbp)
movq -8(%rbp), %rdi
callq _strlen
addq $16, %rsp
popq %rbp
retq
.cfi_endproc
## -- End function
.private_extern __ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_ ## -- Begin function _ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
.globl __ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
.weak_definition __ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
.p2align 4, 0x90
__ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_: ## @_ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
Lfunc_begin2:
.cfi_startproc
.cfi_personality 155, ___gxx_personality_v0
.cfi_lsda 16, Lexception2
## BB#0:
pushq %rbp
Lcfi15:
.cfi_def_cfa_offset 16
Lcfi16:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi17:
.cfi_def_cfa_register %rbp
subq $480, %rsp ## imm = 0x1E0
movb %r9b, %al
movq %rdi, -320(%rbp)
movq %rsi, -328(%rbp)
movq %rdx, -336(%rbp)
movq %rcx, -344(%rbp)
movq %r8, -352(%rbp)
movb %al, -353(%rbp)
cmpq $0, -320(%rbp)
jne LBB5_2
## BB#1:
movq -320(%rbp), %rax
movq %rax, -312(%rbp)
jmp LBB5_26
LBB5_2:
movq -344(%rbp), %rax
movq -328(%rbp), %rcx
subq %rcx, %rax
movq %rax, -368(%rbp)
movq -352(%rbp), %rax
movq %rax, -304(%rbp)
movq -304(%rbp), %rax
movq 24(%rax), %rax
movq %rax, -376(%rbp)
movq -376(%rbp), %rax
cmpq -368(%rbp), %rax
jle LBB5_4
## BB#3:
movq -368(%rbp), %rax
movq -376(%rbp), %rcx
subq %rax, %rcx
movq %rcx, -376(%rbp)
jmp LBB5_5
LBB5_4:
movq $0, -376(%rbp)
LBB5_5:
movq -336(%rbp), %rax
movq -328(%rbp), %rcx
subq %rcx, %rax
movq %rax, -384(%rbp)
cmpq $0, -384(%rbp)
jle LBB5_9
## BB#6:
movq -320(%rbp), %rax
movq -328(%rbp), %rcx
movq -384(%rbp), %rdx
movq %rax, -232(%rbp)
movq %rcx, -240(%rbp)
movq %rdx, -248(%rbp)
movq -232(%rbp), %rax
movq (%rax), %rcx
movq 96(%rcx), %rcx
movq -240(%rbp), %rsi
movq -248(%rbp), %rdx
movq %rax, %rdi
callq *%rcx
cmpq -384(%rbp), %rax
je LBB5_8
## BB#7:
movq $0, -320(%rbp)
movq -320(%rbp), %rax
movq %rax, -312(%rbp)
jmp LBB5_26
LBB5_8:
jmp LBB5_9
LBB5_9:
cmpq $0, -376(%rbp)
jle LBB5_21
## BB#10:
xorl %esi, %esi
movl $24, %eax
movl %eax, %edx
leaq -408(%rbp), %rcx
movq -376(%rbp), %rdi
movb -353(%rbp), %r8b
movq %rcx, -208(%rbp)
movq %rdi, -216(%rbp)
movb %r8b, -217(%rbp)
movq -208(%rbp), %rcx
movq -216(%rbp), %rdi
movb -217(%rbp), %r8b
movq %rcx, -184(%rbp)
movq %rdi, -192(%rbp)
movb %r8b, -193(%rbp)
movq -184(%rbp), %rcx
movq %rcx, -176(%rbp)
movq -176(%rbp), %rdi
movq %rdi, -168(%rbp)
movq -168(%rbp), %rdi
movq %rdi, %r9
movq %r9, -160(%rbp)
movq -160(%rbp), %r9
movq %rdi, -432(%rbp) ## 8-byte Spill
movq %r9, %rdi
movq %rcx, -440(%rbp) ## 8-byte Spill
callq _memset
movq -432(%rbp), %rcx ## 8-byte Reload
movq %rcx, -152(%rbp)
movq -152(%rbp), %rcx
movq %rcx, -144(%rbp)
movq -192(%rbp), %rsi
movq -440(%rbp), %rdi ## 8-byte Reload
movsbl -193(%rbp), %edx
callq __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEmc
leaq -408(%rbp), %rcx
movq -320(%rbp), %rsi
movq %rcx, -136(%rbp)
movq -136(%rbp), %rcx
movq %rcx, -128(%rbp)
movq -128(%rbp), %rcx
movq %rcx, -120(%rbp)
movq -120(%rbp), %rdi
movq %rdi, -112(%rbp)
movq -112(%rbp), %rdi
movq %rdi, -104(%rbp)
movq -104(%rbp), %rdi
movzbl (%rdi), %eax
movl %eax, %edi
andq $1, %rdi
cmpq $0, %rdi
movq %rsi, -448(%rbp) ## 8-byte Spill
movq %rcx, -456(%rbp) ## 8-byte Spill
je LBB5_12
## BB#11:
movq -456(%rbp), %rax ## 8-byte Reload
movq %rax, -56(%rbp)
movq -56(%rbp), %rcx
movq %rcx, -48(%rbp)
movq -48(%rbp), %rcx
movq %rcx, -40(%rbp)
movq -40(%rbp), %rcx
movq 16(%rcx), %rcx
movq %rcx, -464(%rbp) ## 8-byte Spill
jmp LBB5_13
LBB5_12:
movq -456(%rbp), %rax ## 8-byte Reload
movq %rax, -96(%rbp)
movq -96(%rbp), %rcx
movq %rcx, -88(%rbp)
movq -88(%rbp), %rcx
movq %rcx, -80(%rbp)
movq -80(%rbp), %rcx
addq $1, %rcx
movq %rcx, -72(%rbp)
movq -72(%rbp), %rcx
movq %rcx, -64(%rbp)
movq -64(%rbp), %rcx
movq %rcx, -464(%rbp) ## 8-byte Spill
LBB5_13:
movq -464(%rbp), %rax ## 8-byte Reload
movq %rax, -32(%rbp)
movq -32(%rbp), %rax
movq -376(%rbp), %rcx
movq -448(%rbp), %rdx ## 8-byte Reload
movq %rdx, -8(%rbp)
movq %rax, -16(%rbp)
movq %rcx, -24(%rbp)
movq -8(%rbp), %rax
movq (%rax), %rcx
movq 96(%rcx), %rcx
movq -16(%rbp), %rsi
movq -24(%rbp), %rdx
Ltmp26:
movq %rax, %rdi
callq *%rcx
Ltmp27:
movq %rax, -472(%rbp) ## 8-byte Spill
jmp LBB5_14
LBB5_14:
jmp LBB5_15
LBB5_15:
movq -472(%rbp), %rax ## 8-byte Reload
cmpq -376(%rbp), %rax
je LBB5_18
## BB#16:
movq $0, -320(%rbp)
movq -320(%rbp), %rax
movq %rax, -312(%rbp)
movl $1, -424(%rbp)
jmp LBB5_19
LBB5_17:
Ltmp28:
leaq -408(%rbp), %rdi
movl %edx, %ecx
movq %rax, -416(%rbp)
movl %ecx, -420(%rbp)
callq __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev
jmp LBB5_27
LBB5_18:
movl $0, -424(%rbp)
LBB5_19:
leaq -408(%rbp), %rdi
callq __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEED1Ev
movl -424(%rbp), %eax
testl %eax, %eax
movl %eax, -476(%rbp) ## 4-byte Spill
je LBB5_20
jmp LBB5_29
LBB5_29:
movl -476(%rbp), %eax ## 4-byte Reload
subl $1, %eax
movl %eax, -480(%rbp) ## 4-byte Spill
je LBB5_26
jmp LBB5_28
LBB5_20:
jmp LBB5_21
LBB5_21:
movq -344(%rbp), %rax
movq -336(%rbp), %rcx
subq %rcx, %rax
movq %rax, -384(%rbp)
cmpq $0, -384(%rbp)
jle LBB5_25
## BB#22:
movq -320(%rbp), %rax
movq -336(%rbp), %rcx
movq -384(%rbp), %rdx
movq %rax, -256(%rbp)
movq %rcx, -264(%rbp)
movq %rdx, -272(%rbp)
movq -256(%rbp), %rax
movq (%rax), %rcx
movq 96(%rcx), %rcx
movq -264(%rbp), %rsi
movq -272(%rbp), %rdx
movq %rax, %rdi
callq *%rcx
cmpq -384(%rbp), %rax
je LBB5_24
## BB#23:
movq $0, -320(%rbp)
movq -320(%rbp), %rax
movq %rax, -312(%rbp)
jmp LBB5_26
LBB5_24:
jmp LBB5_25
LBB5_25:
movq -352(%rbp), %rax
movq %rax, -280(%rbp)
movq $0, -288(%rbp)
movq -280(%rbp), %rax
movq 24(%rax), %rcx
movq %rcx, -296(%rbp)
movq -288(%rbp), %rcx
movq %rcx, 24(%rax)
movq -320(%rbp), %rax
movq %rax, -312(%rbp)
LBB5_26:
movq -312(%rbp), %rax
addq $480, %rsp ## imm = 0x1E0
popq %rbp
retq
LBB5_27:
movq -416(%rbp), %rdi
callq __Unwind_Resume
LBB5_28:
Lfunc_end2:
.cfi_endproc
.section __TEXT,__gcc_except_tab
.p2align 2
GCC_except_table5:
Lexception2:
.byte 255 ## @LPStart Encoding = omit
.byte 155 ## @TType Encoding = indirect pcrel sdata4
.byte 41 ## @TType base offset
.byte 3 ## Call site Encoding = udata4
.byte 39 ## Call site table length
Lset31 = Lfunc_begin2-Lfunc_begin2 ## >> Call Site 1 <<
.long Lset31
Lset32 = Ltmp26-Lfunc_begin2 ## Call between Lfunc_begin2 and Ltmp26
.long Lset32
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
Lset33 = Ltmp26-Lfunc_begin2 ## >> Call Site 2 <<
.long Lset33
Lset34 = Ltmp27-Ltmp26 ## Call between Ltmp26 and Ltmp27
.long Lset34
Lset35 = Ltmp28-Lfunc_begin2 ## jumps to Ltmp28
.long Lset35
.byte 0 ## On action: cleanup
Lset36 = Ltmp27-Lfunc_begin2 ## >> Call Site 3 <<
.long Lset36
Lset37 = Lfunc_end2-Ltmp27 ## Call between Ltmp27 and Lfunc_end2
.long Lset37
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
.p2align 2
## -- End function
.section __TEXT,__text,regular,pure_instructions
.private_extern ___clang_call_terminate ## -- Begin function __clang_call_terminate
.globl ___clang_call_terminate
.weak_definition ___clang_call_terminate
.p2align 4, 0x90
___clang_call_terminate: ## @__clang_call_terminate
## BB#0:
pushq %rax
callq ___cxa_begin_catch
movq %rax, (%rsp) ## 8-byte Spill
callq __ZSt9terminatev
## -- End function
.globl __ZNSt3__111char_traitsIcE11eq_int_typeEii ## -- Begin function _ZNSt3__111char_traitsIcE11eq_int_typeEii
.weak_definition __ZNSt3__111char_traitsIcE11eq_int_typeEii
.p2align 4, 0x90
__ZNSt3__111char_traitsIcE11eq_int_typeEii: ## @_ZNSt3__111char_traitsIcE11eq_int_typeEii
.cfi_startproc
## BB#0:
pushq %rbp
Lcfi18:
.cfi_def_cfa_offset 16
Lcfi19:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi20:
.cfi_def_cfa_register %rbp
movl %edi, -4(%rbp)
movl %esi, -8(%rbp)
movl -4(%rbp), %esi
cmpl -8(%rbp), %esi
sete %al
andb $1, %al
movzbl %al, %eax
popq %rbp
retq
.cfi_endproc
## -- End function
.globl __ZNSt3__111char_traitsIcE3eofEv ## -- Begin function _ZNSt3__111char_traitsIcE3eofEv
.weak_definition __ZNSt3__111char_traitsIcE3eofEv
.p2align 4, 0x90
__ZNSt3__111char_traitsIcE3eofEv: ## @_ZNSt3__111char_traitsIcE3eofEv
.cfi_startproc
## BB#0:
pushq %rbp
Lcfi21:
.cfi_def_cfa_offset 16
Lcfi22:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi23:
.cfi_def_cfa_register %rbp
movl $4294967295, %eax ## imm = 0xFFFFFFFF
popq %rbp
retq
.cfi_endproc
## -- End function
.section __TEXT,__const
.p2align 2 ## @_ZZ4mainE5array
l__ZZ4mainE5array:
.long 2700 ## 0xa8c
.long 2314 ## 0x90a
.long 8429 ## 0x20ed
.long 7726 ## 0x1e2e
.long 4817 ## 0x12d1
.long 8716 ## 0x220c
.long 3598 ## 0xe0e
.long 6255 ## 0x186f
.long 5056 ## 0x13c0
.long 8653 ## 0x21cd
.long 8571 ## 0x217b
.long 5028 ## 0x13a4
.long 1259 ## 0x4eb
.long 3315 ## 0xcf3
.long 2896 ## 0xb50
.long 1411 ## 0x583
.long 3847 ## 0xf07
.long 879 ## 0x36f
.long 7353 ## 0x1cb9
.long 8056 ## 0x1f78
.long 8765 ## 0x223d
.long 2344 ## 0x928
.long 6349 ## 0x18cd
.long 4156 ## 0x103c
.long 8350 ## 0x209e
.long 4164 ## 0x1044
.long 4783 ## 0x12af
.long 6800 ## 0x1a90
.long 8887 ## 0x22b7
.long 267 ## 0x10b
.long 4478 ## 0x117e
.long 6327 ## 0x18b7
.long 58 ## 0x3a
.long 7961 ## 0x1f19
.long 756 ## 0x2f4
.long 5654 ## 0x1616
.long 9546 ## 0x254a
.long 5132 ## 0x140c
.long 247 ## 0xf7
.long 5514 ## 0x158a
.long 7098 ## 0x1bba
.long 1156 ## 0x484
.long 795 ## 0x31b
.long 2502 ## 0x9c6
.long 367 ## 0x16f
.long 5330 ## 0x14d2
.long 2261 ## 0x8d5
.long 8692 ## 0x21f4
.long 2460 ## 0x99c
.long 4823 ## 0x12d7
.long 8968 ## 0x2308
.long 4976 ## 0x1370
.long 1929 ## 0x789
.long 1051 ## 0x41b
.long 9249 ## 0x2421
.long 9713 ## 0x25f1
.long 2803 ## 0xaf3
.long 1743 ## 0x6cf
.long 3681 ## 0xe61
.long 93 ## 0x5d
.long 4967 ## 0x1367
.long 2245 ## 0x8c5
.long 198 ## 0xc6
.long 896 ## 0x380
.long 6372 ## 0x18e4
.long 4413 ## 0x113d
.long 2615 ## 0xa37
.long 6130 ## 0x17f2
.long 5766 ## 0x1686
.long 5306 ## 0x14ba
.long 1236 ## 0x4d4
.long 888 ## 0x378
.long 8050 ## 0x1f72
.long 7080 ## 0x1ba8
.long 3460 ## 0xd84
.long 3473 ## 0xd91
.long 1720 ## 0x6b8
.long 3913 ## 0xf49
.long 3449 ## 0xd79
.long 8420 ## 0x20e4
.long 1814 ## 0x716
.long 1261 ## 0x4ed
.long 1368 ## 0x558
.long 167 ## 0xa7
.long 7938 ## 0x1f02
.long 4483 ## 0x1183
.long 4843 ## 0x12eb
.long 4682 ## 0x124a
.long 3301 ## 0xce5
.long 4038 ## 0xfc6
.long 709 ## 0x2c5
.long 8655 ## 0x21cf
.long 598 ## 0x256
.long 3857 ## 0xf11
.long 6285 ## 0x188d
.long 2961 ## 0xb91
.long 6817 ## 0x1aa1
.long 1031 ## 0x407
.long 4007 ## 0xfa7
.long 1392 ## 0x570
.long 5717 ## 0x1655
.long 5837 ## 0x16cd
.long 5695 ## 0x163f
.long 9511 ## 0x2527
.long 8891 ## 0x22bb
.long 7883 ## 0x1ecb
.long 7035 ## 0x1b7b
.long 2349 ## 0x92d
.long 5752 ## 0x1678
.long 3139 ## 0xc43
.long 2442 ## 0x98a
.long 3966 ## 0xf7e
.long 2007 ## 0x7d7
.long 9205 ## 0x23f5
.long 8434 ## 0x20f2
.long 5065 ## 0x13c9
.long 3795 ## 0xed3
.long 6890 ## 0x1aea
.long 2715 ## 0xa9b
.long 1 ## 0x1
.long 5106 ## 0x13f2
.long 5083 ## 0x13db
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.space 1
L_.str.1: ## @.str.1
.asciz "hello, world"
.subsections_via_symbols
Copy the code
Because the assembly is so long, we can just focus on the CMPL $1000, (%rax) line comparison, which appears twice in the first copy and once in the second, and the compiler perfectly translates the code. In production, however, we don’t release code like this, and O3 optimizations are common. So when we turn optimization on, the assembly code looks like this:
.section __TEXT,__text,regular,pure_instructions
.macosx_version_min 10, 13
.globl _main ## -- Begin function main
.p2align 4, 0x90
_main: ## @main
Lfunc_begin0:
.cfi_startproc
.cfi_personality 155, ___gxx_personality_v0
.cfi_lsda 16, Lexception0
## BB#0:
pushq %rbp
Lcfi0:
.cfi_def_cfa_offset 16
Lcfi1:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi2:
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $504, %rsp ## imm = 0x1F8
Lcfi3:
.cfi_offset %rbx, -56
Lcfi4:
.cfi_offset %r12, -48
Lcfi5:
.cfi_offset %r13, -40
Lcfi6:
.cfi_offset %r14, -32
Lcfi7:
.cfi_offset %r15, -24
leaq l__ZZ4mainE5array(%rip), %rsi
leaq -536(%rbp), %rdi
movl $488, %edx ## imm = 0x1E8
callq _memcpy
movl $2700, %eax ## imm = 0xA8C
movl $4, %ebx
movq __ZNSt3__14coutE@GOTPCREL(%rip), %r14
leaq L_.str(%rip), %r15
cmpl $1001, %eax ## imm = 0x3E9
jl LBB0_3
jmp LBB0_2
.p2align 4, 0x90
LBB0_4: ## in Loop: Header=BB0_3 Depth=1
movl -536(%rbp,%rbx), %eax
addq $4, %rbx
cmpl $1001, %eax ## imm = 0x3E9
jl LBB0_3
LBB0_2:
xorl %edx, %edx
movq %r14, %rdi
movq %r15, %rsi
callq __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
LBB0_3: ## =>This Inner Loop Header: Depth=1
cmpq $488, %rbx ## imm = 0x1E8
jne LBB0_4
## BB#5:
xorl %r15d, %r15d
leaq -48(%rbp), %r13
movq __ZNSt3__15ctypeIcE2idE@GOTPCREL(%rip), %r12
.p2align 4, 0x90
LBB0_6: ## =>This Inner Loop Header: Depth=1
cmpl $5330, -536(%rbp,%r15) ## imm = 0x14D2
jne LBB0_10
## BB#7: ## in Loop: Header=BB0_6 Depth=1
movl $12, %edx
movq __ZNSt3__14coutE@GOTPCREL(%rip), %rdi
leaq L_.str.1(%rip), %rsi
callq __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
movq %rax, %rbx
movq (%rbx), %rax
movq -24(%rax), %rsi
addq %rbx, %rsi
movq %r13, %rdi
callq __ZNKSt3__18ios_base6getlocEv
Ltmp0:
movq %r13, %rdi
movq %r12, %rsi
callq __ZNKSt3__16locale9use_facetERNS0_2idE
Ltmp1:
## BB#8: ## in Loop: Header=BB0_6 Depth=1
movq (%rax), %rcx
Ltmp2:
movl $10, %esi
movq %rax, %rdi
callq *56(%rcx)
movl %eax, %r14d
Ltmp3:
## BB#9: ## in Loop: Header=BB0_6 Depth=1
movq %r13, %rdi
callq __ZNSt3__16localeD1Ev
movsbl %r14b, %esi
movq %rbx, %rdi
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE3putEc
movq %rbx, %rdi
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5flushEv
LBB0_10: ## in Loop: Header=BB0_6 Depth=1
addq $4, %r15
cmpq $488, %r15 ## imm = 0x1E8
jne LBB0_6
## BB#11:
xorl %eax, %eax
addq $504, %rsp ## imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
LBB0_12:
Ltmp4:
movq %rax, %rbx
leaq -48(%rbp), %rdi
callq __ZNSt3__16localeD1Ev
movq %rbx, %rdi
callq __Unwind_Resume
Lfunc_end0:
.cfi_endproc
.section __TEXT,__gcc_except_tab
.p2align 2
GCC_except_table0:
Lexception0:
.byte 255 ## @LPStart Encoding = omit
.byte 155 ## @TType Encoding = indirect pcrel sdata4
.byte 41 ## @TType base offset
.byte 3 ## Call site Encoding = udata4
.byte 39 ## Call site table length
Lset0 = Lfunc_begin0-Lfunc_begin0 ## >> Call Site 1 <<
.long Lset0
Lset1 = Ltmp0-Lfunc_begin0 ## Call between Lfunc_begin0 and Ltmp0
.long Lset1
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
Lset2 = Ltmp0-Lfunc_begin0 ## >> Call Site 2 <<
.long Lset2
Lset3 = Ltmp3-Ltmp0 ## Call between Ltmp0 and Ltmp3
.long Lset3
Lset4 = Ltmp4-Lfunc_begin0 ## jumps to Ltmp4
.long Lset4
.byte 0 ## On action: cleanup
Lset5 = Ltmp3-Lfunc_begin0 ## >> Call Site 3 <<
.long Lset5
Lset6 = Lfunc_end0-Ltmp3 ## Call between Ltmp3 and Lfunc_end0
.long Lset6
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
.p2align 2
## -- End function
.section __TEXT,__text,regular,pure_instructions
.globl __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m ## -- Begin function _ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
.weak_def_can_be_hidden __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
.p2align 4, 0x90
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m: ## @_ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
Lfunc_begin1:
.cfi_startproc
.cfi_personality 155, ___gxx_personality_v0
.cfi_lsda 16, Lexception1
## BB#0:
pushq %rbp
Lcfi8:
.cfi_def_cfa_offset 16
Lcfi9:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi10:
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $40, %rsp
Lcfi11:
.cfi_offset %rbx, -56
Lcfi12:
.cfi_offset %r12, -48
Lcfi13:
.cfi_offset %r13, -40
Lcfi14:
.cfi_offset %r14, -32
Lcfi15:
.cfi_offset %r15, -24
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
Ltmp5:
leaq -80(%rbp), %rdi
movq %rbx, %rsi
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_
Ltmp6:
## BB#1:
cmpb $0, -80(%rbp)
je LBB1_10
## BB#2:
movq (%rbx), %rax
movq -24(%rax), %rax
leaq (%rbx,%rax), %r12
movq 40(%rbx,%rax), %rdi
movl 8(%rbx,%rax), %r13d
movl 144(%rbx,%rax), %eax
cmpl $-1, %eax
jne LBB1_7
## BB#3:
Ltmp8:
movq %rdi, -64(%rbp) ## 8-byte Spill
leaq -56(%rbp), %rdi
movq %r12, %rsi
callq __ZNKSt3__18ios_base6getlocEv
Ltmp9:
## BB#4:
Ltmp10:
movq __ZNSt3__15ctypeIcE2idE@GOTPCREL(%rip), %rsi
leaq -56(%rbp), %rdi
callq __ZNKSt3__16locale9use_facetERNS0_2idE
Ltmp11:
## BB#5:
movq (%rax), %rcx
Ltmp12:
movl $32, %esi
movq %rax, %rdi
callq *56(%rcx)
movb %al, -41(%rbp) ## 1-byte Spill
Ltmp13:
## BB#6:
leaq -56(%rbp), %rdi
callq __ZNSt3__16localeD1Ev
movsbl -41(%rbp), %eax ## 1-byte Folded Reload
movl %eax, 144(%r12)
movq -64(%rbp), %rdi ## 8-byte Reload
LBB1_7:
addq %r15, %r14
andl $176, %r13d
cmpl $32, %r13d
movq %r15, %rdx
cmoveq %r14, %rdx
Ltmp15:
movsbl %al, %r9d
movq %r15, %rsi
movq %r14, %rcx
movq %r12, %r8
callq __ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
Ltmp16:
## BB#8:
testq %rax, %rax
jne LBB1_10
## BB#9:
movq (%rbx), %rax
movq -24(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 32(%rbx,%rax), %esi
orl $5, %esi
Ltmp18:
callq __ZNSt3__18ios_base5clearEj
Ltmp19:
LBB1_10:
leaq -80(%rbp), %rdi
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev
LBB1_11:
movq %rbx, %rax
addq $40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
LBB1_12:
Ltmp20:
jmp LBB1_15
LBB1_13:
Ltmp14:
movq %rax, %r14
leaq -56(%rbp), %rdi
callq __ZNSt3__16localeD1Ev
jmp LBB1_16
LBB1_14:
Ltmp17:
LBB1_15:
movq %rax, %r14
LBB1_16:
leaq -80(%rbp), %rdi
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev
jmp LBB1_18
LBB1_17:
Ltmp7:
movq %rax, %r14
LBB1_18:
movq %r14, %rdi
callq ___cxa_begin_catch
movq (%rbx), %rax
movq %rbx, %rdi
addq -24(%rax), %rdi
Ltmp21:
callq __ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv
Ltmp22:
## BB#19:
callq ___cxa_end_catch
jmp LBB1_11
LBB1_20:
Ltmp23:
movq %rax, %rbx
Ltmp24:
callq ___cxa_end_catch
Ltmp25:
## BB#21:
movq %rbx, %rdi
callq __Unwind_Resume
LBB1_22:
Ltmp26:
movq %rax, %rdi
callq ___clang_call_terminate
Lfunc_end1:
.cfi_endproc
.section __TEXT,__gcc_except_tab
.p2align 2
GCC_except_table1:
Lexception1:
.byte 255 ## @LPStart Encoding = omit
.byte 155 ## @TType Encoding = indirect pcrel sdata4
.asciz "\213\201" ## @TType base offset
.byte 3 ## Call site Encoding = udata4
.ascii "\202\001" ## Call site table length
Lset7 = Ltmp5-Lfunc_begin1 ## >> Call Site 1 <<
.long Lset7
Lset8 = Ltmp6-Ltmp5 ## Call between Ltmp5 and Ltmp6
.long Lset8
Lset9 = Ltmp7-Lfunc_begin1 ## jumps to Ltmp7
.long Lset9
.byte 1 ## On action: 1
Lset10 = Ltmp8-Lfunc_begin1 ## >> Call Site 2 <<
.long Lset10
Lset11 = Ltmp9-Ltmp8 ## Call between Ltmp8 and Ltmp9
.long Lset11
Lset12 = Ltmp17-Lfunc_begin1 ## jumps to Ltmp17
.long Lset12
.byte 1 ## On action: 1
Lset13 = Ltmp10-Lfunc_begin1 ## >> Call Site 3 <<
.long Lset13
Lset14 = Ltmp13-Ltmp10 ## Call between Ltmp10 and Ltmp13
.long Lset14
Lset15 = Ltmp14-Lfunc_begin1 ## jumps to Ltmp14
.long Lset15
.byte 1 ## On action: 1
Lset16 = Ltmp15-Lfunc_begin1 ## >> Call Site 4 <<
.long Lset16
Lset17 = Ltmp16-Ltmp15 ## Call between Ltmp15 and Ltmp16
.long Lset17
Lset18 = Ltmp17-Lfunc_begin1 ## jumps to Ltmp17
.long Lset18
.byte 1 ## On action: 1
Lset19 = Ltmp18-Lfunc_begin1 ## >> Call Site 5 <<
.long Lset19
Lset20 = Ltmp19-Ltmp18 ## Call between Ltmp18 and Ltmp19
.long Lset20
Lset21 = Ltmp20-Lfunc_begin1 ## jumps to Ltmp20
.long Lset21
.byte 1 ## On action: 1
Lset22 = Ltmp19-Lfunc_begin1 ## >> Call Site 6 <<
.long Lset22
Lset23 = Ltmp21-Ltmp19 ## Call between Ltmp19 and Ltmp21
.long Lset23
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
Lset24 = Ltmp21-Lfunc_begin1 ## >> Call Site 7 <<
.long Lset24
Lset25 = Ltmp22-Ltmp21 ## Call between Ltmp21 and Ltmp22
.long Lset25
Lset26 = Ltmp23-Lfunc_begin1 ## jumps to Ltmp23
.long Lset26
.byte 0 ## On action: cleanup
Lset27 = Ltmp22-Lfunc_begin1 ## >> Call Site 8 <<
.long Lset27
Lset28 = Ltmp24-Ltmp22 ## Call between Ltmp22 and Ltmp24
.long Lset28
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
Lset29 = Ltmp24-Lfunc_begin1 ## >> Call Site 9 <<
.long Lset29
Lset30 = Ltmp25-Ltmp24 ## Call between Ltmp24 and Ltmp25
.long Lset30
Lset31 = Ltmp26-Lfunc_begin1 ## jumps to Ltmp26
.long Lset31
.byte 1 ## On action: 1
Lset32 = Ltmp25-Lfunc_begin1 ## >> Call Site 10 <<
.long Lset32
Lset33 = Lfunc_end1-Ltmp25 ## Call between Ltmp25 and Lfunc_end1
.long Lset33
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
.byte 1 ## >> Action Record 1 <<
## Catch TypeInfo 1
.byte 0 ## No further actions
## >> Catch TypeInfos <<
.long 0 ## TypeInfo 1
.p2align 2
## -- End function
.section __TEXT,__text,regular,pure_instructions
.private_extern __ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_ ## -- Begin function _ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
.globl __ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
.weak_def_can_be_hidden __ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
.p2align 4, 0x90
__ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_: ## @_ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
Lfunc_begin2:
.cfi_startproc
.cfi_personality 155, ___gxx_personality_v0
.cfi_lsda 16, Lexception2
## BB#0:
pushq %rbp
Lcfi16:
.cfi_def_cfa_offset 16
Lcfi17:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi18:
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $72, %rsp
Lcfi19:
.cfi_offset %rbx, -56
Lcfi20:
.cfi_offset %r12, -48
Lcfi21:
.cfi_offset %r13, -40
Lcfi22:
.cfi_offset %r14, -32
Lcfi23:
.cfi_offset %r15, -24
movq %r8, %r14
movq %rcx, %r12
movq %rdi, %r13
testq %r13, %r13
je LBB2_17
## BB#1:
movl %r9d, -44(%rbp) ## 4-byte Spill
movq %r12, %rax
subq %rsi, %rax
movq 24(%r14), %rcx
xorl %r15d, %r15d
subq %rax, %rcx
cmovgq %rcx, %r15
movq %rdx, -104(%rbp) ## 8-byte Spill
movq %rdx, %rbx
subq %rsi, %rbx
testq %rbx, %rbx
jle LBB2_3
## BB#2:
movq (%r13), %rax
movq %r13, %rdi
movq %rbx, %rdx
callq *96(%rax)
cmpq %rbx, %rax
jne LBB2_17
LBB2_3:
testq %r15, %r15
jle LBB2_13
## BB#4:
movq %r12, -88(%rbp) ## 8-byte Spill
movq %r14, -96(%rbp) ## 8-byte Spill
xorps %xmm0, %xmm0
movaps %xmm0, -80(%rbp)
movq $0, -64(%rbp)
cmpq $23, %r15
jae LBB2_8
## BB#5:
movl %r15d, %eax
addb %al, %al
movb %al, -80(%rbp)
leaq -79(%rbp), %r14
movq %r14, %r12
jmp LBB2_9
LBB2_8:
leaq 16(%r15), %rbx
andq $-16, %rbx
movq %rbx, %rdi
callq __Znwm
movq %rax, %r12
movq %r12, -64(%rbp)
orq $1, %rbx
movq %rbx, -80(%rbp)
movq %r15, -72(%rbp)
leaq -79(%rbp), %r14
LBB2_9:
movl -44(%rbp), %eax ## 4-byte Reload
movzbl %al, %esi
movq %r12, %rdi
movq %r15, %rdx
callq _memset
movb $0, (%r12,%r15)
testb $1, -80(%rbp)
cmovneq -64(%rbp), %r14
movq (%r13), %rax
Ltmp27:
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq *96(%rax)
movq %rax, %rbx
Ltmp28:
## BB#10:
testb $1, -80(%rbp)
movq -96(%rbp), %r14 ## 8-byte Reload
movq -88(%rbp), %r12 ## 8-byte Reload
je LBB2_12
## BB#11:
movq -64(%rbp), %rdi
callq __ZdlPv
LBB2_12:
cmpq %r15, %rbx
jne LBB2_17
LBB2_13:
movq -104(%rbp), %rsi ## 8-byte Reload
subq %rsi, %r12
testq %r12, %r12
jle LBB2_15
## BB#14:
movq (%r13), %rax
movq %r13, %rdi
movq %r12, %rdx
callq *96(%rax)
cmpq %r12, %rax
jne LBB2_17
LBB2_15:
movq $0, 24(%r14)
jmp LBB2_18
LBB2_17:
xorl %r13d, %r13d
LBB2_18:
movq %r13, %rax
addq $72, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
LBB2_19:
Ltmp29:
movq %rax, %rbx
testb $1, -80(%rbp)
je LBB2_21
## BB#20:
movq -64(%rbp), %rdi
callq __ZdlPv
LBB2_21:
movq %rbx, %rdi
callq __Unwind_Resume
Lfunc_end2:
.cfi_endproc
.section __TEXT,__gcc_except_tab
.p2align 2
GCC_except_table2:
Lexception2:
.byte 255 ## @LPStart Encoding = omit
.byte 155 ## @TType Encoding = indirect pcrel sdata4
.byte 41 ## @TType base offset
.byte 3 ## Call site Encoding = udata4
.byte 39 ## Call site table length
Lset34 = Lfunc_begin2-Lfunc_begin2 ## >> Call Site 1 <<
.long Lset34
Lset35 = Ltmp27-Lfunc_begin2 ## Call between Lfunc_begin2 and Ltmp27
.long Lset35
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
Lset36 = Ltmp27-Lfunc_begin2 ## >> Call Site 2 <<
.long Lset36
Lset37 = Ltmp28-Ltmp27 ## Call between Ltmp27 and Ltmp28
.long Lset37
Lset38 = Ltmp29-Lfunc_begin2 ## jumps to Ltmp29
.long Lset38
.byte 0 ## On action: cleanup
Lset39 = Ltmp28-Lfunc_begin2 ## >> Call Site 3 <<
.long Lset39
Lset40 = Lfunc_end2-Ltmp28 ## Call between Ltmp28 and Lfunc_end2
.long Lset40
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
.p2align 2
## -- End function
.section __TEXT,__text,regular,pure_instructions
.private_extern ___clang_call_terminate ## -- Begin function __clang_call_terminate
.globl ___clang_call_terminate
.weak_def_can_be_hidden ___clang_call_terminate
.p2align 4, 0x90
___clang_call_terminate: ## @__clang_call_terminate
## BB#0:
pushq %rax
callq ___cxa_begin_catch
callq __ZSt9terminatev
## -- End function
.section __TEXT,__const
.p2align 2 ## @_ZZ4mainE5array
l__ZZ4mainE5array:
.long 2700 ## 0xa8c
.long 2314 ## 0x90a
.long 8429 ## 0x20ed
.long 7726 ## 0x1e2e
.long 4817 ## 0x12d1
.long 8716 ## 0x220c
.long 3598 ## 0xe0e
.long 6255 ## 0x186f
.long 5056 ## 0x13c0
.long 8653 ## 0x21cd
.long 8571 ## 0x217b
.long 5028 ## 0x13a4
.long 1259 ## 0x4eb
.long 3315 ## 0xcf3
.long 2896 ## 0xb50
.long 1411 ## 0x583
.long 3847 ## 0xf07
.long 879 ## 0x36f
.long 7353 ## 0x1cb9
.long 8056 ## 0x1f78
.long 8765 ## 0x223d
.long 2344 ## 0x928
.long 6349 ## 0x18cd
.long 4156 ## 0x103c
.long 8350 ## 0x209e
.long 4164 ## 0x1044
.long 4783 ## 0x12af
.long 6800 ## 0x1a90
.long 8887 ## 0x22b7
.long 267 ## 0x10b
.long 4478 ## 0x117e
.long 6327 ## 0x18b7
.long 58 ## 0x3a
.long 7961 ## 0x1f19
.long 756 ## 0x2f4
.long 5654 ## 0x1616
.long 9546 ## 0x254a
.long 5132 ## 0x140c
.long 247 ## 0xf7
.long 5514 ## 0x158a
.long 7098 ## 0x1bba
.long 1156 ## 0x484
.long 795 ## 0x31b
.long 2502 ## 0x9c6
.long 367 ## 0x16f
.long 5330 ## 0x14d2
.long 2261 ## 0x8d5
.long 8692 ## 0x21f4
.long 2460 ## 0x99c
.long 4823 ## 0x12d7
.long 8968 ## 0x2308
.long 4976 ## 0x1370
.long 1929 ## 0x789
.long 1051 ## 0x41b
.long 9249 ## 0x2421
.long 9713 ## 0x25f1
.long 2803 ## 0xaf3
.long 1743 ## 0x6cf
.long 3681 ## 0xe61
.long 93 ## 0x5d
.long 4967 ## 0x1367
.long 2245 ## 0x8c5
.long 198 ## 0xc6
.long 896 ## 0x380
.long 6372 ## 0x18e4
.long 4413 ## 0x113d
.long 2615 ## 0xa37
.long 6130 ## 0x17f2
.long 5766 ## 0x1686
.long 5306 ## 0x14ba
.long 1236 ## 0x4d4
.long 888 ## 0x378
.long 8050 ## 0x1f72
.long 7080 ## 0x1ba8
.long 3460 ## 0xd84
.long 3473 ## 0xd91
.long 1720 ## 0x6b8
.long 3913 ## 0xf49
.long 3449 ## 0xd79
.long 8420 ## 0x20e4
.long 1814 ## 0x716
.long 1261 ## 0x4ed
.long 1368 ## 0x558
.long 167 ## 0xa7
.long 7938 ## 0x1f02
.long 4483 ## 0x1183
.long 4843 ## 0x12eb
.long 4682 ## 0x124a
.long 3301 ## 0xce5
.long 4038 ## 0xfc6
.long 709 ## 0x2c5
.long 8655 ## 0x21cf
.long 598 ## 0x256
.long 3857 ## 0xf11
.long 6285 ## 0x188d
.long 2961 ## 0xb91
.long 6817 ## 0x1aa1
.long 1031 ## 0x407
.long 4007 ## 0xfa7
.long 1392 ## 0x570
.long 5717 ## 0x1655
.long 5837 ## 0x16cd
.long 5695 ## 0x163f
.long 9511 ## 0x2527
.long 8891 ## 0x22bb
.long 7883 ## 0x1ecb
.long 7035 ## 0x1b7b
.long 2349 ## 0x92d
.long 5752 ## 0x1678
.long 3139 ## 0xc43
.long 2442 ## 0x98a
.long 3966 ## 0xf7e
.long 2007 ## 0x7d7
.long 9205 ## 0x23f5
.long 8434 ## 0x20f2
.long 5065 ## 0x13c9
.long 3795 ## 0xed3
.long 6890 ## 0x1aea
.long 2715 ## 0xa9b
.long 1 ## 0x1
.long 5106 ## 0x13f2
.long 5083 ## 0x13db
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.space 1
L_.str.1: ## @.str.1
.asciz "hello, world"
.subsections_via_symbols
Copy the code
.section __TEXT,__text,regular,pure_instructions
.macosx_version_min 10, 13
.globl _main ## -- Begin function main
.p2align 4, 0x90
_main: ## @main
Lfunc_begin0:
.cfi_startproc
.cfi_personality 155, ___gxx_personality_v0
.cfi_lsda 16, Lexception0
## BB#0:
pushq %rbp
Lcfi0:
.cfi_def_cfa_offset 16
Lcfi1:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi2:
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $504, %rsp ## imm = 0x1F8
Lcfi3:
.cfi_offset %rbx, -56
Lcfi4:
.cfi_offset %r12, -48
Lcfi5:
.cfi_offset %r13, -40
Lcfi6:
.cfi_offset %r14, -32
Lcfi7:
.cfi_offset %r15, -24
leaq l__ZZ4mainE5array(%rip), %rsi
leaq -536(%rbp), %rdi
movl $488, %edx ## imm = 0x1E8
callq _memcpy
movl $2700, %eax ## imm = 0xA8C
movl $4, %r14d
movq __ZNSt3__14coutE@GOTPCREL(%rip), %r15
leaq L_.str(%rip), %rbx
cmpl $1001, %eax ## imm = 0x3E9
jl LBB0_6
jmp LBB0_2
.p2align 4, 0x90
LBB0_7: ## in Loop: Header=BB0_6 Depth=1
movl -536(%rbp,%r14), %eax
addq $4, %r14
cmpl $1001, %eax ## imm = 0x3E9
jl LBB0_6
LBB0_2:
xorl %edx, %edx
movq %r15, %rdi
movq %rbx, %rsi
callq __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
cmpl $5330, -540(%rbp,%r14) ## imm = 0x14D2
jne LBB0_6
## BB#3:
movl $12, %edx
movq %r15, %r12
movq %r15, %rdi
leaq L_.str.1(%rip), %rsi
callq __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
movq %rax, %r15
movq (%r15), %rax
movq -24(%rax), %rsi
addq %r15, %rsi
leaq -48(%rbp), %r13
movq %r13, %rdi
callq __ZNKSt3__18ios_base6getlocEv
Ltmp0:
movq %r13, %rdi
movq __ZNSt3__15ctypeIcE2idE@GOTPCREL(%rip), %rsi
callq __ZNKSt3__16locale9use_facetERNS0_2idE
Ltmp1:
## BB#4:
movq (%rax), %rcx
Ltmp2:
movl $10, %esi
movq %rax, %rdi
callq *56(%rcx)
movl %eax, %r13d
Ltmp3:
## BB#5:
leaq -48(%rbp), %rdi
callq __ZNSt3__16localeD1Ev
movsbl %r13b, %esi
movq %r15, %rdi
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE3putEc
movq %r15, %rdi
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE5flushEv
movq %r12, %r15
LBB0_6: ## =>This Inner Loop Header: Depth=1
cmpq $488, %r14 ## imm = 0x1E8
jne LBB0_7
## BB#8:
xorl %eax, %eax
addq $504, %rsp ## imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
LBB0_9:
Ltmp4:
movq %rax, %rbx
leaq -48(%rbp), %rdi
callq __ZNSt3__16localeD1Ev
movq %rbx, %rdi
callq __Unwind_Resume
Lfunc_end0:
.cfi_endproc
.section __TEXT,__gcc_except_tab
.p2align 2
GCC_except_table0:
Lexception0:
.byte 255 ## @LPStart Encoding = omit
.byte 155 ## @TType Encoding = indirect pcrel sdata4
.byte 41 ## @TType base offset
.byte 3 ## Call site Encoding = udata4
.byte 39 ## Call site table length
Lset0 = Lfunc_begin0-Lfunc_begin0 ## >> Call Site 1 <<
.long Lset0
Lset1 = Ltmp0-Lfunc_begin0 ## Call between Lfunc_begin0 and Ltmp0
.long Lset1
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
Lset2 = Ltmp0-Lfunc_begin0 ## >> Call Site 2 <<
.long Lset2
Lset3 = Ltmp3-Ltmp0 ## Call between Ltmp0 and Ltmp3
.long Lset3
Lset4 = Ltmp4-Lfunc_begin0 ## jumps to Ltmp4
.long Lset4
.byte 0 ## On action: cleanup
Lset5 = Ltmp3-Lfunc_begin0 ## >> Call Site 3 <<
.long Lset5
Lset6 = Lfunc_end0-Ltmp3 ## Call between Ltmp3 and Lfunc_end0
.long Lset6
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
.p2align 2
## -- End function
.section __TEXT,__text,regular,pure_instructions
.globl __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m ## -- Begin function _ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
.weak_def_can_be_hidden __ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
.p2align 4, 0x90
__ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m: ## @_ZNSt3__124__put_character_sequenceIcNS_11char_traitsIcEEEERNS_13basic_ostreamIT_T0_EES7_PKS4_m
Lfunc_begin1:
.cfi_startproc
.cfi_personality 155, ___gxx_personality_v0
.cfi_lsda 16, Lexception1
## BB#0:
pushq %rbp
Lcfi8:
.cfi_def_cfa_offset 16
Lcfi9:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi10:
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $40, %rsp
Lcfi11:
.cfi_offset %rbx, -56
Lcfi12:
.cfi_offset %r12, -48
Lcfi13:
.cfi_offset %r13, -40
Lcfi14:
.cfi_offset %r14, -32
Lcfi15:
.cfi_offset %r15, -24
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
Ltmp5:
leaq -80(%rbp), %rdi
movq %rbx, %rsi
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryC1ERS3_
Ltmp6:
## BB#1:
cmpb $0, -80(%rbp)
je LBB1_10
## BB#2:
movq (%rbx), %rax
movq -24(%rax), %rax
leaq (%rbx,%rax), %r12
movq 40(%rbx,%rax), %rdi
movl 8(%rbx,%rax), %r13d
movl 144(%rbx,%rax), %eax
cmpl $-1, %eax
jne LBB1_7
## BB#3:
Ltmp8:
movq %rdi, -64(%rbp) ## 8-byte Spill
leaq -56(%rbp), %rdi
movq %r12, %rsi
callq __ZNKSt3__18ios_base6getlocEv
Ltmp9:
## BB#4:
Ltmp10:
movq __ZNSt3__15ctypeIcE2idE@GOTPCREL(%rip), %rsi
leaq -56(%rbp), %rdi
callq __ZNKSt3__16locale9use_facetERNS0_2idE
Ltmp11:
## BB#5:
movq (%rax), %rcx
Ltmp12:
movl $32, %esi
movq %rax, %rdi
callq *56(%rcx)
movb %al, -41(%rbp) ## 1-byte Spill
Ltmp13:
## BB#6:
leaq -56(%rbp), %rdi
callq __ZNSt3__16localeD1Ev
movsbl -41(%rbp), %eax ## 1-byte Folded Reload
movl %eax, 144(%r12)
movq -64(%rbp), %rdi ## 8-byte Reload
LBB1_7:
addq %r15, %r14
andl $176, %r13d
cmpl $32, %r13d
movq %r15, %rdx
cmoveq %r14, %rdx
Ltmp15:
movsbl %al, %r9d
movq %r15, %rsi
movq %r14, %rcx
movq %r12, %r8
callq __ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
Ltmp16:
## BB#8:
testq %rax, %rax
jne LBB1_10
## BB#9:
movq (%rbx), %rax
movq -24(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 32(%rbx,%rax), %esi
orl $5, %esi
Ltmp18:
callq __ZNSt3__18ios_base5clearEj
Ltmp19:
LBB1_10:
leaq -80(%rbp), %rdi
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev
LBB1_11:
movq %rbx, %rax
addq $40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
LBB1_12:
Ltmp20:
jmp LBB1_15
LBB1_13:
Ltmp14:
movq %rax, %r14
leaq -56(%rbp), %rdi
callq __ZNSt3__16localeD1Ev
jmp LBB1_16
LBB1_14:
Ltmp17:
LBB1_15:
movq %rax, %r14
LBB1_16:
leaq -80(%rbp), %rdi
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEE6sentryD1Ev
jmp LBB1_18
LBB1_17:
Ltmp7:
movq %rax, %r14
LBB1_18:
movq %r14, %rdi
callq ___cxa_begin_catch
movq (%rbx), %rax
movq %rbx, %rdi
addq -24(%rax), %rdi
Ltmp21:
callq __ZNSt3__18ios_base33__set_badbit_and_consider_rethrowEv
Ltmp22:
## BB#19:
callq ___cxa_end_catch
jmp LBB1_11
LBB1_20:
Ltmp23:
movq %rax, %rbx
Ltmp24:
callq ___cxa_end_catch
Ltmp25:
## BB#21:
movq %rbx, %rdi
callq __Unwind_Resume
LBB1_22:
Ltmp26:
movq %rax, %rdi
callq ___clang_call_terminate
Lfunc_end1:
.cfi_endproc
.section __TEXT,__gcc_except_tab
.p2align 2
GCC_except_table1:
Lexception1:
.byte 255 ## @LPStart Encoding = omit
.byte 155 ## @TType Encoding = indirect pcrel sdata4
.asciz "\213\201" ## @TType base offset
.byte 3 ## Call site Encoding = udata4
.ascii "\202\001" ## Call site table length
Lset7 = Ltmp5-Lfunc_begin1 ## >> Call Site 1 <<
.long Lset7
Lset8 = Ltmp6-Ltmp5 ## Call between Ltmp5 and Ltmp6
.long Lset8
Lset9 = Ltmp7-Lfunc_begin1 ## jumps to Ltmp7
.long Lset9
.byte 1 ## On action: 1
Lset10 = Ltmp8-Lfunc_begin1 ## >> Call Site 2 <<
.long Lset10
Lset11 = Ltmp9-Ltmp8 ## Call between Ltmp8 and Ltmp9
.long Lset11
Lset12 = Ltmp17-Lfunc_begin1 ## jumps to Ltmp17
.long Lset12
.byte 1 ## On action: 1
Lset13 = Ltmp10-Lfunc_begin1 ## >> Call Site 3 <<
.long Lset13
Lset14 = Ltmp13-Ltmp10 ## Call between Ltmp10 and Ltmp13
.long Lset14
Lset15 = Ltmp14-Lfunc_begin1 ## jumps to Ltmp14
.long Lset15
.byte 1 ## On action: 1
Lset16 = Ltmp15-Lfunc_begin1 ## >> Call Site 4 <<
.long Lset16
Lset17 = Ltmp16-Ltmp15 ## Call between Ltmp15 and Ltmp16
.long Lset17
Lset18 = Ltmp17-Lfunc_begin1 ## jumps to Ltmp17
.long Lset18
.byte 1 ## On action: 1
Lset19 = Ltmp18-Lfunc_begin1 ## >> Call Site 5 <<
.long Lset19
Lset20 = Ltmp19-Ltmp18 ## Call between Ltmp18 and Ltmp19
.long Lset20
Lset21 = Ltmp20-Lfunc_begin1 ## jumps to Ltmp20
.long Lset21
.byte 1 ## On action: 1
Lset22 = Ltmp19-Lfunc_begin1 ## >> Call Site 6 <<
.long Lset22
Lset23 = Ltmp21-Ltmp19 ## Call between Ltmp19 and Ltmp21
.long Lset23
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
Lset24 = Ltmp21-Lfunc_begin1 ## >> Call Site 7 <<
.long Lset24
Lset25 = Ltmp22-Ltmp21 ## Call between Ltmp21 and Ltmp22
.long Lset25
Lset26 = Ltmp23-Lfunc_begin1 ## jumps to Ltmp23
.long Lset26
.byte 0 ## On action: cleanup
Lset27 = Ltmp22-Lfunc_begin1 ## >> Call Site 8 <<
.long Lset27
Lset28 = Ltmp24-Ltmp22 ## Call between Ltmp22 and Ltmp24
.long Lset28
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
Lset29 = Ltmp24-Lfunc_begin1 ## >> Call Site 9 <<
.long Lset29
Lset30 = Ltmp25-Ltmp24 ## Call between Ltmp24 and Ltmp25
.long Lset30
Lset31 = Ltmp26-Lfunc_begin1 ## jumps to Ltmp26
.long Lset31
.byte 1 ## On action: 1
Lset32 = Ltmp25-Lfunc_begin1 ## >> Call Site 10 <<
.long Lset32
Lset33 = Lfunc_end1-Ltmp25 ## Call between Ltmp25 and Lfunc_end1
.long Lset33
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
.byte 1 ## >> Action Record 1 <<
## Catch TypeInfo 1
.byte 0 ## No further actions
## >> Catch TypeInfos <<
.long 0 ## TypeInfo 1
.p2align 2
## -- End function
.section __TEXT,__text,regular,pure_instructions
.private_extern __ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_ ## -- Begin function _ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
.globl __ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
.weak_def_can_be_hidden __ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
.p2align 4, 0x90
__ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_: ## @_ZNSt3__116__pad_and_outputIcNS_11char_traitsIcEEEENS_19ostreambuf_iteratorIT_T0_EES6_PKS4_S8_S8_RNS_8ios_baseES4_
Lfunc_begin2:
.cfi_startproc
.cfi_personality 155, ___gxx_personality_v0
.cfi_lsda 16, Lexception2
## BB#0:
pushq %rbp
Lcfi16:
.cfi_def_cfa_offset 16
Lcfi17:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Lcfi18:
.cfi_def_cfa_register %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $72, %rsp
Lcfi19:
.cfi_offset %rbx, -56
Lcfi20:
.cfi_offset %r12, -48
Lcfi21:
.cfi_offset %r13, -40
Lcfi22:
.cfi_offset %r14, -32
Lcfi23:
.cfi_offset %r15, -24
movq %r8, %r14
movq %rcx, %r12
movq %rdi, %r13
testq %r13, %r13
je LBB2_17
## BB#1:
movl %r9d, -44(%rbp) ## 4-byte Spill
movq %r12, %rax
subq %rsi, %rax
movq 24(%r14), %rcx
xorl %r15d, %r15d
subq %rax, %rcx
cmovgq %rcx, %r15
movq %rdx, -104(%rbp) ## 8-byte Spill
movq %rdx, %rbx
subq %rsi, %rbx
testq %rbx, %rbx
jle LBB2_3
## BB#2:
movq (%r13), %rax
movq %r13, %rdi
movq %rbx, %rdx
callq *96(%rax)
cmpq %rbx, %rax
jne LBB2_17
LBB2_3:
testq %r15, %r15
jle LBB2_13
## BB#4:
movq %r12, -88(%rbp) ## 8-byte Spill
movq %r14, -96(%rbp) ## 8-byte Spill
xorps %xmm0, %xmm0
movaps %xmm0, -80(%rbp)
movq $0, -64(%rbp)
cmpq $23, %r15
jae LBB2_8
## BB#5:
movl %r15d, %eax
addb %al, %al
movb %al, -80(%rbp)
leaq -79(%rbp), %r14
movq %r14, %r12
jmp LBB2_9
LBB2_8:
leaq 16(%r15), %rbx
andq $-16, %rbx
movq %rbx, %rdi
callq __Znwm
movq %rax, %r12
movq %r12, -64(%rbp)
orq $1, %rbx
movq %rbx, -80(%rbp)
movq %r15, -72(%rbp)
leaq -79(%rbp), %r14
LBB2_9:
movl -44(%rbp), %eax ## 4-byte Reload
movzbl %al, %esi
movq %r12, %rdi
movq %r15, %rdx
callq _memset
movb $0, (%r12,%r15)
testb $1, -80(%rbp)
cmovneq -64(%rbp), %r14
movq (%r13), %rax
Ltmp27:
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq *96(%rax)
movq %rax, %rbx
Ltmp28:
## BB#10:
testb $1, -80(%rbp)
movq -96(%rbp), %r14 ## 8-byte Reload
movq -88(%rbp), %r12 ## 8-byte Reload
je LBB2_12
## BB#11:
movq -64(%rbp), %rdi
callq __ZdlPv
LBB2_12:
cmpq %r15, %rbx
jne LBB2_17
LBB2_13:
movq -104(%rbp), %rsi ## 8-byte Reload
subq %rsi, %r12
testq %r12, %r12
jle LBB2_15
## BB#14:
movq (%r13), %rax
movq %r13, %rdi
movq %r12, %rdx
callq *96(%rax)
cmpq %r12, %rax
jne LBB2_17
LBB2_15:
movq $0, 24(%r14)
jmp LBB2_18
LBB2_17:
xorl %r13d, %r13d
LBB2_18:
movq %r13, %rax
addq $72, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
LBB2_19:
Ltmp29:
movq %rax, %rbx
testb $1, -80(%rbp)
je LBB2_21
## BB#20:
movq -64(%rbp), %rdi
callq __ZdlPv
LBB2_21:
movq %rbx, %rdi
callq __Unwind_Resume
Lfunc_end2:
.cfi_endproc
.section __TEXT,__gcc_except_tab
.p2align 2
GCC_except_table2:
Lexception2:
.byte 255 ## @LPStart Encoding = omit
.byte 155 ## @TType Encoding = indirect pcrel sdata4
.byte 41 ## @TType base offset
.byte 3 ## Call site Encoding = udata4
.byte 39 ## Call site table length
Lset34 = Lfunc_begin2-Lfunc_begin2 ## >> Call Site 1 <<
.long Lset34
Lset35 = Ltmp27-Lfunc_begin2 ## Call between Lfunc_begin2 and Ltmp27
.long Lset35
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
Lset36 = Ltmp27-Lfunc_begin2 ## >> Call Site 2 <<
.long Lset36
Lset37 = Ltmp28-Ltmp27 ## Call between Ltmp27 and Ltmp28
.long Lset37
Lset38 = Ltmp29-Lfunc_begin2 ## jumps to Ltmp29
.long Lset38
.byte 0 ## On action: cleanup
Lset39 = Ltmp28-Lfunc_begin2 ## >> Call Site 3 <<
.long Lset39
Lset40 = Lfunc_end2-Ltmp28 ## Call between Ltmp28 and Lfunc_end2
.long Lset40
.long 0 ## has no landing pad
.byte 0 ## On action: cleanup
.p2align 2
## -- End function
.section __TEXT,__text,regular,pure_instructions
.private_extern ___clang_call_terminate ## -- Begin function __clang_call_terminate
.globl ___clang_call_terminate
.weak_def_can_be_hidden ___clang_call_terminate
.p2align 4, 0x90
___clang_call_terminate: ## @__clang_call_terminate
## BB#0:
pushq %rax
callq ___cxa_begin_catch
callq __ZSt9terminatev
## -- End function
.section __TEXT,__const
.p2align 2 ## @_ZZ4mainE5array
l__ZZ4mainE5array:
.long 2700 ## 0xa8c
.long 2314 ## 0x90a
.long 8429 ## 0x20ed
.long 7726 ## 0x1e2e
.long 4817 ## 0x12d1
.long 8716 ## 0x220c
.long 3598 ## 0xe0e
.long 6255 ## 0x186f
.long 5056 ## 0x13c0
.long 8653 ## 0x21cd
.long 8571 ## 0x217b
.long 5028 ## 0x13a4
.long 1259 ## 0x4eb
.long 3315 ## 0xcf3
.long 2896 ## 0xb50
.long 1411 ## 0x583
.long 3847 ## 0xf07
.long 879 ## 0x36f
.long 7353 ## 0x1cb9
.long 8056 ## 0x1f78
.long 8765 ## 0x223d
.long 2344 ## 0x928
.long 6349 ## 0x18cd
.long 4156 ## 0x103c
.long 8350 ## 0x209e
.long 4164 ## 0x1044
.long 4783 ## 0x12af
.long 6800 ## 0x1a90
.long 8887 ## 0x22b7
.long 267 ## 0x10b
.long 4478 ## 0x117e
.long 6327 ## 0x18b7
.long 58 ## 0x3a
.long 7961 ## 0x1f19
.long 756 ## 0x2f4
.long 5654 ## 0x1616
.long 9546 ## 0x254a
.long 5132 ## 0x140c
.long 247 ## 0xf7
.long 5514 ## 0x158a
.long 7098 ## 0x1bba
.long 1156 ## 0x484
.long 795 ## 0x31b
.long 2502 ## 0x9c6
.long 367 ## 0x16f
.long 5330 ## 0x14d2
.long 2261 ## 0x8d5
.long 8692 ## 0x21f4
.long 2460 ## 0x99c
.long 4823 ## 0x12d7
.long 8968 ## 0x2308
.long 4976 ## 0x1370
.long 1929 ## 0x789
.long 1051 ## 0x41b
.long 9249 ## 0x2421
.long 9713 ## 0x25f1
.long 2803 ## 0xaf3
.long 1743 ## 0x6cf
.long 3681 ## 0xe61
.long 93 ## 0x5d
.long 4967 ## 0x1367
.long 2245 ## 0x8c5
.long 198 ## 0xc6
.long 896 ## 0x380
.long 6372 ## 0x18e4
.long 4413 ## 0x113d
.long 2615 ## 0xa37
.long 6130 ## 0x17f2
.long 5766 ## 0x1686
.long 5306 ## 0x14ba
.long 1236 ## 0x4d4
.long 888 ## 0x378
.long 8050 ## 0x1f72
.long 7080 ## 0x1ba8
.long 3460 ## 0xd84
.long 3473 ## 0xd91
.long 1720 ## 0x6b8
.long 3913 ## 0xf49
.long 3449 ## 0xd79
.long 8420 ## 0x20e4
.long 1814 ## 0x716
.long 1261 ## 0x4ed
.long 1368 ## 0x558
.long 167 ## 0xa7
.long 7938 ## 0x1f02
.long 4483 ## 0x1183
.long 4843 ## 0x12eb
.long 4682 ## 0x124a
.long 3301 ## 0xce5
.long 4038 ## 0xfc6
.long 709 ## 0x2c5
.long 8655 ## 0x21cf
.long 598 ## 0x256
.long 3857 ## 0xf11
.long 6285 ## 0x188d
.long 2961 ## 0xb91
.long 6817 ## 0x1aa1
.long 1031 ## 0x407
.long 4007 ## 0xfa7
.long 1392 ## 0x570
.long 5717 ## 0x1655
.long 5837 ## 0x16cd
.long 5695 ## 0x163f
.long 9511 ## 0x2527
.long 8891 ## 0x22bb
.long 7883 ## 0x1ecb
.long 7035 ## 0x1b7b
.long 2349 ## 0x92d
.long 5752 ## 0x1678
.long 3139 ## 0xc43
.long 2442 ## 0x98a
.long 3966 ## 0xf7e
.long 2007 ## 0x7d7
.long 9205 ## 0x23f5
.long 8434 ## 0x20f2
.long 5065 ## 0x13c9
.long 3795 ## 0xed3
.long 6890 ## 0x1aea
.long 2715 ## 0xa9b
.long 1 ## 0x1
.long 5106 ## 0x13f2
.long 5083 ## 0x13db
.section __TEXT,__cstring,cstring_literals
L_.str: ## @.str
.space 1
L_.str.1: ## @.str.1
.asciz "hello, world"
.subsections_via_symbols
Copy the code
At this point, we can still search CMPL $1001, %eax, in which case you will find two comparisons with 1001 in each assembly, and judging by the number of lines of assembly code generated, we can be bold enough to generate roughly the same result.
If this example isn’t obvious, look at the following code:
#include <iostream>
int main(a)
{
size_t sum = 0;
for (size_t i = 1; i <= 100; ++i)
{
sum += i;
}
std: :cout << sum << std: :endl;
return 0;
}
Copy the code
Key codes after O3 optimization:
Lcfi4:
.cfi_offset %r14, -24
movq __ZNSt3__14coutE@GOTPCREL(%rip), %rdi
movl $5050, %esi ## imm = 0x13BA
callq __ZNSt3__113basic_ostreamIcNS_11char_traitsIcEEElsEm
movq %rax, %rbx
movq (%rbx), %rax
movq -24(%rax), %rsi
addq %rbx, %rsi
leaq -24(%rbp), %r14
movq %r14, %rdi
callq __ZNKSt3__18ios_base6getlocEv
Copy the code
Where did this 5050 come from?
conclusion
The only conclusion can only be that the code you wrote is just a suggestion, how does the compiler implement it, how does it implement it, does it follow the code you wrote not what you said
So I don’t think it’s necessary to sacrifice readability for self-righteous optimizations. If your bitwise (+) operation is better than the normal (+) operation compiled directly by the compiler, you should hack the compiler, not the normal writing person.