LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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 0x246295(%rip), %rdi    # 0x27ccb0
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 0x2668d
movzwl (%r14), %eax
testw %ax, %ax
js 0x36a5f
xorl %ebp, %ebp
cmpw %r15w, %ax
je 0x36a64
movswl %bx, %edi
movswl %ax, %esi
callq 0x36a71
jmp 0x36a64
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_O3/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 0x36abe
movswq %di, %rax
imulq $0x2c, %rax, %rax
leaq 0x24621c(%rip), %rcx    # 0x27ccb0
movzwl 0x18(%rax,%rcx), %eax
cmpw %bp, %ax
je 0x36abc
movzwl %ax, %eax
cmpl $0x1000, %eax           # imm = 0x1000
je 0x36abe
movswl %di, %edi
callq 0x36e59
testl %eax, %eax
js 0x36abe
movswl %bp, %edi
callq 0x36d25
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x2461d2(%rip), %rdi    # 0x27ccb0
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 0x36b36
movzwl (%r14), %eax
testw %ax, %ax
js 0x36b24
xorl %ebp, %ebp
cmpw %r15w, %ax
je 0x36b29
movswl %bx, %edi
movswl %ax, %esi
callq 0x36a71
jmp 0x36b29
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_O3/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 0x26766
cmpl %ebp, (%rbx)
jg 0x36b8d
cmpl %ebp, 0x4(%rsp)
jl 0x36b8d
movl %r15d, %edi
movl (%rsp), %esi
movl %r12d, %edx
callq 0x367f7
testl %eax, %eax
jne 0x36c98
movq %r14, 0x10(%rsp)
movslq %r12d, %rax
testw %ax, %ax
setns %cl
movzwl 0x3993be(%rip), %edx    # 0x3cff60
movw %dx, 0xe(%rsp)
cmpw %dx, %ax
setl %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x36c29
leaq (%rax,%rax,4), %rax
leaq 0x20cea1(%rip), %rcx    # 0x243a60
movswq (%rcx,%rax,8), %rdx
movswl 0x2(%rcx,%rax,8), %r13d
shlq $0x5, %rdx
leaq 0x181e7b(%rip), %rax    # 0x1b8a50
leaq (%rdx,%rax), %r14
addq $0xc, %r14
movzwl (%r14), %r12d
testw %r12w, %r12w
js 0x36c20
movswl %r12w, %ebx
movl %ebx, %edi
movl %r15d, %esi
movl (%rsp), %edx
leaq 0x8(%rsp), %rcx
leaq 0x4(%rsp), %r8
callq 0x26766
cmpl %ebp, 0x8(%rsp)
jg 0x36c20
cmpl %ebp, 0x4(%rsp)
jl 0x36c20
movl %r15d, %edi
movl (%rsp), %esi
movl %ebx, %edx
callq 0x367f7
cmpl $0x1, %eax
je 0x36c8f
addq $0x20, %r14
decl %r13d
jne 0x36bdd
movw $0xffff, %r12w          # imm = 0xFFFF
movzwl 0xe(%rsp), %eax
testw %ax, %ax
jle 0x36c8f
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 0x26766
cmpl %ebp, 0x8(%rsp)
jg 0x36c80
cmpl %ebp, 0x4(%rsp)
jl 0x36c80
movswl %r14w, %edx
movl %r15d, %edi
movl (%rsp), %esi
callq 0x367f7
cmpl $0x1, %eax
je 0x36c89
decl %ebx
cmpl $0x1, %ebx
ja 0x36c42
jmp 0x36c8f
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_O3/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 0x388069(%rip), %eax    # 0x3bed20
cmpw $-0x1, %ax
sete %dl
orb %cl, %dl
jne 0x36d24
movswq %ax, %rax
leaq 0x390063(%rip), %rcx    # 0x3c6d30
movswq (%rcx,%rax,2), %rsi
movw %si, 0x388047(%rip)     # 0x3bed20
leaq 0x388050(%rip), %rdx    # 0x3bed30
testq %rsi, %rsi
js 0x36ceb
movw $0xffff, (%rdx,%rsi,2)  # imm = 0xFFFF
movw $0xffff, (%rdx,%rax,2)  # imm = 0xFFFF
movswq %di, %rsi
leaq 0x387824(%rip), %rdi    # 0x3be520
movswq (%rdi,%rsi,2), %r8
movw %r8w, (%rcx,%rax,2)
testq %r8, %r8
js 0x36d10
movw %ax, (%rdx,%r8,2)
movw %ax, (%rdi,%rsi,2)
imulq $0x2c, %rax, %rax
leaq 0x245f91(%rip), %rcx    # 0x27ccb0
movw %si, 0x1a(%rax,%rcx)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3777db(%rip), %ecx    # 0x3ae510
cmpw $-0x1, %cx
sete %dl
orb %al, %dl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jne 0x36daa
movswq %cx, %rcx
leaq 0x37f7d0(%rip), %rax    # 0x3b6520
movswq (%rax,%rcx,2), %rsi
movw %si, 0x3777b4(%rip)     # 0x3ae510
leaq 0x3777bd(%rip), %rdx    # 0x3ae520
testq %rsi, %rsi
js 0x36d6e
movw $0xffff, (%rdx,%rsi,2)  # imm = 0xFFFF
movw $0xffff, (%rdx,%rcx,2)  # imm = 0xFFFF
movswq %di, %rsi
leaq 0x375791(%rip), %rdi    # 0x3ac510
movswq (%rdi,%rsi,2), %r8
movw %r8w, (%rax,%rcx,2)
testq %r8, %r8
js 0x36d93
movw %cx, (%rdx,%r8,2)
movswl %cx, %eax
movw %cx, (%rdi,%rsi,2)
imulq $0x2c, %rcx, %rcx
leaq 0x245f0b(%rip), %rdx    # 0x27ccb0
movw %si, 0x18(%rcx,%rdx)
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x245ee7(%rip), %rsi    # 0x27ccb0
movswq 0x1a(%rdx,%rsi), %r8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x400, %r8             # imm = 0x400
je 0x36e58
leaq 0x38773c(%rip), %r9     # 0x3be520
leaq 0x38ff45(%rip), %rax    # 0x3c6d30
cmpw %di, (%r9,%r8,2)
jne 0x36dfc
movzwl (%rax,%rcx,2), %r10d
movw %r10w, (%r9,%r8,2)
leaq 0x387f2d(%rip), %r8     # 0x3bed30
movswq (%r8,%rcx,2), %r9
movzwl (%rax,%rcx,2), %r10d
testq %r9, %r9
js 0x36e17
movw %r10w, (%rax,%r9,2)
testw %r10w, %r10w
js 0x36e26
movzwl %r10w, %r10d
movw %r9w, (%r8,%r10,2)
addq %rsi, %rdx
addq $0x1a, %rdx
movswq 0x387eeb(%rip), %rsi    # 0x3bed20
testq %rsi, %rsi
js 0x36e3f
movw %di, (%r8,%rsi,2)
movw $0xffff, (%r8,%rcx,2)   # imm = 0xFFFF
movw %si, (%rax,%rcx,2)
movw %di, 0x387ecf(%rip)     # 0x3bed20
movw $0x400, (%rdx)          # imm = 0x400
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: deletespritesect
static int deletespritesect(short deleteme)
{
	if (sprite[deleteme].sectnum == MAXSECTORS)
		return(-1);

	if (headspritesect[sprite[deleteme].sectnum] == deleteme)
		headspritesect[sprite[deleteme].sectnum] = nextspritesect[deleteme];

	if (prevspritesect[deleteme] >= 0) nextspritesect[prevspritesect[deleteme]] = nextspritesect[deleteme];
	if (nextspritesect[deleteme] >= 0) prevspritesect[nextspritesect[deleteme]] = prevspritesect[deleteme];

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

	sprite[deleteme].sectnum = MAXSECTORS;
	return(0);
}

// Assembly:
movslq %edi, %rcx
imulq $0x2c, %rcx, %rdx
leaq 0x245e49(%rip), %rsi    # 0x27ccb0
movswq 0x18(%rdx,%rsi), %r8
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq $0x1000, %r8            # imm = 0x1000
je 0x36ef6
leaq 0x37568e(%rip), %r9     # 0x3ac510
leaq 0x37f697(%rip), %rax    # 0x3b6520
cmpw %di, (%r9,%r8,2)
jne 0x36e9a
movzwl (%rax,%rcx,2), %r10d
movw %r10w, (%r9,%r8,2)
leaq 0x37767f(%rip), %r8     # 0x3ae520
movswq (%r8,%rcx,2), %r9
movzwl (%rax,%rcx,2), %r10d
testq %r9, %r9
js 0x36eb5
movw %r10w, (%rax,%r9,2)
testw %r10w, %r10w
js 0x36ec4
movzwl %r10w, %r10d
movw %r9w, (%r8,%r10,2)
addq %rsi, %rdx
addq $0x18, %rdx
movswq 0x37763d(%rip), %rsi    # 0x3ae510
testq %rsi, %rsi
js 0x36edd
movw %di, (%r8,%rsi,2)
movw $0xffff, (%r8,%rcx,2)   # imm = 0xFFFF
movw %si, (%rax,%rcx,2)
movw %di, 0x377621(%rip)     # 0x3ae510
movw $0x1000, (%rdx)         # imm = 0x1000
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: changespritestat
int changespritestat(short spritenum, short newstatnum)
{
	if ((newstatnum < 0) || (newstatnum > MAXSTATUS)) return(-1);
	if (sprite[spritenum].statnum == newstatnum) return(0);
	if (sprite[spritenum].statnum == MAXSTATUS) return(-1);
	if (deletespritestat(spritenum) < 0) return(-1);
	insertspritestat(newstatnum);
	return(0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movzwl %bp, %eax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpl $0x400, %eax            # imm = 0x400
ja 0x36f44
movswq %di, %rax
imulq $0x2c, %rax, %rax
leaq 0x245d96(%rip), %rcx    # 0x27ccb0
movzwl 0x1a(%rax,%rcx), %eax
cmpw %bp, %ax
je 0x36f42
movzwl %ax, %eax
cmpl $0x400, %eax            # imm = 0x400
je 0x36f44
movswl %di, %edi
callq 0x36dbb
testl %eax, %eax
js 0x36f44
movswl %bp, %edi
callq 0x36ca7
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: rintersect
static int rintersect(int x1, int y1, int z1, int vx, int vy, int vz, int x3,
		  int y3, int x4, int y4, int *intx, int *inty, int *intz)
{     //p1 towards p2 is a ray
	int x34, y34, x31, y31, bot, topt, topu, t;

	x34 = x3-x4; y34 = y3-y4;
	bot = vx*y34 - vy*x34;
	if (bot >= 0)
	{
		if (bot == 0) return(0);
		x31 = x3-x1; y31 = y3-y1;
		topt = x31*y34 - y31*x34; if (topt < 0) return(0);
		topu = vx*y31 - vy*x31; if ((topu < 0) || (topu >= bot)) return(0);
	}
	else
	{
		x31 = x3-x1; y31 = y3-y1;
		topt = x31*y34 - y31*x34; if (topt > 0) return(0);
		topu = vx*y31 - vy*x31; if ((topu > 0) || (topu <= bot)) return(0);
	}
	t = divscale16(topt,bot);
	*intx = x1 + mulscale16(vx,t);
	*inty = y1 + mulscale16(vy,t);
	*intz = z1 + mulscale16(vz,t);
	return(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r10d
movl 0x38(%rsp), %ebx
movl 0x30(%rsp), %ebp
movl %ebp, %r14d
subl 0x40(%rsp), %r14d
movl %ebx, %r11d
subl 0x48(%rsp), %r11d
movl %r11d, %r15d
imull %ecx, %r15d
movl %r14d, %r12d
imull %r8d, %r12d
movl %r15d, %edx
subl %r12d, %edx
js 0x38405
xorl %eax, %eax
cmpl %r12d, %r15d
je 0x38483
subl %edi, %ebp
subl %esi, %ebx
imull %ebp, %r11d
imull %ebx, %r14d
subl %r14d, %r11d
js 0x38483
imull %ecx, %ebx
imull %r8d, %ebp
subl %ebp, %ebx
cmpl %edx, %ebx
jae 0x38483
movl %r11d, %eax
shlq $0x10, %rax
movl %edx, %r11d
xorl %edx, %edx
divq %r11
jmp 0x3843e
subl %edi, %ebp
subl %esi, %ebx
imull %ebp, %r11d
imull %ebx, %r14d
xorl %eax, %eax
subl %r14d, %r11d
jg 0x38483
imull %ecx, %ebx
imull %r8d, %ebp
subl %ebp, %ebx
setg %bpl
cmpl %edx, %ebx
setle %bl
orb %bpl, %bl
jne 0x38483
movslq %r11d, %rax
shlq $0x10, %rax
movslq %edx, %r11
cqto
idivq %r11
movq 0x60(%rsp), %rdx
movq 0x58(%rsp), %r11
movq 0x50(%rsp), %rbx
movslq %ecx, %rcx
cltq
imulq %rax, %rcx
shrq $0x10, %rcx
addl %edi, %ecx
movl %ecx, (%rbx)
movslq %r8d, %rcx
imulq %rax, %rcx
shrq $0x10, %rcx
addl %esi, %ecx
movl %ecx, (%r11)
movslq %r9d, %rcx
imulq %rax, %rcx
shrq $0x10, %rcx
addl %r10d, %ecx
movl %ecx, (%rdx)
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: dragpoint
void dragpoint(short pointhighlight, int dax, int day)
{
	short cnt, tempshort;

	wall[pointhighlight].x = dax;
	wall[pointhighlight].y = day;

	cnt = MAXWALLS;
	tempshort = pointhighlight;    //search points CCW
	do
	{
		if (wall[tempshort].nextwall >= 0)
		{
			tempshort = wall[wall[tempshort].nextwall].point2;
			wall[tempshort].x = dax;
			wall[tempshort].y = day;
		}
		else
		{
			tempshort = pointhighlight;    //search points CW if not searched all the way around
			do
			{
				if (wall[lastwall(tempshort)].nextwall >= 0)
				{
					tempshort = wall[lastwall(tempshort)].nextwall;
					wall[tempshort].x = dax;
					wall[tempshort].y = day;
				}
				else
				{
					break;
				}
				cnt--;
			}
			while ((tempshort != pointhighlight) && (cnt > 0));
			break;
		}
		cnt--;
	}
	while ((tempshort != pointhighlight) && (cnt > 0));
}

// Assembly:
movslq %edi, %rcx
shlq $0x5, %rcx
leaq 0x17ff5b(%rip), %rax    # 0x1b8a50
movl %esi, (%rcx,%rax)
movl %edx, 0x4(%rcx,%rax)
movw $0x4000, %cx            # imm = 0x4000
movl %edi, %r8d
movswq %r8w, %r8
shlq $0x5, %r8
movswq 0xa(%r8,%rax), %r8
testq %r8, %r8
js 0x38b44
shlq $0x5, %r8
movswq 0x8(%r8,%rax), %r8
movq %r8, %r9
shlq $0x5, %r9
movl %esi, (%r9,%rax)
movl %edx, 0x4(%r9,%rax)
cmpw %di, %r8w
je 0x38b43
leal -0x1(%rcx), %r9d
cmpw $0x1, %cx
movl %r9d, %ecx
jne 0x38b03
retq
pushq %rbx
movl %edi, %r8d
movswl %r8w, %r9d
testw %r9w, %r9w
jle 0x38b7d
leal -0x1(%r9), %r11d
movq %r11, %r10
shlq $0x5, %r10
cmpw %r8w, 0x8(%r10,%rax)
jne 0x38b7d
movslq %r11d, %r10
shlq $0x5, %r10
cmpw $0x0, 0xa(%r10,%rax)
movl %r11d, %r10d
jns 0x38bc1
jmp 0x38c2b
movl $0x4001, %r10d          # imm = 0x4001
movl %r9d, %r11d
movslq %r11d, %rbx
movq %rbx, %r11
shlq $0x5, %r11
movswl 0x8(%r11,%rax), %r11d
cmpw %r8w, %r11w
je 0x38ba8
decl %r10d
cmpl $0x1, %r10d
ja 0x38b86
movslq %r9d, %rbx
shlq $0x5, %rbx
cmpw $0x0, 0xa(%rbx,%rax)
js 0x38c2b
testw %r8w, %r8w
jle 0x38bcd
leal -0x1(%r9), %r11d
movl %r11d, %r10d
shlq $0x5, %r11
cmpw %r8w, 0x8(%r11,%rax)
je 0x38bf7
movl $0x4001, %r11d          # imm = 0x4001
movl %r9d, %ebx
movl %ebx, %r10d
movslq %ebx, %rbx
shlq $0x5, %rbx
movswl 0x8(%rbx,%rax), %ebx
cmpw %r8w, %bx
je 0x38bf7
decl %r11d
cmpl $0x1, %r11d
ja 0x38bd6
movl %r9d, %r10d
movslq %r10d, %r8
shlq $0x5, %r8
movswq 0xa(%r8,%rax), %r8
movq %r8, %r9
shlq $0x5, %r9
movl %esi, (%r9,%rax)
movl %edx, 0x4(%r9,%rax)
cmpw %di, %r8w
je 0x38c2b
leal -0x1(%rcx), %r9d
cmpw $0x1, %cx
movl %r9d, %ecx
jg 0x38b48
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: getflorzofslope
int getflorzofslope(short sectnum, int dax, int day)
{
	int dx, dy, i, j;
	walltype *wal;

	if (!(sector[sectnum].floorstat&2)) return(sector[sectnum].floorz);
	wal = &wall[sector[sectnum].wallptr];
	dx = wall[wal->point2].x-wal->x; dy = wall[wal->point2].y-wal->y;
	i = (nsqrtasm(dx*dx+dy*dy)<<5); if (i == 0) return(sector[sectnum].floorz);
	j = dmulscale3(dx,day-wal->y,-dy,dax-wal->x);
	return(sector[sectnum].floorz+scale(sector[sectnum].floorheinum,j,i));
}

// Assembly:
movslq %edi, %rax
leaq (%rax,%rax,4), %rax
leaq 0x208f5e(%rip), %rcx    # 0x243a60
leaq (%rcx,%rax,8), %rdi
testb $0x2, 0xe(%rdi)
je 0x3abca
pushq %rbx
movswq (%rdi), %rcx
shlq $0x5, %rcx
leaq 0x17df30(%rip), %r8     # 0x1b8a50
movswq 0x8(%rcx,%r8), %r10
shlq $0x5, %r10
movslq (%r10,%r8), %rax
movslq (%rcx,%r8), %r9
subq %r9, %rax
movslq 0x4(%r10,%r8), %r10
movslq 0x4(%rcx,%r8), %r11
subq %r11, %r10
movl %eax, %ecx
imull %eax, %ecx
movl %r10d, %r8d
imull %r8d, %r8d
addl %ecx, %r8d
movl %r8d, %ecx
shrl $0x18, %ecx
orl $0x1000, %ecx           # imm = 0x1000
movl %r8d, %ebx
shrl $0xc, %ebx
cmpl $0x1000000, %r8d        # imm = 0x1000000
cmovael %ecx, %ebx
leaq 0x41b38c(%rip), %rcx    # 0x455f00
movzwl (%rcx,%rbx,2), %ecx
shrl %cl, %r8d
leaq 0x41d57e(%rip), %rbx    # 0x458100
movzwl (%rbx,%r8,2), %r8d
shrl $0x8, %ecx
shrl %cl, %r8d
shll $0x5, %r8d
popq %rbx
je 0x3abca
movslq %edx, %rcx
subq %r11, %rcx
negq %r10
movslq %esi, %rdx
subq %r9, %rdx
imulq %r10, %rdx
imulq %rax, %rcx
addq %rdx, %rcx
movswq 0x1a(%rdi), %rdx
shrq $0x3, %rcx
movslq %ecx, %rax
imulq %rdx, %rax
movslq %r8d, %rcx
cqto
idivq %rcx
addl 0x8(%rdi), %eax
retq
movl 0x8(%rdi), %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: getceilzofslope
int getceilzofslope(short sectnum, int dax, int day)
{
	int dx, dy, i, j;
	walltype *wal;

	if (!(sector[sectnum].ceilingstat&2)) return(sector[sectnum].ceilingz);
	wal = &wall[sector[sectnum].wallptr];
	dx = wall[wal->point2].x-wal->x; dy = wall[wal->point2].y-wal->y;
	i = (nsqrtasm(dx*dx+dy*dy)<<5); if (i == 0) return(sector[sectnum].ceilingz);
	j = dmulscale3(dx,day-wal->y,-dy,dax-wal->x);
	return(sector[sectnum].ceilingz+scale(sector[sectnum].ceilingheinum,j,i));
}

// Assembly:
movslq %edi, %rax
leaq (%rax,%rax,4), %rax
leaq 0x208e84(%rip), %rcx    # 0x243a60
leaq (%rcx,%rax,8), %rdi
testb $0x2, 0xc(%rdi)
je 0x3aca4
pushq %rbx
movswq (%rdi), %rcx
shlq $0x5, %rcx
leaq 0x17de56(%rip), %r8     # 0x1b8a50
movswq 0x8(%rcx,%r8), %r10
shlq $0x5, %r10
movslq (%r10,%r8), %rax
movslq (%rcx,%r8), %r9
subq %r9, %rax
movslq 0x4(%r10,%r8), %r10
movslq 0x4(%rcx,%r8), %r11
subq %r11, %r10
movl %eax, %ecx
imull %eax, %ecx
movl %r10d, %r8d
imull %r8d, %r8d
addl %ecx, %r8d
movl %r8d, %ecx
shrl $0x18, %ecx
orl $0x1000, %ecx           # imm = 0x1000
movl %r8d, %ebx
shrl $0xc, %ebx
cmpl $0x1000000, %r8d        # imm = 0x1000000
cmovael %ecx, %ebx
leaq 0x41b2b2(%rip), %rcx    # 0x455f00
movzwl (%rcx,%rbx,2), %ecx
shrl %cl, %r8d
leaq 0x41d4a4(%rip), %rbx    # 0x458100
movzwl (%rbx,%r8,2), %r8d
shrl $0x8, %ecx
shrl %cl, %r8d
shll $0x5, %r8d
popq %rbx
je 0x3aca4
movslq %edx, %rcx
subq %r11, %rcx
negq %r10
movslq %esi, %rdx
subq %r9, %rdx
imulq %r10, %rdx
imulq %rax, %rcx
addq %rdx, %rcx
movswq 0x12(%rdi), %rdx
shrq $0x3, %rcx
movslq %ecx, %rax
imulq %rdx, %rax
movslq %r8d, %rcx
cqto
idivq %rcx
addl 0x4(%rdi), %eax
retq
movl 0x4(%rdi), %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: rotatepoint
void rotatepoint(int xpivot, int ypivot, int x, int y, short daang, int *x2, int *y2)
{
	int dacos, dasin;

	dacos = sintable[(daang+2560)&2047];
	dasin = sintable[(daang+2048)&2047];
	x -= xpivot;
	y -= ypivot;
	*x2 = dmulscale14(x,dacos,-y,dasin) + xpivot;
	*y2 = dmulscale14(y,dacos,x,dasin) + ypivot;
}

// Assembly:
pushq %rbx
movq 0x10(%rsp), %rax
leal 0x200(%r8), %r10d
movl $0x7ff, %r11d           # imm = 0x7FF
andl %r11d, %r10d
leaq 0x393c71(%rip), %rbx    # 0x3ced50
movswq (%rbx,%r10,2), %r10
andl %r11d, %r8d
movswq (%rbx,%r8,2), %r8
subl %edi, %edx
subl %esi, %ecx
movslq %ecx, %r11
negl %ecx
movslq %edx, %rdx
imulq %r10, %r11
imulq %rdx, %r10
movslq %ecx, %rcx
imulq %r8, %rcx
addq %r10, %rcx
shrq $0xe, %rcx
addl %edi, %ecx
movl %ecx, (%r9)
imulq %rdx, %r8
addq %r11, %r8
shrq $0xe, %r8
addl %esi, %r8d
movl %r8d, (%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: setaspect
void setaspect(int daxrange, int daaspect)
{
    int ys = mulscale16(200, pixelaspect);

    viewingrange = daxrange;
    viewingrangerecip = divscale32(1L,daxrange);

    yxaspect = daaspect;
    xyaspect = divscale32(1,yxaspect);
    xdimenscale = scale(xdimen,yxaspect,320);
    xdimscale = scale(320,xyaspect,xdimen);

    ydimenscale = scale(ydimen, yxaspect, ys);
}

// Assembly:
movslq 0x3db11b(%rip), %r8     # 0x416c78
movl %edi, 0x3941ed(%rip)    # 0x3cfd50
movslq %edi, %rdi
movabsq $0x100000000, %rcx      # imm = 0x100000000
movq %rcx, %rax
xorl %edx, %edx
idivq %rdi
movl %eax, 0x3931ba(%rip)    # 0x3ced38
movl %esi, 0x3cc464(%rip)    # 0x407fe8
movslq %esi, %rsi
movq %rcx, %rax
xorl %edx, %edx
idivq %rsi
movq %rax, %rcx
movslq 0x68c97(%rip), %rdi     # 0xa4830
movq %rdi, %rax
imulq %rsi, %rax
movabsq $0x6666666666666667, %rdx # imm = 0x6666666666666667
imulq %rdx
movl %ecx, 0x321d05(%rip)    # 0x35d8b8
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x7, %rdx
addl %eax, %edx
movl %edx, 0x23fed2(%rip)    # 0x27ba98
movslq %ecx, %rax
shlq $0x6, %rax
leaq (%rax,%rax,4), %rax
cqto
idivq %rdi
movl %eax, 0x393158(%rip)    # 0x3ced34
movslq 0x23feb1(%rip), %rax    # 0x27ba94
imulq %rsi, %rax
imulq $0xc80000, %r8, %rcx    # imm = 0xC80000
sarq $0x20, %rcx
cqto
idivq %rcx
movl %eax, 0x3fa9a3(%rip)    # 0x4365a0
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: setvgapalette
void setvgapalette(void)
{
	int i;

	for (i=0;i<256;i++) {
		curpalettefaded[i].b = curpalette[i].b = vgapal16[4*i] << 2;
		curpalettefaded[i].g = curpalette[i].g = vgapal16[4*i+1] << 2;
		curpalettefaded[i].r = curpalette[i].r = vgapal16[4*i+2] << 2;
	}
	setpalette(0,256,vgapal16);
}

// Assembly:
xorl %eax, %eax
leaq 0x68508(%rip), %rcx     # 0xa4840
leaq 0x3fa671(%rip), %rdx    # 0x4369b0
leaq 0x3faa6a(%rip), %rsi    # 0x436db0
movb (%rcx,%rax,4), %dil
movb 0x1(%rcx,%rax,4), %r8b
shlb $0x2, %dil
movb %dil, 0x2(%rdx,%rax,4)
movb %dil, 0x2(%rsi,%rax,4)
shlb $0x2, %r8b
movb %r8b, 0x1(%rdx,%rax,4)
movb %r8b, 0x1(%rsi,%rax,4)
movb 0x2(%rcx,%rax,4), %dil
shlb $0x2, %dil
movb %dil, (%rdx,%rax,4)
movb %dil, (%rsi,%rax,4)
incq %rax
cmpq $0x100, %rax            # imm = 0x100
jne 0x3c346
leaq 0x684b2(%rip), %rdx     # 0xa4840
xorl %edi, %edi
movl $0x100, %esi            # imm = 0x100
jmp 0x6f296
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: setpalettefade
void setpalettefade(unsigned char r, unsigned char g, unsigned char b, unsigned char offset)
{
	int i,k;
	palette_t p;

	palfadergb.r = min(63,r) << 2;
	palfadergb.g = min(63,g) << 2;
	palfadergb.b = min(63,b) << 2;
	palfadedelta = min(63,offset) << 2;

	k = 0;
	for (i=0;i<256;i++) {
		if (usegammabrightness) p = curpalette[i];
		else {
			p.b = britable[curbrightness][ curpalette[i].b ];
			p.g	= britable[curbrightness][ curpalette[i].g ];
			p.r = britable[curbrightness][ curpalette[i].r ];
		}

		tempbuf[k++] =
			(curpalettefaded[i].b =
				p.b + ( ( ( (int)palfadergb.b - (int)p.b ) * (int)offset ) >> 6 ) ) >> 2;
		tempbuf[k++] =
			(curpalettefaded[i].g =
				p.g + ( ( ( (int)palfadergb.g - (int)p.g ) * (int)offset ) >> 6 ) ) >> 2;
		tempbuf[k++] =
			(curpalettefaded[i].r =
				p.r + ( ( ( (int)palfadergb.r - (int)p.r ) * (int)offset ) >> 6 ) ) >> 2;
		tempbuf[k++] = curpalettefaded[i].f = 0;
	}

	setpalette(0,256,(unsigned char*)tempbuf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpb $0x3f, %dil
movl $0x3f, %eax
cmovael %eax, %edi
shlb $0x2, %dil
movb %dil, 0x17c684(%rip)    # 0x1b8a3f
cmpb $0x3f, %sil
cmovael %eax, %esi
shlb $0x2, %sil
movb %sil, 0x17c673(%rip)    # 0x1b8a40
cmpb $0x3f, %dl
cmovael %eax, %edx
shlb $0x2, %dl
cmpl %eax, %ecx
cmovbl %ecx, %eax
movb %dl, 0x17c660(%rip)     # 0x1b8a41
shlb $0x2, %al
movb %al, 0x17c659(%rip)     # 0x1b8a43
movl 0x6839c(%rip), %eax     # 0xa478c
movzbl %dl, %edx
movzbl %sil, %esi
movzbl %dil, %edi
movslq 0x17c602(%rip), %r11    # 0x1b8a04
xorl %r8d, %r8d
leaq 0x3fa5a4(%rip), %r9     # 0x4369b0
shlq $0x8, %r11
leaq 0x3fad99(%rip), %r10    # 0x4371b0
addq %r11, %r10
leaq 0x3fa98f(%rip), %r11    # 0x436db0
leaq 0x39f3a8(%rip), %rbx    # 0x3db7d0
xorl %r14d, %r14d
testl %eax, %eax
je 0x3c444
leaq (%r9,%r14), %r13
leaq (%r14,%r9), %r12
incq %r12
leaq (%r14,%r9), %r15
addq $0x2, %r15
jmp 0x3c45e
movzbl 0x2(%r14,%r9), %r15d
addq %r10, %r15
movzbl 0x1(%r14,%r9), %r12d
addq %r10, %r12
movzbl (%r14,%r9), %r13d
addq %r10, %r13
movzbl (%r13), %ebp
movzbl (%r12), %r12d
movzbl (%r15), %r15d
movl %edx, %r13d
subl %r15d, %r13d
imull %ecx, %r13d
shrl $0x6, %r13d
addb %r15b, %r13b
movb %r13b, 0x2(%r14,%r11)
shrb $0x2, %r13b
movb %r13b, (%r14,%rbx)
movl %esi, %r15d
subl %r12d, %r15d
imull %ecx, %r15d
shrl $0x6, %r15d
addb %r12b, %r15b
movb %r15b, 0x1(%r14,%r11)
shrb $0x2, %r15b
movb %r15b, 0x1(%r14,%rbx)
movl %edi, %r15d
subl %ebp, %r15d
imull %ecx, %r15d
shrl $0x6, %r15d
addb %bpl, %r15b
movb %r15b, (%r14,%r11)
shrb $0x2, %r15b
movb %r15b, 0x2(%r14,%rbx)
movb %r8b, 0x3(%r14,%r11)
movb %r8b, 0x3(%r14,%rbx)
addq $0x4, %r14
cmpq $0x400, %r14            # imm = 0x400
jne 0x3c42b
leaq 0x39f2e7(%rip), %rdx    # 0x3db7d0
xorl %edi, %edi
movl $0x100, %esi            # imm = 0x100
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6f296
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: invalidatetile
void invalidatetile(short tilenume, int pal, int how)
{
	int numpal, firstpal, np;
	int hp;

	if (rendmode < 3) return;

	if (pal < 0) {
		numpal = MAXPALOOKUPS;
		firstpal = 0;
	} else {
		numpal = 1;
		firstpal = pal % MAXPALOOKUPS;
	}

	for (hp = 0; hp < 8; hp+=4) {
		if (!(how & pow2long[hp])) continue;

		for (np = firstpal; np < firstpal+numpal; np++) {
			polymost_texinvalidate(tilenume, np, hp);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x5bdce7(%rip), %rax    # 0x5fa950
cmpl $0x3, (%rax)
jl 0x3ccd2
movl %edx, %ebx
xorl %r14d, %r14d
testl %esi, %esi
movzbl %sil, %ecx
cmovsl %r14d, %ecx
leal 0x1(%rcx), %eax
movq %rcx, (%rsp)
leal 0x100(%rcx), %r13d
testl %esi, %esi
cmovnsl %eax, %r13d
movswl %di, %ebp
movb $0x1, %r12b
leaq 0x67b12(%rip), %rax     # 0xa47b0
testl %ebx, (%rax,%r14,4)
je 0x3ccc0
movq (%rsp), %rax
movl %eax, %r15d
movl %ebp, %edi
movl %r15d, %esi
movl %r14d, %edx
callq 0x4fdec
incl %r15d
cmpl %r13d, %r15d
jb 0x3ccab
movl $0x4, %r14d
testb $0x1, %r12b
movl $0x0, %r12d
jne 0x3cc97
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: squarerotatetile
void squarerotatetile(short tilenume)
{
	int i, j, k, xsiz, ysiz;
	unsigned char *ptr1, *ptr2;

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

		//supports square tiles only for rotation part
	if (xsiz == ysiz)
	{
		k = (xsiz<<1);
		for(i=xsiz-1;i>=0;i--)
		{
			ptr1 = (unsigned char *)(waloff[tilenume]+i*(xsiz+1)); ptr2 = ptr1;
			if ((i&1) != 0) { ptr1--; ptr2 -= xsiz; swapchar(ptr1,ptr2); }
			for(j=(i>>1)-1;j>=0;j--)
				{ ptr1 -= 2; ptr2 -= k; swapchar2(ptr1,ptr2,xsiz); }
		}
	}
}

// Assembly:
movslq %edi, %rax
leaq 0x3d3335(%rip), %rcx    # 0x410020
movzwl (%rcx,%rax,2), %ecx
leaq 0x3c4aea(%rip), %rdx    # 0x4017e0
cmpw (%rdx,%rax,2), %cx
setne %dl
testw %cx, %cx
setle %sil
orb %dl, %sil
jne 0x3cdb3
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leal (%rcx,%rcx), %edi
negl %edi
leaq 0x1(%rcx), %rdx
movq %rcx, %rsi
negq %rsi
movslq %edi, %rdi
movl %ecx, %r8d
leal -0x1(%rcx), %r9d
leaq 0x35c5ab(%rip), %r10    # 0x3992e0
movq %r8, %r11
decq %r8
movq %r8, %rbx
imulq %rdx, %rbx
addq (%r10,%rax,8), %rbx
movq %rbx, %r14
testb $0x1, %r8b
je 0x3cd65
movb (%rbx,%rsi), %bpl
movb -0x1(%rbx), %r15b
movb %r15b, (%rbx,%rsi)
movb %bpl, -0x1(%rbx)
decq %rbx
addq %rsi, %r14
cmpq $0x2, %r8
jb 0x3cda2
movl %r9d, %ebp
shrl %ebp
incl %ebp
addq %rdi, %r14
decq %rbx
movb (%r14), %r15b
movb -0x1(%rbx), %r12b
movb %r12b, (%r14)
movb %r15b, -0x1(%rbx)
movb (%r14,%rcx), %r15b
movb (%rbx), %r12b
movb %r12b, (%r14,%rcx)
movb %r15b, (%rbx)
addq %rdi, %r14
addq $-0x2, %rbx
decl %ebp
cmpl $0x1, %ebp
ja 0x3cd78
decl %r9d
cmpq $0x2, %r11
jge 0x3cd35
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: preparemirror
void preparemirror(int dax, int day, int daz, short daang, int dahoriz, short dawall, short dasector, int *tposx, int *tposy, short *tang)
{
	int i, j, x, y, dx, dy;

	(void)daz; (void)dahoriz; (void)dasector;

	x = wall[dawall].x; dx = wall[wall[dawall].point2].x-x;
	y = wall[dawall].y; dy = wall[wall[dawall].point2].y-y;
	j = dx*dx + dy*dy; if (j == 0) return;
	i = (((dax-x)*dx + (day-y)*dy)<<1);
	*tposx = (x<<1) + scale(dx,i,j) - dax;
	*tposy = (y<<1) + scale(dy,i,j) - day;
	*tang = (((getangle(dx,dy)<<1)-daang)&2047);

	inpreparemirror = 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edi, %r8d
movslq %r9d, %rax
shlq $0x5, %rax
leaq 0x17bc7e(%rip), %rcx    # 0x1b8a50
movslq (%rax,%rcx), %r10
movswq 0x8(%rax,%rcx), %rdx
shlq $0x5, %rdx
movslq (%rdx,%rcx), %rdi
subq %r10, %rdi
movslq 0x4(%rax,%rcx), %r9
movslq 0x4(%rdx,%rcx), %rcx
subq %r9, %rcx
movl %edi, %eax
imull %edi, %eax
movl %ecx, %edx
imull %ecx, %edx
addl %eax, %edx
je 0x3ce77
movq 0x58(%rsp), %r14
movq 0x50(%rsp), %r11
movq 0x48(%rsp), %r15
movl %r8d, %eax
subl %r10d, %eax
imull %edi, %eax
movl %esi, %ebp
subl %r9d, %ebp
imull %ecx, %ebp
addl %eax, %ebp
addl %ebp, %ebp
addl %r10d, %r10d
movslq %ebp, %r12
movq %rdi, %rax
imulq %r12, %rax
movl %edx, %r13d
cqto
idivq %r13
subl %r8d, %r10d
addl %eax, %r10d
movl %r10d, (%r15)
addl %r9d, %r9d
movq %rcx, %rax
imulq %r12, %rax
cqto
idivq %r13
subl %esi, %r9d
addl %eax, %r9d
movl %r9d, (%r11)
movl %ecx, %esi
callq 0x36893
addl %eax, %eax
subl %ebx, %eax
andl $0x7ff, %eax            # imm = 0x7FF
movw %ax, (%r14)
movb $0x1, 0x17bbc7(%rip)    # 0x1b8a3e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: completemirror
void completemirror(void)
{
	int i, dy;
	intptr_t p;

#if USE_POLYMOST
	if (rendmode) return;
#endif

		//Can't reverse with uninitialized data
	if (inpreparemirror) { inpreparemirror = 0; return; }
	if (mirrorsx1 > 0) mirrorsx1--;
	if (mirrorsx2 < windowx2-windowx1-1) mirrorsx2++;
	if (mirrorsx2 < mirrorsx1) return;

	p = frameplace+ylookup[windowy1+mirrorsy1]+windowx1+mirrorsx1;
	i = windowx2-windowx1-mirrorsx2-mirrorsx1; mirrorsx2 -= mirrorsx1;
	for(dy=mirrorsy2-mirrorsy1-1;dy>=0;dy--)
	{
		copybufbyte((void*)(p+1),tempbuf,mirrorsx2+1);
		tempbuf[mirrorsx2] = tempbuf[mirrorsx2-1];
		copybufreverse(&tempbuf[mirrorsx2],(void*)(p+i),mirrorsx2+1);
		p += ylookup[1];
		faketimerhandler();
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x5bdabb(%rip), %rax    # 0x5fa950
cmpl $0x0, (%rax)
jne 0x3cf9a
cmpb $0x0, 0x17bb99(%rip)    # 0x1b8a3e
je 0x3ceb3
movb $0x0, 0x17bb90(%rip)    # 0x1b8a3e
jmp 0x3cf9a
movl 0x39a8f3(%rip), %eax    # 0x3d77ac
testl %eax, %eax
jle 0x3cec5
decl %eax
movl %eax, 0x39a8e7(%rip)    # 0x3d77ac
movl 0x39a8e5(%rip), %esi    # 0x3d77b0
movl 0x3cb10f(%rip), %ecx    # 0x407fe0
movslq 0x394e98(%rip), %rdx    # 0x3d1d70
movl %edx, %edi
notl %edi
addl %ecx, %edi
cmpl %edi, %esi
jge 0x3ceea
incl %esi
movl %esi, 0x39a8c6(%rip)    # 0x3d77b0
movl %esi, %r8d
subl %eax, %r8d
jl 0x3cf9a
leaq 0x1411b3(%rip), %rdi    # 0x17e0b0
movq (%rdi), %rdi
movslq 0x396c79(%rip), %r9     # 0x3d3b80
movslq 0x39e8b2(%rip), %r14    # 0x3db7c0
addq %r14, %r9
leaq 0x3d9d88(%rip), %r10    # 0x416ca0
movslq (%r10,%r9,4), %r9
movl %r8d, 0x39a88d(%rip)    # 0x3d77b0
movl 0x39e89a(%rip), %r8d    # 0x3db7c4
movl %r14d, %r10d
notl %r10d
addl %r8d, %r10d
js 0x3cf9a
addl %edx, %esi
addl %eax, %esi
subl %esi, %ecx
movslq %eax, %r15
addq %rdx, %r15
addq %rdi, %r15
addq %r9, %r15
movslq %ecx, %r12
subl %r8d, %r14d
leaq 0x39e87c(%rip), %rbx    # 0x3db7d0
leaq 0x1(%r15), %rdi
movl 0x39a852(%rip), %edx    # 0x3d77b0
incl %edx
movq %rbx, %rsi
callq 0x4d437
movslq 0x39a841(%rip), %rax    # 0x3d77b0
movb -0x1(%rax,%rbx), %cl
leaq (%rbx,%rax), %rdi
movb %cl, (%rax,%rbx)
leaq (%r15,%r12), %rsi
leal 0x1(%rax), %edx
callq 0x4d450
movslq 0x3d9d17(%rip), %rax    # 0x416ca4
addq %rax, %r15
callq 0xacd7
incl %r14d
jne 0x3cf54
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: sectorofwall
int sectorofwall(short theline)
{
	int i, gap;

	if ((theline < 0) || (theline >= numwalls)) return(-1);
	i = wall[theline].nextwall; if (i >= 0) return(wall[i].nextsector);

	gap = (numsectors>>1); i = gap;
	while (gap > 1)
	{
		gap >>= 1;
		if (sector[i].wallptr < theline) i += gap; else i -= gap;
	}
	while (sector[i].wallptr > theline) i--;
	while (sector[i].wallptr+sector[i].wallnum <= theline) i++;
	return(i);
}

// Assembly:
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testw %di, %di
js 0x3d061
cmpw %di, 0x3d9cad(%rip)     # 0x416c68
jle 0x3d061
movzwl %di, %ecx
shll $0x5, %ecx
leaq 0x17ba82(%rip), %rax    # 0x1b8a50
movswq 0xa(%rcx,%rax), %rcx
testq %rcx, %rcx
js 0x3cfe3
shlq $0x5, %rcx
movswl 0xc(%rcx,%rax), %eax
retq
movswl 0x392f76(%rip), %ecx    # 0x3cff60
movl %ecx, %eax
shrl %eax
sarl %ecx
cmpw $0x2, %ax
jl 0x3d027
leaq 0x206a63(%rip), %rdx    # 0x243a60
movl %ecx, %r8d
movl %ecx, %esi
shrl %esi
movslq %r8d, %rax
leaq (%rax,%rax,4), %r9
movl %esi, %eax
cmpw %di, (%rdx,%r9,8)
jl 0x3d018
movl %esi, %eax
negl %eax
addl %r8d, %eax
movl %eax, %r8d
cmpl $0x3, %ecx
movl %esi, %ecx
ja 0x3d002
jmp 0x3d029
movl %ecx, %eax
movslq %eax, %rcx
leaq (%rcx,%rcx,4), %rcx
leaq 0x206a29(%rip), %rdx    # 0x243a60
leaq (%rdx,%rcx,8), %rcx
addq $0x2a, %rcx
movq %rcx, %rdx
addq $-0x28, %rcx
decl %eax
cmpw %di, -0x2a(%rdx)
jg 0x3d03f
movswl -0x2(%rcx), %edx
movswl (%rcx), %esi
addl %edx, %esi
incl %eax
addq $0x28, %rcx
cmpl %edi, %esi
jle 0x3d04e
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: alignceilslope
void alignceilslope(short dasect, int x, int y, int z)
{
	int i, dax, day;
	walltype *wal;

	wal = &wall[sector[dasect].wallptr];
	dax = wall[wal->point2].x-wal->x;
	day = wall[wal->point2].y-wal->y;

	i = (y-wal->y)*dax - (x-wal->x)*day; if (i == 0) return;
	sector[dasect].ceilingheinum = scale((z-sector[dasect].ceilingz)<<8,
	  nsqrtasm(dax*dax+day*day),i);

	if (sector[dasect].ceilingheinum == 0) sector[dasect].ceilingstat &= ~2;
	else sector[dasect].ceilingstat |= 2;
}

// Assembly:
pushq %rbx
movl %ecx, %r8d
movslq %edi, %rax
leaq (%rax,%rax,4), %r9
leaq 0x2069ec(%rip), %r10    # 0x243a60
movswq (%r10,%r9,8), %r11
shlq $0x5, %r11
leaq 0x17b9cc(%rip), %rbx    # 0x1b8a50
movswq 0x8(%r11,%rbx), %rax
shlq $0x5, %rax
movl (%rax,%rbx), %ecx
movl 0x4(%rax,%rbx), %eax
movl (%r11,%rbx), %edi
movl 0x4(%r11,%rbx), %r11d
subl %edi, %ecx
subl %r11d, %eax
subl %r11d, %edx
imull %ecx, %edx
subl %esi, %edi
imull %eax, %edi
addl %edx, %edi
je 0x3d123
leaq (%r10,%r9,8), %rsi
subl 0x4(%rsi), %r8d
shll $0x8, %r8d
imull %ecx, %ecx
imull %eax, %eax
addl %ecx, %eax
movl %eax, %ecx
shrl $0x18, %ecx
orl $0x1000, %ecx           # imm = 0x1000
movl %eax, %edx
shrl $0xc, %edx
cmpl $0x1000000, %eax        # imm = 0x1000000
cmovael %ecx, %edx
leaq 0x418e1b(%rip), %rcx    # 0x455f00
movzwl (%rcx,%rdx,2), %ecx
shrl %cl, %eax
leaq 0x41b00e(%rip), %rdx    # 0x458100
movzwl (%rdx,%rax,2), %eax
shrl $0x8, %ecx
shrl %cl, %eax
movslq %r8d, %rcx
imulq %rcx, %rax
movslq %edi, %rcx
cqto
idivq %rcx
movw %ax, 0x12(%rsi)
xorl %ecx, %ecx
testw %ax, %ax
setne %cl
movl 0xc(%rsi), %eax
andl $-0x3, %eax
leal (%rax,%rcx,2), %eax
movw %ax, 0xc(%rsi)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: alignflorslope
void alignflorslope(short dasect, int x, int y, int z)
{
	int i, dax, day;
	walltype *wal;

	wal = &wall[sector[dasect].wallptr];
	dax = wall[wal->point2].x-wal->x;
	day = wall[wal->point2].y-wal->y;

	i = (y-wal->y)*dax - (x-wal->x)*day; if (i == 0) return;
	sector[dasect].floorheinum = scale((z-sector[dasect].floorz)<<8,
	  nsqrtasm(dax*dax+day*day),i);

	if (sector[dasect].floorheinum == 0) sector[dasect].floorstat &= ~2;
	else sector[dasect].floorstat |= 2;
}

// Assembly:
pushq %rbx
movl %ecx, %r8d
movslq %edi, %rax
leaq (%rax,%rax,4), %r9
leaq 0x206929(%rip), %r10    # 0x243a60
movswq (%r10,%r9,8), %r11
shlq $0x5, %r11
leaq 0x17b909(%rip), %rbx    # 0x1b8a50
movswq 0x8(%r11,%rbx), %rax
shlq $0x5, %rax
movl (%rax,%rbx), %ecx
movl 0x4(%rax,%rbx), %eax
movl (%r11,%rbx), %edi
movl 0x4(%r11,%rbx), %r11d
subl %edi, %ecx
subl %r11d, %eax
subl %r11d, %edx
imull %ecx, %edx
subl %esi, %edi
imull %eax, %edi
addl %edx, %edi
je 0x3d1e7
leaq (%r10,%r9,8), %rsi
subl 0x8(%rsi), %r8d
shll $0x8, %r8d
imull %ecx, %ecx
imull %eax, %eax
addl %ecx, %eax
movl %eax, %ecx
shrl $0x18, %ecx
orl $0x1000, %ecx           # imm = 0x1000
movl %eax, %edx
shrl $0xc, %edx
cmpl $0x1000000, %eax        # imm = 0x1000000
cmovael %ecx, %edx
leaq 0x418d58(%rip), %rcx    # 0x455f00
movzwl (%rcx,%rdx,2), %ecx
shrl %cl, %eax
leaq 0x41af4b(%rip), %rdx    # 0x458100
movzwl (%rdx,%rax,2), %eax
shrl $0x8, %ecx
shrl %cl, %eax
movslq %r8d, %rcx
imulq %rcx, %rax
movslq %edi, %rcx
cqto
idivq %rcx
movw %ax, 0x1a(%rsi)
xorl %ecx, %ecx
testw %ax, %ax
setne %cl
movzwl 0xe(%rsi), %eax
andl $-0x3, %eax
leal (%rax,%rcx,2), %eax
movw %ax, 0xe(%rsi)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: loopnumofsector
int loopnumofsector(short sectnum, short wallnum)
{
	int i, numloops, startwall, endwall;

	numloops = 0;
	startwall = sector[sectnum].wallptr;
	endwall = startwall + sector[sectnum].wallnum;
	for(i=startwall;i<endwall;i++)
	{
		if (i == wallnum) return(numloops);
		if (wall[i].point2 < i) numloops++;
	}
	return(-1);
}

// Assembly:
movslq %edi, %rax
leaq (%rax,%rax,4), %rdx
leaq 0x206869(%rip), %rdi    # 0x243a60
movswq 0x2(%rdi,%rdx,8), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testq %rcx, %rcx
jle 0x3d24f
leaq (%rdi,%rdx,8), %rdx
movswq (%rdx), %rdx
addq %rdx, %rcx
movswq %si, %rsi
movq %rdx, %rdi
shlq $0x5, %rdi
leaq 0x17b82c(%rip), %r8     # 0x1b8a50
addq %rdi, %r8
addq $0x8, %r8
xorl %edi, %edi
cmpq %rdx, %rsi
je 0x3d250
movswq (%r8), %r9
xorl %r10d, %r10d
cmpq %r9, %rdx
setg %r10b
addl %r10d, %edi
incq %rdx
addq $0x20, %r8
cmpq %rcx, %rdx
jl 0x3d22d
retq
movl %edi, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: printext256
void printext256(int xpos, int ypos, short col, short backcol, const char *name, char fontsize)
{
	int stx, i, x, y;
	const unsigned char *letptr;
	unsigned char *ptr;
	const struct textfontspec *f;

#if USE_POLYMOST && USE_OPENGL
	if (!polymost_printext256(xpos,ypos,col,backcol,name,fontsize)) return;
#endif

	f = &textfonts[min((unsigned)fontsize, 2)];
	stx = xpos;

	for(i=0;name[i];i++)
	{
		letptr = &f->font[((int)(unsigned char)name[i])*f->cellh + f->cellyoff];
		ptr = (unsigned char *)(ylookup[ypos+f->charysiz-1]+stx+frameplace);
		for(y=f->charysiz-1;y>=0;y--)
		{
			for(x=f->charxsiz-1;x>=0;x--)
			{
				if (letptr[y]&pow2char[7-x-f->cellxoff])
					ptr[x] = (unsigned char)col;
				else if (backcol >= 0)
					ptr[x] = (unsigned char)backcol;
			}
			ptr -= bytesperline;
		}
		stx += f->charxsiz;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r9d, %r13d
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r12d
movl %edi, 0xc(%rsp)
movq %r8, 0x10(%rsp)
callq 0x5da95
testl %eax, %eax
je 0x3da25
movq 0x10(%rsp), %rax
movb (%rax), %cl
testb %cl, %cl
je 0x3da25
movzbl %r13b, %eax
cmpb $0x2, %al
movl $0x2, %edx
cmovbl %eax, %edx
movzbl %dl, %edx
shll $0x5, %edx
leaq 0x55134(%rip), %rsi     # 0x92a40
leaq (%rsi,%rdx), %rax
movq (%rdx,%rsi), %rdi
movq %rdi, 0x38(%rsp)
movslq 0x10(%rdx,%rsi), %rdi
movq %rdi, 0x30(%rsp)
movslq 0x18(%rdx,%rsi), %rdi
movq %rdi, 0x28(%rsp)
movl 0xc(%rdx,%rsi), %edi
movq %rdi, 0x18(%rsp)
leal -0x1(%r12,%rdi), %edi
movslq %edi, %rdi
movq %rdi, 0x20(%rsp)
movslq 0x8(%rdx,%rsi), %r9
movq %r9, %r8
incq %r8
xorl %edx, %edx
leaq 0x66e49(%rip), %r12     # 0xa47a0
movq %rdx, 0x40(%rsp)
cmpl $0x0, 0x18(%rsp)
jle 0x3da07
movzbl %cl, %ecx
imulq 0x30(%rsp), %rcx
addq 0x28(%rsp), %rcx
addq 0x38(%rsp), %rcx
movq 0x20(%rsp), %rdx
leaq 0x3d931a(%rip), %rsi    # 0x416ca0
movslq (%rsi,%rdx,4), %rsi
movslq 0xc(%rsp), %rdx
addq %rsi, %rdx
leaq 0x140717(%rip), %rsi    # 0x17e0b0
addq (%rsi), %rdx
movq 0x18(%rsp), %rsi
leaq -0x1(%rsi), %rdi
testl %r9d, %r9d
jle 0x3d9f1
movl 0x14(%rax), %r10d
addl %r9d, %r10d
movl $0x8, %ebx
subl %r10d, %ebx
movq %r8, %r10
testw %bp, %bp
sets %r11b
movslq %ebx, %r15
movb (%r15,%r12), %r15b
andb (%rcx,%rdi), %r15b
sete %r13b
testb %r11b, %r13b
jne 0x3d9e6
testb %r15b, %r15b
movl %ebp, %r11d
cmovnel %r14d, %r11d
movb %r11b, -0x2(%rdx,%r10)
decq %r10
incl %ebx
cmpq $0x1, %r10
jg 0x3d9bc
leaq 0x14088c(%rip), %r10    # 0x17e284
movslq (%r10), %r10
subq %r10, %rdx
cmpq $0x1, %rsi
movq %rdi, %rsi
jg 0x3d9a1
addl %r9d, 0xc(%rsp)
movq 0x10(%rsp), %rcx
movq 0x40(%rsp), %rdx
movb 0x1(%rcx,%rdx), %cl
incq %rdx
testb %cl, %cl
jne 0x3d957
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: setrendermode
int setrendermode(int renderer)
{
	if (bpp == 8) {
		if (renderer < 0) renderer = 0;
		else if (renderer > 2) renderer = 2;
	} else {
		renderer = 3;
	}

	rendmode = renderer;

	return 0;
}

// Assembly:
leaq 0x140669(%rip), %rcx    # 0x17e0a4
movl $0x3, %eax
cmpl $0x8, (%rcx)
jne 0x3da58
testl %edi, %edi
js 0x3da56
cmpl $0x2, %edi
movl $0x2, %eax
cmovbl %edi, %eax
jmp 0x3da58
xorl %eax, %eax
leaq 0x5bcef1(%rip), %rcx    # 0x5fa950
movl %eax, (%rcx)
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: setpolymost2dview
void setpolymost2dview(void)
{
	if (rendmode < 3) return;

	if (gloy1 != -1) {
		glfunc.glViewport(0,0,xres,yres);
	}

	gloy1 = -1;

	glfunc.glDisable(GL_DEPTH_TEST);
	glfunc.glDisable(GL_BLEND);
}

// Assembly:
pushq %rbx
leaq 0x5bceac(%rip), %rax    # 0x5fa950
cmpl $0x3, (%rax)
jge 0x3daab
popq %rbx
retq
leaq 0x5bcf9e(%rip), %rbx    # 0x5faa50
movss (%rbx), %xmm0
ucomiss 0x38973(%rip), %xmm0    # 0x76430
jne 0x3dac1
jnp 0x3dae4
leaq 0x5bcc78(%rip), %rax    # 0x5fa740
leaq 0x66561(%rip), %rcx     # 0xa4030
movl (%rcx), %edx
leaq 0x6655c(%rip), %rcx     # 0xa4034
movl (%rcx), %ecx
xorl %edi, %edi
xorl %esi, %esi
callq *0x80(%rax)
movl $0xbf800000, (%rbx)     # imm = 0xBF800000
leaq 0x5bcc4f(%rip), %rbx    # 0x5fa740
movl $0xb71, %edi            # imm = 0xB71
callq *0x48(%rbx)
movl $0xbe2, %edi            # imm = 0xBE2
movq %rbx, %rax
popq %rbx
jmpq *0x48(%rax)
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: buildsetlogfile
void buildsetlogfile(const char *fn)
{
	if (logfile) Bfclose(logfile);
	logfile = NULL;
	if (fn) logfile = Bfopen(fn,"w");
	if (logfile) setvbuf(logfile, (char*)NULL, _IONBF, 0);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x36e9e8(%rip), %rdi    # 0x3ac4f8
testq %rdi, %rdi
je 0x3db1a
callq 0x6480
movq $0x0, 0x36e9d3(%rip) # 0x3ac4f8
testq %rbx, %rbx
je 0x3db57
leaq 0x3d578(%rip), %rsi     # 0x7b0a9
movq %rbx, %rdi
callq 0x6ce0
movq %rax, 0x36e9b8(%rip)    # 0x3ac4f8
testq %rax, %rax
je 0x3db57
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
xorl %ecx, %ecx
popq %rbx
jmp 0x64a0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: hline
static void hline(int xr, int yp)
{
	int xl, r, s;

	xl = lastx[yp]; if (xl > xr) return;
	r = horizlookup2[yp-globalhoriz+horizycent];
	asm1 = globalx1*r;
	asm2 = globaly2*r;
	s = ((int)getpalookup((int)mulscale16(r,globvis),globalshade)<<8);

	hlineasm4(xr-xl,0L,s,globalx2*r+globalypanning,globaly1*r+globalxpanning,
		(void *)(ylookup[yp]+xr+frameoffset));
}

// Assembly:
movl %edi, %eax
movslq %esi, %rsi
leaq 0x4146ff(%rip), %rcx    # 0x453d30
subl (%rcx,%rsi,4), %edi
jge 0x3f637
retq
movq 0x3d764a(%rip), %rcx    # 0x416c88
movl 0x23c458(%rip), %edx    # 0x27ba9c
movl %esi, %r8d
subl %edx, %r8d
movslq 0x3d763f(%rip), %rdx    # 0x416c90
movslq %r8d, %r8
addq %rdx, %r8
movslq (%rcx,%r8,4), %r9
movl 0x3d51d7(%rip), %ecx    # 0x414838
imull %r9d, %ecx
movl %ecx, 0x3d75e9(%rip)    # 0x416c54
movl 0x3d51d3(%rip), %ecx    # 0x414844
imull %r9d, %ecx
movl %ecx, 0x3d75dd(%rip)    # 0x416c58
movslq 0x3d51ae(%rip), %rcx    # 0x414830
imulq %r9, %rcx
shrq $0x10, %rcx
sarl $0x8, %ecx
addl 0x3d5199(%rip), %ecx    # 0x41482c
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
movswl 0x3d5187(%rip), %edx    # 0x414828
decl %edx
cmpl %edx, %ecx
cmovll %ecx, %edx
shll $0x8, %edx
movl 0x3d518f(%rip), %ecx    # 0x414840
imull %r9d, %ecx
addl 0x414429(%rip), %ecx    # 0x453ae4
movl 0x3d517a(%rip), %r8d    # 0x41483c
imull %r9d, %r8d
addl 0x414413(%rip), %r8d    # 0x453ae0
leaq 0x3d75cc(%rip), %r9     # 0x416ca0
movslq (%r9,%rsi,4), %rsi
movslq %eax, %r9
addq %rsi, %r9
addq 0x3980ab(%rip), %r9     # 0x3d7790
xorl %esi, %esi
jmp 0x6fa90