// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/src/bstub.c
// Function: ExtCheckKeys
void ExtCheckKeys(void)
{
	int i, j;

	if (qsetmode == 200)    //In 3D mode
	{
         if( somethingintab == 3 )   // prevent extra value copy
              somethingintab = 254;

		i = frameval[framecnt&(AVERAGEFRAMES-1)];
		j = frameval[framecnt&(AVERAGEFRAMES-1)] = getticks(); framecnt++;
		if (i != j) averagefps = ((mul3(averagefps)+((AVERAGEFRAMES*1000)/(j-i)) )>>2);
		Bsprintf(tempbuf,"%d",averagefps);
		printext256(0L,0L,31,-1,tempbuf,1);

		editinput();
	}
	else
	{
         if( keystatus[39] == 1 ) {  // ';' to clear all exts 
              keystatus[39]=0;
              JS_ClearAllExts();
         }
         if( keystatus[26] == 1 ) {  // '[' to clear all exts 
              keystatus[26]=0;
              JS_ClearAllSprites();
         }
         if( keystatus[47] == 1 ) {  // 'V' to edit velocity
              keystatus[47]=0;
              editvelocity=1;
              keystatus[66]=1;
         }
         if( keystatus[40] == 1 ) {  // ''' to cleanup from old versions
              keystatus[40]=0;
              docleanup=1;
              keystatus[66]=1;
         }
         if( keystatus[27] == 1 ) {  // ']' match cstats
              keystatus[27]=0;
              JS_MatchCstats();
         }
         if( keystatus[45] == 1 ) {  // XT Copy
              keystatus[45]=0;
              copyext=1;
              keystatus[64]=1;
         }
         if( keystatus[19] == 1 ) {  // XT Record
              keystatus[19]=0;
              recordext=1;
              keystatus[64]=1;
         }
         if( keystatus[50] == 1 ) {  // 'M' for Manual on sprites
              keystatus[50]=0;
              liststates=1;
              JS_SpriteXTManual();
         }
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x1ea629(%rip), %rax    # 0x1f5588
cmpl $0xc8, (%rax)
jne 0xb045
leaq 0xd503c(%rip), %rax     # 0xdffae
movzbl (%rax), %eax
cmpl $0x3, %eax
jne 0xaf84
leaq 0xd502d(%rip), %rax     # 0xdffae
movb $-0x2, (%rax)
movl 0x15f086(%rip), %eax    # 0x16a010
andl $0xf, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x15f038(%rip), %rax    # 0x169fd0
movl (%rax,%rcx,4), %eax
movl %eax, -0x4(%rbp)
callq 0xa56e0
movl 0x15f067(%rip), %ecx    # 0x16a010
andl $0xf, %ecx
movl %ecx, %ecx
movl %ecx, %edx
leaq 0x15f019(%rip), %rcx    # 0x169fd0
movl %eax, (%rcx,%rdx,4)
movl %eax, -0x8(%rbp)
movl 0x15f04d(%rip), %eax    # 0x16a010
addl $0x1, %eax
movl %eax, 0x15f044(%rip)    # 0x16a010
movl -0x4(%rbp), %eax
cmpl -0x8(%rbp), %eax
je 0xb000
movl 0x15f03a(%rip), %edi    # 0x16a014
callq 0xb190
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %ecx
subl -0x4(%rbp), %ecx
movl $0x3e80, %eax           # imm = 0x3E80
cltd
idivl %ecx
movl %eax, %ecx
movl -0xc(%rbp), %eax
addl %ecx, %eax
sarl $0x2, %eax
movl %eax, 0x15f014(%rip)    # 0x16a014
movl 0x15f00e(%rip), %edx    # 0x16a014
leaq 0xd6e23(%rip), %rdi     # 0xe1e30
leaq 0xa5c40(%rip), %rsi     # 0xb0c54
movb $0x0, %al
callq 0x6a30
xorl %esi, %esi
movl $0x1f, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
leaq 0xd6e02(%rip), %r8      # 0xe1e30
movl $0x1, %r9d
movl %esi, %edi
callq 0x59a30
callq 0x1a4a0
jmp 0xb182
leaq 0x1afda4(%rip), %rax    # 0x1badf0
movsbl 0x27(%rax), %eax
cmpl $0x1, %eax
jne 0xb065
leaq 0x1afd94(%rip), %rax    # 0x1badf0
movb $0x0, 0x27(%rax)
callq 0x97f0
leaq 0x1afd84(%rip), %rax    # 0x1badf0
movsbl 0x1a(%rax), %eax
cmpl $0x1, %eax
jne 0xb085
leaq 0x1afd74(%rip), %rax    # 0x1badf0
movb $0x0, 0x1a(%rax)
callq 0x9900
leaq 0x1afd64(%rip), %rax    # 0x1badf0
movsbl 0x2f(%rax), %eax
cmpl $0x1, %eax
jne 0xb0b2
leaq 0x1afd54(%rip), %rax    # 0x1badf0
movb $0x0, 0x2f(%rax)
movb $0x1, 0xd6d7d(%rip)     # 0xe1e24
leaq 0x1afd42(%rip), %rax    # 0x1badf0
movb $0x1, 0x42(%rax)
leaq 0x1afd37(%rip), %rax    # 0x1badf0
movsbl 0x28(%rax), %eax
cmpl $0x1, %eax
jne 0xb0df
leaq 0x1afd27(%rip), %rax    # 0x1badf0
movb $0x0, 0x28(%rax)
movb $0x1, 0xd6d56(%rip)     # 0xe1e2a
leaq 0x1afd15(%rip), %rax    # 0x1badf0
movb $0x1, 0x42(%rax)
leaq 0x1afd0a(%rip), %rax    # 0x1badf0
movsbl 0x1b(%rax), %eax
cmpl $0x1, %eax
jne 0xb0ff
leaq 0x1afcfa(%rip), %rax    # 0x1badf0
movb $0x0, 0x1b(%rax)
callq 0x6ea0
leaq 0x1afcea(%rip), %rax    # 0x1badf0
movsbl 0x2d(%rax), %eax
cmpl $0x1, %eax
jne 0xb12c
leaq 0x1afcda(%rip), %rax    # 0x1badf0
movb $0x0, 0x2d(%rax)
movb $0x1, 0xd6d05(%rip)     # 0xe1e26
leaq 0x1afcc8(%rip), %rax    # 0x1badf0
movb $0x1, 0x40(%rax)
leaq 0x1afcbd(%rip), %rax    # 0x1badf0
movsbl 0x13(%rax), %eax
cmpl $0x1, %eax
jne 0xb159
leaq 0x1afcad(%rip), %rax    # 0x1badf0
movb $0x0, 0x13(%rax)
movb $0x1, 0xd6cd9(%rip)     # 0xe1e27
leaq 0x1afc9b(%rip), %rax    # 0x1badf0
movb $0x1, 0x40(%rax)
leaq 0x1afc90(%rip), %rax    # 0x1badf0
movsbl 0x32(%rax), %eax
cmpl $0x1, %eax
jne 0xb180
leaq 0x1afc80(%rip), %rax    # 0x1badf0
movb $0x0, 0x32(%rax)
movb $0x1, 0xd6cad(%rip)     # 0xe1e28
callq 0x9e60
jmp 0xb182
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)