// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/engine.c
// Function: drawmasks
void drawmasks(void)
{
	int i, j, k, l, gap, xs, ys, xp, yp, yoff, yspan;

	for(i=spritesortcnt-1;i>=0;i--) tspriteptr[i] = &tsprite[i];
	for(i=spritesortcnt-1;i>=0;i--)
	{
		xs = tspriteptr[i]->x-globalposx; ys = tspriteptr[i]->y-globalposy;
		yp = dmulscale6(xs,cosviewingrangeglobalang,ys,sinviewingrangeglobalang);
		if (yp > (4<<8))
		{
			xp = dmulscale6(ys,cosglobalang,-xs,singlobalang);
			if (mulscale24(abs(xp+yp),xdimen) >= yp) goto killsprite;
			spritesx[i] = scale(xp+yp,xdimen<<7,yp);
		}
		else if ((tspriteptr[i]->cstat&48) == 0)
		{
killsprite:
			spritesortcnt--;  //Delete face sprite if on wrong side!
			if (i != spritesortcnt)
			{
				tspriteptr[i] = tspriteptr[spritesortcnt];
				spritesx[i] = spritesx[spritesortcnt];
				spritesy[i] = spritesy[spritesortcnt];
			}
			continue;
		}
		spritesy[i] = yp;
	}

	gap = 1; while (gap < spritesortcnt) gap = (gap<<1)+1;
	for(gap>>=1;gap>0;gap>>=1)      //Sort sprite list
		for(i=0;i<spritesortcnt-gap;i++)
			for(l=i;l>=0;l-=gap)
			{
				if (spritesy[l] <= spritesy[l+gap]) break;
				swaplong(&tspriteptr[l],&tspriteptr[l+gap]);
				swaplong(&spritesx[l],&spritesx[l+gap]);
				swaplong(&spritesy[l],&spritesy[l+gap]);
			}

	if (spritesortcnt > 0)
		spritesy[spritesortcnt] = (spritesy[spritesortcnt-1]^1);

	ys = spritesy[0]; i = 0;
	for(j=1;j<=spritesortcnt;j++)
	{
		if (spritesy[j] == ys) continue;
		ys = spritesy[j];
		if (j > i+1)
		{
			for(k=i;k<j;k++)
			{
				spritesz[k] = tspriteptr[k]->z;
				if ((tspriteptr[k]->cstat&48) != 32)
				{
					yoff = (int)((signed char)((picanm[tspriteptr[k]->picnum]>>16)&255))+((int)tspriteptr[k]->yoffset);
					spritesz[k] -= ((yoff*tspriteptr[k]->yrepeat)<<2);
					yspan = (tilesizy[tspriteptr[k]->picnum]*tspriteptr[k]->yrepeat<<2);
					if (!(tspriteptr[k]->cstat&128)) spritesz[k] -= (yspan>>1);
					if (klabs(spritesz[k]-globalposz) < (yspan>>1)) spritesz[k] = globalposz;
				}
			}
			for(k=i+1;k<j;k++)
				for(l=i;l<k;l++)
					if (klabs(spritesz[k]-globalposz) < klabs(spritesz[l]-globalposz))
					{
						swaplong(&tspriteptr[k],&tspriteptr[l]);
						swaplong(&spritesx[k],&spritesx[l]);
						swaplong(&spritesy[k],&spritesy[l]);
						swaplong(&spritesz[k],&spritesz[l]);
					}
			for(k=i+1;k<j;k++)
				for(l=i;l<k;l++)
					if (tspriteptr[k]->statnum < tspriteptr[l]->statnum)
					{
						swaplong(&tspriteptr[k],&tspriteptr[l]);
						swaplong(&spritesx[k],&spritesx[l]);
						swaplong(&spritesy[k],&spritesy[l]);
					}
		}
		i = j;
	}

	/*for(i=spritesortcnt-1;i>=0;i--)
	{
		xs = tspriteptr[i].x-globalposx;
		ys = tspriteptr[i].y-globalposy;
		zs = tspriteptr[i].z-globalposz;

		xp = ys*cosglobalang-xs*singlobalang;
		yp = (zs<<1);
		zp = xs*cosglobalang+ys*singlobalang;

		xs = scale(xp,halfxdimen<<12,zp)+((halfxdimen+windowx1)<<12);
		ys = scale(yp,xdimenscale<<12,zp)+((globalhoriz+windowy1)<<12);

		drawline256(xs-65536,ys-65536,xs+65536,ys+65536,31);
		drawline256(xs+65536,ys-65536,xs-65536,ys+65536,31);
	}*/

#if USE_POLYMOST
		//Hack to make it draw all opaque quads first. This should reduce the chances of
		//bad sorting causing transparent quads knocking out opaque quads behind it.
		//
		//Need to store alpha flag with all textures before this works right!
	if (rendmode > 0)
	{
		for(i=spritesortcnt-1;i>=0;i--)
			if ((!(tspriteptr[i]->cstat&2))
#if USE_OPENGL
			    && (!polymost_texmayhavealpha(tspriteptr[i]->picnum,tspriteptr[i]->pal))
#endif
			   )
				{ drawsprite(i); tspriteptr[i] = 0; } //draw only if it is fully opaque
		for(i=j=0;i<spritesortcnt;i++)
		{
			if (!tspriteptr[i]) continue;
			tspriteptr[j] = tspriteptr[i];
			spritesx[j] = spritesx[i];
			spritesy[j] = spritesy[i]; j++;
		}
		spritesortcnt = j;


		for(i=maskwallcnt-1;i>=0;i--)
		{
			k = thewall[maskwall[i]];
			if ((!(wall[k].cstat&128))
#if USE_OPENGL
			    && (!polymost_texmayhavealpha(wall[k].overpicnum,wall[k].pal))
#endif
			   )
				{ drawmaskwall(i); maskwall[i] = -1; } //draw only if it is fully opaque
		}
		for(i=j=0;i<maskwallcnt;i++)
		{
			if (maskwall[i] < 0) continue;
			maskwall[j++] = maskwall[i];
		}
		maskwallcnt = j;
	}
#endif

	while ((spritesortcnt > 0) && (maskwallcnt > 0))  //While BOTH > 0
	{
		j = maskwall[maskwallcnt-1];
		if (spritewallfront(tspriteptr[spritesortcnt-1],(int)thewall[j]) == 0)
			drawsprite(--spritesortcnt);
		else
		{
				//Check to see if any sprites behind the masked wall...
			k = -1;
			gap = 0;
			for(i=spritesortcnt-2;i>=0;i--)
			{
#if USE_POLYMOST
				if (rendmode > 0)
					l = dxb1[j] <= (double)spritesx[i]/256.0 && (double)spritesx[i]/256.0 <= dxb2[j];
				else
#endif
					l = xb1[j] <= (spritesx[i]>>8) && (spritesx[i]>>8) <= xb2[j];
				if (l && spritewallfront(tspriteptr[i],(int)thewall[j]) == 0)
				{
					drawsprite(i);
					tspriteptr[i]->owner = -1;
					k = i;
					gap++;
				}
			}
			if (k >= 0)       //remove holes in sprite list
			{
				for(i=k;i<spritesortcnt;i++)
					if (tspriteptr[i]->owner >= 0)
					{
						if (i > k)
						{
							tspriteptr[k] = tspriteptr[i];
							spritesx[k] = spritesx[i];
							spritesy[k] = spritesy[i];
						}
						k++;
					}
				spritesortcnt -= gap;
			}

				//finally safe to draw the masked wall
			drawmaskwall(--maskwallcnt);
		}
	}
	while (spritesortcnt > 0) drawsprite(--spritesortcnt);
	while (maskwallcnt > 0) drawmaskwall(--maskwallcnt);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl 0x3d6976(%rip), %eax    # 0x412504
subl $0x1, %eax
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jl 0x3bbc6
movslq -0x4(%rbp), %rax
leaq 0x3e098b(%rip), %rdx    # 0x41c530
imulq $0x2c, %rax, %rax
addq %rax, %rdx
movslq -0x4(%rbp), %rcx
leaq 0x3f6979(%rip), %rax    # 0x432530
movq %rdx, (%rax,%rcx,8)
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3bb94
movl 0x3d6938(%rip), %eax    # 0x412504
subl $0x1, %eax
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jl 0x3bd54
movslq -0x4(%rbp), %rcx
leaq 0x3f6949(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rax
movl (%rax), %eax
subl 0x23b9bd(%rip), %eax    # 0x2775b0
movl %eax, -0x18(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x3f692f(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %eax
subl 0x23b9a6(%rip), %eax    # 0x2775b4
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %edi
movl 0x2709c2(%rip), %esi    # 0x2ac5dc
movl -0x1c(%rbp), %edx
movl 0x2709b1(%rip), %ecx    # 0x2ac5d4
callq 0x3c870
movl %eax, -0x24(%rbp)
cmpl $0x400, -0x24(%rbp)     # imm = 0x400
jle 0x3bc9b
movl -0x1c(%rbp), %edi
movl 0x270993(%rip), %esi    # 0x2ac5d0
xorl %edx, %edx
subl -0x18(%rbp), %edx
movl 0x270990(%rip), %ecx    # 0x2ac5d8
callq 0x3c870
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %edi
addl -0x24(%rbp), %edi
movl %edi, %eax
negl %eax
cmovnsl %eax, %edi
movl 0xa50bd(%rip), %esi     # 0xe0d20
callq 0x3c8b0
cmpl -0x24(%rbp), %eax
jl 0x3bc6f
jmp 0x3bcb8
movl -0x20(%rbp), %edi
addl -0x24(%rbp), %edi
movl 0xa50a5(%rip), %esi     # 0xe0d20
shll $0x7, %esi
movl -0x24(%rbp), %edx
callq 0x37720
movl %eax, %edx
movslq -0x4(%rbp), %rcx
leaq 0x3fa89d(%rip), %rax    # 0x436530
movl %edx, (%rax,%rcx,4)
jmp 0x3bd35
movslq -0x4(%rbp), %rcx
leaq 0x3f688a(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rax
movswl 0xc(%rax), %eax
andl $0x30, %eax
cmpl $0x0, %eax
jne 0x3bd33
jmp 0x3bcb8
movl 0x3d6846(%rip), %eax    # 0x412504
addl $-0x1, %eax
movl %eax, 0x3d683d(%rip)    # 0x412504
movl -0x4(%rbp), %eax
cmpl 0x3d6834(%rip), %eax    # 0x412504
je 0x3bd31
movslq 0x3d682b(%rip), %rcx    # 0x412504
leaq 0x3f6850(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rdx
movslq -0x4(%rbp), %rcx
leaq 0x3f6841(%rip), %rax    # 0x432530
movq %rdx, (%rax,%rcx,8)
movslq 0x3d680a(%rip), %rcx    # 0x412504
leaq 0x3fa82f(%rip), %rax    # 0x436530
movl (%rax,%rcx,4), %edx
movslq -0x4(%rbp), %rcx
leaq 0x3fa821(%rip), %rax    # 0x436530
movl %edx, (%rax,%rcx,4)
movslq 0x3d67eb(%rip), %rcx    # 0x412504
leaq 0x3fc810(%rip), %rax    # 0x438530
movl (%rax,%rcx,4), %edx
movslq -0x4(%rbp), %rcx
leaq 0x3fc802(%rip), %rax    # 0x438530
movl %edx, (%rax,%rcx,4)
jmp 0x3bd46
jmp 0x3bd35
movl -0x24(%rbp), %edx
movslq -0x4(%rbp), %rcx
leaq 0x3fc7ed(%rip), %rax    # 0x438530
movl %edx, (%rax,%rcx,4)
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3bbd2
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x3d67a0(%rip), %eax    # 0x412504
jge 0x3bd73
movl -0x14(%rbp), %eax
shll %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3bd5b
movl -0x14(%rbp), %eax
sarl %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jle 0x3be8e
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl 0x3d676f(%rip), %ecx    # 0x412504
subl -0x14(%rbp), %ecx
cmpl %ecx, %eax
jge 0x3be7f
movl -0x4(%rbp), %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jl 0x3be6f
movslq -0x10(%rbp), %rcx
leaq 0x3fc775(%rip), %rax    # 0x438530
movl (%rax,%rcx,4), %eax
movl -0x10(%rbp), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rdx
leaq 0x3fc762(%rip), %rcx    # 0x438530
cmpl (%rcx,%rdx,4), %eax
jg 0x3bdd8
jmp 0x3be6f
movslq -0x10(%rbp), %rax
leaq 0x3f674d(%rip), %rdi    # 0x432530
shlq $0x3, %rax
addq %rax, %rdi
movl -0x10(%rbp), %eax
addl -0x14(%rbp), %eax
cltq
leaq 0x3f6737(%rip), %rsi    # 0x432530
shlq $0x3, %rax
addq %rax, %rsi
callq 0x3c8d0
movslq -0x10(%rbp), %rax
leaq 0x3fa720(%rip), %rdi    # 0x436530
shlq $0x2, %rax
addq %rax, %rdi
movl -0x10(%rbp), %eax
addl -0x14(%rbp), %eax
cltq
leaq 0x3fa70a(%rip), %rsi    # 0x436530
shlq $0x2, %rax
addq %rax, %rsi
callq 0x3c8d0
movslq -0x10(%rbp), %rax
leaq 0x3fc6f3(%rip), %rdi    # 0x438530
shlq $0x2, %rax
addq %rax, %rdi
movl -0x10(%rbp), %eax
addl -0x14(%rbp), %eax
cltq
leaq 0x3fc6dd(%rip), %rsi    # 0x438530
shlq $0x2, %rax
addq %rax, %rsi
callq 0x3c8d0
movl -0x14(%rbp), %ecx
movl -0x10(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x10(%rbp)
jmp 0x3bda6
jmp 0x3be71
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3bd8c
jmp 0x3be81
movl -0x14(%rbp), %eax
sarl %eax
movl %eax, -0x14(%rbp)
jmp 0x3bd7b
cmpl $0x0, 0x3d666f(%rip)    # 0x412504
jle 0x3bec1
movl 0x3d6667(%rip), %eax    # 0x412504
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x3fc686(%rip), %rax    # 0x438530
movl (%rax,%rcx,4), %edx
xorl $0x1, %edx
movslq 0x3d664d(%rip), %rcx    # 0x412504
leaq 0x3fc672(%rip), %rax    # 0x438530
movl %edx, (%rax,%rcx,4)
movl 0x3fc669(%rip), %eax    # 0x438530
movl %eax, -0x1c(%rbp)
movl $0x0, -0x4(%rbp)
movl $0x1, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl 0x3d6623(%rip), %eax    # 0x412504
jg 0x3c2d7
movslq -0x8(%rbp), %rcx
leaq 0x3fc63e(%rip), %rax    # 0x438530
movl (%rax,%rcx,4), %eax
cmpl -0x1c(%rbp), %eax
jne 0x3beff
jmp 0x3c2c9
movslq -0x8(%rbp), %rcx
leaq 0x3fc626(%rip), %rax    # 0x438530
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
movl -0x8(%rbp), %eax
movl -0x4(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jle 0x3c2c3
movl -0x4(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x3c0a8
movslq -0xc(%rbp), %rcx
leaq 0x3f65f2(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rax
movl 0x8(%rax), %edx
movslq -0xc(%rbp), %rcx
leaq 0x3fe5f0(%rip), %rax    # 0x43a540
movl %edx, (%rax,%rcx,4)
movslq -0xc(%rbp), %rcx
leaq 0x3f65d2(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rax
movswl 0xc(%rax), %eax
andl $0x30, %eax
cmpl $0x20, %eax
je 0x3c098
movslq -0xc(%rbp), %rcx
leaq 0x3f65b3(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rax
movswq 0xe(%rax), %rcx
leaq 0x23b633(%rip), %rax    # 0x2775c0
movl (%rax,%rcx,4), %eax
sarl $0x10, %eax
andl $0xff, %eax
movsbl %al, %eax
movslq -0xc(%rbp), %rdx
leaq 0x3f658a(%rip), %rcx    # 0x432530
movq (%rcx,%rdx,8), %rcx
movsbl 0x17(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movslq -0xc(%rbp), %rdx
leaq 0x3f656f(%rip), %rcx    # 0x432530
movq (%rcx,%rdx,8), %rcx
movzbl 0x15(%rcx), %ecx
imull %ecx, %eax
shll $0x2, %eax
movslq -0xc(%rbp), %rcx
leaq 0x3fe566(%rip), %rdx    # 0x43a540
movl (%rdx,%rcx,4), %edx
subl %eax, %edx
leaq 0x3fe55a(%rip), %rax    # 0x43a540
movl %edx, (%rax,%rcx,4)
movslq -0xc(%rbp), %rcx
leaq 0x3f653c(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rax
movswq 0xe(%rax), %rcx
leaq 0x40053c(%rip), %rax    # 0x43c540
movswl (%rax,%rcx,2), %eax
movslq -0xc(%rbp), %rdx
leaq 0x3f651d(%rip), %rcx    # 0x432530
movq (%rcx,%rdx,8), %rcx
movzbl 0x15(%rcx), %ecx
imull %ecx, %eax
shll $0x2, %eax
movl %eax, -0x2c(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x3f6501(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rax
movswl 0xc(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x3c060
movl -0x2c(%rbp), %eax
sarl %eax
movslq -0xc(%rbp), %rcx
leaq 0x3fe4ef(%rip), %rdx    # 0x43a540
movl (%rdx,%rcx,4), %edx
subl %eax, %edx
leaq 0x3fe4e3(%rip), %rax    # 0x43a540
movl %edx, (%rax,%rcx,4)
movslq -0xc(%rbp), %rcx
leaq 0x3fe4d5(%rip), %rax    # 0x43a540
movl (%rax,%rcx,4), %edi
subl 0x26c54c(%rip), %edi    # 0x2a85c0
callq 0x37610
movl -0x2c(%rbp), %ecx
sarl %ecx
cmpl %ecx, %eax
jge 0x3c096
movl 0x26c538(%rip), %edx    # 0x2a85c0
movslq -0xc(%rbp), %rcx
leaq 0x3fe4ad(%rip), %rax    # 0x43a540
movl %edx, (%rax,%rcx,4)
jmp 0x3c098
jmp 0x3c09a
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3bf27
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x3c1d5
movl -0x4(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x3c1c5
movslq -0xc(%rbp), %rcx
leaq 0x3fe466(%rip), %rax    # 0x43a540
movl (%rax,%rcx,4), %edi
subl 0x26c4dd(%rip), %edi    # 0x2a85c0
callq 0x37610
movl %eax, -0x30(%rbp)
movslq -0x10(%rbp), %rcx
leaq 0x3fe44a(%rip), %rax    # 0x43a540
movl (%rax,%rcx,4), %edi
subl 0x26c4c1(%rip), %edi    # 0x2a85c0
callq 0x37610
movl %eax, %ecx
movl -0x30(%rbp), %eax
cmpl %ecx, %eax
jge 0x3c1b5
movslq -0xc(%rbp), %rax
leaq 0x3f6414(%rip), %rdi    # 0x432530
shlq $0x3, %rax
addq %rax, %rdi
movslq -0x10(%rbp), %rax
leaq 0x3f6402(%rip), %rsi    # 0x432530
shlq $0x3, %rax
addq %rax, %rsi
callq 0x3c8d0
movslq -0xc(%rbp), %rax
leaq 0x3fa3eb(%rip), %rdi    # 0x436530
shlq $0x2, %rax
addq %rax, %rdi
movslq -0x10(%rbp), %rax
leaq 0x3fa3d9(%rip), %rsi    # 0x436530
shlq $0x2, %rax
addq %rax, %rsi
callq 0x3c8d0
movslq -0xc(%rbp), %rax
leaq 0x3fc3c2(%rip), %rdi    # 0x438530
shlq $0x2, %rax
addq %rax, %rdi
movslq -0x10(%rbp), %rax
leaq 0x3fc3b0(%rip), %rsi    # 0x438530
shlq $0x2, %rax
addq %rax, %rsi
callq 0x3c8d0
movslq -0xc(%rbp), %rax
leaq 0x3fe3a9(%rip), %rdi    # 0x43a540
shlq $0x2, %rax
addq %rax, %rdi
movslq -0x10(%rbp), %rax
leaq 0x3fe397(%rip), %rsi    # 0x43a540
shlq $0x2, %rax
addq %rax, %rsi
callq 0x3c8d0
jmp 0x3c1b7
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x3c0c3
jmp 0x3c1c7
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3c0b1
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x3c2c1
movl -0x4(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x3c2b1
movslq -0xc(%rbp), %rcx
leaq 0x3f6329(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rax
movswl 0x1a(%rax), %eax
movslq -0x10(%rbp), %rdx
leaq 0x3f6316(%rip), %rcx    # 0x432530
movq (%rcx,%rdx,8), %rcx
movswl 0x1a(%rcx), %ecx
cmpl %ecx, %eax
jge 0x3c2a1
movslq -0xc(%rbp), %rax
leaq 0x3f62ff(%rip), %rdi    # 0x432530
shlq $0x3, %rax
addq %rax, %rdi
movslq -0x10(%rbp), %rax
leaq 0x3f62ed(%rip), %rsi    # 0x432530
shlq $0x3, %rax
addq %rax, %rsi
callq 0x3c8d0
movslq -0xc(%rbp), %rax
leaq 0x3fa2d6(%rip), %rdi    # 0x436530
shlq $0x2, %rax
addq %rax, %rdi
movslq -0x10(%rbp), %rax
leaq 0x3fa2c4(%rip), %rsi    # 0x436530
shlq $0x2, %rax
addq %rax, %rsi
callq 0x3c8d0
movslq -0xc(%rbp), %rax
leaq 0x3fc2ad(%rip), %rdi    # 0x438530
shlq $0x2, %rax
addq %rax, %rdi
movslq -0x10(%rbp), %rax
leaq 0x3fc29b(%rip), %rsi    # 0x438530
shlq $0x2, %rax
addq %rax, %rsi
callq 0x3c8d0
jmp 0x3c2a3
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x3c1f0
jmp 0x3c2b3
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3c1de
jmp 0x3c2c3
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x3bed8
leaq 0x5b1642(%rip), %rax    # 0x5ed920
cmpl $0x0, (%rax)
jle 0x3c539
movl 0x3d6217(%rip), %eax    # 0x412504
subl $0x1, %eax
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jl 0x3c36c
movslq -0x4(%rbp), %rcx
leaq 0x3f622c(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rax
movswl 0xc(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x3c35f
movslq -0x4(%rbp), %rcx
leaq 0x3f6211(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rax
movswl 0xe(%rax), %edi
movslq -0x4(%rbp), %rcx
leaq 0x3f61fe(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rax
movzbl 0x11(%rax), %esi
callq 0x72360
cmpl $0x0, %eax
jne 0x3c35f
movl -0x4(%rbp), %edi
callq 0x3c900
movslq -0x4(%rbp), %rcx
leaq 0x3f61d9(%rip), %rax    # 0x432530
movq $0x0, (%rax,%rcx,8)
jmp 0x3c361
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3c2f3
movl $0x0, -0x8(%rbp)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x3d6181(%rip), %eax    # 0x412504
jge 0x3c40a
movslq -0x4(%rbp), %rcx
leaq 0x3f619c(%rip), %rax    # 0x432530
cmpq $0x0, (%rax,%rcx,8)
jne 0x3c39d
jmp 0x3c3fc
movslq -0x4(%rbp), %rcx
leaq 0x3f6188(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rdx
movslq -0x8(%rbp), %rcx
leaq 0x3f6179(%rip), %rax    # 0x432530
movq %rdx, (%rax,%rcx,8)
movslq -0x4(%rbp), %rcx
leaq 0x3fa16a(%rip), %rax    # 0x436530
movl (%rax,%rcx,4), %edx
movslq -0x8(%rbp), %rcx
leaq 0x3fa15c(%rip), %rax    # 0x436530
movl %edx, (%rax,%rcx,4)
movslq -0x4(%rbp), %rcx
leaq 0x3fc14e(%rip), %rax    # 0x438530
movl (%rax,%rcx,4), %edx
movslq -0x8(%rbp), %rcx
leaq 0x3fc140(%rip), %rax    # 0x438530
movl %edx, (%rax,%rcx,4)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3c37a
movl -0x8(%rbp), %eax
movl %eax, 0x3d60f1(%rip)    # 0x412504
movswl 0x3d60e4(%rip), %eax    # 0x4124fe
subl $0x1, %eax
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jl 0x3c4ca
movslq -0x4(%rbp), %rcx
leaq 0x40490b(%rip), %rax    # 0x440d40
movswq (%rax,%rcx,2), %rcx
leaq 0x23916f(%rip), %rax    # 0x2755b0
movswl (%rax,%rcx,2), %eax
movl %eax, -0xc(%rbp)
movslq -0xc(%rbp), %rcx
leaq 0x1b915d(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0xe(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x3c4ba
movslq -0xc(%rbp), %rcx
leaq 0x1b913d(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movswl 0x12(%rax), %edi
movslq -0xc(%rbp), %rcx
leaq 0x1b9127(%rip), %rax    # 0x1f55b0
shlq $0x5, %rcx
addq %rcx, %rax
movzbl 0x15(%rax), %esi
callq 0x72360
cmpl $0x0, %eax
jne 0x3c4ba
movl -0x4(%rbp), %eax
movswl %ax, %edi
callq 0x41520
movslq -0x4(%rbp), %rcx
leaq 0x40488c(%rip), %rax    # 0x440d40
movw $0xffff, (%rax,%rcx,2)  # imm = 0xFFFF
jmp 0x3c4bc
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3c420
movl $0x0, -0x8(%rbp)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
movswl 0x3d601c(%rip), %ecx    # 0x4124fe
cmpl %ecx, %eax
jge 0x3c52f
movslq -0x4(%rbp), %rcx
leaq 0x40484f(%rip), %rax    # 0x440d40
movswl (%rax,%rcx,2), %eax
cmpl $0x0, %eax
jge 0x3c4fc
jmp 0x3c524
movslq -0x4(%rbp), %rcx
leaq 0x404839(%rip), %rax    # 0x440d40
movw (%rax,%rcx,2), %dx
movl -0x8(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x8(%rbp)
movslq %eax, %rcx
leaq 0x404820(%rip), %rax    # 0x440d40
movw %dx, (%rax,%rcx,2)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3c4d8
movl -0x8(%rbp), %eax
movw %ax, 0x3d5fc5(%rip)     # 0x4124fe
jmp 0x3c53b
xorl %eax, %eax
cmpl $0x0, 0x3d5fc0(%rip)    # 0x412504
movb %al, -0x31(%rbp)
jle 0x3c559
movswl 0x3d5fae(%rip), %eax    # 0x4124fe
cmpl $0x0, %eax
setg %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x3c565
jmp 0x3c813
movswl 0x3d5f92(%rip), %eax    # 0x4124fe
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x4047c7(%rip), %rax    # 0x440d40
movswl (%rax,%rcx,2), %eax
movl %eax, -0x8(%rbp)
movl 0x3d5f7e(%rip), %eax    # 0x412504
subl $0x1, %eax
movslq %eax, %rcx
leaq 0x3f5f9d(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rdi
movslq -0x8(%rbp), %rcx
leaq 0x23900e(%rip), %rax    # 0x2755b0
movswl (%rax,%rcx,2), %esi
callq 0x41da0
cmpl $0x0, %eax
jne 0x3c5c9
movl 0x3d5f4e(%rip), %edi    # 0x412504
addl $-0x1, %edi
movl %edi, 0x3d5f45(%rip)    # 0x412504
callq 0x3c900
jmp 0x3c80e
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x14(%rbp)
movl 0x3d5f27(%rip), %eax    # 0x412504
subl $0x2, %eax
movl %eax, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
jl 0x3c735
leaq 0x5b132c(%rip), %rax    # 0x5ed920
cmpl $0x0, (%rax)
jle 0x3c673
movslq -0x8(%rbp), %rcx
leaq 0x5b55ac(%rip), %rax    # 0x5f1bb0
movsd (%rax,%rcx,8), %xmm1
movslq -0x4(%rbp), %rcx
leaq 0x3f9f1c(%rip), %rax    # 0x436530
cvtsi2sdl (%rax,%rcx,4), %xmm0
movsd 0x766f7(%rip), %xmm2    # 0xb2d18
divsd %xmm2, %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
movb %al, -0x32(%rbp)
jb 0x3c666
movslq -0x4(%rbp), %rcx
leaq 0x3f9ef5(%rip), %rax    # 0x436530
cvtsi2sdl (%rax,%rcx,4), %xmm1
movsd 0x766d0(%rip), %xmm0    # 0xb2d18
divsd %xmm0, %xmm1
movslq -0x8(%rbp), %rcx
leaq 0x5bd559(%rip), %rax    # 0x5f9bb0
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
setae %al
movb %al, -0x32(%rbp)
movb -0x32(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x10(%rbp)
jmp 0x3c6cb
movslq -0x8(%rbp), %rcx
leaq 0x26bf52(%rip), %rax    # 0x2a85d0
movl (%rax,%rcx,4), %ecx
movslq -0x4(%rbp), %rdx
leaq 0x3f9ea4(%rip), %rax    # 0x436530
movl (%rax,%rdx,4), %edx
sarl $0x8, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x33(%rbp)
jg 0x3c6c0
movslq -0x4(%rbp), %rcx
leaq 0x3f9e8a(%rip), %rax    # 0x436530
movl (%rax,%rcx,4), %eax
sarl $0x8, %eax
movslq -0x8(%rbp), %rdx
leaq 0x26ff29(%rip), %rcx    # 0x2ac5e0
cmpl (%rcx,%rdx,4), %eax
setle %al
movb %al, -0x33(%rbp)
movb -0x33(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x3c725
movslq -0x4(%rbp), %rcx
leaq 0x3f5e54(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rdi
movslq -0x8(%rbp), %rcx
leaq 0x238ec5(%rip), %rax    # 0x2755b0
movswl (%rax,%rcx,2), %esi
callq 0x41da0
cmpl $0x0, %eax
jne 0x3c725
movl -0x4(%rbp), %edi
callq 0x3c900
movslq -0x4(%rbp), %rcx
leaq 0x3f5e24(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rax
movw $0xffff, 0x1e(%rax)     # imm = 0xFFFF
movl -0x4(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3c727
movl -0x4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3c5e3
cmpl $0x0, -0xc(%rbp)
jl 0x3c7f4
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x3d5db6(%rip), %eax    # 0x412504
jge 0x3c7e3
movslq -0x4(%rbp), %rcx
leaq 0x3f5dd1(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rax
movswl 0x1e(%rax), %eax
cmpl $0x0, %eax
jl 0x3c7d3
movl -0x4(%rbp), %eax
cmpl -0xc(%rbp), %eax
jle 0x3c7ca
movslq -0x4(%rbp), %rcx
leaq 0x3f5db1(%rip), %rax    # 0x432530
movq (%rax,%rcx,8), %rdx
movslq -0xc(%rbp), %rcx
leaq 0x3f5da2(%rip), %rax    # 0x432530
movq %rdx, (%rax,%rcx,8)
movslq -0x4(%rbp), %rcx
leaq 0x3f9d93(%rip), %rax    # 0x436530
movl (%rax,%rcx,4), %edx
movslq -0xc(%rbp), %rcx
leaq 0x3f9d85(%rip), %rax    # 0x436530
movl %edx, (%rax,%rcx,4)
movslq -0x4(%rbp), %rcx
leaq 0x3fbd77(%rip), %rax    # 0x438530
movl (%rax,%rcx,4), %edx
movslq -0xc(%rbp), %rcx
leaq 0x3fbd69(%rip), %rax    # 0x438530
movl %edx, (%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x3c7d5
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3c745
movl -0x14(%rbp), %ecx
movl 0x3d5d18(%rip), %eax    # 0x412504
subl %ecx, %eax
movl %eax, 0x3d5d10(%rip)    # 0x412504
movw 0x3d5d03(%rip), %ax     # 0x4124fe
addw $-0x1, %ax
movw %ax, 0x3d5cf8(%rip)     # 0x4124fe
movswl %ax, %edi
callq 0x41520
jmp 0x3c53b
jmp 0x3c815
cmpl $0x0, 0x3d5ce8(%rip)    # 0x412504
jle 0x3c834
movl 0x3d5ce0(%rip), %edi    # 0x412504
addl $-0x1, %edi
movl %edi, 0x3d5cd7(%rip)    # 0x412504
callq 0x3c900
jmp 0x3c815
jmp 0x3c836
movswl 0x3d5cc1(%rip), %eax    # 0x4124fe
cmpl $0x0, %eax
jle 0x3c85e
movw 0x3d5cb5(%rip), %ax     # 0x4124fe
addw $-0x1, %ax
movw %ax, 0x3d5caa(%rip)     # 0x4124fe
movswl %ax, %edi
callq 0x41520
jmp 0x3c836
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)