// File: /workspace/github_cpp_makefile_star2_O3/venGaza[P]starwars/src/Game.cpp
// Function: Game::advance(Map&)
void Game::advance(Map& map) {
    cout << setw(9) << map.currentRoom() << " | Health: " << playerHealth << endl  //Header
    << "---------------------------------" << endl;
    
    map.getLocation()->printChoices();
    
    string choice = map.getLocation()->getChoice();
    doAction(choice, map);          //If not execute player choice
    
    //Update player health after turn
    playerHealth--;
    if (playerHealth == 0) {
        cout << "The combined effects of the blast and adventure have taken its toll... the galaxy starts to slip into darkness as you lose consciousness." << endl << endl;
        gameOver = true;
    }
    pause();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8562(%rip), %r15      # 0xdfd0
movq (%r15), %rax
movq -0x18(%rax), %rax
movq $0x9, 0x10(%r15,%rax)
movq %rsp, %r12
movq %r12, %rdi
callq 0x3c2c
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x2160
movq %rax, %r15
leaq 0x33f9(%rip), %rsi      # 0x8e9d
movl $0xb, %edx
movq %rax, %rdi
callq 0x2160
movl 0x24(%rbx), %esi
movq %r15, %rdi
callq 0x2210
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
movq %rax, %r15
leaq 0x326e(%rip), %rsi      # 0x8d5e
movl $0x21, %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
leaq 0x10(%rsp), %r12
movq -0x10(%r12), %rdi
cmpq %r12, %rdi
je 0x5b40
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
movq %r14, %rdi
callq 0x3c3e
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq %r14, %rdi
callq 0x3c3e
movq (%rax), %rcx
movq %rsp, %r15
movq %r15, %rdi
movq %rax, %rsi
callq *0x18(%rcx)
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x63c0
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x5e10
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x5bac
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2150
decl 0x24(%rbx)
jne 0x5c25
movq 0x8418(%rip), %r14      # 0xdfd0
leaq 0x32ea(%rip), %rsi      # 0x8ea9
movl $0x89, %edx
movq %r14, %rdi
callq 0x2160
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2130
movsbl %al, %esi
movq 0x83e6(%rip), %rdi      # 0xdfd0
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq %rax, %r14
movq (%rax), %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
movb $0x1, 0x22(%rbx)
callq 0x5da4
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x5c40
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x5c6d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2150
jmp 0x5c6d
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
jne 0x5c89
jmp 0x5c96
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5c96
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
movq %rbx, %rdi
callq 0x2220