Compiled with -O2 etc. std::string bloat(int years, int months) { std::stringstream oss; oss << "You are " << setw(2) << years << " years " << months << " months old\n"; return oss.str(); } .section .rodata.str1.1 .LC44: .string "You are " .LC45: .string " years " .LC46: .string " months old\n" .text .p2align 4,,15 .globl bloat(int, int) .type bloat(int, int), @function bloat(int, int): .LFB10439: .loc 28 146 0 .LVL343: pushl %ebp .LCFI365: movl %esp, %ebp .LCFI366: pushl %edi .LCFI367: pushl %esi .LCFI368: pushl %ebx .LCFI369: subl $236, %esp .LCFI370: .loc 28 146 0 movl 8(%ebp), %esi .LBB9837: .loc 28 148 0 leal -212(%ebp), %edi .LBB9912: .LBB9913: .file 49 "/usr/include/c++/4.3/ostream" .loc 49 514 0 leal -204(%ebp), %ebx .LBE9913: .LBE9912: .loc 28 148 0 movl $24, 4(%esp) movl %edi, (%esp) .LEHB156: call std::basic_stringstream, std::allocator >::basic_stringstream(std::_Ios_Openmode) .LEHE156: .LBB9911: .LBB9914: .loc 49 514 0 movl $8, 8(%esp) movl $.LC44, 4(%esp) movl %ebx, (%esp) .LEHB157: call std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, int) .LBE9914: .LBE9911: .LBB9902: .LBB9903: .LBB9904: .LBB9905: .LBB9906: .file 50 "/usr/include/c++/4.3/bits/ios_base.h" .loc 50 652 0 movl -204(%ebp), %eax movl -12(%eax), %eax .LBE9906: .LBE9905: .LBE9904: .LBE9903: .LBE9902: .loc 28 149 0 movl %ebx, (%esp) .LBB9901: .LBB9910: .LBB9909: .LBB9908: .LBB9907: .loc 50 652 0 movl $2, -196(%ebp,%eax) .LBE9907: .LBE9908: .LBE9909: .LBE9910: .LBE9901: .loc 28 149 0 movl 12(%ebp), %eax movl %eax, 4(%esp) call std::basic_ostream >::operator<<(int) .LVL344: movl %eax, %ebx .LBB9899: .LBB9900: .loc 49 514 0 movl $7, 8(%esp) movl $.LC45, 4(%esp) movl %eax, (%esp) call std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, int) .LBE9900: .LBE9899: .loc 28 149 0 movl 16(%ebp), %eax movl %ebx, (%esp) movl %eax, 4(%esp) call std::basic_ostream >::operator<<(int) .LVL345: .LBB9897: .LBB9898: .loc 49 514 0 movl $12, 8(%esp) movl $.LC46, 4(%esp) movl %eax, (%esp) call std::basic_ostream >& std::__ostream_insert >(std::basic_ostream >&, char const*, int) .LEHE157: .LBE9898: .LBE9897: .LBB9838: .LBB9840: .LBB9842: .LBB9844: .LBB9846: .LBB9866: .LBB9867: .LBB9868: .LBB9869: .LBB9870: .LBB9871: .loc 12 260 0 movl std::basic_string, std::allocator >::_Rep::_S_empty_rep_storage+12, (%esi) .LBE9871: .LBE9870: .LBE9869: .LBE9868: .LBE9867: .LBE9866: .LBB9872: .LBB9873: .loc 34 513 0 movl -180(%ebp), %edx .LBE9873: .LBE9872: .loc 48 127 0 testl %edx, %edx je .L840 .LBB9874: .LBB9875: .loc 34 469 0 movl -188(%ebp), %ecx .LBE9875: .LBE9874: .loc 48 130 0 cmpl %ecx, %edx ja .L858 .L844: .LBB9876: .LBB9877: .LBB9878: .LBB9879: .LBB9880: .LBB9881: .LBB9882: .loc 12 1465 0 leal -14(%ebp), %eax movl %eax, 8(%esp) movl -184(%ebp), %eax movb $0, 12(%esp) movl %ecx, 4(%esp) movl %eax, (%esp) .LEHB158: call char* std::basic_string, std::allocator >::_S_construct(char*, char*, std::allocator const&, std::forward_iterator_tag) .LEHE158: .LBE9882: .LBE9881: .LBE9880: .LBE9879: .LBE9878: .LBE9877: .LBE9876: .LBB9888: .LBB9889: .loc 12 502 0 leal -24(%ebp), %ebx .LBE9889: .LBE9888: .LBB9891: .LBB9887: .LBB9886: .LBB9883: .LBB9884: .LBB9885: .loc 12 260 0 movl %eax, -24(%ebp) .LBE9885: .LBE9884: .LBE9883: .LBE9886: .LBE9887: .LBE9891: .LBB9892: .LBB9890: .loc 12 502 0 movl %ebx, 4(%esp) movl %esi, (%esp) .LEHB159: call std::basic_string, std::allocator >::assign(std::basic_string, std::allocator > const&) .LEHE159: .LBE9890: .LBE9892: .loc 48 133 0 movl %ebx, (%esp) .LEHB160: call std::basic_string, std::allocator >::~basic_string() .LEHE160: .L842: .LBE9846: .LBE9844: .LBE9842: .LBE9840: .LBE9838: .loc 28 150 0 movl %edi, (%esp) .LEHB161: call std::basic_stringstream, std::allocator >::~basic_stringstream() .LEHE161: .LBE9837: .loc 28 151 0 addl $236, %esp movl %esi, %eax popl %ebx popl %esi popl %edi popl %ebp ret $4 .p2align 4,,7 .p2align 3 .L858: .LBB9917: .LBB9915: .LBB9839: .LBB9841: .LBB9843: .LBB9845: .LBB9854: .LBB9855: .LBB9856: .LBB9857: .LBB9858: .LBB9859: .LBB9860: .loc 12 1465 0 leal -13(%ebp), %eax movl %eax, 8(%esp) movl -184(%ebp), %eax movb $0, 12(%esp) movl %edx, 4(%esp) movl %eax, (%esp) .LEHB162: call char* std::basic_string, std::allocator >::_S_construct(char*, char*, std::allocator const&, std::forward_iterator_tag) .LEHE162: .LBE9860: .LBE9859: .LBE9858: .LBE9857: .LBE9856: .LBE9855: .LBE9854: .LBB9851: .LBB9852: .loc 12 502 0 leal -20(%ebp), %ebx .LBE9852: .LBE9851: .LBB9850: .LBB9865: .LBB9864: .LBB9861: .LBB9862: .LBB9863: .loc 12 260 0 movl %eax, -20(%ebp) .LBE9863: .LBE9862: .LBE9861: .LBE9864: .LBE9865: .LBE9850: .LBB9849: .LBB9853: .loc 12 502 0 movl %ebx, 4(%esp) movl %esi, (%esp) .LEHB163: call std::basic_string, std::allocator >::assign(std::basic_string, std::allocator > const&) .LEHE163: .LBE9853: .LBE9849: .loc 48 131 0 movl %ebx, (%esp) .LEHB164: call std::basic_string, std::allocator >::~basic_string() .LEHE164: jmp .L842 .L846: .p2align 4,,7 .p2align 3 .L840: .LBB9847: .LBB9848: .loc 12 502 0 leal -164(%ebp), %eax movl %eax, 4(%esp) movl %esi, (%esp) .LEHB165: call std::basic_string, std::allocator >::assign(std::basic_string, std::allocator > const&) .LEHE165: jmp .L842 .L854: .L857: movl %eax, -224(%ebp) .L847: .LBE9848: .LBE9847: .loc 48 137 0 movl %esi, (%esp) call std::basic_string, std::allocator >::~basic_string() .L848: .LBE9845: .LBE9843: .LBE9841: .LBE9839: .LBE9915: .loc 28 150 0 movl %edi, (%esp) call std::basic_stringstream, std::allocator >::~basic_stringstream() movl -224(%ebp), %eax movl %eax, (%esp) .LEHB166: call _Unwind_Resume .LEHE166: .LVL346: .L855: movl %eax, -224(%ebp) jmp .L848 .LVL347: .L851: jmp .L857 .L850: .L856: .L845: movl %eax, -224(%ebp) .LBB9916: .LBB9896: .LBB9895: .LBB9894: .LBB9893: .loc 48 133 0 movl %ebx, (%esp) call std::basic_string, std::allocator >::~basic_string() jmp .L847 .L843: .L853: jmp .L857 .L852: .p2align 4,,11 .p2align 3 jmp .L856 .LBE9893: .LBE9894: .LBE9895: .LBE9896: .LBE9916: .LBE9917: .LFE10439: .size bloat(int, int), .-bloat(int, int) .section .gcc_except_table .LLSDA10439: .byte 0xff .byte 0xff .byte 0x1 .uleb128 .LLSDACSE10439-.LLSDACSB10439 .LLSDACSB10439: .uleb128 .LEHB156-.LFB10439 .uleb128 .LEHE156-.LEHB156 .uleb128 0x0 .uleb128 0x0 .uleb128 .LEHB157-.LFB10439 .uleb128 .LEHE157-.LEHB157 .uleb128 .L855-.LFB10439 .uleb128 0x0 .uleb128 .LEHB158-.LFB10439 .uleb128 .LEHE158-.LEHB158 .uleb128 .L851-.LFB10439 .uleb128 0x0 .uleb128 .LEHB159-.LFB10439 .uleb128 .LEHE159-.LEHB159 .uleb128 .L850-.LFB10439 .uleb128 0x0 .uleb128 .LEHB160-.LFB10439 .uleb128 .LEHE160-.LEHB160 .uleb128 .L851-.LFB10439 .uleb128 0x0 .uleb128 .LEHB161-.LFB10439 .uleb128 .LEHE161-.LEHB161 .uleb128 0x0 .uleb128 0x0 .uleb128 .LEHB162-.LFB10439 .uleb128 .LEHE162-.LEHB162 .uleb128 .L853-.LFB10439 .uleb128 0x0 .uleb128 .LEHB163-.LFB10439 .uleb128 .LEHE163-.LEHB163 .uleb128 .L852-.LFB10439 .uleb128 0x0 .uleb128 .LEHB164-.LFB10439 .uleb128 .LEHE164-.LEHB164 .uleb128 .L853-.LFB10439 .uleb128 0x0 .uleb128 .LEHB165-.LFB10439 .uleb128 .LEHE165-.LEHB165 .uleb128 .L854-.LFB10439 .uleb128 0x0 .uleb128 .LEHB166-.LFB10439 .uleb128 .LEHE166-.LEHB166 .uleb128 0x0 .uleb128 0x0 .LLSDACSE10439: .text