// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_drawmaskwall
void polymost_drawmaskwall (int damaskwallcnt)
{
	double dpx[8], dpy[8], dpx2[8], dpy2[8];
	float fy, x0, x1, sx0, sy0, sx1, sy1, xp0, yp0, xp1, yp1, oxp0, oyp0, ryp0, ryp1;
	float r, t, t0, t1, csy[4], fsy[4];
	int i, j, n, n2, z, sectnum, z1, z2, cz[4], fz[4], method;
	sectortype *sec, *nsec;
	walltype *wal, *wal2;

#ifdef DEBUGGINGAIDS
	polymostcallcounts.drawmaskwall++;
#endif

	z = maskwall[damaskwallcnt];
	wal = &wall[thewall[z]]; wal2 = &wall[wal->point2];
	sectnum = thesector[z]; sec = &sector[sectnum];
	nsec = &sector[wal->nextsector];
	z1 = max(nsec->ceilingz,sec->ceilingz);
	z2 = min(nsec->floorz,sec->floorz);

	globalpicnum = wal->overpicnum; if ((unsigned int)globalpicnum >= MAXTILES) globalpicnum = 0;
	if (picanm[globalpicnum]&192) globalpicnum += animateoffs(globalpicnum,(short)thewall[z]+16384);
	globalshade = (int)wal->shade;
	globalpal = (int)((unsigned char)wal->pal);
	globalorientation = (int)wal->cstat;

	sx0 = (float)(wal->x-globalposx); sx1 = (float)(wal2->x-globalposx);
	sy0 = (float)(wal->y-globalposy); sy1 = (float)(wal2->y-globalposy);
	yp0 = sx0*gcosang2 + sy0*gsinang2;
	yp1 = sx1*gcosang2 + sy1*gsinang2;
	if ((yp0 < SCISDIST) && (yp1 < SCISDIST)) return;
	xp0 = sy0*gcosang - sx0*gsinang;
	xp1 = sy1*gcosang - sx1*gsinang;

		//Clip to close parallel-screen plane
	oxp0 = xp0; oyp0 = yp0;
	if (yp0 < SCISDIST) { t0 = (SCISDIST-yp0)/(yp1-yp0); xp0 = (xp1-xp0)*t0+xp0; yp0 = SCISDIST; }
						  else t0 = 0.f;
	if (yp1 < SCISDIST) { t1 = (SCISDIST-oyp0)/(yp1-oyp0); xp1 = (xp1-oxp0)*t1+oxp0; yp1 = SCISDIST; }
						else { t1 = 1.f; }

	getzsofslope(sectnum,(int)((wal2->x-wal->x)*t0+wal->x),(int)((wal2->y-wal->y)*t0+wal->y),&cz[0],&fz[0]);
	getzsofslope(wal->nextsector,(int)((wal2->x-wal->x)*t0+wal->x),(int)((wal2->y-wal->y)*t0+wal->y),&cz[1],&fz[1]);
	getzsofslope(sectnum,(int)((wal2->x-wal->x)*t1+wal->x),(int)((wal2->y-wal->y)*t1+wal->y),&cz[2],&fz[2]);
	getzsofslope(wal->nextsector,(int)((wal2->x-wal->x)*t1+wal->x),(int)((wal2->y-wal->y)*t1+wal->y),&cz[3],&fz[3]);

	ryp0 = 1.f/yp0; ryp1 = 1.f/yp1;

		//Generate screen coordinates for front side of wall
	x0 = ghalfx*xp0*ryp0 + ghalfx;
	x1 = ghalfx*xp1*ryp1 + ghalfx;
	if (x1 <= x0) return;

	ryp0 *= gyxscale; ryp1 *= gyxscale;

	gdx = (ryp0-ryp1)*gxyaspect / (x0-x1);
	gdy = 0;
	gdo = ryp0*gxyaspect - gdx*x0;

		//gux*x0 + guo = t0*wal->xrepeat*8*yp0
		//gux*x1 + guo = t1*wal->xrepeat*8*yp1
	gux = (t0*ryp0 - t1*ryp1)*gxyaspect*(float)wal->xrepeat*8.f / (x0-x1);
	guo = t0*ryp0*gxyaspect*(float)wal->xrepeat*8.f - gux*x0;
	guo += (float)wal->xpanning*gdo;
	gux += (float)wal->xpanning*gdx;
	guy = 0;

	if (!(wal->cstat&4)) i = z1; else i = z2;
	i -= globalposz;
	t0 = ((float)i)*ryp0 + ghoriz;
	t1 = ((float)i)*ryp1 + ghoriz;
	t = ((gdx*x0 + gdo) * (float)wal->yrepeat) / ((x1-x0) * ryp0 * 2048.f);
	i = (1<<(picsiz[globalpicnum]>>4)); if (i < tilesizy[globalpicnum]) i <<= 1;
	fy = (float)wal->ypanning * ((float)i) / 256.0;
	gvx = (t0-t1)*t;
	gvy = (x1-x0)*t;
	gvo = -gvx*x0 - gvy*t0 + fy*gdo; gvx += fy*gdx; gvy += fy*gdy;

	if (wal->cstat&8) //xflip
	{
		t = (float)(wal->xrepeat*8 + wal->xpanning*2);
		gux = gdx*t - gux;
		guy = gdy*t - guy;
		guo = gdo*t - guo;
	}
	if (wal->cstat&256) { gvx = -gvx; gvy = -gvy; gvo = -gvo; } //yflip

	method = METH_MASKED;
	if (wal->cstat&128) { if (!(wal->cstat&512)) method = METH_TRANS; else method = METH_INTRANS; }
	method |= METH_POW2XSPLIT | METH_LAYERS;

#if USE_OPENGL
	gfogpalnum = sec->floorpal;
	gfogdensity = gvisibility*((float)((unsigned char)(sec->visibility+16)) / 255.f);
#endif

	for(i=0;i<2;i++)
	{
		csy[i] = ((float)(cz[i]-globalposz))*ryp0 + ghoriz;
		fsy[i] = ((float)(fz[i]-globalposz))*ryp0 + ghoriz;
		csy[i+2] = ((float)(cz[i+2]-globalposz))*ryp1 + ghoriz;
		fsy[i+2] = ((float)(fz[i+2]-globalposz))*ryp1 + ghoriz;
	}

		//Clip 2 quadrilaterals
		//               /csy3
		//             /   |
		// csy0------/----csy2
		//   |     /xxxxxxx|
		//   |   /xxxxxxxxx|
		// csy1/xxxxxxxxxxx|
		//   |xxxxxxxxxxx/fsy3
		//   |xxxxxxxxx/   |
		//   |xxxxxxx/     |
		// fsy0----/------fsy2
		//   |   /
		// fsy1/

	dpx[0] = x0; dpy[0] = csy[1];
	dpx[1] = x1; dpy[1] = csy[3];
	dpx[2] = x1; dpy[2] = fsy[3];
	dpx[3] = x0; dpy[3] = fsy[1];
	n = 4;

		//Clip to (x0,csy[0])-(x1,csy[2])
	n2 = 0; t1 = -((dpx[0]-x0)*(csy[2]-csy[0]) - (dpy[0]-csy[0])*(x1-x0));
	for(i=0;i<n;i++)
	{
		j = i+1; if (j >= n) j = 0;

		t0 = t1; t1 = -((dpx[j]-x0)*(csy[2]-csy[0]) - (dpy[j]-csy[0])*(x1-x0));
		if (t0 >= 0) { dpx2[n2] = dpx[i]; dpy2[n2] = dpy[i]; n2++; }
		if ((t0 >= 0) != (t1 >= 0))
		{
			r = t0/(t0-t1);
			dpx2[n2] = (dpx[j]-dpx[i])*r + dpx[i];
			dpy2[n2] = (dpy[j]-dpy[i])*r + dpy[i];
			n2++;
		}
	}
	if (n2 < 3) return;

		//Clip to (x1,fsy[2])-(x0,fsy[0])
	n = 0; t1 = -((dpx2[0]-x1)*(fsy[0]-fsy[2]) - (dpy2[0]-fsy[2])*(x0-x1));
	for(i=0;i<n2;i++)
	{
		j = i+1; if (j >= n2) j = 0;

		t0 = t1; t1 = -((dpx2[j]-x1)*(fsy[0]-fsy[2]) - (dpy2[j]-fsy[2])*(x0-x1));
		if (t0 >= 0) { dpx[n] = dpx2[i]; dpy[n] = dpy2[i]; n++; }
		if ((t0 >= 0) != (t1 >= 0))
		{
			r = t0/(t0-t1);
			dpx[n] = (dpx2[j]-dpx2[i])*r + dpx2[i];
			dpy[n] = (dpy2[j]-dpy2[i])*r + dpy2[i];
			n++;
		}
	}
	if (n < 3) return;

	drawpoly(dpx,dpy,n,method);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movslq %edi, %rax
leaq 0x3ad924(%rip), %rcx    # 0x404fe0
movswq (%rcx,%rax,2), %rcx
leaq 0x1e0388(%rip), %rax    # 0x237a50
movswq (%rax,%rcx,2), %rax
movq %rax, %rdx
shlq $0x5, %rdx
leaq 0x160375(%rip), %rsi    # 0x1b7a50
movswq 0x8(%rsi,%rdx), %r15
shlq $0x5, %r15
addq %rsi, %r15
leaq 0x3f5781(%rip), %rdi    # 0x44ce70
movswq (%rdi,%rcx,2), %r9
leaq (%r9,%r9,4), %r14
leaq 0x1eb361(%rip), %r8     # 0x242a60
movswq 0xc(%rsi,%rdx), %rcx
leaq (%rcx,%rcx,4), %rcx
movl 0x4(%r8,%rcx,8), %edi
movl 0x8(%r8,%rcx,8), %ecx
movl 0x4(%r8,%r14,8), %ebp
cmpl %ebp, %edi
cmovgl %edi, %ebp
movl 0x8(%r8,%r14,8), %r13d
cmpl %r13d, %ecx
cmovll %ecx, %r13d
leaq (%rsi,%rdx), %r12
movzwl 0x12(%rsi,%rdx), %edx
xorl %ecx, %ecx
cmpl $0x2400, %edx           # imm = 0x2400
cmovbl %edx, %ecx
leaq 0x3b78cc(%rip), %rdx    # 0x40f010
movw %cx, (%rdx)
movswq %cx, %rdx
leaq 0x1e230e(%rip), %rsi    # 0x239a60
testb $-0x40, (%rsi,%rdx,4)
je 0x57784
addl $0x4000, %eax           # imm = 0x4000
movswl %ax, %esi
movswl %cx, %edi
movq %r12, %rbx
movl %r13d, %r12d
movq %r9, %r13
callq 0x23d49
movq %r13, %r9
movl %r12d, %r13d
movq %rbx, %r12
leaq 0x3b788f(%rip), %rcx    # 0x40f010
addw %ax, (%rcx)
movsbl 0x14(%r12), %eax
leaq 0x3bc09b(%rip), %rcx    # 0x41382c
movl %eax, (%rcx)
movzbl 0x15(%r12), %eax
leaq 0x3b7864(%rip), %rcx    # 0x40f004
movl %eax, (%rcx)
movl (%r12), %ecx
leaq 0x1e22a3(%rip), %rax    # 0x239a50
movl (%rax), %edi
movl %ecx, %eax
subl %edi, %eax
cvtsi2ss %eax, %xmm0
movl 0x4(%r12), %eax
movl (%r15), %esi
movl 0x4(%r15), %edx
movl %esi, %r8d
subl %edi, %r8d
cvtsi2ss %r8d, %xmm3
leaq 0x1e227f(%rip), %rdi    # 0x239a54
movl (%rdi), %edi
movl %eax, %r8d
subl %edi, %r8d
cvtsi2ss %r8d, %xmm2
movl %edx, %r8d
subl %edi, %r8d
cvtsi2ss %r8d, %xmm4
movswl 0xe(%r12), %edi
cvtss2sd %xmm0, %xmm1
movsd 0x5a21a9(%rip), %xmm0   # 0x5f99a8
cvtss2sd %xmm2, %xmm2
movsd 0x5a21ad(%rip), %xmm5   # 0x5f99b8
movapd %xmm5, %xmm6
mulsd %xmm2, %xmm6
movaps %xmm1, %xmm7
mulsd %xmm0, %xmm7
addsd %xmm6, %xmm7
cvtsd2ss %xmm7, %xmm8
leaq 0x3b77d6(%rip), %r8     # 0x40f000
cvtss2sd %xmm3, %xmm3
cvtss2sd %xmm4, %xmm4
mulsd %xmm4, %xmm5
mulsd %xmm3, %xmm0
addsd %xmm5, %xmm0
cvtsd2ss %xmm0, %xmm9
movl %edi, (%r8)
movss 0x1e746(%rip), %xmm7    # 0x75f94
ucomiss %xmm8, %xmm7
jbe 0x57866
movss 0x1e738(%rip), %xmm0    # 0x75f94
ucomiss %xmm9, %xmm0
ja 0x582cb
xorps %xmm0, %xmm0
cvtss2sd %xmm8, %xmm0
ucomiss %xmm8, %xmm7
movsd 0x5a2136(%rip), %xmm5   # 0x5f99b0
movsd 0x5a213e(%rip), %xmm6   # 0x5f99c0
mulsd %xmm6, %xmm1
mulsd %xmm5, %xmm2
subsd %xmm1, %xmm2
xorps %xmm1, %xmm1
cvtsd2ss %xmm2, %xmm1
mulsd %xmm6, %xmm3
mulsd %xmm5, %xmm4
subsd %xmm3, %xmm4
xorps %xmm5, %xmm5
cvtsd2ss %xmm4, %xmm5
xorps %xmm4, %xmm4
movaps %xmm9, %xmm2
subss %xmm8, %xmm2
movaps %xmm1, %xmm3
jbe 0x578ef
movsd 0x1d217(%rip), %xmm3    # 0x74ad8
subsd %xmm0, %xmm3
xorps %xmm4, %xmm4
cvtss2sd %xmm2, %xmm4
divsd %xmm4, %xmm3
xorps %xmm4, %xmm4
cvtsd2ss %xmm3, %xmm4
movaps %xmm5, %xmm3
subss %xmm1, %xmm3
mulss %xmm4, %xmm3
addss %xmm1, %xmm3
movss 0x1e6a5(%rip), %xmm8    # 0x75f94
movss %xmm3, 0x18(%rsp)
ucomiss %xmm9, %xmm7
movss %xmm8, 0x1c(%rsp)
jbe 0x57948
movsd 0x1d1ce(%rip), %xmm3    # 0x74ad8
subsd %xmm0, %xmm3
xorps %xmm0, %xmm0
cvtss2sd %xmm2, %xmm0
divsd %xmm0, %xmm3
xorps %xmm0, %xmm0
cvtsd2ss %xmm3, %xmm0
subss %xmm1, %xmm5
movss %xmm0, 0x8(%rsp)
mulss %xmm0, %xmm5
addss %xmm1, %xmm5
movss %xmm5, 0x14(%rsp)
movss 0x1e654(%rip), %xmm0    # 0x75f94
movss %xmm0, 0x10(%rsp)
jmp 0x5795b
movss %xmm7, 0x8(%rsp)
movss %xmm9, 0x10(%rsp)
movss %xmm5, 0x14(%rsp)
subl %ecx, %esi
xorps %xmm0, %xmm0
cvtsi2ss %esi, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
mulss %xmm4, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %esi
subl %eax, %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
mulss %xmm4, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %edx
movswl %r9w, %ebx
leaq 0x30(%rsp), %rcx
leaq 0x20(%rsp), %r8
movl %ebx, %edi
movss %xmm4, 0xc(%rsp)
callq 0x2600d
movl (%r15), %eax
movl 0x4(%r15), %ecx
movl (%r12), %edx
subl %edx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movl 0x4(%r12), %eax
xorps %xmm1, %xmm1
cvtsi2ss %edx, %xmm1
movss 0xc(%rsp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %esi
subl %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
movswl 0xc(%r12), %edi
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %edx
leaq 0x34(%rsp), %rcx
leaq 0x24(%rsp), %r8
callq 0x2600d
movl (%r15), %eax
movl 0x4(%r15), %ecx
movl (%r12), %edx
movl 0x4(%r12), %esi
subl %edx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %edx, %xmm1
movss 0x8(%rsp), %xmm2
mulss %xmm2, %xmm0
movaps %xmm2, %xmm3
movss %xmm2, 0x8(%rsp)
subl %esi, %ecx
xorps %xmm2, %xmm2
cvtsi2ss %ecx, %xmm2
addss %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %esi, %xmm1
cvttss2si %xmm0, %esi
mulss %xmm3, %xmm2
addss %xmm1, %xmm2
cvttss2si %xmm2, %edx
leaq 0x38(%rsp), %rcx
leaq 0x28(%rsp), %r8
movl %ebx, %edi
callq 0x2600d
movl (%r15), %eax
movl 0x4(%r15), %ecx
movl (%r12), %edx
subl %edx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movl 0x4(%r12), %eax
xorps %xmm1, %xmm1
cvtsi2ss %edx, %xmm1
movss 0x8(%rsp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %esi
subl %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
movswl 0xc(%r12), %edi
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %edx
leaq 0x3c(%rsp), %rcx
leaq 0x2c(%rsp), %r8
callq 0x2600d
movss 0x1e4b0(%rip), %xmm4    # 0x75f94
movaps %xmm4, %xmm0
divss 0x1c(%rsp), %xmm0
divss 0x10(%rsp), %xmm4
movsd 0x5a2035(%rip), %xmm2   # 0x5f9b30
xorps %xmm1, %xmm1
cvtss2sd 0x18(%rsp), %xmm1
mulsd %xmm2, %xmm1
cvtss2sd %xmm0, %xmm0
mulsd %xmm0, %xmm1
addsd %xmm2, %xmm1
cvtsd2ss %xmm1, %xmm10
xorps %xmm3, %xmm3
cvtss2sd 0x14(%rsp), %xmm3
mulsd %xmm2, %xmm3
xorps %xmm1, %xmm1
cvtss2sd %xmm4, %xmm1
mulsd %xmm1, %xmm3
addsd %xmm2, %xmm3
xorps %xmm2, %xmm2
cvtsd2ss %xmm3, %xmm2
ucomiss %xmm2, %xmm10
leaq 0x3b74c9(%rip), %r9     # 0x40f010
jae 0x582cb
movsd 0x5a6063(%rip), %xmm4   # 0x5fdbb8
mulsd %xmm4, %xmm0
xorps %xmm3, %xmm3
cvtsd2ss %xmm0, %xmm3
mulsd %xmm4, %xmm1
xorps %xmm4, %xmm4
cvtsd2ss %xmm1, %xmm4
movaps %xmm3, %xmm0
subss %xmm4, %xmm0
cvtss2sd %xmm0, %xmm7
movsd 0x5a6042(%rip), %xmm6   # 0x5fdbc0
mulsd %xmm6, %xmm7
movaps %xmm10, %xmm0
subss %xmm2, %xmm0
cvtss2sd %xmm0, %xmm0
divsd %xmm0, %xmm7
xorl %esi, %esi
cvtss2sd %xmm3, %xmm8
xorps %xmm1, %xmm1
cvtss2sd %xmm10, %xmm1
mulsd %xmm6, %xmm8
movapd %xmm7, %xmm5
mulsd %xmm1, %xmm5
subsd %xmm5, %xmm8
movss 0x8(%rsp), %xmm9
mulss %xmm4, %xmm9
movss 0xc(%rsp), %xmm11
mulss %xmm3, %xmm11
cvtss2sd %xmm11, %xmm12
subss %xmm9, %xmm11
cvtss2sd %xmm11, %xmm11
mulsd %xmm6, %xmm11
movzbl 0x16(%r12), %edi
xorps %xmm9, %xmm9
cvtsi2sd %edi, %xmm9
mulsd %xmm9, %xmm11
movsd 0x1e354(%rip), %xmm13   # 0x75f50
mulsd %xmm13, %xmm11
divsd %xmm0, %xmm11
movsd %xmm11, 0x5a1f59(%rip)  # 0x5f9b68
mulsd %xmm6, %xmm12
mulsd %xmm9, %xmm12
movapd %xmm1, %xmm6
mulsd %xmm11, %xmm6
mulsd %xmm13, %xmm12
subsd %xmm6, %xmm12
movsd %xmm12, 0x5a1f43(%rip)  # 0x5f9b78
movzbl 0x18(%r12), %r8d
xorps %xmm9, %xmm9
cvtsi2sd %r8d, %xmm9
movzwl 0xe(%r12), %eax
testb $0x4, %al
cmovel %ebp, %r13d
leaq 0x212e09(%rip), %rcx    # 0x26aa60
movl (%rcx), %edx
subl %edx, %r13d
cvtsi2ss %r13d, %xmm14
movaps %xmm3, %xmm6
mulss %xmm14, %xmm6
xorps %xmm13, %xmm13
cvtss2sd %xmm6, %xmm13
movsd 0x5a1ebe(%rip), %xmm6   # 0x5f9b38
addsd %xmm6, %xmm13
cvtsd2ss %xmm13, %xmm13
mulss %xmm4, %xmm14
cvtss2sd %xmm14, %xmm14
addsd %xmm6, %xmm14
cvtsd2ss %xmm14, %xmm14
addsd %xmm8, %xmm5
movzbl 0x17(%r12), %ecx
cvtsi2sd %ecx, %xmm15
mulsd %xmm5, %xmm15
movss %xmm2, 0x8(%rsp)
movaps %xmm2, %xmm5
subss %xmm10, %xmm5
movaps %xmm5, %xmm10
mulss %xmm3, %xmm10
mulss 0x215ff(%rip), %xmm10   # 0x792cc
cvtss2sd %xmm10, %xmm10
divsd %xmm10, %xmm15
cvtsd2ss %xmm15, %xmm15
movswq (%r9), %r9
leaq 0x3bbb69(%rip), %rcx    # 0x413850
movzbl (%rcx,%r9), %ecx
shrl $0x4, %ecx
movl $0x1, %r10d
shll %cl, %r10d
movapd %xmm9, %xmm10
leaq 0x3a8adc(%rip), %r11    # 0x4007e0
movswl (%r11,%r9,2), %r9d
movl $0x2, %r11d
shll %cl, %r11d
mulsd %xmm8, %xmm10
cmpl %r9d, %r10d
cmovgel %r10d, %r11d
movzbl 0x19(%r12), %ecx
cvtsi2ss %ecx, %xmm2
addsd %xmm12, %xmm10
xorps %xmm12, %xmm12
cvtsi2ss %r11d, %xmm12
mulsd %xmm7, %xmm9
mulss %xmm2, %xmm12
mulss 0x21587(%rip), %xmm12   # 0x792d0
addsd %xmm11, %xmm9
xorps %xmm2, %xmm2
cvtss2sd %xmm13, %xmm2
subss %xmm14, %xmm13
mulss %xmm15, %xmm13
xorps %xmm14, %xmm14
cvtss2sd %xmm13, %xmm14
movss %xmm5, 0xc(%rsp)
mulss %xmm5, %xmm15
cvtss2sd %xmm15, %xmm15
movaps 0x1efc0(%rip), %xmm5    # 0x76d40
xorps %xmm14, %xmm5
mulsd %xmm15, %xmm2
mulsd %xmm1, %xmm5
subsd %xmm2, %xmm5
cvtss2sd %xmm12, %xmm12
movaps %xmm12, %xmm11
xorps %xmm13, %xmm13
mulsd %xmm12, %xmm13
mulsd %xmm8, %xmm12
addsd %xmm5, %xmm12
movsd %xmm7, 0x5a1d9b(%rip)   # 0x5f9b50
movq %rsi, 0x5a1d9c(%rip)    # 0x5f9b58
movsd %xmm8, 0x5a1d9b(%rip)   # 0x5f9b60
movsd %xmm10, 0x5a1daa(%rip)  # 0x5f9b78
movsd %xmm9, 0x5a1d91(%rip)   # 0x5f9b68
movq %rsi, 0x5a1d92(%rip)    # 0x5f9b70
movsd %xmm12, 0x5a1da9(%rip)  # 0x5f9b90
mulsd %xmm7, %xmm11
addsd %xmm14, %xmm11
movsd %xmm11, 0x5a1d86(%rip)  # 0x5f9b80
addsd %xmm15, %xmm13
movsd %xmm13, 0x5a1d80(%rip)  # 0x5f9b88
testb $0x8, %al
je 0x57e49
shll $0x3, %edi
leal (%rdi,%r8,2), %ecx
xorps %xmm2, %xmm2
cvtsi2sd %ecx, %xmm2
mulsd %xmm2, %xmm7
subsd %xmm9, %xmm7
movsd %xmm7, 0x5a1d3d(%rip)   # 0x5f9b68
movq $0x0, 0x5a1d3a(%rip) # 0x5f9b70
mulsd %xmm2, %xmm8
subsd %xmm10, %xmm8
movsd %xmm8, 0x5a1d2f(%rip)   # 0x5f9b78
leaq 0x1eac10(%rip), %rcx    # 0x242a60
leaq (%rcx,%r14,8), %rdi
btl $0x8, %eax
jae 0x57e8c
movapd 0x1eede(%rip), %xmm2    # 0x76d40
xorpd %xmm2, %xmm11
movlpd %xmm11, 0x5a1d10(%rip)  # 0x5f9b80
xorpd %xmm2, %xmm13
movlpd %xmm13, 0x5a1d0a(%rip)  # 0x5f9b88
xorpd %xmm2, %xmm12
movlpd %xmm12, 0x5a1d04(%rip)  # 0x5f9b90
xorl %esi, %esi
btl $0x9, %eax
movl $0x0, %ecx
adcl $0x1a, %ecx
movb 0x20(%rdi), %r8b
addb $0x10, %r8b
movzbl %r8b, %r8d
xorps %xmm2, %xmm2
cvtsi2ss %r8d, %xmm2
divss 0x213fe(%rip), %xmm2    # 0x792b4
movzbl 0x1d(%rdi), %edi
cvtss2sd %xmm2, %xmm2
mulsd 0x5a5d0a(%rip), %xmm2   # 0x5fdbd0
movl %edi, 0x5a1aac(%rip)    # 0x5f9978
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x5a1aa4(%rip)   # 0x5f997c
movl 0x30(%rsp,%rsi), %edi
subl %edx, %edi
xorps %xmm2, %xmm2
cvtsi2ss %edi, %xmm2
mulss %xmm3, %xmm2
cvtss2sd %xmm2, %xmm2
addsd %xmm6, %xmm2
cvtsd2ss %xmm2, %xmm2
movl 0x38(%rsp,%rsi), %edi
movss %xmm2, 0x50(%rsp,%rsi)
movl 0x20(%rsp,%rsi), %r8d
subl %edx, %r8d
xorps %xmm2, %xmm2
cvtsi2ss %r8d, %xmm2
mulss %xmm3, %xmm2
cvtss2sd %xmm2, %xmm2
addsd %xmm6, %xmm2
cvtsd2ss %xmm2, %xmm2
subl %edx, %edi
xorps %xmm5, %xmm5
cvtsi2ss %edi, %xmm5
movl 0x28(%rsp,%rsi), %edi
movss %xmm2, 0x40(%rsp,%rsi)
mulss %xmm4, %xmm5
xorps %xmm2, %xmm2
cvtss2sd %xmm5, %xmm2
addsd %xmm6, %xmm2
cvtsd2ss %xmm2, %xmm2
subl %edx, %edi
xorps %xmm5, %xmm5
cvtsi2ss %edi, %xmm5
mulss %xmm4, %xmm5
cvtss2sd %xmm5, %xmm5
addsd %xmm6, %xmm5
cvtsd2ss %xmm5, %xmm5
movss %xmm2, 0x58(%rsp,%rsi)
movss %xmm5, 0x48(%rsp,%rsi)
addq $0x4, %rsi
cmpq $0x4, %rsi
je 0x57ed8
movsd %xmm1, 0xa0(%rsp)
cvtss2sd 0x54(%rsp), %xmm3
movsd %xmm3, 0x60(%rsp)
xorps %xmm2, %xmm2
cvtss2sd 0x8(%rsp), %xmm2
movsd %xmm2, 0xa8(%rsp)
cvtss2sd 0x5c(%rsp), %xmm4
movsd %xmm4, 0x68(%rsp)
movsd %xmm2, 0xb0(%rsp)
xorps %xmm4, %xmm4
cvtss2sd 0x4c(%rsp), %xmm4
movsd %xmm4, 0x70(%rsp)
movsd %xmm1, 0xb8(%rsp)
xorps %xmm4, %xmm4
cvtss2sd 0x44(%rsp), %xmm4
movsd %xmm4, 0x78(%rsp)
movapd %xmm1, %xmm7
subsd %xmm1, %xmm7
movss 0x50(%rsp), %xmm5
movss 0x58(%rsp), %xmm4
subss %xmm5, %xmm4
cvtss2sd %xmm4, %xmm4
cvtss2sd %xmm5, %xmm6
subsd %xmm6, %xmm3
xorps %xmm5, %xmm5
cvtss2sd 0xc(%rsp), %xmm5
mulsd %xmm5, %xmm3
mulsd %xmm4, %xmm7
subsd %xmm3, %xmm7
cvtsd2ss %xmm7, %xmm8
xorps 0x2044f(%rip), %xmm8    # 0x78470
xorl %edi, %edi
movaps 0x20446(%rip), %xmm3    # 0x78470
xorps %xmm7, %xmm7
xorl %edx, %edx
leaq 0x1(%rdi), %rsi
cmpq $0x3, %rdi
movl $0x0, %r8d
cmovneq %rsi, %r8
ucomiss %xmm7, %xmm8
jb 0x58071
movsd 0xa0(%rsp,%rdi,8), %xmm9
movslq %edx, %rdx
movsd %xmm9, 0x120(%rsp,%rdx,8)
movsd 0x60(%rsp,%rdi,8), %xmm9
movsd %xmm9, 0xe0(%rsp,%rdx,8)
incl %edx
movsd 0xa0(%rsp,%r8,8), %xmm11
movapd %xmm11, %xmm9
subsd %xmm1, %xmm9
movsd 0x60(%rsp,%r8,8), %xmm10
movapd %xmm10, %xmm12
subsd %xmm6, %xmm12
mulsd %xmm5, %xmm12
mulsd %xmm4, %xmm9
subsd %xmm12, %xmm9
cvtsd2ss %xmm9, %xmm9
movaps %xmm9, %xmm12
cmpnleps %xmm7, %xmm12
xorpd %xmm13, %xmm13
cmpleps %xmm8, %xmm13
xorps %xmm12, %xmm13
movd %xmm13, %r8d
testb $0x1, %r8b
jne 0x58127
movaps %xmm8, %xmm12
addss %xmm9, %xmm12
divss %xmm12, %xmm8
movsd 0xa0(%rsp,%rdi,8), %xmm12
subsd %xmm12, %xmm11
cvtss2sd %xmm8, %xmm8
mulsd %xmm8, %xmm11
addsd %xmm12, %xmm11
movslq %edx, %rdx
movsd %xmm11, 0x120(%rsp,%rdx,8)
movsd 0x60(%rsp,%rdi,8), %xmm11
subsd %xmm11, %xmm10
mulsd %xmm8, %xmm10
addsd %xmm11, %xmm10
movsd %xmm10, 0xe0(%rsp,%rdx,8)
incl %edx
xorps %xmm3, %xmm9
movq %rsi, %rdi
movaps %xmm9, %xmm8
cmpq $0x4, %rsi
jne 0x5802f
testb %al, %al
movl $0x19, %eax
cmovnsl %eax, %ecx
cmpl $0x3, %edx
jl 0x582cb
movsd 0x120(%rsp), %xmm5
subsd %xmm2, %xmm5
movss 0x40(%rsp), %xmm1
movss 0x48(%rsp), %xmm4
subss %xmm4, %xmm1
cvtss2sd %xmm1, %xmm1
movsd 0xe0(%rsp), %xmm6
cvtss2sd %xmm4, %xmm4
subsd %xmm4, %xmm6
mulsd %xmm0, %xmm6
mulsd %xmm1, %xmm5
subsd %xmm6, %xmm5
xorps %xmm6, %xmm6
cvtsd2ss %xmm5, %xmm6
xorps 0x202d5(%rip), %xmm6    # 0x78470
movl %edx, %eax
movq %rax, %rsi
negq %rsi
xorl %edx, %edx
movl $0x1, %edi
xorps %xmm5, %xmm5
cmpq %rax, %rdi
movl $0x0, %r8d
cmovbq %rdi, %r8
ucomiss %xmm5, %xmm6
jb 0x581e5
movsd 0x118(%rsp,%rdi,8), %xmm7
movslq %edx, %rdx
movsd %xmm7, 0xa0(%rsp,%rdx,8)
movsd 0xd8(%rsp,%rdi,8), %xmm7
movsd %xmm7, 0x60(%rsp,%rdx,8)
incl %edx
movsd 0x120(%rsp,%r8,8), %xmm9
movapd %xmm9, %xmm7
subsd %xmm2, %xmm7
movsd 0xe0(%rsp,%r8,8), %xmm8
movapd %xmm8, %xmm10
subsd %xmm4, %xmm10
mulsd %xmm0, %xmm10
mulsd %xmm1, %xmm7
subsd %xmm10, %xmm7
cvtsd2ss %xmm7, %xmm7
movaps %xmm7, %xmm10
cmpnleps %xmm5, %xmm10
xorpd %xmm11, %xmm11
cmpleps %xmm6, %xmm11
xorps %xmm10, %xmm11
movd %xmm11, %r8d
testb $0x1, %r8b
jne 0x5829a
movaps %xmm6, %xmm10
addss %xmm7, %xmm10
divss %xmm10, %xmm6
movsd 0x118(%rsp,%rdi,8), %xmm10
subsd %xmm10, %xmm9
cvtss2sd %xmm6, %xmm6
mulsd %xmm6, %xmm9
addsd %xmm10, %xmm9
movslq %edx, %rdx
movsd %xmm9, 0xa0(%rsp,%rdx,8)
movsd 0xd8(%rsp,%rdi,8), %xmm9
subsd %xmm9, %xmm8
mulsd %xmm6, %xmm8
addsd %xmm9, %xmm8
movsd %xmm8, 0x60(%rsp,%rdx,8)
incl %edx
xorps %xmm3, %xmm7
leaq (%rsi,%rdi), %r8
incq %r8
incq %rdi
movaps %xmm7, %xmm6
cmpq $0x1, %r8
jne 0x581ad
cmpl $0x3, %edx
jl 0x582cb
leaq 0xa0(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x4e9e3
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq