// File: /workspace/github_c_makefile_star2_O2/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 0x39a9d3(%rip), %rax    # 0x3a54e8
movl (%rax), %eax
cmpl 0x1694e3(%rip), %eax    # 0x174000
je 0xacd6
movl %eax, 0x1694d7(%rip)    # 0x174000
movslq 0x92464(%rip), %rax     # 0x9cf94
leaq 0x16c759(%rip), %rcx    # 0x177290
cmpb $0x0, (%rcx,%rax)
movslq 0x92446(%rip), %rax     # 0x9cf88
movb (%rcx,%rax), %sil
pushq $-0x78
popq %rax
pushq $0x77
popq %rdx
je 0xab8c
testb %sil, %sil
jle 0xab68
movl 0x11c21f(%rip), %esi    # 0x126d78
cmpl $0x77, %esi
cmovgel %edx, %esi
addl $0x8, %esi
movl %esi, 0x11c210(%rip)    # 0x126d78
movslq 0x9241d(%rip), %rsi     # 0x9cf8c
cmpb $0x0, (%rcx,%rsi)
jle 0xabce
movl 0x11c1fd(%rip), %esi    # 0x126d78
cmpl $-0x77, %esi
cmovll %eax, %esi
addl $-0x8, %esi
movl %esi, 0x11c1ee(%rip)    # 0x126d78
jmp 0xabce
testb %sil, %sil
jle 0xaba9
movl 0x11c1d9(%rip), %esi    # 0x126d70
cmpl $-0x6f, %esi
pushq $-0x70
popq %rdi
cmovgel %esi, %edi
addl $-0x10, %edi
movl %edi, 0x11c1c7(%rip)    # 0x126d70
movslq 0x923dc(%rip), %rsi     # 0x9cf8c
cmpb $0x0, (%rcx,%rsi)
jle 0xabce
movl 0x11c1b4(%rip), %esi    # 0x126d70
cmpl $0x6f, %esi
pushq $0x6f
popq %rdi
cmovll %esi, %edi
addl $0x10, %edi
movl %edi, 0x11c1a2(%rip)    # 0x126d70
movslq 0x923ab(%rip), %rsi     # 0x9cf80
cmpb $0x0, (%rcx,%rsi)
jle 0xabf0
movl 0x11c193(%rip), %esi    # 0x126d74
cmpl $0x77, %esi
cmovgel %edx, %esi
addl $0x8, %esi
movl %esi, 0x11c184(%rip)    # 0x126d74
movslq 0x9238d(%rip), %rsi     # 0x9cf84
cmpb $0x0, (%rcx,%rsi)
jle 0xac12
movl 0x11c171(%rip), %esi    # 0x126d74
cmpl $-0x77, %esi
cmovll %eax, %esi
addl $-0x8, %esi
movl %esi, 0x11c162(%rip)    # 0x126d74
movslq 0x92397(%rip), %rsi     # 0x9cfb0
cmpb $0x0, (%rcx,%rsi)
jle 0xac34
movl 0x11c153(%rip), %esi    # 0x126d78
cmpl $0x77, %esi
cmovll %esi, %edx
addl $0x8, %edx
movl %edx, 0x11c144(%rip)    # 0x126d78
movslq 0x92379(%rip), %rdx     # 0x9cfb4
cmpb $0x0, (%rcx,%rdx)
jle 0xac56
movl 0x11c131(%rip), %ecx    # 0x126d78
cmpl $-0x77, %ecx
cmovgel %ecx, %eax
addl $-0x8, %eax
movl %eax, 0x11c122(%rip)    # 0x126d78
movl 0x11c114(%rip), %eax    # 0x126d70
testl %eax, %eax
js 0xac70
je 0xac82
cmpl $0xd, %eax
pushq $0xc
popq %rcx
cmovael %eax, %ecx
addl $-0xc, %ecx
jmp 0xac7c
cmpl $-0xc, %eax
pushq $-0xc
popq %rcx
cmovbl %eax, %ecx
addl $0xc, %ecx
movl %ecx, 0x11c0ee(%rip)    # 0x126d70
movl 0x11c0f0(%rip), %edx    # 0x126d78
pushq $0x2
popq %rcx
pushq $-0x2
popq %rax
testl %edx, %edx
js 0xac9f
je 0xacae
cmpl $0x3, %edx
cmovbl %ecx, %edx
addl $-0x2, %edx
jmp 0xaca8
cmpl $-0x2, %edx
cmovael %eax, %edx
addl $0x2, %edx
movl %edx, 0x11c0ca(%rip)    # 0x126d78
movl 0x11c0c0(%rip), %edx    # 0x126d74
testl %edx, %edx
js 0xacc7
je 0xacd6
cmpl $0x3, %edx
cmovael %edx, %ecx
addl $-0x2, %ecx
movl %ecx, %eax
jmp 0xacd0
cmpl $-0x2, %edx
cmovbl %edx, %eax
addl $0x2, %eax
movl %eax, 0x11c09e(%rip)    # 0x126d74
retq