LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/teksnd.c
// Function: updatesounds
void
updatesounds(int snum)
{
     int      dist=0L,pan=0L,dx,dy;
     int       i;

     if( (toggles[TOGGLE_SOUND] == 0) || !fxstarted )
          return;

     for( i=0; i<MAXSOUNDS; i++ ) {
          if( dsound[i].handle == NULL_HANDLE ) {
               continue;
          }
          if( (dsound[i].type&(ST_IMMEDIATE|ST_NOUPDATE|ST_VEHUPDATE)) != 0 ) {
               continue;
          }
          /*
          dist=klabs(posx[snum]-dsoundptr[i]->x)+labs(posy[snum]-dsoundptr[i]->y);
          if(dsoundptr[i]->type==ST_AMBUPDATE) {
               if( dist < AMBUPDATEDIST ) {
                    vol = (AMBUPDATEDIST<<3)-(dist<<3);
               }
               else {
                    vol=0;
               }
          }
          else {
               if(dist < 1500L)
                    vol = 0x7fff;
               else if(dist > 8500L)
                    vol = 0x1f00;
               else
                    vol = 39000L-(dist<<2);
          }
          */

          dx = klabs(posx[snum]-dsound[i].x);
          dy = klabs(posy[snum]-dsound[i].y);
          dist = ksqrt(dx*dx+dy*dy) >> 6;

          pan = 2048 + ang[snum] - getangle(posx[snum]-dsound[i].x,posy[snum]-dsound[i].y);
          pan = (pan & 2047) >> 6;

          if( dsound[i].handle != NULL_HANDLE )
               FX_Pan3D(dsound[i].handle,pan,dist);
     }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xb249b(%rip), %rax     # 0xcea60
cmpl $0x0, 0xc(%rax)
je 0x1c680
testb $0x1, 0x209c7a(%rip)    # 0x226250
je 0x1c680
movslq %edi, %r14
movl $0x14, %r15d
leaq 0x209c74(%rip), %r12    # 0x226260
leaq 0xc4f1d(%rip), %r13     # 0xe1510
cmpl $-0x1, -0x14(%r15,%r12)
je 0x1c66f
testb $-0x7b, (%r15,%r12)
jne 0x1c66f
leaq 0xc4ec7(%rip), %rbp     # 0xe14d0
movl (%rbp,%r14,4), %eax
subl -0x8(%r15,%r12), %eax
movl (%r13,%r14,4), %edi
subl -0x4(%r15,%r12), %edi
imull %eax, %eax
imull %edi, %edi
addl %eax, %edi
callq 0x46ae1
movl %eax, %ebx
movl (%rbp,%r14,4), %edi
subl -0x8(%r15,%r12), %edi
leaq 0xc4e73(%rip), %rax     # 0xe14b0
movzwl (%rax,%r14,2), %ebp
movl (%r13,%r14,4), %esi
subl -0x4(%r15,%r12), %esi
callq 0x469df
movl -0x14(%r15,%r12), %edi
cmpl $-0x1, %edi
je 0x1c66f
subl %eax, %ebp
shrl $0x6, %ebp
andl $0x1f, %ebp
sarl $0x6, %ebx
movl %ebp, %esi
movl %ebx, %edx
callq 0x84361
addq $0x18, %r15
cmpq $0x194, %r15            # imm = 0x194
jne 0x1c5f3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/teksnd.c
// Function: stopallsounds
void
stopallsounds(void)
{
     int       i;

     if( !fxstarted )
          return;

     for( i=0; i< MAXSOUNDS; i++ ) {
          if( dsound[i].handle == NULL_HANDLE )
               continue;
          FX_StopSound(dsound[i].handle);
          sbuf[dsound[i].sndnum].users--;
          if( sbuf[dsound[i].sndnum].users < 0 )
              sbuf[dsound[i].sndnum].users=0;
          if( sbuf[dsound[i].sndnum].users == 0 ) {
               sbuf[dsound[i].sndnum].cache_lock=199;
          }
          dsound[i].handle=NULL_HANDLE;
          dsound[i].plevel=0;
          dsound[i].sndnum=-1;
     }

//clear variables that track looping sounds
     loopinsound=-1;
     baydoorloop=-1;
     ambsubloop=-1;
}

// Assembly:
cmpb $0x1, 0x209bba(%rip)    # 0x226250
jne 0x1c731
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %ebx, %ebx
leaq 0x209bb4(%rip), %r14    # 0x226260
leaq 0x209d2d(%rip), %r15    # 0x2263e0
movl $0x1, %ebp
movl (%rbx,%r14), %edi
cmpl $-0x1, %edi
je 0x1c6fa
callq 0x8438a
movslq 0x4(%rbx,%r14), %rax
leaq (%rax,%rax,2), %rax
movl (%r15,%rax,8), %ecx
cmpl $0x2, %ecx
cmovll %ebp, %ecx
decl %ecx
movl %ecx, (%r15,%rax,8)
jne 0x1c6e9
leaq (%r15,%rax,8), %rax
movb $-0x39, 0x14(%rax)
movq $-0x1, (%rbx,%r14)
movl $0x0, 0x8(%rbx,%r14)
addq $0x18, %rbx
cmpq $0x180, %rbx            # imm = 0x180
jne 0x1c6b8
leaq 0xb3272(%rip), %rax     # 0xcf980
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, (%rax)
leaq 0xb3268(%rip), %rax     # 0xcf984
movl %ecx, (%rax)
leaq 0xb3263(%rip), %rax     # 0xcf988
movl %ecx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/teksnd.c
// Function: menusong
void
menusong(int insubway)
{
     int i,index;

     if( !musicstarted )
          return;

     for( i=0; i<SONGSPERLEVEL; i++ ) {
          removesong(i);
     }

     if(insubway)
          index=(NUMLEVELS*(AVAILMODES*SONGSPERLEVEL)+3);
     else
          index=NUMLEVELS*(AVAILMODES*SONGSPERLEVEL);

     index+=2;

     songoffsets[BASESONG] = songlist[index*3]*4096;
     songlengths[BASESONG] = songlist[(index*3)+1];
     if( songlengths[BASESONG] >= MAXBASESONGLENGTH ) {
          crashgame("prepsongs: basesong exceeded max length");
     }

     playsong(BASESONG);
}

// Assembly:
cmpb $0x1, 0x20960e(%rip)    # 0x226254
jne 0x1ccc0
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %ebp, %ebp
cmpl 0xb2b77(%rip), %ebp     # 0xcf7cc
jne 0x1cc66
callq 0x87ca9
movl $0xffffffff, 0xb2b66(%rip) # imm = 0xFFFFFFFF
incl %ebp
cmpl $0x3, %ebp
jne 0x1cc4f
xorl %eax, %eax
testl %ebx, %ebx
setne %al
shll $0x2, %eax
leal (%rax,%rax,8), %eax
leaq 0x21576f(%rip), %rcx    # 0x2323f0
movl 0x30c(%rax,%rcx), %edx
movl 0x310(%rax,%rcx), %eax
shll $0xc, %edx
movl %edx, 0x20aad4(%rip)    # 0x22776c
movl %eax, 0x20aac2(%rip)    # 0x227760
cmpl $0xac68, %eax           # imm = 0xAC68
jl 0x1ccb3
leaq 0x703ab(%rip), %rdi     # 0x8d057
xorl %eax, %eax
callq 0x2d800
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1c76c
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/teksnd.c
// Function: startmusic
void
startmusic(int level)
{
     int       i,index;

     if( !musicstarted ) {
          return;
     }

     if( level > 6 ) {
          return;
     }

     for( i=0; i<SONGSPERLEVEL; i++ ) {
          removesong(i);
     }

     index=totalsongsperlevel*(level);

     index+=SONGSPERLEVEL;    // Skip FM.
     index+=SONGSPERLEVEL;    // Skip AWE32.

     for( i=0; i<SONGSPERLEVEL; i++ ) {
          songoffsets[i]=songlist[(index*3)+(i*3)]*4096;
          songlengths[i]=songlist[((index*3)+(i*3))+1];
          if( songlengths[i] >= MAXBASESONGLENGTH ) {
               crashgame("prepsongs: basesong exceeded max length");
          }
     }

     playsong(BASESONG);
}

// Assembly:
cmpl $0x6, %edi
jg 0x1cd83
testb $0x1, 0x209583(%rip)    # 0x226254
je 0x1cd83
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %ebp, %ebp
cmpl 0xb2ae0(%rip), %ebp     # 0xcf7cc
jne 0x1ccfd
callq 0x87ca9
movl $0xffffffff, 0xb2acf(%rip) # imm = 0xFFFFFFFF
incl %ebp
cmpl $0x3, %ebp
jne 0x1cce6
imull 0x2166e5(%rip), %ebx    # 0x2333f0
leal (%rbx,%rbx,2), %r14d
addl $0x13, %r14d
leaq 0x2156d6(%rip), %r15    # 0x2323f0
leaq 0x20aa4b(%rip), %r12    # 0x22776c
leaq 0x20aa38(%rip), %r13    # 0x227760
leaq 0x70328(%rip), %rbx     # 0x8d057
xorl %ebp, %ebp
leal -0x1(%r14), %eax
cltq
movl (%r15,%rax,4), %eax
shll $0xc, %eax
movl %eax, (%rbp,%r12)
movslq %r14d, %rax
movl (%r15,%rax,4), %eax
movl %eax, (%rbp,%r13)
cmpl $0xac68, %eax           # imm = 0xAC68
jl 0x1cd60
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2d800
addq $0x4, %rbp
addl $0x3, %r14d
cmpq $0xc, %rbp
jne 0x1cd31
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1c76c
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekspr.c
// Function: floatmovesprite
short
floatmovesprite(short spritenum, int dx, int dy, int dz, int ceildist, int flordist, char cliptype)
{
     int daz, zoffs;
     short retval, dasectnum;
     unsigned int dcliptype;
     spritetype *spr;

     (void)dz;

    #ifdef PLRSPRDEBUG
     if( isaplayersprite(spritenum) ) {
          crashgame("messing w plrsprite at 18");
     }
    #endif

     switch (cliptype) {
          case NORMALCLIP: dcliptype = CLIPMASK0; break;
          case PROJECTILECLIP: dcliptype = CLIPMASK1; break;
          case CLIFFCLIP: dcliptype = CLIPMASK0; break;
     }

     spr = &sprite[spritenum];

     if ((spr->cstat&128) == 0)
          zoffs = -((tilesizy[spr->picnum]*spr->yrepeat)<<1);
     else
          zoffs = 0;

     dasectnum = spr->sectnum;  //Can't modify sprite sectors directly becuase of linked lists
     daz = spr->z+zoffs;  //Must do this if not using the new centered centering (of course)
     retval = clipmove(&spr->x,&spr->y,&daz,&dasectnum,dx,dy,
                                   ((int)spr->clipdist)<<2,ceildist,flordist,dcliptype);

     if ((dasectnum != spr->sectnum) && (dasectnum >= 0))
          changespritesect(spritenum,dasectnum);

     return(retval);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r9d, %r10d
movl %r8d, %eax
movl %edx, %r9d
movl %esi, %r8d
cmpb $0x1, 0x40(%rsp)
movl $0x1000040, %ecx        # imm = 0x1000040
movl $0x10001, %r11d         # imm = 0x10001
cmovel %ecx, %r11d
movl %edi, %ebx
movslq %edi, %rcx
imulq $0x2c, %rcx, %rdx
leaq 0x40dbe0(%rip), %rsi    # 0x42ab10
leaq (%rsi,%rdx), %r14
xorl %ecx, %ecx
testb $-0x80, 0xc(%rsi,%rdx)
jne 0x1cf59
movswq 0xe(%r14), %rcx
leaq 0x5926f7(%rip), %rdx    # 0x5af640
movswl (%rdx,%rcx,2), %edx
movzbl 0x15(%r14), %ecx
imull %edx, %ecx
addl %ecx, %ecx
negl %ecx
movzwl 0x18(%r14), %edx
leaq 0xa(%rsp), %r15
movw %dx, (%r15)
addl 0x8(%r14), %ecx
leaq 0xc(%rsp), %rdx
movl %ecx, (%rdx)
leaq 0x4(%r14), %rsi
movzbl 0x12(%r14), %r12d
shll $0x2, %r12d
movq %r14, %rdi
movq %r15, %rcx
pushq %r11
pushq %r10
pushq %rax
pushq %r12
callq 0x48f87
addq $0x20, %rsp
movl %eax, %ebp
movzwl (%r15), %eax
testw %ax, %ax
js 0x1cfb2
cmpw 0x18(%r14), %ax
je 0x1cfb2
movswl %bx, %edi
movswl %ax, %esi
callq 0x46bb5
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekspr.c
// Function: flymovesprite
short
flymovesprite(short spritenum, int dx, int dy, int dz, int ceildist, int flordist, char cliptype)
{
     int           daz;
     short          retval, dasectnum, tempshort;
    unsigned int dcliptype;
     spritetype *spr;

     (void)dz;

    #ifdef PLRSPRDEBUG
     if( isaplayersprite(spritenum) ) {
          crashgame("messing w plrsprite at 20");
     }
    #endif

     switch (cliptype) {
          case NORMALCLIP: dcliptype = CLIPMASK0; break;
          case PROJECTILECLIP: dcliptype = CLIPMASK1; break;
          case CLIFFCLIP: dcliptype = CLIPMASK0; break;
     }

     spr = &sprite[spritenum];

     dasectnum = spr->sectnum;
     retval = clipmove(&spr->x,&spr->y,&spr->z,&dasectnum,dx,dy,
                                   ((int)spr->clipdist)<<2,ceildist,flordist,dcliptype);

     if ((dasectnum != spr->sectnum) && (dasectnum >= 0))
          changespritesect(spritenum,dasectnum);

     if( spr->statnum != PINBALL ) {
          tempshort = spr->cstat; spr->cstat &= ~1;
          getzrange(spr->x,spr->y,spr->z-1,spr->sectnum,
                          &globhiz,&globhihit,&globloz,&globlohit,
                          ((int)spr->clipdist)<<2,dcliptype);
          spr->cstat = tempshort;
          daz=(globloz+globhiz);
          spr->z=(daz>>1);
     }

     return(retval);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r10d
movl %r8d, %eax
movl %edx, %r9d
movl %esi, %r8d
cmpb $0x1, 0x40(%rsp)
movl $0x1000040, %ecx        # imm = 0x1000040
movl $0x10001, %r12d         # imm = 0x10001
cmovel %ecx, %r12d
movl %edi, %r14d
movslq %edi, %rcx
imulq $0x2c, %rcx, %r13
leaq 0x40d8e5(%rip), %rbp    # 0x42ab10
movq %rbp, %rbx
addq %r13, %rbx
leaq 0x4(%rbp,%r13), %rsi
movzwl 0x14(%rsi), %ecx
leaq 0x6(%rsp), %r15
movw %cx, (%r15)
leaq 0x8(,%r13), %rdx
addq %rbp, %rdx
movzbl 0xa(%rdx), %r11d
shll $0x2, %r11d
movq %rbx, %rdi
movq %r15, %rcx
pushq %r12
pushq %r10
pushq %rax
pushq %r11
callq 0x48f87
addq $0x20, %rsp
movzwl (%r15), %ecx
testw %cx, %cx
js 0x1d28e
cmpw 0x18(%rbp,%r13), %cx
je 0x1d28e
movswl %r14w, %edi
movswl %cx, %esi
movl %eax, %ebp
callq 0x46bb5
movl %ebp, %eax
cmpw $0x193, 0x1a(%rbx)      # imm = 0x193
je 0x1d2fe
movzwl 0xc(%rbx), %r15d
movl %r15d, %ecx
andl $-0x2, %ecx
movw %cx, 0xc(%rbx)
movl (%rbx), %edi
movl 0x4(%rbx), %esi
movl 0x8(%rbx), %edx
decl %edx
movl %eax, %ebp
movswl 0x18(%rbx), %ecx
movzbl 0x12(%rbx), %eax
shll $0x2, %eax
leaq 0xc54b9(%rip), %r10     # 0xe277c
leaq 0xc54ae(%rip), %r13     # 0xe2778
leaq 0xc549f(%rip), %r14     # 0xe2770
leaq 0xc549c(%rip), %r9      # 0xe2774
movq %r14, %r8
pushq %r12
pushq %rax
pushq %r10
pushq %r13
callq 0x4b1d2
movl %ebp, %eax
addq $0x20, %rsp
movw %r15w, 0xc(%rbx)
movl (%r14), %ecx
addl (%r13), %ecx
sarl %ecx
movl %ecx, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekspr.c
// Function: dropit
void
dropit(int x, int y, int z, short sect, int pic)
{
     int       j,ang;

     j=jsinsertsprite(sect, DROPSIES);
     if( j != -1 ) {
          ang=dropangles[dropanglecnt];
          fillsprite(j,x,y,z,0,
                     0,0,12,
                     16,16,0,0,pic,ang,
                     sintable[(ang+2560)&2047]>>6,sintable[(ang+2048)&2047]>>6,
                     30L,0,sect,DROPSIES,0,0,0);
     }
     dropanglecnt++;
     if( dropanglecnt >= MAXDROPANGLES ) {
          dropanglecnt=0;
     }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %r8d, %ebx
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %r15d
movl %ecx, %edi
movl $0x196, %esi            # imm = 0x196
callq 0x1e94c
cmpw $-0x1, %ax
je 0x1e64e
movzbl 0x214e62(%rip), %ecx    # 0x2333f4
leaq 0xb123f(%rip), %rdx     # 0xcf7d8
movzwl (%rdx,%rcx,2), %esi
movswq %ax, %rax
imulq $0x2c, %rax, %rcx
leaq 0x40c564(%rip), %rdx    # 0x42ab10
leaq (%rdx,%rcx), %rdi
movl %r15d, (%rdx,%rcx)
movl %r14d, 0x4(%rdx,%rcx)
movl %ebp, 0x8(%rdx,%rcx)
xorl %r8d, %r8d
movw %r8w, 0xc(%rdx,%rcx)
movw %r8w, 0x10(%rdx,%rcx)
movb $0xc, 0x12(%rdx,%rcx)
movl $0x1010, 0x14(%rdx,%rcx) # imm = 0x1010
movw %bx, 0xe(%rdx,%rcx)
movw %si, 0x1c(%rdx,%rcx)
leal 0x200(%rsi), %r9d
movl $0x7ff, %r10d           # imm = 0x7FF
andl %r10d, %r9d
leaq 0x55e5b6(%rip), %r11    # 0x57cbb0
movswl (%r11,%r9,2), %r9d
shrl $0x6, %r9d
movw %r9w, 0x20(%rdx,%rcx)
andl %r10d, %esi
movswl (%r11,%rsi,2), %esi
shrl $0x6, %esi
movw %si, 0x22(%rdx,%rcx)
movw $0x1e, 0x24(%rdx,%rcx)
movw %r8w, 0x1e(%rdx,%rcx)
movl $0x0, 0x26(%rdx,%rcx)
movw $0xffff, 0x2a(%rdx,%rcx) # imm = 0xFFFF
leaq (%rax,%rax,2), %rsi
shlq $0x2, %rsi
addq 0xaf974(%rip), %rsi     # 0xcdfb8
movl $0x3, %edx
callq 0x5da55
movb 0x214da0(%rip), %al     # 0x2333f4
incb %al
xorl %ecx, %ecx
cmpb $0x6, %al
movzbl %al, %eax
cmovael %ecx, %eax
movb %al, 0x214d8e(%rip)     # 0x2333f4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: jsdeletesprite
short
jsdeletesprite(short spritenum)
{
     int       ext;

     ext=sprptr[spritenum]->extra;

     if( validext(ext) ) {
          memset(sprXTptr[ext], 0, sizeof(struct spriteextension));
          sprXTptr[ext]->lock=0x00;
     }

     deletesprite(spritenum);
     sprite[spritenum].extra=-1;

     return(0);
}

// Assembly:
pushq %rbx
movslq %edi, %rbx
leaq 0x10f868(%rip), %rax    # 0x12e210
movq (%rax,%rbx,8), %rax
movzwl 0x2a(%rax), %eax
cmpq $0x3fff, %rax           # imm = 0x3FFF
ja 0x1e9db
leaq 0x1b7851(%rip), %rcx    # 0x1d6210
movq (%rcx,%rax,8), %rdx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdx)
movups %xmm0, (%rdx)
movw $0x0, 0x20(%rdx)
movq (%rcx,%rax,8), %rax
movb $0x0, 0x1e(%rax)
movswl %di, %edi
callq 0x46eef
imulq $0x2c, %rbx, %rax
leaq 0x40c122(%rip), %rcx    # 0x42ab10
movw $0xffff, 0x2a(%rcx,%rax) # imm = 0xFFFF
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: isaplayersprite
int
isaplayersprite(int sprnum)
{
     int       j;

     for( j=connecthead ; j >= 0 ; j=connectpoint2[j] ) {
          if( playersprite[j] == sprnum ) {
               return(1);
          }
     }
     if( sprptr[sprnum]->statnum == 8 ) {
          crashgame("isplrspr: non plr has statnm 8");
     }
     return(0);
}

// Assembly:
pushq %rbx
leaq 0x784103(%rip), %rax    # 0x7a2b10
movl (%rax), %edx
testl %edx, %edx
js 0x1ea32
leaq 0xc3d36(%rip), %rax     # 0xe2750
leaq 0x7840ff(%rip), %rcx    # 0x7a2b20
movl %edx, %edx
movswl (%rax,%rdx,2), %esi
cmpl %edi, %esi
je 0x1ea5b
movl (%rcx,%rdx,4), %edx
testl %edx, %edx
jns 0x1ea21
movslq %edi, %rax
leaq 0x10f7d4(%rip), %rcx    # 0x12e210
movq (%rcx,%rax,8), %rax
xorl %ebx, %ebx
cmpw $0x8, 0x1a(%rax)
jne 0x1ea60
leaq 0x6e928(%rip), %rdi     # 0x8d378
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2d800
jmp 0x1ea60
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: clearXTpics
void
clearXTpics(short spriteno)
{
     short     extno=sprptr[spriteno]->extra;

    #ifdef PLRSPRDEBUG
     if( isaplayersprite(spriteno) ) {
          crashgame("messing w plrsprite at 2");
     }
    #endif

     if( extno != -1 ) {
          sprXTptr[extno]->basepic=sprptr[spriteno]->picnum;
          sprXTptr[extno]->standpic=NO_PIC;
          sprXTptr[extno]->walkpic=NO_PIC;
          sprXTptr[extno]->runpic=NO_PIC;
          sprXTptr[extno]->attackpic=NO_PIC;
          sprXTptr[extno]->deathpic=NO_PIC;
          sprXTptr[extno]->painpic=NO_PIC;
          sprXTptr[extno]->squatpic=NO_PIC;
          sprXTptr[extno]->morphpic=NO_PIC;
          sprXTptr[extno]->specialpic=NO_PIC;
     }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movslq %edi, %rbx
leaq 0x10f79d(%rip), %r15    # 0x12e210
movq (%r15,%rbx,8), %rax
movswq 0x2a(%rax), %r14
movl %ebx, %edi
callq 0x1ea05
testl %eax, %eax
je 0x1ea95
leaq 0x6e909(%rip), %rdi     # 0x8d397
xorl %eax, %eax
callq 0x2d800
cmpw $-0x1, %r14w
je 0x1eafd
movq (%r15,%rbx,8), %rax
movzwl 0xe(%rax), %eax
leaq 0x1b7765(%rip), %rcx    # 0x1d6210
movq (%rcx,%r14,8), %rdx
movw %ax, 0xa(%rdx)
movq (%rcx,%r14,8), %rax
xorl %edx, %edx
movw %dx, 0xc(%rax)
movq (%rcx,%r14,8), %rax
movw %dx, 0xe(%rax)
movq (%rcx,%r14,8), %rax
movw %dx, 0x10(%rax)
movq (%rcx,%r14,8), %rax
movw %dx, 0x12(%rax)
movq (%rcx,%r14,8), %rax
movw %dx, 0x14(%rax)
movq (%rcx,%r14,8), %rax
movw %dx, 0x16(%rax)
movq (%rcx,%r14,8), %rax
movw %dx, 0x18(%rax)
movq (%rcx,%r14,8), %rax
movw %dx, 0x1a(%rax)
movq (%rcx,%r14,8), %rax
movw %dx, 0x1c(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: mapXT
int
mapXT(int sn)
{
     short    i;

    #ifdef PLRSPRDEBUG
     if( isaplayersprite(sn) ) {
          crashgame("messing w plrsprite at 0");
     }
    #endif

     for ( i=0; i<MAXSPRITES; i++ ) {
          if( sprXTptr[i]->lock == 0x00 ) {
               sprptr[sn]->extra=i;
               memset(sprXTptr[i], 0, sizeof(struct spriteextension));
               sprXTptr[i]->lock=0xFF;
               return(i);
          }
     }

     sprptr[sn]->extra=-1;
     return(-1);   // no free spot found
}

// Assembly:
pushq %rbx
movl %edi, %ebx
callq 0x1ea05
testl %eax, %eax
je 0x1eb1d
leaq 0x6e89a(%rip), %rdi     # 0x8d3b0
xorl %eax, %eax
callq 0x2d800
xorl %eax, %eax
leaq 0x1b76ea(%rip), %rcx    # 0x1d6210
movq (%rcx,%rax,8), %rdx
cmpb $0x0, 0x1e(%rdx)
je 0x1eb59
incq %rax
movzwl %ax, %edx
cmpl $0x4000, %edx           # imm = 0x4000
jne 0x1eb26
movslq %ebx, %rax
leaq 0x10f6c8(%rip), %rcx    # 0x12e210
movq (%rcx,%rax,8), %rax
movw $0xffff, 0x2a(%rax)     # imm = 0xFFFF
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1eb87
movslq %ebx, %rdx
leaq 0x10f6ad(%rip), %rsi    # 0x12e210
movq (%rsi,%rdx,8), %rdx
movw %ax, 0x2a(%rdx)
movq (%rcx,%rax,8), %rdx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdx)
movups %xmm0, (%rdx)
movw $0x0, 0x20(%rdx)
movq (%rcx,%rax,8), %rcx
movb $-0x1, 0x1e(%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: verifystatus
void
verifystatus(int i, int stat)
{
     if( i == -1 ) {
          return;
     }
     if( sprptr[i]->statnum != stat ) {
          if( nextspritestat[i] != -1 ) {
               crashgame("verifystatus fail for %d", stat);
          }
          vbad++;
     }
}

// Assembly:
cmpl $-0x1, %edi
je 0x1ebf0
movslq %edi, %rax
leaq 0x10f653(%rip), %rcx    # 0x12e210
movq (%rcx,%rax,8), %rcx
movswl 0x1a(%rcx), %ecx
cmpl %esi, %ecx
je 0x1ebf0
leaq 0x555fc0(%rip), %rcx    # 0x574b90
cmpw $-0x1, (%rcx,%rax,2)
je 0x1ebea
pushq %rax
leaq 0x6e810(%rip), %rdi     # 0x8d3ef
xorl %eax, %eax
callq 0x2d800
addq $0x8, %rsp
incb 0x214815(%rip)          # 0x233405
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: initsprites
int
initsprites()
{
     int       i;

    #ifdef   NETDEBUG
     dbgfp2=fopen("debug.sts","wt");
    #endif

     for( i=0; i< MAXSPRITES; i++ ) {
          memset(&sprite[i], 0, sizeof(spritetype));
          sprite[i].sectnum=MAXSECTORS;
          sprite[i].statnum=MAXSTATUS;
          sprite[i].extra=-1;
     }

     // initialize blast sector flashes
     sectflash.sectnum=0;
     sectflash.ovis=0;
     sectflash.step=0;

    #ifdef  STATLISTDEBUG
     for( i=0; i < (MAXSECTORS+1); i++ ) {
          headspritesectptr[i]=&headspritesect[i];
     }
     for( i=0; i < (MAXSTATUS+1); i++ ) {
          headspritestatptr[i]=&headspritestat[i];
     }
     for( i=0; i < MAXSPRITES; i ++ ) {
          prevspritesectptr[i]=&prevspritesect[i];
          prevspritestatptr[i]=&prevspritestat[i];
          nextspritesectptr[i]=&nextspritesect[i];
          nextspritestatptr[i]=&nextspritestat[i];
     }
    #endif

     return(1);
}

// Assembly:
movl $0x2a, %eax
leaq 0x40bf13(%rip), %rcx    # 0x42ab10
xorps %xmm0, %xmm0
movups %xmm0, -0x1a(%rcx,%rax)
movups %xmm0, -0xe(%rcx,%rax)
movups %xmm0, -0x2a(%rcx,%rax)
movl $0x4001000, -0x12(%rcx,%rax) # imm = 0x4001000
movw $0xffff, (%rcx,%rax)    # imm = 0xFFFF
addq $0x2c, %rax
cmpq $0xb002a, %rax          # imm = 0xB002A
jne 0x1ec00
movw $0x0, 0x2147d6(%rip)    # 0x233408
movb $0x0, 0x2147d7(%rip)    # 0x233410
movl $0x0, 0x2147c9(%rip)    # 0x23340c
leaq 0x53b726(%rip), %rax    # 0x55a370
xorl %ecx, %ecx
leaq 0x2147cd(%rip), %rdx    # 0x233420
movq %rax, (%rcx,%rdx)
addq $0x8, %rcx
addq $0x2, %rax
cmpq $0x8008, %rcx           # imm = 0x8008
jne 0x1ec53
leaq 0x54d711(%rip), %rax    # 0x56c380
xorl %ecx, %ecx
leaq 0x21c7b8(%rip), %rdx    # 0x23b430
movq %rax, (%rcx,%rdx)
addq $0x8, %rcx
addq $0x2, %rax
cmpq $0x2008, %rcx           # imm = 0x2008
jne 0x1ec78
leaq 0x555efc(%rip), %rax    # 0x574b90
leaq 0x5456e5(%rip), %rcx    # 0x564380
leaq 0x54deee(%rip), %rdx    # 0x56cb90
leaq 0x53d6d7(%rip), %rsi    # 0x55c380
xorl %edi, %edi
leaq 0x21e78e(%rip), %r8     # 0x23d440
leaq 0x23e787(%rip), %r9     # 0x25d440
leaq 0x25e780(%rip), %r10    # 0x27d440
leaq 0x27e779(%rip), %r11    # 0x29d440
movq %rsi, (%rdi,%r8)
movq %rdx, (%rdi,%r9)
movq %rcx, (%rdi,%r10)
movq %rax, (%rdi,%r11)
addq $0x8, %rdi
addq $0x2, %rax
addq $0x2, %rcx
addq $0x2, %rdx
addq $0x2, %rsi
cmpq $0x20000, %rdi          # imm = 0x20000
jne 0x1ecc7
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: isvisible
int
isvisible(short i, short target)
{

     if( !validplayer(target) ) {
          crashgame("isvisible: bad targetnum");
     }

	if( sintable[(sprptr[i]->ang+2560)&2047]*(posx[target]-sprptr[i]->x) + sintable[(sprptr[i]->ang+2048)&2047]*(posy[target]-sprptr[i]->y) >= 0) {
	     if( cansee(posx[target],posy[target],(posz[target])>>1,cursectnum[target],
                     sprptr[i]->x,sprptr[i]->y,sprptr[i]->z-(tilesizy[sprptr[i]->picnum]<<7),sprptr[i]->sectnum) == 1) {
          return(1);
          }
     }

     return(0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
movl %esi, %edi
callq 0xf210
testl %eax, %eax
jne 0x1f0fe
leaq 0x6e31e(%rip), %rdi     # 0x8d415
xorl %eax, %eax
callq 0x2d800
movswq %bp, %rax
leaq 0x10f107(%rip), %rcx    # 0x12e210
movq (%rcx,%rax,8), %rax
movzwl 0x1c(%rax), %edx
leal 0x200(%rdx), %ecx
movl $0x7ff, %esi            # imm = 0x7FF
andl %esi, %ecx
leaq 0x55da8b(%rip), %r10    # 0x57cbb0
movswl (%r10,%rcx,2), %r11d
movswq %bx, %rcx
leaq 0xc239b(%rip), %rdi     # 0xe14d0
movl (%rdi,%rcx,4), %edi
movl (%rax), %r8d
movl 0x4(%rax), %r9d
movl %edi, %ebx
subl %r8d, %ebx
imull %r11d, %ebx
andl %esi, %edx
movswl (%r10,%rdx,2), %edx
leaq 0xc23ba(%rip), %rsi     # 0xe1510
movl (%rsi,%rcx,4), %esi
movl %esi, %r10d
subl %r9d, %r10d
imull %edx, %r10d
addl %ebx, %r10d
js 0x1f1b8
leaq 0xc23e1(%rip), %rdx     # 0xe1550
movl (%rdx,%rcx,4), %edx
sarl %edx
leaq 0xc35a5(%rip), %r10     # 0xe2720
movswl (%r10,%rcx,2), %ecx
movl 0x8(%rax), %r10d
movswq 0xe(%rax), %r11
leaq 0x5904b0(%rip), %rbx    # 0x5af640
movswl (%rbx,%r11,2), %r11d
shll $0x7, %r11d
subl %r11d, %r10d
movswl 0x18(%rax), %eax
pushq %rax
pushq %r10
callq 0x4712f
addq $0x10, %rsp
movl %eax, %ecx
movl $0x1, %eax
cmpl $0x1, %ecx
je 0x1f1ba
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: getpicinfo
void
getpicinfo(short picnum)
{
     int      amask=picanm[picnum];

     picinfoptr->numframes=amask&0x0000003F;
     picinfoptr->animtype =( amask&0x000000C0 )>>6;
     picinfoptr->xcenteroffset=( amask&0x0000FF00 )>>8;
     picinfoptr->ycenteroffset=( amask&0x00FF0000 )>>16;
     picinfoptr->animspeed=( amask&0x0F000000 )>>24;
}

// Assembly:
movslq %edi, %rax
leaq 0x3c96f5(%rip), %rcx    # 0x3e88c0
movl (%rcx,%rax,4), %eax
movl %eax, %ecx
andb $0x3f, %cl
movq 0xb0616(%rip), %rdx     # 0xcf7f0
movb %cl, (%rdx)
movl %eax, %ecx
shrb $0x6, %cl
movq 0xb0608(%rip), %rdx     # 0xcf7f0
movb %cl, 0x1(%rdx)
movq 0xb05fe(%rip), %rcx     # 0xcf7f0
movb %ah, 0x3(%rcx)
movl %eax, %ecx
shrl $0x10, %ecx
movq 0xb05ef(%rip), %rdx     # 0xcf7f0
movb %cl, 0x2(%rdx)
shrl $0x18, %eax
andb $0xf, %al
movq 0xb05e0(%rip), %rcx     # 0xcf7f0
movb %al, 0x4(%rcx)
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: wallangle
short
wallangle(int wn)
{
     int      w1x,w1y, w2x,w2y;
     short     wang;

     w1x=wallptr[wn]->x; w1y=wallptr[wn]->y;
     wn=wallptr[wn]->point2;
     w2x=wallptr[wn]->x; w2y=wallptr[wn]->y;
     wang=getangle(w2x-w1x, w2y-w1y);

 return(wang);
}

// Assembly:
pushq %rax
movslq %edi, %rax
leaq 0x1deff1(%rip), %rcx    # 0x1fe210
movq (%rcx,%rax,8), %rax
movswq 0x8(%rax), %rdx
movq (%rcx,%rdx,8), %rcx
movl (%rcx), %edi
movl 0x4(%rcx), %esi
subl (%rax), %edi
subl 0x4(%rax), %esi
callq 0x469df
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: wallnormal
short
wallnormal(int wn)
{
     int      w1x,w1y, w2x,w2y;
     short     wnorm;

     w1x=wallptr[wn]->x; w1y=wallptr[wn]->y;
     wn=wallptr[wn]->point2;
     w2x=wallptr[wn]->x; w2y=wallptr[wn]->y;
     wnorm=getangle(w2x-w1x, w2y-w1y);
     wnorm=(wnorm+512L)&2047;

 return(wnorm);
}

// Assembly:
pushq %rax
movslq %edi, %rax
leaq 0x1def87(%rip), %rcx    # 0x1fe210
movq (%rcx,%rax,8), %rax
movswq 0x8(%rax), %rdx
movq (%rcx,%rdx,8), %rcx
movl (%rcx), %edi
movl 0x4(%rcx), %esi
subl (%rax), %edi
subl 0x4(%rax), %esi
callq 0x469df
addl $0x200, %eax            # imm = 0x200
andl $0x7ff, %eax            # imm = 0x7FF
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: spritedeflect
short
spritedeflect(int sn, short angin)
{
     short     angout;

     switch ( sprptr[sn]->statnum ) {
     case INANIMATE:
     case INACTIVE:
     case AMBUSH:
          angout=(angin+1024)&2047;
          switch( (int)RMOD2("STAT697 ") ) {
          case 0:
               angout=leftof[angout];
               break;
          case 1:
          default:
               angout=rightof[angout];
               break;
          }
          break;
     default:
          angout=sprptr[sn]->ang;
          break;
     }

 return(angout);
}

// Assembly:
pushq %rbx
movl %esi, %ebx
movslq %edi, %rax
leaq 0x10ef29(%rip), %rcx    # 0x12e210
movq (%rcx,%rax,8), %rax
movzwl 0x1a(%rax), %ecx
testl %ecx, %ecx
je 0x1f300
cmpl $0xca, %ecx
je 0x1f300
cmpl $0x64, %ecx
jne 0x1f335
andl $0x7ff, %ebx            # imm = 0x7FF
xorl $0x400, %ebx            # imm = 0x400
leaq 0x6e136(%rip), %rdi     # 0x8d449
callq 0x2be4a
cmpl $0x8000, %eax           # imm = 0x8000
jg 0x1f328
leaq 0xb055a(%rip), %rax     # 0xcf880
jmp 0x1f32f
leaq 0xb0581(%rip), %rax     # 0xcf8b0
leaq (%rax,%rbx,2), %rax
jmp 0x1f339
addq $0x1c, %rax
movzwl (%rax), %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: tweakdeathdist
void
tweakdeathdist(short i)
{
	int      dax,day;

    #ifdef PLRSPRDEBUG
     if( isaplayersprite(i) ) {
          crashgame("messing w plrsprite at 1");
     }
    #endif

     sprptr[i]->clipdist<<=1;
     dax=( ((sintable[(sprptr[i]->ang+512)&2047])*sprptr[i]->xvel) <<3 );
	day=( ((sintable[sprptr[i]->ang])*sprptr[i]->yvel) <<3 );
	movesprite(( short)i,dax,day,0L,1024,1024,CLIFFCLIP);

     if( sprptr[i]->extra == -1 ) {
          sprptr[i]->lotag=SPR_LOTAG_PICKUP;
     }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
callq 0x1ea05
testl %eax, %eax
je 0x1f35b
leaq 0x6e0fe(%rip), %rdi     # 0x8d452
xorl %eax, %eax
callq 0x2d800
movswq %bx, %rbx
leaq 0x10eeaa(%rip), %r14    # 0x12e210
movq (%r14,%rbx,8), %rax
shlb 0x12(%rax)
movq (%r14,%rbx,8), %rax
movswq 0x1c(%rax), %rcx
leal 0x200(%rcx), %edx
andl $0x7ff, %edx            # imm = 0x7FF
leaq 0x55d827(%rip), %rdi    # 0x57cbb0
movswl (%rdi,%rdx,2), %edx
movswl 0x20(%rax), %esi
imull %edx, %esi
shll $0x3, %esi
movswl (%rdi,%rcx,2), %ecx
movswl 0x22(%rax), %edx
imull %ecx, %edx
shll $0x3, %edx
movl $0x2, (%rsp)
movswl %bx, %edi
xorl %ecx, %ecx
movl $0x400, %r8d            # imm = 0x400
movl $0x400, %r9d            # imm = 0x400
callq 0x1cfc1
movq (%r14,%rbx,8), %rax
cmpw $-0x1, 0x2a(%rax)
jne 0x1f3d3
movw $0x7d4, 0x26(%rax)      # imm = 0x7D4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: pickupsprite
int
pickupsprite(short sn)
{
    #ifdef PLRSPRDEBUG
     if( isaplayersprite(sn) ) {
          crashgame("messing w plrsprite at 4");
     }
    #endif

     // can only carry one at a time of these items
     if( (pickup.picnum != 0) || (option[4] != 0) ) {
          return(0);
     }

     pickup.picnum=sprptr[sn]->picnum;
     pickup.cstat=sprptr[sn]->cstat;
     pickup.shade=sprptr[sn]->shade;
     pickup.pal=sprptr[sn]->pal;
     pickup.clipdist=sprptr[sn]->clipdist;
     pickup.xrepeat=sprptr[sn]->xrepeat;
     pickup.yrepeat=sprptr[sn]->yrepeat;
	pickup.xoffset=sprptr[sn]->xoffset;
	pickup.yoffset=sprptr[sn]->yoffset;
     // cant set lotag/hitag as TOSS needs to use them
     pickup.extra=sprptr[sn]->extra;

     jsdeletesprite(sn);

     pickupclock=lockclock;
     return(1);
}

// Assembly:
pushq %rbx
movl %edi, %ebx
callq 0x1ea05
testl %eax, %eax
je 0x1f592
leaq 0x6def9(%rip), %rdi     # 0x8d484
xorl %eax, %eax
callq 0x2d800
xorl %eax, %eax
cmpw $0x0, 0x29deb2(%rip)    # 0x2bd44e
jne 0x1f63e
leaq 0xaf3cf(%rip), %rcx     # 0xce978
cmpb $0x0, 0x4(%rcx)
jne 0x1f63e
movswq %bx, %rax
leaq 0x10ec52(%rip), %rcx    # 0x12e210
movq (%rcx,%rax,8), %rcx
movzwl 0xe(%rcx), %edx
movw %dx, 0x29de81(%rip)     # 0x2bd44e
movzwl 0xc(%rcx), %edx
movw %dx, 0x29de74(%rip)     # 0x2bd44c
movb 0x10(%rcx), %dl
movb %dl, 0x29de6f(%rip)     # 0x2bd450
movb 0x11(%rcx), %dl
movb %dl, 0x29de67(%rip)     # 0x2bd451
movb 0x12(%rcx), %dl
movb %dl, 0x29de5f(%rip)     # 0x2bd452
movb 0x14(%rcx), %dl
movb %dl, 0x29de58(%rip)     # 0x2bd454
movb 0x15(%rcx), %dl
movb %dl, 0x29de50(%rip)     # 0x2bd455
movb 0x16(%rcx), %dl
movb %dl, 0x29de48(%rip)     # 0x2bd456
movb 0x17(%rcx), %dl
movb %dl, 0x29de40(%rip)     # 0x2bd457
movzwl 0x2a(%rcx), %ecx
movw %cx, 0x29de48(%rip)     # 0x2bd46a
movswl %ax, %edi
callq 0x1e99d
leaq 0xc1e57(%rip), %rax     # 0xe1488
movl (%rax), %eax
movl %eax, 0x29de7f(%rip)    # 0x2bd4b8
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: ambushyell
void
ambushyell(short sn, short ext)
{
    #ifdef PLRSPRDEBUG
     if( isaplayersprite(sn) ) {
          crashgame("messing w plrsprite at 24");
     }
    #endif

     if( !validext(ext) ) {
          return;
     }
     if( sprXTptr[ext]->aimask&AI_DIDAMBUSHYELL )
          return;

     switch( sprXTptr[ext]->basepic ) {
     case ANTWALKPIC:
     case RUBWALKPIC:
          playsound(S_MALE_COMEONYOU+(krand_intercept("STAT2603")&6),sprptr[sn]->x,sprptr[sn]->y,0,ST_IMMEDIATE);
          sprXTptr[ext]->aimask|=AI_DIDAMBUSHYELL;
          break;
     case DIWALKPIC:
          playsound(S_DIM_WANTSOMETHIS+(krand_intercept("STAT2607")&2),sprptr[sn]->x,sprptr[sn]->y,0,ST_IMMEDIATE);
          sprXTptr[ext]->aimask|=AI_DIDAMBUSHYELL;
          break;
     }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movl %edi, %ebx
callq 0x1ea05
testl %eax, %eax
je 0x2065d
leaq 0x6d12f(%rip), %rdi     # 0x8d785
xorl %eax, %eax
callq 0x2d800
movzwl %bp, %r14d
cmpl $0x3fff, %r14d          # imm = 0x3FFF
ja 0x206f3
leaq 0x1b5b9b(%rip), %r15    # 0x1d6210
movq (%r15,%r14,8), %rax
testb $0x2, 0x7(%rax)
jne 0x206f3
movzwl 0xa(%rax), %eax
movl $0x97, %r12d
movl $0x6, %ebp
leaq 0x6d10a(%rip), %rdi     # 0x8d79f
cmpl $0x163, %eax            # imm = 0x163
je 0x206bc
cmpl $0x6d7, %eax            # imm = 0x6D7
je 0x206bc
cmpl $0x75f, %eax            # imm = 0x75F
jne 0x206f3
movl $0xca, %r12d
movl $0x2, %ebp
leaq 0x6d0ec(%rip), %rdi     # 0x8d7a8
callq 0x2be4a
andl %eax, %ebp
addl %r12d, %ebp
movswq %bx, %rax
leaq 0x10db3f(%rip), %rcx    # 0x12e210
movq (%rcx,%rax,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
movl %ebp, %edi
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x1c1f1
movq (%r15,%r14,8), %rax
orw $0x200, 0x6(%rax)       # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: givewarning
void
givewarning(short i, short ext)
{
     int dist = 0L;

    #ifdef PLRSPRDEBUG
     if( isaplayersprite(i) ) {
          crashgame("messing w plrsprite at 25");
     }
    #endif

     if( option[4] != 0 ) {
          return;
     }
     if( !validext(ext) ) {
          return;
     }
     if( sprXTptr[ext]->aimask&AI_GAVEWARNING )
          return;

     dist=abs(posx[screenpeek]-sprptr[i]->x)+abs(posy[screenpeek]-sprptr[i]->y);
     if( dist > 5000 ) {
          return;
     }

     switch( sprXTptr[ext]->basepic ) {
     case COP1WALKPIC:
          playsound(S_GRD_WHATDOINGHERE+(krand_intercept("STAT2636")&4),sprptr[i]->x,sprptr[i]->y,0,ST_UNIQUE);
          sprXTptr[ext]->aimask|=AI_GAVEWARNING;
          break;
     }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movl %edi, %ebx
callq 0x1ea05
testl %eax, %eax
je 0x2071f
leaq 0x6d099(%rip), %rdi     # 0x8d7b1
xorl %eax, %eax
callq 0x2d800
movzwl %bp, %r14d
cmpl $0x3fff, %r14d          # imm = 0x3FFF
ja 0x207dd
leaq 0xae241(%rip), %rax     # 0xce978
cmpb $0x0, 0x4(%rax)
jne 0x207dd
leaq 0x1b5ac8(%rip), %r15    # 0x1d6210
movq (%r15,%r14,8), %rax
testb $0x40, 0x6(%rax)
jne 0x207dd
leaq 0xc0d01(%rip), %rcx     # 0xe145e
movswq (%rcx), %rcx
leaq 0xc0d68(%rip), %rdx     # 0xe14d0
movl (%rdx,%rcx,4), %edx
movswq %bx, %rbx
leaq 0x10da9a(%rip), %r12    # 0x12e210
movq (%r12,%rbx,8), %rsi
subl (%rsi), %edx
movl %edx, %edi
negl %edi
cmovsl %edx, %edi
leaq 0xc0d86(%rip), %rdx     # 0xe1510
movl (%rdx,%rcx,4), %ecx
subl 0x4(%rsi), %ecx
movl %ecx, %edx
negl %edx
cmovsl %ecx, %edx
addl %edi, %edx
cmpl $0x1388, %edx           # imm = 0x1388
ja 0x207dd
cmpw $0x45b, 0xa(%rax)       # imm = 0x45B
jne 0x207dd
leaq 0x6d01b(%rip), %rdi     # 0x8d7cb
callq 0x2be4a
andl $0x4, %eax
leal 0xc5(%rax), %edi
movq (%r12,%rbx,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
xorl %ecx, %ecx
movl $0x8, %r8d
callq 0x1c1f1
movq (%r15,%r14,8), %rax
orw $0x40, 0x6(%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: isanandroid
int
isanandroid(int i)
{
	int	ext=sprptr[i]->extra;

    #ifdef PLRSPRDEBUG
     if( isaplayersprite(i) ) {
          crashgame("messing w plrsprite at 22");
     }
    #endif

     if( validext(ext) ) {
          if( ((sprXTptr[ext]->fxmask)&FX_ANDROID) != 0 ) {
               return(1);
          }
     }

     return(0);
}

// Assembly:
pushq %rbx
movslq %edi, %rdi
leaq 0x10d5ed(%rip), %rax    # 0x12e210
movq (%rax,%rdi,8), %rax
movzwl 0x2a(%rax), %ebx
callq 0x1ea05
testl %eax, %eax
je 0x20c42
leaq 0x6cafb(%rip), %rdi     # 0x8d736
xorl %eax, %eax
callq 0x2d800
cmpl $0x3fff, %ebx           # imm = 0x3FFF
ja 0x20c60
leaq 0x1b55bf(%rip), %rax    # 0x1d6210
movq (%rax,%rbx,8), %rcx
movl $0x1, %eax
testb $0x4, 0x4(%rcx)
jne 0x20c62
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: isahologram
int
isahologram(int i)
{
	int	ext=sprptr[i]->extra;

    #ifdef PLRSPRDEBUG
     if( isaplayersprite(i) ) {
          crashgame("messing w plrsprite at 21");
     }
    #endif

     if( validext(ext) ) {
          if( ((sprXTptr[ext]->fxmask)&FX_HOLOGRAM) != 0 ) {
               return(1);
          }
     }

     return(0);
}

// Assembly:
pushq %rbx
movslq %edi, %rdi
leaq 0x10d5a1(%rip), %rax    # 0x12e210
movq (%rax,%rdi,8), %rax
movzwl 0x2a(%rax), %ebx
callq 0x1ea05
testl %eax, %eax
je 0x20c8e
leaq 0x6ca95(%rip), %rdi     # 0x8d71c
xorl %eax, %eax
callq 0x2d800
cmpl $0x3fff, %ebx           # imm = 0x3FFF
ja 0x20cac
leaq 0x1b5573(%rip), %rax    # 0x1d6210
movq (%rax,%rbx,8), %rcx
movl $0x1, %eax
testb $0x8, 0x4(%rcx)
jne 0x20cae
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: playervirus
int
playervirus(short pnum, int pic)
{
     int       j,nextj;

     if( !validplayer(pnum) ) {
          crashgame("plrvrus: bad plrnum");
     }

	j=headspritestat[PLRVIRUS];
	while( j >= 0 ) {
		nextj = nextspritestat[j];
          // already hosting ?
          if( sprptr[j]->owner == pnum ) {
               return(0);
          }
		j = nextj;
	}

     j=jsinsertsprite(cursectnum[pnum], PLRVIRUS);
     if( j == -1 ) {
          return(0);
     }

     sprptr[j]->extra=-1;
     sprptr[j]->x=posx[pnum];
     sprptr[j]->y=posy[pnum];
     sprptr[j]->z=posz[pnum];
     sprptr[j]->xrepeat=18;
     sprptr[j]->yrepeat=40;
     sprptr[j]->cstat=0x0000;
     sprptr[j]->shade=-28;
     sprptr[j]->picnum=pic;
     sprptr[j]->lotag=(krand_intercept("STAT1172")&512)+128;
     sprptr[j]->hitag=0;
     sprptr[j]->owner=pnum;  // host

     playsound(S_FIRELOOP,sprptr[j]->x,sprptr[j]->y,0,ST_UPDATE);

     return(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movl %edi, %ebp
callq 0xf210
testl %eax, %eax
jne 0x20cd3
leaq 0x6c829(%rip), %rdi     # 0x8d4f5
xorl %eax, %eax
callq 0x2d800
leaq 0x54b6a6(%rip), %rax    # 0x56c380
movzwl 0x1fe(%rax), %edx
testw %dx, %dx
js 0x20d0e
leaq 0x10d523(%rip), %rax    # 0x12e210
leaq 0x553e9c(%rip), %rcx    # 0x574b90
movzwl %dx, %edx
movq (%rax,%rdx,8), %rsi
cmpw %bp, 0x1e(%rsi)
je 0x20df7
movzwl (%rcx,%rdx,2), %edx
testw %dx, %dx
jns 0x20cf4
movswq %bp, %r14
leaq 0xc1a07(%rip), %rax     # 0xe2720
movswl (%rax,%r14,2), %edi
movl $0xff, %esi
callq 0x1e94c
cmpw $-0x1, %ax
je 0x20df7
movswq %ax, %r15
leaq 0x10d4d3(%rip), %r12    # 0x12e210
movq (%r12,%r15,8), %rax
movw $0xffff, 0x2a(%rax)     # imm = 0xFFFF
leaq 0xc0782(%rip), %rax     # 0xe14d0
movl (%rax,%r14,4), %eax
movq (%r12,%r15,8), %rcx
movl %eax, (%rcx)
leaq 0xc07b1(%rip), %rax     # 0xe1510
movl (%rax,%r14,4), %eax
movq (%r12,%r15,8), %rcx
movl %eax, 0x4(%rcx)
leaq 0xc07df(%rip), %rax     # 0xe1550
movl (%rax,%r14,4), %eax
movq (%r12,%r15,8), %rcx
movl %eax, 0x8(%rcx)
movq (%r12,%r15,8), %rax
movb $0x12, 0x14(%rax)
movq (%r12,%r15,8), %rax
movb $0x28, 0x15(%rax)
movq (%r12,%r15,8), %rax
xorl %ebp, %ebp
movw %bp, 0xc(%rax)
movq (%r12,%r15,8), %rax
movb $-0x1c, 0x10(%rax)
movq (%r12,%r15,8), %rax
movw %bx, 0xe(%rax)
leaq 0x6c75c(%rip), %rdi     # 0x8d509
callq 0x2be4a
andl $0x200, %eax            # imm = 0x200
orl $0x80, %eax
movq (%r12,%r15,8), %rcx
movw %ax, 0x26(%rcx)
movq (%r12,%r15,8), %rax
movw %bp, 0x28(%rax)
movq (%r12,%r15,8), %rax
movw %r14w, 0x1e(%rax)
movq (%r12,%r15,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
movl $0x24, %edi
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0x1c1f1
movl $0x1, %eax
jmp 0x20df9
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: hideplea
void
hideplea(short sn, short ext)
{
    #ifdef PLRSPRDEBUG
     if( isaplayersprite(sn) ) {
          crashgame("messing w plrsprite at 8");
     }
    #endif

     if( (sprXTptr[ext]->aimask&AI_DIDHIDEPLEA) && (krand_intercept("STAT1383")&1) )
          return;

     switch( sprXTptr[ext]->basepic ) {
     case ERWALKPIC:
          playsound(S_MALE_DONTHURT+(krand_intercept("STAT1390")&5),sprptr[sn]->x,sprptr[sn]->y,0,ST_UNIQUE);
          if(krand_intercept("STAT1391")&1) {
               sprXTptr[ext]->aimask|=AI_DIDHIDEPLEA;
          }
          break;
     case SARAHWALKPIC:
     case SAMWALKPIC:
          playsound(S_DIANE_DONTSHOOTP+(krand_intercept("STAT1397")&5),sprptr[sn]->x,sprptr[sn]->y,0,ST_UNIQUE);
          if(krand_intercept("STAT1398")&1) {
               sprXTptr[ext]->aimask|=AI_DIDHIDEPLEA;
          }
          break;
     }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movl %edi, %ebx
callq 0x1ea05
testl %eax, %eax
je 0x215c8
leaq 0x6bfa0(%rip), %rdi     # 0x8d561
xorl %eax, %eax
callq 0x2d800
movswq %bp, %r14
leaq 0x1b4c3d(%rip), %r15    # 0x1d6210
movq (%r15,%r14,8), %rax
testb $0x4, 0x7(%rax)
je 0x215f1
leaq 0x6bf96(%rip), %rdi     # 0x8d57a
callq 0x2be4a
testb $0x1, %al
jne 0x216a1
movq (%r15,%r14,8), %rax
movzwl 0xa(%rax), %eax
cmpl $0x709, %eax            # imm = 0x709
je 0x21651
cmpl $0x7d3, %eax            # imm = 0x7D3
je 0x21651
cmpl $0x79e, %eax            # imm = 0x79E
jne 0x216a1
leaq 0x6bf6a(%rip), %rdi     # 0x8d583
callq 0x2be4a
andl $0x5, %eax
leal 0x9e(%rax), %edi
movswq %bx, %rax
leaq 0x10cbde(%rip), %rcx    # 0x12e210
movq (%rcx,%rax,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
xorl %ecx, %ecx
movl $0x8, %r8d
callq 0x1c1f1
leaq 0x6bf3d(%rip), %rdi     # 0x8d58c
jmp 0x2168e
leaq 0x6bf3d(%rip), %rdi     # 0x8d595
callq 0x2be4a
andl $0x5, %eax
leal 0xbb(%rax), %edi
movswq %bx, %rax
leaq 0x10cb9f(%rip), %rcx    # 0x12e210
movq (%rcx,%rax,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
xorl %ecx, %ecx
movl $0x8, %r8d
callq 0x1c1f1
leaq 0x6bec1(%rip), %rdi     # 0x8d54f
callq 0x2be4a
testb $0x1, %al
je 0x216a1
movq (%r15,%r14,8), %rax
orw $0x400, 0x6(%rax)       # imm = 0x400
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/tekstat.c
// Function: fleescream
void
fleescream(short sn, short ext)
{
    #ifdef PLRSPRDEBUG
     if( isaplayersprite(sn) ) {
          crashgame("messing w plrsprite at 9");
     }
    #endif

     if( !validext(ext) ) {
          return;
     }

     if( (sprXTptr[ext]->aimask&AI_DIDFLEESCREAM) && (krand_intercept("STAT1417")&1) )
          return;

     switch( sprXTptr[ext]->basepic ) {
     case ERWALKPIC:
          playsound(S_MALE_OHMYGOD+(krand_intercept("STAT1424")&5),sprptr[sn]->x,sprptr[sn]->y,0,ST_UNIQUE);
          if(krand_intercept("STAT1425")&1) {
               sprXTptr[ext]->aimask|=AI_DIDFLEESCREAM;
          }
          break;
     case SARAHWALKPIC:
     case SAMWALKPIC:
          switch( RMOD4("STAT1478") ) {
		case 0:
          case 2:
               playsound(S_FEM_RUNHEGOTGUN+(krand_intercept("STAT1434")&11),sprptr[sn]->x,sprptr[sn]->y,0,ST_UNIQUE);
               break;
          default:
              playsound(S_SCREAM1+RMOD3("STAT1484"),sprptr[sn]->x,sprptr[sn]->y,0,ST_UNIQUE);
               break;
          }
          if(krand_intercept("STAT1440")&1) {
               sprXTptr[ext]->aimask|=AI_DIDFLEESCREAM;
          }
          break;
     }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movl %edi, %ebx
callq 0x1ea05
testl %eax, %eax
je 0x216cf
leaq 0x6bed6(%rip), %rdi     # 0x8d59e
xorl %eax, %eax
callq 0x2d800
movzwl %bp, %r15d
cmpl $0x3fff, %r15d          # imm = 0x3FFF
ja 0x217f6
leaq 0x1b4b29(%rip), %r12    # 0x1d6210
movq (%r12,%r15,8), %rax
testb $0x1, 0x7(%rax)
je 0x21705
leaq 0x6bebf(%rip), %rdi     # 0x8d5b7
callq 0x2be4a
testb $0x1, %al
jne 0x217f6
movq (%r12,%r15,8), %rax
movzwl 0xa(%rax), %eax
cmpl $0x709, %eax            # imm = 0x709
je 0x21765
cmpl $0x7d3, %eax            # imm = 0x7D3
je 0x21765
cmpl $0x79e, %eax            # imm = 0x79E
jne 0x217f6
leaq 0x6be93(%rip), %rdi     # 0x8d5c0
callq 0x2be4a
andl $0x5, %eax
leal 0xa3(%rax), %edi
movswq %bx, %rax
leaq 0x10caca(%rip), %rcx    # 0x12e210
movq (%rcx,%rax,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
xorl %ecx, %ecx
movl $0x8, %r8d
callq 0x1c1f1
leaq 0x6be66(%rip), %rdi     # 0x8d5c9
jmp 0x217e3
leaq 0x6be66(%rip), %rdi     # 0x8d5d2
callq 0x2be4a
btl $0x3, %eax
jb 0x21790
leaq 0x6be5d(%rip), %rdi     # 0x8d5db
callq 0x2be4a
movl %eax, %ebp
andl $0xb, %ebp
addl $0xaf, %ebp
jmp 0x217b9
leaq 0x6be4d(%rip), %r14     # 0x8d5e4
movq %r14, %rdi
callq 0x2be4a
xorl %ebp, %ebp
cmpl $0x8001, %eax           # imm = 0x8001
setge %bpl
movq %r14, %rdi
callq 0x2be4a
btl $0x1, %eax
adcl $0x7d, %ebp
movswq %bx, %rax
leaq 0x10ca4c(%rip), %rcx    # 0x12e210
movq (%rcx,%rax,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
movl %ebp, %edi
xorl %ecx, %ecx
movl $0x8, %r8d
callq 0x1c1f1
leaq 0x6be0a(%rip), %rdi     # 0x8d5ed
callq 0x2be4a
testb $0x1, %al
je 0x217f6
movq (%r12,%r15,8), %rax
orw $0x100, 0x6(%rax)       # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq