LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekgun.c
// Function: tekgunsave
void
tekgunsave(int fil)
{
     write(fil,fireseq,MAXPLAYERS*sizeof(int));
     write(fil,ammo1,MAXPLAYERS*sizeof(short));
     write(fil,ammo2,MAXPLAYERS*sizeof(short));
     write(fil,ammo3,MAXPLAYERS*sizeof(short));
     write(fil,ammo4,MAXPLAYERS*sizeof(short));
     write(fil,ammo5,MAXPLAYERS*sizeof(short));
     write(fil,ammo6,MAXPLAYERS*sizeof(short));
     write(fil,ammo7,MAXPLAYERS*sizeof(short));
     write(fil,ammo8,MAXPLAYERS*sizeof(short));
     write(fil,weapons,MAXPLAYERS*sizeof(int));
     write(fil,firedonetics,MAXPLAYERS*sizeof(int));
     write(fil,lastgun,MAXPLAYERS*sizeof(int));
     write(fil,&goreflag,sizeof(int));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x1147f6(%rip), %rsi    # 0x1252e0
pushq $0x40
popq %r14
movq %r14, %rdx
callq 0x8f10
leaq 0x1146e3(%rip), %rsi    # 0x1251e0
pushq $0x20
popq %r15
movl %ebx, %edi
movq %r15, %rdx
callq 0x8f10
leaq 0x1146ee(%rip), %rsi    # 0x125200
movl %ebx, %edi
movq %r15, %rdx
callq 0x8f10
leaq 0x1146fd(%rip), %rsi    # 0x125220
movl %ebx, %edi
movq %r15, %rdx
callq 0x8f10
leaq 0x11470c(%rip), %rsi    # 0x125240
movl %ebx, %edi
movq %r15, %rdx
callq 0x8f10
leaq 0x11471b(%rip), %rsi    # 0x125260
movl %ebx, %edi
movq %r15, %rdx
callq 0x8f10
leaq 0x11472a(%rip), %rsi    # 0x125280
movl %ebx, %edi
movq %r15, %rdx
callq 0x8f10
leaq 0x114739(%rip), %rsi    # 0x1252a0
movl %ebx, %edi
movq %r15, %rdx
callq 0x8f10
leaq 0x114748(%rip), %rsi    # 0x1252c0
movl %ebx, %edi
movq %r15, %rdx
callq 0x8f10
leaq 0x1148f7(%rip), %rsi    # 0x125480
movl %ebx, %edi
movq %r14, %rdx
callq 0x8f10
leaq 0x114856(%rip), %rsi    # 0x1253f0
movl %ebx, %edi
movq %r14, %rdx
callq 0x8f10
leaq 0x114805(%rip), %rsi    # 0x1253b0
movl %ebx, %edi
movq %r14, %rdx
callq 0x8f10
leaq 0x1147a4(%rip), %rsi    # 0x125360
pushq $0x4
popq %rdx
movl %ebx, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x8f10
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekgun.c
// Function: tekgunload
void
tekgunload(int fil)
{
     read(fil,fireseq,MAXPLAYERS*sizeof(int));
     read(fil,ammo1,MAXPLAYERS*sizeof(short));
     read(fil,ammo2,MAXPLAYERS*sizeof(short));
     read(fil,ammo3,MAXPLAYERS*sizeof(short));
     read(fil,ammo4,MAXPLAYERS*sizeof(short));
     read(fil,ammo5,MAXPLAYERS*sizeof(short));
     read(fil,ammo6,MAXPLAYERS*sizeof(short));
     read(fil,ammo7,MAXPLAYERS*sizeof(short));
     read(fil,ammo8,MAXPLAYERS*sizeof(short));
     read(fil,weapons,MAXPLAYERS*sizeof(int));
     read(fil,firedonetics,MAXPLAYERS*sizeof(int));
     read(fil,lastgun,MAXPLAYERS*sizeof(int));
     read(fil,&goreflag,sizeof(int));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x114707(%rip), %rsi    # 0x1252e0
pushq $0x40
popq %r14
movq %r14, %rdx
callq 0x8b20
leaq 0x1145f4(%rip), %rsi    # 0x1251e0
pushq $0x20
popq %r15
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x1145ff(%rip), %rsi    # 0x125200
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x11460e(%rip), %rsi    # 0x125220
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x11461d(%rip), %rsi    # 0x125240
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x11462c(%rip), %rsi    # 0x125260
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x11463b(%rip), %rsi    # 0x125280
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x11464a(%rip), %rsi    # 0x1252a0
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x114659(%rip), %rsi    # 0x1252c0
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x114808(%rip), %rsi    # 0x125480
movl %ebx, %edi
movq %r14, %rdx
callq 0x8b20
leaq 0x114767(%rip), %rsi    # 0x1253f0
movl %ebx, %edi
movq %r14, %rdx
callq 0x8b20
leaq 0x114716(%rip), %rsi    # 0x1253b0
movl %ebx, %edi
movq %r14, %rdx
callq 0x8b20
leaq 0x1146b5(%rip), %rsi    # 0x125360
pushq $0x4
popq %rdx
movl %ebx, %edi
popq %rbx
popq %r14
popq %r15
jmp 0x8b20
nop
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: finishpaletteshifts
void
finishpaletteshifts(void)
{
     if( palshifted == 1 ) {
          palshifted = 0;
#if USE_POLYMOST && USE_OPENGL
          if (getrendermode() >= 3)
               setpalettefade(0,0,0,0);
          else
#endif
               setbrightness(brightness,&palette[0],0);
     }

 return;
}

// Assembly:
pushq %rax
cmpb $0x1, 0x113b8f(%rip)    # 0x126d38
jne 0x131ca
movb $0x0, 0x113b86(%rip)    # 0x126d38
callq 0x4a914
cmpl $0x3, %eax
jl 0x131cc
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
popq %rax
jmp 0x495e5
popq %rax
retq
leaq 0xc728f(%rip), %rax     # 0xda462
movswl (%rax), %edi
leaq 0x410253(%rip), %rsi    # 0x423430
xorl %edx, %edx
popq %rax
jmp 0x41f79
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: initpaletteshifts
int
initpaletteshifts(void)
{
     unsigned char *workptr,*baseptr;
     int       i,j,delta;

     for( i=1; i<=NUMREDSHIFTS; i++ ) {
          workptr=&redshifts[i-1][0];
          baseptr=&palette[0];
          for( j=0; j<=255; j++) {
               delta=64-*baseptr;
               *workptr++=*baseptr++ + delta * i / REDSTEPS;
               delta=-*baseptr;
               *workptr++=*baseptr++ + delta * i / REDSTEPS;
               delta=-*baseptr;
               *workptr++=*baseptr++ + delta * i / REDSTEPS;
          }
     }

     for( i=1; i<=NUMWHITESHIFTS; i++ ) {
          workptr=&whiteshifts[i-1][0];
          baseptr=&palette[0];
          for( j=0; j<=255; j++ ) {
               delta = 64-*baseptr;
               *workptr++ = *baseptr++ + delta * i / WHITESTEPS;
               delta = 62-*baseptr;
               *workptr++ = *baseptr++ + delta * i / WHITESTEPS;
               delta = 0-*baseptr;
               *workptr++ = *baseptr++ + delta * i / WHITESTEPS;
          }
     }

     return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
movabsq $0x1, %rdi
leaq 0x1122ef(%rip), %r8     # 0x125530
leaq 0x4101e8(%rip), %rcx    # 0x423430
movl $0x40, %esi
movl $0x8, %r9d
cmpq $0x5, %rdi
je 0x132b9
xorl %r10d, %r10d
cmpl $0x300, %r10d           # imm = 0x300
je 0x132ad
movzbl (%rcx,%r10), %r11d
movl %esi, %eax
subl %r11d, %eax
imull %edi, %eax
cltd
idivl %r9d
addb %r11b, %al
movb %al, (%r8,%r10)
movzbl 0x1(%rcx,%r10), %eax
movl %eax, %edx
imull %edi, %edx
shrl $0x3, %edx
subb %dl, %al
movb %al, 0x1(%r8,%r10)
movzbl 0x2(%rcx,%r10), %eax
movl %eax, %edx
imull %edi, %edx
shrl $0x3, %edx
subb %dl, %al
movb %al, 0x2(%r8,%r10)
addq $0x3, %r10
jmp 0x1325c
incq %rdi
addq $0x300, %r8             # imm = 0x300
jmp 0x13253
movabsq $0x1, %rdi
leaq 0x112e66(%rip), %r8     # 0x126130
movl $0x14, %r9d
movl $0x3e, %r10d
movl $0xffffffec, %r11d      # imm = 0xFFFFFFEC
cmpq $0x4, %rdi
je 0x13343
xorl %ebx, %ebx
cmpl $0x300, %ebx            # imm = 0x300
je 0x13337
movzbl (%rcx,%rbx), %ebp
movl %esi, %eax
subl %ebp, %eax
imull %edi, %eax
cltd
idivl %r9d
addb %bpl, %al
movb %al, (%r8,%rbx)
movzbl 0x1(%rcx,%rbx), %ebp
movl %r10d, %eax
subl %ebp, %eax
imull %edi, %eax
cltd
idivl %r9d
addb %bpl, %al
movb %al, 0x1(%r8,%rbx)
movzbl 0x2(%rcx,%rbx), %ebp
movl %ebp, %eax
imull %edi, %eax
cltd
idivl %r11d
addb %bpl, %al
movb %al, 0x2(%r8,%rbx)
addq $0x3, %rbx
jmp 0x132e4
incq %rdi
addq $0x300, %r8             # imm = 0x300
jmp 0x132dc
xorl %eax, %eax
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: showmessage
void
showmessage(char *fmt,...)
{
     va_list   vargs;

     memset(messagebuf,   '\0', MSGBUFSIZE);

     va_start(vargs,fmt);
     Bvsnprintf(messagebuf,sizeof(messagebuf),fmt,vargs);
     va_end(vargs);

     messagebuf[MSGBUFSIZE-1]='\0';
     messagex=(xdim>>1)-( (((int)strlen(messagebuf))>>1)*8 );
     if( messagex < 0 )
          messagex=0;
     messageon=1;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %r10
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x1379a
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x11359c(%rip)   # 0x126d40
andq $0x0, 0x1135b4(%rip)    # 0x126d60
movaps %xmm0, 0x11359d(%rip)   # 0x126d50
leaq 0x113586(%rip), %rbx    # 0x126d40
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rsp, %rcx
movq %rax, (%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movq %rdi, 0x10(%rcx)
pushq $0x28
popq %rsi
movq %rbx, %rdi
movq %r10, %rdx
callq 0x8a10
movb $0x0, 0x113578(%rip)    # 0x126d67
leaq 0x59b676(%rip), %rax    # 0x5aee6c
movl (%rax), %ebp
sarl %ebp
movq %rbx, %rdi
callq 0x85a0
shll $0x2, %eax
andl $-0x8, %eax
subl %eax, %ebp
xorl %eax, %eax
testl %ebp, %ebp
cmovgl %ebp, %eax
movl %eax, 0x113551(%rip)    # 0x126d68
movl $0x1, 0x111ce7(%rip)    # 0x125508
addq $0xd8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: tekgamestarted
void
tekgamestarted(void)
{
     hcpos=-tilesizx[HCDEVICE];
     wppos=-tilesizx[WPDEVICE];
     rvpos=-tilesizx[RVDEVICE];
     seconds=minutes=hours=0;
     show2dsprite[playersprite[myconnectindex]>>3]|=
          (1<<(playersprite[myconnectindex]&7));
     songmastervolume(musicv<<3);
     soundmastervolume(soundv<<11);
}

// Assembly:
pushq %rax
leaq 0x7882d9(%rip), %rax    # 0x79bb24
movslq (%rax), %rax
leaq 0xc7efb(%rip), %rcx     # 0xdb750
movswl (%rcx,%rax,2), %eax
movl %eax, %ecx
andb $0x7, %cl
pushq $0x1
popq %rdx
shll %cl, %edx
leaq 0x5a3636(%rip), %rcx    # 0x5b6ea0
shrl $0x3, %eax
movswq %ax, %rax
leaq 0x53eae8(%rip), %rsi    # 0x552360
orb %dl, (%rsi,%rax)
xorl %eax, %eax
xorl %edx, %edx
subw 0xc38(%rcx), %dx
xorl %esi, %esi
subw 0xc2e(%rcx), %si
subw 0xc24(%rcx), %ax
andl $0x0, 0x111c67(%rip)    # 0x125504
andl $0x0, 0x111c5c(%rip)    # 0x125500
movw %dx, 0x1134c1(%rip)     # 0x126d6c
andl $0x0, 0x111c4a(%rip)    # 0x1254fc
movw %si, 0x1134b5(%rip)     # 0x126d6e
movw %ax, 0x1134b0(%rip)     # 0x126d70
movl 0xb4d32(%rip), %edi     # 0xc85f8
shll $0x3, %edi
callq 0x1aeb3
movl 0xb4d28(%rip), %edi     # 0xc85fc
shll $0xb, %edi
popq %rax
jmp 0x1aeb4
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: netstats
void
netstats()
{
    #ifdef NETNAMES
     int       i;

     if( option[4] != 0 ) {
          for( i=connecthead ; i >= 0 ; i=connectpoint2[i] ) {
              #if 0
               if( score[i] > score[newnetleader] ) {
                    if( score[newnetleader] < NETWINSCORE ) {
                         newnetleader=i;
                    }
               }
              #endif
               if( (toggles[TOGGLE_SCORE]) && (screensize >= xdim) ) {
                    sprintf(tektempbuf,"%2d %10s %6d",i,netnames[i],score[i]);
                    printext(12,(windowy1+32)+(i<<3),tektempbuf,ALPHABET,255);
               }
          }
         #if 0
          if( newnetleader != oldnetleader ) {
               oldnetleader=newnetleader;
          }
          else if( (totalclock-netclock) > 7200 ) {
               netclock=totalclock;
               sprintf(tektempbuf,"%2d %s LEADS",newnetleader,netnames[newnetleader],score[newnetleader]);
               showmessage(tektempbuf);
          }
         #endif
     }
    #endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xb3009(%rip), %rax     # 0xc7978
cmpb $0x0, 0x4(%rax)
je 0x14a13
leaq 0x7871b0(%rip), %rbx    # 0x79bb30
leaq 0xb30d9(%rip), %r12     # 0xc7a60
leaq 0x7871b2(%rip), %r13    # 0x79bb40
leaq 0xc720d(%rip), %r15     # 0xdbba2
leaq 0x59a4d0(%rip), %rbp    # 0x5aee6c
leaq 0x1124cd(%rip), %r14    # 0x126e70
movslq (%rbx), %rbx
testq %rbx, %rbx
js 0x14a13
cmpl $0x0, 0x8(%r12)
je 0x14a0a
movswl (%r15), %eax
cmpl %eax, (%rbp)
jg 0x14a0a
imulq $0xb, %rbx, %rcx
addq 0xb2551(%rip), %rcx     # 0xc6f18
leaq 0x10ecb2(%rip), %rax    # 0x123680
movl (%rax,%rbx,4), %r8d
movq %r14, %rdi
leaq 0x6d015(%rip), %rsi     # 0x819f1
movl %ebx, %edx
xorl %eax, %eax
callq 0x8f20
leaq 0x566014(%rip), %rax    # 0x57aa00
movl (%rax), %eax
leal (%rax,%rbx,8), %esi
addl $0x20, %esi
pushq $0xc
popq %rdi
movq %r14, %rdx
movl $0x15c, %ecx            # imm = 0x15C
movl $0xff, %r8d
callq 0x9558
shlq $0x2, %rbx
addq %r13, %rbx
jmp 0x149a3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: tektime
void
tektime(void)
{
     fortieth++;
     if( fortieth == 40 ) {
          fortieth=0;
          seconds++;
     }
     if( seconds == 60 ) {
          minutes++;
          seconds=0;
     }
     if( minutes == 60 ) {
          hours++;
          minutes=0;
     }
     if( hours > 99 ) {
          hours=0;
     }
     if( messageon ) {
          messageon++;
          if( messageon == 160 ) {
               messageon=0;
          }
     }
}

// Assembly:
movl 0x111447(%rip), %eax    # 0x126fa0
incl %eax
movl %eax, 0x11143f(%rip)    # 0x126fa0
cmpl $0x28, %eax
jne 0x15b7d
andl $0x0, 0x111433(%rip)    # 0x126fa0
movl 0x10f989(%rip), %ecx    # 0x1254fc
incl %ecx
movl %ecx, 0x10f981(%rip)    # 0x1254fc
jmp 0x15b83
movl 0x10f979(%rip), %ecx    # 0x1254fc
movl 0x10f977(%rip), %eax    # 0x125500
cmpl $0x3c, %ecx
jne 0x15b9d
incl %eax
movl %eax, 0x10f96a(%rip)    # 0x125500
andl $0x0, 0x10f95f(%rip)    # 0x1254fc
movl 0x10f961(%rip), %ecx    # 0x125504
cmpl $0x3c, %eax
jne 0x15bb7
incl %ecx
movl %ecx, 0x10f954(%rip)    # 0x125504
andl $0x0, 0x10f949(%rip)    # 0x125500
cmpl $0x64, %ecx
jl 0x15bc3
andl $0x0, 0x10f941(%rip)    # 0x125504
movl 0x10f93f(%rip), %eax    # 0x125508
testl %eax, %eax
je 0x15bdf
incl %eax
xorl %ecx, %ecx
cmpl $0xa0, %eax
cmovnel %eax, %ecx
movl %ecx, 0x10f929(%rip)    # 0x125508
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: newgame
void
newgame(char *mapname)
{
     int  i;

     if( option[4] != 0 ) {
          return;
     }

     ready2send=0;

     stopallsounds();
     if (strcmp(boardfilename,mapname) != 0) {
          strcpy(boardfilename,mapname);
     }
     initpaletteshifts();
     prepareboard(boardfilename);
     precache();
     for (i=connecthead ; i >= 0 ; i=connectpoint2[i]) {
          initplayersprite((short)i);
     }

     ready2send=1;
}

// Assembly:
leaq 0xb1d82(%rip), %rax     # 0xc7978
cmpb $0x0, 0x4(%rax)
je 0x15bfd
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xc4847(%rip), %r14     # 0xda453
movb $0x0, (%r14)
xorl %eax, %eax
callq 0x1afa5
leaq 0xc5bf2(%rip), %rdi     # 0xdb810
movq %rbx, %rsi
callq 0x8c40
testl %eax, %eax
je 0x15c39
leaq 0xc5bdf(%rip), %rdi     # 0xdb810
movq %rbx, %rsi
callq 0x85b0
callq 0x1322e
leaq 0xc5bcb(%rip), %rdi     # 0xdb810
callq 0x18550
xorl %eax, %eax
callq 0x95ed
leaq 0x785ed8(%rip), %rbx    # 0x79bb30
leaq 0x785ee1(%rip), %r15    # 0x79bb40
movslq (%rbx), %rbx
testq %rbx, %rbx
js 0x15c78
movswl %bx, %edi
callq 0x19ac0
shlq $0x2, %rbx
addq %r15, %rbx
jmp 0x15c5f
movb $0x1, (%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: accessiblemap
int
accessiblemap(int mn)
{
     int       i;

     if( (mn < 0) || (mn >= TOTALMAPS) ) {
          return(0);
     }
     if( strlen(mapnames[mn]) < 2 ) {
          return(0);
     }
     for( i=0; i<MAXMAPSPERMISSION; i++ ) {
          if( missionset[mission][i] == mn ) {
               return(1);
          }
     }
     return(0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpl $0x1f, %edi
ja 0x15cd3
movl %edi, %ebp
movl %edi, %eax
leaq 0xb2979(%rip), %rcx     # 0xc8610
movq (%rcx,%rax,8), %rdi
callq 0x85a0
cmpq $0x2, %rax
jb 0x15cd3
movslq 0x10f863(%rip), %rax    # 0x125510
imulq $0x18, %rax, %rax
xorl %ebx, %ebx
leaq 0xb2a56(%rip), %rdx     # 0xc8710
pushq $0x1
popq %rcx
xorl %esi, %esi
cmpq $0x6, %rsi
je 0x15cd3
leaq (%rax,%rsi,4), %rdi
incq %rsi
cmpl %ebp, (%rdx,%rdi)
jne 0x15cbf
movl %ecx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: getloadsavenames
void
getloadsavenames(void)
{
     int  fil,i;

     for (i=0 ; i < MAXLOADSAVEOPTS ; i++) {
          sprintf((char *)tempbuf,"savegam%d.tek",i+1);
          if (access((char *)tempbuf,F_OK) == 0) {
               fil=open((char *)tempbuf,O_BINARY|O_RDONLY,S_IREAD);
               read(fil,&loadsavenames[i],MAXLOADSAVESIZE);
               close(fil);
          }
          else {
               strncpy(loadsavenames[i],"-EMPTY-",MAXLOADSAVESIZE);
          }
     }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
pushq $-0x5
popq %r13
leaq 0x111008(%rip), %rbx    # 0x126fc0
leaq 0xc4631(%rip), %r14     # 0xda5f0
leaq 0x6b4ed(%rip), %r15     # 0x814b3
movabsq $0x2d5954504d452d, %r12 # imm = 0x2D5954504D452D
testq %r13, %r13
je 0x1602d
leal 0x6(%r13), %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x8f20
movq %r14, %rdi
xorl %esi, %esi
callq 0x8190
testl %eax, %eax
je 0x15ffd
movq %r12, (%rbx)
andl $0x0, 0x8(%rbx)
jmp 0x16024
movq %r14, %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
xorl %eax, %eax
callq 0x8670
movl %eax, %ebp
movl %eax, %edi
movq %rbx, %rsi
pushq $0xc
popq %rdx
callq 0x8b20
movl %ebp, %edi
callq 0x8310
incq %r13
addq $0xc, %rbx
jmp 0x15fd0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: showmenu
void
showmenu(void)
{
    if (xdim < 640) {
        rotatesprite(160<<16,100<<16, 65536, 0, MENUSTATION, 0, 0, 2+8, 0, 0, xdim-1, ydim-1);
        rotatesprite(160<<16,100<<16, 65536, 0, MENUGLASS, 0, 0, 1+2+8, 0, 0, xdim-1, ydim-1);
    } else {
        rotatesprite(160<<16,50<<16, divscale15(200, tilesizy[MENUPANEL4801]), 0, MENUPANEL4801, 0, 0, 2+8, 0, 0, xdim-1, ydim-1);
        rotatesprite(160<<16,150<<16, divscale15(200, tilesizy[MENUPANEL4802]), 0, MENUPANEL4802, 0, 0, 2+8, 0, 0, xdim-1, ydim-1);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x598b7d(%rip), %rbx    # 0x5aee6c
movl (%rbx), %r10d
cmpl $0x27f, %r10d           # imm = 0x27F
jg 0x16386
decl %r10d
leaq 0x598b67(%rip), %r14    # 0x5aee70
movl (%r14), %eax
decl %eax
subq $0x30, %rsp
andl $0x0, 0x18(%rsp)
andl $0x0, 0x10(%rsp)
movl %eax, 0x28(%rsp)
andl $0x0, (%rsp)
movl %r10d, 0x20(%rsp)
movl $0xa, 0x8(%rsp)
movl $0xa00000, %edi         # imm = 0xA00000
movl $0x640000, %esi         # imm = 0x640000
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl $0x145, %r8d            # imm = 0x145
xorl %r9d, %r9d
callq 0x48ebe
addq $0x30, %rsp
movl (%rbx), %eax
decl %eax
movl (%r14), %r10d
decl %r10d
movl $0xa00000, %edi         # imm = 0xA00000
movl $0x640000, %esi         # imm = 0x640000
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl $0x146, %r8d            # imm = 0x146
xorl %r9d, %r9d
pushq %r10
pushq %rax
pushq $0x0
pushq $0x0
pushq $0xb
jmp 0x1641e
leaq 0x5922d3(%rip), %r15    # 0x5a8660
movswl 0xbf2(%r15), %ecx
movl $0x640000, %eax         # imm = 0x640000
xorl %edx, %edx
idivl %ecx
decl %r10d
leaq 0x598ac8(%rip), %r12    # 0x5aee70
movl (%r12), %r11d
decl %r11d
pushq $0xa
popq %r14
movl $0xa00000, %edi         # imm = 0xA00000
movl $0x320000, %esi         # imm = 0x320000
movl %eax, %edx
xorl %ecx, %ecx
movl $0x5f9, %r8d            # imm = 0x5F9
xorl %r9d, %r9d
pushq %r11
pushq %r10
pushq $0x0
pushq $0x0
pushq %r14
pushq $0x0
callq 0x48ebe
addq $0x30, %rsp
movswl 0xbf4(%r15), %ecx
movl $0x640000, %eax         # imm = 0x640000
xorl %edx, %edx
idivl %ecx
movl (%rbx), %r10d
decl %r10d
movl (%r12), %r11d
decl %r11d
movl $0xa00000, %edi         # imm = 0xA00000
movl $0x960000, %esi         # imm = 0x960000
movl %eax, %edx
xorl %ecx, %ecx
movl $0x5fa, %r8d            # imm = 0x5FA
xorl %r9d, %r9d
pushq %r11
pushq %r10
pushq $0x0
pushq $0x0
pushq %r14
pushq $0x0
callq 0x48ebe
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: showhelpscreen
void
showhelpscreen(void)
{
    if (xdim < 640) {
        rotatesprite(160<<16,160<<16, 65536, 0, HELPSCREENPIC, 0, 0, 2+8, 0, 0, xdim-1, ydim-1);
    } else {
        rotatesprite(160<<16,50<<16, divscale15(200, tilesizy[HELPSCREEN4801]), 0, HELPSCREEN4801, 0, 0, 2+8, 0, 0, xdim-1, ydim-1);
        rotatesprite(160<<16,150<<16, divscale15(200, tilesizy[HELPSCREEN4802]), 0, HELPSCREEN4802, 0, 0, 2+8, 0, 0, xdim-1, ydim-1);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x598a2c(%rip), %r14    # 0x5aee6c
movl (%r14), %r10d
cmpl $0x27f, %r10d           # imm = 0x27F
jg 0x1649c
decl %r10d
leaq 0x598a1a(%rip), %rax    # 0x5aee70
movl (%rax), %eax
decl %eax
subq $0x30, %rsp
andl $0x0, 0x18(%rsp)
andl $0x0, 0x10(%rsp)
movl %eax, 0x28(%rsp)
andl $0x0, (%rsp)
movl %r10d, 0x20(%rsp)
movl $0xa, 0x8(%rsp)
movl $0xa00000, %edi         # imm = 0xA00000
movl $0xa00000, %esi         # imm = 0xA00000
movl $0x10000, %edx          # imm = 0x10000
xorl %ecx, %ecx
movl $0x3d5, %r8d            # imm = 0x3D5
xorl %r9d, %r9d
jmp 0x16533
leaq 0x5921bd(%rip), %r15    # 0x5a8660
movswl 0x7ac(%r15), %ecx
movl $0x640000, %eax         # imm = 0x640000
xorl %edx, %edx
idivl %ecx
decl %r10d
leaq 0x5989b2(%rip), %r12    # 0x5aee70
movl (%r12), %r11d
decl %r11d
pushq $0xa
popq %rbx
movl $0xa00000, %edi         # imm = 0xA00000
movl $0x320000, %esi         # imm = 0x320000
movl %eax, %edx
xorl %ecx, %ecx
movl $0x3d6, %r8d            # imm = 0x3D6
xorl %r9d, %r9d
pushq %r11
pushq %r10
pushq $0x0
pushq $0x0
pushq %rbx
pushq $0x0
callq 0x48ebe
addq $0x30, %rsp
movswl 0x7ae(%r15), %ecx
movl $0x640000, %eax         # imm = 0x640000
xorl %edx, %edx
idivl %ecx
movl (%r14), %r10d
decl %r10d
movl (%r12), %r11d
decl %r11d
movl $0xa00000, %edi         # imm = 0xA00000
movl $0x960000, %esi         # imm = 0x960000
movl %eax, %edx
xorl %ecx, %ecx
movl $0x3d7, %r8d            # imm = 0x3D7
xorl %r9d, %r9d
pushq %r11
pushq %r10
pushq $0x0
pushq $0x0
pushq %rbx
pushq $0x0
callq 0x48ebe
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: usage
void
usage()
{
     printf("\ntekwar [option1] [option2] .... [optionN]\n");
     printf("options:    practice\n");
     printf("            nogore\n");
     printf("            nobriefs\n");
     printf("            netname [NAME]\n");
     printf("            noenemies\n");
}

// Assembly:
pushq %rax
leaq 0x6b0d3(%rip), %rdi     # 0x81d69
callq 0x8ed0
leaq 0x6b0f2(%rip), %rdi     # 0x81d94
callq 0x8ed0
leaq 0x6b0fb(%rip), %rdi     # 0x81da9
callq 0x8ed0
leaq 0x6b102(%rip), %rdi     # 0x81dbc
callq 0x8ed0
leaq 0x6b10b(%rip), %rdi     # 0x81dd1
callq 0x8ed0
leaq 0x6b11a(%rip), %rdi     # 0x81dec
popq %rax
jmp 0x8ed0
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: initmoreoptions
void
initmoreoptions()
{
     difficulty=moreoptions[8];
     soundv=moreoptions[9];
     musicv=moreoptions[10];
     mousesensitivity=moreoptions[11];
     headbobon=moreoptions[12];

     screensize=gamestuff[2];
     brightness=gamestuff[3];
     biasthreshhold=gamestuff[4];

     if( option[4] != 0 ) {
          difficulty=2;
     }
}

// Assembly:
leaq 0xb09a9(%rip), %rax     # 0xc7a00
movl 0x20(%rax), %ecx
movl 0x24(%rax), %edx
movl %ecx, 0x10ffc1(%rip)    # 0x127024
movl %edx, 0xb1593(%rip)     # 0xc85fc
movl 0x28(%rax), %ecx
movl %ecx, 0xb1586(%rip)     # 0xc85f8
movl 0x2c(%rax), %ecx
movl %ecx, 0x10ffa1(%rip)    # 0x12701c
movl 0x30(%rax), %eax
leaq 0xb185b(%rip), %rcx     # 0xc88e0
movl %eax, (%rcx)
leaq 0xb0a12(%rip), %rax     # 0xc7aa0
leaq 0xc4b0d(%rip), %rcx     # 0xdbba2
movzwl 0x8(%rax), %edx
movzwl 0xc(%rax), %esi
movw %dx, (%rcx)
leaq 0xc33bb(%rip), %rcx     # 0xda462
movw %si, (%rcx)
movzwl 0x10(%rax), %eax
leaq 0xb08ad(%rip), %rcx     # 0xc7962
movw %ax, (%rcx)
leaq 0xb08b9(%rip), %rax     # 0xc7978
cmpb $0x0, 0x4(%rax)
je 0x170cf
movl $0x2, 0x10ff55(%rip)    # 0x127024
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: teksavemoreoptions
void
teksavemoreoptions(void)
{
     moreoptions[8]=difficulty;
     moreoptions[9]=soundv;
     moreoptions[10]=musicv;
     moreoptions[11]=mousesensitivity;
     moreoptions[12]=headbobon;

     gamestuff[0]=-1;
     gamestuff[1]=-1;
     gamestuff[2]=( int)screensize;
     gamestuff[3]=brightness;
     gamestuff[4]=biasthreshhold;
}

// Assembly:
movl 0x10ff4e(%rip), %eax    # 0x127024
leaq 0xb0923(%rip), %rcx     # 0xc7a00
movl %eax, 0x20(%rcx)
movl 0xb1516(%rip), %eax     # 0xc85fc
movl %eax, 0x24(%rcx)
movl 0xb1509(%rip), %eax     # 0xc85f8
movl %eax, 0x28(%rcx)
movl 0x10ff24(%rip), %eax    # 0x12701c
movl %eax, 0x2c(%rcx)
leaq 0xb17de(%rip), %rax     # 0xc88e0
movl (%rax), %eax
movl %eax, 0x30(%rcx)
leaq 0xb0992(%rip), %rax     # 0xc7aa0
orq $-0x1, (%rax)
leaq 0xc4a89(%rip), %rcx     # 0xdbba2
movswl (%rcx), %ecx
movl %ecx, 0x8(%rax)
leaq 0xc333c(%rip), %rcx     # 0xda462
movswl (%rcx), %ecx
movl %ecx, 0xc(%rax)
leaq 0xb082f(%rip), %rcx     # 0xc7962
movswl (%rcx), %ecx
movl %ecx, 0x10(%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: teksavemissioninfo
void
teksavemissioninfo(int fil)
{
     write(fil,symbols,sizeof(symbols));
     write(fil,symbolsdeposited,sizeof(symbolsdeposited));
     write(fil,&difficulty,sizeof(difficulty));
     write(fil,&currentmapno,sizeof(currentmapno));
    #if 0
     write(fil,&warpretang,sizeof(warpretang));
     write(fil,&warpretsect,sizeof(warpretsect));
     write(fil,&warpretx,sizeof(warpretx));
     write(fil,&warprety,sizeof(warprety));
     write(fil,&warpretz,sizeof(warpretz));
    #endif
     write(fil,&mission,sizeof(mission));
     write(fil,&numlives,sizeof(numlives));
     write(fil,&mission_accomplished,sizeof(mission_accomplished));
     write(fil,&civillianskilled,sizeof(civillianskilled));
     write(fil,&generalplay,sizeof(generalplay));
     write(fil,&singlemapmode,sizeof(singlemapmode));
     write(fil,&allsymsdeposited,sizeof(allsymsdeposited));
     write(fil,&killedsonny,sizeof(killedsonny));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x10f09c(%rip), %rsi    # 0x126d78
pushq $0xe
popq %r14
movq %r14, %rdx
callq 0x8f10
leaq 0x10f291(%rip), %rsi    # 0x126f80
movl %ebx, %edi
movq %r14, %rdx
callq 0x8f10
leaq 0x10f324(%rip), %rsi    # 0x127024
pushq $0x4
popq %r14
movl %ebx, %edi
movq %r14, %rdx
callq 0x8f10
leaq 0x10d7f7(%rip), %rsi    # 0x12550c
movl %ebx, %edi
movq %r14, %rdx
callq 0x8f10
leaq 0x10d7ea(%rip), %rsi    # 0x125510
movl %ebx, %edi
movq %r14, %rdx
callq 0x8f10
leaq 0x10d7dd(%rip), %rsi    # 0x125514
pushq $0x1
popq %r15
movl %ebx, %edi
movq %r15, %rdx
callq 0x8f10
leaq 0x10d7c9(%rip), %rsi    # 0x125515
movl %ebx, %edi
movq %r15, %rdx
callq 0x8f10
leaq 0x10d7bb(%rip), %rsi    # 0x125518
movl %ebx, %edi
movq %r14, %rdx
callq 0x8f10
leaq 0x10f2c2(%rip), %rsi    # 0x127030
movl %ebx, %edi
movq %r15, %rdx
callq 0x8f10
leaq 0x10f2aa(%rip), %rsi    # 0x127029
movl %ebx, %edi
movq %r15, %rdx
callq 0x8f10
leaq 0x10d794(%rip), %rsi    # 0x125524
movl %ebx, %edi
movq %r14, %rdx
callq 0x8f10
leaq 0x10d787(%rip), %rsi    # 0x125528
movl %ebx, %edi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x8f10
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: tekloadmissioninfo
void
tekloadmissioninfo(int fil)
{
     musicfade();

     read(fil,symbols,sizeof(symbols));
     read(fil,symbolsdeposited,sizeof(symbolsdeposited));
     read(fil,&difficulty,sizeof(difficulty));
     read(fil,&currentmapno,sizeof(currentmapno));
    #if 0
     read(fil,&warpretang,sizeof(warpretang));
     read(fil,&warpretsect,sizeof(warpretsect));
     read(fil,&warpretx,sizeof(warpretx));
     read(fil,&warprety,sizeof(warprety));
     read(fil,&warpretz,sizeof(warpretz));
    #endif
     read(fil,&mission,sizeof(mission));
     read(fil,&numlives,sizeof(numlives));
     read(fil,&mission_accomplished,sizeof(mission_accomplished));
     read(fil,&civillianskilled,sizeof(civillianskilled));
     read(fil,&generalplay,sizeof(generalplay));
     read(fil,&singlemapmode,sizeof(singlemapmode));
     read(fil,&allsymsdeposited,sizeof(allsymsdeposited));
     read(fil,&killedsonny,sizeof(killedsonny));

     if( generalplay == 1 ) {
          startmusic(rand()%7);
     }
     else {
          startmusic(mission);
     }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
xorl %eax, %eax
callq 0x1b523
leaq 0x10efb3(%rip), %rsi    # 0x126d78
pushq $0xe
popq %r14
movl %ebx, %edi
movq %r14, %rdx
callq 0x8b20
leaq 0x10f1a6(%rip), %rsi    # 0x126f80
movl %ebx, %edi
movq %r14, %rdx
callq 0x8b20
leaq 0x10f239(%rip), %rsi    # 0x127024
pushq $0x4
popq %r14
movl %ebx, %edi
movq %r14, %rdx
callq 0x8b20
leaq 0x10d70c(%rip), %rsi    # 0x12550c
movl %ebx, %edi
movq %r14, %rdx
callq 0x8b20
leaq 0x10d6ff(%rip), %rsi    # 0x125510
movl %ebx, %edi
movq %r14, %rdx
callq 0x8b20
leaq 0x10d6f2(%rip), %rsi    # 0x125514
pushq $0x1
popq %r15
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x10d6de(%rip), %rsi    # 0x125515
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x10d6d0(%rip), %rsi    # 0x125518
movl %ebx, %edi
movq %r14, %rdx
callq 0x8b20
leaq 0x10f1d7(%rip), %rsi    # 0x127030
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x10f1bf(%rip), %rsi    # 0x127029
movl %ebx, %edi
movq %r15, %rdx
callq 0x8b20
leaq 0x10d6a9(%rip), %rsi    # 0x125524
movl %ebx, %edi
movq %r14, %rdx
callq 0x8b20
leaq 0x10d69c(%rip), %rsi    # 0x125528
movl %ebx, %edi
movq %r14, %rdx
callq 0x8b20
cmpb $0x1, 0x10f193(%rip)    # 0x127030
jne 0x17eae
callq 0x8e70
pushq $0x7
popq %rcx
cltd
idivl %ecx
movl %edx, %edi
jmp 0x17eb4
movl 0x10d65c(%rip), %edi    # 0x125510
popq %rbx
popq %r14
popq %r15
jmp 0x1b5a3
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: teknetmenu
void
teknetmenu()
{
     initpaletteshifts();

     //memcpy(palette1, palette, 768);
     //memset(palette, 0, 768);

     clearview(0);
     strcpy(boardfilename,"NET1.MAP");
     prepareboard(boardfilename);
     precache();

     clearview(0);
     //memcpy(palette, palette1, 768);
     fadein(0,255,16);
}

// Assembly:
pushq %rbx
callq 0x1322e
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x4974f
leaq 0xc393c(%rip), %rdi     # 0xdb810
movb %bl, 0x8(%rdi)
movabsq $0x50414d2e3154454e, %rax # imm = 0x50414D2E3154454E
movq %rax, (%rdi)
callq 0x18550
xorl %eax, %eax
callq 0x95ed
xorl %edi, %edi
callq 0x4974f
movb %bl, 0x10d5fb(%rip)     # 0x1254f8
leaq 0x30d21c(%rip), %rdi    # 0x325120
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
popq %rbx
jmp 0x8440
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: copyrightscreen
void
copyrightscreen()
{
     clearview(0);
     smkopenmenu("smkgm.smk");
     smkmenuframe(81);
     fadein(0,255,10);
     while( (keystatus[1]   == 0) &&
            (keystatus[28]  == 0) &&
            (keystatus[57]  == 0) &&
            (keystatus[38]  == 0) &&
            (keystatus[203] == 0) &&
            (keystatus[205] == 0) &&
            (keystatus[200] == 0) &&
            (keystatus[31]  == 0) &&
            (keystatus[35]  == 0) &&
            (keystatus[208] == 0)  ) {
         smkshowmenu();
         if (handleevents() && quitevent) {
             break;
         }
     };
     smkclosemenu();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
xorl %edi, %edi
callq 0x4974f
leaq 0x69d51(%rip), %rdi     # 0x81c74
callq 0x1a57d
pushq $0x51
popq %rdi
callq 0x1a6b8
movb $0x0, 0x10d5c1(%rip)    # 0x1254f8
leaq 0x30d1e2(%rip), %rbx    # 0x325120
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8440
leaq 0x30cfdc(%rip), %r14    # 0x324f30
cmpb $0x0, 0x1(%rbx)
jne 0x17fb2
cmpb $0x0, 0x1c(%rbx)
jne 0x17fb2
cmpb $0x0, 0x39(%rbx)
jne 0x17fb2
cmpb $0x0, 0x26(%rbx)
jne 0x17fb2
cmpb $0x0, 0xcb(%rbx)
jne 0x17fb2
cmpb $0x0, 0xcd(%rbx)
jne 0x17fb2
cmpb $0x0, 0xc8(%rbx)
jne 0x17fb2
cmpb $0x0, 0x1f(%rbx)
jne 0x17fb2
cmpb $0x0, 0x23(%rbx)
jne 0x17fb2
cmpb $0x0, 0xd0(%rbx)
jne 0x17fb2
xorl %eax, %eax
callq 0x1a74c
callq 0x75fe9
testl %eax, %eax
je 0x17f54
cmpb $0x0, (%r14)
je 0x17f54
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1a7c5
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekmsc.c
// Function: depositsymbol
void
depositsymbol(int snum)
{
     int       i,findpic;
     int       sym=sector[cursectnum[snum]].hitag;

     switch( sym ) {
     case 0: findpic=3600; break;
     case 1: findpic=3604; break;
     case 2: findpic=3608; break;
     case 3: findpic=3612; break;
     case 4: findpic=3592; break;
     case 5: findpic=3596; break;
     case 6: findpic=3616; break;
     }

     if( symbols[sym] ) {
          for( i=0; i<MAXSPRITES; i++ ) {
               if( sprptr[i]->picnum == findpic ) {
                    sprptr[i]->picnum=findpic+1;
                    symbolsdeposited[sym]=1;
                    break;
               }
          }
     }

     if( symbolsdeposited[0] &&
         symbolsdeposited[1] &&
         symbolsdeposited[2] &&
         symbolsdeposited[3] &&
         symbolsdeposited[4] &&
         symbolsdeposited[5] &&
         symbolsdeposited[6] ) {
         allsymsdeposited=1;
         gameover=1;
     }
}

// Assembly:
movslq %edi, %rax
leaq 0xc3334(%rip), %rcx     # 0xdb720
movswq (%rcx,%rax,2), %rax
imulq $0x28, %rax, %rax
leaq 0x3d24e4(%rip), %rcx    # 0x3ea8e0
movswq 0x24(%rcx,%rax), %rax
leal -0x1(%rax), %edx
movl $0xe10, %ecx            # imm = 0xE10
cmpw $0x5, %dx
ja 0x1841d
movzwl %dx, %ecx
leaq 0x693f2(%rip), %rdx     # 0x8180c
movl (%rdx,%rcx,4), %ecx
leaq 0x10e954(%rip), %rdx    # 0x126d78
cmpw $0x0, (%rdx,%rax,2)
je 0x18462
xorl %edx, %edx
leaq 0x10edfc(%rip), %rsi    # 0x127230
cmpq $0x4000, %rdx           # imm = 0x4000
je 0x18462
movq (%rsi,%rdx,8), %rdi
movswl 0xe(%rdi), %r8d
incq %rdx
cmpl %r8d, %ecx
jne 0x18434
orl $0x1, %ecx
movw %cx, 0xe(%rdi)
leaq 0x10eb24(%rip), %rcx    # 0x126f80
movw $0x1, (%rcx,%rax,2)
movq 0x10eb16(%rip), %xmm0   # 0x126f80
punpcklwd %xmm0, %xmm0    # xmm0 = xmm0[0,0,1,1,2,2,3,3]
pxor %xmm1, %xmm1
pcmpeqw %xmm0, %xmm1
movmskps %xmm1, %eax
testl %eax, %eax
jne 0x184ac
cmpw $0x0, 0x10eb03(%rip)    # 0x126f88
je 0x184ac
cmpw $0x0, 0x10eafb(%rip)    # 0x126f8a
je 0x184ac
cmpw $0x0, 0x10eaf3(%rip)    # 0x126f8c
je 0x184ac
movl $0x1, 0x10d07f(%rip)    # 0x125524
movb $0x1, 0x10d04d(%rip)    # 0x1254f9
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekprep.c
// Function: netstartspot
void
netstartspot(int *x, int *y,short *sectnum)
{
     int       rv;

     rv=( int)((krand_intercept("PREP 564"))&15L);
     if (rv >= startspotcnt) {
          rv=0;
     }
     *x=startspot[rv].x;
     *y=startspot[rv].y;
     *sectnum=startspot[rv].sectnum;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x684f0(%rip), %rdi     # 0x81e5f
callq 0x2945b
andl $0xf, %eax
xorl %ecx, %ecx
cmpl 0x10d7a1(%rip), %eax    # 0x127120
cmovll %eax, %ecx
shll $0x4, %ecx
leaq 0x10d7a4(%rip), %rax    # 0x127130
movl (%rcx,%rax), %edx
movl %edx, (%r15)
movl 0x4(%rcx,%rax), %edx
movl %edx, (%r14)
movzwl 0xc(%rcx,%rax), %eax
movw %ax, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekprep.c
// Function: tekrestoreplayer
void
tekrestoreplayer(short snum)
{
     setsprite(playersprite[snum],posx[snum],posy[snum],posz[snum]+(KENSPLAYERHEIGHT<<8));
     sprite[playersprite[snum]].ang = ang[snum];
     sprite[playersprite[snum]].xrepeat = 24;
     sprite[playersprite[snum]].yrepeat = 24;
     horiz[snum] = 100;
     health[snum]=MAXHEALTH;
     fireseq[snum]=0;
     restockammo(snum);
     stun[snum]=MAXSTUN;
     fallz[snum]=0;
     drawweap[snum]=0;
     invredcards[snum]=0;
     invbluecards[snum]=0;
     invaccutrak[snum]=0;
     dieframe[snum]=0;
     if( option[4] != 0 ) {
          weapons[snum]=0;
          weapons[snum]=flags32[GUN2FLAG]|flags32[GUN3FLAG];
     }
     else {
          weapons[snum]=0;
          weapons[snum]=flags32[GUN1FLAG]|flags32[GUN2FLAG]|flags32[GUN3FLAG];
     }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movslq %edi, %rbx
leaq 0xc1d9b(%rip), %r14     # 0xdb750
movswl (%r14,%rbx,2), %edi
leaq 0xc0b0f(%rip), %rax     # 0xda4d0
movl (%rax,%rbx,4), %esi
leaq 0xc0b45(%rip), %rax     # 0xda510
movl (%rax,%rbx,4), %edx
leaq 0xc0b7b(%rip), %rax     # 0xda550
movl $0x2200, %ecx           # imm = 0x2200
addl (%rax,%rbx,4), %ecx
callq 0x43f76
leaq 0xc0ac7(%rip), %rax     # 0xda4b0
movzwl (%rax,%rbx,2), %eax
movswq (%r14,%rbx,2), %rcx
imulq $0x2c, %rcx, %rcx
leaq 0x40a133(%rip), %rdx    # 0x423b30
movw %ax, 0x1c(%rdx,%rcx)
movw $0x1818, 0x14(%rdx,%rcx) # imm = 0x1818
leaq 0xc1e50(%rip), %rax     # 0xdb860
movl $0x64, (%rax,%rbx,4)
leaq 0xc0b72(%rip), %rax     # 0xda590
movl $0x3e8, %ebp            # imm = 0x3E8
movl %ebp, (%rax,%rbx,4)
leaq 0x10b8b3(%rip), %rax    # 0x1252e0
andl $0x0, (%rax,%rbx,4)
movl %ebx, %edi
callq 0xe309
leaq 0xc09d1(%rip), %rax     # 0xda410
andl $0x0, (%rax,%rbx,4)
leaq 0x10b9e6(%rip), %rax    # 0x125430
andl $0x0, (%rax,%rbx,4)
leaq 0x10d33b(%rip), %rax    # 0x126d90
andl $0x0, (%rax,%rbx,4)
leaq 0x10d370(%rip), %rax    # 0x126dd0
andl $0x0, (%rax,%rbx,4)
leaq 0x10d3a5(%rip), %rax    # 0x126e10
andl $0x0, (%rax,%rbx,4)
leaq 0x10b8fa(%rip), %rax    # 0x125370
andw $0x0, (%rax,%rbx,2)
leaq 0xc090e(%rip), %rax     # 0xda390
movl %ebp, (%rax,%rbx,4)
leaq 0xadeec(%rip), %rax     # 0xc7978
cmpb $0x0, 0x4(%rax)
je 0x19aa1
leaq 0xaee57(%rip), %rcx     # 0xc88f0
movl 0xc(%rcx), %eax
orl 0x8(%rcx), %eax
jmp 0x19ab1
leaq 0xaee48(%rip), %rcx     # 0xc88f0
movl 0x8(%rcx), %eax
orl 0x4(%rcx), %eax
orl 0xc(%rcx), %eax
leaq 0x10b9c8(%rip), %rcx    # 0x125480
movl %eax, (%rcx,%rbx,4)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekprep.c
// Function: initplayersprite
void
initplayersprite(short snum)
{
     int      i;

     if (playersprite[snum] >= 0) return;

     i=jsinsertsprite(cursectnum[snum], 8);
     if( i == -1 ) {
          crashgame("initplayersprite: jsinsertsprite on player %d failed", snum);
     }
     playersprite[snum]=i;
     sprite[i].x=posx[snum];
     sprite[i].y=posy[snum];
     sprite[i].z=posz[snum]+(KENSPLAYERHEIGHT<<8);
     sprite[i].cstat = 0x101;
     sprite[i].shade=0;
     if( option[4] == 0 ) {
          sprite[i].pal=0;
     }
     else {
          sprite[i].pal=snum+16;
     }
     sprite[i].clipdist=32;
     sprite[i].xrepeat=24;
     sprite[i].yrepeat=24;
     sprite[i].xoffset=0;
     sprite[i].yoffset=0;
     sprite[i].picnum=DOOMGUY;
     sprite[i].ang=ang[snum];
     sprite[i].xvel=0;
     sprite[i].yvel=0;
     sprite[i].zvel=0;
     sprite[i].owner=snum+4096;
     sprite[i].sectnum=cursectnum[snum];
     sprite[i].statnum=8;
     sprite[i].lotag=0;
     sprite[i].hitag=0;
     // important to set extra = -1
     sprite[i].extra=-1;

     tekrestoreplayer(snum);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq %edi, %r15
leaq 0xc1c7d(%rip), %r12     # 0xdb750
cmpw $0x0, (%r12,%r15,2)
js 0x19ae5
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0xc1c34(%rip), %r13     # 0xdb720
movswl (%r13,%r15,2), %edi
pushq $0x8
popq %rsi
callq 0x1cf0c
movl %eax, %ebx
movswl %r15w, %r14d
cmpw $-0x1, %ax
jne 0x19b17
leaq 0x68364(%rip), %rdi     # 0x81e71
movl %r14d, %esi
xorl %eax, %eax
callq 0x2acb8
leaq 0xc09b2(%rip), %rax     # 0xda4d0
movl (%rax,%r15,4), %edx
movswq %bx, %rax
imulq $0x2c, %rax, %rax
leaq 0x409fff(%rip), %rcx    # 0x423b30
movl %edx, (%rcx,%rax)
leaq 0xc09d5(%rip), %rdx     # 0xda510
movl (%rdx,%r15,4), %edx
movl %edx, 0x4(%rcx,%rax)
leaq 0xc0a06(%rip), %rdx     # 0xda550
movl $0x2200, %esi           # imm = 0x2200
addl (%rdx,%r15,4), %esi
movl %esi, 0x8(%rcx,%rax)
leaq 0xade1a(%rip), %rdx     # 0xc7978
xorl %esi, %esi
cmpb $0x0, 0x4(%rdx)
leal 0x10(%r14), %edx
movzbl %dl, %edx
cmovel %esi, %edx
movw $0x101, 0xc(%rcx,%rax)  # imm = 0x101
movb $0x0, 0x10(%rcx,%rax)
movb %dl, 0x11(%rcx,%rax)
movb $0x20, 0x12(%rcx,%rax)
movl $0x1818, 0x14(%rcx,%rax) # imm = 0x1818
movw $0x3e7, 0xe(%rcx,%rax)  # imm = 0x3E7
leaq 0xc0917(%rip), %rdx     # 0xda4b0
movzwl (%rdx,%r15,2), %edx
movw %dx, 0x1c(%rcx,%rax)
leal 0x1000(%r14), %edx
movw %dx, 0x1e(%rcx,%rax)
movzwl (%r13,%r15,2), %edx
movw %dx, 0x18(%rcx,%rax)
movw $0x8, 0x1a(%rcx,%rax)
andq $0x0, 0x20(%rcx,%rax)
movw %bx, (%r12,%r15,2)
movl $0xffff0000, 0x28(%rcx,%rax) # imm = 0xFFFF0000
movl %r14d, %edi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x199a7
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekprep.c
// Function: initptrlists
int
initptrlists()
{
     int       i;

     for( i=0; i < MAXSPRITES; i++ ) {
          sprptr[i]=&sprite[i];
          sprXTptr[i]=&spriteXT[i];
     }
     for( i=0; i < MAXSECTORS; i++ ) {
          sectptr[i]=&sector[i];
     }
     for( i=0; i < MAXWALLS; i++ ) {
          wallptr[i]=&wall[i];
     }

     return 0;
}

// Assembly:
leaq 0x12d644(%rip), %rax    # 0x147230
leaq 0x409f3d(%rip), %rcx    # 0x423b30
xorl %edx, %edx
leaq 0x10d634(%rip), %rsi    # 0x127230
leaq 0x1b562d(%rip), %rdi    # 0x1cf230
cmpq $0x20000, %rdx          # imm = 0x20000
je 0x19c22
movq %rcx, (%rdx,%rsi)
movq %rax, (%rdx,%rdi)
addq $0x8, %rdx
addq $0x22, %rax
addq $0x2c, %rcx
jmp 0x19c03
leaq 0x3d0cb7(%rip), %rax    # 0x3ea8e0
xorl %ecx, %ecx
leaq 0x1d55fe(%rip), %rdx    # 0x1ef230
cmpq $0x8000, %rcx           # imm = 0x8000
je 0x19c49
movq %rax, (%rcx,%rdx)
addq $0x8, %rcx
addq $0x28, %rax
jmp 0x19c32
leaq 0x345c80(%rip), %rax    # 0x35f8d0
xorl %ecx, %ecx
leaq 0x1dd5d7(%rip), %rdx    # 0x1f7230
cmpq $0x20000, %rcx          # imm = 0x20000
je 0x19c70
movq %rax, (%rcx,%rdx)
addq $0x8, %rcx
addq $0x20, %rax
jmp 0x19c59
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/teksmk.c
// Function: smkopenmenu
void
smkopenmenu(char *name)
{
     unsigned long smkx, smky;
     int fh, flen;

     fh = kopen4load(name, 0);
     if (fh < 0) {
          debugprintf("smkopenmenu(\"%s\") failed\n", name);
          return;
     }

     flen = kfilelength(fh);
     smkmenubuf = (unsigned char *)malloc(flen);

     if (smkmenubuf == NULL) {
          kclose(fh);
          debugprintf("smkopenmenu(\"%s\") malloc of %d bytes failed\n", name, flen);
          return;
     }

     kread(fh, smkmenubuf, flen);
     kclose(fh);

     smkmenu = smk_open_memory(smkmenubuf, flen);
     if (!smkmenu) {
          free(smkmenubuf);
          smkmenubuf = NULL;
          debugprintf("smk_open_memory() returned null\n");
          return;
     }

     // Smacker frames are decoded linewise, but BUILD expects its
     // tiles columnwise, so we will treat the tile as though it's
     // rotated 90 degrees and flipped horizontally.

     smk_enable_all(smkmenu, SMK_VIDEO_TRACK);
     smk_info_video(smkmenu, &smkx, &smky, NULL);
     tilesizx[SMKPICNUM0] = smky;
     tilesizy[SMKPICNUM0] = smkx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
xorl %esi, %esi
callq 0x302de
testl %eax, %eax
js 0x1a64c
movl %eax, %ebp
movl %eax, %edi
callq 0x307f4
movl %eax, %r15d
movslq %eax, %r14
movq %r14, %rdi
callq 0x8d50
movq %rax, 0x204ca9(%rip)    # 0x21f260
testq %rax, %rax
je 0x1a667
movl %ebp, %edi
movq %rax, %rsi
movl %r14d, %edx
callq 0x304e7
movl %ebp, %edi
callq 0x30983
movq 0x204c85(%rip), %rdi    # 0x21f260
movq %r14, %rsi
callq 0x2b1ac
movq %rax, 0x204c7e(%rip)    # 0x21f268
testq %rax, %rax
je 0x1a68c
movq %rax, %rdi
movl $0x80, %esi
callq 0x2c820
movq 0x204c61(%rip), %rdi    # 0x21f268
leaq 0x10(%rsp), %rbx
leaq 0x8(%rsp), %r14
movq %rbx, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x2c6b1
movzwl (%r14), %eax
leaq 0x59c877(%rip), %rcx    # 0x5b6ea0
movw %ax, 0x47fa(%rcx)
movzwl (%rbx), %eax
leaq 0x58e026(%rip), %rcx    # 0x5a8660
movw %ax, 0x47fa(%rcx)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x679a8(%rip), %rdi     # 0x81ffb
movq %rbx, %rsi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x74e7b
movl %ebp, %edi
callq 0x30983
leaq 0x679a0(%rip), %rdi     # 0x82015
movq %rbx, %rsi
movl %r15d, %edx
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x74e7b
movq 0x204bcd(%rip), %rdi    # 0x21f260
callq 0x8270
andq $0x0, 0x204bc0(%rip)    # 0x21f260
leaq 0x67876(%rip), %rdi     # 0x81f1d
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x74e7b
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/teksmk.c
// Function: smkmenuframe
void
smkmenuframe(int fn)
{
     unsigned char spal[768];
     const unsigned char *palptr;
     int i;

     if (!smkmenu) {
          return;
     }

     // Render the first decodeframe as the menu background.
     smk_first(smkmenu);

     // Next, render the particular decodeframe requested.
     smk_render_frame(smkmenu, fn-1);

     // Convert the palette to the VGA (0-63) range BUILD uses.
     for (palptr = smk_get_palette(smkmenu), i=256*3-1; i>=0; i--)
          spal[i] = palptr[i] >> 2;

     waloff[SMKPICNUM0] = (intptr_t)smk_get_video(smkmenu);
#if USE_POLYMOST && USE_OPENGL
     invalidatetile(SMKPICNUM0, 0, -1);
#endif

     setbrightness(-1, spal, 2|4);
}

// Assembly:
pushq %rbx
subq $0x300, %rsp            # imm = 0x300
movl %edi, %ebx
movq 0x204b9f(%rip), %rdi    # 0x21f268
testq %rdi, %rdi
je 0x1a743
callq 0x2c994
movq 0x204b8e(%rip), %rdi    # 0x21f268
decl %ebx
movslq %ebx, %rsi
callq 0x2d6e4
movq 0x204b7d(%rip), %rdi    # 0x21f268
callq 0x2c8d4
movl $0x2ff, %ecx            # imm = 0x2FF
testl %ecx, %ecx
js 0x1a70b
movl %ecx, %edx
movb (%rax,%rdx), %sil
shrb $0x2, %sil
movb %sil, (%rsp,%rdx)
decl %ecx
jmp 0x1a6f5
movq 0x204b56(%rip), %rdi    # 0x21f268
callq 0x2c901
leaq 0x525a42(%rip), %rcx    # 0x540160
movq %rax, 0x11fe8(%rcx)
pushq $-0x1
popq %rbx
movl $0x23fd, %edi           # imm = 0x23FD
xorl %esi, %esi
movl %ebx, %edx
callq 0x49c10
movq %rsp, %rsi
pushq $0x6
popq %rdx
movl %ebx, %edi
callq 0x41f79
addq $0x300, %rsp            # imm = 0x300
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/teksmk.c
// Function: smkshowmenu
void
smkshowmenu()
{
     if (!smkmenu) {
          return;
     }

     clearallviews(0);
     rotatesprite(160<<16, 100<<16, divscale16(200, tilesizx[SMKPICNUM0]),
                 512, SMKPICNUM0, 0, 0, 2+4, 0, 0, xdim-1, ydim-1);
     nextpage();
}

// Assembly:
cmpq $0x0, 0x204b14(%rip)    # 0x21f268
je 0x1a7c4
pushq %rax
xorl %edi, %edi
callq 0x421ca
leaq 0x59c73b(%rip), %rax    # 0x5b6ea0
movswl 0x47fa(%rax), %ecx
movl $0xc80000, %eax         # imm = 0xC80000
xorl %edx, %edx
idivl %ecx
leaq 0x5946f0(%rip), %rcx    # 0x5aee6c
movl (%rcx), %r10d
decl %r10d
leaq 0x5946e7(%rip), %rcx    # 0x5aee70
movl (%rcx), %r11d
decl %r11d
movl $0xa00000, %edi         # imm = 0xA00000
movl $0x640000, %esi         # imm = 0x640000
movl %eax, %edx
movl $0x200, %ecx            # imm = 0x200
movl $0x23fd, %r8d           # imm = 0x23FD
xorl %r9d, %r9d
pushq %r11
pushq %r10
pushq $0x0
pushq $0x0
pushq $0x6
pushq $0x0
callq 0x48ebe
addq $0x30, %rsp
popq %rax
jmp 0x422ff
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/teksmk.c
// Function: smkclosemenu
void
smkclosemenu()
{
     if (smkmenu) smk_close(smkmenu);
     if (smkmenubuf) free(smkmenubuf);

     waloff[SMKPICNUM0] = 0;
     smkmenu = NULL;
     smkmenubuf = NULL;
}

// Assembly:
pushq %rax
movq 0x204a9b(%rip), %rdi    # 0x21f268
testq %rdi, %rdi
je 0x1a7d7
callq 0x2c41d
movq 0x204a82(%rip), %rdi    # 0x21f260
callq 0x8270
leaq 0x525976(%rip), %rax    # 0x540160
andq $0x0, 0x11fe8(%rax)
andq $0x0, 0x204a6e(%rip)    # 0x21f268
andq $0x0, 0x204a5e(%rip)    # 0x21f260
popq %rax
retq