// File: /workspace/github_cpp_makefile_star2_O3/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 0x8f76(%rip), %r14      # 0xdfd0
leaq 0x37c3(%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 0x3798(%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 0x373b(%rip), %rsi      # 0x883f
movl $0x18, %edx
movq %rax, %rdi
callq 0x2160
callq 0x678c
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 0x3d90
cmpl $0x1, (%r15)
jne 0x52f6
movq %rbx, %rdi
callq 0x5328
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x3790
movq %r14, %rdi
callq 0x37ac
cmpb $0x0, 0x22(%rbx)
jne 0x52ea
leaq 0x10(%rsp), %r13
leaq 0x28(%rsp), %r14
movq %rsp, %r15
leaq 0x310d(%rip), %r12      # 0x82a9
movq %r14, %rdi
callq 0x3c3e
movq %r15, %rdi
movq %rax, %rsi
callq 0x763a
movq %r15, %rdi
movq %r12, %rsi
callq 0x2050
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x51d2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
testl %ebp, %ebp
je 0x52a2
movq %r14, %rdi
callq 0x3c3e
movq %r15, %rdi
movq %rax, %rsi
callq 0x763a
movq %r15, %rdi
leaq 0x4b00(%rip), %rsi      # 0x9cf7
callq 0x2050
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x5214
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
testl %ebp, %ebp
je 0x52ac
movq %r14, %rdi
callq 0x3c3e
movq %r15, %rdi
movq %rax, %rsi
callq 0x763a
movq %r15, %rdi
leaq 0x49dc(%rip), %rsi      # 0x9c15
callq 0x2050
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x5256
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
testl %ebp, %ebp
je 0x52b9
movq %r14, %rdi
callq 0x3c3e
movq %r15, %rdi
movq %rax, %rsi
callq 0x763a
movq %r15, %rdi
leaq 0x4b82(%rip), %rsi      # 0x9df9
callq 0x2050
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x5294
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
testl %ebp, %ebp
jne 0x52d5
movq %rbx, %rdi
callq 0x5c9e
jmp 0x52c7
movq %rbx, %rdi
callq 0x568a
jmp 0x52e0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x570a
jmp 0x52e0
cmpb $0x1, 0x21(%rbx)
jne 0x52cd
movq %rbx, %rdi
callq 0x5914
movb $0x1, 0x22(%rbx)
jmp 0x52e0
movq %rbx, %rdi
callq 0x59b4
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5a54
cmpb $0x1, 0x22(%rbx)
jne 0x519c
leaq 0x28(%rsp), %rdi
callq 0x379c
jmp 0x52fa
movb $0x1, 0x20(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5313
jmp 0x5313
jmp 0x5313
jmp 0x5313
jmp 0x5313
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x379c
movq %rbx, %rdi
callq 0x2220