LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: getzsofslope
void getzsofslope(short sectnum, int dax, int day, int *ceilz, int *florz)
{
	int dx, dy, i, j;
	walltype *wal, *wal2;
	sectortype *sec;

	sec = &sector[sectnum];
	*ceilz = sec->ceilingz; *florz = sec->floorz;
	if ((sec->ceilingstat|sec->floorstat)&2)
	{
		wal = &wall[sec->wallptr]; wal2 = &wall[wal->point2];
		dx = wal2->x-wal->x; dy = wal2->y-wal->y;
		i = (nsqrtasm(dx*dx+dy*dy)<<5); if (i == 0) return;
		j = dmulscale3(dx,day-wal->y,-dy,dax-wal->x);
		if (sec->ceilingstat&2) *ceilz = (*ceilz)+scale(sec->ceilingheinum,j,i);
		if (sec->floorstat&2) *florz = (*florz)+scale(sec->floorheinum,j,i);
	}
}

// Assembly:
movq %rcx, %r9
movslq %edi, %rax
leaq (%rax,%rax,4), %rcx
leaq 0x21ca42(%rip), %rdi    # 0x242a60
movl 0x4(%rdi,%rcx,8), %eax
movl %eax, (%r9)
movl 0x8(%rdi,%rcx,8), %eax
movl %eax, (%r8)
movzwl 0xc(%rdi,%rcx,8), %eax
movzwl 0xe(%rdi,%rcx,8), %r10d
orw %ax, %r10w
testb $0x2, %r10b
je 0x26131
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq (%rdi,%rcx,8), %rdi
movswq (%rdi), %rcx
shlq $0x5, %rcx
leaq 0x1919f1(%rip), %r11    # 0x1b7a50
movswq 0x8(%rcx,%r11), %r14
shlq $0x5, %r14
movslq (%r14,%r11), %r10
movslq (%rcx,%r11), %rbx
subq %rbx, %r10
movslq 0x4(%r14,%r11), %r14
movslq 0x4(%rcx,%r11), %r15
subq %r15, %r14
movl %r10d, %ecx
imull %r10d, %ecx
movl %r14d, %r11d
imull %r11d, %r11d
addl %ecx, %r11d
movl %r11d, %ecx
shrl $0x18, %ecx
orl $0x1000, %ecx           # imm = 0x1000
movl %r11d, %r12d
shrl $0xc, %r12d
cmpl $0x1000000, %r11d       # imm = 0x1000000
cmovael %ecx, %r12d
leaq 0x42ee49(%rip), %rcx    # 0x454f00
movzwl (%rcx,%r12,2), %ecx
shrl %cl, %r11d
leaq 0x43103a(%rip), %r12    # 0x457100
movzwl (%r12,%r11,2), %r11d
shrl $0x8, %ecx
shrl %cl, %r11d
shll $0x5, %r11d
je 0x2612a
movslq %edx, %rcx
subq %r15, %rcx
negq %r14
movslq %esi, %rdx
subq %rbx, %rdx
imulq %r14, %rdx
imulq %r10, %rcx
addq %rdx, %rcx
shrq $0x3, %rcx
movslq %r11d, %rsi
testb $0x2, %al
je 0x26110
movswq 0x12(%rdi), %rdx
movslq %ecx, %rax
imulq %rdx, %rax
cqto
idivq %rsi
addl %eax, (%r9)
testb $0x2, 0xe(%rdi)
je 0x2612a
movswq 0x1a(%rdi), %rdx
movslq %ecx, %rax
imulq %rdx, %rax
cqto
idivq %rsi
addl %eax, (%r8)
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: bunchfront
static int bunchfront(int b1, int b2)
{
	int x1b1, x2b1, x1b2, x2b2, b1f, b2f, i;

	b1f = bunchfirst[b1]; x1b1 = xb1[b1f]; x2b2 = xb2[bunchlast[b2]]+1;
	if (x1b1 >= x2b2) return(-1);
	b2f = bunchfirst[b2]; x1b2 = xb1[b2f]; x2b1 = xb2[bunchlast[b1]]+1;
	if (x1b2 >= x2b1) return(-1);

	if (x1b1 >= x1b2)
	{
		for(i=b2f;xb2[i]<x1b1;i=p2[i]);
		return(wallfront(b1f,i));
	}
	for(i=b1f;xb2[i]<x1b2;i=p2[i]);
	return(wallfront(i,b2f));
}

// Assembly:
movslq %edi, %r8
leaq 0x3ad5ec(%rip), %rdx    # 0x3d67c0
movswq (%rdx,%r8,2), %rdi
leaq 0x241890(%rip), %r9     # 0x26aa70
movl (%r9,%rdi,4), %ecx
movslq %esi, %rsi
leaq 0x3af5d2(%rip), %r10    # 0x3d87c0
movswq (%r10,%rsi,2), %r11
leaq 0x245886(%rip), %rax    # 0x26ea80
cmpl (%rax,%r11,4), %ecx
jg 0x29214
movswq (%rdx,%rsi,2), %rsi
movl (%r9,%rsi,4), %edx
movswq (%r10,%r8,2), %r8
cmpl (%rax,%r8,4), %edx
jle 0x2921a
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
cmpl %edx, %ecx
jge 0x2923e
movslq %edi, %rcx
cmpl %edx, (%rax,%rcx,4)
jge 0x29239
leaq 0x3b55a3(%rip), %rdi    # 0x3de7d0
movswq (%rdi,%rcx,2), %rcx
cmpl %edx, (%rax,%rcx,4)
jl 0x2922d
movl %ecx, %edi
jmp 0x23bbf
movslq %esi, %rdx
cmpl %ecx, (%rax,%rdx,4)
jge 0x29239
leaq 0x3b5583(%rip), %rsi    # 0x3de7d0
movswq (%rsi,%rdx,2), %rdx
cmpl %ecx, (%rax,%rdx,4)
jl 0x2924d
movl %edx, %esi
jmp 0x23bbf
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: spritewallfront
static int spritewallfront(spritetype *s, int w)
{
	walltype *wal;
	int x1, y1;

	wal = &wall[w]; x1 = wal->x; y1 = wal->y;
	wal = &wall[wal->point2];
	return (dmulscale32(wal->x-x1,s->y-y1,-(s->x-x1),wal->y-y1) >= 0);
}

// Assembly:
movslq %esi, %rax
shlq $0x5, %rax
leaq 0x18a9e3(%rip), %rcx    # 0x1b7a50
movslq (%rax,%rcx), %rdx
movslq 0x4(%rax,%rcx), %rsi
movswq 0x8(%rax,%rcx), %rax
shlq $0x5, %rax
movslq (%rax,%rcx), %r8
subq %rdx, %r8
movslq 0x4(%rdi), %r9
subq %rsi, %r9
imulq %r8, %r9
movslq (%rdi), %rdi
subq %rdi, %rdx
movslq 0x4(%rax,%rcx), %rcx
subq %rsi, %rcx
imulq %rdx, %rcx
xorl %eax, %eax
addq %r9, %rcx
setns %al
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: lastwall
int lastwall(short point)
{
	int i, j, cnt;

	if ((point > 0) && (wall[point-1].point2 == point)) return(point-1);
	i = point;
	cnt = MAXWALLS;
	do
	{
		j = wall[i].point2;
		if (j == point) return(i);
		i = j;
		cnt--;
	} while (cnt > 0);
	return(point);
}

// Assembly:
leaq 0x1895e3(%rip), %rcx    # 0x1b7a50
testw %di, %di
jle 0x2e483
leal -0x1(%rdi), %eax
movq %rax, %rdx
shlq $0x5, %rdx
cmpw %di, 0x8(%rdx,%rcx)
je 0x2e4a6
movl $0x4001, %edx           # imm = 0x4001
movl %edi, %esi
movl %esi, %eax
movslq %esi, %rsi
shlq $0x5, %rsi
movswl 0x8(%rsi,%rcx), %esi
cmpw %di, %si
je 0x2e4a6
decl %edx
cmpl $0x1, %edx
ja 0x2e48a
movl %edi, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: loadtile
void loadtile(short tilenume)
{
	char *ptr;
	int i, dasiz;

	if ((unsigned)tilenume >= (unsigned)MAXTILES) return;
	dasiz = tilesizx[tilenume]*tilesizy[tilenume];
	if (dasiz <= 0) return;

	i = tilefilenum[tilenume];
	if (i != artfilnum)
	{
		if (artfil != -1) kclose(artfil);
		artfilnum = i;
		artfilplc = 0L;

		artfilename[7] = (i%10)+48;
		artfilename[6] = ((i/10)%10)+48;
		artfilename[5] = ((i/100)%10)+48;
		artfil = kopen4load(artfilename,0);
		faketimerhandler();
	}

	if (cachedebug) buildprintf("Tile:%d\n",tilenume);

	if (waloff[tilenume] == 0)
	{
		walock[tilenume] = 199;
		allocache((void **)&waloff[tilenume],dasiz,&walock[tilenume]);
	}

	if (artfilplc != tilefileoffs[tilenume])
	{
		klseek(artfil,tilefileoffs[tilenume]-artfilplc,BSEEK_CUR);
		faketimerhandler();
	}
	ptr = (char *)waloff[tilenume];
	kread(artfil,ptr,dasiz);
	faketimerhandler();
	artfilplc = tilefileoffs[tilenume]+dasiz;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebp
movzwl %bp, %r14d
cmpl $0x23ff, %r14d          # imm = 0x23FF
ja 0x2f26e
leal (%r14,%r14), %eax
leaq 0x3dfef4(%rip), %rcx    # 0x40f020
movswl (%rax,%rcx), %ecx
leaq 0x3d16a9(%rip), %rdx    # 0x4007e0
movswl (%rax,%rdx), %ebx
imull %ecx, %ebx
testl %ebx, %ebx
jle 0x2f26e
leaq 0x3f2d63(%rip), %rax    # 0x421eb0
movzbl (%r14,%rax), %r15d
cmpl %r15d, 0x3fe5d7(%rip)   # 0x42d730
je 0x2f1e5
movl 0x74adf(%rip), %edi     # 0xa3c44
cmpl $-0x1, %edi
je 0x2f16f
callq 0x20671
movl %r15d, 0x3fe5ba(%rip)   # 0x42d730
movl $0x0, 0x3fe5b4(%rip)    # 0x42d734
imull $0xcd, %r15d, %eax
shrl $0xb, %eax
leal (%rax,%rax), %ecx
leal (%rcx,%rcx,4), %ecx
movl %r15d, %edx
subb %cl, %dl
orb $0x30, %dl
movb %dl, 0x3f2cf9(%rip)     # 0x421e97
leaq 0x3f2ceb(%rip), %rdi    # 0x421e90
leal (%rax,%rax,4), %ecx
leal (%rcx,%rcx,4), %ecx
addl %eax, %ecx
shrl $0x7, %ecx
andl $0x6, %ecx
leal (%rcx,%rcx,4), %ecx
subb %cl, %al
orb $0x30, %al
movb %al, 0x3f2cd6(%rip)     # 0x421e96
leal (%r15,%r15,4), %eax
leal (%r15,%rax,8), %eax
shrl $0xc, %eax
orb $0x30, %al
movb %al, 0x3f2cc2(%rip)     # 0x421e95
xorl %esi, %esi
callq 0x1ff50
movl %eax, 0x74a64(%rip)     # 0xa3c44
callq 0xab51
cmpb $0x0, 0x3fe54c(%rip)    # 0x42d738
je 0x2f1fe
leaq 0x4716f(%rip), %rdi     # 0x76364
movl %ebp, %esi
xorl %eax, %eax
callq 0x24cb4
leaq 0x3690db(%rip), %r15    # 0x3982e0
cmpq $0x0, (%r15,%r14,8)
jne 0x2f226
leaq (%r15,%r14,8), %rdi
leaq 0x3fe529(%rip), %rdx    # 0x42d740
movb $-0x39, (%r14,%rdx)
addq %r14, %rdx
movl %ebx, %esi
callq 0x1f150
leaq 0x3f5083(%rip), %r12    # 0x4242b0
movl (%r12,%r14,4), %esi
subl 0x3fe4fd(%rip), %esi    # 0x42d734
je 0x2f24e
movl 0x74a05(%rip), %edi     # 0xa3c44
movl $0x1, %edx
callq 0x203a8
callq 0xab51
movq (%r15,%r14,8), %rsi
movl 0x749ec(%rip), %edi     # 0xa3c44
movl %ebx, %edx
callq 0x201c2
callq 0xab51
addl (%r12,%r14,4), %ebx
movl %ebx, 0x3fe4c6(%rip)    # 0x42d734
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: convertv6sectv7
static void convertv6sectv7(struct sectortypev6 *from, sectortype *to)
{
	to->ceilingz = from->ceilingz;
	to->floorz = from->floorz;
	to->wallptr = from->wallptr;
	to->wallnum = from->wallnum;
	to->ceilingpicnum = from->ceilingpicnum;
	to->ceilingheinum = max(min(((int)from->ceilingheinum)<<5,32767),-32768);
	if ((from->ceilingstat&2) == 0) to->ceilingheinum = 0;
	to->ceilingshade = from->ceilingshade;
	to->ceilingpal = from->ceilingpal;
	to->ceilingxpanning = from->ceilingxpanning;
	to->ceilingypanning = from->ceilingypanning;
	to->floorpicnum = from->floorpicnum;
	to->floorheinum = max(min(((int)from->floorheinum)<<5,32767),-32768);
	if ((from->floorstat&2) == 0) to->floorheinum = 0;
	to->floorshade = from->floorshade;
	to->floorpal = from->floorpal;
	to->floorxpanning = from->floorxpanning;
	to->floorypanning = from->floorypanning;
	to->ceilingstat = from->ceilingstat;
	to->floorstat = from->floorstat;
	to->visibility = from->visibility;
	to->filler = 0;
	to->lotag = from->lotag;
	to->hitag = from->hitag;
	to->extra = from->extra;
}

// Assembly:
movl 0xc(%rdi), %eax
movl %eax, 0x4(%rsi)
movl 0x10(%rdi), %eax
movl %eax, 0x8(%rsi)
movzwl (%rdi), %eax
movw %ax, (%rsi)
movzwl 0x2(%rdi), %eax
movw %ax, 0x2(%rsi)
movzwl 0x4(%rdi), %eax
movw %ax, 0x10(%rsi)
movswl 0x8(%rdi), %edx
movl %edx, %r8d
shll $0x5, %r8d
movl $0x400, %eax            # imm = 0x400
cmpl %eax, %edx
movl $0x7fff, %ecx           # imm = 0x7FFF
cmovgel %ecx, %r8d
movl $0xfffffc01, %r9d       # imm = 0xFFFFFC01
cmpl %r9d, %edx
movl $0x8000, %edx           # imm = 0x8000
cmovll %edx, %r8d
movw %r8w, 0x12(%rsi)
xorl %r10d, %r10d
testb $0x2, 0x1a(%rdi)
cmovel %r10d, %r8d
movw %r8w, 0x12(%rsi)
movb 0x14(%rdi), %r8b
movb %r8b, 0x14(%rsi)
movb 0x1c(%rdi), %r8b
movb %r8b, 0x15(%rsi)
movb 0x16(%rdi), %r8b
movb %r8b, 0x16(%rsi)
movb 0x18(%rdi), %r8b
movb %r8b, 0x17(%rsi)
movzwl 0x6(%rdi), %r8d
movw %r8w, 0x18(%rsi)
movswl 0xa(%rdi), %r8d
movl %r8d, %r11d
shll $0x5, %r11d
cmpl %eax, %r8d
cmovgel %ecx, %r11d
cmpl %r9d, %r8d
cmovll %edx, %r11d
movw %r11w, 0x1a(%rsi)
testb $0x2, 0x1b(%rdi)
cmovel %r10d, %r11d
movw %r11w, 0x1a(%rsi)
movb 0x15(%rdi), %al
movb %al, 0x1c(%rsi)
movb 0x1d(%rdi), %al
movb %al, 0x1d(%rsi)
movb 0x17(%rdi), %al
movb %al, 0x1e(%rsi)
movb 0x19(%rdi), %al
movb %al, 0x1f(%rsi)
movzbl 0x1a(%rdi), %eax
movw %ax, 0xc(%rsi)
movzbl 0x1b(%rdi), %eax
movw %ax, 0xe(%rsi)
movb 0x1e(%rdi), %al
movb %al, 0x20(%rsi)
movb $0x0, 0x21(%rsi)
movzwl 0x20(%rdi), %eax
movw %ax, 0x22(%rsi)
movzwl 0x22(%rdi), %eax
movw %ax, 0x24(%rsi)
movzwl 0x24(%rdi), %eax
movw %ax, 0x26(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: readv4wall
static int readv4wall(int fil, struct walltypev4 *wall)
{
	if (kread(fil, &wall->x, 4) != 4) return -1;
	if (kread(fil, &wall->y, 4) != 4) return -1;
	if (kread(fil, &wall->point2, 2) != 2) return -1;
	if (kread(fil, &wall->cstat, 1) != 1) return -1;
	if (kread(fil, &wall->shade, 1) != 1) return -1;
	if (kread(fil, &wall->xrepeat, 1) != 1) return -1;
	if (kread(fil, &wall->yrepeat, 1) != 1) return -1;
	if (kread(fil, &wall->xpanning, 1) != 1) return -1;
	if (kread(fil, &wall->ypanning, 1) != 1) return -1;
	if (kread(fil, &wall->picnum, 2) != 2) return -1;
	if (kread(fil, &wall->overpicnum, 2) != 2) return -1;
	if (kread(fil, &wall->nextsector1, 2) != 2) return -1;
	if (kread(fil, &wall->nextwall1, 2) != 2) return -1;
	if (kread(fil, &wall->nextsector2, 2) != 2) return -1;
	if (kread(fil, &wall->nextwall2, 2) != 2) return -1;
	if (kread(fil, &wall->tag, 4) != 4) return -1;

	wall->x = B_LITTLE32(wall->x);
	wall->y = B_LITTLE32(wall->y);
	wall->point2 = B_LITTLE16(wall->point2);
	wall->picnum = B_LITTLE16(wall->picnum);
	wall->overpicnum = B_LITTLE16(wall->overpicnum);
	wall->nextsector1 = B_LITTLE16(wall->nextsector1);
	wall->nextwall1 = B_LITTLE16(wall->nextwall1);
	wall->nextsector2 = B_LITTLE16(wall->nextsector2);
	wall->nextwall2 = B_LITTLE16(wall->nextwall2);
	wall->tag = B_LITTLE32(wall->tag);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movl %edi, %ebp
movl $0x4, %edx
callq 0x201c2
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x4, %eax
jne 0x30bb8
leaq 0x4(%r14), %rsi
movl %ebp, %edi
movl $0x4, %edx
callq 0x201c2
cmpl $0x4, %eax
jne 0x30bb8
leaq 0x8(%r14), %rsi
movl %ebp, %edi
movl $0x2, %edx
callq 0x201c2
cmpl $0x2, %eax
jne 0x30bb8
leaq 0xa(%r14), %rsi
movl %ebp, %edi
movl $0x1, %edx
callq 0x201c2
cmpl $0x1, %eax
jne 0x30bb8
leaq 0xb(%r14), %rsi
movl %ebp, %edi
movl $0x1, %edx
callq 0x201c2
cmpl $0x1, %eax
jne 0x30bb8
leaq 0xc(%r14), %rsi
movl %ebp, %edi
movl $0x1, %edx
callq 0x201c2
cmpl $0x1, %eax
jne 0x30bb8
leaq 0xd(%r14), %rsi
movl %ebp, %edi
movl $0x1, %edx
callq 0x201c2
cmpl $0x1, %eax
jne 0x30bb8
leaq 0xe(%r14), %rsi
movl %ebp, %edi
movl $0x1, %edx
callq 0x201c2
cmpl $0x1, %eax
jne 0x30bb8
leaq 0xf(%r14), %rsi
movl %ebp, %edi
movl $0x1, %edx
callq 0x201c2
cmpl $0x1, %eax
jne 0x30bb8
leaq 0x10(%r14), %rsi
movl %ebp, %edi
movl $0x2, %edx
callq 0x201c2
cmpl $0x2, %eax
jne 0x30bb8
leaq 0x12(%r14), %rsi
movl %ebp, %edi
movl $0x2, %edx
callq 0x201c2
cmpl $0x2, %eax
jne 0x30bb8
leaq 0x14(%r14), %rsi
movl %ebp, %edi
movl $0x2, %edx
callq 0x201c2
cmpl $0x2, %eax
jne 0x30bb8
leaq 0x16(%r14), %rsi
movl %ebp, %edi
movl $0x2, %edx
callq 0x201c2
cmpl $0x2, %eax
jne 0x30bb8
leaq 0x18(%r14), %rsi
movl %ebp, %edi
movl $0x2, %edx
callq 0x201c2
cmpl $0x2, %eax
jne 0x30bb8
leaq 0x1a(%r14), %rsi
movl %ebp, %edi
movl $0x2, %edx
callq 0x201c2
cmpl $0x2, %eax
jne 0x30bb8
addq $0x1c, %r14
movl %ebp, %edi
movq %r14, %rsi
movl $0x4, %edx
callq 0x201c2
xorl %ebx, %ebx
cmpl $0x4, %eax
setne %bl
negl %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: convertv5wallv6
static void convertv5wallv6(struct walltypev5 *from, struct walltypev6 *to, int i)
{
	to->x = from->x;
	to->y = from->y;
	to->point2 = from->point2;
	to->nextsector = from->nextsector1;
	to->nextwall = from->nextwall1;
	to->picnum = from->picnum;
	to->overpicnum = from->overpicnum;
	to->shade = from->shade;
	to->pal = sector[sectorofwallv5((short)i)].floorpal;
	to->cstat = from->cstat;
	to->xrepeat = from->xrepeat;
	to->yrepeat = from->yrepeat;
	to->xpanning = from->xpanning;
	to->ypanning = from->ypanning;
	to->lotag = from->lotag;
	to->hitag = from->hitag;
	to->extra = from->extra;
}

// Assembly:
movl (%rdi), %eax
movl %eax, (%rsi)
movl 0x4(%rdi), %eax
movl %eax, 0x4(%rsi)
movzwl 0x8(%rdi), %eax
movw %ax, 0x8(%rsi)
movzwl 0x16(%rdi), %eax
movw %ax, 0xa(%rsi)
movzwl 0x18(%rdi), %eax
movw %ax, 0xc(%rsi)
movzwl 0xa(%rdi), %eax
movw %ax, 0xe(%rsi)
movzwl 0xc(%rdi), %eax
movw %ax, 0x10(%rsi)
movb 0xe(%rdi), %al
movb %al, 0x12(%rsi)
movswq 0x39e361(%rip), %rcx    # 0x3cef60
testq %rcx, %rcx
jle 0x30c3e
leaq 0x211e57(%rip), %r8     # 0x242a62
xorl %eax, %eax
movzwl -0x2(%r8), %r9d
cmpw %dx, %r9w
jg 0x30c25
addw (%r8), %r9w
decl %r9d
cmpw %dx, %r9w
jge 0x30c38
incq %rax
addq $0x28, %r8
cmpq %rax, %rcx
jne 0x30c0d
movq $-0x1, %rax
movswq %ax, %rax
jmp 0x30c45
movq $-0x1, %rax
leaq (%rax,%rax,4), %rax
leaq 0x211e10(%rip), %rcx    # 0x242a60
movb 0x1d(%rcx,%rax,8), %al
movb %al, 0x13(%rsi)
movzwl 0x10(%rdi), %eax
movw %ax, 0x14(%rsi)
movb 0x12(%rdi), %al
movb %al, 0x16(%rsi)
movb 0x13(%rdi), %al
movb %al, 0x17(%rsi)
movb 0x14(%rdi), %al
movb %al, 0x18(%rsi)
movb 0x15(%rdi), %al
movb %al, 0x19(%rsi)
movzwl 0x1e(%rdi), %eax
movw %ax, 0x1a(%rsi)
movzwl 0x20(%rdi), %eax
movw %ax, 0x1c(%rsi)
movzwl 0x22(%rdi), %eax
movw %ax, 0x1e(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: convertv6wallv7
static void convertv6wallv7(struct walltypev6 *from, walltype *to)
{
	to->x = from->x;
	to->y = from->y;
	to->point2 = from->point2;
	to->nextwall = from->nextwall;
	to->nextsector = from->nextsector;
	to->cstat = from->cstat;
	to->picnum = from->picnum;
	to->overpicnum = from->overpicnum;
	to->shade = from->shade;
	to->pal = from->pal;
	to->xrepeat = from->xrepeat;
	to->yrepeat = from->yrepeat;
	to->xpanning = from->xpanning;
	to->ypanning = from->ypanning;
	to->lotag = from->lotag;
	to->hitag = from->hitag;
	to->extra = from->extra;
}

// Assembly:
movl (%rdi), %eax
movl %eax, (%rsi)
movl 0x4(%rdi), %eax
movl %eax, 0x4(%rsi)
movzwl 0x8(%rdi), %eax
movw %ax, 0x8(%rsi)
movzwl 0xc(%rdi), %eax
movw %ax, 0xa(%rsi)
movzwl 0xa(%rdi), %eax
movw %ax, 0xc(%rsi)
movzwl 0x14(%rdi), %eax
movw %ax, 0xe(%rsi)
movzwl 0xe(%rdi), %eax
movw %ax, 0x10(%rsi)
movzwl 0x10(%rdi), %eax
movw %ax, 0x12(%rsi)
movb 0x12(%rdi), %al
movb %al, 0x14(%rsi)
movb 0x13(%rdi), %al
movb %al, 0x15(%rsi)
movb 0x16(%rdi), %al
movb %al, 0x16(%rsi)
movb 0x17(%rdi), %al
movb %al, 0x17(%rsi)
movb 0x18(%rdi), %al
movb %al, 0x18(%rsi)
movb 0x19(%rdi), %al
movb %al, 0x19(%rsi)
movzwl 0x1a(%rdi), %eax
movw %ax, 0x1a(%rsi)
movzwl 0x1c(%rdi), %eax
movw %ax, 0x1c(%rsi)
movzwl 0x1e(%rdi), %eax
movw %ax, 0x1e(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: convertv6sprv7
static void convertv6sprv7(struct spritetypev6 *from, spritetype *to)
{
	to->x = from->x;
	to->y = from->y;
	to->z = from->z;
	to->cstat = from->cstat;
	to->picnum = from->picnum;
	to->shade = from->shade;
	to->pal = from->pal;
	to->clipdist = from->clipdist;
	to->filler = 0;
	to->xrepeat = from->xrepeat;
	to->yrepeat = from->yrepeat;
	to->xoffset = from->xoffset;
	to->yoffset = from->yoffset;
	to->sectnum = from->sectnum;
	to->statnum = from->statnum;
	to->ang = from->ang;
	to->owner = from->owner;
	to->xvel = from->xvel;
	to->yvel = from->yvel;
	to->zvel = from->zvel;
	to->lotag = from->lotag;
	to->hitag = from->hitag;
	to->extra = from->extra;
}

// Assembly:
movl (%rdi), %eax
movl %eax, (%rsi)
movl 0x4(%rdi), %eax
movl %eax, 0x4(%rsi)
movl 0x8(%rdi), %eax
movl %eax, 0x8(%rsi)
movzwl 0xc(%rdi), %eax
movw %ax, 0xc(%rsi)
movzwl 0x16(%rdi), %eax
movw %ax, 0xe(%rsi)
movb 0xe(%rdi), %al
movb %al, 0x10(%rsi)
movb 0xf(%rdi), %al
movb %al, 0x11(%rsi)
movb 0x10(%rdi), %al
movb %al, 0x12(%rsi)
movb $0x0, 0x13(%rsi)
movb 0x11(%rdi), %al
movb %al, 0x14(%rsi)
movb 0x12(%rdi), %al
movb %al, 0x15(%rsi)
movb 0x13(%rdi), %al
movb %al, 0x16(%rsi)
movb 0x14(%rdi), %al
movb %al, 0x17(%rsi)
movzwl 0x22(%rdi), %eax
movw %ax, 0x18(%rsi)
movzwl 0x24(%rdi), %eax
movw %ax, 0x1a(%rsi)
movzwl 0x18(%rdi), %eax
movw %ax, 0x1c(%rsi)
movzwl 0x20(%rdi), %eax
movw %ax, 0x1e(%rsi)
movzwl 0x1a(%rdi), %eax
movw %ax, 0x20(%rsi)
movzwl 0x1c(%rdi), %eax
movw %ax, 0x22(%rsi)
movzwl 0x1e(%rdi), %eax
movw %ax, 0x24(%rsi)
movzwl 0x26(%rdi), %eax
movw %ax, 0x26(%rsi)
movzwl 0x28(%rdi), %eax
movw %ax, 0x28(%rsi)
movzwl 0x2a(%rdi), %eax
movw %ax, 0x2a(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: buildputs
void buildputs(const char *str)
{
    fputs(str, stdout);
    if (logfile) fputs(str, logfile);
    initputs(str);  // the startup window
    OSD_Puts(str);  // the onscreen-display
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x5fdb5(%rip), %rax     # 0x91fc0
movq (%rax), %rsi
callq 0x6320
movq 0x3792de(%rip), %rsi    # 0x3ab4f8
testq %rsi, %rsi
je 0x32227
movq %rbx, %rdi
callq 0x6320
movq %rbx, %rdi
callq 0x6c30a
movq %rbx, %rdi
popq %rbx
jmp 0x4a70a
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: convertv7sectv6
static void convertv7sectv6(sectortype *from, struct sectortypev6 *to)
{
	to->ceilingz = from->ceilingz;
	to->floorz = from->floorz;
	to->wallptr = from->wallptr;
	to->wallnum = from->wallnum;
	to->ceilingpicnum = from->ceilingpicnum;
	to->ceilingheinum = (((int)from->ceilingheinum)>>5);
	to->ceilingshade = from->ceilingshade;
	to->ceilingpal = from->ceilingpal;
	to->ceilingxpanning = from->ceilingxpanning;
	to->ceilingypanning = from->ceilingypanning;
	to->floorpicnum = from->floorpicnum;
	to->floorheinum = (((int)from->floorheinum)>>5);
	to->floorshade = from->floorshade;
	to->floorpal = from->floorpal;
	to->floorxpanning = from->floorxpanning;
	to->floorypanning = from->floorypanning;
	to->ceilingstat = from->ceilingstat;
	if (to->ceilingheinum == 0) to->ceilingstat &= ~2;
	to->floorstat = from->floorstat;
	if (to->floorheinum == 0) to->floorstat &= ~2;
	to->visibility = from->visibility;
	to->lotag = from->lotag;
	to->hitag = from->hitag;
	to->extra = from->extra;
}

// Assembly:
movl 0x4(%rdi), %eax
movl %eax, 0xc(%rsi)
movl 0x8(%rdi), %eax
movl %eax, 0x10(%rsi)
movzwl (%rdi), %eax
movw %ax, (%rsi)
movzwl 0x2(%rdi), %eax
movw %ax, 0x2(%rsi)
movzwl 0x10(%rdi), %eax
movw %ax, 0x4(%rsi)
movswl 0x12(%rdi), %eax
movl %eax, %ecx
shrl $0x5, %ecx
movw %cx, 0x8(%rsi)
movb 0x14(%rdi), %cl
movb %cl, 0x14(%rsi)
movb 0x15(%rdi), %cl
movb %cl, 0x1c(%rsi)
movb 0x16(%rdi), %cl
movb %cl, 0x16(%rsi)
movb 0x17(%rdi), %cl
movb %cl, 0x18(%rsi)
movzwl 0x18(%rdi), %ecx
movw %cx, 0x6(%rsi)
movswl 0x1a(%rdi), %ecx
movl %ecx, %edx
shrl $0x5, %edx
movw %dx, 0xa(%rsi)
movb 0x1c(%rdi), %dl
movb %dl, 0x15(%rsi)
movb 0x1d(%rdi), %dl
movb %dl, 0x1d(%rsi)
movb 0x1e(%rdi), %dl
movb %dl, 0x17(%rsi)
movb 0x1f(%rdi), %dl
movb %dl, 0x19(%rsi)
movl 0xc(%rdi), %edx
movl %edx, %r8d
andb $-0x3, %r8b
cmpw $0x20, %ax
movzbl %r8b, %eax
cmovael %edx, %eax
movb %al, 0x1a(%rsi)
movzbl 0xe(%rdi), %eax
movl %eax, %edx
andb $-0x3, %dl
cmpw $0x20, %cx
movzbl %dl, %ecx
cmovael %eax, %ecx
movb %cl, 0x1b(%rsi)
movb 0x20(%rdi), %al
movb %al, 0x1e(%rsi)
movzwl 0x22(%rdi), %eax
movw %ax, 0x20(%rsi)
movzwl 0x24(%rdi), %eax
movw %ax, 0x22(%rsi)
movzwl 0x26(%rdi), %eax
movw %ax, 0x24(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: convertv7sprv6
static void convertv7sprv6(spritetype *from, struct spritetypev6 *to)
{
	to->x = from->x;
	to->y = from->y;
	to->z = from->z;
	to->cstat = from->cstat;
	to->picnum = from->picnum;
	to->shade = from->shade;
	to->pal = from->pal;
	to->clipdist = from->clipdist;
	to->xrepeat = from->xrepeat;
	to->yrepeat = from->yrepeat;
	to->xoffset = from->xoffset;
	to->yoffset = from->yoffset;
	to->sectnum = from->sectnum;
	to->statnum = from->statnum;
	to->ang = from->ang;
	to->owner = from->owner;
	to->xvel = from->xvel;
	to->yvel = from->yvel;
	to->zvel = from->zvel;
	to->lotag = from->lotag;
	to->hitag = from->hitag;
	to->extra = from->extra;
}

// Assembly:
movl (%rdi), %eax
movl %eax, (%rsi)
movl 0x4(%rdi), %eax
movl %eax, 0x4(%rsi)
movl 0x8(%rdi), %eax
movl %eax, 0x8(%rsi)
movzwl 0xc(%rdi), %eax
movw %ax, 0xc(%rsi)
movzwl 0xe(%rdi), %eax
movw %ax, 0x16(%rsi)
movb 0x10(%rdi), %al
movb %al, 0xe(%rsi)
movb 0x11(%rdi), %al
movb %al, 0xf(%rsi)
movb 0x12(%rdi), %al
movb %al, 0x10(%rsi)
movb 0x14(%rdi), %al
movb %al, 0x11(%rsi)
movb 0x15(%rdi), %al
movb %al, 0x12(%rsi)
movb 0x16(%rdi), %al
movb %al, 0x13(%rsi)
movb 0x17(%rdi), %al
movb %al, 0x14(%rsi)
movzwl 0x18(%rdi), %eax
movw %ax, 0x22(%rsi)
movzwl 0x1a(%rdi), %eax
movw %ax, 0x24(%rsi)
movzwl 0x1c(%rdi), %eax
movw %ax, 0x18(%rsi)
movzwl 0x1e(%rdi), %eax
movw %ax, 0x20(%rsi)
movzwl 0x20(%rdi), %eax
movw %ax, 0x1a(%rsi)
movzwl 0x22(%rdi), %eax
movw %ax, 0x1c(%rsi)
movzwl 0x24(%rdi), %eax
movw %ax, 0x1e(%rsi)
movzwl 0x26(%rdi), %eax
movw %ax, 0x26(%rsi)
movzwl 0x28(%rdi), %eax
movw %ax, 0x28(%rsi)
movzwl 0x2a(%rdi), %eax
movw %ax, 0x2a(%rsi)
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: clearallviews
void clearallviews(int dacol)
{
	if (qsetmode != 200) return;

#if USE_POLYMOST && USE_OPENGL
	if (rendmode == 3) {
		palette_t p;
		if (usegammabrightness) p = curpalette[dacol];
		else {
			p.r = britable[curbrightness][ curpalette[dacol].r ];
			p.g = britable[curbrightness][ curpalette[dacol].g ];
			p.b = britable[curbrightness][ curpalette[dacol].b ];
		}
		glfunc.glViewport(0,0,xdim,ydim); glox1 = -1;
		glfunc.glClearColor(((float)p.r)/255.0,
					  ((float)p.g)/255.0,
					  ((float)p.b)/255.0,
					  0);
		glfunc.glClear(GL_COLOR_BUFFER_BIT);
		return;
	}
#endif

	dacol += (dacol<<8); dacol += (dacol<<16);
	clearbuf((void*)frameplace,imageSize>>2,dacol);

	faketimerhandler();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0xc8, 0x184076(%rip)   # 0x1b7a28
jne 0x339e8
leaq 0x5c5f95(%rip), %rax    # 0x5f9950
cmpl $0x3, (%rax)
jne 0x339f3
cmpl $0x0, 0x6fdc5(%rip)     # 0xa378c
je 0x33a23
movslq %edi, %rdx
leaq 0x401fdd(%rip), %rsi    # 0x4359b0
leaq (%rsi,%rdx,4), %rax
leaq (%rsi,%rdx,4), %rcx
incq %rcx
leaq (%rsi,%rdx,4), %rdx
addq $0x2, %rdx
jmp 0x33a59
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
imull $0x1010101, %edi, %edx  # imm = 0x1010101
leaq 0x1496b0(%rip), %rax    # 0x17d0b0
movq (%rax), %rdi
leaq 0x14987e(%rip), %rax    # 0x17d288
movl (%rax), %esi
sarl $0x2, %esi
callq 0x4abc9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xab51
movslq 0x183fda(%rip), %rcx    # 0x1b7a04
movslq %edi, %rdx
leaq 0x401f7c(%rip), %rsi    # 0x4359b0
movzbl (%rsi,%rdx,4), %eax
shlq $0x8, %rcx
leaq 0x40276d(%rip), %rdi    # 0x4361b0
addq %rcx, %rdi
addq %rdi, %rax
movzbl 0x1(%rsi,%rdx,4), %ecx
addq %rdi, %rcx
movzbl 0x2(%rsi,%rdx,4), %edx
addq %rdi, %rdx
movzbl (%rax), %ebx
movzbl (%rcx), %ebp
movzbl (%rdx), %r14d
leaq 0x5c5cd6(%rip), %r15    # 0x5f9740
movl 0x3d357c(%rip), %edx    # 0x406fec
movl 0x3d357a(%rip), %ecx    # 0x406ff0
xorl %edi, %edi
xorl %esi, %esi
callq *0x80(%r15)
cvtsi2sd %ebx, %xmm0
movsd 0x424cb(%rip), %xmm2    # 0x75f58
divsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
leaq 0x5c5f2c(%rip), %rax    # 0x5f99c8
cvtsi2sd %ebp, %xmm1
divsd %xmm2, %xmm1
cvtsd2ss %xmm1, %xmm1
cvtsi2sd %r14d, %xmm3
movl $0xbf800000, (%rax)     # imm = 0xBF800000
divsd %xmm2, %xmm3
xorps %xmm2, %xmm2
cvtsd2ss %xmm3, %xmm2
xorps %xmm3, %xmm3
callq *(%r15)
movl $0x4000, %edi           # imm = 0x4000
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *0x8(%rax)
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: allocatepermanenttile
intptr_t allocatepermanenttile(short tilenume, int xsiz, int ysiz)
{
	int j, dasiz;

	if ((xsiz <= 0) || (ysiz <= 0) || ((unsigned)tilenume >= (unsigned)MAXTILES))
		return(0);

	dasiz = xsiz*ysiz;

	walock[tilenume] = 255;
	allocache((void **)&waloff[tilenume],dasiz,&walock[tilenume]);

	tilesizx[tilenume] = xsiz;
	tilesizy[tilenume] = ysiz;
	picanm[tilenume] = 0;

	j = 15; while ((j > 1) && (pow2long[j] > xsiz)) j--;
	picsiz[tilenume] = ((unsigned char)j);
	j = 15; while ((j > 1) && (pow2long[j] > ysiz)) j--;
	picsiz[tilenume] += ((unsigned char)(j<<4));

	return(waloff[tilenume]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movzwl %di, %r14d
xorl %eax, %eax
cmpl $0x23ff, %r14d          # imm = 0x23FF
ja 0x35116
movl %esi, %ebp
testl %esi, %esi
jle 0x35116
movl %edx, %ebx
testl %edx, %edx
jle 0x35116
movl %ebx, %esi
imull %ebp, %esi
leaq 0x3f86bf(%rip), %rdx    # 0x42d740
movb $-0x1, (%r14,%rdx)
addq %r14, %rdx
leaq 0x363250(%rip), %r15    # 0x3982e0
leaq (%r15,%r14,8), %rdi
callq 0x1f150
movl %r14d, %eax
addl %eax, %eax
leaq 0x3d9f7b(%rip), %rcx    # 0x40f020
movw %bp, (%rax,%rcx)
leaq 0x3cb730(%rip), %rcx    # 0x4007e0
movw %bx, (%rax,%rcx)
leaq 0x2049a5(%rip), %rax    # 0x239a60
movl $0x0, (%rax,%r14,4)
movl $0x10, %edx
leaq 0x6e6e1(%rip), %rcx     # 0xa37b0
leal -0x1(%rdx), %eax
cmpl %ebp, (%rcx,%rax,4)
jle 0x350e3
decl %edx
cmpl $0x2, %edx
ja 0x350cf
movl $0x1, %eax
leaq 0x3de766(%rip), %rdx    # 0x413850
movb %al, (%r14,%rdx)
movl $0x10, %edi
leal -0x1(%rdi), %esi
cmpl %ebx, (%rcx,%rsi,4)
jle 0x35107
decl %edi
cmpl $0x2, %edi
ja 0x350f3
movl $0x1, %esi
shlb $0x4, %sil
addb %al, %sil
movb %sil, (%r14,%rdx)
movq (%r15,%r14,8), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: qloadkvx
int qloadkvx(int voxindex, char *filename)
{
	int i, fil, dasiz, lengcnt, lengtot;
	unsigned char *ptr;

	if ((fil = kopen4load(filename,0)) == -1) return -1;

	lengcnt = 0;
	lengtot = kfilelength(fil);

	for(i=0;i<MAXVOXMIPS;i++)
	{
		kread(fil,&dasiz,4); dasiz = B_LITTLE32(dasiz);
			//Must store filenames to use cacheing system :(
		voxlock[voxindex][i] = 200;
		allocache((void **)&voxoff[voxindex][i],dasiz,&voxlock[voxindex][i]);
		ptr = (unsigned char *)voxoff[voxindex][i];
		kread(fil,ptr,dasiz);

		lengcnt += dasiz+4;
		if (lengcnt >= lengtot-768) break;
	}
	kclose(fil);

#if USE_POLYMOST && USE_OPENGL
	if (voxmodels[voxindex]) {
		voxfree(voxmodels[voxindex]);
		voxmodels[voxindex] = NULL;
	}
	voxmodels[voxindex] = voxload(filename);
#endif
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movl %edi, %r15d
xorl %ebx, %ebx
movq %rsi, %rdi
xorl %esi, %esi
callq 0x1ff50
cmpl $-0x1, %eax
je 0x353e9
movl %eax, %ebp
movq %r14, 0x10(%rsp)
movl %eax, %edi
callq 0x204d2
movl %eax, %r14d
movslq %r15d, %rax
addl $0xfffffd00, %r14d      # imm = 0xFFFFFD00
movq %rax, 0x8(%rsp)
leaq (%rax,%rax,4), %rax
leaq 0x350789(%rip), %r13    # 0x385ad0
addq %rax, %r13
leaq 0x32877f(%rip), %rcx    # 0x35dad0
leaq (%rcx,%rax,8), %r15
xorl %r12d, %r12d
movl %ebp, %edi
leaq 0x4(%rsp), %rsi
movl $0x4, %edx
callq 0x201c2
leaq (%r12,%r13), %rdx
movb $-0x38, (%r13,%r12)
movslq 0x4(%rsp), %rsi
movq %r15, %rdi
callq 0x1f150
movq (%r15), %rsi
movl 0x4(%rsp), %edx
movl %ebp, %edi
callq 0x201c2
movl 0x4(%rsp), %eax
addl %eax, %ebx
addl $0x4, %ebx
cmpl %r14d, %ebx
jge 0x353ae
leaq 0x1(%r12), %rax
addq $0x8, %r15
cmpq $0x4, %r12
movq %rax, %r12
jne 0x35358
movl %ebp, %edi
callq 0x20671
leaq 0x62dcb4(%rip), %rbx    # 0x663070
movq 0x8(%rsp), %r14
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x353d7
callq 0x5f446
movq $0x0, (%rbx,%r14,8)
movq 0x10(%rsp), %rdi
callq 0x5f483
movq %rax, (%rbx,%r14,8)
xorl %eax, %eax
jmp 0x353ee
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: clipinsidebox
int clipinsidebox(int x, int y, short wallnum, int walldist)
{
	walltype *wal;
	int x1, y1, x2, y2, r;

	r = (walldist<<1);
	wal = &wall[wallnum];     x1 = wal->x+walldist-x; y1 = wal->y+walldist-y;
	wal = &wall[wal->point2]; x2 = wal->x+walldist-x; y2 = wal->y+walldist-y;

	if ((x1 < 0) && (x2 < 0)) return(0);
	if ((y1 < 0) && (y2 < 0)) return(0);
	if ((x1 >= r) && (x2 >= r)) return(0);
	if ((y1 >= r) && (y2 >= r)) return(0);

	x2 -= x1; y2 -= y1;
	if (x2*(walldist-y1) >= y2*(walldist-x1))  //Front
	{
		if (x2 > 0) x2 *= (0-y1); else x2 *= (r-y1);
		if (y2 > 0) y2 *= (r-x1); else y2 *= (0-x1);
		return(x2 < y2);
	}
	if (x2 > 0) x2 *= (r-y1); else x2 *= (0-y1);
	if (y2 > 0) y2 *= (0-x1); else y2 *= (r-x1);
	return((x2 >= y2)<<1);
}

// Assembly:
movslq %edx, %r9
shlq $0x5, %r9
leaq 0x182645(%rip), %r10    # 0x1b7a50
movl %ecx, %edx
subl %edi, %edx
movl %ecx, %edi
subl %esi, %edi
movl 0x4(%r9,%r10), %esi
addl %edi, %esi
movswq 0x8(%r9,%r10), %rax
shlq $0x5, %rax
movl (%rax,%r10), %r8d
addl 0x4(%rax,%r10), %edi
addl %edx, %r8d
xorl %eax, %eax
addl (%r9,%r10), %edx
jns 0x3543e
testl %r8d, %r8d
jns 0x3543e
retq
testl %esi, %esi
jns 0x35446
testl %edi, %edi
js 0x3543d
leal (%rcx,%rcx), %r11d
movl %r11d, %r9d
subl %edx, %r9d
jg 0x35457
cmpl %r11d, %r8d
jge 0x3543d
movl %r11d, %r10d
subl %esi, %r10d
jg 0x35464
cmpl %r11d, %edi
jge 0x3543d
subl %edx, %r8d
subl %esi, %edi
movl %ecx, %eax
subl %esi, %eax
imull %r8d, %eax
subl %edx, %ecx
imull %edi, %ecx
cmpl %ecx, %eax
jge 0x354a5
imull %r8d, %r10d
imull %r8d, %esi
negl %esi
testl %r8d, %r8d
cmovgl %r10d, %esi
imull %edi, %edx
negl %edx
imull %edi, %r9d
testl %edi, %edi
cmovgl %edx, %r9d
xorl %eax, %eax
cmpl %r9d, %esi
setge %al
addl %eax, %eax
retq
imull %r8d, %esi
negl %esi
imull %r8d, %r10d
testl %r8d, %r8d
cmovgl %esi, %r10d
imull %edi, %r9d
imull %edi, %edx
negl %edx
testl %edi, %edi
cmovgl %r9d, %edx
xorl %eax, %eax
cmpl %edx, %r10d
setl %al
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: clipinsideboxline
int clipinsideboxline(int x, int y, int x1, int y1, int x2, int y2, int walldist)
{
	int r;

	r = (walldist<<1);

	x1 += walldist-x; x2 += walldist-x;
	if ((x1 < 0) && (x2 < 0)) return(0);
	if ((x1 >= r) && (x2 >= r)) return(0);

	y1 += walldist-y; y2 += walldist-y;
	if ((y1 < 0) && (y2 < 0)) return(0);
	if ((y1 >= r) && (y2 >= r)) return(0);

	x2 -= x1; y2 -= y1;
	if (x2*(walldist-y1) >= y2*(walldist-x1))  //Front
	{
		if (x2 > 0) x2 *= (0-y1); else x2 *= (r-y1);
		if (y2 > 0) y2 *= (r-x1); else y2 *= (0-x1);
		return(x2 < y2);
	}
	if (x2 > 0) x2 *= (r-y1); else x2 *= (0-y1);
	if (y2 > 0) y2 *= (0-x1); else y2 *= (r-x1);
	return((x2 >= y2)<<1);
}

// Assembly:
pushq %rbp
pushq %rbx
movl 0x18(%rsp), %r11d
movl %r11d, %r10d
subl %edi, %r10d
addl %r10d, %edx
addl %r8d, %r10d
xorl %eax, %eax
testl %r10d, %edx
js 0x355a4
leal (%r11,%r11), %ebx
movl %ebx, %edi
subl %edx, %edi
setg %r8b
cmpl %ebx, %r10d
setl %bpl
orb %r8b, %bpl
cmpb $0x1, %bpl
jne 0x355a4
movl %r11d, %r8d
subl %esi, %r8d
addl %r8d, %ecx
addl %r9d, %r8d
testl %r8d, %ecx
js 0x355a4
movl %ebx, %esi
subl %ecx, %esi
setg %r9b
cmpl %ebx, %r8d
setl %bl
orb %r9b, %bl
cmpb $0x1, %bl
jne 0x355a4
subl %edx, %r10d
subl %ecx, %r8d
movl %r11d, %eax
subl %ecx, %eax
imull %r10d, %eax
subl %edx, %r11d
imull %r8d, %r11d
cmpl %r11d, %eax
jge 0x3557d
imull %r10d, %esi
imull %r10d, %ecx
negl %ecx
testl %r10d, %r10d
cmovgl %esi, %ecx
imull %r8d, %edx
negl %edx
imull %r8d, %edi
testl %r8d, %r8d
cmovgl %edx, %edi
xorl %eax, %eax
cmpl %edi, %ecx
setge %al
addl %eax, %eax
jmp 0x355a4
imull %r10d, %ecx
negl %ecx
imull %r10d, %esi
testl %r10d, %r10d
cmovgl %ecx, %esi
imull %r8d, %edi
imull %r8d, %edx
negl %edx
testl %r8d, %r8d
cmovgl %edi, %edx
xorl %eax, %eax
cmpl %edx, %esi
setl %al
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: inside
int inside(int x, int y, short sectnum)
{
	walltype *wal;
	int i, x1, y1, x2, y2;
	unsigned int cnt;

	if ((sectnum < 0) || (sectnum >= numsectors)) return(-1);

	cnt = 0;
	wal = &wall[sector[sectnum].wallptr];
	i = sector[sectnum].wallnum;
	do
	{
		y1 = wal->y-y; y2 = wall[wal->point2].y-y;
		if ((y1^y2) < 0)
		{
			x1 = wal->x-x; x2 = wall[wal->point2].x-x;
			if ((x1^x2) >= 0) cnt ^= x1; else cnt ^= (x1*y2-x2*y1)^y2;
		}
		wal++; i--;
	} while (i);
	return(cnt>>31);
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testw %dx, %dx
js 0x35642
cmpw %dx, 0x3999a4(%rip)     # 0x3cef60
jle 0x35642
pushq %rbp
pushq %rbx
movzwl %dx, %eax
leaq (%rax,%rax,4), %rax
leaq 0x20d48e(%rip), %rcx    # 0x242a60
movswq (%rcx,%rax,8), %r8
movswl 0x2(%rcx,%rax,8), %ecx
shlq $0x5, %r8
leaq 0x182469(%rip), %rdx    # 0x1b7a50
addq %rdx, %r8
addq $0x8, %r8
xorl %eax, %eax
movl -0x4(%r8), %r9d
subl %esi, %r9d
movswq (%r8), %rbx
shlq $0x5, %rbx
movl 0x4(%rbx,%rdx), %r10d
subl %esi, %r10d
movl %r10d, %r11d
xorl %r9d, %r11d
jns 0x35635
addq %rdx, %rbx
movl -0x8(%r8), %r11d
subl %edi, %r11d
movl (%rbx), %ebx
subl %edi, %ebx
movl %ebx, %ebp
xorl %r11d, %ebp
jns 0x35632
imull %r10d, %r11d
imull %r9d, %ebx
subl %ebx, %r11d
xorl %r10d, %eax
xorl %r11d, %eax
addq $0x20, %r8
decl %ecx
jne 0x355f0
shrl $0x1f, %eax
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: getangle
int getangle(int xvect, int yvect)
{
	if ((xvect|yvect) == 0) return(0);
	if (xvect == 0) return(512+((yvect<0)<<10));
	if (yvect == 0) return(((xvect<0)<<10));
	if (xvect == yvect) return(256+((xvect<0)<<10));
	if (xvect == -yvect) return(768+((xvect>0)<<10));
	if (klabs(xvect) > klabs(yvect))
		return(((radarang[640+scale(160,yvect,xvect)]>>6)+((xvect<0)<<10))&2047);
	return(((radarang[640-scale(160,xvect,yvect)]>>6)+512+((yvect<0)<<10))&2047);
}

// Assembly:
movl %esi, %eax
orl %edi, %eax
je 0x35666
testl %edi, %edi
je 0x3566a
testl %esi, %esi
je 0x3567b
cmpl %esi, %edi
jne 0x35689
shrl $0x15, %edi
andl $0x400, %edi            # imm = 0x400
orl $0x100, %edi            # imm = 0x100
jmp 0x35684
xorl %esi, %esi
jmp 0x35686
shrl $0x15, %esi
andl $0x400, %esi            # imm = 0x400
orl $0x200, %esi            # imm = 0x200
jmp 0x35686
shrl $0x15, %edi
andl $0x400, %edi            # imm = 0x400
movl %edi, %esi
movl %esi, %eax
retq
movl %esi, %eax
addl %edi, %eax
jne 0x356a2
xorl %esi, %esi
testl %edi, %edi
setg %sil
shll $0xa, %esi
orl $0x300, %esi            # imm = 0x300
jmp 0x35686
movabsq $0x28000000000, %rcx    # imm = 0x28000000000
movl %edi, %eax
negl %eax
cmovsl %edi, %eax
movl %esi, %edx
negl %edx
cmovsl %esi, %edx
cmpl %edx, %eax
jbe 0x356fd
movslq %esi, %rax
shlq $0x5, %rax
leaq (%rax,%rax,4), %rax
movslq %edi, %rsi
cqto
idivq %rsi
shlq $0x20, %rax
addq %rcx, %rax
sarq $0x1f, %rax
leaq 0x3fa45d(%rip), %rcx    # 0x42fb40
movswl (%rax,%rcx), %eax
sarl $0x6, %eax
shrl $0x15, %edi
andl $0x400, %edi            # imm = 0x400
addl %eax, %edi
andl $0x7ff, %edi            # imm = 0x7FF
jmp 0x35684
movslq %edi, %rax
shlq $0x5, %rax
leaq (%rax,%rax,4), %rax
movslq %esi, %rdi
cqto
idivq %rdi
shlq $0x20, %rax
subq %rax, %rcx
sarq $0x1f, %rcx
leaq 0x3fa41e(%rip), %rax    # 0x42fb40
movswl (%rcx,%rax), %eax
sarl $0x6, %eax
shrl $0x15, %esi
andl $0x400, %esi            # imm = 0x400
addl %eax, %esi
addl $0x200, %esi            # imm = 0x200
andl $0x7ff, %esi            # imm = 0x7FF
jmp 0x35686
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: setsprite
int setsprite(short spritenum, int newx, int newy, int newz)
{
	short tempsectnum;

	sprite[spritenum].x = newx;
	sprite[spritenum].y = newy;
	sprite[spritenum].z = newz;

	tempsectnum = sprite[spritenum].sectnum;
	updatesector(newx,newy,&tempsectnum);
	if (tempsectnum < 0)
		return(-1);
	if (tempsectnum != sprite[spritenum].sectnum)
		changespritesect(spritenum,tempsectnum);

	return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movslq %edi, %rax
imulq $0x2c, %rax, %rax
leaq 0x2464ed(%rip), %rdi    # 0x27bcb0
movl %esi, (%rax,%rdi)
movl %edx, 0x4(%rax,%rdi)
movl %ecx, 0x8(%rax,%rdi)
movzwl 0x18(%rax,%rdi), %r15d
leaq 0x6(%rsp), %r14
movw %r15w, (%r14)
movl %esi, %edi
movl %edx, %esi
movq %r14, %rdx
callq 0x25f34
movzwl (%r14), %eax
testw %ax, %ax
js 0x35807
xorl %ebp, %ebp
cmpw %r15w, %ax
je 0x3580c
movswl %bx, %edi
movswl %ax, %esi
callq 0x35819
jmp 0x3580c
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: changespritesect
int changespritesect(short spritenum, short newsectnum)
{
	if ((newsectnum < 0) || (newsectnum > MAXSECTORS)) return(-1);
	if (sprite[spritenum].sectnum == newsectnum) return(0);
	if (sprite[spritenum].sectnum == MAXSECTORS) return(-1);
	if (deletespritesect(spritenum) < 0) return(-1);
	insertspritesect(newsectnum);
	return(0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movzwl %bp, %eax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x1000, %eax           # imm = 0x1000
ja 0x35866
movswq %di, %rax
imulq $0x2c, %rax, %rax
leaq 0x246474(%rip), %rcx    # 0x27bcb0
movzwl 0x18(%rax,%rcx), %eax
cmpw %bp, %ax
je 0x35864
movzwl %ax, %eax
cmpl $0x1000, %eax           # imm = 0x1000
je 0x35866
movswl %di, %edi
callq 0x35c01
testl %eax, %eax
js 0x35866
movswl %bp, %edi
callq 0x35acd
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: setspritez
int setspritez(short spritenum, int newx, int newy, int newz)
{
	short tempsectnum;

	sprite[spritenum].x = newx;
	sprite[spritenum].y = newy;
	sprite[spritenum].z = newz;

	tempsectnum = sprite[spritenum].sectnum;
	updatesectorz(newx,newy,newz,&tempsectnum);
	if (tempsectnum < 0)
		return(-1);
	if (tempsectnum != sprite[spritenum].sectnum)
		changespritesect(spritenum,tempsectnum);

	return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
movslq %edi, %rax
imulq $0x2c, %rax, %rax
leaq 0x24642a(%rip), %rdi    # 0x27bcb0
movl %esi, (%rax,%rdi)
movl %edx, 0x4(%rax,%rdi)
movl %ecx, 0x8(%rax,%rdi)
movzwl 0x18(%rax,%rdi), %r15d
leaq 0x6(%rsp), %r14
movw %r15w, (%r14)
movl %esi, %edi
movl %edx, %esi
movl %ecx, %edx
movq %r14, %rcx
callq 0x358de
movzwl (%r14), %eax
testw %ax, %ax
js 0x358cc
xorl %ebp, %ebp
cmpw %r15w, %ax
je 0x358d1
movswl %bx, %edi
movswl %ax, %esi
callq 0x35819
jmp 0x358d1
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: updatesectorz
void updatesectorz(int x, int y, int z, short *sectnum)
{
	walltype *wal;
	int i, j, cz, fz;

	getzsofslope(*sectnum, x, y, &cz, &fz);
	if ((z >= cz) && (z <= fz))
		if (inside(x,y,*sectnum) != 0) return;

	if ((*sectnum >= 0) && (*sectnum < numsectors))
	{
		wal = &wall[sector[*sectnum].wallptr];
		j = sector[*sectnum].wallnum;
		do
		{
			i = wal->nextsector;
			if (i >= 0)
			{
				getzsofslope(i, x, y, &cz, &fz);
				if ((z >= cz) && (z <= fz))
					if (inside(x,y,(short)i) == 1)
						{ *sectnum = i; return; }
			}
			wal++; j--;
		} while (j != 0);
	}

	for (i=numsectors-1;i>=0;i--)
	{
		getzsofslope(i, x, y, &cz, &fz);
		if ((z >= cz) && (z <= fz))
			if (inside(x,y,(short)i) == 1)
				{ *sectnum = i; return; }
	}

	*sectnum = -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movl %edx, %ebp
movl %esi, %edx
movl %edi, %r15d
movswl (%rcx), %r12d
leaq 0x8(%rsp), %rbx
leaq 0x4(%rsp), %r8
movl %r12d, %edi
movl %r15d, %esi
movl %edx, (%rsp)
movq %rbx, %rcx
callq 0x2600d
cmpl %ebp, (%rbx)
jg 0x35935
cmpl %ebp, 0x4(%rsp)
jl 0x35935
movl %r15d, %edi
movl (%rsp), %esi
movl %r12d, %edx
callq 0x355a7
testl %eax, %eax
jne 0x35a40
movq %r14, 0x10(%rsp)
movslq %r12d, %rax
testw %ax, %ax
setns %cl
movzwl 0x399616(%rip), %edx    # 0x3cef60
movw %dx, 0xe(%rsp)
cmpw %dx, %ax
setl %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x359d1
leaq (%rax,%rax,4), %rax
leaq 0x20d0f9(%rip), %rcx    # 0x242a60
movswq (%rcx,%rax,8), %rdx
movswl 0x2(%rcx,%rax,8), %r13d
shlq $0x5, %rdx
leaq 0x1820d3(%rip), %rax    # 0x1b7a50
leaq (%rdx,%rax), %r14
addq $0xc, %r14
movzwl (%r14), %r12d
testw %r12w, %r12w
js 0x359c8
movswl %r12w, %ebx
movl %ebx, %edi
movl %r15d, %esi
movl (%rsp), %edx
leaq 0x8(%rsp), %rcx
leaq 0x4(%rsp), %r8
callq 0x2600d
cmpl %ebp, 0x8(%rsp)
jg 0x359c8
cmpl %ebp, 0x4(%rsp)
jl 0x359c8
movl %r15d, %edi
movl (%rsp), %esi
movl %ebx, %edx
callq 0x355a7
cmpl $0x1, %eax
je 0x35a37
addq $0x20, %r14
decl %r13d
jne 0x35985
movw $0xffff, %r12w          # imm = 0xFFFF
movzwl 0xe(%rsp), %eax
testw %ax, %ax
jle 0x35a37
movzwl %ax, %ebx
incl %ebx
leaq 0x4(%rsp), %r13
leal 0xfffe(%rbx), %r14d
movswl %r14w, %edi
movl %r15d, %esi
movl (%rsp), %edx
leaq 0x8(%rsp), %rcx
movq %r13, %r8
callq 0x2600d
cmpl %ebp, 0x8(%rsp)
jg 0x35a28
cmpl %ebp, 0x4(%rsp)
jl 0x35a28
movswl %r14w, %edx
movl %r15d, %edi
movl (%rsp), %esi
callq 0x355a7
cmpl $0x1, %eax
je 0x35a31
decl %ebx
cmpl $0x1, %ebx
jg 0x359ea
jmp 0x35a37
addl $-0x2, %ebx
movl %ebx, %r12d
movq 0x10(%rsp), %rax
movw %r12w, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: insertspritestat
static int insertspritestat(short statnum)
{
	short blanktouse;

	if ((statnum >= MAXSTATUS) || (headspritestat[MAXSTATUS] == -1))
		return(-1);  //list full

	blanktouse = headspritestat[MAXSTATUS];

	headspritestat[MAXSTATUS] = nextspritestat[blanktouse];
	if (headspritestat[MAXSTATUS] >= 0)
		prevspritestat[headspritestat[MAXSTATUS]] = -1;

	prevspritestat[blanktouse] = -1;
	nextspritestat[blanktouse] = headspritestat[statnum];
	if (headspritestat[statnum] >= 0)
		prevspritestat[headspritestat[statnum]] = blanktouse;
	headspritestat[statnum] = blanktouse;

	sprite[blanktouse].statnum = statnum;

	return(blanktouse);
}

// Assembly:
cmpl $0x400, %edi            # imm = 0x400
setge %cl
movzwl 0x3882c1(%rip), %eax    # 0x3bdd20
cmpw $-0x1, %ax
sete %dl
orb %cl, %dl
jne 0x35acc
movswq %ax, %rax
leaq 0x3902bb(%rip), %rcx    # 0x3c5d30
movswq (%rcx,%rax,2), %rsi
movw %si, 0x38829f(%rip)     # 0x3bdd20
leaq 0x3882a8(%rip), %rdx    # 0x3bdd30
testq %rsi, %rsi
js 0x35a93
movw $0xffff, (%rdx,%rsi,2)  # imm = 0xFFFF
movw $0xffff, (%rdx,%rax,2)  # imm = 0xFFFF
movswq %di, %rsi
leaq 0x387a7c(%rip), %rdi    # 0x3bd520
movswq (%rdi,%rsi,2), %r8
movw %r8w, (%rcx,%rax,2)
testq %r8, %r8
js 0x35ab8
movw %ax, (%rdx,%r8,2)
movw %ax, (%rdi,%rsi,2)
imulq $0x2c, %rax, %rax
leaq 0x2461e9(%rip), %rcx    # 0x27bcb0
movw %si, 0x1a(%rax,%rcx)
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: insertspritesect
static int insertspritesect(short sectnum)
{
	short blanktouse;

	if ((sectnum >= MAXSECTORS) || (headspritesect[MAXSECTORS] == -1))
		return(-1);  //list full

	blanktouse = headspritesect[MAXSECTORS];

	headspritesect[MAXSECTORS] = nextspritesect[blanktouse];
	if (headspritesect[MAXSECTORS] >= 0)
		prevspritesect[headspritesect[MAXSECTORS]] = -1;

	prevspritesect[blanktouse] = -1;
	nextspritesect[blanktouse] = headspritesect[sectnum];
	if (headspritesect[sectnum] >= 0)
		prevspritesect[headspritesect[sectnum]] = blanktouse;
	headspritesect[sectnum] = blanktouse;

	sprite[blanktouse].sectnum = sectnum;

	return(blanktouse);
}

// Assembly:
cmpl $0x1000, %edi           # imm = 0x1000
setge %al
movzwl 0x377a33(%rip), %ecx    # 0x3ad510
cmpw $-0x1, %cx
sete %dl
orb %al, %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x35b52
movswq %cx, %rcx
leaq 0x37fa28(%rip), %rax    # 0x3b5520
movswq (%rax,%rcx,2), %rsi
movw %si, 0x377a0c(%rip)     # 0x3ad510
leaq 0x377a15(%rip), %rdx    # 0x3ad520
testq %rsi, %rsi
js 0x35b16
movw $0xffff, (%rdx,%rsi,2)  # imm = 0xFFFF
movw $0xffff, (%rdx,%rcx,2)  # imm = 0xFFFF
movswq %di, %rsi
leaq 0x3759e9(%rip), %rdi    # 0x3ab510
movswq (%rdi,%rsi,2), %r8
movw %r8w, (%rax,%rcx,2)
testq %r8, %r8
js 0x35b3b
movw %cx, (%rdx,%r8,2)
movswl %cx, %eax
movw %cx, (%rdi,%rsi,2)
imulq $0x2c, %rcx, %rcx
leaq 0x246163(%rip), %rdx    # 0x27bcb0
movw %si, 0x18(%rcx,%rdx)
retq
// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: deletespritestat
static int deletespritestat(short deleteme)
{
	if (sprite[deleteme].statnum == MAXSTATUS)
		return(-1);

	if (headspritestat[sprite[deleteme].statnum] == deleteme)
		headspritestat[sprite[deleteme].statnum] = nextspritestat[deleteme];

	if (prevspritestat[deleteme] >= 0) nextspritestat[prevspritestat[deleteme]] = nextspritestat[deleteme];
	if (nextspritestat[deleteme] >= 0) prevspritestat[nextspritestat[deleteme]] = prevspritestat[deleteme];

	if (headspritestat[MAXSTATUS] >= 0) prevspritestat[headspritestat[MAXSTATUS]] = deleteme;
	prevspritestat[deleteme] = -1;
	nextspritestat[deleteme] = headspritestat[MAXSTATUS];
	headspritestat[MAXSTATUS] = deleteme;

	sprite[deleteme].statnum = MAXSTATUS;
	return(0);
}

// Assembly:
movslq %edi, %rcx
imulq $0x2c, %rcx, %rdx
leaq 0x24613f(%rip), %rsi    # 0x27bcb0
movswq 0x1a(%rdx,%rsi), %r8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x400, %r8             # imm = 0x400
je 0x35c00
leaq 0x387994(%rip), %r9     # 0x3bd520
leaq 0x39019d(%rip), %rax    # 0x3c5d30
cmpw %di, (%r9,%r8,2)
jne 0x35ba4
movzwl (%rax,%rcx,2), %r10d
movw %r10w, (%r9,%r8,2)
leaq 0x388185(%rip), %r8     # 0x3bdd30
movswq (%r8,%rcx,2), %r9
testq %r9, %r9
js 0x35bbf
movzwl (%rax,%rcx,2), %r10d
movw %r10w, (%rax,%r9,2)
movswq (%rax,%rcx,2), %r10
testq %r10, %r10
js 0x35bce
movw %r9w, (%r8,%r10,2)
addq %rsi, %rdx
addq $0x1a, %rdx
movswq 0x388143(%rip), %rsi    # 0x3bdd20
testq %rsi, %rsi
js 0x35be7
movw %di, (%r8,%rsi,2)
movw $0xffff, (%r8,%rcx,2)   # imm = 0xFFFF
movw %si, (%rax,%rcx,2)
movw %di, 0x388127(%rip)     # 0x3bdd20
movw $0x400, (%rdx)          # imm = 0x400
xorl %eax, %eax
retq