.file "code_with_pointers.cpp" .text .def __tcf_0; .scl 3; .type 32; .endef .seh_proc __tcf_0 __tcf_0: .LFB2539: subq $40, %rsp .seh_stackalloc 40 .seh_endprologue leaq _ZStL8__ioinit(%rip), %rcx call _ZNSt8ios_base4InitD1Ev nop addq $40, %rsp ret .seh_endproc .section .rdata,"dr" .LC0: .ascii "Value pointer's value: \0" .align 8 .LC1: .ascii "What value pointer points *at*, before multiplying: \0" .text .globl _Z13multiply_by_8Pi .def _Z13multiply_by_8Pi; .scl 2; .type 32; .endef .seh_proc _Z13multiply_by_8Pi _Z13multiply_by_8Pi: .LFB2002: pushq %rdi .seh_pushreg %rdi pushq %rsi .seh_pushreg %rsi pushq %rbx .seh_pushreg %rbx subq $32, %rsp .seh_stackalloc 32 .seh_endprologue movq %rcx, %rbx movl $23, %r8d leaq .LC0(%rip), %rdx movq .refptr._ZSt4cout(%rip), %rsi movq %rsi, %rcx call _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_x movq (%rsi), %rax movq %rsi, %rdx addq -24(%rax), %rdx movl 24(%rdx), %eax andl $-75, %eax orl $8, %eax movl %eax, 24(%rdx) movq %rbx, %rdx movq %rsi, %rcx call _ZNSo9_M_insertIxEERSoT_ movq %rax, %rsi movq (%rax), %rax movq -24(%rax), %rax movq 240(%rsi,%rax), %rdi testq %rdi, %rdi je .L9 cmpb $0, 56(%rdi) je .L4 movzbl 67(%rdi), %edx .L5: movsbl %dl, %edx movq %rsi, %rcx call _ZNSo3putEc movq %rax, %rcx call _ZNSo5flushEv movl $52, %r8d leaq .LC1(%rip), %rdx movq .refptr._ZSt4cout(%rip), %rsi movq %rsi, %rcx call _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_x movq (%rsi), %rax movq %rsi, %rdx addq -24(%rax), %rdx movl 24(%rdx), %eax andl $-75, %eax orl $2, %eax movl %eax, 24(%rdx) movl (%rbx), %edx movq %rsi, %rcx call _ZNSolsEi movq %rax, %rdi movq (%rax), %rax movq -24(%rax), %rax movq 240(%rdi,%rax), %rsi testq %rsi, %rsi je .L10 cmpb $0, 56(%rsi) je .L7 movzbl 67(%rsi), %edx .L8: movsbl %dl, %edx movq %rdi, %rcx call _ZNSo3putEc movq %rax, %rcx call _ZNSo5flushEv sall $3, (%rbx) addq $32, %rsp popq %rbx popq %rsi popq %rdi ret .L9: call _ZSt16__throw_bad_castv .L4: movq %rdi, %rcx call _ZNKSt5ctypeIcE13_M_widen_initEv movq (%rdi), %rax movl $10, %edx movq %rdi, %rcx call *48(%rax) movl %eax, %edx jmp .L5 .L10: call _ZSt16__throw_bad_castv .L7: movq %rsi, %rcx call _ZNKSt5ctypeIcE13_M_widen_initEv movq (%rsi), %rax movl $10, %edx movq %rsi, %rcx call *48(%rax) movl %eax, %edx jmp .L8 .seh_endproc .def __main; .scl 2; .type 32; .endef .section .rdata,"dr" .LC3: .ascii "Enter divisor: \0" .LC4: .ascii "After dividing by \0" .LC5: .ascii ", some number is \0" .LC6: .ascii "Address of some_number: \0" .LC7: .ascii " ... and its pointer: \0" .LC8: .ascii "7 times 8 = \0" .text .globl main .def main; .scl 2; .type 32; .endef .seh_proc main main: .LFB2001: pushq %rdi .seh_pushreg %rdi pushq %rsi .seh_pushreg %rsi pushq %rbx .seh_pushreg %rbx subq $48, %rsp .seh_stackalloc 48 .seh_endprologue call __main movl $0x7149f2ca, 40(%rsp) leaq .LC3(%rip), %rdx movq .refptr._ZSt4cout(%rip), %rbx movq %rbx, %rcx call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc leaq 44(%rsp), %rsi movq %rsi, %rdx movq .refptr._ZSt3cin(%rip), %rcx call _ZNSi10_M_extractIfEERSiRT_ movss 40(%rsp), %xmm0 divss 44(%rsp), %xmm0 movss %xmm0, 40(%rsp) leaq .LC4(%rip), %rdx movq %rbx, %rcx call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc movq %rax, %rcx pxor %xmm1, %xmm1 cvtss2sd 44(%rsp), %xmm1 call _ZNSo9_M_insertIdEERSoT_ movq %rax, %rcx leaq .LC5(%rip), %rdx call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc movq %rax, %rcx pxor %xmm1, %xmm1 cvtss2sd 40(%rsp), %xmm1 call _ZNSo9_M_insertIdEERSoT_ movq %rax, %rcx call _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_ leaq .LC6(%rip), %rdx movq %rbx, %rcx call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc movq %rax, %rcx movq (%rax), %rax movq %rcx, %rdx addq -24(%rax), %rdx movl 24(%rdx), %eax andl $-75, %eax orl $8, %eax movl %eax, 24(%rdx) leaq 40(%rsp), %rdi movq %rdi, %rdx call _ZNSo9_M_insertIxEERSoT_ movq %rax, %rcx call _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_ leaq .LC7(%rip), %rdx movq %rbx, %rcx call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc movq %rax, %rcx movq (%rax), %rax movq %rcx, %rdx addq -24(%rax), %rdx movl 24(%rdx), %eax andl $-75, %eax orl $8, %eax movl %eax, 24(%rdx) movq %rdi, %rdx call _ZNSo9_M_insertIxEERSoT_ movq %rax, %rcx call _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_ movl $7, 44(%rsp) movq %rsi, %rcx call _Z13multiply_by_8Pi leaq .LC8(%rip), %rdx movq %rbx, %rcx call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc movq %rax, %rcx movq (%rax), %rax movq %rcx, %rdx addq -24(%rax), %rdx movl 24(%rdx), %eax andl $-75, %eax orl $2, %eax movl %eax, 24(%rdx) movl 44(%rsp), %edx call _ZNSolsEi movq %rax, %rcx call _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_ movl $0, %eax addq $48, %rsp popq %rbx popq %rsi popq %rdi ret .seh_endproc .def _GLOBAL__sub_I_main; .scl 3; .type 32; .endef .seh_proc _GLOBAL__sub_I_main _GLOBAL__sub_I_main: .LFB2540: subq $40, %rsp .seh_stackalloc 40 .seh_endprologue leaq _ZStL8__ioinit(%rip), %rcx call _ZNSt8ios_base4InitC1Ev leaq __tcf_0(%rip), %rcx call atexit nop addq $40, %rsp ret .seh_endproc .section .ctors,"w" .align 8 .quad _GLOBAL__sub_I_main .lcomm _ZStL8__ioinit,1,1 .ident "GCC: (x86_64-posix-seh-rev2, Built by MinGW-W64 project) 12.2.0" .def _ZNSt8ios_base4InitD1Ev; .scl 2; .type 32; .endef .def _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_x; .scl 2; .type 32; .endef .def _ZNSo9_M_insertIxEERSoT_; .scl 2; .type 32; .endef .def _ZNSo3putEc; .scl 2; .type 32; .endef .def _ZNSo5flushEv; .scl 2; .type 32; .endef .def _ZNSolsEi; .scl 2; .type 32; .endef .def _ZSt16__throw_bad_castv; .scl 2; .type 32; .endef .def _ZNKSt5ctypeIcE13_M_widen_initEv; .scl 2; .type 32; .endef .def _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; .scl 2; .type 32; .endef .def _ZNSi10_M_extractIfEERSiRT_; .scl 2; .type 32; .endef .def _ZNSo9_M_insertIdEERSoT_; .scl 2; .type 32; .endef .def _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; .scl 2; .type 32; .endef .def _ZNSt8ios_base4InitC1Ev; .scl 2; .type 32; .endef .def atexit; .scl 2; .type 32; .endef .section .rdata$.refptr._ZSt3cin, "dr" .globl .refptr._ZSt3cin .linkonce discard .refptr._ZSt3cin: .quad _ZSt3cin .section .rdata$.refptr._ZSt4cout, "dr" .globl .refptr._ZSt4cout .linkonce discard .refptr._ZSt4cout: .quad _ZSt4cout