// File: /workspace/github_cpp_makefile_star2_O3/dnegovan[P]Intruder-On-Donnar-V/Game.cpp
// Function: Game::move()
bool Game::move()
{
    int input = 0;
    int menuNum;
    int up, down, left, right;

    while (input < 1 || input > menuNum)
    {
        menuNum = 1;

        //need to store menu number for each direction then use in switch case
        up = 0, down = 0, left = 0, right = 0;

        std::cout << std::endl;
        //list option that are available
        if (currentSpace->up)  //false if nullptr
        {
            up = menuNum;
            std::cout << menuNum << ". To "
                      << currentSpace->up->getRoomName() << std::endl;
            menuNum++;
        }
        if (currentSpace->right)
        {
            right = menuNum;
            std::cout << menuNum << ". To "
                      << currentSpace->right->getRoomName() << std::endl;
            menuNum++;
        }
        if (currentSpace->down)
        {
            down = menuNum;
            std::cout << menuNum << ". To "
                      << currentSpace->down->getRoomName() << std::endl;
            menuNum++;
        }
        if (currentSpace->left)
        {
            left = menuNum;
            std::cout << menuNum << ". To "
                      << currentSpace->left->getRoomName() << std::endl;
            menuNum++;
        }

        std::cout << menuNum << ". Cancel" << std::endl;

        input = getInteger();
    }

    if (input == up)
    {
            currentSpace = currentSpace->up;
            return true;
    }
    else if (input == down)
    {
            currentSpace = currentSpace->down;
            return true;
    }
    else if (input == left)
    {
            currentSpace = currentSpace->left;
            return true;
    }
    else if (input == right)
    {
            currentSpace = currentSpace->right;
            return true;
    }
    //if we get here they must have hit cancel
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq -0x38(%rbp), %r13
movq 0x9c23(%rip), %r14      # 0x1bfc8
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3140
movq 0xc0(%rbx), %rax
cmpq $0x0, 0x48(%rax)
movl $0x1, %r15d
movl $0x0, %r12d
je 0x12481
movq 0x9bd7(%rip), %rdi      # 0x1bfc8
movl $0x1, %esi
callq 0x3310
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x459e(%rip), %rsi      # 0x169ab
callq 0x3210
movq 0xc0(%rbx), %rax
movq 0x48(%rax), %rsi
leaq -0x48(%rbp), %rdi
callq 0x14060
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r14, %rdi
callq 0x3210
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3140
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x1246e
callq 0x31c0
movq 0xc0(%rbx), %rax
movl $0x1, %r12d
movl $0x2, %r15d
cmpq $0x0, 0x60(%rax)
movl %r12d, -0x4c(%rbp)
je 0x1251f
movq 0x9b31(%rip), %rdi      # 0x1bfc8
movl %r15d, %esi
callq 0x3310
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x44fa(%rip), %rsi      # 0x169ab
callq 0x3210
movq 0xc0(%rbx), %rax
movq 0x60(%rax), %rsi
leaq -0x48(%rbp), %rdi
callq 0x14060
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r14, %rdi
callq 0x3210
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3140
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x12512
callq 0x31c0
leal 0x1(%r15), %r12d
movq 0xc0(%rbx), %rax
jmp 0x12525
movl %r15d, %r12d
xorl %r15d, %r15d
cmpq $0x0, 0x50(%rax)
movq %r15, -0x58(%rbp)
je 0x125c4
movq 0x9a8d(%rip), %rdi      # 0x1bfc8
movl %r12d, %esi
callq 0x3310
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x4456(%rip), %rsi      # 0x169ab
callq 0x3210
movq 0xc0(%rbx), %rax
movq 0x50(%rax), %rsi
leaq -0x48(%rbp), %rdi
callq 0x14060
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r14, %rdi
callq 0x3210
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3140
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x125b6
callq 0x31c0
leal 0x1(%r12), %r15d
movq 0xc0(%rbx), %rax
jmp 0x125ca
movl %r12d, %r15d
xorl %r12d, %r12d
cmpq $0x0, 0x58(%rax)
je 0x1265d
movq 0x99ec(%rip), %rdi      # 0x1bfc8
movl %r15d, %esi
callq 0x3310
movq %rax, %r14
movl $0x5, %edx
movq %rax, %rdi
leaq 0x43b5(%rip), %rsi      # 0x169ab
callq 0x3210
movq 0xc0(%rbx), %rax
movq 0x58(%rax), %rsi
leaq -0x48(%rbp), %rdi
callq 0x14060
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %r14, %rdi
callq 0x3210
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3140
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x12657
callq 0x31c0
leal 0x1(%r15), %r14d
jmp 0x12663
movl %r15d, %r14d
xorl %r15d, %r15d
movq 0x995e(%rip), %rdi      # 0x1bfc8
movl %r14d, %esi
callq 0x3310
movq %rax, %r13
movl $0x8, %edx
movq %rax, %rdi
leaq 0x432d(%rip), %rsi      # 0x169b1
callq 0x3210
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x31d0
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3140
callq 0xf6ef
testl %eax, %eax
leaq -0x38(%rbp), %r13
jle 0x1239e
cmpl %r14d, %eax
jg 0x1239e
movl $0x48, %ecx
cmpl -0x4c(%rbp), %eax
je 0x126f3
movl $0x50, %ecx
cmpl %r12d, %eax
je 0x126f3
movl $0x58, %ecx
cmpl %r15d, %eax
je 0x126f3
movl $0x60, %ecx
cmpl -0x58(%rbp), %eax
jne 0x12716
movq 0xc0(%rbx), %rax
movq (%rax,%rcx), %rax
movq %rax, 0xc0(%rbx)
movb $0x1, %al
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x12707
jmp 0x12720
jmp 0x12720
jmp 0x12720
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0x12731
callq 0x31c0
movq %rbx, %rdi
callq 0x3320
nop