// File: khedoros[P]khednes/mem.cpp
// Function: mem::sendkeyup(SDL_Scancode)
void mem::sendkeyup(SDL_Scancode test) {
        //util::debug(ORIGIN,"Key up! (%04x)\n",test);
        switch(test) {
                case SDL_SCANCODE_A:
                        joy1_buttons[6]=false; //left
                        break;
                case SDL_SCANCODE_D:
                        joy1_buttons[7]=false; //right
                        break;
                case SDL_SCANCODE_G:
                        joy1_buttons[2]=false; //select
                        break;
                case SDL_SCANCODE_H:
                        joy1_buttons[3]=false; //start
                        break;
                case SDL_SCANCODE_K:
                        joy1_buttons[1]=false; //b
                        break;
                case SDL_SCANCODE_L:
                        joy1_buttons[0]=false; //a
                        break;
                case SDL_SCANCODE_S:
                        joy1_buttons[5]=false; //down
                        break;
                case SDL_SCANCODE_W:
                        joy1_buttons[4]=false; //up
                        break;
                case SDL_SCANCODE_GRAVE:
                        pu.speedup(false);
                        break;
                case SDL_SCANCODE_X:
                        joy2_trigger=0;
                        break;
                case SDL_SCANCODE_Z:
                        joy2_light=8;
                        break;
                default: //don't really care about the rest of the values =)
                        break;
        }
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movl %esi, 0x9c(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x9c(%rsp), %eax
addl $-0x4, %eax
movl %eax, %ecx
movq %rcx, 0x10(%rsp)
subl $0x31, %eax
ja 0x143da
movq 0x10(%rsp), %rax
leaq 0x1776f(%rip), %rcx     # 0x2b978
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%rsp), %rsi
addq $0x70, %rsi
leaq 0x88(%rsp), %rdi
movl $0x6, %edx
callq 0x14f60
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
callq 0x14fa0
leaq 0x88(%rsp), %rdi
callq 0x15010
jmp 0x143dc
movq 0x8(%rsp), %rsi
addq $0x70, %rsi
leaq 0x78(%rsp), %rdi
movl $0x7, %edx
callq 0x14f60
leaq 0x78(%rsp), %rdi
xorl %esi, %esi
callq 0x14fa0
leaq 0x78(%rsp), %rdi
callq 0x15010
jmp 0x143dc
movq 0x8(%rsp), %rsi
addq $0x70, %rsi
leaq 0x68(%rsp), %rdi
movl $0x2, %edx
callq 0x14f60
leaq 0x68(%rsp), %rdi
xorl %esi, %esi
callq 0x14fa0
leaq 0x68(%rsp), %rdi
callq 0x15010
jmp 0x143dc
movq 0x8(%rsp), %rsi
addq $0x70, %rsi
leaq 0x58(%rsp), %rdi
movl $0x3, %edx
callq 0x14f60
leaq 0x58(%rsp), %rdi
xorl %esi, %esi
callq 0x14fa0
leaq 0x58(%rsp), %rdi
callq 0x15010
jmp 0x143dc
movq 0x8(%rsp), %rsi
addq $0x70, %rsi
leaq 0x48(%rsp), %rdi
movl $0x1, %edx
callq 0x14f60
leaq 0x48(%rsp), %rdi
xorl %esi, %esi
callq 0x14fa0
leaq 0x48(%rsp), %rdi
callq 0x15010
jmp 0x143dc
movq 0x8(%rsp), %rsi
addq $0x70, %rsi
leaq 0x38(%rsp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0x14f60
leaq 0x38(%rsp), %rdi
xorl %esi, %esi
callq 0x14fa0
leaq 0x38(%rsp), %rdi
callq 0x15010
jmp 0x143dc
movq 0x8(%rsp), %rsi
addq $0x70, %rsi
leaq 0x28(%rsp), %rdi
movl $0x5, %edx
callq 0x14f60
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x14fa0
leaq 0x28(%rsp), %rdi
callq 0x15010
jmp 0x143dc
movq 0x8(%rsp), %rsi
addq $0x70, %rsi
leaq 0x18(%rsp), %rdi
movl $0x4, %edx
callq 0x14f60
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x14fa0
leaq 0x18(%rsp), %rdi
callq 0x15010
jmp 0x143dc
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0x1fdd0
jmp 0x143dc
movq 0x8(%rsp), %rax
movl $0x0, 0x60(%rax)
jmp 0x143dc
movq 0x8(%rsp), %rax
movl $0x8, 0x64(%rax)
jmp 0x143dc
jmp 0x143dc
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)