// File: /workspace/github_cpp_makefile_star2_O1/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 0x855a(%rip), %r15      # 0xdfd0
movq (%r15), %rax
movq -0x18(%rax), %rax
movq $0x9, 0x10(%r15,%rax)
movq %rsp, %r12
movq %r12, %rdi
callq 0x3c32
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x2160
movq %rax, %r15
leaq 0x33f1(%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 0x3266(%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 0x5b48
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
movq %r14, %rdi
callq 0x3c44
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq %r14, %rdi
callq 0x3c44
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 0x63c8
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x5e18
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x5bb4
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2150
decl 0x24(%rbx)
jne 0x5c2d
movq 0x8410(%rip), %r14      # 0xdfd0
leaq 0x32e2(%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 0x83de(%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 0x5dac
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x5c48
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 0x5c75
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2150
jmp 0x5c75
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
jne 0x5c91
jmp 0x5c9e
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5c9e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
movq %rbx, %rdi
callq 0x2220