// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/src/tekmsc.c
// Function: tekprivatekeys
int
tekprivatekeys(void)
{
     if( activemenu != 0 ) {
          return(0);
     }

     // alt hot keys - non mappable
     /*
     if( (keystatus[56] != 0) && (keystatus[25] != 0) ) {
          keystatus[56]=0;
          keystatus[25]=0;
          cd_play();
     }
     if( (keystatus[56] != 0) && (keystatus[19] != 0) ) {
          keystatus[56]=0;
          keystatus[19]=0;
          cd_resetdisc();
     }
     if( (keystatus[56] != 0) && (keystatus[31] != 0) ) {
          keystatus[56]=0;
          keystatus[31]=0;
          cd_stopplay();
     }
     if( (keystatus[56] != 0) && (keystatus[33] != 0) ) {
          keystatus[56]=0;
          keystatus[33]=0;
          cd_advancetrack();
     }
     if( (keystatus[56] != 0) && (keystatus[48] != 0) ) {
          keystatus[56]=0;
          keystatus[48]=0;
          cd_retardtrack();
     }
     */
     if( (keystatus[56] != 0) && (keystatus[16] != 0) ) {
          keystatus[56]=0;
          keystatus[16]=0;
          gameover=1;
     }

     // cheat num lock keys
     if( (keystatus[56] != 0) && (keystatus[42] != 0) && (option[4] == 0) ) {
          if( keystatus[34] != 0 ) {
               toggles[TOGGLE_GODMODE]^=0x01;
               if( toggles[TOGGLE_GODMODE] ) {
                    holyon();
               }
               else {
                    holyoff();
               }
               keystatus[34]=0;
          }
          if( keystatus[35] != 0 ) {
               changehealth(screenpeek, 200);
               keystatus[35]=0;
          }
          if( keystatus[36] != 0 ) {
               symbols[0]=1;
               symbols[1]=1;
               symbols[2]=1;
               symbols[3]=1;
               symbols[4]=1;
               symbols[5]=1;
               symbols[6]=1;
               keystatus[36]=0;
          }
          if( keystatus[17] != 0 ) {
               ammo1[screenpeek]=MAXAMMO;
               ammo2[screenpeek]=MAXAMMO;
               ammo3[screenpeek]=MAXAMMO;
               ammo4[screenpeek]=MAXAMMO;
               ammo5[screenpeek]=MAXAMMO;
               ammo6[screenpeek]=MAXAMMO;
               ammo7[screenpeek]=MAXAMMO;
               ammo8[screenpeek]=MAXAMMO;
               invredcards[screenpeek]=1;
               invbluecards[screenpeek]=1;
               invaccutrak[screenpeek]=1;
               weapons[screenpeek] =(flags32[GUN1FLAG]|flags32[GUN2FLAG]|flags32[GUN3FLAG]|flags32[GUN4FLAG]);
               weapons[screenpeek]|=(flags32[GUN5FLAG]|flags32[GUN6FLAG]|flags32[GUN7FLAG]|flags32[GUN8FLAG]);
               keystatus[17]=0;
          }
          keystatus[69]=0;
     }

     // local game keys
     if( keystatus[keys[23]] != 0 ) {
          keystatus[keys[23]]=0;
          toggles[TOGGLE_RETICULE]^=0x01;
     }
     if( keystatus[keys[24]] != 0 ) {
          keystatus[keys[24]]=0;
          toggles[TOGGLE_TIME]^=0x01;
     }
     if( keystatus[keys[25]] != 0 ) {
          keystatus[keys[25]]=0;
          toggles[TOGGLE_SCORE]^=0x01;

     }
     if( keystatus[keys[20]] != 0 ) {
          keystatus[keys[20]]=0;
          toggles[TOGGLE_REARVIEW]^=0x01;
          playsound( S_REARMONITOR,0,0,0, ST_IMMEDIATE);
          rvmoving=1;
     }
     if( keystatus[keys[21]] != 0 ) {
          keystatus[keys[21]]=0;
          toggles[TOGGLE_UPRT]^=0x01;
          playsound(S_STATUS1+toggles[TOGGLE_UPRT],0,0,0, ST_IMMEDIATE);
          wpmoving=1;
     }
     if (keystatus[keys[22]] != 0) {
          keystatus[keys[22]]=0;
          toggles[TOGGLE_HEALTH]^=0x01;
          playsound( S_HEALTHMONITOR,0,0,0, ST_IMMEDIATE);
          hcmoving=1;
     }
     if( keystatus[keys[26]] != 0 ) {
          keystatus[keys[26]]=0;
          toggles[TOGGLE_INVENTORY]^=0x01;
     }

     // non mappable function keys
     if (keystatus[59] != 0) {
          activemenu=HELPSCREEN;
          menudirect=1;
     }
     else if (keystatus[60] != 0) {
          if( option[4] == 0 ) {
               activemenu=MENUSAVEGAME;
               menudirect=1;
          }
     }
     else if (keystatus[61] != 0) {
          if( option[4] == 0 ) {
               activemenu=MENULOADGAME;
               menudirect=1;
          }
     }
     else if (keystatus[62] != 0) {
          activemenu=MENUQUITGAME;
          menudirect=1;
     }
     else if (keystatus[64] != 0) {
          activemenu=MENUMOUSEADJ;
          menudirect=1;
          selopt=1;
     }
     else if (keystatus[66] != 0) {
          activemenu=MENUSOUNDMUS;
          menudirect=1;
          selopt=1;
     }
     if( keystatus[65] != 0 ) {
          keystatus[65]=0;
          toggles[TOGGLE_OVERSCAN]^=0x01;
     }

     // esc non mappable
     if( keystatus[1] != 0 ) {
          keystatus[1]=0;
          if( activemenu ) {
               activemenu=0;
          }
          else {
               activemenu=1;
               playsound(S_MENUSOUND1,0,0,0,ST_IMMEDIATE);
          }
     }

     return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpl $0x0, 0x15e145(%rip)    # 0x1784b4
je 0x1a37d
movl $0x0, -0x4(%rbp)
jmp 0x1aa95
leaq 0x35dd4c(%rip), %rax    # 0x3780d0
movsbl 0x38(%rax), %eax
cmpl $0x0, %eax
je 0x1a3ba
leaq 0x35dd3c(%rip), %rax    # 0x3780d0
movsbl 0x10(%rax), %eax
cmpl $0x0, %eax
je 0x1a3ba
leaq 0x35dd2c(%rip), %rax    # 0x3780d0
movb $0x0, 0x38(%rax)
leaq 0x35dd21(%rip), %rax    # 0x3780d0
movb $0x0, 0x10(%rax)
movb $0x1, 0x15e0ff(%rip)    # 0x1784b9
leaq 0x35dd0f(%rip), %rax    # 0x3780d0
movsbl 0x38(%rax), %eax
cmpl $0x0, %eax
je 0x1a683
leaq 0x35dcfb(%rip), %rax    # 0x3780d0
movsbl 0x2a(%rax), %eax
cmpl $0x0, %eax
je 0x1a683
leaq 0xffb2f(%rip), %rax     # 0x119f18
movzbl 0x4(%rax), %eax
cmpl $0x0, %eax
jne 0x1a683
leaq 0x35dcd3(%rip), %rax    # 0x3780d0
movsbl 0x22(%rax), %eax
cmpl $0x0, %eax
je 0x1a441
leaq 0xffbf3(%rip), %rax     # 0x11a000
movl 0x1c(%rax), %ecx
xorl $0x1, %ecx
leaq 0xffbe6(%rip), %rax     # 0x11a000
movl %ecx, 0x1c(%rax)
leaq 0xffbdc(%rip), %rax     # 0x11a000
cmpl $0x0, 0x1c(%rax)
je 0x1a431
callq 0x1aac0
jmp 0x1a436
callq 0x1ab10
leaq 0x35dc93(%rip), %rax    # 0x3780d0
movb $0x0, 0x22(%rax)
leaq 0x35dc88(%rip), %rax    # 0x3780d0
movsbl 0x23(%rax), %eax
cmpl $0x0, %eax
je 0x1a470
movl $0xc8, %esi
leaq 0x113381(%rip), %rax    # 0x12d7de
movswl (%rax), %edi
callq 0x9d40
leaq 0x35dc64(%rip), %rax    # 0x3780d0
movb $0x0, 0x23(%rax)
leaq 0x35dc59(%rip), %rax    # 0x3780d0
movsbl 0x24(%rax), %eax
cmpl $0x0, %eax
je 0x1a4ca
movw $0x1, 0x15f8a9(%rip)    # 0x179d32
movw $0x1, 0x15f8a2(%rip)    # 0x179d34
movw $0x1, 0x15f89b(%rip)    # 0x179d36
movw $0x1, 0x15f894(%rip)    # 0x179d38
movw $0x1, 0x15f88d(%rip)    # 0x179d3a
movw $0x1, 0x15f886(%rip)    # 0x179d3c
movw $0x1, 0x15f87f(%rip)    # 0x179d3e
leaq 0x35dc0a(%rip), %rax    # 0x3780d0
movb $0x0, 0x24(%rax)
leaq 0x35dbff(%rip), %rax    # 0x3780d0
movsbl 0x11(%rax), %eax
cmpl $0x0, %eax
je 0x1a678
leaq 0x1132f9(%rip), %rax    # 0x12d7de
movswq (%rax), %rcx
leaq 0x15dcb0(%rip), %rax    # 0x1781a0
movw $0x64, (%rax,%rcx,2)
leaq 0x1132e1(%rip), %rax    # 0x12d7de
movswq (%rax), %rcx
leaq 0x15dcb8(%rip), %rax    # 0x1781c0
movw $0x64, (%rax,%rcx,2)
leaq 0x1132c9(%rip), %rax    # 0x12d7de
movswq (%rax), %rcx
leaq 0x15dcc0(%rip), %rax    # 0x1781e0
movw $0x64, (%rax,%rcx,2)
leaq 0x1132b1(%rip), %rax    # 0x12d7de
movswq (%rax), %rcx
leaq 0x15dcc8(%rip), %rax    # 0x178200
movw $0x64, (%rax,%rcx,2)
leaq 0x113299(%rip), %rax    # 0x12d7de
movswq (%rax), %rcx
leaq 0x15dcd0(%rip), %rax    # 0x178220
movw $0x64, (%rax,%rcx,2)
leaq 0x113281(%rip), %rax    # 0x12d7de
movswq (%rax), %rcx
leaq 0x15dcd8(%rip), %rax    # 0x178240
movw $0x64, (%rax,%rcx,2)
leaq 0x113269(%rip), %rax    # 0x12d7de
movswq (%rax), %rcx
leaq 0x15dce0(%rip), %rax    # 0x178260
movw $0x64, (%rax,%rcx,2)
leaq 0x113251(%rip), %rax    # 0x12d7de
movswq (%rax), %rcx
leaq 0x15dce8(%rip), %rax    # 0x178280
movw $0x64, (%rax,%rcx,2)
leaq 0x113239(%rip), %rax    # 0x12d7de
movswq (%rax), %rcx
leaq 0x15f790(%rip), %rax    # 0x179d40
movl $0x1, (%rax,%rcx,4)
leaq 0x113220(%rip), %rax    # 0x12d7de
movswq (%rax), %rcx
leaq 0x15f7b7(%rip), %rax    # 0x179d80
movl $0x1, (%rax,%rcx,4)
leaq 0x113207(%rip), %rax    # 0x12d7de
movswq (%rax), %rcx
leaq 0x15f7de(%rip), %rax    # 0x179dc0
movl $0x1, (%rax,%rcx,4)
leaq 0x1008a0(%rip), %rax    # 0x11ae90
movl 0x4(%rax), %edx
leaq 0x100896(%rip), %rax    # 0x11ae90
orl 0x8(%rax), %edx
leaq 0x10088c(%rip), %rax    # 0x11ae90
orl 0xc(%rax), %edx
leaq 0x100882(%rip), %rax    # 0x11ae90
orl 0x10(%rax), %edx
leaq 0x1131c6(%rip), %rax    # 0x12d7de
movswq (%rax), %rcx
leaq 0x15de1d(%rip), %rax    # 0x178440
movl %edx, (%rax,%rcx,4)
leaq 0x100863(%rip), %rax    # 0x11ae90
movl 0x14(%rax), %edx
leaq 0x100859(%rip), %rax    # 0x11ae90
orl 0x18(%rax), %edx
leaq 0x10084f(%rip), %rax    # 0x11ae90
orl 0x1c(%rax), %edx
leaq 0x100845(%rip), %rax    # 0x11ae90
orl 0x20(%rax), %edx
leaq 0x113189(%rip), %rax    # 0x12d7de
movswq (%rax), %rcx
leaq 0x15dde0(%rip), %rax    # 0x178440
orl (%rax,%rcx,4), %edx
leaq 0x15ddd6(%rip), %rax    # 0x178440
movl %edx, (%rax,%rcx,4)
leaq 0x35da5c(%rip), %rax    # 0x3780d0
movb $0x0, 0x11(%rax)
leaq 0x35da51(%rip), %rax    # 0x3780d0
movb $0x0, 0x45(%rax)
leaq 0xff896(%rip), %rax     # 0x119f20
movslq 0x5c(%rax), %rcx
leaq 0x35da3b(%rip), %rax    # 0x3780d0
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x1a6c9
leaq 0xff87b(%rip), %rax     # 0x119f20
movslq 0x5c(%rax), %rcx
leaq 0x35da20(%rip), %rax    # 0x3780d0
movb $0x0, (%rax,%rcx)
leaq 0xff945(%rip), %rax     # 0x11a000
movl (%rax), %ecx
xorl $0x1, %ecx
leaq 0xff939(%rip), %rax     # 0x11a000
movl %ecx, (%rax)
leaq 0xff850(%rip), %rax     # 0x119f20
movslq 0x60(%rax), %rcx
leaq 0x35d9f5(%rip), %rax    # 0x3780d0
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x1a711
leaq 0xff835(%rip), %rax     # 0x119f20
movslq 0x60(%rax), %rcx
leaq 0x35d9da(%rip), %rax    # 0x3780d0
movb $0x0, (%rax,%rcx)
leaq 0xff8ff(%rip), %rax     # 0x11a000
movl 0x4(%rax), %ecx
xorl $0x1, %ecx
leaq 0xff8f2(%rip), %rax     # 0x11a000
movl %ecx, 0x4(%rax)
leaq 0xff808(%rip), %rax     # 0x119f20
movslq 0x64(%rax), %rcx
leaq 0x35d9ad(%rip), %rax    # 0x3780d0
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x1a759
leaq 0xff7ed(%rip), %rax     # 0x119f20
movslq 0x64(%rax), %rcx
leaq 0x35d992(%rip), %rax    # 0x3780d0
movb $0x0, (%rax,%rcx)
leaq 0xff8b7(%rip), %rax     # 0x11a000
movl 0x8(%rax), %ecx
xorl $0x1, %ecx
leaq 0xff8aa(%rip), %rax     # 0x11a000
movl %ecx, 0x8(%rax)
leaq 0xff7c0(%rip), %rax     # 0x119f20
movslq 0x50(%rax), %rcx
leaq 0x35d965(%rip), %rax    # 0x3780d0
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x1a7c1
leaq 0xff7a5(%rip), %rax     # 0x119f20
movslq 0x50(%rax), %rcx
leaq 0x35d94a(%rip), %rax    # 0x3780d0
movb $0x0, (%rax,%rcx)
leaq 0xff86f(%rip), %rax     # 0x11a000
movl 0x14(%rax), %ecx
xorl $0x1, %ecx
leaq 0xff862(%rip), %rax     # 0x11a000
movl %ecx, 0x14(%rax)
movl $0x33, %edi
xorl %ecx, %ecx
movl $0x1, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x26af0
movl $0x1, 0x15f63f(%rip)    # 0x179e00
leaq 0xff758(%rip), %rax     # 0x119f20
movslq 0x54(%rax), %rcx
leaq 0x35d8fd(%rip), %rax    # 0x3780d0
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x1a831
leaq 0xff73d(%rip), %rax     # 0x119f20
movslq 0x54(%rax), %rcx
leaq 0x35d8e2(%rip), %rax    # 0x3780d0
movb $0x0, (%rax,%rcx)
leaq 0xff807(%rip), %rax     # 0x11a000
movl 0x18(%rax), %ecx
xorl $0x1, %ecx
leaq 0xff7fa(%rip), %rax     # 0x11a000
movl %ecx, 0x18(%rax)
leaq 0xff7f0(%rip), %rax     # 0x11a000
movl 0x18(%rax), %edi
addl $0x30, %edi
xorl %ecx, %ecx
movl $0x1, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x26af0
movl $0x1, 0x15f5d3(%rip)    # 0x179e04
leaq 0xff6e8(%rip), %rax     # 0x119f20
movslq 0x58(%rax), %rcx
leaq 0x35d88d(%rip), %rax    # 0x3780d0
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x1a899
leaq 0xff6cd(%rip), %rax     # 0x119f20
movslq 0x58(%rax), %rcx
leaq 0x35d872(%rip), %rax    # 0x3780d0
movb $0x0, (%rax,%rcx)
leaq 0xff797(%rip), %rax     # 0x11a000
movl 0x20(%rax), %ecx
xorl $0x1, %ecx
leaq 0xff78a(%rip), %rax     # 0x11a000
movl %ecx, 0x20(%rax)
movl $0x32, %edi
xorl %ecx, %ecx
movl $0x1, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x26af0
movl $0x1, 0x15f56f(%rip)    # 0x179e08
leaq 0xff680(%rip), %rax     # 0x119f20
movslq 0x68(%rax), %rcx
leaq 0x35d825(%rip), %rax    # 0x3780d0
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x1a8e1
leaq 0xff665(%rip), %rax     # 0x119f20
movslq 0x68(%rax), %rcx
leaq 0x35d80a(%rip), %rax    # 0x3780d0
movb $0x0, (%rax,%rcx)
leaq 0xff72f(%rip), %rax     # 0x11a000
movl 0x28(%rax), %ecx
xorl $0x1, %ecx
leaq 0xff722(%rip), %rax     # 0x11a000
movl %ecx, 0x28(%rax)
leaq 0x35d7e8(%rip), %rax    # 0x3780d0
movsbl 0x3b(%rax), %eax
cmpl $0x0, %eax
je 0x1a90a
movl $0x63, 0x15dbb9(%rip)   # 0x1784b4
movl $0x1, 0x15f507(%rip)    # 0x179e0c
jmp 0x1aa0a
leaq 0x35d7bf(%rip), %rax    # 0x3780d0
movsbl 0x3c(%rax), %eax
cmpl $0x0, %eax
je 0x1a943
leaq 0xff5f7(%rip), %rax     # 0x119f18
movzbl 0x4(%rax), %eax
cmpl $0x0, %eax
jne 0x1a93e
movl $0x7, 0x15db80(%rip)    # 0x1784b4
movl $0x1, 0x15f4ce(%rip)    # 0x179e0c
jmp 0x1aa08
leaq 0x35d786(%rip), %rax    # 0x3780d0
movsbl 0x3d(%rax), %eax
cmpl $0x0, %eax
je 0x1a97c
leaq 0xff5be(%rip), %rax     # 0x119f18
movzbl 0x4(%rax), %eax
cmpl $0x0, %eax
jne 0x1a977
movl $0x6, 0x15db47(%rip)    # 0x1784b4
movl $0x1, 0x15f495(%rip)    # 0x179e0c
jmp 0x1aa06
leaq 0x35d74d(%rip), %rax    # 0x3780d0
movsbl 0x3e(%rax), %eax
cmpl $0x0, %eax
je 0x1a9a2
movl $0x4, 0x15db1e(%rip)    # 0x1784b4
movl $0x1, 0x15f46c(%rip)    # 0x179e0c
jmp 0x1aa04
leaq 0x35d727(%rip), %rax    # 0x3780d0
movsbl 0x40(%rax), %eax
cmpl $0x0, %eax
je 0x1a9d2
movl $0x9, 0x15daf8(%rip)    # 0x1784b4
movl $0x1, 0x15f446(%rip)    # 0x179e0c
movl $0x1, 0x1001c4(%rip)    # 0x11ab94
jmp 0x1aa02
leaq 0x35d6f7(%rip), %rax    # 0x3780d0
movsbl 0x42(%rax), %eax
cmpl $0x0, %eax
je 0x1aa00
movl $0x8, 0x15dac8(%rip)    # 0x1784b4
movl $0x1, 0x15f416(%rip)    # 0x179e0c
movl $0x1, 0x100194(%rip)    # 0x11ab94
jmp 0x1aa02
jmp 0x1aa04
jmp 0x1aa06
jmp 0x1aa08
jmp 0x1aa0a
leaq 0x35d6bf(%rip), %rax    # 0x3780d0
movsbl 0x41(%rax), %eax
cmpl $0x0, %eax
je 0x1aa3c
leaq 0x35d6af(%rip), %rax    # 0x3780d0
movb $0x0, 0x41(%rax)
leaq 0xff5d4(%rip), %rax     # 0x11a000
movl 0x24(%rax), %ecx
xorl $0x1, %ecx
leaq 0xff5c7(%rip), %rax     # 0x11a000
movl %ecx, 0x24(%rax)
leaq 0x35d68d(%rip), %rax    # 0x3780d0
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
je 0x1aa8e
leaq 0x35d67d(%rip), %rax    # 0x3780d0
movb $0x0, 0x1(%rax)
cmpl $0x0, 0x15da56(%rip)    # 0x1784b4
je 0x1aa6c
movl $0x0, 0x15da4a(%rip)    # 0x1784b4
jmp 0x1aa8c
movl $0x1, 0x15da3e(%rip)    # 0x1784b4
movl $0x34, %edi
xorl %ecx, %ecx
movl $0x1, %r8d
movl %ecx, %esi
movl %ecx, %edx
callq 0x26af0
jmp 0x1aa8e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop