LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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 0xe2e0
testl %eax, %eax
jne 0x1f10a
leaq 0x6347a(%rip), %rdi     # 0x8257d
xorl %eax, %eax
callq 0x2acb8
movl $0x1fe, %eax            # imm = 0x1FE
addq 0xa7e32(%rip), %rax     # 0xc6f48
leaq 0x108113(%rip), %r14    # 0x127230
leaq 0x54ea8c(%rip), %rcx    # 0x56dbb0
movswq (%rax), %rax
testq %rax, %rax
js 0x1f143
movq (%r14,%rax,8), %rdx
cmpw %bp, 0x1e(%rdx)
je 0x1f21e
addq %rax, %rax
addq %rcx, %rax
jmp 0x1f124
movswq %bp, %r15
leaq 0xbc5d2(%rip), %rax     # 0xdb720
movswl (%rax,%r15,2), %edi
movl $0xff, %esi
callq 0x1cf0c
cmpw $-0x1, %ax
je 0x1f21e
movswq %ax, %r12
movq (%r14,%r12,8), %rax
orw $-0x1, 0x2a(%rax)
leaq 0xbb355(%rip), %rax     # 0xda4d0
movl (%rax,%r15,4), %eax
movq (%r14,%r12,8), %rcx
movl %eax, (%rcx)
leaq 0xbb384(%rip), %rax     # 0xda510
movl (%rax,%r15,4), %eax
movq (%r14,%r12,8), %rcx
movl %eax, 0x4(%rcx)
leaq 0xbb3b2(%rip), %rax     # 0xda550
movl (%rax,%r15,4), %eax
movq (%r14,%r12,8), %rcx
movl %eax, 0x8(%rcx)
movq (%r14,%r12,8), %rax
movb $0x12, 0x14(%rax)
movq (%r14,%r12,8), %rax
movb $0x28, 0x15(%rax)
movq (%r14,%r12,8), %rax
andw $0x0, 0xc(%rax)
movq (%r14,%r12,8), %rax
movb $-0x1c, 0x10(%rax)
movq (%r14,%r12,8), %rax
movw %bx, 0xe(%rax)
leaq 0x633b8(%rip), %rdi     # 0x82591
callq 0x2945b
andl $0x200, %eax            # imm = 0x200
orl $0x80, %eax
movq (%r14,%r12,8), %rcx
movw %ax, 0x26(%rcx)
movq (%r14,%r12,8), %rax
andw $0x0, 0x28(%rax)
movq (%r14,%r12,8), %rax
movw %r15w, 0x1e(%rax)
movq (%r14,%r12,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
pushq $0x24
popq %rdi
pushq $0x2
popq %r8
xorl %ecx, %ecx
callq 0x1ab2a
pushq $0x1
popq %rax
jmp 0x1f220
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1cfc4
testl %eax, %eax
je 0x1f923
leaq 0x62ccd(%rip), %rdi     # 0x825e9
xorl %eax, %eax
callq 0x2acb8
movswq %bp, %r14
leaq 0x1af902(%rip), %r15    # 0x1cf230
movq (%r15,%r14,8), %rax
testb $0x4, 0x7(%rax)
je 0x1f950
leaq 0x62cc3(%rip), %rdi     # 0x82602
callq 0x2945b
testb $0x1, %al
jne 0x1f9f8
movq (%r15,%r14,8), %rax
movzwl 0xa(%rax), %eax
cmpl $0x709, %eax            # imm = 0x709
je 0x1f9aa
cmpl $0x7d3, %eax            # imm = 0x7D3
je 0x1f9aa
cmpl $0x79e, %eax            # imm = 0x79E
jne 0x1f9f8
leaq 0x62c97(%rip), %rdi     # 0x8260b
callq 0x2945b
andl $0x5, %eax
leal 0x9e(%rax), %edi
movswq %bx, %rax
leaq 0x1078a3(%rip), %rcx    # 0x127230
movq (%rcx,%rax,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
pushq $0x8
popq %r8
xorl %ecx, %ecx
callq 0x1ab2a
leaq 0x62c6c(%rip), %rdi     # 0x82614
jmp 0x1f9e5
leaq 0x62c6c(%rip), %rdi     # 0x8261d
callq 0x2945b
andl $0x5, %eax
leal 0xbb(%rax), %edi
movswq %bx, %rax
leaq 0x107866(%rip), %rcx    # 0x127230
movq (%rcx,%rax,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
pushq $0x8
popq %r8
xorl %ecx, %ecx
callq 0x1ab2a
leaq 0x62bf2(%rip), %rdi     # 0x825d7
callq 0x2945b
testb $0x1, %al
je 0x1f9f8
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_O2/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 0x1cfc4
testl %eax, %eax
je 0x1fa26
leaq 0x62c07(%rip), %rdi     # 0x82626
xorl %eax, %eax
callq 0x2acb8
cmpw $0x3fff, %bp            # imm = 0x3FFF
ja 0x1fb47
movzwl %bp, %r15d
leaq 0x1af7f4(%rip), %r12    # 0x1cf230
movq (%r12,%r15,8), %rax
testb $0x1, 0x7(%rax)
je 0x1fa5e
leaq 0x62bf2(%rip), %rdi     # 0x8263f
callq 0x2945b
testb $0x1, %al
jne 0x1fb47
movq (%r12,%r15,8), %rax
movzwl 0xa(%rax), %eax
cmpl $0x709, %eax            # imm = 0x709
je 0x1fab8
cmpl $0x7d3, %eax            # imm = 0x7D3
je 0x1fab8
cmpl $0x79e, %eax            # imm = 0x79E
jne 0x1fb47
leaq 0x62bc6(%rip), %rdi     # 0x82648
callq 0x2945b
andl $0x5, %eax
leal 0xa3(%rax), %edi
movswq %bx, %rax
leaq 0x107795(%rip), %rcx    # 0x127230
movq (%rcx,%rax,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
pushq $0x8
popq %r8
xorl %ecx, %ecx
callq 0x1ab2a
leaq 0x62b9b(%rip), %rdi     # 0x82651
jmp 0x1fb34
leaq 0x62b9b(%rip), %rdi     # 0x8265a
callq 0x2945b
btl $0x3, %eax
jb 0x1fae3
leaq 0x62b92(%rip), %rdi     # 0x82663
callq 0x2945b
movl %eax, %ebp
andl $0xb, %ebp
addl $0xaf, %ebp
jmp 0x1fb0c
leaq 0x62b82(%rip), %r14     # 0x8266c
movq %r14, %rdi
callq 0x2945b
xorl %ebp, %ebp
cmpl $0x8001, %eax           # imm = 0x8001
setge %bpl
movq %r14, %rdi
callq 0x2945b
btl $0x1, %eax
adcl $0x7d, %ebp
movswq %bx, %rax
leaq 0x107719(%rip), %rcx    # 0x127230
movq (%rcx,%rax,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
pushq $0x8
popq %r8
movl %ebp, %edi
xorl %ecx, %ecx
callq 0x1ab2a
leaq 0x62b41(%rip), %rdi     # 0x82675
callq 0x2945b
testb $0x1, %al
je 0x1fb47
movq (%r12,%r15,8), %rax
orw $0x100, 0x6(%rax)       # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekstat.c
// Function: rubitinsound
void
rubitinsound(int p, int sn)
{
     int       ext=sprptr[sn]->extra;

     (void)p;

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

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

     if( sprXTptr[ext]->aimask&AI_DIDHIDEPLEA )
          return;

     switch( sprXTptr[ext]->basepic ) {
     case MAWALKPIC:
          playsound(S_MAR_THINKYOUTAKE+RMOD3("STAT1513"),sprptr[sn]->x,sprptr[sn]->y,0,ST_UPDATE);
     case DIWALKPIC:
          playsound(S_DIM_LAUGHTER+RMOD3("STAT1515"),sprptr[sn]->x,sprptr[sn]->y,0,ST_UPDATE);
          break;
     case ANTWALKPIC:
          playsound(S_MALE_YOULOSER+RMOD3("STAT1518"),sprptr[sn]->x,sprptr[sn]->y,0,ST_UPDATE);
          break;
     }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movslq %esi, %rbx
leaq 0x1076cf(%rip), %r15    # 0x127230
movq (%r15,%rbx,8), %rax
movzwl 0x2a(%rax), %r14d
movl %ebx, %edi
callq 0x1cfc4
testl %eax, %eax
je 0x1fb83
leaq 0x62b02(%rip), %rdi     # 0x8267e
xorl %eax, %eax
callq 0x2acb8
cmpw $0x3fff, %r14w          # imm = 0x3FFF
ja 0x1fc37
leaq 0x1af69a(%rip), %rax    # 0x1cf230
movq (%rax,%r14,8), %rax
testb $0x4, 0x7(%rax)
jne 0x1fc37
movzwl 0xa(%rax), %eax
cmpl $0x6d7, %eax            # imm = 0x6D7
je 0x1fc42
cmpl $0x75f, %eax            # imm = 0x75F
je 0x1fc06
cmpl $0x72a, %eax            # imm = 0x72A
jne 0x1fc37
leaq 0x62ad0(%rip), %r14     # 0x82698
movq %r14, %rdi
callq 0x2945b
xorl %ebp, %ebp
cmpl $0x8001, %eax           # imm = 0x8001
setge %bpl
movq %r14, %rdi
callq 0x2945b
orl $0xc2, %ebp
btl $0x1, %eax
adcl $0x0, %ebp
movq (%r15,%rbx,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
pushq $0x2
popq %r8
movl %ebp, %edi
xorl %ecx, %ecx
callq 0x1ab2a
leaq 0x62a94(%rip), %r14     # 0x826a1
movq %r14, %rdi
callq 0x2945b
xorl %ebp, %ebp
cmpl $0x8001, %eax           # imm = 0x8001
setge %bpl
movq %r14, %rdi
callq 0x2945b
btl $0x1, %eax
adcl $0x0, %ebp
orl $0xcc, %ebp
jmp 0x1fc6e
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x62a61(%rip), %r14     # 0x826aa
movq %r14, %rdi
callq 0x2945b
xorl %ebp, %ebp
cmpl $0x8001, %eax           # imm = 0x8001
setge %bpl
movq %r14, %rdi
callq 0x2945b
btl $0x1, %eax
adcl $0x99, %ebp
movq (%r15,%rbx,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
pushq $0x2
popq %r8
movl %ebp, %edi
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1ab2a
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekstat.c
// Function: genexplosion1
void
genexplosion1(int i)
{
     int       j;

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

     j=jsinsertsprite(sprptr[i]->sectnum, 5);
     if( j != -1 ) {
          fillsprite(j,sprptr[i]->x,sprptr[i]->y,sprptr[i]->z,0,
                     -16,0,0,64,64,0,0,GENEXP1PIC+1,sprptr[i]->ang,
	                sintable[(sprptr[i]->ang+2560)&2047]>>6,sintable[(sprptr[i]->ang+2048)&2047]>>6,
	                30L,i+4096,sprptr[i]->sectnum, 5,24,0,-1);
          playsound(S_SMALLGLASS1+RMOD2("STAT4534"), sprptr[i]->x,sprptr[i]->y,0,ST_NOUPDATE);
          return;
     }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
callq 0x1cfc4
testl %eax, %eax
je 0x1fe11
leaq 0x62b21(%rip), %rdi     # 0x8292b
xorl %eax, %eax
callq 0x2acb8
movslq %ebx, %r14
leaq 0x107415(%rip), %r15    # 0x127230
movq (%r15,%r14,8), %rax
movswl 0x18(%rax), %edi
pushq $0x5
popq %rsi
callq 0x1cf0c
cmpw $-0x1, %ax
je 0x1ff25
movswq %ax, %rax
imulq $0x2c, %rax, %rcx
leaq 0x403cec(%rip), %rdx    # 0x423b30
leaq (%rdx,%rcx), %rdi
movq (%r15,%r14,8), %rsi
movl (%rsi), %r8d
movl %r8d, (%rdx,%rcx)
movl 0x4(%rsi), %r8d
movl %r8d, 0x4(%rdx,%rcx)
movl 0x8(%rsi), %r8d
movl %r8d, 0x8(%rdx,%rcx)
movl $0x3bd0000, 0xc(%rdx,%rcx) # imm = 0x3BD0000
movw $0xf0, 0x10(%rdx,%rcx)
movb $0x0, 0x12(%rdx,%rcx)
movl $0x4040, 0x14(%rdx,%rcx) # imm = 0x4040
movl 0x1c(%rsi), %r8d
movw %r8w, 0x1c(%rdx,%rcx)
addl $0x200, %r8d            # imm = 0x200
movl $0x7ff, %r9d            # imm = 0x7FF
andl %r9d, %r8d
leaq 0x555d2e(%rip), %r10    # 0x575bd0
movswl (%r10,%r8,2), %r8d
shrl $0x6, %r8d
movw %r8w, 0x20(%rdx,%rcx)
movzwl 0x1c(%rsi), %esi
andl %r9d, %esi
movswl (%r10,%rsi,2), %esi
shrl $0x6, %esi
movw %si, 0x22(%rdx,%rcx)
addl $0x1000, %ebx           # imm = 0x1000
movw %bx, 0x1e(%rdx,%rcx)
movabsq $-0xffffffe7ffe2, %rsi  # imm = 0xFFFF00000018001E
movq %rsi, 0x24(%rdx,%rcx)
imulq $0xc, %rax, %rsi
addq 0xa70ce(%rip), %rsi     # 0xc6fb8
pushq $0x3
popq %rdx
callq 0x56a36
leaq 0x62a4c(%rip), %rdi     # 0x82945
callq 0x2945b
xorl %edi, %edi
cmpl $0x8001, %eax           # imm = 0x8001
setge %dil
orl $0x74, %edi
movq (%r15,%r14,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
pushq $0x4
popq %r8
xorl %ecx, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x1ab2a
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekstat.c
// Function: genexplosion2
void
genexplosion2(int i)
{
     int       j;

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

     sectorflash(sprptr[i]->sectnum);
     checkblastarea(i);

     j=jsinsertsprite(sprptr[i]->sectnum, 5);
     if( j != -1 ) {
          fillsprite(j,sprptr[i]->x,sprptr[i]->y,sprptr[i]->z-(tilesizy[sprptr[i]->picnum]<<3),0,
                     -16,0,0,64,64,0,0,GENEXP2PIC,sprptr[i]->ang,
	                sintable[(sprptr[i]->ang+2560)&2047]>>6,sintable[(sprptr[i]->ang+2048)&2047]>>6,
	                30L,i+4096,sprptr[i]->sectnum, 5,32,0,-1);
          playsound(S_EXPLODE1+RMOD2("STAT4559"), sprptr[i]->x,sprptr[i]->y,0,ST_NOUPDATE);
     }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
callq 0x1cfc4
testl %eax, %eax
je 0x1ff49
leaq 0x62a0c(%rip), %rdi     # 0x8294e
xorl %eax, %eax
callq 0x2acb8
movslq %ebx, %r14
leaq 0x1072dd(%rip), %r15    # 0x127230
movq (%r15,%r14,8), %rax
movswl 0x18(%rax), %edi
callq 0x24e69
movl %ebx, %edi
callq 0x24c71
movq (%r15,%r14,8), %rax
movswl 0x18(%rax), %edi
pushq $0x5
popq %rsi
callq 0x1cf0c
cmpw $-0x1, %ax
je 0x20089
movswq %ax, %rax
imulq $0x2c, %rax, %rcx
leaq 0x403ba0(%rip), %rdx    # 0x423b30
leaq (%rdx,%rcx), %rdi
movq (%r15,%r14,8), %rsi
movl (%rsi), %r8d
movl %r8d, (%rdx,%rcx)
movl 0x4(%rsi), %r8d
movl %r8d, 0x4(%rdx,%rcx)
movl 0x8(%rsi), %r8d
movswq 0xe(%rsi), %r9
leaq 0x5886a8(%rip), %r10    # 0x5a8660
movswl (%r10,%r9,2), %r9d
shll $0x3, %r9d
subl %r9d, %r8d
movl %r8d, 0x8(%rdx,%rcx)
movl $0x3c50000, 0xc(%rdx,%rcx) # imm = 0x3C50000
movw $0xf0, 0x10(%rdx,%rcx)
movb $0x0, 0x12(%rdx,%rcx)
movl $0x4040, 0x14(%rdx,%rcx) # imm = 0x4040
movl 0x1c(%rsi), %r8d
movw %r8w, 0x1c(%rdx,%rcx)
addl $0x200, %r8d            # imm = 0x200
movl $0x7ff, %r9d            # imm = 0x7FF
andl %r9d, %r8d
leaq 0x555bca(%rip), %r10    # 0x575bd0
movswl (%r10,%r8,2), %r8d
shrl $0x6, %r8d
movw %r8w, 0x20(%rdx,%rcx)
movzwl 0x1c(%rsi), %esi
andl %r9d, %esi
movswl (%r10,%rsi,2), %esi
shrl $0x6, %esi
movw %si, 0x22(%rdx,%rcx)
addl $0x1000, %ebx           # imm = 0x1000
movw %bx, 0x1e(%rdx,%rcx)
movabsq $-0xffffffdfffe2, %rsi  # imm = 0xFFFF00000020001E
movq %rsi, 0x24(%rdx,%rcx)
imulq $0xc, %rax, %rsi
addq 0xa6f6a(%rip), %rsi     # 0xc6fb8
pushq $0x3
popq %rdx
callq 0x56a36
leaq 0x6290b(%rip), %rdi     # 0x82968
callq 0x2945b
xorl %edi, %edi
cmpl $0x8001, %eax           # imm = 0x8001
setge %dil
orl $0x72, %edi
movq (%r15,%r14,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
pushq $0x4
popq %r8
xorl %ecx, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x1ab2a
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekstat.c
// Function: enemywoundplayer
void
enemywoundplayer(short plrhit, short sprnum, char guntype)
{
     int       damage=0;

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

     if( !validplayer(plrhit) ) {
          return;
     }

     switch( guntype ) {
     case 0:
          damage=64;
          break;
     case 1:
     case 2:
     case 3:
     case 4:
     case 5:
          damage=128;
          break;
     case 6:
     default:
          damage=256;
          break;
     }
     switch( difficulty ) {
     case 0:
     case 1:
          damage>>=4;
          break;
     case 2:
          damage>>=3;
          break;
     case 3:
          damage>>=2;
          break;
     }

     changehealth(plrhit,-damage);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %edi, %ebx
movl %esi, %edi
callq 0x1cfc4
testl %eax, %eax
je 0x20529
leaq 0x62237(%rip), %rdi     # 0x82759
xorl %eax, %eax
callq 0x2acb8
movswl %bx, %ebx
movl %ebx, %edi
callq 0xe2e0
testl %eax, %eax
je 0x2056d
movw $0x100, %ax             # imm = 0x100
cmpb $0x5, %bpl
ja 0x20550
movzbl %bpl, %eax
leaq 0x61e84(%rip), %rcx     # 0x823d0
movzwl (%rcx,%rax,2), %eax
leaq 0x106acd(%rip), %rcx    # 0x127024
movl (%rcx), %ecx
cmpl $0x2, %ecx
jb 0x20574
je 0x2057c
cmpl $0x3, %ecx
jne 0x20582
movzwl %ax, %eax
shrl $0x2, %eax
jmp 0x20582
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movzwl %ax, %eax
shrl $0x4, %eax
jmp 0x20582
movzwl %ax, %eax
shrl $0x3, %eax
negl %eax
movswl %ax, %esi
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x99a8
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekstat.c
// Function: androidexplosion
void
androidexplosion(int i)
{
     int       j;

     j=jsinsertsprite(sprptr[i]->sectnum, 5);
     if( j != -1 ) {
          fillsprite(j,sprptr[i]->x,sprptr[i]->y,sprptr[i]->z,0,
                     -16,0,0,34,34,0,0,456,sprptr[i]->ang,
	                sintable[(sprptr[i]->ang+2560)&2047]>>6,sintable[(sprptr[i]->ang+2048)&2047]>>6,
	                30L,i+4096,sprptr[i]->sectnum, 5,32,0,-1);
     }
     playsound(S_ANDROID_DIE, sprptr[i]->x,sprptr[i]->y,0,ST_NOUPDATE);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movslq %edi, %rbx
leaq 0x106602(%rip), %r14    # 0x127230
movq (%r14,%rbx,8), %rax
movswl 0x18(%rax), %edi
pushq $0x5
popq %rsi
callq 0x1cf0c
cmpw $-0x1, %ax
je 0x20d05
movswq %ax, %rax
imulq $0x2c, %rax, %rcx
leaq 0x402ed9(%rip), %rdx    # 0x423b30
leaq (%rdx,%rcx), %rdi
movq (%r14,%rbx,8), %rsi
movl (%rsi), %r8d
movl %r8d, (%rdx,%rcx)
movl 0x4(%rsi), %r8d
movl %r8d, 0x4(%rdx,%rcx)
movl 0x8(%rsi), %r8d
movl %r8d, 0x8(%rdx,%rcx)
movl $0x1c80000, 0xc(%rdx,%rcx) # imm = 0x1C80000
movw $0xf0, 0x10(%rdx,%rcx)
movb $0x0, 0x12(%rdx,%rcx)
movl $0x2222, 0x14(%rdx,%rcx) # imm = 0x2222
movl 0x1c(%rsi), %r8d
movw %r8w, 0x1c(%rdx,%rcx)
addl $0x200, %r8d            # imm = 0x200
movl $0x7ff, %r9d            # imm = 0x7FF
andl %r9d, %r8d
leaq 0x554f1b(%rip), %r10    # 0x575bd0
movswl (%r10,%r8,2), %r8d
shrl $0x6, %r8d
movw %r8w, 0x20(%rdx,%rcx)
movzwl 0x1c(%rsi), %esi
andl %r9d, %esi
movswl (%r10,%rsi,2), %esi
shrl $0x6, %esi
movw %si, 0x22(%rdx,%rcx)
leal 0x1000(%rbx), %esi
movw %si, 0x1e(%rdx,%rcx)
movabsq $-0xffffffdfffe2, %rsi  # imm = 0xFFFF00000020001E
movq %rsi, 0x24(%rdx,%rcx)
imulq $0xc, %rax, %rsi
addq 0xa62bb(%rip), %rsi     # 0xc6fb8
pushq $0x3
popq %rdx
callq 0x56a36
movq (%r14,%rbx,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
pushq $0x4
popq %r8
movl $0x91, %edi
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1ab2a
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekstat.c
// Function: playerhit
int
playerhit(int hitsprite, int *pnum)
{
     int       j;

     for( j=connecthead ; j >= 0 ; j=connectpoint2[j] ) {
          if( playersprite[j] == hitsprite ) {
               if( sprptr[hitsprite]->statnum != 8 ) {
                    crashgame("plrhit: plrsprt lost sttnm 8");
               }
               *pnum=j;
               return(1);
          }
     }

     return(0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x77adfd(%rip), %r14    # 0x79bb30
leaq 0xbaa16(%rip), %rax     # 0xdb750
leaq 0x77adff(%rip), %rcx    # 0x79bb40
movslq (%r14), %r14
testq %r14, %r14
js 0x20d5b
movswl (%rax,%r14,2), %edx
cmpl %edi, %edx
je 0x20d5f
shlq $0x2, %r14
addq %rcx, %r14
jmp 0x20d41
xorl %eax, %eax
jmp 0x20d88
movslq %edi, %rax
leaq 0x1064c7(%rip), %rcx    # 0x127230
movq (%rcx,%rax,8), %rax
cmpw $0x8, 0x1a(%rax)
je 0x20d82
leaq 0x61b79(%rip), %rdi     # 0x828f4
xorl %eax, %eax
callq 0x2acb8
movl %r14d, (%rbx)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekstat.c
// Function: sectorflash
void
sectorflash(short s)
{
     if(  sectflash.step != 0 ) {
          return;
     }
     sectflash.sectnum=s;
     sectflash.step=1;
     sectflash.ovis=sectptr[s]->visibility;
}

// Assembly:
cmpl $0x0, 0x2075bc(%rip)    # 0x22c42c
je 0x24e73
retq
movw %di, 0x2075ae(%rip)     # 0x22c428
movl $0x1, 0x2075a8(%rip)    # 0x22c42c
movswq %di, %rax
leaq 0x1ca3a1(%rip), %rcx    # 0x1ef230
movq (%rcx,%rax,8), %rax
movb 0x20(%rax), %al
movb %al, 0x207594(%rip)     # 0x22c430
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekstat.c
// Function: bombexplosion
void
bombexplosion(int i)
{
     int       j;

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

     j=jsinsertsprite(sprptr[i]->sectnum, 5);
     if( j != -1 ) {
          fillsprite(j,sprptr[i]->x,sprptr[i]->y,sprptr[i]->z,0,
                     -16,0,0,34,34,0,0,BOMBEXP1PIC,sprptr[i]->ang,
	                sintable[(sprptr[i]->ang+2560)&2047]>>6,sintable[(sprptr[i]->ang+2048)&2047]>>6,
	                30L,i+4096,sprptr[i]->sectnum, 5,32,0,-1);
          playsound(S_RIC2, sprptr[i]->x,sprptr[i]->y,0,ST_NOUPDATE);
     }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
callq 0x1cfc4
testl %eax, %eax
je 0x24ebb
leaq 0x5dabd(%rip), %rdi     # 0x82971
xorl %eax, %eax
callq 0x2acb8
movslq %ebx, %r14
leaq 0x10236b(%rip), %r15    # 0x127230
movq (%r15,%r14,8), %rax
movswl 0x18(%rax), %edi
pushq $0x5
popq %rsi
callq 0x1cf0c
cmpw $-0x1, %ax
je 0x24fb8
movswq %ax, %rax
imulq $0x2c, %rax, %rcx
leaq 0x3fec42(%rip), %rdx    # 0x423b30
leaq (%rdx,%rcx), %rdi
movq (%r15,%r14,8), %rsi
movl (%rsi), %r8d
movl %r8d, (%rdx,%rcx)
movl 0x4(%rsi), %r8d
movl %r8d, 0x4(%rdx,%rcx)
movl 0x8(%rsi), %r8d
movl %r8d, 0x8(%rdx,%rcx)
movl $0x1cc0000, 0xc(%rdx,%rcx) # imm = 0x1CC0000
movw $0xf0, 0x10(%rdx,%rcx)
movb $0x0, 0x12(%rdx,%rcx)
movl $0x2222, 0x14(%rdx,%rcx) # imm = 0x2222
movl 0x1c(%rsi), %r8d
movw %r8w, 0x1c(%rdx,%rcx)
addl $0x200, %r8d            # imm = 0x200
movl $0x7ff, %r9d            # imm = 0x7FF
andl %r9d, %r8d
leaq 0x550c84(%rip), %r10    # 0x575bd0
movswl (%r10,%r8,2), %r8d
shrl $0x6, %r8d
movw %r8w, 0x20(%rdx,%rcx)
movzwl 0x1c(%rsi), %esi
andl %r9d, %esi
movswl (%r10,%rsi,2), %esi
shrl $0x6, %esi
movw %si, 0x22(%rdx,%rcx)
addl $0x1000, %ebx           # imm = 0x1000
movw %bx, 0x1e(%rdx,%rcx)
movabsq $-0xffffffdfffe2, %rsi  # imm = 0xFFFF00000020001E
movq %rsi, 0x24(%rdx,%rcx)
imulq $0xc, %rax, %rsi
addq 0xa2024(%rip), %rsi     # 0xc6fb8
pushq $0x3
popq %rdx
callq 0x56a36
movq (%r15,%r14,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
pushq $0x56
popq %rdi
pushq $0x4
popq %r8
xorl %ecx, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x1ab2a
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekstat.c
// Function: blastmark
void
blastmark(int i)
{
     int       j;

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

     switch( sprptr[i]->statnum ) {
     case GENEXPLODE2:
          break;
     default:
          return;
     }
     switch( sprptr[i]->picnum ) {
     case BARRELL:
     case 175:
          break;
     default:
          return;
     }

     j=jsinsertsprite(sprptr[i]->sectnum, 100);
     if( j != -1 ) {
          fillsprite(j,sprptr[i]->x,sprptr[i]->y,sectptr[sprptr[i]->sectnum]->floorz,0x00A2,
                     4,0,0,34,34,0,0,465,sprptr[i]->ang,0,0,
                 30L,i+4096,sprptr[i]->sectnum,100,0,0,-1);
     }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
callq 0x1cfc4
testl %eax, %eax
je 0x24fdc
leaq 0x5d9b6(%rip), %rdi     # 0x8298b
xorl %eax, %eax
callq 0x2acb8
movslq %ebx, %r14
leaq 0x10224a(%rip), %r15    # 0x127230
movq (%r15,%r14,8), %rax
cmpw $0x321, 0x1a(%rax)      # imm = 0x321
jne 0x250c3
movzwl 0xe(%rax), %ecx
cmpl $0x383, %ecx            # imm = 0x383
je 0x2500e
cmpl $0xaf, %ecx
jne 0x250c3
movswl 0x18(%rax), %edi
pushq $0x64
popq %rsi
callq 0x1cf0c
cmpw $-0x1, %ax
je 0x250c3
movswq %ax, %rax
imulq $0x2c, %rax, %rcx
leaq 0x3feafd(%rip), %rdx    # 0x423b30
leaq (%rdx,%rcx), %rdi
movq (%r15,%r14,8), %rsi
movl (%rsi), %r8d
movl %r8d, (%rdx,%rcx)
movl 0x4(%rsi), %r8d
movl %r8d, 0x4(%rdx,%rcx)
movswq 0x18(%rsi), %r8
leaq 0x1ca1d9(%rip), %r9     # 0x1ef230
movq (%r9,%r8,8), %r8
movl 0x8(%r8), %r8d
movl %r8d, 0x8(%rdx,%rcx)
movl $0x1d100a2, 0xc(%rdx,%rcx) # imm = 0x1D100A2
movw $0x4, 0x10(%rdx,%rcx)
movb $0x0, 0x12(%rdx,%rcx)
movl $0x2222, 0x14(%rdx,%rcx) # imm = 0x2222
movzwl 0x1c(%rsi), %esi
movw %si, 0x1c(%rdx,%rcx)
addl $0x1000, %ebx           # imm = 0x1000
movw %bx, 0x1e(%rdx,%rcx)
movabsq $0x1e00000000, %rsi     # imm = 0x1E00000000
movq %rsi, 0x20(%rdx,%rcx)
movl $0xffff0000, 0x28(%rdx,%rcx) # imm = 0xFFFF0000
imulq $0xc, %rax, %rsi
addq 0xa1f02(%rip), %rsi     # 0xc6fb8
pushq $0x3
popq %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x56a36
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tekstat.c
// Function: dosectorflash
void
dosectorflash()
{
     switch( sectflash.step ) {
     case 0:
          break;
     case 1:
          sectptr[sectflash.sectnum]->visibility=0;
          sectflash.step=2;
          break;
     case 2:
          sectptr[sectflash.sectnum]->visibility=128;
          sectflash.step=3;
          break;
     case 3:
          sectptr[sectflash.sectnum]->visibility=0;
          sectflash.step=4;
          break;
     case 4:
          sectptr[sectflash.sectnum]->visibility=sectflash.ovis;
          sectflash.sectnum=0;
          sectflash.ovis=0;
          sectflash.step=0;
     }
}

// Assembly:
movl 0x20716a(%rip), %eax    # 0x22c42c
decl %eax
cmpl $0x3, %eax
ja 0x25362
leaq 0x5d0ec(%rip), %rcx     # 0x823c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movswq 0x207143(%rip), %rax    # 0x22c428
leaq 0x1c9f44(%rip), %rcx    # 0x1ef230
movq (%rcx,%rax,8), %rax
movb $0x0, 0x20(%rax)
pushq $0x2
jmp 0x2535b
movswq 0x207128(%rip), %rax    # 0x22c428
leaq 0x1c9f29(%rip), %rcx    # 0x1ef230
movq (%rcx,%rax,8), %rax
movb $0x0, 0x20(%rax)
pushq $0x4
jmp 0x2535b
movb 0x207117(%rip), %al     # 0x22c430
movswq 0x207107(%rip), %rcx    # 0x22c428
leaq 0x1c9f08(%rip), %rdx    # 0x1ef230
movq (%rdx,%rcx,8), %rcx
movb %al, 0x20(%rcx)
andw $0x0, 0x2070f1(%rip)    # 0x22c428
movb $0x0, 0x2070f2(%rip)    # 0x22c430
xorl %eax, %eax
jmp 0x2535c
movswq 0x2070de(%rip), %rax    # 0x22c428
leaq 0x1c9edf(%rip), %rcx    # 0x1ef230
movq (%rcx,%rax,8), %rax
movb $-0x80, 0x20(%rax)
pushq $0x3
popq %rax
movl %eax, 0x2070ca(%rip)    # 0x22c42c
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tektag.c
// Function: tekoperatesector
void
tekoperatesector(short dasector)
{
     short          s;
     int            datag,i;

     s=dasector;
     datag=sectptr[s]->lotag;

     switch (datag) {
     case BOXELEVTAG:
     case PLATFORMELEVTAG:
     case BOXDELAYTAG:
     case PLATFORMDELAYTAG:
     case DOORUPTAG:          // a door that opens up
     case DOORDOWNTAG:
     case DOORSPLITHOR:
     case DOORSPLITVER:
     case PLATFORMDROPTAG:
          i=doorxref[s];
          if (i == -1) {
               crashgame("operatesector: invalid door reference for sector %d",s);
          }
          switch (doorptr[i]->state) {
          case D_NOTHING:
          case D_CLOSING:
          case D_CLOSEDOOR:
          case D_SHUTSOUND:
               doorptr[i]->state=D_OPENDOOR;
               break;
          default:
               if (datag != PLATFORMDROPTAG) {
                    doorptr[i]->state=D_CLOSEDOOR;
               }
               break;
          }
          break;
     case DOORFLOORTAG:
          floordoorptr[fdxref[s]]->state=DOOROPENING;
          playsound(S_FLOOROPEN,0,0,0,ST_IMMEDIATE);
          break;
     }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movslq %edi, %rax
leaq 0x1c99c2(%rip), %rcx    # 0x1ef230
movq (%rcx,%rax,8), %rcx
movzwl 0x22(%rcx), %ebx
movzwl %bx, %ecx
leal -0x3e8(%rcx), %edx
cmpl $0x7, %edx
ja 0x258c8
movl $0xb9, %esi
btl %edx, %esi
jb 0x258d0
cmpl $0x6, %edx
jne 0x258c8
leaq 0x2e60d6(%rip), %rcx    # 0x30b970
movslq (%rcx,%rax,4), %rax
leaq 0x2ea38b(%rip), %rcx    # 0x30fc30
movq (%rcx,%rax,8), %rax
movl $0x1, (%rax)
pushq $0x3f
popq %rdi
pushq $0x1
popq %r8
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1ab2a
addl $-0x6, %ecx
cmpl $0x4, %ecx
jae 0x25914
leaq 0x2fab49(%rip), %rcx    # 0x320420
movslq (%rcx,%rax,4), %r14
cmpq $-0x1, %r14
jne 0x258f2
movswl %di, %esi
leaq 0x5d239(%rip), %rdi     # 0x82b24
xorl %eax, %eax
callq 0x2acb8
leaq 0x2e5a27(%rip), %rax    # 0x30b320
movq (%rax,%r14,8), %rax
movl 0x4(%rax), %ecx
cmpl $0x6, %ecx
ja 0x2591c
pushq $0x55
popq %rdx
btl %ecx, %edx
jae 0x2591c
movl $0x1, 0x4(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpw $0x3ef, %bx             # imm = 0x3EF
je 0x25914
movl $0x2, 0x4(%rax)
jmp 0x25914
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tektag.c
// Function: warpsprite
void
warpsprite(short spritenum)
{
     short dasectnum;

     dasectnum = sprite[spritenum].sectnum;
     warp(&sprite[spritenum].x,&sprite[spritenum].y,&sprite[spritenum].z,
          &sprite[spritenum].ang,&dasectnum);
     copybuf(&sprite[spritenum].x,&osprite[spritenum].x,3);
     changespritesect(spritenum,dasectnum);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movslq %edi, %rbx
imulq $0x2c, %rbx, %rax
leaq 0x3fd28f(%rip), %rcx    # 0x423b30
leaq (%rcx,%rax), %r14
leaq (%rcx,%rax), %rsi
addq $0x4, %rsi
movzwl 0x14(%rsi), %edx
leaq 0xe(%rsp), %r15
movw %dx, (%r15)
leaq (%rcx,%rax), %rdx
addq $0x8, %rdx
movq %r14, %rdi
movq %r15, %r8
callq 0x28111
imulq $0xc, %rbx, %rsi
addq 0xa06e0(%rip), %rsi     # 0xc6fb8
pushq $0x3
popq %rdx
movq %r14, %rdi
callq 0x56a36
movswl (%r15), %esi
movl %ebx, %edi
callq 0x43fe1
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tektag.c
// Function: testneighborsectors
int
testneighborsectors(short sect1, short sect2)
{
     short i, startwall, num1, num2;

     num1 = sector[sect1].wallnum;
     num2 = sector[sect2].wallnum;

     // traverse walls of sector with fewest walls (for speed)
     if( num1 < num2 ) {
          startwall = sector[sect1].wallptr;
          for(i=num1-1;i>=0;i--)
               if (wall[i+startwall].nextsector == sect2)
                    return(1);
     }
     else {
          startwall = sector[sect2].wallptr;
          for(i=num2-1;i>=0;i--)
               if (wall[i+startwall].nextsector == sect1)
                    return(1);
     }
     return(0);
}

// Assembly:
movslq %edi, %rax
imulq $0x28, %rax, %r8
leaq 0x3c3fda(%rip), %rax    # 0x3ea8e0
movzwl 0x2(%rax,%r8), %ecx
movslq %esi, %rdx
imulq $0x28, %rdx, %r9
movzwl 0x2(%rax,%r9), %edx
cmpw %dx, %cx
jge 0x26955
addq %r8, %rax
movswq (%rax), %rdx
decq %rcx
leaq 0x338fa1(%rip), %rdi    # 0x35f8d0
pushq $0x1
popq %rax
testw %cx, %cx
js 0x2698b
movl %ecx, %r8d
andl $0x7fff, %r8d           # imm = 0x7FFF
addq %rdx, %r8
shlq $0x5, %r8
decq %rcx
cmpw %si, 0xc(%rdi,%r8)
jne 0x26932
jmp 0x2698a
addq %r9, %rax
movswq (%rax), %rcx
decq %rdx
leaq 0x338f6a(%rip), %rsi    # 0x35f8d0
pushq $0x1
popq %rax
testw %dx, %dx
js 0x2698b
movl %edx, %r8d
andl $0x7fff, %r8d           # imm = 0x7FFF
addq %rcx, %r8
shlq $0x5, %r8
decq %rdx
cmpw %di, 0xc(%rsi,%r8)
jne 0x26969
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tektag.c
// Function: warp
void
warp(int *x, int *y, int *z, short *daang, short *dasector)
{
     short          startwall, endwall, s;
     int           i, j, dax, day;

     (void)daang;

     for( i=0; i<warpsectorcnt; i++ ) {
          if( warpsectorlist[i] == *dasector ) {
               j = sector[*dasector].hitag;
               do {
                    i++;
                    if (i >= warpsectorcnt) i = 0;
               } while( sector[warpsectorlist[i]].hitag != j );
               *dasector = warpsectorlist[i];
               break;
          }
     }

     // find center of sector
     startwall = sector[*dasector].wallptr;
     endwall = startwall+sector[*dasector].wallnum-1;
     dax = 0L, day = 0L;
     for( s=startwall; s<=endwall; s++ ) {
          dax += wall[s].x, day += wall[s].y;
          if( wall[s].nextsector >= 0 ) {
               i = s;
          }
     }
     *x = dax / (endwall-startwall+1);
     *y = day / (endwall-startwall+1);
     *z = sector[*dasector].floorz-(42<<8);

     updatesector(*x,*y,dasector);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rcx
leaq 0xfbb7f(%rip), %rax     # 0x123ca0
movswl (%rax), %eax
xorl %edx, %edx
testl %eax, %eax
movl $0x0, %r10d
cmovgl %eax, %r10d
leaq 0xfbae7(%rip), %r9      # 0x123c20
cmpq %rdx, %r10
je 0x2814e
movswq (%r9,%rdx,2), %r11
cmpw (%r8), %r11w
je 0x28154
incq %rdx
jmp 0x28139
movswq (%r8), %r14
jmp 0x2818a
imulq $0x28, %r11, %r11
leaq 0x3c2781(%rip), %r10    # 0x3ea8e0
movzwl 0x24(%r10,%r11), %r11d
xorl %ebx, %ebx
incl %edx
cmpl %eax, %edx
cmovgel %ebx, %edx
movslq %edx, %r14
movzwl (%r9,%r14,2), %ebp
movswq %bp, %r14
imulq $0x28, %r14, %r15
cmpw %r11w, 0x24(%r10,%r15)
jne 0x28167
movw %bp, (%r8)
imulq $0x28, %r14, %rax
leaq 0x3c274b(%rip), %r10    # 0x3ea8e0
movzwl (%r10,%rax), %r11d
movswl %r11w, %edx
movzwl 0x2(%r10,%rax), %ebx
addw %dx, %bx
decl %ebx
xorl %eax, %eax
leaq 0x33771e(%rip), %r14    # 0x35f8d0
xorl %r9d, %r9d
cmpw %bx, %r11w
jg 0x281d1
movswq %r11w, %r15
shlq $0x5, %r15
addl (%r14,%r15), %eax
addl 0x4(%r14,%r15), %r9d
incl %r11d
jmp 0x281b5
movswl %bx, %r11d
subl %edx, %r11d
incl %r11d
cltd
idivl %r11d
movl %eax, (%rdi)
movl %r9d, %eax
cltd
idivl %r11d
movl %eax, (%rsi)
movswq (%r8), %rax
imulq $0x28, %rax, %rax
movl $0xffffd600, %edx       # imm = 0xFFFFD600
addl 0x8(%r10,%rax), %edx
movl %edx, (%rcx)
movl (%rdi), %edi
movl (%rsi), %esi
movq %r8, %rdx
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x34363
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tektag.c
// Function: krand_intercept
int
krand_intercept(char *stg)
{
     if (dbgflag) {
          if (dbgcolumn > 80) {
               fprintf(dbgfp,"\n");
               dbgcolumn=0;
          }
          else {
               fprintf(dbgfp,"%s(%-9d) ",stg,randomseed);
               dbgcolumn+=20;
          }
     }
     return(krand());
}

// Assembly:
leaq 0xb1182(%rip), %rax     # 0xda5e4
cmpl $0x0, (%rax)
je 0x48404
pushq %rbx
leaq 0xb1005(%rip), %rbx     # 0xda478
cmpl $0x51, (%rbx)
leaq 0xb1003(%rip), %rax     # 0xda480
movq (%rax), %rax
jl 0x29491
pushq $0xa
popq %rdi
movq %rax, %rsi
callq 0x8cb0
xorl %eax, %eax
jmp 0x294b3
movq %rdi, %rdx
leaq 0x5b3f6d(%rip), %rcx    # 0x5dd408
movl (%rcx), %ecx
leaq 0x59742(%rip), %rsi     # 0x82be6
movq %rax, %rdi
xorl %eax, %eax
callq 0x8290
movl (%rbx), %eax
addl $0x14, %eax
movl %eax, (%rbx)
popq %rbx
jmp 0x48404
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tektag.c
// Function: tekdoanimpic
void
tekdoanimpic(void)
{
     short pic;
     int  i,n;

     n=numanimates;
     for (i=0 ; i < n ; i++) {
          if (lockclock < animpicptr[i]->nextclock) {
               continue;
          }
          if (animpicptr[i]->frames > 0) {
               if (--animpicptr[i]->frames > 0) {
                    pic=*animpicptr[i]->pic;
                    pic++;
                    *animpicptr[i]->pic=pic;
                    animpicptr[i]->nextclock=lockclock+animpicptr[i]->tics;
               }
          }
          else if (animpicptr[i]->frames < 0) {
               if (++animpicptr[i]->frames < 0) {
                    pic=*animpicptr[i]->pic;
                    pic--;
                    *animpicptr[i]->pic=pic;
                    animpicptr[i]->nextclock=lockclock+animpicptr[i]->tics;
               }
          }
          else {
               numanimates--;
               if (numanimates > 0) {
                    memmove(animpicptr[i],animpicptr[numanimates],
                         sizeof(struct animpic));
                    memset(animpicptr[numanimates],0,sizeof(struct animpic));
               }
          }
     }
}

// Assembly:
movl 0x2fa37b(%rip), %eax    # 0x324424
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
shlq $0x3, %rax
leaq 0xb03cd(%rip), %rdx     # 0xda488
leaq 0x2fa66e(%rip), %rsi    # 0x324730
xorps %xmm0, %xmm0
cmpq %rcx, %rax
je 0x2a16f
movl (%rdx), %r8d
movq (%rcx,%rsi), %rdi
cmpl 0x14(%rdi), %r8d
jl 0x2a159
movzwl (%rdi), %r8d
testw %r8w, %r8w
jle 0x2a111
leal -0x1(%r8), %r9d
movw %r9w, (%rdi)
cmpw $0x1, %r8w
je 0x2a159
movq (%rcx,%rsi), %rdi
movq 0x8(%rdi), %rdi
incw (%rdi)
movq (%rcx,%rsi), %rdi
movswl 0x10(%rdi), %r8d
addl (%rdx), %r8d
movl %r8d, 0x14(%rdi)
jmp 0x2a159
js 0x2a14f
movl 0x2fa30a(%rip), %r9d    # 0x324424
leal -0x1(%r9), %r8d
movl %r8d, 0x2fa2ff(%rip)    # 0x324424
cmpl $0x2, %r9d
jl 0x2a159
movl %r8d, %r8d
movq (%rsi,%r8,8), %r9
movups (%r9), %xmm1
movq 0x10(%r9), %r9
movq %r9, 0x10(%rdi)
movups %xmm1, (%rdi)
movq (%rsi,%r8,8), %rdi
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
jmp 0x2a159
incw %r8w
movw %r8w, (%rdi)
jne 0x2a162
addq $0x8, %rcx
jmp 0x2a0c5
movq (%rcx,%rsi), %rdi
movq 0x8(%rdi), %rdi
decw (%rdi)
jmp 0x2a0ff
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tektag.c
// Function: tekdodelayfuncs
void
tekdodelayfuncs(void)
{
     int  i,n,p;

     n=numdelayfuncs;
     for (i=0 ; i < n ; i++) {
          if (delayfuncptr[i]->func == NULL) {
               continue;
          }
          delayfuncptr[i]->tics-=TICSPERFRAME;
          if (delayfuncptr[i]->tics <= 0) {
               p=delayfuncptr[i]->parm;
               (*delayfuncptr[i]->func)(p);
               memmove(delayfuncptr[i],delayfuncptr[numdelayfuncs-1],
                    sizeof(struct delayfunc));
                    memset(delayfuncptr[numdelayfuncs-1],0,
                    sizeof(struct delayfunc));
               numdelayfuncs--;
          }
     }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movzwl 0x2fa6b4(%rip), %eax    # 0x324830
xorl %ebx, %ebx
testw %ax, %ax
cmovlel %ebx, %eax
movzwl %ax, %r14d
shll $0x3, %r14d
leaq 0x2fa8ad(%rip), %r15    # 0x324a40
cmpq %rbx, %r14
je 0x2a1e8
movq (%rbx,%r15), %rax
cmpq $0x0, (%rax)
je 0x2a1e2
addl $-0x3, 0x8(%rax)
movq (%rbx,%r15), %rax
cmpl $0x0, 0x8(%rax)
jg 0x2a1e2
movswl 0xc(%rax), %edi
callq *(%rax)
movq (%rbx,%r15), %rax
movswq 0x2fa66e(%rip), %rcx    # 0x324830
movq -0x8(%r15,%rcx,8), %rdx
movups (%rdx), %xmm0
movups %xmm0, (%rax)
movq -0x8(%r15,%rcx,8), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leal -0x1(%rcx), %eax
movw %ax, 0x2fa64e(%rip)     # 0x324830
addq $0x8, %rbx
jmp 0x2a193
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tektag.c
// Function: showsect2d
void
showsect2d(int s,int z)
{
     int  endwall,i,startwall;

     startwall=sectptr[s]->wallptr;
     endwall=startwall+sectptr[s]->wallnum-1;
     for (i=startwall ; i <= endwall ; i++) {
          if (wallptr[i]->nextwall != -1) {
               if (sectptr[wallptr[i]->nextsector]->floorz == z) {
                    showwall2d(i,0);
                    showwall2d(wallptr[i]->nextwall,0);
               }
               else {
                    showwall2d(i,1);
                    showwall2d(wallptr[i]->nextwall,1);
               }
          }
     }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movslq %edi, %rax
leaq 0x1c4fc8(%rip), %r15    # 0x1ef230
movq (%r15,%rax,8), %rax
movswq (%rax), %r14
movswq 0x2(%rax), %r12
addq %r14, %r12
leaq 0x1ccfb1(%rip), %r13    # 0x1f7230
cmpq %r12, %r14
jge 0x2a2c1
movq (%r13,%r14,8), %rax
cmpw $-0x1, 0xa(%rax)
je 0x2a2bc
movswq 0xc(%rax), %rax
movq (%r15,%rax,8), %rax
xorl %ebp, %ebp
cmpl %ebx, 0x8(%rax)
setne %bpl
movl %r14d, %edi
movl %ebp, %esi
callq 0x2a218
movq (%r13,%r14,8), %rax
movswl 0xa(%rax), %edi
movl %ebp, %esi
callq 0x2a218
incq %r14
jmp 0x2a27f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tektag.c
// Function: showsect2dtoggle
void
showsect2dtoggle(int s,int onoff)
{
     int  endwall,i,startwall;

     startwall=sectptr[s]->wallptr;
     endwall=startwall+sectptr[s]->wallnum-1;
     for (i=startwall ; i <= endwall ; i++) {
          if (wallptr[i]->nextwall != -1) {
               showwall2d(i,onoff);
               showwall2d(wallptr[i]->nextwall,onoff);
          }
     }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movslq %edi, %rax
leaq 0x1c4f4c(%rip), %rcx    # 0x1ef230
movq (%rcx,%rax,8), %rax
movswq (%rax), %r14
movswq 0x2(%rax), %r15
addq %r14, %r15
leaq 0x1ccf35(%rip), %r12    # 0x1f7230
cmpq %r15, %r14
jge 0x2a329
movq (%r12,%r14,8), %rax
cmpw $-0x1, 0xa(%rax)
je 0x2a324
movl %r14d, %edi
movl %ebx, %esi
callq 0x2a218
movq (%r12,%r14,8), %rax
movswl 0xa(%rax), %edi
movl %ebx, %esi
callq 0x2a218
incq %r14
jmp 0x2a2fb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tektag.c
// Function: sectorblocked
int
sectorblocked(int   s)
{
     int       i,rv;

     rv=0;

     for( i=connecthead ; i >= 0 ; i=connectpoint2[i] ) {
          if( cursectnum[i] == s )
               rv=1;
          if( testneighborsectors(cursectnum[i], s) == 1 )
               rv=1;
     }
     if( headspritesect[s] != -1 )
          rv=1;

     return(rv);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
xorl %r15d, %r15d
leaq 0x7717e4(%rip), %r12    # 0x79bb30
pushq $0x1
popq %rbp
movswl %bx, %r14d
leaq 0x7717e6(%rip), %r13    # 0x79bb40
movslq (%r12), %r12
testq %r12, %r12
js 0x2a38c
leaq 0xb13b6(%rip), %rax     # 0xdb720
movswl (%rax,%r12,2), %edi
cmpl %ebx, %edi
cmovel %ebp, %r15d
movl %r14d, %esi
callq 0x268f8
testl %eax, %eax
cmovnel %ebp, %r15d
shlq $0x2, %r12
addq %r13, %r12
jmp 0x2a35a
movslq %ebx, %rax
leaq 0x528ffa(%rip), %rcx    # 0x553390
cmpw $-0x1, (%rcx,%rax,2)
cmovel %r15d, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tektag.c
// Function: vehiclesoundstopped
void
vehiclesoundstopped(int sindex)
{
     int i;

     for( i=0; i < MAXSECTORVEHICLES; i++ ) {
          if (sectvehptr[i]->soundindex == sindex)
               sectvehptr[i]->soundindex = -1;
     }
}

// Assembly:
xorl %eax, %eax
leaq 0x2edfe6(%rip), %rcx    # 0x3183c0
cmpq $0x50, %rax
je 0x2a3f9
movq (%rax,%rcx), %rdx
cmpl %edi, 0xa10(%rdx)
jne 0x2a3f3
orl $-0x1, 0xa10(%rdx)
addq $0x8, %rax
jmp 0x2a3da
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tektag.c
// Function: teksetdelayfunc
void                          // kick off function after specified tics elapse
teksetdelayfunc(void (*delayfunc)(short),int tics,short parm)
{
     int  i,n;

     if (delayfunc == NULL) {
       return;
     }
     n=numdelayfuncs;
     for (i=0 ; i < n ; i++) {
       if (delayfuncptr[i]->func == delayfunc) {
            if (tics == 0) {
              memmove(delayfuncptr[i],delayfuncptr[numdelayfuncs-1],
                sizeof(struct delayfunc));
              memset(delayfuncptr[numdelayfuncs-1],0,
                sizeof(struct delayfunc));
              numdelayfuncs--;
              return;
            }
            else {
              delayfuncptr[i]->tics=tics;
              delayfuncptr[i]->parm=parm;
              return;
            }
       }
     }
     delayfuncptr[numdelayfuncs]->func=delayfunc;
     delayfuncptr[numdelayfuncs]->tics=tics;
     delayfuncptr[numdelayfuncs]->parm=parm;
     numdelayfuncs++;
}

// Assembly:
testq %rdi, %rdi
je 0x2a441
movswq 0x2fa429(%rip), %rax    # 0x324830
xorl %r8d, %r8d
testw %ax, %ax
movl $0x0, %ecx
cmovgl %eax, %ecx
movslq %ecx, %r9
leaq 0x2fa621(%rip), %rcx    # 0x324a40
cmpq %r8, %r9
je 0x2a442
movq (%rcx,%r8,8), %r10
incq %r8
cmpq %rdi, (%r10)
jne 0x2a41f
testl %esi, %esi
je 0x2a462
movl %esi, 0x8(%r10)
movq -0x8(%rcx,%r8,8), %rax
movw %dx, 0xc(%rax)
retq
movq (%rcx,%rax,8), %r8
movq %rdi, (%r8)
movq (%rcx,%rax,8), %rdi
movl %esi, 0x8(%rdi)
movq (%rcx,%rax,8), %rcx
movw %dx, 0xc(%rcx)
incl %eax
movw %ax, 0x2fa3cf(%rip)     # 0x324830
retq
movq -0x8(%rcx,%rax,8), %rdx
movups (%rdx), %xmm0
movups %xmm0, (%r10)
movq -0x8(%rcx,%rax,8), %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
decl %eax
movw %ax, 0x2fa3ae(%rip)     # 0x324830
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tektag.c
// Function: setanimpic
void
setanimpic(short *pic,short tics,short frames)
{
     int  i;

     for (i=0 ; i < numanimates ; i++) {
          if (animpicptr[i]->pic == pic) {
               return;
          }
     }
     if (numanimates+1 < MAXANIMPICS) {
          animpicptr[numanimates]->pic=pic;
          animpicptr[numanimates]->tics=tics;
          animpicptr[numanimates]->frames=frames;
          animpicptr[numanimates]->nextclock=lockclock+tics;
          numanimates++;
     }
}

// Assembly:
movslq 0x2f9f9a(%rip), %rax    # 0x324424
xorl %r8d, %r8d
testl %eax, %eax
movl $0x0, %r9d
cmovgl %eax, %r9d
shlq $0x3, %r9
leaq 0x2fa28c(%rip), %rcx    # 0x324730
cmpq %r8, %r9
je 0x2a4b8
movq (%r8,%rcx), %r10
addq $0x8, %r8
cmpq %rdi, 0x8(%r10)
jne 0x2a4a4
retq
cmpl $0x1e, %eax
jg 0x2a4b7
movq (%rcx,%rax,8), %r8
movq %rdi, 0x8(%r8)
movq (%rcx,%rax,8), %rdi
movw %si, 0x10(%rdi)
movq (%rcx,%rax,8), %rax
movw %dx, (%rax)
leaq 0xaffad(%rip), %rax     # 0xda488
movswl %si, %edx
addl (%rax), %edx
movslq 0x2f9f3d(%rip), %rax    # 0x324424
movq (%rcx,%rax,8), %rcx
movl %edx, 0x14(%rcx)
incl %eax
movl %eax, 0x2f9f2e(%rip)    # 0x324424
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tektag.c
// Function: tekheadbob
void
tekheadbob(void)
{
     if( headbobon && (activemenu == 0) ) {
          headbob+=bobstep;
          if( headbob < -BOBBMAX || headbob > BOBBMAX ) {
               bobstep=-bobstep;
          }
     }
}

// Assembly:
cmpl $0x0, 0x9decb(%rip)     # 0xc88e0
je 0x2aa50
leaq 0xfaad6(%rip), %rax     # 0x1254f4
cmpl $0x0, (%rax)
jne 0x2aa50
movl 0x9debb(%rip), %eax     # 0xc88e4
movl 0x2fa131(%rip), %ecx    # 0x324b60
leal (%rcx,%rax), %edx
movl %edx, 0x2fa128(%rip)    # 0x324b60
addl %eax, %ecx
addl $0xfffffdff, %ecx       # imm = 0xFFFFFDFF
cmpl $0xfffffbfe, %ecx       # imm = 0xFFFFFBFE
ja 0x2aa50
negl %eax
movl %eax, 0x9de94(%rip)     # 0xc88e4
retq
// File: /workspace/github_c_makefile_star2_O2/jonof[P]jftekwar/src/tektxt.c
// Function: crashgame
void
crashgame(char *s,...)
{
     va_list argptr;

     musicoff();
     sendlogoff();
     uninitmultiplayers();
     uninitsb();
     cduninit();
     uninittimer();
     uninitinput();
     uninitengine();
     uninitgroupfile();
     teksavesetup();

     va_start(argptr,s);
     vprintf(s,argptr);
     va_end(argptr);
     printf("\n");
     exit(0);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %rsi, 0x8(%r14)
movq %rdx, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
testb %al, %al
je 0x2ad19
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)
callq 0x1ab1c
callq 0x53db0
callq 0x53db1
callq 0x1aa8f
callq 0x99a7
callq 0x74d8e
callq 0x74d5c
callq 0x339df
callq 0x3024b
callq 0x19ec7
movq %rsp, %rsi
movq %r14, 0x10(%rsi)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsi)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsi)
movq %rbx, %rdi
callq 0x89d0
pushq $0xa
popq %rdi
callq 0x90a0
xorl %edi, %edi
callq 0x8950
nop