LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/tekgame.c
// Function: setanimation
int
setanimation(int *animptr, int thegoal, int thevel, int theacc)
{
     int i, j;

     if (animatecnt >= MAXANIMATES) return(-1);

     j = animatecnt;
     for(i=animatecnt-1;i>=0;i--)
          if (animptr == animateptr[i])
               { j = i; break; }

     animateptr[j] = animptr;
     animategoal[j] = thegoal;
     animatevel[j] = thevel;
     animateacc[j] = theacc;
     if (j == animatecnt) animatecnt++;
     return(j);
}

// Assembly:
movl 0xd5d56(%rip), %r8d     # 0xe4470
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $0x1ff, %r8d            # imm = 0x1FF
jg 0xe787
leaq -0x1(%r8), %r10
leaq 0x11c55d(%rip), %r9     # 0x12ac90
movl %r8d, %eax
testl %eax, %eax
jle 0xe74a
movl %r10d, %r11d
decl %eax
decq %r10
cmpq %rdi, (%r9,%r11,8)
jne 0xe736
jmp 0xe74d
movl %r8d, %eax
movslq %eax, %r10
movq %rdi, (%r9,%r10,8)
leaq 0x11d535(%rip), %rdi    # 0x12bc90
movl %esi, (%rdi,%r10,4)
leaq 0x11dd2a(%rip), %rsi    # 0x12c490
movl %edx, (%rsi,%r10,4)
leaq 0x11e51f(%rip), %rdx    # 0x12cc90
movl %ecx, (%rdx,%r10,4)
cmpl %r8d, %r10d
jne 0xe787
leal 0x1(%r8), %eax
movl %eax, 0xd5cec(%rip)     # 0xe4470
movl %r8d, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/tekgun.c
// Function: restockammo
void
restockammo(int snum)
{
     ammo1[snum]=MAXAMMO;
     ammo2[snum]=MAXAMMO>>1;
     ammo3[snum]=20;
     ammo4[snum]=0;
     ammo5[snum]=MAXAMMO;
     ammo6[snum]=0;
     ammo7[snum]=0;
     ammo8[snum]=0;
}

// Assembly:
movslq %edi, %rax
leaq 0x11ff7c(%rip), %rcx    # 0x12f1e0
movw $0x64, %dx
movw %dx, (%rcx,%rax,2)
leaq 0x11ff8d(%rip), %rcx    # 0x12f200
movw $0x32, (%rcx,%rax,2)
leaq 0x11ffa0(%rip), %rcx    # 0x12f220
movw $0x14, (%rcx,%rax,2)
leaq 0x11ffb3(%rip), %rcx    # 0x12f240
xorl %esi, %esi
movw %si, (%rcx,%rax,2)
leaq 0x11ffc6(%rip), %rcx    # 0x12f260
movw %dx, (%rcx,%rax,2)
leaq 0x11ffdb(%rip), %rcx    # 0x12f280
movw %si, (%rcx,%rax,2)
leaq 0x11fff0(%rip), %rcx    # 0x12f2a0
movw %si, (%rcx,%rax,2)
leaq 0x120005(%rip), %rcx    # 0x12f2c0
movw %si, (%rcx,%rax,2)
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/tekgun.c
// Function: tekfiregun
void
tekfiregun(int gun,short p)  // this kicks off an animation sequence
{
     if( fireseq[p] != 0 ) {
          return;
     }
     if( tekgunrep(gun) || ((oflags[p]&2048) == 0) ) {
//          if( hasammo(gun,p) ) {
               fireseq[p]=1;
               oneshot[p]=0;
//          }
     }
}

// Assembly:
movslq %esi, %rax
leaq 0x11ff4b(%rip), %rcx    # 0x12f2e0
cmpl $0x0, (%rcx,%rax,4)
je 0xf39c
retq
incl %edi
movslq %edi, %rdx
leaq (%rdx,%rdx,8), %rdx
leaq 0xc28a4(%rip), %rsi     # 0xd1c50
cmpb $0x0, 0x6(%rsi,%rdx,2)
jne 0xf3c1
leaq 0xd65a6(%rip), %rdx     # 0xe5960
testb $0x8, 0x1(%rdx,%rax,2)
jne 0xf39b
movl $0x1, (%rcx,%rax,4)
leaq 0x11ff51(%rip), %rcx    # 0x12f320
movl $0x0, (%rcx,%rax,4)
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/tekgun.c
// Function: playerwoundplayer
int
validplayer(int snum)
{
     int       j;

     for( j=connecthead ; j >= 0 ; j=connectpoint2[j] ) {
          if( j == snum ) {
               return(1);
          }
     }
     return(0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
leaq 0x79674f(%rip), %rax    # 0x7a5b30
movl (%rax), %eax
testl %eax, %eax
js 0xf414
leaq 0x796752(%rip), %rcx    # 0x7a5b40
movl %eax, %r8d
cmpl %edi, %r8d
je 0xf404
movl %r8d, %r8d
movl (%rcx,%r8,4), %r8d
testl %r8d, %r8d
jns 0xf3f1
jmp 0xf414
movswl %si, %ebx
cmpl %ebx, %eax
je 0xf41b
movl %eax, %eax
movl (%rcx,%rax,4), %eax
testl %eax, %eax
jns 0xf407
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
addb $-0x2, %dl
cmpb $0x5, %dl
ja 0xf440
movzbl %dl, %ecx
addl %ecx, %ecx
leaq 0x7ffa5(%rip), %rax     # 0x8f3d4
movzwl (%rcx,%rax), %eax
leaq 0x7ffa6(%rip), %rdx     # 0x8f3e0
movzwl (%rcx,%rdx), %ebp
jmp 0xf448
movw $0x5, %bp
movw $0xffe0, %ax            # imm = 0xFFE0
movswl %di, %edi
movswl %ax, %esi
callq 0xa5e8
testl %eax, %eax
setne %cl
shll %cl, %ebp
movswl %bp, %esi
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xa723
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/tekgun.c
// Function: playerpainsound
void
playerpainsound(int p)
{
     if( !validplayer(p) ) {
          crashgame("playerpainsnd: bad plr num");
     }

     if( krand_intercept(" GUN 341") < 1024 ) {
          playsound(S_PAIN1+(krand_intercept(" GUN 342")&1),posx[p],posy[p],0,ST_NOUPDATE);
     }
}

// Assembly:
pushq %rbx
movl %edi, %ebx
leaq 0x7965a4(%rip), %rax    # 0x7a5b30
movl (%rax), %eax
testl %eax, %eax
js 0xf5a6
leaq 0x7965a7(%rip), %rcx    # 0x7a5b40
cmpl %ebx, %eax
je 0xf5b4
movl %eax, %eax
movl (%rcx,%rax,4), %eax
testl %eax, %eax
jns 0xf599
leaq 0x7fe3f(%rip), %rdi     # 0x8f3ec
xorl %eax, %eax
callq 0x2eb88
leaq 0x7fe4c(%rip), %rdi     # 0x8f407
callq 0x2d112
cmpl $0x3ff, %eax            # imm = 0x3FF
jg 0xf5fe
leaq 0x7fe42(%rip), %rdi     # 0x8f410
callq 0x2d112
andl $0x1, %eax
leal 0x7b(%rax), %edi
movslq %ebx, %rax
leaq 0xd4eed(%rip), %rcx     # 0xe44d0
movl (%rcx,%rax,4), %esi
leaq 0xd4f23(%rip), %rcx     # 0xe4510
movl (%rcx,%rax,4), %edx
xorl %ecx, %ecx
movl $0x4, %r8d
popq %rbx
jmp 0x1c370
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/tekgun.c
// Function: tekhasweapon
int
tekhasweapon(int gun,short snum)
{
     int       hasit=0;

     if( mission == 7 ) {
          if( gun != 7 ) {
               if( snum == screenpeek ) {
                    notininventory=1;
               }
               return(0);
          }
          else {
               return(1);
          }
     }
     else {
          if( gun == 7 ) {
               if( snum == screenpeek ) {
                    showmessage("ONLY IN MATRIX");
               }
               return(0);
          }
     }

     hasit=(weapons[snum]&flags32[gun+1]);
     if( hasit )
          return(1);

     notininventory=1;
     return(0);
}

// Assembly:
pushq %rbx
leaq 0x11d8df(%rip), %rax    # 0x12f510
cmpl $0x7, (%rax)
jne 0x11c5a
movl $0x1, %ebx
cmpl $0x7, %edi
je 0x11cae
leaq 0xd2817(%rip), %rax     # 0xe445e
xorl %ebx, %ebx
cmpw %si, (%rax)
jne 0x11cae
leaq 0x11f347(%rip), %rax    # 0x130f9c
movb $0x1, (%rax)
jmp 0x11cae
cmpl $0x7, %edi
jne 0x11c7f
leaq 0xd27f8(%rip), %rax     # 0xe445e
xorl %ebx, %ebx
cmpw %si, (%rax)
jne 0x11cae
leaq 0x7d830(%rip), %rdi     # 0x8f4a4
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x14be7
jmp 0x11cae
movswq %si, %rax
leaq 0x11d7f6(%rip), %rcx    # 0x12f480
movslq %edi, %rdx
leaq 0xc0c5c(%rip), %rsi     # 0xd28f0
movl 0x4(%rsi,%rdx,4), %edx
movl $0x1, %ebx
testl %edx, (%rcx,%rax,4)
jne 0x11cae
leaq 0x11f2f3(%rip), %rax    # 0x130f9c
movb $0x1, (%rax)
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movl %edi, %ebx
leaq 0x11d624(%rip), %rsi    # 0x12f2e0
movl $0x40, %edx
callq 0x8f10
leaq 0x11d513(%rip), %rsi    # 0x12f1e0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11d520(%rip), %rsi    # 0x12f200
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11d52d(%rip), %rsi    # 0x12f220
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11d53a(%rip), %rsi    # 0x12f240
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11d547(%rip), %rsi    # 0x12f260
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11d554(%rip), %rsi    # 0x12f280
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11d561(%rip), %rsi    # 0x12f2a0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11d56e(%rip), %rsi    # 0x12f2c0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11d71b(%rip), %rsi    # 0x12f480
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11d678(%rip), %rsi    # 0x12f3f0
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11d625(%rip), %rsi    # 0x12f3b0
movl $0x40, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x11d5c2(%rip), %rsi    # 0x12f360
movl $0x4, %edx
movl %ebx, %edi
popq %rbx
jmp 0x8f10
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movl %edi, %ebx
leaq 0x11d52b(%rip), %rsi    # 0x12f2e0
movl $0x40, %edx
callq 0x8b20
leaq 0x11d41a(%rip), %rsi    # 0x12f1e0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11d427(%rip), %rsi    # 0x12f200
movl $0x20, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11d434(%rip), %rsi    # 0x12f220
movl $0x20, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11d441(%rip), %rsi    # 0x12f240
movl $0x20, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11d44e(%rip), %rsi    # 0x12f260
movl $0x20, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11d45b(%rip), %rsi    # 0x12f280
movl $0x20, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11d468(%rip), %rsi    # 0x12f2a0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11d475(%rip), %rsi    # 0x12f2c0
movl $0x20, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11d622(%rip), %rsi    # 0x12f480
movl $0x40, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11d57f(%rip), %rsi    # 0x12f3f0
movl $0x40, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11d52c(%rip), %rsi    # 0x12f3b0
movl $0x40, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x11d4c9(%rip), %rsi    # 0x12f360
movl $0x4, %edx
movl %ebx, %edi
popq %rbx
jmp 0x8b20
// File: /workspace/github_c_makefile_star2_O3/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, 0x11c773(%rip)    # 0x130d38
jne 0x145e6
movb $0x0, 0x11c76a(%rip)    # 0x130d38
callq 0x4fb14
cmpl $0x3, %eax
jl 0x145e8
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
popq %rax
jmp 0x4e44a
popq %rax
retq
leaq 0xcfe73(%rip), %rax     # 0xe4462
movswl (%rax), %edi
leaq 0x418e37(%rip), %rsi    # 0x42d430
xorl %edx, %edx
popq %rax
jmp 0x46954
// File: /workspace/github_c_makefile_star2_O3/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:
movl $0x1, %ecx
leaq 0x11aeda(%rip), %rdx    # 0x12f530
leaq 0x418dd3(%rip), %rax    # 0x42d430
xorl %esi, %esi
movzbl (%rax,%rsi), %edi
movl $0x40, %r8d
subl %edi, %r8d
imull %ecx, %r8d
leal 0x7(%r8), %r9d
testl %r8d, %r8d
cmovnsl %r8d, %r9d
shrl $0x3, %r9d
addb %dil, %r9b
movb %r9b, (%rdx,%rsi)
movzbl 0x1(%rax,%rsi), %edi
movl %edi, %r8d
imull %ecx, %r8d
shrl $0x3, %r8d
subb %r8b, %dil
movb %dil, 0x1(%rdx,%rsi)
movzbl 0x2(%rax,%rsi), %edi
movl %edi, %r8d
imull %ecx, %r8d
shrl $0x3, %r8d
subb %r8b, %dil
movb %dil, 0x2(%rdx,%rsi)
addq $0x3, %rsi
cmpl $0x300, %esi            # imm = 0x300
jne 0x1465f
incq %rcx
addq $0x300, %rdx            # imm = 0x300
cmpq $0x5, %rcx
jne 0x1465d
movl $0x1, %ecx
leaq 0x11ba52(%rip), %rdx    # 0x130130
xorl %esi, %esi
movzbl (%rax,%rsi), %edi
movl $0x40, %r8d
subl %edi, %r8d
imull %ecx, %r8d
movslq %r8d, %r8
imulq $0x66666667, %r8, %r8   # imm = 0x66666667
movq %r8, %r9
shrq $0x3f, %r9
shrq $0x23, %r8
addl %r9d, %r8d
addb %dil, %r8b
movb %r8b, (%rdx,%rsi)
movzbl 0x1(%rax,%rsi), %edi
movl $0x3e, %r8d
subl %edi, %r8d
imull %ecx, %r8d
movslq %r8d, %r8
imulq $0x66666667, %r8, %r8   # imm = 0x66666667
movq %r8, %r9
shrq $0x3f, %r9
shrq $0x23, %r8
addl %r9d, %r8d
addb %dil, %r8b
movb %r8b, 0x1(%rdx,%rsi)
movzbl 0x2(%rax,%rsi), %edi
movl %edi, %r8d
imull %ecx, %r8d
movslq %r8d, %r8
imulq $-0x66666667, %r8, %r8  # imm = 0x99999999
movq %r8, %r9
shrq $0x3f, %r9
shrq $0x23, %r8
addl %r9d, %r8d
addb %dil, %r8b
movb %r8b, 0x2(%rdx,%rsi)
addq $0x3, %rsi
cmpl $0x300, %esi            # imm = 0x300
jne 0x146e0
incq %rcx
addq $0x300, %rdx            # imm = 0x300
cmpq $0x4, %rcx
jne 0x146de
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x14c47
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, 0x11c0ef(%rip)   # 0x130d40
movaps %xmm0, 0x11c0f8(%rip)   # 0x130d50
movq $0x0, 0x11c0fd(%rip) # 0x130d60
leaq 0x11c0d6(%rip), %rbx    # 0x130d40
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rsp, %rcx
movq %rax, (%rcx)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rcx)
movq %rdi, 0x10(%rcx)
movl $0x28, %esi
movq %rbx, %rdi
movq %r10, %rdx
callq 0x8a10
movb $0x0, 0x11c0c6(%rip)    # 0x130d67
leaq 0x5a41c4(%rip), %rax    # 0x5b8e6c
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, 0x11c09f(%rip)    # 0x130d68
movl $0x1, 0x11a835(%rip)    # 0x12f508
addq $0xd8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x790e27(%rip), %rax    # 0x7a5b24
movslq (%rax), %rax
leaq 0xd0a49(%rip), %rcx     # 0xe5750
movswl (%rcx,%rax,2), %eax
movl %eax, %ecx
andb $0x7, %cl
movl $0x1, %edx
shll %cl, %edx
shrl $0x3, %eax
movswq %ax, %rax
leaq 0x54763b(%rip), %rcx    # 0x55c360
orb %dl, (%rcx,%rax)
leaq 0x5ac171(%rip), %rax    # 0x5c0ea0
xorl %ecx, %ecx
xorl %edx, %edx
subw 0xc38(%rax), %dx
movw %dx, 0x11c02b(%rip)     # 0x130d6c
xorl %edx, %edx
subw 0xc2e(%rax), %dx
movw %dx, 0x11c01d(%rip)     # 0x130d6e
movzwl 0xc24(%rax), %eax
xorl %edx, %edx
subw %ax, %dx
movw %dx, 0x11c00c(%rip)     # 0x130d70
movl %ecx, 0x11a79a(%rip)    # 0x12f504
movl %ecx, 0x11a790(%rip)    # 0x12f500
movl %ecx, 0x11a786(%rip)    # 0x12f4fc
movl 0xbd87c(%rip), %edi     # 0xd25f8
shll $0x3, %edi
callq 0x1c704
movl 0xbd872(%rip), %edi     # 0xd25fc
shll $0xb, %edi
popq %rax
jmp 0x1c705
// File: /workspace/github_c_makefile_star2_O3/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 0xbbbdf(%rip), %rax     # 0xd1978
cmpb $0x0, 0x4(%rax)
setne %al
leaq 0x78fd89(%rip), %rcx    # 0x7a5b30
movl (%rcx), %ebx
testl %ebx, %ebx
setns %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x15e64
leaq 0xbbca0(%rip), %rax     # 0xd1a60
movl 0x8(%rax), %eax
leaq 0x78fd76(%rip), %r13    # 0x7a5b40
leaq 0xcfdd1(%rip), %rbp     # 0xe5ba2
leaq 0x5a3094(%rip), %r12    # 0x5b8e6c
leaq 0x11b091(%rip), %r14    # 0x130e70
movl %ebx, %r15d
movl $0x0, %ecx
testl %eax, %eax
je 0x15e55
movswl (%rbp), %edx
movl %eax, %ecx
cmpl %edx, (%r12)
jg 0x15e55
leaq (%r15,%r15,4), %rax
leaq (%r15,%rax,2), %rcx
addq 0xbb112(%rip), %rcx     # 0xd0f18
leaq 0x117873(%rip), %rax    # 0x12d680
movl (%rax,%r15,4), %r8d
movq %r14, %rdi
leaq 0x79bd6(%rip), %rsi     # 0x8f9f1
movl %ebx, %edx
xorl %eax, %eax
callq 0x8f20
leaq 0x56ebd5(%rip), %rax    # 0x584a00
movl (%rax), %eax
leal (%rax,%rbx,8), %esi
addl $0x20, %esi
movl $0xc, %edi
movq %r14, %rdx
movl $0x15c, %ecx            # imm = 0x15C
movl $0xff, %r8d
callq 0xa15f
leaq 0xbbc0e(%rip), %rax     # 0xd1a60
movl 0x8(%rax), %ecx
movl (%r13,%r15,4), %ebx
movl %ecx, %eax
testl %ebx, %ebx
jns 0x15ddf
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x119fea(%rip), %eax    # 0x130fa0
incl %eax
movl %eax, 0x119fe2(%rip)    # 0x130fa0
cmpl $0x28, %eax
jne 0x16fdd
movl $0x0, 0x119fd3(%rip)    # 0x130fa0
movl 0x118529(%rip), %ecx    # 0x12f4fc
incl %ecx
movl %ecx, 0x118521(%rip)    # 0x12f4fc
jmp 0x16fe3
movl 0x118519(%rip), %ecx    # 0x12f4fc
movl 0x118517(%rip), %eax    # 0x12f500
cmpl $0x3c, %ecx
jne 0x17000
incl %eax
movl %eax, 0x11850a(%rip)    # 0x12f500
movl $0x0, 0x1184fc(%rip)    # 0x12f4fc
movl 0x1184fe(%rip), %ecx    # 0x12f504
cmpl $0x3c, %eax
jne 0x1701d
incl %ecx
movl %ecx, 0x1184f1(%rip)    # 0x12f504
movl $0x0, 0x1184e3(%rip)    # 0x12f500
cmpl $0x64, %ecx
jl 0x1702c
movl $0x0, 0x1184d8(%rip)    # 0x12f504
movl 0x1184d6(%rip), %eax    # 0x12f508
testl %eax, %eax
je 0x17048
incl %eax
xorl %ecx, %ecx
cmpl $0xa0, %eax
cmovnel %eax, %ecx
movl %ecx, 0x1184c0(%rip)    # 0x12f508
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xba916(%rip), %rax     # 0xd1978
cmpb $0x0, 0x4(%rax)
je 0x17069
retq
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xcd3db(%rip), %r14     # 0xe4453
movb $0x0, (%r14)
xorl %eax, %eax
callq 0x1c7f3
leaq 0xce786(%rip), %rdi     # 0xe5810
movq %rbx, %rsi
callq 0x8c40
testl %eax, %eax
je 0x170a5
leaq 0xce773(%rip), %rdi     # 0xe5810
movq %rbx, %rsi
callq 0x85b0
callq 0x1464a
leaq 0xce75f(%rip), %rdi     # 0xe5810
callq 0x19b14
xorl %eax, %eax
callq 0xa205
leaq 0x78ea6c(%rip), %rax    # 0x7a5b30
movl (%rax), %ebx
testl %ebx, %ebx
js 0x170e3
leaq 0x78ea6f(%rip), %r15    # 0x7a5b40
movswl %bx, %edi
callq 0x1b1e5
movl %ebx, %eax
movl (%r15,%rax,4), %ebx
testl %ebx, %ebx
jns 0x170d1
movb $0x1, (%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %ebp, %ebp
cmpl $0x1f, %edi
ja 0x17144
movl %edi, %ebx
movl %edi, %eax
leaq 0xbb50e(%rip), %rcx     # 0xd2610
movq (%rcx,%rax,8), %rdi
callq 0x85a0
cmpq $0x2, %rax
jb 0x17144
movslq 0x1183f8(%rip), %rax    # 0x12f510
shlq $0x3, %rax
leaq (%rax,%rax,2), %rax
xorl %ecx, %ecx
leaq 0xbb5e7(%rip), %rdx     # 0xd2710
leaq (%rax,%rcx,4), %rsi
cmpl %ebx, (%rdx,%rsi)
je 0x1713f
incq %rcx
cmpq $0x6, %rcx
jne 0x17129
xorl %ebp, %ebp
jmp 0x17144
movl $0x1, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
leaq 0x119b92(%rip), %rbx    # 0x130fc0
movq $-0x5, %r12
leaq 0xcd1b4(%rip), %r14     # 0xe45f0
leaq 0x78070(%rip), %r15     # 0x8f4b3
movabsq $0x2d5954504d452d, %r13 # imm = 0x2D5954504D452D
leal 0x6(%r12), %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x8f20
movq %r14, %rdi
xorl %esi, %esi
callq 0x8190
testl %eax, %eax
je 0x17479
movq %r13, (%rbx)
movl $0x0, 0x8(%rbx)
jmp 0x174a2
movq %r14, %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
xorl %eax, %eax
callq 0x8670
movl %eax, %ebp
movl $0xc, %edx
movl %eax, %edi
movq %rbx, %rsi
callq 0x8b20
movl %ebp, %edi
callq 0x8310
addq $0xc, %rbx
incq %r12
jne 0x1744d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
leaq 0x5a16ea(%rip), %rbx    # 0x5b8e6c
movl (%rbx), %r10d
cmpl $0x27f, %r10d           # imm = 0x27F
jg 0x17800
decl %r10d
leaq 0x5a16d8(%rip), %r15    # 0x5b8e70
movl (%r15), %eax
decl %eax
xorl %r14d, %r14d
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
pushq %rax
pushq %r10
pushq %r14
pushq %r14
pushq $0xa
pushq %r14
callq 0x4dcbd
addq $0x30, %rsp
movl (%rbx), %eax
decl %eax
movl (%r15), %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 %r14
pushq %r14
pushq $0xb
jmp 0x1789f
leaq 0x59ae59(%rip), %r12    # 0x5b2660
movswl 0xbf2(%r12), %ecx
xorl %r14d, %r14d
movl $0x640000, %eax         # imm = 0x640000
xorl %edx, %edx
idivl %ecx
decl %r10d
leaq 0x5a164a(%rip), %r13    # 0x5b8e70
movl (%r13), %r11d
decl %r11d
movl $0xa, %r15d
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 %r14
pushq %r14
pushq %r15
pushq %r14
callq 0x4dcbd
addq $0x30, %rsp
movswl 0xbf4(%r12), %ecx
movl $0x640000, %eax         # imm = 0x640000
xorl %edx, %edx
idivl %ecx
movl (%rbx), %r10d
decl %r10d
movl (%r13), %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 %r14
pushq %r14
pushq %r15
pushq %r14
callq 0x4dcbd
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
leaq 0x5a15a8(%rip), %r15    # 0x5b8e6c
movl (%r15), %r10d
cmpl $0x27f, %r10d           # imm = 0x27F
jg 0x1790b
decl %r10d
leaq 0x5a1596(%rip), %rax    # 0x5b8e70
movl (%rax), %eax
decl %eax
xorl %r11d, %r11d
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
pushq %rax
pushq %r10
pushq %r11
pushq %r11
pushq $0xa
pushq %r11
jmp 0x179a5
leaq 0x59ad4e(%rip), %r12    # 0x5b2660
movswl 0x7ac(%r12), %ecx
xorl %ebx, %ebx
movl $0x640000, %eax         # imm = 0x640000
xorl %edx, %edx
idivl %ecx
decl %r10d
leaq 0x5a1540(%rip), %r13    # 0x5b8e70
movl (%r13), %r11d
decl %r11d
movl $0xa, %r14d
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 %rbx
pushq %rbx
pushq %r14
pushq %rbx
callq 0x4dcbd
addq $0x30, %rsp
movswl 0x7ae(%r12), %ecx
movl $0x640000, %eax         # imm = 0x640000
xorl %edx, %edx
idivl %ecx
movl (%r15), %r10d
decl %r10d
movl (%r13), %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 %rbx
pushq %rbx
pushq %r14
pushq %rbx
callq 0x4dcbd
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x77c43(%rip), %rdi     # 0x8fd69
callq 0x8ed0
leaq 0x77c62(%rip), %rdi     # 0x8fd94
callq 0x8ed0
leaq 0x77c6b(%rip), %rdi     # 0x8fda9
callq 0x8ed0
leaq 0x77c72(%rip), %rdi     # 0x8fdbc
callq 0x8ed0
leaq 0x77c7b(%rip), %rdi     # 0x8fdd1
callq 0x8ed0
leaq 0x77c8a(%rip), %rdi     # 0x8fdec
popq %rax
jmp 0x8ed0
// File: /workspace/github_c_makefile_star2_O3/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 0xb94ca(%rip), %rax     # 0xd1a00
movl 0x20(%rax), %ecx
movl 0x24(%rax), %edx
movl %ecx, 0x118ae2(%rip)    # 0x131024
movl %edx, 0xba0b4(%rip)     # 0xd25fc
movl 0x28(%rax), %ecx
movl %ecx, 0xba0a7(%rip)     # 0xd25f8
movl 0x2c(%rax), %ecx
movl %ecx, 0x118ac2(%rip)    # 0x13101c
movl 0x30(%rax), %eax
leaq 0xba37c(%rip), %rcx     # 0xd28e0
movl %eax, (%rcx)
leaq 0xb9533(%rip), %rax     # 0xd1aa0
leaq 0xcd62e(%rip), %rcx     # 0xe5ba2
movzwl 0x8(%rax), %edx
movzwl 0xc(%rax), %esi
movw %dx, (%rcx)
leaq 0xcbedc(%rip), %rcx     # 0xe4462
movw %si, (%rcx)
movzwl 0x10(%rax), %eax
leaq 0xb93ce(%rip), %rcx     # 0xd1962
movw %ax, (%rcx)
leaq 0xb93da(%rip), %rax     # 0xd1978
cmpb $0x0, 0x4(%rax)
je 0x185ae
movl $0x2, 0x118a76(%rip)    # 0x131024
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x118a6f(%rip), %eax    # 0x131024
leaq 0xb9444(%rip), %rcx     # 0xd1a00
movl %eax, 0x20(%rcx)
movl 0xba037(%rip), %eax     # 0xd25fc
movl %eax, 0x24(%rcx)
movl 0xba02a(%rip), %eax     # 0xd25f8
movl %eax, 0x28(%rcx)
movl 0x118a45(%rip), %eax    # 0x13101c
movl %eax, 0x2c(%rcx)
leaq 0xba2ff(%rip), %rax     # 0xd28e0
movl (%rax), %eax
movl %eax, 0x30(%rcx)
leaq 0xb94b3(%rip), %rax     # 0xd1aa0
movq $-0x1, (%rax)
leaq 0xcd5a7(%rip), %rcx     # 0xe5ba2
movswl (%rcx), %ecx
movl %ecx, 0x8(%rax)
leaq 0xcbe5a(%rip), %rcx     # 0xe4462
movswl (%rcx), %ecx
movl %ecx, 0xc(%rax)
leaq 0xb934d(%rip), %rcx     # 0xd1962
movswl (%rcx), %ecx
movl %ecx, 0x10(%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movl %edi, %ebx
leaq 0x117b85(%rip), %rsi    # 0x130d78
movl $0xe, %edx
callq 0x8f10
leaq 0x117d7c(%rip), %rsi    # 0x130f80
movl $0xe, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x117e0d(%rip), %rsi    # 0x131024
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x1162e2(%rip), %rsi    # 0x12f50c
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x1162d3(%rip), %rsi    # 0x12f510
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x1162c4(%rip), %rsi    # 0x12f514
movl $0x1, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x1162b2(%rip), %rsi    # 0x12f515
movl $0x1, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x1162a2(%rip), %rsi    # 0x12f518
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x117da7(%rip), %rsi    # 0x131030
movl $0x1, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x117d8d(%rip), %rsi    # 0x131029
movl $0x1, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x116275(%rip), %rsi    # 0x12f524
movl $0x4, %edx
movl %ebx, %edi
callq 0x8f10
leaq 0x116266(%rip), %rsi    # 0x12f528
movl $0x4, %edx
movl %ebx, %edi
popq %rbx
jmp 0x8f10
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movl %edi, %ebx
xorl %eax, %eax
callq 0x1cd8a
leaq 0x117a98(%rip), %rsi    # 0x130d78
movl $0xe, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x117c8d(%rip), %rsi    # 0x130f80
movl $0xe, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x117d1e(%rip), %rsi    # 0x131024
movl $0x4, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x1161f3(%rip), %rsi    # 0x12f50c
movl $0x4, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x1161e4(%rip), %rsi    # 0x12f510
movl $0x4, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x1161d5(%rip), %rsi    # 0x12f514
movl $0x1, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x1161c3(%rip), %rsi    # 0x12f515
movl $0x1, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x1161b3(%rip), %rsi    # 0x12f518
movl $0x4, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x117cb8(%rip), %rsi    # 0x131030
movl $0x1, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x117c9e(%rip), %rsi    # 0x131029
movl $0x1, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x116186(%rip), %rsi    # 0x12f524
movl $0x4, %edx
movl %ebx, %edi
callq 0x8b20
leaq 0x116177(%rip), %rsi    # 0x12f528
movl $0x4, %edx
movl %ebx, %edi
callq 0x8b20
cmpb $0x1, 0x117c6c(%rip)    # 0x131030
jne 0x193f1
callq 0x8e70
cltq
imulq $-0x6db6db6d, %rax, %rdi # imm = 0x92492493
shrq $0x20, %rdi
addl %eax, %edi
movl %edi, %ecx
shrl $0x1f, %ecx
sarl $0x2, %edi
addl %ecx, %edi
leal (,%rdi,8), %ecx
subl %ecx, %edi
addl %eax, %edi
jmp 0x193f7
movl 0x116119(%rip), %edi    # 0x12f510
popq %rbx
jmp 0x1ce25
// File: /workspace/github_c_makefile_star2_O3/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 0x1464a
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x4e5af
leaq 0xcc3fd(%rip), %rdi     # 0xe5810
movb %bl, 0x8(%rdi)
movabsq $0x50414d2e3154454e, %rax # imm = 0x50414D2E3154454E
movq %rax, (%rdi)
callq 0x19b14
xorl %eax, %eax
callq 0xa205
xorl %edi, %edi
callq 0x4e5af
movb %bl, 0x1160bc(%rip)     # 0x12f4f8
leaq 0x315cdd(%rip), %rdi    # 0x32f120
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
popq %rbx
jmp 0x8440
// File: /workspace/github_c_makefile_star2_O3/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 0x4e5af
leaq 0x76812(%rip), %rdi     # 0x8fc74
callq 0x1bda7
movl $0x51, %edi
callq 0x1bee5
movb $0x0, 0x116080(%rip)    # 0x12f4f8
leaq 0x315ca1(%rip), %rbx    # 0x32f120
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8440
leaq 0x315a9b(%rip), %r14    # 0x32ef30
cmpb $0x0, 0x1(%rbx)
jne 0x194f3
cmpb $0x0, 0x1c(%rbx)
jne 0x194f3
cmpb $0x0, 0x39(%rbx)
jne 0x194f3
cmpb $0x0, 0x26(%rbx)
jne 0x194f3
cmpb $0x0, 0xcb(%rbx)
jne 0x194f3
cmpb $0x0, 0xcd(%rbx)
jne 0x194f3
cmpb $0x0, 0xc8(%rbx)
jne 0x194f3
cmpb $0x0, 0x1f(%rbx)
jne 0x194f3
cmpb $0x0, 0x23(%rbx)
jne 0x194f3
cmpb $0x0, 0xd0(%rbx)
jne 0x194f3
xorl %eax, %eax
callq 0x1bf77
callq 0x83076
testl %eax, %eax
je 0x19495
cmpb $0x0, (%r14)
je 0x19495
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1bfef
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/src/tekmsc.c
// Function: missionaccomplished
void
missionaccomplished(int  sn)
{
     int       ext;

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

     ext=sprptr[sn]->extra;
     if( !validext(ext) ) {
          return;
     }

     if( sprXTptr[ext]->class == CLASS_CIVILLIAN ) {
          civillianskilled++;
     }
     if( sprXTptr[ext]->class != CLASS_TEKLORD ) {
          return;
     }

     switch( sprXTptr[ext]->deathpic ) {
     case WINGDEATHPIC:
          symbols[0]=1;
          mission_accomplished=1;
          gameover=1;
          break;
     case DIDEATHPIC:
          symbols[1]=1;
          mission_accomplished=1;
          gameover=1;
          break;
     case SFRODEATHPIC:
          symbols[2]=1;
          mission_accomplished=1;
          gameover=1;
          break;
     case ANTDEATHPIC:
          symbols[3]=1;
          mission_accomplished=1;
          gameover=1;
          break;
     case SGOLDEATHPIC:
          symbols[4]=1;
          mission_accomplished=1;
          gameover=1;
          break;
     case SUNGDEATHPIC:
          symbols[5]=1;
          mission_accomplished=1;
          gameover=1;
          break;
     case REDHDEATHPIC:
          symbols[6]=1;
          mission_accomplished=1;
          gameover=1;
          break;
     case SSALDEATHPIC:
          killedsonny=1;
          mission_accomplished=1;
          gameover=1;
          break;
     }
}

// Assembly:
pushq %rbx
leaq 0xb80e4(%rip), %rax     # 0xd1978
cmpb $0x0, 0x4(%rax)
je 0x1989c
popq %rbx
retq
movslq %edi, %rax
leaq 0x11798a(%rip), %rcx    # 0x131230
movq (%rcx,%rax,8), %rax
movswl 0x2a(%rax), %ebx
movl %ebx, %edi
callq 0x1eb75
testl %eax, %eax
je 0x1989a
movslq %ebx, %rax
leaq 0x1bf96d(%rip), %rcx    # 0x1d9230
movq (%rcx,%rax,8), %rax
movb (%rax), %cl
cmpb $0x2, %cl
jne 0x198d6
incl 0x115c44(%rip)          # 0x12f518
movb (%rax), %cl
cmpb $0xb, %cl
jne 0x1989a
movzwl 0x14(%rax), %eax
cmpl $0xa65, %eax            # imm = 0xA65
jg 0x19909
cmpl $0x874, %eax            # imm = 0x874
jg 0x1992d
cmpl $0x6ff, %eax            # imm = 0x6FF
je 0x19967
cmpl $0x78d, %eax            # imm = 0x78D
jne 0x1989a
movw $0x1, 0x117476(%rip)    # 0x130d7a
jmp 0x19992
cmpl $0xb5d, %eax            # imm = 0xB5D
jg 0x1994a
cmpl $0xa66, %eax            # imm = 0xA66
je 0x19972
cmpl $0xb22, %eax            # imm = 0xB22
jne 0x1989a
movw $0x1, 0x117451(%rip)    # 0x130d7c
jmp 0x19992
cmpl $0x875, %eax            # imm = 0x875
je 0x1997d
cmpl $0x9f6, %eax            # imm = 0x9F6
jne 0x1989a
movw $0x1, 0x117430(%rip)    # 0x130d78
jmp 0x19992
cmpl $0xb5e, %eax            # imm = 0xB5E
je 0x19988
cmpl $0xba2, %eax            # imm = 0xBA2
jne 0x1989a
movw $0x1, 0x11741b(%rip)    # 0x130d80
jmp 0x19992
movw $0x1, 0x11740e(%rip)    # 0x130d7e
jmp 0x19992
movw $0x1, 0x117409(%rip)    # 0x130d84
jmp 0x19992
movw $0x1, 0x1173fc(%rip)    # 0x130d82
jmp 0x19992
movl $0x1, 0x115b96(%rip)    # 0x12f528
movb $0x1, %al
movb %al, 0x115b7b(%rip)     # 0x12f515
movb %al, 0x115b59(%rip)     # 0x12f4f9
jmp 0x1989a
// File: /workspace/github_c_makefile_star2_O3/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 0xcbd71(%rip), %rcx     # 0xe5720
movswq (%rcx,%rax,2), %rax
leaq (%rax,%rax,4), %rax
leaq 0x3daf21(%rip), %rcx    # 0x3f48e0
movswq 0x24(%rcx,%rax,8), %rax
leal -0x1(%rax), %edx
movl $0xe10, %ecx            # imm = 0xE10
cmpw $0x5, %dx
ja 0x199e0
movzwl %dx, %ecx
leaq 0x75e2f(%rip), %rdx     # 0x8f80c
movl (%rdx,%rcx,4), %ecx
leaq 0x117391(%rip), %rdx    # 0x130d78
cmpw $0x0, (%rdx,%rax,2)
je 0x19a27
xorl %edx, %edx
leaq 0x117839(%rip), %rsi    # 0x131230
movq (%rsi,%rdx,8), %rdi
movswl 0xe(%rdi), %r8d
cmpl %r8d, %ecx
je 0x19a13
incq %rdx
cmpq $0x4000, %rdx           # imm = 0x4000
jne 0x199f7
jmp 0x19a27
orl $0x1, %ecx
movw %cx, 0xe(%rdi)
leaq 0x11755f(%rip), %rcx    # 0x130f80
movw $0x1, (%rcx,%rax,2)
movq 0x117551(%rip), %xmm0   # 0x130f80
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 0x19a71
cmpw $0x0, 0x11753e(%rip)    # 0x130f88
je 0x19a71
cmpw $0x0, 0x117536(%rip)    # 0x130f8a
je 0x19a71
cmpw $0x0, 0x11752e(%rip)    # 0x130f8c
je 0x19a71
movl $0x1, 0x115aba(%rip)    # 0x12f524
movb $0x1, 0x115a88(%rip)    # 0x12f4f9
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x74e3b(%rip), %rdi     # 0x8fecb
callq 0x2d112
andl $0xf, %eax
xorl %ecx, %ecx
cmpl 0x116080(%rip), %eax    # 0x131120
cmovll %eax, %ecx
shll $0x4, %ecx
leaq 0x116083(%rip), %rax    # 0x131130
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_O3/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 0xca67a(%rip), %r14     # 0xe5750
movswl (%r14,%rbx,2), %edi
leaq 0xc93ee(%rip), %rax     # 0xe44d0
movl (%rax,%rbx,4), %esi
leaq 0xc9424(%rip), %rax     # 0xe4510
movl (%rax,%rbx,4), %edx
leaq 0xc945a(%rip), %rax     # 0xe4550
movl $0x2200, %ecx           # imm = 0x2200
addl (%rax,%rbx,4), %ecx
callq 0x48ab4
leaq 0xc93a6(%rip), %rax     # 0xe44b0
movzwl (%rax,%rbx,2), %eax
movswq (%r14,%rbx,2), %rcx
imulq $0x2c, %rcx, %rcx
leaq 0x412a12(%rip), %rdx    # 0x42db30
movw %ax, 0x1c(%rdx,%rcx)
movw $0x1818, 0x14(%rdx,%rcx) # imm = 0x1818
leaq 0xca72f(%rip), %rax     # 0xe5860
movl $0x64, (%rax,%rbx,4)
leaq 0xc9451(%rip), %rax     # 0xe4590
movl $0x3e8, %ebp            # imm = 0x3E8
movl %ebp, (%rax,%rbx,4)
leaq 0x114192(%rip), %rax    # 0x12f2e0
xorl %r14d, %r14d
movl %r14d, (%rax,%rbx,4)
movl %ebx, %edi
callq 0xf25a
leaq 0xc922d(%rip), %rax     # 0xe4390
movl %ebp, (%rax,%rbx,4)
leaq 0xc92a3(%rip), %rax     # 0xe4410
movl %r14d, (%rax,%rbx,4)
leaq 0x1142b8(%rip), %rax    # 0x12f430
movl %r14d, (%rax,%rbx,4)
leaq 0x115c0d(%rip), %rax    # 0x130d90
movl %r14d, (%rax,%rbx,4)
leaq 0x115c42(%rip), %rax    # 0x130dd0
movl %r14d, (%rax,%rbx,4)
leaq 0x115c77(%rip), %rax    # 0x130e10
movl %r14d, (%rax,%rbx,4)
leaq 0x1141cc(%rip), %rax    # 0x12f370
movw $0x0, (%rax,%rbx,2)
leaq 0xb67c7(%rip), %rax     # 0xd1978
cmpb $0x0, 0x4(%rax)
je 0x1b1c6
leaq 0xb7732(%rip), %rcx     # 0xd28f0
movl 0xc(%rcx), %eax
orl 0x8(%rcx), %eax
jmp 0x1b1d6
leaq 0xb7723(%rip), %rcx     # 0xd28f0
movl 0x8(%rcx), %eax
orl 0x4(%rcx), %eax
orl 0xc(%rcx), %eax
leaq 0x1142a3(%rip), %rcx    # 0x12f480
movl %eax, (%rcx,%rbx,4)
popq %rbx
popq %r14
popq %rbp
retq