.file "code_with_pointers.cpp" .text .section .text$_ZNKSt5ctypeIcE8do_widenEc,"x" .linkonce discard .align 2 .p2align 4 .globl _ZNKSt5ctypeIcE8do_widenEc .def _ZNKSt5ctypeIcE8do_widenEc; .scl 2; .type 32; .endef .seh_proc _ZNKSt5ctypeIcE8do_widenEc _ZNKSt5ctypeIcE8do_widenEc: .LFB1983: .seh_endprologue movl %edx, %eax ret .seh_endproc .text .p2align 4 .def _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.isra.0; .scl 3; .type 32; .endef .seh_proc _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.isra.0 _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.isra.0: .LFB2764: pushq %rsi .seh_pushreg %rsi pushq %rbx .seh_pushreg %rbx subq $40, %rsp .seh_stackalloc 40 .seh_endprologue movq (%rcx), %rax movq -24(%rax), %rax movq %rcx, %rbx movq 240(%rcx,%rax), %rsi testq %rsi, %rsi je .L8 cmpb $0, 56(%rsi) je .L5 movsbl 67(%rsi), %edx .L6: movq %rbx, %rcx call _ZNSo3putEc movq %rax, %rcx addq $40, %rsp popq %rbx popq %rsi jmp _ZNSo5flushEv .L5: movq %rsi, %rcx call _ZNKSt5ctypeIcE13_M_widen_initEv movq (%rsi), %rax movl $10, %edx leaq _ZNKSt5ctypeIcE8do_widenEc(%rip), %rcx movq 48(%rax), %rax cmpq %rcx, %rax je .L6 movl $10, %edx movq %rsi, %rcx call *%rax movsbl %al, %edx jmp .L6 .L8: call _ZSt16__throw_bad_castv nop .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 .p2align 4 .globl _Z13multiply_by_8Pi .def _Z13multiply_by_8Pi; .scl 2; .type 32; .endef .seh_proc _Z13multiply_by_8Pi _Z13multiply_by_8Pi: .LFB2230: pushq %rbp .seh_pushreg %rbp pushq %rdi .seh_pushreg %rdi pushq %rsi .seh_pushreg %rsi pushq %rbx .seh_pushreg %rbx subq $40, %rsp .seh_stackalloc 40 .seh_endprologue movq .refptr._ZSt4cout(%rip), %rbx movl $23, %r8d leaq .LC0(%rip), %rdx movq %rcx, %rsi movq %rbx, %rcx call _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_x movq (%rbx), %rax movq %rbx, %rcx movq -24(%rax), %rdx addq %rbx, %rdx movl 24(%rdx), %eax andl $-75, %eax orl $8, %eax movl %eax, 24(%rdx) movq %rsi, %rdx call _ZNSo9_M_insertIxEERSoT_ movq %rax, %rdi movq (%rax), %rax movq -24(%rax), %rax movq 240(%rdi,%rax), %rbp testq %rbp, %rbp je .L13 cmpb $0, 56(%rbp) je .L11 movsbl 67(%rbp), %edx .L12: movq %rdi, %rcx call _ZNSo3putEc movq %rax, %rcx call _ZNSo5flushEv movq %rbx, %rcx movl $52, %r8d leaq .LC1(%rip), %rdx call _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_x movq (%rbx), %rax movq %rbx, %rcx movq -24(%rax), %rdx addq %rbx, %rdx movl 24(%rdx), %eax andl $-75, %eax orl $2, %eax movl %eax, 24(%rdx) movl (%rsi), %edx call _ZNSolsEi movq %rax, %rbx movq (%rax), %rax movq -24(%rax), %rax movq 240(%rbx,%rax), %rdi testq %rdi, %rdi je .L13 cmpb $0, 56(%rdi) je .L14 movsbl 67(%rdi), %edx .L15: movq %rbx, %rcx call _ZNSo3putEc movq %rax, %rcx call _ZNSo5flushEv sall $3, (%rsi) addq $40, %rsp popq %rbx popq %rsi popq %rdi popq %rbp ret .p2align 4,,10 .p2align 3 .L11: movq %rbp, %rcx call _ZNKSt5ctypeIcE13_M_widen_initEv movq 0(%rbp), %rax movl $10, %edx leaq _ZNKSt5ctypeIcE8do_widenEc(%rip), %rcx movq 48(%rax), %rax cmpq %rcx, %rax je .L12 movq %rbp, %rcx call *%rax movsbl %al, %edx jmp .L12 .p2align 4,,10 .p2align 3 .L14: movq %rdi, %rcx call _ZNKSt5ctypeIcE13_M_widen_initEv movq (%rdi), %rax movl $10, %edx leaq _ZNKSt5ctypeIcE8do_widenEc(%rip), %rcx movq 48(%rax), %rax cmpq %rcx, %rax je .L15 movq %rdi, %rcx call *%rax movsbl %al, %edx jmp .L15 .L13: call _ZSt16__throw_bad_castv nop .seh_endproc .def __main; .scl 2; .type 32; .endef .section .rdata,"dr" .LC2: .ascii "7 times 8 = \0" .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 "At end, number is \0" .section .text.startup,"x" .p2align 4 .globl main .def main; .scl 2; .type 32; .endef .seh_proc main main: .LFB2231: pushq %rsi .seh_pushreg %rsi pushq %rbx .seh_pushreg %rbx subq $56, %rsp .seh_stackalloc 56 .seh_endprologue call __main leaq 44(%rsp), %rsi movl $7, 44(%rsp) movq %rsi, %rcx call _Z13multiply_by_8Pi movq .refptr._ZSt4cout(%rip), %rbx movl $12, %r8d leaq .LC2(%rip), %rdx movq %rbx, %rcx call _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_x movq (%rbx), %rax movq %rbx, %rcx movq -24(%rax), %rdx addq %rbx, %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_.isra.0 movl $15, %r8d movq %rbx, %rcx movl $60, 40(%rsp) leaq .LC3(%rip), %rdx call _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_x movq .refptr._ZSt3cin(%rip), %rcx movq %rsi, %rdx call _ZNSirsERi movl 40(%rsp), %eax movl $18, %r8d movq %rbx, %rcx cltd idivl 44(%rsp) leaq .LC4(%rip), %rdx movl %eax, 40(%rsp) call _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_x movl 44(%rsp), %edx movq %rbx, %rcx call _ZNSolsEi movl $17, %r8d leaq .LC5(%rip), %rdx movq %rax, %rcx movq %rax, %rsi call _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_x movl 40(%rsp), %edx movq %rsi, %rcx leaq 40(%rsp), %rsi call _ZNSolsEi movq %rax, %rcx call _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.isra.0 movl $24, %r8d movq %rbx, %rcx leaq .LC6(%rip), %rdx call _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_x movq (%rbx), %rax movq %rbx, %rcx movq -24(%rax), %rdx addq %rbx, %rdx movl 24(%rdx), %eax andl $-75, %eax orl $8, %eax movl %eax, 24(%rdx) movq %rsi, %rdx call _ZNSo9_M_insertIxEERSoT_ movq %rax, %rcx call _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.isra.0 movl $24, %r8d movq %rbx, %rcx leaq .LC7(%rip), %rdx call _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_x movq (%rbx), %rax movq %rbx, %rcx movq -24(%rax), %rdx addq %rbx, %rdx movl 24(%rdx), %eax andl $-75, %eax orl $8, %eax movl %eax, 24(%rdx) movq %rsi, %rdx call _ZNSo9_M_insertIxEERSoT_ movq %rax, %rcx call _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.isra.0 movq %rsi, %rcx call _Z13multiply_by_8Pi movl $18, %r8d movq %rbx, %rcx leaq .LC8(%rip), %rdx call _ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_x movl 40(%rsp), %edx movq %rbx, %rcx call _ZNSolsEi movq %rax, %rcx call _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_.isra.0 xorl %eax, %eax addq $56, %rsp popq %rbx popq %rsi ret .seh_endproc .ident "GCC: (x86_64-posix-seh-rev0, Built by MinGW-Builds project) 13.2.0" .def _ZNSo3putEc; .scl 2; .type 32; .endef .def _ZNSo5flushEv; .scl 2; .type 32; .endef .def _ZNKSt5ctypeIcE13_M_widen_initEv; .scl 2; .type 32; .endef .def _ZSt16__throw_bad_castv; .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 _ZNSolsEi; .scl 2; .type 32; .endef .def _ZNSirsERi; .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