.file "test_abs.cpp" .local _ZStL8__ioinit .comm _ZStL8__ioinit,1,1 .text .globl absolute_value .type absolute_value, @function absolute_value: .LFB1021: .cfi_startproc pushl %ebp .cfi_def_cfa_offset 8 .cfi_offset 5, -8 movl %esp, %ebp .cfi_def_cfa_register 5 cmpl $0, 8(%ebp) jns .L2 negl 8(%ebp) .L2: movl 8(%ebp), %eax popl %ebp .cfi_restore 5 .cfi_def_cfa 4, 4 ret .cfi_endproc .LFE1021: .size absolute_value, .-absolute_value .section .rodata .LC0: .string "Enter a value: " .LC1: .string "The result is: " .text .globl main .type main, @function main: .LFB1022: .cfi_startproc leal 4(%esp), %ecx .cfi_def_cfa 1, 0 andl $-16, %esp pushl -4(%ecx) pushl %ebp .cfi_escape 0x10,0x5,0x2,0x75,0 movl %esp, %ebp pushl %ecx .cfi_escape 0xf,0x3,0x75,0x7c,0x6 subl $20, %esp movl %gs:20, %eax movl %eax, -12(%ebp) xorl %eax, %eax movl $0, -20(%ebp) subl $8, %esp pushl $.LC0 pushl $_ZSt4cout call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc addl $16, %esp subl $8, %esp pushl $_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_ pushl %eax call _ZNSolsEPFRSoS_E addl $16, %esp subl $8, %esp leal -20(%ebp), %eax pushl %eax pushl $_ZSt3cin call _ZNSirsERi addl $16, %esp movl -20(%ebp), %eax subl $12, %esp pushl %eax call absolute_value addl $16, %esp movl %eax, -16(%ebp) subl $8, %esp pushl $.LC1 pushl $_ZSt4cout call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc addl $16, %esp subl $8, %esp pushl -16(%ebp) pushl %eax call _ZNSolsEi addl $16, %esp subl $8, %esp pushl $_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_ pushl %eax call _ZNSolsEPFRSoS_E addl $16, %esp movl $0, %eax movl -12(%ebp), %edx xorl %gs:20, %edx je .L6 call __stack_chk_fail .L6: movl -4(%ebp), %ecx .cfi_def_cfa 1, 0 leave .cfi_restore 5 leal -4(%ecx), %esp .cfi_def_cfa 4, 4 ret .cfi_endproc .LFE1022: .size main, .-main .type _Z41__static_initialization_and_destruction_0ii, @function _Z41__static_initialization_and_destruction_0ii: .LFB1031: .cfi_startproc pushl %ebp .cfi_def_cfa_offset 8 .cfi_offset 5, -8 movl %esp, %ebp .cfi_def_cfa_register 5 subl $8, %esp cmpl $1, 8(%ebp) jne .L9 cmpl $65535, 12(%ebp) jne .L9 subl $12, %esp pushl $_ZStL8__ioinit call _ZNSt8ios_base4InitC1Ev addl $16, %esp subl $4, %esp pushl $__dso_handle pushl $_ZStL8__ioinit pushl $_ZNSt8ios_base4InitD1Ev call __cxa_atexit addl $16, %esp .L9: nop leave .cfi_restore 5 .cfi_def_cfa 4, 4 ret .cfi_endproc .LFE1031: .size _Z41__static_initialization_and_destruction_0ii, .-_Z41__static_initialization_and_destruction_0ii .type _GLOBAL__sub_I_absolute_value, @function _GLOBAL__sub_I_absolute_value: .LFB1032: .cfi_startproc pushl %ebp .cfi_def_cfa_offset 8 .cfi_offset 5, -8 movl %esp, %ebp .cfi_def_cfa_register 5 subl $8, %esp subl $8, %esp pushl $65535 pushl $1 call _Z41__static_initialization_and_destruction_0ii addl $16, %esp leave .cfi_restore 5 .cfi_def_cfa 4, 4 ret .cfi_endproc .LFE1032: .size _GLOBAL__sub_I_absolute_value, .-_GLOBAL__sub_I_absolute_value .section .init_array,"aw" .align 4 .long _GLOBAL__sub_I_absolute_value .hidden __dso_handle .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609" .section .note.GNU-stack,"",@progbits