// File: /workspace/github_c_makefile_star2_O3/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 0x3a0c5e(%rip), %rax    # 0x3ac4e8
movl (%rax), %eax
cmpl 0x16f76e(%rip), %eax    # 0x17b000
je 0xba74
movl %eax, 0x16f762(%rip)    # 0x17b000
movslq 0x986ef(%rip), %rcx     # 0xa3f94
leaq 0x1729e4(%rip), %rax    # 0x17e290
cmpb $0x0, (%rax,%rcx)
movslq 0x986d1(%rip), %rcx     # 0xa3f88
movb (%rax,%rcx), %cl
je 0xb903
testb %cl, %cl
jle 0xb8da
movl 0x1224b2(%rip), %ecx    # 0x12dd78
cmpl $0x77, %ecx
movl $0x77, %edx
cmovll %ecx, %edx
addl $0x8, %edx
movl %edx, 0x12249e(%rip)    # 0x12dd78
movslq 0x986ab(%rip), %rcx     # 0xa3f8c
cmpb $0x0, (%rax,%rcx)
jle 0xb948
movl 0x12248b(%rip), %ecx    # 0x12dd78
cmpl $-0x77, %ecx
movl $0xffffff88, %edx       # imm = 0xFFFFFF88
cmovgel %ecx, %edx
addl $-0x8, %edx
movl %edx, 0x122477(%rip)    # 0x12dd78
jmp 0xb948
testb %cl, %cl
jle 0xb921
movl 0x122463(%rip), %ecx    # 0x12dd70
cmpl $-0x6f, %ecx
movl $0xffffff90, %edx       # imm = 0xFFFFFF90
cmovgel %ecx, %edx
addl $-0x10, %edx
movl %edx, 0x12244f(%rip)    # 0x12dd70
movslq 0x98664(%rip), %rcx     # 0xa3f8c
cmpb $0x0, (%rax,%rcx)
jle 0xb948
movl 0x12243c(%rip), %ecx    # 0x12dd70
cmpl $0x6f, %ecx
movl $0x6f, %edx
cmovll %ecx, %edx
addl $0x10, %edx
movl %edx, 0x122428(%rip)    # 0x12dd70
movslq 0x98631(%rip), %rcx     # 0xa3f80
cmpb $0x0, (%rax,%rcx)
jle 0xb96f
movl 0x122419(%rip), %ecx    # 0x12dd74
cmpl $0x77, %ecx
movl $0x77, %edx
cmovll %ecx, %edx
addl $0x8, %edx
movl %edx, 0x122405(%rip)    # 0x12dd74
movslq 0x9860e(%rip), %rcx     # 0xa3f84
cmpb $0x0, (%rax,%rcx)
jle 0xb996
movl 0x1223f2(%rip), %ecx    # 0x12dd74
cmpl $-0x77, %ecx
movl $0xffffff88, %edx       # imm = 0xFFFFFF88
cmovgel %ecx, %edx
addl $-0x8, %edx
movl %edx, 0x1223de(%rip)    # 0x12dd74
movslq 0x98613(%rip), %rcx     # 0xa3fb0
cmpb $0x0, (%rax,%rcx)
jle 0xb9bd
movl 0x1223cf(%rip), %ecx    # 0x12dd78
cmpl $0x77, %ecx
movl $0x77, %edx
cmovll %ecx, %edx
addl $0x8, %edx
movl %edx, 0x1223bb(%rip)    # 0x12dd78
movslq 0x985f0(%rip), %rcx     # 0xa3fb4
cmpb $0x0, (%rax,%rcx)
jle 0xb9e4
movl 0x1223a8(%rip), %eax    # 0x12dd78
cmpl $-0x77, %eax
movl $0xffffff88, %ecx       # imm = 0xFFFFFF88
cmovgel %eax, %ecx
addl $-0x8, %ecx
movl %ecx, 0x122394(%rip)    # 0x12dd78
movl 0x122386(%rip), %eax    # 0x12dd70
testl %eax, %eax
js 0xba00
je 0xba14
cmpl $0xd, %eax
movl $0xc, %ecx
cmovael %eax, %ecx
addl $-0xc, %ecx
jmp 0xba0e
cmpl $-0xc, %eax
movl $0xfffffff4, %ecx       # imm = 0xFFFFFFF4
cmovbl %eax, %ecx
addl $0xc, %ecx
movl %ecx, 0x12235c(%rip)    # 0x12dd70
movl 0x12235e(%rip), %eax    # 0x12dd78
testl %eax, %eax
js 0xba30
je 0xba44
cmpl $0x3, %eax
movl $0x2, %ecx
cmovael %eax, %ecx
addl $-0x2, %ecx
jmp 0xba3e
cmpl $-0x2, %eax
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmovbl %eax, %ecx
addl $0x2, %ecx
movl %ecx, 0x122334(%rip)    # 0x12dd78
movl 0x12232a(%rip), %eax    # 0x12dd74
testl %eax, %eax
js 0xba60
je 0xba74
cmpl $0x3, %eax
movl $0x2, %ecx
cmovael %eax, %ecx
addl $-0x2, %ecx
jmp 0xba6e
cmpl $-0x2, %eax
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmovbl %eax, %ecx
addl $0x2, %ecx
movl %ecx, 0x122300(%rip)    # 0x12dd74
retq