// File: /workspace/github_cpp_makefile_star2_O1/venGaza[P]starwars/src/Game.cpp
// Function: Game::menu()
void Game::menu() {
    cout << "1. Start Adventure" << endl             //Menu Choices
         << "2. Exit" << endl << endl
         << "Please select a number: ";
    
    int menuSelection = getInteger();
    cout << endl;
    
    validate(menuSelection, 1, 2);
    
    if (menuSelection == 1) {                       //1. Add a new node to head
        getPlayerName();
        
        Map map;                                        //Generate map
        map.createMap();
        
        while (!gameOver) {
            //Determine what room player is in and advance accordingly
            if (map.getLocation()->getRoomName() == "Supreme Leader Snoke") {
                snokeLoss();
            } else if (map.getLocation()->getRoomName() == "Door") {
                doorInteraction(map);
            } else if (map.getLocation()->getRoomName() == "Command Center") {
                if (kyloWinGame) {
                    kyloWin();
                    gameOver = true;
                } else {
                    kyloLoss();
                    advance(map);
                }
            } else if (map.getLocation()->getRoomName() == "Launch Bay") {
                winMessage();
                gameOver = true;
            } else {
                advance(map);
            }
        }
    } else {                                        //2. Exit program
        exitGame = true;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x8f6e(%rip), %r14      # 0xdfd0
leaq 0x37bb(%rip), %rsi      # 0x8824
movl $0x12, %edx
movq %r14, %rdi
callq 0x2160
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq %rax, %r15
leaq 0x3790(%rip), %rsi      # 0x8837
movl $0x7, %edx
movq %rax, %rdi
callq 0x2160
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
leaq 0x3733(%rip), %rsi      # 0x883f
movl $0x18, %edx
movq %rax, %rdi
callq 0x2160
callq 0x6790
leaq 0x24(%rsp), %r15
movl %eax, (%r15)
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq %r15, %rdi
movl $0x1, %esi
movl $0x2, %edx
callq 0x3d98
cmpl $0x1, (%r15)
jne 0x52fe
movq %rbx, %rdi
callq 0x5330
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x3788
movq %r14, %rdi
callq 0x37a4
cmpb $0x0, 0x22(%rbx)
jne 0x52f2
leaq 0x10(%rsp), %r13
leaq 0x28(%rsp), %r14
movq %rsp, %r15
leaq 0x3105(%rip), %r12      # 0x82a9
movq %r14, %rdi
callq 0x3c44
movq %r15, %rdi
movq %rax, %rsi
callq 0x763e
movq %r15, %rdi
movq %r12, %rsi
callq 0x2050
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x51da
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
testl %ebp, %ebp
je 0x52aa
movq %r14, %rdi
callq 0x3c44
movq %r15, %rdi
movq %rax, %rsi
callq 0x763e
movq %r15, %rdi
leaq 0x4af8(%rip), %rsi      # 0x9cf7
callq 0x2050
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x521c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
testl %ebp, %ebp
je 0x52b4
movq %r14, %rdi
callq 0x3c44
movq %r15, %rdi
movq %rax, %rsi
callq 0x763e
movq %r15, %rdi
leaq 0x49d4(%rip), %rsi      # 0x9c15
callq 0x2050
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x525e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
testl %ebp, %ebp
je 0x52c1
movq %r14, %rdi
callq 0x3c44
movq %r15, %rdi
movq %rax, %rsi
callq 0x763e
movq %r15, %rdi
leaq 0x4b7a(%rip), %rsi      # 0x9df9
callq 0x2050
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x529c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
testl %ebp, %ebp
jne 0x52dd
movq %rbx, %rdi
callq 0x5ca6
jmp 0x52cf
movq %rbx, %rdi
callq 0x5692
jmp 0x52e8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5712
jmp 0x52e8
cmpb $0x1, 0x21(%rbx)
jne 0x52d5
movq %rbx, %rdi
callq 0x591c
movb $0x1, 0x22(%rbx)
jmp 0x52e8
movq %rbx, %rdi
callq 0x59bc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5a5c
cmpb $0x1, 0x22(%rbx)
jne 0x51a4
leaq 0x28(%rsp), %rdi
callq 0x3794
jmp 0x5302
movb $0x1, 0x20(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x531b
jmp 0x531b
jmp 0x531b
jmp 0x531b
jmp 0x531b
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3794
movq %rbx, %rdi
callq 0x2220