.file "robot.cpp" .text .section .rodata .type _ZStL19piecewise_construct, @object .size _ZStL19piecewise_construct, 1 _ZStL19piecewise_construct: .zero 1 .local _ZStL8__ioinit .comm _ZStL8__ioinit,1,1 .LC0: .string "Your coordinates: 25 25\n" .align 8 .LC1: .string "Enter move (1 for +x, -1 for -x, 2 for + y, -2 for -y):" .LC2: .string "Your coordinates: " .LC3: .string " " .LC4: .string "Robot at " .LC5: .string "AAAARRRRGHHHHH... Game over\n" .text .globl main .type main, @function main: .LFB1522: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 subq $80, %rsp movq %fs:40, %rax movq %rax, -8(%rbp) xorl %eax, %eax movl $25, -60(%rbp) movl $25, -56(%rbp) movl $1, -52(%rbp) movl $0, -48(%rbp) movl $0, -32(%rbp) movl $0, -44(%rbp) movl $50, -28(%rbp) movl $50, -40(%rbp) movl $0, -24(%rbp) movl $50, -36(%rbp) movl $50, -20(%rbp) leaq .LC0(%rip), %rsi leaq _ZSt4cout(%rip), %rdi call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT .L9: cmpl $1, -52(%rbp) jne .L2 leaq .LC1(%rip), %rsi leaq _ZSt4cout(%rip), %rdi call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT leaq -68(%rbp), %rax movq %rax, %rsi leaq _ZSt3cin(%rip), %rdi call _ZNSirsERi@PLT movl -68(%rbp), %eax cmpl $1, %eax jne .L3 addl $1, -60(%rbp) jmp .L4 .L3: movl -68(%rbp), %eax cmpl $-1, %eax jne .L5 subl $1, -60(%rbp) jmp .L4 .L5: movl -68(%rbp), %eax cmpl $2, %eax jne .L6 addl $1, -56(%rbp) jmp .L4 .L6: movl -68(%rbp), %eax cmpl $-2, %eax jne .L4 subl $1, -56(%rbp) .L4: movl -56(%rbp), %ecx movl -60(%rbp), %edx leaq -32(%rbp), %rsi leaq -48(%rbp), %rax movq %rax, %rdi call _Z10moveRobotsPiS_ii movl %eax, -52(%rbp) leaq .LC2(%rip), %rsi leaq _ZSt4cout(%rip), %rdi call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT movq %rax, %rdx movl -60(%rbp), %eax movl %eax, %esi movq %rdx, %rdi call _ZNSolsEi@PLT leaq .LC3(%rip), %rsi movq %rax, %rdi call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT movq %rax, %rdx movl -56(%rbp), %eax movl %eax, %esi movq %rdx, %rdi call _ZNSolsEi@PLT movq %rax, %rdx movq _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rax movq %rax, %rsi movq %rdx, %rdi call _ZNSolsEPFRSoS_E@PLT movl $0, -64(%rbp) .L8: cmpl $3, -64(%rbp) jg .L9 leaq .LC4(%rip), %rsi leaq _ZSt4cout(%rip), %rdi call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT movq %rax, %rdx movl -64(%rbp), %eax cltq movl -48(%rbp,%rax,4), %eax movl %eax, %esi movq %rdx, %rdi call _ZNSolsEi@PLT leaq .LC3(%rip), %rsi movq %rax, %rdi call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT movq %rax, %rdx movl -64(%rbp), %eax cltq movl -32(%rbp,%rax,4), %eax movl %eax, %esi movq %rdx, %rdi call _ZNSolsEi@PLT movq %rax, %rdx movq _ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_@GOTPCREL(%rip), %rax movq %rax, %rsi movq %rdx, %rdi call _ZNSolsEPFRSoS_E@PLT addl $1, -64(%rbp) jmp .L8 .L2: leaq .LC5(%rip), %rsi leaq _ZSt4cout(%rip), %rdi call _ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc@PLT movl $0, %eax movq -8(%rbp), %rcx xorq %fs:40, %rcx je .L11 call __stack_chk_fail@PLT .L11: leave .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE1522: .size main, .-main .globl _Z10moveRobotsPiS_ii .type _Z10moveRobotsPiS_ii, @function _Z10moveRobotsPiS_ii: .LFB1523: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 subq $64, %rsp movq %rdi, -40(%rbp) movq %rsi, -48(%rbp) movl %edx, -52(%rbp) movl %ecx, -56(%rbp) movl $1, -20(%rbp) movq -40(%rbp), %rax movq %rax, -16(%rbp) movq -48(%rbp), %rax movq %rax, -8(%rbp) movl $0, -24(%rbp) .L15: cmpl $3, -24(%rbp) jg .L13 movq -16(%rbp), %rax movl (%rax), %eax movl -52(%rbp), %edx movl %edx, %esi movl %eax, %edi call _Z6getNewii movq -16(%rbp), %rdx movl %eax, (%rdx) movq -8(%rbp), %rax movl (%rax), %eax movl -56(%rbp), %edx movl %edx, %esi movl %eax, %edi call _Z6getNewii movq -8(%rbp), %rdx movl %eax, (%rdx) movq -16(%rbp), %rax movl (%rax), %eax cmpl %eax, -52(%rbp) jne .L14 movq -8(%rbp), %rax movl (%rax), %eax cmpl %eax, -56(%rbp) jne .L14 movl $0, -20(%rbp) jmp .L13 .L14: addq $4, -16(%rbp) addq $4, -8(%rbp) addl $1, -24(%rbp) jmp .L15 .L13: movl -20(%rbp), %eax leave .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE1523: .size _Z10moveRobotsPiS_ii, .-_Z10moveRobotsPiS_ii .globl _Z6getNewii .type _Z6getNewii, @function _Z6getNewii: .LFB1524: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 movl %edi, -20(%rbp) movl %esi, -24(%rbp) movl -20(%rbp), %eax subl -24(%rbp), %eax movl %eax, -4(%rbp) cmpl $9, -4(%rbp) jle .L18 movl -20(%rbp), %eax subl $10, %eax movl %eax, -8(%rbp) jmp .L19 .L18: cmpl $0, -4(%rbp) jle .L20 movl -20(%rbp), %eax subl $1, %eax movl %eax, -8(%rbp) jmp .L19 .L20: cmpl $0, -4(%rbp) jne .L21 movl -20(%rbp), %eax movl %eax, -8(%rbp) jmp .L19 .L21: cmpl $-9, -4(%rbp) jl .L22 movl -20(%rbp), %eax addl $1, %eax movl %eax, -8(%rbp) jmp .L19 .L22: cmpl $-9, -4(%rbp) jge .L19 movl -20(%rbp), %eax addl $10, %eax movl %eax, -8(%rbp) .L19: movl -8(%rbp), %eax popq %rbp .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE1524: .size _Z6getNewii, .-_Z6getNewii .type _Z41__static_initialization_and_destruction_0ii, @function _Z41__static_initialization_and_destruction_0ii: .LFB2013: .cfi_startproc endbr64 pushq %rbp .cfi_def_cfa_offset 16 .cfi_offset 6, -16 movq %rsp, %rbp .cfi_def_cfa_register 6 subq $16, %rsp movl %edi, -4(%rbp) movl %esi, -8(%rbp) cmpl $1, -4(%rbp) jne .L26 cmpl $65535, -8(%rbp) jne .L26 leaq _ZStL8__ioinit(%rip), %rdi call _ZNSt8ios_base4InitC1Ev@PLT leaq __dso_handle(%rip), %rdx leaq _ZStL8__ioinit(%rip), %rsi movq _ZNSt8ios_base4InitD1Ev@GOTPCREL(%rip), %rax movq %rax, %rdi call __cxa_atexit@PLT .L26: nop leave .cfi_def_cfa 7, 8 ret .cfi_endproc .LFE2013: .size _Z41__static_initialization_and_destruction_0ii, .-_Z41__static_initialization_and_destruction_0ii .type _GLOBAL__sub_I_main, @function _GLOBAL__sub_I_main: