LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x10ca00(%rip), %r15    # 0x12e210
movq (%r15,%rbx,8), %rax
movzwl 0x2a(%rax), %r14d
movl %ebx, %edi
callq 0x1ea05
testl %eax, %eax
je 0x21832
leaq 0x6bdcb(%rip), %rdi     # 0x8d5f6
xorl %eax, %eax
callq 0x2d800
cmpl $0x3fff, %r14d          # imm = 0x3FFF
ja 0x218e9
leaq 0x1b49ca(%rip), %rax    # 0x1d6210
movq (%rax,%r14,8), %rax
testb $0x4, 0x7(%rax)
jne 0x218e9
movzwl 0xa(%rax), %eax
cmpl $0x6d7, %eax            # imm = 0x6D7
je 0x218f4
cmpl $0x75f, %eax            # imm = 0x75F
je 0x218b8
cmpl $0x72a, %eax            # imm = 0x72A
jne 0x218e9
leaq 0x6bd98(%rip), %r14     # 0x8d610
movq %r14, %rdi
callq 0x2be4a
xorl %ebp, %ebp
cmpl $0x8001, %eax           # imm = 0x8001
setge %bpl
movq %r14, %rdi
callq 0x2be4a
orl $0xc2, %ebp
btl $0x1, %eax
adcl $0x0, %ebp
movq (%r15,%rbx,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
movl %ebp, %edi
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0x1c1f1
leaq 0x6bd5a(%rip), %r14     # 0x8d619
movq %r14, %rdi
callq 0x2be4a
xorl %ebp, %ebp
cmpl $0x8001, %eax           # imm = 0x8001
setge %bpl
movq %r14, %rdi
callq 0x2be4a
btl $0x1, %eax
adcl $0x0, %ebp
orl $0xcc, %ebp
jmp 0x21920
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6bd27(%rip), %r14     # 0x8d622
movq %r14, %rdi
callq 0x2be4a
xorl %ebp, %ebp
cmpl $0x8001, %eax           # imm = 0x8001
setge %bpl
movq %r14, %rdi
callq 0x2be4a
btl $0x1, %eax
adcl $0x99, %ebp
movq (%r15,%rbx,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
movl %ebp, %edi
xorl %ecx, %ecx
movl $0x2, %r8d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1c1f1
// File: /workspace/github_c_makefile_star2_O1/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 0x1ea05
testl %eax, %eax
je 0x21aeb
leaq 0x6bdbf(%rip), %rdi     # 0x8d8a3
xorl %eax, %eax
callq 0x2d800
movslq %ebx, %r14
leaq 0x10c71b(%rip), %r15    # 0x12e210
movq (%r15,%r14,8), %rax
movswl 0x18(%rax), %edi
movl $0x5, %esi
callq 0x1e94c
cmpw $-0x1, %ax
je 0x21c14
movswq %ax, %rax
imulq $0x2c, %rax, %rcx
leaq 0x408ff0(%rip), %rdx    # 0x42ab10
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
movzwl 0x1c(%rsi), %r8d
movw %r8w, 0x1c(%rdx,%rcx)
movl $0x200, %r8d            # imm = 0x200
addl 0x1c(%rsi), %r8d
movl $0x7ff, %r9d            # imm = 0x7FF
andl %r9d, %r8d
leaq 0x55b02e(%rip), %r10    # 0x57cbb0
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)
movw $0x1e, 0x24(%rdx,%rcx)
addl $0x1000, %ebx           # imm = 0x1000
movw %bx, 0x1e(%rdx,%rcx)
movl $0x18, 0x26(%rdx,%rcx)
movw $0xffff, 0x2a(%rdx,%rcx) # imm = 0xFFFF
leaq (%rax,%rax,2), %rsi
shlq $0x2, %rsi
addq 0xac3e3(%rip), %rsi     # 0xcdfb8
movl $0x3, %edx
callq 0x5da55
leaq 0x6bcd7(%rip), %rdi     # 0x8d8bd
callq 0x2be4a
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
xorl %ecx, %ecx
movl $0x4, %r8d
popq %rbx
popq %r14
popq %r15
jmp 0x1c1f1
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1ea05
testl %eax, %eax
je 0x21c38
leaq 0x6bc95(%rip), %rdi     # 0x8d8c6
xorl %eax, %eax
callq 0x2d800
movslq %ebx, %r14
cmpl $0x0, 0x2117ca(%rip)    # 0x23340c
jne 0x21c79
leaq 0x10c5c5(%rip), %rax    # 0x12e210
movq (%rax,%r14,8), %rax
movswq 0x18(%rax), %rax
movw %ax, 0x2117ad(%rip)     # 0x233408
movl $0x1, 0x2117a7(%rip)    # 0x23340c
leaq 0x1d45a4(%rip), %rcx    # 0x1f6210
movq (%rcx,%rax,8), %rax
movb 0x20(%rax), %al
movb %al, 0x211797(%rip)     # 0x233410
movl %ebx, %edi
callq 0x26f1e
leaq 0x10c589(%rip), %r15    # 0x12e210
movq (%r15,%r14,8), %rax
movswl 0x18(%rax), %edi
movl $0x5, %esi
callq 0x1e94c
cmpw $-0x1, %ax
je 0x21dbe
movswq %ax, %rax
imulq $0x2c, %rax, %rcx
leaq 0x408e5e(%rip), %rdx    # 0x42ab10
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 0x58d966(%rip), %r10    # 0x5af640
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
movzwl 0x1c(%rsi), %r8d
movw %r8w, 0x1c(%rdx,%rcx)
movl $0x200, %r8d            # imm = 0x200
addl 0x1c(%rsi), %r8d
movl $0x7ff, %r9d            # imm = 0x7FF
andl %r9d, %r8d
leaq 0x55ae84(%rip), %r10    # 0x57cbb0
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)
movw $0x1e, 0x24(%rdx,%rcx)
addl $0x1000, %ebx           # imm = 0x1000
movw %bx, 0x1e(%rdx,%rcx)
movl $0x20, 0x26(%rdx,%rcx)
movw $0xffff, 0x2a(%rdx,%rcx) # imm = 0xFFFF
leaq (%rax,%rax,2), %rsi
shlq $0x2, %rsi
addq 0xac239(%rip), %rsi     # 0xcdfb8
movl $0x3, %edx
callq 0x5da55
leaq 0x6bb50(%rip), %rdi     # 0x8d8e0
callq 0x2be4a
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
xorl %ecx, %ecx
movl $0x4, %r8d
popq %rbx
popq %r14
popq %r15
jmp 0x1c1f1
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1ea05
testl %eax, %eax
je 0x2234d
leaq 0x6b38b(%rip), %rdi     # 0x8d6d1
xorl %eax, %eax
callq 0x2d800
movswl %bx, %ebx
movl %ebx, %edi
callq 0xf210
testl %eax, %eax
je 0x2238e
movl $0x100, %eax            # imm = 0x100
cmpb $0x5, %bpl
ja 0x22374
movzbl %bpl, %eax
leaq 0x6afef(%rip), %rcx     # 0x8d360
movl (%rcx,%rax,4), %eax
leaq 0x10bc89(%rip), %rcx    # 0x12e004
movl (%rcx), %ecx
cmpl $0x2, %ecx
jb 0x22395
je 0x2239a
cmpl $0x3, %ecx
jne 0x2239d
shrl $0x2, %eax
jmp 0x2239d
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
shrl $0x4, %eax
jmp 0x2239d
shrl $0x3, %eax
negl %eax
movswl %ax, %esi
movl %ebx, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xa5d8
// File: /workspace/github_c_makefile_star2_O1/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 0x10b78f(%rip), %r14    # 0x12e210
movq (%r14,%rbx,8), %rax
movswl 0x18(%rax), %edi
movl $0x5, %esi
callq 0x1e94c
cmpw $-0x1, %ax
je 0x22b6b
movswq %ax, %rax
imulq $0x2c, %rax, %rcx
leaq 0x408064(%rip), %rdx    # 0x42ab10
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
movzwl 0x1c(%rsi), %r8d
movw %r8w, 0x1c(%rdx,%rcx)
movl $0x200, %r8d            # imm = 0x200
addl 0x1c(%rsi), %r8d
movl $0x7ff, %r9d            # imm = 0x7FF
andl %r9d, %r8d
leaq 0x55a0a2(%rip), %r10    # 0x57cbb0
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)
movw $0x1e, 0x24(%rdx,%rcx)
leal 0x1000(%rbx), %esi
movw %si, 0x1e(%rdx,%rcx)
movl $0x20, 0x26(%rdx,%rcx)
movw $0xffff, 0x2a(%rdx,%rcx) # imm = 0xFFFF
leaq (%rax,%rax,2), %rsi
shlq $0x2, %rsi
addq 0xab457(%rip), %rsi     # 0xcdfb8
movl $0x3, %edx
callq 0x5da55
movq (%r14,%rbx,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
movl $0x91, %edi
xorl %ecx, %ecx
movl $0x4, %r8d
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1c1f1
// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %rbx
pushq %rax
leaq 0x77ff79(%rip), %rax    # 0x7a2b10
movl (%rax), %ebp
xorl %eax, %eax
testl %ebp, %ebp
js 0x22bef
movq %rsi, %rbx
leaq 0xbfba7(%rip), %rcx     # 0xe2750
leaq 0x77ff70(%rip), %rdx    # 0x7a2b20
movl %ebp, %esi
movswl (%rcx,%rsi,2), %r8d
cmpl %edi, %r8d
je 0x22bc5
movl (%rdx,%rsi,4), %ebp
testl %ebp, %ebp
jns 0x22bb0
jmp 0x22bef
movslq %edi, %rax
leaq 0x10b641(%rip), %rcx    # 0x12e210
movq (%rcx,%rax,8), %rax
cmpw $0x8, 0x1a(%rax)
je 0x22be8
leaq 0x6ac8b(%rip), %rdi     # 0x8d86c
xorl %eax, %eax
callq 0x2d800
movl %ebp, (%rbx)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0x20c2ef(%rip)    # 0x23340c
je 0x27120
retq
movw %di, 0x20c2e1(%rip)     # 0x233408
movl $0x1, 0x20c2db(%rip)    # 0x23340c
movswq %di, %rax
leaq 0x1cf0d4(%rip), %rcx    # 0x1f6210
movq (%rcx,%rax,8), %rax
movb 0x20(%rax), %al
movb %al, 0x20c2c7(%rip)     # 0x233410
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1ea05
testl %eax, %eax
je 0x27168
leaq 0x66788(%rip), %rdi     # 0x8d8e9
xorl %eax, %eax
callq 0x2d800
movslq %ebx, %r14
leaq 0x10709e(%rip), %r15    # 0x12e210
movq (%r15,%r14,8), %rax
movswl 0x18(%rax), %edi
movl $0x5, %esi
callq 0x1e94c
cmpw $-0x1, %ax
je 0x2727c
movswq %ax, %rax
imulq $0x2c, %rax, %rcx
leaq 0x403973(%rip), %rdx    # 0x42ab10
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
movzwl 0x1c(%rsi), %r8d
movw %r8w, 0x1c(%rdx,%rcx)
movl $0x200, %r8d            # imm = 0x200
addl 0x1c(%rsi), %r8d
movl $0x7ff, %r9d            # imm = 0x7FF
andl %r9d, %r8d
leaq 0x5559b1(%rip), %r10    # 0x57cbb0
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)
movw $0x1e, 0x24(%rdx,%rcx)
addl $0x1000, %ebx           # imm = 0x1000
movw %bx, 0x1e(%rdx,%rcx)
movl $0x20, 0x26(%rdx,%rcx)
movw $0xffff, 0x2a(%rdx,%rcx) # imm = 0xFFFF
leaq (%rax,%rax,2), %rsi
shlq $0x2, %rsi
addq 0xa6d66(%rip), %rsi     # 0xcdfb8
movl $0x3, %edx
callq 0x5da55
movq (%r15,%r14,8), %rax
movl (%rax), %esi
movl 0x4(%rax), %edx
movl $0x56, %edi
xorl %ecx, %ecx
movl $0x4, %r8d
popq %rbx
popq %r14
popq %r15
jmp 0x1c1f1
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1ea05
testl %eax, %eax
je 0x272a0
leaq 0x6666a(%rip), %rdi     # 0x8d903
xorl %eax, %eax
callq 0x2d800
movslq %ebx, %r14
leaq 0x106f66(%rip), %r15    # 0x12e210
movq (%r15,%r14,8), %rax
cmpw $0x321, 0x1a(%rax)      # imm = 0x321
jne 0x27390
movzwl 0xe(%rax), %ecx
cmpl $0x383, %ecx            # imm = 0x383
je 0x272d2
cmpl $0xaf, %ecx
jne 0x27390
movswl 0x18(%rax), %edi
movl $0x64, %esi
callq 0x1e94c
cmpw $-0x1, %ax
je 0x27390
movswq %ax, %rdx
imulq $0x2c, %rdx, %rax
leaq 0x403817(%rip), %rcx    # 0x42ab10
leaq (%rcx,%rax), %rdi
movq (%r15,%r14,8), %rsi
movl (%rsi), %r8d
movl %r8d, (%rcx,%rax)
movl 0x4(%rsi), %r8d
movl %r8d, 0x4(%rcx,%rax)
movswq 0x18(%rsi), %r8
leaq 0x1ceef3(%rip), %r9     # 0x1f6210
movq (%r9,%r8,8), %r8
movl 0x8(%r8), %r8d
movl %r8d, 0x8(%rcx,%rax)
movl $0x1d100a2, 0xc(%rcx,%rax) # imm = 0x1D100A2
movw $0x4, 0x10(%rcx,%rax)
movb $0x0, 0x12(%rcx,%rax)
movl $0x2222, 0x14(%rcx,%rax) # imm = 0x2222
movzwl 0x1c(%rsi), %esi
movw %si, 0x1c(%rcx,%rax)
xorl %esi, %esi
movl %esi, 0x20(%rcx,%rax)
movw $0x1e, 0x24(%rcx,%rax)
addl $0x1000, %ebx           # imm = 0x1000
movw %bx, 0x1e(%rcx,%rax)
movl %esi, 0x26(%rcx,%rax)
leaq (%rdx,%rdx,2), %rsi
shlq $0x2, %rsi
addq 0xa6c3e(%rip), %rsi     # 0xcdfb8
movw $0xffff, 0x2a(%rcx,%rax) # imm = 0xFFFF
movl $0x3, %edx
popq %rbx
popq %r14
popq %r15
jmp 0x5da55
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x20be32(%rip), %eax    # 0x23340c
decl %eax
cmpl $0x3, %eax
ja 0x27683
leaq 0x65d64(%rip), %rcx     # 0x8d350
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movswq 0x20be0b(%rip), %rax    # 0x233408
leaq 0x1cec0c(%rip), %rcx    # 0x1f6210
movq (%rcx,%rax,8), %rax
movb $0x0, 0x20(%rax)
movl $0x2, %eax
jmp 0x2767d
movswq 0x20bded(%rip), %rax    # 0x233408
leaq 0x1cebee(%rip), %rcx    # 0x1f6210
movq (%rcx,%rax,8), %rax
movb $0x0, 0x20(%rax)
movl $0x4, %eax
jmp 0x2767d
movb 0x20bdd9(%rip), %al     # 0x233410
movswq 0x20bdc9(%rip), %rcx    # 0x233408
leaq 0x1cebca(%rip), %rdx    # 0x1f6210
movq (%rdx,%rcx,8), %rcx
movb %al, 0x20(%rcx)
movw $0x0, 0x20bdb2(%rip)    # 0x233408
movb $0x0, 0x20bdb3(%rip)    # 0x233410
xorl %eax, %eax
jmp 0x2767d
movswq 0x20bd9f(%rip), %rax    # 0x233408
leaq 0x1ceba0(%rip), %rcx    # 0x1f6210
movq (%rcx,%rax,8), %rax
movb $-0x80, 0x20(%rax)
movl $0x3, %eax
movl %eax, 0x20bd89(%rip)    # 0x23340c
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x1ce660(%rip), %rcx    # 0x1f6210
movq (%rcx,%rax,8), %rcx
movzwl 0x22(%rcx), %ebx
leal -0x3e8(%rbx), %ecx
cmpl $0x7, %ecx
ja 0x27c0b
movl $0xb9, %edx
btl %ecx, %edx
jb 0x27c13
cmpl $0x6, %ecx
jne 0x27c0b
leaq 0x2ead77(%rip), %rcx    # 0x312950
movslq (%rcx,%rax,4), %rax
leaq 0x2ef02c(%rip), %rcx    # 0x316c10
movq (%rcx,%rax,8), %rax
movl $0x1, (%rax)
movl $0x3f, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1c1f1
leal -0x6(%rbx), %ecx
cmpl $0x4, %ecx
jae 0x27c59
leaq 0x2ff7e6(%rip), %rcx    # 0x327400
movslq (%rcx,%rax,4), %r14
cmpq $-0x1, %r14
jne 0x27c35
movswl %di, %esi
leaq 0x65e76(%rip), %rdi     # 0x8daa4
xorl %eax, %eax
callq 0x2d800
leaq 0x2ea6c4(%rip), %rax    # 0x312300
movq (%rax,%r14,8), %rax
movl 0x4(%rax), %ecx
cmpl $0x6, %ecx
ja 0x27c61
movl $0x55, %edx
btl %ecx, %edx
jae 0x27c61
movl $0x1, 0x4(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpl $0x3ef, %ebx            # imm = 0x3EF
je 0x27c59
movl $0x2, 0x4(%rax)
jmp 0x27c59
// File: /workspace/github_c_makefile_star2_O1/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 0x401d94(%rip), %rcx    # 0x42ab10
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 0x2a6bc
leaq (%rbx,%rbx,2), %rsi
shlq $0x2, %rsi
addq 0xa5201(%rip), %rsi     # 0xcdfb8
movq %r14, %rdi
movl $0x3, %edx
callq 0x5da55
movswl (%r15), %esi
movl %ebx, %edi
callq 0x46bb5
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
leaq (%rax,%rax,4), %r8
leaq 0x3c8ad9(%rip), %rdx    # 0x3f18c0
movzwl 0x2(%rdx,%r8,8), %eax
movslq %esi, %rcx
leaq (%rcx,%rcx,4), %r9
movzwl 0x2(%rdx,%r9,8), %ecx
cmpw %cx, %ax
jge 0x28e31
leaq (%rdx,%r8,8), %rcx
movswq (%rcx), %rcx
decq %rax
leaq 0x33da9f(%rip), %rdx    # 0x3668b0
testw %ax, %ax
js 0x28e67
movl %eax, %edi
andl $0x7fff, %edi           # imm = 0x7FFF
addq %rcx, %rdi
shlq $0x5, %rdi
decq %rax
cmpw %si, 0xc(%rdx,%rdi)
jne 0x28e11
jmp 0x28e61
leaq (%rdx,%r9,8), %rax
movswq (%rax), %rax
decq %rcx
leaq 0x33da6d(%rip), %rdx    # 0x3668b0
testw %cx, %cx
js 0x28e67
movl %ecx, %esi
andl $0x7fff, %esi           # imm = 0x7FFF
addq %rax, %rsi
shlq $0x5, %rsi
decq %rcx
cmpw %di, 0xc(%rdx,%rsi)
jne 0x28e43
movl $0x1, %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
movq %rdx, %rcx
leaq 0x1005d5(%rip), %rax    # 0x12aca0
movswl (%rax), %eax
testl %eax, %eax
jle 0x2a725
movswq (%r8), %r10
movl %eax, %r11d
xorl %edx, %edx
leaq 0x10053e(%rip), %r9     # 0x12ac20
cmpw %r10w, (%r9,%rdx,2)
je 0x2a6f3
incq %rdx
cmpq %rdx, %r11
jne 0x2a6e2
jmp 0x2a725
leaq (%r10,%r10,4), %r11
leaq 0x3c71c2(%rip), %r10    # 0x3f18c0
movzwl 0x24(%r10,%r11,8), %r11d
xorl %ebx, %ebx
incl %edx
cmpl %eax, %edx
cmovgel %ebx, %edx
movslq %edx, %r14
movswq (%r9,%r14,2), %r14
leaq (%r14,%r14,4), %r15
cmpw %r11w, 0x24(%r10,%r15,8)
jne 0x2a706
movw %r14w, (%r8)
movswq (%r8), %rax
leaq (%rax,%rax,4), %rax
leaq 0x3c718c(%rip), %r10    # 0x3f18c0
movzwl (%r10,%rax,8), %ebx
movswl %bx, %edx
movzwl 0x2(%r10,%rax,8), %r11d
addw %dx, %r11w
decl %r11d
xorl %eax, %eax
movl $0x0, %r9d
cmpw %r11w, %dx
jg 0x2a77c
xorl %r9d, %r9d
leaq 0x33c14f(%rip), %r14    # 0x3668b0
xorl %eax, %eax
movswq %bx, %r15
shlq $0x5, %r15
addl (%r14,%r15), %eax
addl 0x4(%r14,%r15), %r9d
incl %ebx
cmpw %r11w, %bx
jle 0x2a763
movswl %r11w, %r11d
subl %edx, %r11d
incl %r11d
cltd
idivl %r11d
movl %eax, (%rdi)
movl %r9d, %eax
cltd
idivl %r11d
movl %eax, (%rsi)
movswq (%r8), %rax
leaq (%rax,%rax,4), %rax
movl $0xffffd600, %edx       # imm = 0xFFFFD600
addl 0x8(%r10,%rax,8), %edx
movl %edx, (%rcx)
movl (%rdi), %edi
movl (%rsi), %esi
movq %r8, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x372d0
// File: /workspace/github_c_makefile_star2_O1/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 0xb5793(%rip), %rax     # 0xe15e4
cmpl $0x0, (%rax)
je 0x4b1bc
pushq %rbx
leaq 0xb5616(%rip), %rbx     # 0xe1478
cmpl $0x51, (%rbx)
leaq 0xb5614(%rip), %rax     # 0xe1480
movq (%rax), %rax
jl 0x2be82
movl $0xa, %edi
movq %rax, %rsi
callq 0x8cb0
xorl %eax, %eax
jmp 0x2bea4
movq %rdi, %rdx
leaq 0x5b855c(%rip), %rcx    # 0x5e43e8
movl (%rcx), %ecx
leaq 0x61cd1(%rip), %rsi     # 0x8db66
movq %rax, %rdi
xorl %eax, %eax
callq 0x8290
movl (%rbx), %eax
addl $0x14, %eax
movl %eax, (%rbx)
popq %rbx
jmp 0x4b1bc
// File: /workspace/github_c_makefile_star2_O1/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:
movslq 0x2fe8c3(%rip), %rax    # 0x32b404
testq %rax, %rax
jle 0x2cc10
shlq $0x3, %rax
xorl %ecx, %ecx
leaq 0xb4931(%rip), %rdx     # 0xe1488
leaq 0x2febb2(%rip), %rsi    # 0x32b710
xorps %xmm0, %xmm0
movl (%rdx), %r8d
movq (%rcx,%rsi), %rdi
cmpl 0x14(%rdi), %r8d
jl 0x2cbf4
movzwl (%rdi), %r8d
testw %r8w, %r8w
jle 0x2cba8
leal -0x1(%r8), %r9d
movw %r9w, (%rdi)
cmpw $0x1, %r8w
je 0x2cbf4
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 0x2cbf4
js 0x2cbea
movslq 0x2fe853(%rip), %r8     # 0x32b404
leal -0x1(%r8), %r9d
movl %r9d, 0x2fe848(%rip)    # 0x32b404
cmpq $0x2, %r8
jl 0x2cbf4
movl %r9d, %r9d
movq (%rsi,%r9,8), %r9
movups (%r9), %xmm1
movq 0x10(%r9), %r9
movq %r9, 0x10(%rdi)
movups %xmm1, (%rdi)
movq -0x8(%rsi,%r8,8), %rdi
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
jmp 0x2cbf4
incw %r8w
movw %r8w, (%rdi)
jne 0x2cc03
addq $0x8, %rcx
cmpq %rcx, %rax
jne 0x2cb61
jmp 0x2cc10
movq (%rcx,%rsi), %rdi
movq 0x8(%rdi), %rdi
decw (%rdi)
jmp 0x2cb96
retq
// File: /workspace/github_c_makefile_star2_O1/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
movswq 0x2febf2(%rip), %rbx    # 0x32b810
testq %rbx, %rbx
jle 0x2cc84
shlq $0x3, %rbx
xorl %r14d, %r14d
leaq 0x2fedef(%rip), %r15    # 0x32ba20
movq (%r14,%r15), %rax
cmpq $0x0, (%rax)
je 0x2cc7b
addl $-0x3, 0x8(%rax)
movq (%r14,%r15), %rax
cmpl $0x0, 0x8(%rax)
jg 0x2cc7b
movswl 0xc(%rax), %edi
callq *(%rax)
movq (%r14,%r15), %rax
movswq 0x2febb5(%rip), %rcx    # 0x32b810
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, 0x2feb95(%rip)     # 0x32b810
addq $0x8, %r14
cmpq %r14, %rbx
jne 0x2cc31
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
movslq %edi, %rcx
leaq 0x1c9510(%rip), %rax    # 0x1f6210
movq (%rax,%rcx,8), %rcx
movswq 0x2(%rcx), %rdx
testq %rdx, %rdx
jle 0x2cdbb
movswq (%rcx), %rdi
addq %rdi, %rdx
leaq 0x1d14f0(%rip), %r8     # 0x1fe210
leaq 0x52ce19(%rip), %r9     # 0x559b40
movq (%r8,%rdi,8), %r10
cmpw $-0x1, 0xa(%r10)
je 0x2cdaf
movl %edi, %ecx
andb $0x7, %cl
movb $0x1, %r11b
shlb %cl, %r11b
movswq 0xc(%r10), %rcx
movq (%rax,%rcx,8), %r14
movl %edi, %ecx
sarl $0x3, %ecx
movslq %ecx, %rcx
movb (%r9,%rcx), %bl
cmpl %esi, 0x8(%r14)
jne 0x2cd88
notb %r11b
andb %r11b, %bl
movb %bl, (%r9,%rcx)
movswl 0xa(%r10), %r10d
movl %r10d, %ecx
andb $0x7, %cl
movl $0x1, %r11d
shll %cl, %r11d
shrl $0x3, %r10d
movswq %r10w, %rcx
notb %r11b
andb %r11b, (%r9,%rcx)
jmp 0x2cdaf
orb %r11b, %bl
movb %bl, (%r9,%rcx)
movswl 0xa(%r10), %r10d
movl %r10d, %ecx
andb $0x7, %cl
movl $0x1, %r11d
shll %cl, %r11d
shrl $0x3, %r10d
movswq %r10w, %rcx
orb %r11b, (%r9,%rcx)
incq %rdi
cmpq %rdx, %rdi
jl 0x2cd27
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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
movslq %edi, %rax
leaq 0x1c943f(%rip), %rcx    # 0x1f6210
movq (%rcx,%rax,8), %rax
movswq 0x2(%rax), %r15
testq %r15, %r15
jle 0x2ce1b
movl %esi, %ebx
movswq (%rax), %r14
addq %r14, %r15
leaq 0x1d1421(%rip), %r12    # 0x1fe210
movq (%r12,%r14,8), %rax
cmpw $-0x1, 0xa(%rax)
je 0x2ce13
movl %r14d, %edi
movl %ebx, %esi
callq 0x2ccb8
movq (%r12,%r14,8), %rax
movswl 0xa(%rax), %edi
movl %ebx, %esi
callq 0x2ccb8
incq %r14
cmpq %r15, %r14
jl 0x2cdef
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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
leaq 0x775cd5(%rip), %rax    # 0x7a2b10
movl (%rax), %eax
xorl %r14d, %r14d
testl %eax, %eax
js 0x2ce7f
movl $0x1, %r12d
movswl %bx, %ebp
leaq 0x775ccc(%rip), %r13    # 0x7a2b20
movl %eax, %r15d
leaq 0xb58c2(%rip), %rax     # 0xe2720
movswl (%rax,%r15,2), %edi
cmpl %ebx, %edi
cmovel %r12d, %r14d
movl %ebp, %esi
callq 0x28dd9
testl %eax, %eax
cmovnel %r12d, %r14d
movl (%r13,%r15,4), %eax
testl %eax, %eax
jns 0x2ce54
movslq %ebx, %rax
leaq 0x52d4e7(%rip), %rcx    # 0x55a370
cmpw $-0x1, (%rcx,%rax,2)
movl $0x1, %eax
cmovel %r14d, %eax
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/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 0x2cf58
movswq 0x2fe911(%rip), %rax    # 0x32b810
leaq 0x2feb1a(%rip), %rcx    # 0x32ba20
testq %rax, %rax
jle 0x2cf28
leaq (,%rax,8), %r9
xorl %r8d, %r8d
movq (%r8,%rcx), %r10
cmpq %rdi, (%r10)
je 0x2cf48
addq $0x8, %r8
cmpq %r8, %r9
jne 0x2cf16
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, 0x2fe8c9(%rip)     # 0x32b810
retq
testl %esi, %esi
je 0x2cf59
movl %esi, 0x8(%r10)
movq (%r8,%rcx), %rax
movw %dx, 0xc(%rax)
retq
movzwl %ax, %edx
movq -0x8(%rcx,%rdx,8), %rsi
movups (%rsi), %xmm0
movups %xmm0, (%r10)
movq -0x8(%rcx,%rdx,8), %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
decl %eax
movw %ax, 0x2fe894(%rip)     # 0x32b810
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2fe480(%rip), %rax    # 0x32b404
testq %rax, %rax
jle 0x2cfae
leaq (,%rax,8), %rcx
xorl %r8d, %r8d
leaq 0x2fe775(%rip), %r9     # 0x32b710
movq (%r8,%r9), %r10
cmpq %rdi, 0x8(%r10)
je 0x2cff3
addq $0x8, %r8
cmpq %r8, %rcx
jne 0x2cf9b
cmpl $0x1e, %eax
jg 0x2cff3
leaq 0x2fe756(%rip), %rcx    # 0x32b710
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 0xb44b0(%rip), %rax     # 0xe1488
movswl %si, %edx
addl (%rax), %edx
movslq 0x2fe420(%rip), %rax    # 0x32b404
movq (%rcx,%rax,8), %rcx
movl %edx, 0x14(%rcx)
incl %eax
movl %eax, 0x2fe411(%rip)    # 0x32b404
retq
// File: /workspace/github_c_makefile_star2_O1/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, 0xa2345(%rip)     # 0xcf8e0
je 0x2d5d6
leaq 0xfef50(%rip), %rax     # 0x12c4f4
cmpl $0x0, (%rax)
jne 0x2d5d6
movl 0xa2335(%rip), %eax     # 0xcf8e4
movl 0x2fe58b(%rip), %ecx    # 0x32bb40
leal (%rcx,%rax), %edx
movl %edx, 0x2fe582(%rip)    # 0x32bb40
addl %eax, %ecx
addl $0xfffffdff, %ecx       # imm = 0xFFFFFDFF
cmpl $0xfffffbfe, %ecx       # imm = 0xFFFFFBFE
ja 0x2d5d6
negl %eax
movl %eax, 0xa230e(%rip)     # 0xcf8e4
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2d861
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 0x1c1e3
callq 0x5a85f
callq 0x5a860
callq 0x1c152
callq 0xa5d7
callq 0x7f095
callq 0x7f057
callq 0x36925
callq 0x32d19
callq 0x1b4d7
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
movl $0xa, %edi
callq 0x90a0
xorl %edi, %edi
callq 0x8950
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/src/datascan.c
// Function: ImportDataFromPath
int ImportDataFromPath(const char *path, struct importdatameta *cbs)
{
    struct stat st;
    int found = 0, errors = 0;

    if (stat(path, &st) < 0) return IMPORTDATA_OK;

    if (st.st_mode & S_IFDIR) {
        switch (ImportFilesFromDir(path, cbs)) {
            case IMPORTDATA_COPIED: found = 1; break;
            case IMPORTDATA_ERROR: errors = 1; break;
        }
    }

    if (found) {
        if (WritePaletteFile() == COPYFILE_OK) {
            buildprintf("Wrote PALETTE.DAT\n");
        }
        return IMPORTDATA_COPIED;         // Finding anything is considered fine.
    }
    else if (errors) return IMPORTDATA_ERROR; // Finding nothing but errors reports back errors.
    return IMPORTDATA_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rsi
callq 0x8140
xorl %ebx, %ebx
testl %eax, %eax
js 0x2d9db
movb $0x1, %bpl
testb $0x40, 0x21(%rsp)
je 0x2d921
movq %r15, %rdi
movq %r14, %rsi
callq 0x2d9ef
cmpl $-0x1, %eax
je 0x2d91c
cmpl $0x2, %eax
jne 0x2d921
xorl %ebp, %ebp
xorl %ebx, %ebx
jmp 0x2d921
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testb %bpl, %bpl
jne 0x2d9db
leaq 0x6030e(%rip), %rdi     # 0x8dc3f
xorl %ebp, %ebp
movl $0xc1, %esi
movl $0x180, %edx            # imm = 0x180
xorl %eax, %eax
callq 0x8670
testl %eax, %eax
js 0x2d9a2
movl %eax, %ebx
leaq 0x72613(%rip), %rax     # 0x9ff64
movslq (%rax), %r14
testq %r14, %r14
jle 0x2d9a9
xorl %r15d, %r15d
movl $0x4000, %r13d          # imm = 0x4000
leaq 0x602f7(%rip), %rbp     # 0x8dc60
movq %r14, %rdx
subq %r15, %rdx
cmpq %r13, %rdx
cmovgeq %r13, %rdx
leaq (%r15,%rbp), %rsi
movl %ebx, %edi
callq 0x8f10
testq %rax, %rax
setns %r12b
js 0x2d992
addq %rax, %r15
cmpq %r14, %r15
jl 0x2d969
xorl %ecx, %ecx
testq %rax, %rax
setns %cl
leal (%rcx,%rcx,2), %ebp
addl $-0x3, %ebp
jmp 0x2d9ac
movl $0x1, %ebp
jmp 0x2d9c4
movb $0x1, %r12b
movl %ebx, %edi
callq 0x8310
testb %r12b, %r12b
jne 0x2d9c4
leaq 0x60280(%rip), %rdi     # 0x8dc3f
callq 0x82a0
movl $0x2, %ebx
testl %ebp, %ebp
jne 0x2d9db
leaq 0x6019c(%rip), %rdi     # 0x8db70
xorl %eax, %eax
callq 0x36050
movl %ebx, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker.c
// Function: smk_open_memory
smk smk_open_memory(const unsigned char * buffer, const unsigned long size)
{
	smk s = NULL;
	union smk_read_t fp;

	if (buffer == NULL) {
		fputs("libsmacker::smk_open_memory() - ERROR: buffer pointer is NULL\n", stderr);
		return NULL;
	}

	/* set up the read union for Memory mode */
	fp.ram = (unsigned char *)buffer;

	if (!(s = smk_open_generic(0, fp, size, SMK_MODE_MEMORY)))
		fprintf(stderr, "libsmacker::smk_open_memory(buffer,%lu) - ERROR: Fatal error in smk_open_generic, returning NULL.\n", size);

	return s;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2ddd9
movq %rsi, %r14
movq %rdi, %rsi
xorl %edi, %edi
movq %r14, %rdx
movl $0x1, %ecx
callq 0x2ddff
movq %rax, %rbx
testq %rax, %rax
je 0x2dde2
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x9270
xorl %ebx, %ebx
jmp 0x2ddce
movq 0xa01b7(%rip), %rax     # 0xcdfa0
movq (%rax), %rdi
leaq 0x7229c(%rip), %rsi     # 0xa008f
movq %r14, %rdx
xorl %eax, %eax
callq 0x8290
jmp 0x2ddce
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker.c
// Function: smk_open_filepointer
smk smk_open_filepointer(FILE * file, const unsigned char mode)
{
	smk s = NULL;
	union smk_read_t fp;

	if (file == NULL) {
		fputs("libsmacker::smk_open_filepointer() - ERROR: file pointer is NULL\n", stderr);
		return NULL;
	}

	/* Copy file ptr to internal union */
	fp.file = file;

	if (!(s = smk_open_generic(1, fp, 0, mode))) {
		fprintf(stderr, "libsmacker::smk_open_filepointer(file,%u) - ERROR: Fatal error in smk_open_generic, returning NULL.\n", mode);
		fclose(fp.file);
		goto error;
	}

	if (mode == SMK_MODE_MEMORY)
		fclose(fp.file);
	else
		s->source.file.fp = fp.file;

	/* fall through, return s or null */
error:
	return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2ee88
movl %esi, %ebp
movq %rdi, %r14
movzbl %bpl, %r15d
movl $0x1, %edi
movq %r14, %rsi
xorl %edx, %edx
movl %r15d, %ecx
callq 0x2ddff
movq %rax, %rbx
testq %rax, %rax
je 0x2ee91
cmpb $0x1, %bpl
jne 0x2ee76
movq %r14, %rdi
callq 0x8640
jmp 0x2ee7a
movq %r14, 0x28(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x9970
xorl %ebx, %ebx
jmp 0x2ee7a
movl %r15d, %edi
movq %r14, %rsi
callq 0x9944
jmp 0x2ee7a
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker.c
// Function: smk_open_file
smk smk_open_file(const char * filename, const unsigned char mode)
{
	FILE * fp;

	if (filename == NULL) {
		fputs("libsmacker::smk_open_file() - ERROR: filename is NULL\n", stderr);
		return NULL;
	}

	if (!(fp = fopen(filename, "rb"))) {
		fprintf(stderr, "libsmacker::smk_open_file(%s,%u) - ERROR: could not open file\n", filename, mode);
		perror("\tError reported was");
		goto error;
	}

	/* kick processing to smk_open_filepointer */
	return smk_open_filepointer(fp, mode);
	/* fall through, return s or null */
error:
	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2eecf
movl %esi, %ebx
movq %rdi, %r14
leaq 0x7131d(%rip), %rsi     # 0xa01d0
callq 0x91d0
testq %rax, %rax
je 0x2eed6
movzbl %bl, %esi
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2ee37
callq 0x99b6
jmp 0x2eee1
movzbl %bl, %edi
movq %r14, %rsi
callq 0x9986
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker.c
// Function: smk_info_all
char smk_info_all(const smk object, unsigned long * frame, unsigned long * frame_count, double * usf)
{
	/* null check */
	if (object == NULL) {
		fputs("libsmacker::smk_info_all() - ERROR: smk is NULL\n", stderr);
		return -1;
	}

	if (!frame && !frame_count && !usf) {
		fputs("libsmacker::smk_info_all(object,frame,frame_count,usf) - ERROR: Request for info with all-NULL return references\n", stderr);
		goto error;
	}

	if (frame)
		*frame = (object->cur_frame % object->f);

	if (frame_count)
		*frame_count = object->f;

	if (usf)
		*usf = object->usf;

	return 0;
error:
	return -1;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x2f16c
movq %rdx, %r8
movq %rsi, %rax
orq %rdx, %rax
orq %rcx, %rax
je 0x2f173
testq %rsi, %rsi
je 0x2f14e
movq 0x20(%rdi), %rax
xorl %edx, %edx
divq 0x10(%rdi)
movq %rdx, (%rsi)
testq %r8, %r8
je 0x2f15a
movq 0x10(%rdi), %rax
movq %rax, (%r8)
testq %rcx, %rcx
je 0x2f168
movsd 0x8(%rdi), %xmm0
movsd %xmm0, (%rcx)
xorl %eax, %eax
popq %rcx
retq
callq 0x99f8
jmp 0x2f178
callq 0x99e2
movb $-0x1, %al
jmp 0x2f16a
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/libsmacker/smacker.c
// Function: smk_info_video
char smk_info_video(const smk object, unsigned long * w, unsigned long * h, unsigned char * y_scale_mode)
{
	/* null check */
	if (object == NULL) {
		fputs("libsmacker::smk_info_video() - ERROR: smk is NULL\n", stderr);
		return -1;
	}

	if (!w && !h && !y_scale_mode) {
		fputs("libsmacker::smk_info_all(object,w,h,y_scale_mode) - ERROR: Request for info with all-NULL return references\n", stderr);
		return -1;
	}

	if (w)
		*w = object->video.w;

	if (h)
		*h = object->video.h;

	if (y_scale_mode)
		*y_scale_mode = object->video.y_scale_mode;

	return 0;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x2f1b3
movq %rsi, %rax
orq %rdx, %rax
orq %rcx, %rax
je 0x2f1ba
testq %rsi, %rsi
je 0x2f199
movq 0x58(%rdi), %rax
movq %rax, (%rsi)
testq %rdx, %rdx
je 0x2f1a5
movq 0x60(%rdi), %rax
movq %rax, (%rdx)
testq %rcx, %rcx
je 0x2f1af
movb 0x68(%rdi), %al
movb %al, (%rcx)
xorl %eax, %eax
popq %rcx
retq
callq 0x9a24
jmp 0x2f1bf
callq 0x9a0e
movb $-0x1, %al
jmp 0x2f1b1