// File: JacobLCarter[P]2D-Portal/game.cpp
// Function: Game::executeUserInput(char)
void Game::executeUserInput(char userInput)
{
    //switch based on the user's chosen control input
    switch(userInput)
    {
        //move up
        case 'w': makeMove(userInput);
                  break;
        //move down 
        case 's': makeMove(userInput);
                  break;
        //move left 
        case 'a': makeMove(userInput);
                  break;
        //move right 
        case 'd': makeMove(userInput);
                  break;
        //move through Portal 
        case 'e': moveThroughPortal();
                  break;
        //show contents of player's backpack
        case 'b': testSubject->displayBackpackContents();
                  break;
        //show map legend 
        case 'm': std::cout << map->getMapLegend() << std::endl;
                  break;
        //show number of turns left 
        case 't': std::cout << "You have " << turnCounter 
                            << " turns before immolation." << std::endl;
                  break;
        //show help menu 
        case 'h': std::cout << displayHelpMenu();
                  break;
        //quit game 
        case 'x': endGame(EXITED);
                  break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movsbl -0x9(%rbp), %eax
addl $-0x61, %eax
movl %eax, %ecx
movq %rcx, -0x68(%rbp)
subl $0x17, %eax
ja 0x508e
movq -0x68(%rbp), %rax
leaq 0x71fe(%rip), %rcx      # 0xc11c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x70(%rbp), %rdi
movsbl -0x9(%rbp), %esi
callq 0x4790
jmp 0x508e
movq -0x70(%rbp), %rdi
movsbl -0x9(%rbp), %esi
callq 0x4790
jmp 0x508e
movq -0x70(%rbp), %rdi
movsbl -0x9(%rbp), %esi
callq 0x4790
jmp 0x508e
movq -0x70(%rbp), %rdi
movsbl -0x9(%rbp), %esi
callq 0x4790
jmp 0x508e
movq -0x70(%rbp), %rdi
callq 0x4c40
jmp 0x508e
movq -0x70(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x6790
jmp 0x508e
movq -0x70(%rbp), %rax
movq 0x18(%rax), %rsi
leaq -0x30(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x88b0
movq -0x80(%rbp), %rsi
movq 0xe021(%rip), %rdi      # 0x12fd0
callq 0x31f0
movq %rax, -0x78(%rbp)
jmp 0x4fba
movq -0x78(%rbp), %rdi
movq 0xdffb(%rip), %rsi      # 0x12fc0
callq 0x3240
jmp 0x4fcc
leaq -0x30(%rbp), %rdi
callq 0x3140
jmp 0x508e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3140
jmp 0x5097
movq 0xdfd5(%rip), %rdi      # 0x12fd0
leaq 0x8553(%rip), %rsi      # 0xd555
callq 0x3210
movq %rax, %rdi
movq -0x70(%rbp), %rax
movl (%rax), %esi
callq 0x33a0
movq %rax, %rdi
leaq 0x8540(%rip), %rsi      # 0xd55f
callq 0x3210
movq %rax, %rdi
movq 0xdf92(%rip), %rsi      # 0x12fc0
callq 0x3240
jmp 0x508e
movq -0x70(%rbp), %rsi
leaq -0x60(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x4690
movq -0x88(%rbp), %rsi
movq 0xdf79(%rip), %rdi      # 0x12fd0
callq 0x31f0
jmp 0x505e
leaq -0x60(%rbp), %rdi
callq 0x3140
jmp 0x508e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3140
jmp 0x5097
movq -0x70(%rbp), %rdi
movl $0x3, %esi
callq 0x50a0
addq $0x90, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x33b0