// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/build.c
// Function: keytimerstuff
void keytimerstuff(void)
{
	static int ltotalclock=0;
	if (totalclock == ltotalclock) return;
	ltotalclock=totalclock;

	if (keystatus[buildkeys[5]] == 0)
	{
		if (keystatus[buildkeys[2]] > 0) angvel = max(angvel-16,-128);
		if (keystatus[buildkeys[3]] > 0) angvel = min(angvel+16,127);
	}
	else
	{
		if (keystatus[buildkeys[2]] > 0) svel = min(svel+8,127);
		if (keystatus[buildkeys[3]] > 0) svel = max(svel-8,-128);
	}
	if (keystatus[buildkeys[0]] > 0) vel = min(vel+8,127);
	if (keystatus[buildkeys[1]] > 0) vel = max(vel-8,-128);
	if (keystatus[buildkeys[12]] > 0) svel = min(svel+8,127);
	if (keystatus[buildkeys[13]] > 0) svel = max(svel-8,-128);

	if (angvel < 0) angvel = min(angvel+12,0);
	if (angvel > 0) angvel = max(angvel-12,0);
	if (svel < 0) svel = min(svel+2,0);
	if (svel > 0) svel = max(svel-2,0);
	if (vel < 0) vel = min(vel+2,0);
	if (vel > 0) vel = max(vel-2,0);
}

// Assembly:
leaq 0x39fdc2(%rip), %rax    # 0x3ab4e8
movl (%rax), %eax
cmpl 0x16e8d2(%rip), %eax    # 0x17a000
je 0xb934
movl %eax, 0x16e8c6(%rip)    # 0x17a000
movslq 0x97853(%rip), %rcx     # 0xa2f94
leaq 0x171b48(%rip), %rax    # 0x17d290
cmpb $0x0, (%rax,%rcx)
movslq 0x97835(%rip), %rcx     # 0xa2f88
movb (%rax,%rcx), %cl
je 0xb79f
testb %cl, %cl
jle 0xb776
movl 0x121616(%rip), %ecx    # 0x12cd78
cmpl $0x77, %ecx
movl $0x77, %edx
cmovll %ecx, %edx
addl $0x8, %edx
movl %edx, 0x121602(%rip)    # 0x12cd78
movslq 0x9780f(%rip), %rcx     # 0xa2f8c
cmpb $0x0, (%rax,%rcx)
jle 0xb7e4
movl 0x1215ef(%rip), %ecx    # 0x12cd78
cmpl $-0x77, %ecx
movl $0xffffff88, %edx       # imm = 0xFFFFFF88
cmovgel %ecx, %edx
addl $-0x8, %edx
movl %edx, 0x1215db(%rip)    # 0x12cd78
jmp 0xb7e4
testb %cl, %cl
jle 0xb7bd
movl 0x1215c7(%rip), %ecx    # 0x12cd70
cmpl $-0x6f, %ecx
movl $0xffffff90, %edx       # imm = 0xFFFFFF90
cmovgel %ecx, %edx
addl $-0x10, %edx
movl %edx, 0x1215b3(%rip)    # 0x12cd70
movslq 0x977c8(%rip), %rcx     # 0xa2f8c
cmpb $0x0, (%rax,%rcx)
jle 0xb7e4
movl 0x1215a0(%rip), %ecx    # 0x12cd70
cmpl $0x6f, %ecx
movl $0x6f, %edx
cmovll %ecx, %edx
addl $0x10, %edx
movl %edx, 0x12158c(%rip)    # 0x12cd70
movslq 0x97795(%rip), %rcx     # 0xa2f80
cmpb $0x0, (%rax,%rcx)
jle 0xb80b
movl 0x12157d(%rip), %ecx    # 0x12cd74
cmpl $0x77, %ecx
movl $0x77, %edx
cmovll %ecx, %edx
addl $0x8, %edx
movl %edx, 0x121569(%rip)    # 0x12cd74
movslq 0x97772(%rip), %rcx     # 0xa2f84
cmpb $0x0, (%rax,%rcx)
jle 0xb832
movl 0x121556(%rip), %ecx    # 0x12cd74
cmpl $-0x77, %ecx
movl $0xffffff88, %edx       # imm = 0xFFFFFF88
cmovgel %ecx, %edx
addl $-0x8, %edx
movl %edx, 0x121542(%rip)    # 0x12cd74
movslq 0x97777(%rip), %rcx     # 0xa2fb0
cmpb $0x0, (%rax,%rcx)
jle 0xb859
movl 0x121533(%rip), %ecx    # 0x12cd78
cmpl $0x77, %ecx
movl $0x77, %edx
cmovll %ecx, %edx
addl $0x8, %edx
movl %edx, 0x12151f(%rip)    # 0x12cd78
movslq 0x97754(%rip), %rcx     # 0xa2fb4
cmpb $0x0, (%rax,%rcx)
jle 0xb880
movl 0x12150c(%rip), %eax    # 0x12cd78
cmpl $-0x77, %eax
movl $0xffffff88, %ecx       # imm = 0xFFFFFF88
cmovgel %eax, %ecx
addl $-0x8, %ecx
movl %ecx, 0x1214f8(%rip)    # 0x12cd78
movl 0x1214ea(%rip), %eax    # 0x12cd70
testl %eax, %eax
jns 0xb89e
cmpl $-0xc, %eax
movl $0xfffffff4, %ecx       # imm = 0xFFFFFFF4
cmovll %eax, %ecx
addl $0xc, %ecx
movl %ecx, 0x1214d2(%rip)    # 0x12cd70
movl 0x1214cc(%rip), %eax    # 0x12cd70
testl %eax, %eax
jle 0xb8bc
cmpl $0xd, %eax
movl $0xc, %ecx
cmovgel %eax, %ecx
addl $-0xc, %ecx
movl %ecx, 0x1214b4(%rip)    # 0x12cd70
movl 0x1214b6(%rip), %eax    # 0x12cd78
testl %eax, %eax
jns 0xb8da
cmpl $-0x2, %eax
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmovll %eax, %ecx
addl $0x2, %ecx
movl %ecx, 0x12149e(%rip)    # 0x12cd78
movl 0x121498(%rip), %eax    # 0x12cd78
testl %eax, %eax
jle 0xb8f8
cmpl $0x3, %eax
movl $0x2, %ecx
cmovgel %eax, %ecx
addl $-0x2, %ecx
movl %ecx, 0x121480(%rip)    # 0x12cd78
movl 0x121476(%rip), %eax    # 0x12cd74
testl %eax, %eax
jns 0xb916
cmpl $-0x2, %eax
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmovll %eax, %ecx
addl $0x2, %ecx
movl %ecx, 0x12145e(%rip)    # 0x12cd74
movl 0x121458(%rip), %eax    # 0x12cd74
testl %eax, %eax
jle 0xb934
cmpl $0x3, %eax
movl $0x2, %ecx
cmovgel %eax, %ecx
addl $-0x2, %ecx
movl %ecx, 0x121440(%rip)    # 0x12cd74
retq