// File: /workspace/github_c_makefile_star2_O0/aap[P]rx-0/misc/crt.c
// Function: keyup
void
keyup(int scancode)
{
	int i;
	u32 ojoys[NUMJOYS];

	for(i = 0; i < NUMJOYS; i++)
		ojoys[i] = joys[i].b;
	switch(scancode){
	case SDL_SCANCODE_E: KEY1(04);
	case SDL_SCANCODE_X: KEY1(010);
	case SDL_SCANCODE_C: KEY1(020000);
	case SDL_SCANCODE_A: KEY1(020);
	case SDL_SCANCODE_D: KEY1(040);
	case SDL_SCANCODE_S: KEY1(0100);
	case SDL_SCANCODE_W: KEY1(0200);

	case SDL_SCANCODE_U: KEY2(04);
	case SDL_SCANCODE_N: KEY2(010);
	case SDL_SCANCODE_M: KEY2(020000);
	case SDL_SCANCODE_J: KEY2(020);
	case SDL_SCANCODE_L: KEY2(040);
	case SDL_SCANCODE_K: KEY2(0100);
	case SDL_SCANCODE_I: KEY2(0200);
	}
	for(i = 0; i < NUMJOYS; i++)
		if(joys[i].b != ojoys[i])
			updatejoy(&joys[i]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
cmpl $0x4, -0x8(%rbp)
jge 0x29a0
movslq -0x8(%rbp), %rcx
leaq 0x596d(%rip), %rax      # 0x82f0
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x4(%rax), %ecx
movslq -0x8(%rbp), %rax
movl %ecx, -0x20(%rbp,%rax,4)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x2972
movl -0x4(%rbp), %eax
addl $-0x4, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x17, %eax
ja 0x2acf
movq -0x28(%rbp), %rax
leaq 0x3728(%rip), %rcx      # 0x60e8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x5925(%rip), %eax      # 0x82f4
andl $-0x5, %eax
movl %eax, 0x591c(%rip)      # 0x82f4
jmp 0x2acf
movl 0x5911(%rip), %eax      # 0x82f4
andl $-0x9, %eax
movl %eax, 0x5908(%rip)      # 0x82f4
jmp 0x2acf
movl 0x58fd(%rip), %eax      # 0x82f4
andl $0xffffdfff, %eax       # imm = 0xFFFFDFFF
movl %eax, 0x58f2(%rip)      # 0x82f4
jmp 0x2acf
movl 0x58e7(%rip), %eax      # 0x82f4
andl $-0x11, %eax
movl %eax, 0x58de(%rip)      # 0x82f4
jmp 0x2acf
movl 0x58d3(%rip), %eax      # 0x82f4
andl $-0x21, %eax
movl %eax, 0x58ca(%rip)      # 0x82f4
jmp 0x2acf
movl 0x58bf(%rip), %eax      # 0x82f4
andl $-0x41, %eax
movl %eax, 0x58b6(%rip)      # 0x82f4
jmp 0x2acf
movl 0x58ab(%rip), %eax      # 0x82f4
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movl %eax, 0x58a0(%rip)      # 0x82f4
jmp 0x2acf
movl 0x58a8(%rip), %eax      # 0x8304
andl $-0x5, %eax
movl %eax, 0x589f(%rip)      # 0x8304
jmp 0x2acf
movl 0x5897(%rip), %eax      # 0x8304
andl $-0x9, %eax
movl %eax, 0x588e(%rip)      # 0x8304
jmp 0x2acf
movl 0x5886(%rip), %eax      # 0x8304
andl $0xffffdfff, %eax       # imm = 0xFFFFDFFF
movl %eax, 0x587b(%rip)      # 0x8304
jmp 0x2acf
movl 0x5873(%rip), %eax      # 0x8304
andl $-0x11, %eax
movl %eax, 0x586a(%rip)      # 0x8304
jmp 0x2acf
movl 0x5862(%rip), %eax      # 0x8304
andl $-0x21, %eax
movl %eax, 0x5859(%rip)      # 0x8304
jmp 0x2acf
movl 0x5851(%rip), %eax      # 0x8304
andl $-0x41, %eax
movl %eax, 0x5848(%rip)      # 0x8304
jmp 0x2acf
movl 0x5840(%rip), %eax      # 0x8304
andl $0xffffff7f, %eax       # imm = 0xFFFFFF7F
movl %eax, 0x5835(%rip)      # 0x8304
movl $0x0, -0x8(%rbp)
cmpl $0x4, -0x8(%rbp)
jge 0x2b1f
movslq -0x8(%rbp), %rcx
leaq 0x5809(%rip), %rax      # 0x82f0
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movslq -0x8(%rbp), %rcx
cmpl -0x20(%rbp,%rcx,4), %eax
je 0x2b12
movslq -0x8(%rbp), %rax
leaq 0x57ea(%rip), %rdi      # 0x82f0
shlq $0x4, %rax
addq %rax, %rdi
callq 0x26a0
jmp 0x2b14
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x2ad6
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)