// File: /workspace/github_c_makefile_star2_O3/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 $0x198, %rsp            # imm = 0x198
movslq %edi, %rax
leaq 0x3ac704(%rip), %rcx    # 0x405fe0
movswq (%rcx,%rax,2), %rcx
leaq 0x1df168(%rip), %rax    # 0x238a50
movswq (%rax,%rcx,2), %rax
movq %rax, %rdx
shlq $0x5, %rdx
leaq 0x15f155(%rip), %rsi    # 0x1b8a50
movswq 0x8(%rsi,%rdx), %r12
shlq $0x5, %r12
addq %rsi, %r12
leaq 0x3f4561(%rip), %rdi    # 0x44de70
movswq (%rdi,%rcx,2), %rbx
leaq (%rbx,%rbx,4), %r14
leaq 0x1ea141(%rip), %r8     # 0x243a60
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), %r9d
cmpl %r9d, %edi
cmovgl %edi, %r9d
movl %r9d, 0x8(%rsp)
movl 0x8(%r8,%r14,8), %r15d
cmpl %r15d, %ecx
cmovll %ecx, %r15d
leaq (%rsi,%rdx), %r13
movzwl 0x12(%rsi,%rdx), %edx
xorl %ecx, %ecx
cmpl $0x2400, %edx           # imm = 0x2400
cmovbl %edx, %ecx
leaq 0x3b66a5(%rip), %rbp    # 0x410010
movw %cx, (%rbp)
movswq %cx, %rdx
leaq 0x1e10e6(%rip), %rsi    # 0x23aa60
testb $-0x40, (%rsi,%rdx,4)
je 0x59994
addl $0x4000, %eax           # imm = 0x4000
movswl %ax, %esi
movswl %cx, %edi
callq 0x242cd
addw %ax, (%rbp)
movsbl 0x14(%r13), %eax
leaq 0x3bae8c(%rip), %rcx    # 0x41482c
movl %eax, (%rcx)
movzbl 0x15(%r13), %eax
leaq 0x3b6656(%rip), %rcx    # 0x410004
movl %eax, (%rcx)
movswl 0xe(%r13), %eax
leaq 0x3b6644(%rip), %rcx    # 0x410000
movl %eax, (%rcx)
movl (%r13), %edx
movl 0x4(%r13), %eax
leaq 0x1e1083(%rip), %rdi    # 0x23aa50
movl (%r12), %esi
movl 0x4(%r12), %ecx
leaq 0x1e1077(%rip), %r8     # 0x23aa54
movd %edx, %xmm0
movd %esi, %xmm1
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movd (%rdi), %xmm0
pshufd $0x50, %xmm0, %xmm0     # xmm0 = xmm0[0,0,1,1]
psubd %xmm0, %xmm1
cvtdq2ps %xmm1, %xmm0
movd %eax, %xmm1
movd %ecx, %xmm2
punpckldq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
movd (%r8), %xmm1
pshufd $0x50, %xmm1, %xmm1     # xmm1 = xmm1[0,0,1,1]
psubd %xmm1, %xmm2
cvtps2pd %xmm0, %xmm1
cvtdq2ps %xmm2, %xmm0
cvtps2pd %xmm0, %xmm4
movsd 0x5a0f94(%rip), %xmm0   # 0x5fa9b8
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm4, %xmm0
movsd 0x5a0f74(%rip), %xmm2   # 0x5fa9a8
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm1, %xmm2
addpd %xmm0, %xmm2
cvtpd2ps %xmm2, %xmm8
movapd %xmm8, %xmm0
cmpltps 0x20cde(%rip), %xmm0    # 0x7a730
unpcklps %xmm0, %xmm0            # xmm0 = xmm0[0,0,1,1]
movmskpd %xmm0, %edi
movl %edi, %r8d
shrb %r8b
testb %dil, %r8b
jne 0x5a4dc
movapd %xmm8, %xmm0
shufps $0x55, %xmm8, %xmm0     # xmm0 = xmm0[1,1],xmm8[1,1]
xorps %xmm2, %xmm2
cvtss2sd %xmm0, %xmm2
movsd 0x5a0f2f(%rip), %xmm5   # 0x5fa9b0
movsd 0x5a0f37(%rip), %xmm6   # 0x5fa9c0
movapd %xmm1, %xmm3
unpckhpd %xmm1, %xmm3            # xmm3 = xmm3[1],xmm1[1]
mulsd %xmm6, %xmm3
movapd %xmm4, %xmm7
unpckhpd %xmm4, %xmm7            # xmm7 = xmm7[1],xmm4[1]
mulsd %xmm5, %xmm7
subsd %xmm3, %xmm7
xorps %xmm3, %xmm3
cvtsd2ss %xmm7, %xmm3
mulsd %xmm6, %xmm1
mulsd %xmm5, %xmm4
subsd %xmm1, %xmm4
xorps %xmm7, %xmm7
cvtsd2ss %xmm4, %xmm7
testb %r8b, %r8b
je 0x59b00
movsd 0x1c0f4(%rip), %xmm1    # 0x75bc0
subsd %xmm2, %xmm1
movaps %xmm8, %xmm4
subss %xmm0, %xmm4
cvtss2sd %xmm4, %xmm4
divsd %xmm4, %xmm1
xorps %xmm6, %xmm6
cvtsd2ss %xmm1, %xmm6
movaps %xmm7, %xmm4
subss %xmm3, %xmm4
mulss %xmm6, %xmm4
addss %xmm3, %xmm4
movss 0x1d616(%rip), %xmm1    # 0x77114
jmp 0x59b0a
xorpd %xmm6, %xmm6
movaps %xmm0, %xmm1
movaps %xmm3, %xmm4
testb $0x1, %dil
movq %r14, 0x68(%rsp)
je 0x59b56
movsd 0x1c0a3(%rip), %xmm5    # 0x75bc0
subsd %xmm2, %xmm5
subss %xmm0, %xmm8
xorps %xmm0, %xmm0
cvtss2sd %xmm8, %xmm0
divsd %xmm0, %xmm5
xorps %xmm0, %xmm0
cvtsd2ss %xmm5, %xmm0
subss %xmm3, %xmm7
movss %xmm0, 0x10(%rsp)
mulss %xmm0, %xmm7
addss %xmm3, %xmm7
movss 0x1d5c0(%rip), %xmm8    # 0x77114
jmp 0x59b64
movss 0x1d5b6(%rip), %xmm0    # 0x77114
movss %xmm0, 0x10(%rsp)
subl %edx, %esi
xorps %xmm0, %xmm0
cvtsi2ss %esi, %xmm0
unpcklps %xmm4, %xmm7            # xmm7 = xmm7[0],xmm4[0],xmm7[1],xmm4[1]
movaps %xmm7, 0x100(%rsp)
xorps %xmm2, %xmm2
cvtsi2ss %edx, %xmm2
mulss %xmm6, %xmm0
addss %xmm2, %xmm0
cvttss2si %xmm0, %esi
subl %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
unpcklps %xmm1, %xmm8            # xmm8 = xmm8[0],xmm1[0],xmm8[1],xmm1[1]
movaps %xmm8, 0xf0(%rsp)
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
mulss %xmm6, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %edx
movswl %bx, %ebp
leaq 0x40(%rsp), %r14
leaq 0x30(%rsp), %rbx
movl %ebp, %edi
movq %r14, %rcx
movq %rbx, %r8
movss %xmm6, 0xc(%rsp)
callq 0x26766
movl (%r12), %eax
movl 0x4(%r12), %ecx
movl (%r13), %edx
subl %edx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movl 0x4(%r13), %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(%r13), %edi
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %edx
leaq 0x44(%rsp), %rcx
leaq 0x34(%rsp), %r8
callq 0x26766
movl (%r12), %eax
movl 0x4(%r12), %ecx
movl (%r13), %edx
movl 0x4(%r13), %esi
subl %edx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %edx, %xmm1
movss 0x10(%rsp), %xmm2
mulss %xmm2, %xmm0
movaps %xmm2, %xmm3
movss %xmm2, 0x10(%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 0x48(%rsp), %rcx
leaq 0x38(%rsp), %r8
movl %ebp, %edi
callq 0x26766
movl (%r12), %eax
movl 0x4(%r12), %ecx
movl (%r13), %edx
subl %edx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movl 0x4(%r13), %eax
xorps %xmm1, %xmm1
cvtsi2ss %edx, %xmm1
movss 0x10(%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(%r13), %edi
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvttss2si %xmm0, %edx
leaq 0x4c(%rsp), %rcx
leaq 0x3c(%rsp), %r8
callq 0x26766
movaps 0x20a26(%rip), %xmm0    # 0x7a730
divps 0xf0(%rsp), %xmm0
cvtps2pd 0x100(%rsp), %xmm1
movsd 0x5a0e0e(%rip), %xmm2   # 0x5fab30
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm2, %xmm1
cvtps2pd %xmm0, %xmm0
mulpd %xmm0, %xmm1
addpd %xmm2, %xmm1
cvtpd2ps %xmm1, %xmm2
movapd %xmm2, %xmm10
shufps $0x55, %xmm2, %xmm10    # xmm10 = xmm10[1,1],xmm2[1,1]
ucomiss %xmm2, %xmm10
movq 0x68(%rsp), %r12
leaq 0x1e9d0d(%rip), %rbp    # 0x243a60
jae 0x5a4dc
movsd 0x5a4e57(%rip), %xmm1   # 0x5febb8
movapd %xmm0, %xmm3
unpckhpd %xmm0, %xmm3            # xmm3 = xmm3[1],xmm0[1]
mulsd %xmm1, %xmm3
cvtsd2ss %xmm3, %xmm3
mulsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm4
movaps %xmm3, %xmm0
subss %xmm4, %xmm0
cvtss2sd %xmm0, %xmm7
movsd 0x5a4e34(%rip), %xmm6   # 0x5febc0
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 0x10(%rsp), %xmm9
mulss %xmm4, %xmm9
movss 0xc(%rsp), %xmm11
mulss %xmm3, %xmm11
cvtss2sd %xmm11, %xmm12
subss %xmm9, %xmm11
cvtss2sd %xmm11, %xmm11
movzbl 0x16(%r13), %edi
xorps %xmm9, %xmm9
cvtsi2sd %edi, %xmm9
mulsd %xmm6, %xmm11
mulsd %xmm9, %xmm11
movsd 0x1d2df(%rip), %xmm13   # 0x770e8
mulsd %xmm13, %xmm11
divsd %xmm0, %xmm11
mulsd %xmm6, %xmm12
mulsd %xmm9, %xmm12
movapd %xmm1, %xmm6
mulsd %xmm11, %xmm6
mulsd %xmm13, %xmm12
subsd %xmm6, %xmm12
movzbl 0x18(%r13), %r8d
xorps %xmm9, %xmm9
cvtsi2sd %r8d, %xmm9
movzwl 0xe(%r13), %eax
testb $0x4, %al
cmovel 0x8(%rsp), %r15d
leaq 0x211c0e(%rip), %rcx    # 0x26ba60
movl (%rcx), %edx
subl %edx, %r15d
cvtsi2ss %r15d, %xmm14
movaps %xmm3, %xmm6
mulss %xmm14, %xmm6
xorps %xmm13, %xmm13
cvtss2sd %xmm6, %xmm13
movsd 0x5a0cc3(%rip), %xmm6   # 0x5fab38
addsd %xmm6, %xmm13
cvtsd2ss %xmm13, %xmm13
mulss %xmm4, %xmm14
cvtss2sd %xmm14, %xmm14
addsd %xmm6, %xmm14
cvtsd2ss %xmm14, %xmm14
addsd %xmm8, %xmm5
movzbl 0x17(%r13), %ecx
cvtsi2sd %ecx, %xmm15
mulsd %xmm5, %xmm15
movaps %xmm2, 0x10(%rsp)
subss %xmm10, %xmm2
movaps %xmm2, %xmm10
mulss %xmm3, %xmm10
mulss 0x206e9(%rip), %xmm10   # 0x7a5ac
cvtss2sd %xmm10, %xmm10
divsd %xmm10, %xmm15
cvtsd2ss %xmm15, %xmm15
leaq 0x3b6137(%rip), %rcx    # 0x410010
movswq (%rcx), %r9
leaq 0x3ba96c(%rip), %rcx    # 0x414850
movzbl (%rcx,%r9), %ecx
shrl $0x4, %ecx
movl $0x1, %r10d
shll %cl, %r10d
movapd %xmm9, %xmm10
leaq 0x3a78df(%rip), %r11    # 0x4017e0
movswl (%r11,%r9,2), %r9d
movl $0x2, %r11d
shll %cl, %r11d
mulsd %xmm8, %xmm10
cmpl %r9d, %r10d
cmovgel %r10d, %r11d
movzbl 0x19(%r13), %ecx
xorps %xmm5, %xmm5
cvtsi2ss %ecx, %xmm5
addsd %xmm12, %xmm10
xorps %xmm12, %xmm12
cvtsi2ss %r11d, %xmm12
mulsd %xmm7, %xmm9
mulss %xmm5, %xmm12
mulss 0x20668(%rip), %xmm12   # 0x7a5b0
addsd %xmm11, %xmm9
xorps %xmm5, %xmm5
cvtss2sd %xmm13, %xmm5
subss %xmm14, %xmm13
mulss %xmm15, %xmm13
xorps %xmm14, %xmm14
cvtss2sd %xmm13, %xmm14
movss %xmm2, 0x8(%rsp)
mulss %xmm2, %xmm15
cvtss2sd %xmm15, %xmm15
movaps 0x1e0b1(%rip), %xmm2    # 0x78030
xorps %xmm14, %xmm2
mulsd %xmm15, %xmm5
mulsd %xmm1, %xmm2
subsd %xmm5, %xmm2
cvtss2sd %xmm12, %xmm12
movaps %xmm12, %xmm11
xorps %xmm13, %xmm13
mulsd %xmm12, %xmm13
mulsd %xmm8, %xmm12
addsd %xmm2, %xmm12
movsd %xmm7, 0x5a0b9c(%rip)   # 0x5fab50
movq %rsi, 0x5a0b9d(%rip)    # 0x5fab58
movsd %xmm8, 0x5a0b9c(%rip)   # 0x5fab60
movsd %xmm10, 0x5a0bab(%rip)  # 0x5fab78
movsd %xmm9, 0x5a0b92(%rip)   # 0x5fab68
movq %rsi, 0x5a0b93(%rip)    # 0x5fab70
movsd %xmm12, 0x5a0baa(%rip)  # 0x5fab90
mulsd %xmm7, %xmm11
addsd %xmm14, %xmm11
movsd %xmm11, 0x5a0b87(%rip)  # 0x5fab80
addsd %xmm15, %xmm13
movsd %xmm13, 0x5a0b81(%rip)  # 0x5fab88
testb $0x8, %al
je 0x5a03d
shll $0x3, %edi
leal (%rdi,%r8,2), %ecx
xorps %xmm2, %xmm2
cvtsi2sd %ecx, %xmm2
mulsd %xmm2, %xmm7
subsd %xmm9, %xmm7
movsd %xmm7, 0x5a0b3e(%rip)   # 0x5fab68
mulsd %xmm2, %xmm8
subsd %xmm10, %xmm8
movsd %xmm8, 0x5a0b3b(%rip)   # 0x5fab78
leaq (,%r12,8), %rsi
addq %rbp, %rsi
btl $0x8, %eax
jae 0x5a080
movapd 0x1dfda(%rip), %xmm2    # 0x78030
xorpd %xmm2, %xmm11
movlpd %xmm11, 0x5a0b1c(%rip)  # 0x5fab80
xorpd %xmm2, %xmm13
movlpd %xmm13, 0x5a0b16(%rip)  # 0x5fab88
xorpd %xmm2, %xmm12
movlpd %xmm12, 0x5a0b10(%rip)  # 0x5fab90
leaq 0x34(%rsp), %rdi
leaq 0x44(%rsp), %r8
xorl %ecx, %ecx
btl $0x9, %eax
adcl $0x1a, %ecx
movb 0x20(%rsi), %r9b
addb $0x10, %r9b
movzbl %r9b, %r9d
xorps %xmm2, %xmm2
cvtsi2ss %r9d, %xmm2
leaq 0x24(%rsp), %r9
leaq 0x54(%rsp), %r10
divss 0x204e7(%rip), %xmm2    # 0x7a5a0
movzbl 0x1d(%rsi), %esi
cvtss2sd %xmm2, %xmm2
mulsd 0x5a4b07(%rip), %xmm2   # 0x5febd0
movl %esi, 0x5a08a9(%rip)    # 0x5fa978
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x5a08a1(%rip)   # 0x5fa97c
movl $0x2, %r11d
leaq 0x50(%rsp), %r13
leaq 0x20(%rsp), %r12
movb $0x1, %r15b
movl (%r14), %esi
subl %edx, %esi
xorps %xmm2, %xmm2
cvtsi2ss %esi, %xmm2
mulss %xmm3, %xmm2
cvtss2sd %xmm2, %xmm2
addsd %xmm6, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, (%r13)
movl (%rbx), %esi
subl %edx, %esi
xorps %xmm2, %xmm2
cvtsi2ss %esi, %xmm2
mulss %xmm3, %xmm2
cvtss2sd %xmm2, %xmm2
addsd %xmm6, %xmm2
movl 0x40(%rsp,%r11,4), %esi
subl %edx, %esi
xorps %xmm5, %xmm5
cvtsi2ss %esi, %xmm5
cvtsd2ss %xmm2, %xmm2
mulss %xmm4, %xmm5
cvtss2sd %xmm5, %xmm5
addsd %xmm6, %xmm5
cvtsd2ss %xmm5, %xmm5
movl 0x30(%rsp,%r11,4), %esi
subl %edx, %esi
xorps %xmm7, %xmm7
cvtsi2ss %esi, %xmm7
movss %xmm2, (%r12)
movss %xmm5, 0x50(%rsp,%r11,4)
mulss %xmm4, %xmm7
xorps %xmm2, %xmm2
cvtss2sd %xmm7, %xmm2
addsd %xmm6, %xmm2
cvtsd2ss %xmm2, %xmm2
movss %xmm2, 0x20(%rsp,%r11,4)
movl $0x3, %r11d
xorl %esi, %esi
movq %rdi, %rbx
movq %r8, %r14
movq %r9, %r12
movq %r10, %r13
testb $0x1, %r15b
movl $0x0, %r15d
jne 0x5a0ee
movsd %xmm1, 0x70(%rsp)
xorps %xmm2, %xmm2
cvtss2sd 0x10(%rsp), %xmm2
movsd %xmm2, 0x78(%rsp)
movaps 0x50(%rsp), %xmm3
movsd %xmm2, 0x80(%rsp)
movss 0x2c(%rsp), %xmm4
shufps $0xf4, %xmm3, %xmm4     # xmm4 = xmm4[0,1],xmm3[3,3]
shufps $0xf2, %xmm3, %xmm4     # xmm4 = xmm4[2,0],xmm3[3,3]
cvtps2pd %xmm4, %xmm3
movups %xmm3, 0xb8(%rsp)
movsd %xmm1, 0x88(%rsp)
xorps %xmm3, %xmm3
cvtss2sd 0x24(%rsp), %xmm3
movsd %xmm3, 0xc8(%rsp)
movapd %xmm1, %xmm3
subsd %xmm1, %xmm3
movss 0x58(%rsp), %xmm5
movsd 0x50(%rsp), %xmm6
cvtps2pd %xmm6, %xmm4
movapd %xmm4, %xmm7
unpckhpd %xmm4, %xmm7            # xmm7 = xmm7[1],xmm4[1]
subss %xmm6, %xmm5
xorps %xmm6, %xmm6
cvtss2sd %xmm5, %xmm6
subsd %xmm4, %xmm7
xorps %xmm5, %xmm5
cvtss2sd 0x8(%rsp), %xmm5
mulsd %xmm5, %xmm7
mulsd %xmm6, %xmm3
subsd %xmm7, %xmm3
cvtsd2ss %xmm3, %xmm8
xorps 0x19ea7(%rip), %xmm8    # 0x740f0
movhpd %xmm4, 0xb0(%rsp)
movaps 0x19e97(%rip), %xmm3    # 0x740f0
xorpd %xmm7, %xmm7
xorl %edx, %edx
movq %rdx, %rdi
incq %rdx
cmpq $0x3, %rdi
movl $0x0, %r8d
cmovneq %rdx, %r8
movsd 0x70(%rsp,%r8,8), %xmm11
movapd %xmm11, %xmm9
subsd %xmm1, %xmm9
movsd 0xb0(%rsp,%r8,8), %xmm10
movapd %xmm10, %xmm12
subsd %xmm4, %xmm12
mulsd %xmm5, %xmm12
mulsd %xmm6, %xmm9
subsd %xmm12, %xmm9
cvtsd2ss %xmm9, %xmm9
ucomiss %xmm7, %xmm8
jae 0x5a2cf
ucomiss %xmm9, %xmm7
jb 0x5a349
movsd 0x70(%rsp,%rdi,8), %xmm13
movsd 0xb0(%rsp,%rdi,8), %xmm12
jmp 0x5a2ff
movsd 0x70(%rsp,%rdi,8), %xmm13
movslq %esi, %rsi
movsd %xmm13, 0x150(%rsp,%rsi,8)
movsd 0xb0(%rsp,%rdi,8), %xmm12
movsd %xmm12, 0x110(%rsp,%rsi,8)
incl %esi
ucomiss %xmm9, %xmm7
jae 0x5a349
movaps %xmm8, %xmm14
addss %xmm9, %xmm14
divss %xmm14, %xmm8
subsd %xmm13, %xmm11
cvtss2sd %xmm8, %xmm8
mulsd %xmm8, %xmm11
addsd %xmm13, %xmm11
movslq %esi, %rsi
movsd %xmm11, 0x150(%rsp,%rsi,8)
subsd %xmm12, %xmm10
mulsd %xmm8, %xmm10
addsd %xmm12, %xmm10
movsd %xmm10, 0x110(%rsp,%rsi,8)
incl %esi
xorps %xmm3, %xmm9
movaps %xmm9, %xmm8
cmpq $0x4, %rdx
jne 0x5a25f
testb %al, %al
movl $0x19, %eax
cmovnsl %eax, %ecx
cmpl $0x3, %esi
jl 0x5a4dc
movsd 0x150(%rsp), %xmm5
subsd %xmm2, %xmm5
movss 0x20(%rsp), %xmm1
movss 0x28(%rsp), %xmm4
subss %xmm4, %xmm1
cvtss2sd %xmm1, %xmm1
movsd 0x110(%rsp), %xmm6
cvtss2sd %xmm4, %xmm4
subsd %xmm4, %xmm6
mulsd %xmm0, %xmm6
mulsd %xmm1, %xmm5
subsd %xmm6, %xmm5
xorps %xmm6, %xmm6
cvtsd2ss %xmm5, %xmm6
xorps 0x19d36(%rip), %xmm6    # 0x740f0
movl %esi, %eax
movq %rax, %rsi
negq %rsi
xorl %edx, %edx
movl $0x1, %edi
xorps %xmm5, %xmm5
cmpq %rax, %rdi
movl $0x0, %r8d
cmovbq %rdi, %r8
movsd 0x150(%rsp,%r8,8), %xmm9
movapd %xmm9, %xmm7
subsd %xmm2, %xmm7
movsd 0x110(%rsp,%r8,8), %xmm8
movapd %xmm8, %xmm10
subsd %xmm4, %xmm10
mulsd %xmm0, %xmm10
mulsd %xmm1, %xmm7
subsd %xmm10, %xmm7
cvtsd2ss %xmm7, %xmm7
ucomiss %xmm5, %xmm6
jae 0x5a436
ucomiss %xmm7, %xmm5
jb 0x5a4ab
movsd 0x148(%rsp,%rdi,8), %xmm11
movsd 0x108(%rsp,%rdi,8), %xmm10
jmp 0x5a465
movsd 0x148(%rsp,%rdi,8), %xmm11
movslq %edx, %rdx
movsd %xmm11, 0x70(%rsp,%rdx,8)
movsd 0x108(%rsp,%rdi,8), %xmm10
movsd %xmm10, 0xb0(%rsp,%rdx,8)
incl %edx
ucomiss %xmm7, %xmm5
jae 0x5a4ab
movaps %xmm6, %xmm12
addss %xmm7, %xmm12
divss %xmm12, %xmm6
subsd %xmm11, %xmm9
cvtss2sd %xmm6, %xmm6
mulsd %xmm6, %xmm9
addsd %xmm11, %xmm9
movslq %edx, %rdx
movsd %xmm9, 0x70(%rsp,%rdx,8)
subsd %xmm10, %xmm8
mulsd %xmm6, %xmm8
addsd %xmm10, %xmm8
movsd %xmm8, 0xb0(%rsp,%rdx,8)
incl %edx
xorps %xmm3, %xmm7
leaq (%rsi,%rdi), %r8
incq %r8
incq %rdi
movaps %xmm7, %xmm6
cmpq $0x1, %r8
jne 0x5a3cc
cmpl $0x3, %edx
jl 0x5a4dc
leaq 0x70(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x5114d
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq