// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_drawsprite
void polymost_drawsprite (int snum)
{
	double px[6], py[6];
	float f, c, s, fx, fy, sx0, sy0, sx1, xp0, yp0, xp1, yp1, oxp0, oyp0, ryp0, ryp1, ft[4];
	float x0, y0, x1, y1, sc0, sf0, sc1, sf1, px2[6], py2[6], xv, yv, t0, t1;
	int i, j, spritenum, xoff=0, yoff=0, method, npoints;
	spritetype *tspr;

#ifdef DEBUGGINGAIDS
	polymostcallcounts.drawsprite++;
#endif

	tspr = tspriteptr[snum];
	if (tspr->owner < 0 || tspr->picnum < 0) return;

	globalpicnum      = tspr->picnum;
	globalshade       = tspr->shade;
	globalpal         = tspr->pal;
	globalorientation = tspr->cstat;
	spritenum         = tspr->owner;

	if ((globalorientation&48) != 48) {	// only non-voxel sprites should do this
		if (picanm[globalpicnum]&192) globalpicnum += animateoffs(globalpicnum,spritenum+32768);

		xoff = (int)((signed char)((picanm[globalpicnum]>>8)&255))+((int)tspr->xoffset);
		yoff = (int)((signed char)((picanm[globalpicnum]>>16)&255))+((int)tspr->yoffset);
	}

	method = METH_MASKED;
	if (tspr->cstat&2) { if (!(tspr->cstat&512)) method = METH_TRANS; else method = METH_INTRANS; }
	method |= METH_CLAMPED | METH_LAYERS;

#if USE_OPENGL
	gfogpalnum = sector[tspr->sectnum].floorpal;
	gfogdensity = gvisibility*((float)((unsigned char)(sector[tspr->sectnum].visibility+16)) / 255.f);

	while (rendmode == 3 && !(spriteext[tspr->owner].flags&SPREXT_NOTMD)) {
		if (usemodels && tile2model[tspr->picnum].modelid >= 0 && tile2model[tspr->picnum].framenum >= 0) {
			if (mddraw(tspr, 0)) {
				if (automapping == 1) show2dsprite[spritenum>>3] |= pow2char[spritenum&7];
				return;
			}
			break;	// else, render as flat sprite
		}
		if (usevoxels && (tspr->cstat&48)!=48 && tiletovox[tspr->picnum] >= 0 && voxmodels[ tiletovox[tspr->picnum] ]) {
			if (voxdraw(voxmodels[ tiletovox[tspr->picnum] ], tspr, 0)) {
				if (automapping == 1) show2dsprite[spritenum>>3] |= pow2char[spritenum&7];
				return;
			}
			break;	// else, render as flat sprite
		}
		if ((tspr->cstat&48)==48 && voxmodels[ tspr->picnum ]) {
			voxdraw(voxmodels[ tspr->picnum ], tspr, 0);
			if (automapping == 1) show2dsprite[spritenum>>3] |= pow2char[spritenum&7];
			return;
		}
		break;
	}
#endif

	switch((globalorientation>>4)&3)
	{
		case 0: //Face sprite

				//Project 3D to 2D
			sx0 = (float)(tspr->x-globalposx);
			sy0 = (float)(tspr->y-globalposy);
			xp0 = sy0*gcosang  - sx0*gsinang;
			yp0 = sx0*gcosang2 + sy0*gsinang2;
			if (yp0 <= SCISDIST) return;
			ryp0 = 1/yp0;
			sx0 = ghalfx*xp0*ryp0 + ghalfx;
			sy0 = ((float)(tspr->z-globalposz))*gyxscale*ryp0 + ghoriz;

			f = ryp0*(float)xdimen/160.0;
			fx = ((float)tspr->xrepeat)*f;
			fy = ((float)tspr->yrepeat)*f*((float)yxaspect/65536.0);
			sx0 -= fx*(float)xoff; if (tilesizx[globalpicnum]&1) sx0 += fx*.5;
			sy0 -= fy*(float)yoff;
			fx *= ((float)tilesizx[globalpicnum]);
			fy *= ((float)tilesizy[globalpicnum]);

			px[0] = px[3] = sx0-fx*.5; px[1] = px[2] = sx0+fx*.5;
			if (!(globalorientation&128)) { py[0] = py[1] = sy0-fy; py[2] = py[3] = sy0; }
											 else { py[0] = py[1] = sy0-fy*.5; py[2] = py[3] = sy0+fy*.5; }

			gdx = gdy = guy = gvx = 0; gdo = ryp0*gviewxrange;
			if (!(globalorientation&4))
				  { gux = (float)tilesizx[globalpicnum]*gdo/(px[1]-px[0]+.002); guo = -gux*(px[0]-.001); }
			else { gux = (float)tilesizx[globalpicnum]*gdo/(px[0]-px[1]-.002); guo = -gux*(px[1]+.001); }
			if (!(globalorientation&8))
				  { gvy = (float)tilesizy[globalpicnum]*gdo/(py[3]-py[0]+.002); gvo = -gvy*(py[0]-.001); }
			else { gvy = (float)tilesizy[globalpicnum]*gdo/(py[0]-py[3]-.002); gvo = -gvy*(py[3]+.001); }

			//Clip sprites to ceilings/floors when no parallaxing and not sloped
			if (!(sector[tspr->sectnum].ceilingstat&3))
			{
				sy0 = ((float)(sector[tspr->sectnum].ceilingz-globalposz))*gyxscale*ryp0 + ghoriz;
				if (py[0] < sy0) py[0] = py[1] = sy0;
			}
			if (!(sector[tspr->sectnum].floorstat&3))
			{
				sy0 = ((float)(sector[tspr->sectnum].floorz-globalposz))*gyxscale*ryp0 + ghoriz;
				if (py[2] > sy0) py[2] = py[3] = sy0;
			}

			drawpoly(px,py,4,method);
			break;
		case 1: //Wall sprite

				//Project 3D to 2D
			if (globalorientation&4) xoff = -xoff;
			if (globalorientation&8) yoff = -yoff;

			xv = (float)tspr->xrepeat * (float)sintable[(tspr->ang     )&2047] / 65536.0;
			yv = (float)tspr->xrepeat * (float)sintable[(tspr->ang+1536)&2047] / 65536.0;
			f = (float)(tilesizx[globalpicnum]>>1) + (float)xoff;
			x0 = (float)(tspr->x-globalposx) - xv*f; x1 = xv*(float)tilesizx[globalpicnum] + x0;
			y0 = (float)(tspr->y-globalposy) - yv*f; y1 = yv*(float)tilesizx[globalpicnum] + y0;

			yp0 = x0*gcosang2 + y0*gsinang2;
			yp1 = x1*gcosang2 + y1*gsinang2;
			if ((yp0 <= SCISDIST) && (yp1 <= SCISDIST)) return;
			xp0 = y0*gcosang - x0*gsinang;
			xp1 = y1*gcosang - x1*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; }

			f = ((float)tspr->yrepeat) * (float)tilesizy[globalpicnum] * 4;

			ryp0 = 1.0/yp0;
			ryp1 = 1.0/yp1;
			sx0 = ghalfx*xp0*ryp0 + ghalfx;
			sx1 = ghalfx*xp1*ryp1 + ghalfx;
			ryp0 *= gyxscale;
			ryp1 *= gyxscale;

			tspr->z -= ((yoff*tspr->yrepeat)<<2);
			if (globalorientation&128)
			{
				tspr->z += ((tilesizy[globalpicnum]*tspr->yrepeat)<<1);
				if (tilesizy[globalpicnum]&1) tspr->z += (tspr->yrepeat<<1); //Odd yspans
			}

			sc0 = ((float)(tspr->z-globalposz-f))*ryp0 + ghoriz;
			sc1 = ((float)(tspr->z-globalposz-f))*ryp1 + ghoriz;
			sf0 = ((float)(tspr->z-globalposz))*ryp0 + ghoriz;
			sf1 = ((float)(tspr->z-globalposz))*ryp1 + ghoriz;

			gdx = (ryp0-ryp1)*gxyaspect / (sx0-sx1);
			gdy = 0;
			gdo = ryp0*gxyaspect - gdx*sx0;

				//Original equations:
				//(gux*sx0 + guo)/(gdx*sx1 + gdo) = tilesizx[globalpicnum]*t0
				//(gux*sx1 + guo)/(gdx*sx1 + gdo) = tilesizx[globalpicnum]*t1
				//
				// gvx*sx0 + gvy*sc0 + gvo = 0
				// gvy*sx1 + gvy*sc1 + gvo = 0
				//(gvx*sx0 + gvy*sf0 + gvo)/(gdx*sx0 + gdo) = tilesizy[globalpicnum]
				//(gvx*sx1 + gvy*sf1 + gvo)/(gdx*sx1 + gdo) = tilesizy[globalpicnum]

				//gux*sx0 + guo = t0*tilesizx[globalpicnum]*yp0
				//gux*sx1 + guo = t1*tilesizx[globalpicnum]*yp1
			if (globalorientation&4) { t0 = 1.f-t0; t1 = 1.f-t1; }
			gux = (t0*ryp0 - t1*ryp1)*gxyaspect*(float)tilesizx[globalpicnum] / (sx0-sx1);
			guy = 0;
			guo = t0*ryp0*gxyaspect*(float)tilesizx[globalpicnum] - gux*sx0;

				//gvx*sx0 + gvy*sc0 + gvo = 0
				//gvx*sx1 + gvy*sc1 + gvo = 0
				//gvx*sx0 + gvy*sf0 + gvo = tilesizy[globalpicnum]*(gdx*sx0 + gdo)
			f = ((float)tilesizy[globalpicnum])*(gdx*sx0 + gdo) / ((sx0-sx1)*(sc0-sf0));
			if (!(globalorientation&8))
			{
				gvx = (sc0-sc1)*f;
				gvy = (sx1-sx0)*f;
				gvo = -gvx*sx0 - gvy*sc0;
			}
			else
			{
				gvx = (sf1-sf0)*f;
				gvy = (sx0-sx1)*f;
				gvo = -gvx*sx0 - gvy*sf0;
			}

			//Clip sprites to ceilings/floors when no parallaxing
			if (!(sector[tspr->sectnum].ceilingstat&1))
			{
				f = ((float)tspr->yrepeat) * (float)tilesizy[globalpicnum] * 4;
				if (sector[tspr->sectnum].ceilingz > tspr->z-f)
				{
					sc0 = ((float)(sector[tspr->sectnum].ceilingz-globalposz))*ryp0 + ghoriz;
					sc1 = ((float)(sector[tspr->sectnum].ceilingz-globalposz))*ryp1 + ghoriz;
				}
			}
			if (!(sector[tspr->sectnum].floorstat&1))
			{
				if (sector[tspr->sectnum].floorz < tspr->z)
				{
					sf0 = ((float)(sector[tspr->sectnum].floorz-globalposz))*ryp0 + ghoriz;
					sf1 = ((float)(sector[tspr->sectnum].floorz-globalposz))*ryp1 + ghoriz;
				}
			}

			if (sx0 > sx1)
			{
				if (globalorientation&64) return; //1-sided sprite
				f = sx0; sx0 = sx1; sx1 = f;
				f = sc0; sc0 = sc1; sc1 = f;
				f = sf0; sf0 = sf1; sf1 = f;
			}

			px[0] = sx0; py[0] = sc0;
			px[1] = sx1; py[1] = sc1;
			px[2] = sx1; py[2] = sf1;
			px[3] = sx0; py[3] = sf0;
			drawpoly(px,py,4,method);
			break;
		case 2: //Floor sprite

			if ((globalorientation&64) != 0)
				if ((globalposz > tspr->z) == (!(globalorientation&8)))
					return;
			if ((globalorientation&4) > 0) xoff = -xoff;
			if ((globalorientation&8) > 0) yoff = -yoff;

			i = (tspr->ang&2047);
			c = sintable[(i+512)&2047]/65536.0;
			s = sintable[i]/65536.0;
			x0 = ((tilesizx[globalpicnum]>>1)-xoff)*tspr->xrepeat;
			y0 = ((tilesizy[globalpicnum]>>1)-yoff)*tspr->yrepeat;
			x1 = ((tilesizx[globalpicnum]>>1)+xoff)*tspr->xrepeat;
			y1 = ((tilesizy[globalpicnum]>>1)+yoff)*tspr->yrepeat;

				//Project 3D to 2D
			for(j=0;j<4;j++)
			{
				sx0 = (float)(tspr->x-globalposx);
				sy0 = (float)(tspr->y-globalposy);
				if ((j+0)&2) { sy0 -= s*y0; sx0 -= c*y0; } else { sy0 += s*y1; sx0 += c*y1; }
				if ((j+1)&2) { sx0 -= s*x0; sy0 += c*x0; } else { sx0 += s*x1; sy0 -= c*x1; }
				px[j] = sy0*gcosang  - sx0*gsinang;
				py[j] = sx0*gcosang2 + sy0*gsinang2;
			}

			if (tspr->z < globalposz) //if floor sprite is above you, reverse order of points
			{
				f = px[0]; px[0] = px[1]; px[1] = f;
				f = py[0]; py[0] = py[1]; py[1] = f;
				f = px[2]; px[2] = px[3]; px[3] = f;
				f = py[2]; py[2] = py[3]; py[3] = f;
			}

				//Clip to SCISDIST plane
			npoints = 0;
			for(i=0;i<4;i++)
			{
				j = ((i+1)&3);
				if (py[i] >= SCISDIST) { px2[npoints] = px[i]; py2[npoints] = py[i]; npoints++; }
				if ((py[i] >= SCISDIST) != (py[j] >= SCISDIST))
				{
					f = (SCISDIST-py[i])/(py[j]-py[i]);
					px2[npoints] = (px[j]-px[i])*f + px[i];
					py2[npoints] = (py[j]-py[i])*f + py[i]; npoints++;
				}
			}
			if (npoints < 3) return;

				//Project rotated 3D points to screen
			f = ((float)(tspr->z-globalposz))*gyxscale;
			for(j=0;j<npoints;j++)
			{
				ryp0 = 1/py2[j];
				px[j] = ghalfx*px2[j]*ryp0 + ghalfx;
				py[j] = f*ryp0 + ghoriz;
			}

				//gd? Copied from floor rendering code
			gdx = 0;
			gdy = gxyaspect / (double)(tspr->z-globalposz);
			gdo = -ghoriz*gdy;
				//copied&modified from relative alignment
			xv = (float)tspr->x + s*x1 + c*y1; fx = (double)-(x0+x1)*s;
			yv = (float)tspr->y + s*y1 - c*x1; fy = (double)+(x0+x1)*c;
			f = 1.0/sqrt(fx*fx+fy*fy); fx *= f; fy *= f;
			ft[2] = singlobalang*fy + cosglobalang*fx;
			ft[3] = singlobalang*fx - cosglobalang*fy;
			ft[0] = ((double)(globalposy-yv))*fy + ((double)(globalposx-xv))*fx;
			ft[1] = ((double)(globalposx-xv))*fy - ((double)(globalposy-yv))*fx;
			gux = (double)ft[3]*((double)viewingrange)/(-65536.0*262144.0);
			gvx = (double)ft[2]*((double)viewingrange)/(-65536.0*262144.0);
			guy = (double)ft[0]*gdy; gvy = (double)ft[1]*gdy;
			guo = (double)ft[0]*gdo; gvo = (double)ft[1]*gdo;
			guo += (double)(ft[2]/262144.0-gux)*ghalfx;
			gvo -= (double)(ft[3]/262144.0+gvx)*ghalfx;
			f = 4.0/(float)tspr->xrepeat; gux *= f; guy *= f; guo *= f;
			f =-4.0/(float)tspr->yrepeat; gvx *= f; gvy *= f; gvo *= f;
			if (globalorientation&4)
			{
				gux = ((float)tilesizx[globalpicnum])*gdx - gux;
				guy = ((float)tilesizx[globalpicnum])*gdy - guy;
				guo = ((float)tilesizx[globalpicnum])*gdo - guo;
			}

			drawpoly(px,py,npoints,method);
			break;

		case 3: //Voxel sprite
		    break;
	}
	if (automapping == 1) show2dsprite[spritenum>>3] |= pow2char[spritenum&7];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movslq %edi, %rax
leaq 0x39d2c7(%rip), %rcx    # 0x3f77d0
movq (%rcx,%rax,8), %r14
movswl 0x1e(%r14), %ebp
testl %ebp, %ebp
js 0x5b9e6
movswq 0xe(%r14), %rax
testq %rax, %rax
js 0x5b9e6
leaq 0x3b5ae1(%rip), %r10    # 0x410010
movw %ax, (%r10)
movsbl 0x10(%r14), %ecx
leaq 0x3ba2ed(%rip), %rdx    # 0x41482c
movl %ecx, (%rdx)
movzbl 0x11(%r14), %ecx
leaq 0x3b5ab7(%rip), %rdx    # 0x410004
movl %ecx, (%rdx)
movzwl 0xc(%r14), %ecx
movswl %cx, %edx
leaq 0x3b5aa2(%rip), %r8     # 0x410000
movl %edx, (%r8)
movl %edx, %esi
notl %esi
xorl %r13d, %r13d
testb $0x30, %sil
jne 0x5a576
xorl %r12d, %r12d
xorl %r15d, %r15d
jmp 0x5a5d8
leaq 0x1e04e3(%rip), %rbx    # 0x23aa60
testb $-0x40, (%rbx,%rax,4)
je 0x5a5b2
movl %ebp, %ecx
orl $0x8000, %ecx           # imm = 0x8000
movswl %ax, %edi
movswl %cx, %esi
movq %r10, %r15
movq %r8, %r12
callq 0x242cd
movq %r12, %r8
movq %r15, %r10
addw (%r15), %ax
movw %ax, (%r15)
movzwl 0xc(%r14), %ecx
movzwl %cx, %edx
movswq %ax, %rax
movl (%rbx,%rax,4), %eax
movl %eax, %esi
shrl $0x8, %esi
movsbl %sil, %esi
movsbl 0x16(%r14), %r12d
addl %esi, %r12d
shrl $0x10, %eax
movsbl %al, %eax
movsbl 0x17(%r14), %r15d
addl %eax, %r15d
btl $0x9, %edx
adcl $0xe, %r13d
testb $0x2, %dl
movl $0xd, %ebx
cmovnel %r13d, %ebx
movswq 0x18(%r14), %rax
leaq (%rax,%rax,4), %rax
leaq 0x1e9464(%rip), %r11    # 0x243a60
movb 0x20(%r11,%rax,8), %dl
addb $0x10, %dl
movzbl %dl, %edx
cvtsi2ss %edx, %xmm0
movzbl 0x1d(%r11,%rax,8), %eax
divss 0x1ff87(%rip), %xmm0    # 0x7a5a0
cvtss2sd %xmm0, %xmm0
mulsd 0x5a45ab(%rip), %xmm0   # 0x5febd0
cvtsd2ss %xmm0, %xmm0
movl %eax, 0x5a0349(%rip)    # 0x5fa978
movss %xmm0, 0x5a0345(%rip)   # 0x5fa97c
cmpl $0x3, 0x5a0312(%rip)    # 0x5fa950
jne 0x5a731
movswq 0x1e(%r14), %rax
leaq (%rax,%rax,2), %rax
leaq 0x2d265c(%rip), %rdx    # 0x32ccb0
testb $0x1, 0x8(%rdx,%rax,4)
jne 0x5a731
cmpl $0x0, 0x4aeaa(%rip)     # 0xa5510
je 0x5a69e
movswq 0xe(%r14), %rax
leaq (%rax,%rax,2), %rax
leaq 0x5ee9c8(%rip), %rdx    # 0x649040
cmpl $0x0, (%rdx,%rax,4)
js 0x5a69e
leaq (%rdx,%rax,4), %rax
cmpl $0x0, 0x8(%rax)
js 0x5a69e
movq %r14, %rdi
xorl %esi, %esi
movq %r10, %r13
movl %ebp, 0x70(%rsp)
movq %r8, %rbp
callq 0x638e3
jmp 0x5a6ec
leaq 0x4a0db(%rip), %rax     # 0xa4780
andl $0x30, %ecx
cmpl $0x0, (%rax)
je 0x5a707
cmpw $0x30, %cx
je 0x5a707
movswq 0xe(%r14), %rax
leaq 0x331411(%rip), %rcx    # 0x38bad0
movslq (%rcx,%rax,4), %rax
testq %rax, %rax
js 0x5a731
leaq 0x609991(%rip), %rcx    # 0x664060
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x5a731
movq %r14, %rsi
xorl %edx, %edx
movq %r10, %r13
movl %ebp, 0x70(%rsp)
movq %r8, %rbp
callq 0x62b8a
movq %rbp, %r8
movl 0x70(%rsp), %ebp
leaq 0x1e9366(%rip), %r11    # 0x243a60
movq %r13, %r10
testl %eax, %eax
jne 0x5b9bb
jmp 0x5a731
cmpw $0x30, %cx
jne 0x5a731
movswq 0xe(%r14), %rax
leaq 0x609947(%rip), %rcx    # 0x664060
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x5a731
movq %r14, %rsi
xorl %edx, %edx
callq 0x62b8a
jmp 0x5b9bb
movl (%r8), %eax
movl %eax, %ecx
shrl $0x4, %ecx
andl $0x3, %ecx
leaq 0x2023d(%rip), %rdx     # 0x7a980
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leaq 0x1e02fd(%rip), %rcx    # 0x23aa50
movl (%r14), %edx
subl (%rcx), %edx
cvtsi2ss %edx, %xmm1
movl 0x4(%r14), %ecx
leaq 0x1e02ed(%rip), %rdx    # 0x23aa54
subl (%rdx), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
cvtss2sd %xmm0, %xmm0
cvtss2sd %xmm1, %xmm1
movsd 0x5a0238(%rip), %xmm2   # 0x5fa9b8
mulsd %xmm0, %xmm2
movsd 0x5a021c(%rip), %xmm3   # 0x5fa9a8
mulsd %xmm1, %xmm3
addsd %xmm2, %xmm3
xorps %xmm2, %xmm2
cvtsd2ss %xmm3, %xmm2
movss 0x1c971(%rip), %xmm5    # 0x77114
ucomiss %xmm2, %xmm5
jae 0x5b9e6
mulsd 0x5a020c(%rip), %xmm1   # 0x5fa9c0
mulsd 0x5a01f4(%rip), %xmm0   # 0x5fa9b0
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
divss %xmm2, %xmm5
movsd 0x5a0360(%rip), %xmm1   # 0x5fab30
xorps %xmm2, %xmm2
cvtss2sd %xmm0, %xmm2
mulsd %xmm1, %xmm2
xorps %xmm0, %xmm0
cvtss2sd %xmm5, %xmm0
mulsd %xmm0, %xmm2
addsd %xmm1, %xmm2
cvtsd2ss %xmm2, %xmm4
movl 0x8(%r14), %edx
leaq 0x211267(%rip), %rcx    # 0x26ba60
movl (%rcx), %ecx
subl %ecx, %edx
xorps %xmm1, %xmm1
cvtsi2ss %edx, %xmm1
xorps %xmm3, %xmm3
cvtss2sd %xmm1, %xmm3
movsd 0x5a43a5(%rip), %xmm1   # 0x5febb8
mulsd %xmm1, %xmm3
movsd 0x5a0319(%rip), %xmm2   # 0x5fab38
mulsd %xmm0, %xmm3
addsd %xmm2, %xmm3
cvtsd2ss %xmm3, %xmm3
leaq 0x49ffe(%rip), %rdx     # 0xa4830
cvtsi2ssl (%rdx), %xmm6
mulss %xmm5, %xmm6
movzbl 0x14(%r14), %edx
xorps %xmm5, %xmm5
cvtsi2ss %edx, %xmm5
divss 0x1fd72(%rip), %xmm6    # 0x7a5c0
mulss %xmm6, %xmm5
movzbl 0x15(%r14), %edx
cvtsi2ss %edx, %xmm7
mulss %xmm6, %xmm7
leaq 0x3ad782(%rip), %rdx    # 0x407fe8
xorps %xmm6, %xmm6
cvtsi2ssl (%rdx), %xmm6
cvtss2sd %xmm7, %xmm7
cvtss2sd %xmm6, %xmm6
mulsd 0x1a803(%rip), %xmm6    # 0x75080
mulsd %xmm7, %xmm6
xorps %xmm7, %xmm7
cvtsi2ss %r12d, %xmm7
cvtsd2ss %xmm6, %xmm6
mulss %xmm5, %xmm7
subss %xmm7, %xmm4
movswq (%r10), %rdx
leaq 0x3b5780(%rip), %rsi    # 0x410020
movzwl (%rsi,%rdx,2), %esi
testb $0x1, %sil
je 0x5a8c8
xorps %xmm7, %xmm7
cvtss2sd %xmm5, %xmm7
mulsd 0x1ff6f(%rip), %xmm7    # 0x7a828
cvtss2sd %xmm4, %xmm4
addsd %xmm4, %xmm7
xorps %xmm4, %xmm4
cvtsd2ss %xmm7, %xmm4
xorps %xmm7, %xmm7
cvtsi2ss %r15d, %xmm7
mulss %xmm6, %xmm7
subss %xmm7, %xmm3
movswl %si, %esi
cvtsi2ss %esi, %xmm8
leaq 0x3a6ef9(%rip), %rdi    # 0x4017e0
movswl (%rdi,%rdx,2), %edx
xorps %xmm7, %xmm7
cvtsi2ss %edx, %xmm7
mulss %xmm8, %xmm5
mulss %xmm6, %xmm7
cvtss2sd %xmm4, %xmm4
cvtss2sd %xmm5, %xmm5
movaps 0x1d726(%rip), %xmm6    # 0x78030
xorps %xmm5, %xmm6
movlhps %xmm5, %xmm6            # xmm6 = xmm6[0],xmm5[0]
movlhps %xmm4, %xmm4            # xmm4 = xmm4[0,0]
mulpd 0x1fd05(%rip), %xmm6    # 0x7a620
addpd %xmm4, %xmm6
movapd %xmm6, %xmm4
shufpd $0x1, %xmm6, %xmm4      # xmm4 = xmm4[1],xmm6[0]
movapd %xmm4, 0x50(%rsp)
movapd %xmm6, 0x40(%rsp)
testb %al, %al
js 0x5b7a4
movaps %xmm3, %xmm4
subss %xmm7, %xmm4
unpcklps %xmm3, %xmm4            # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1]
cvtps2pd %xmm4, %xmm4
jmp 0x5b7cb
movl %r12d, %edi
negl %edi
testb $0x4, %al
cmovel %r12d, %edi
movl %r15d, %ecx
negl %ecx
testb $0x8, %al
cmovnel %r15d, %ecx
movzbl 0x14(%r14), %edx
cvtsi2ss %edx, %xmm2
movzwl 0x1c(%r14), %edx
movl $0x7ff, %esi            # imm = 0x7FF
movl %edx, %r8d
andl %esi, %r8d
leaq 0x3743cc(%rip), %r9     # 0x3ced50
movswl (%r9,%r8,2), %r8d
xorps %xmm0, %xmm0
cvtsi2ss %r8d, %xmm0
mulss %xmm2, %xmm0
addl $0x600, %edx            # imm = 0x600
andl %esi, %edx
movswl (%r9,%rdx,2), %edx
cvtsi2ss %edx, %xmm1
movss 0x1fc06(%rip), %xmm3    # 0x7a5b4
movswq (%r10), %rdx
leaq 0x3b5667(%rip), %rsi    # 0x410020
movswl (%rsi,%rdx,2), %r8d
cvtsi2ss %r8d, %xmm4
sarl %r8d
cvtsi2ss %r8d, %xmm5
mulss %xmm3, %xmm0
cvtsi2ss %edi, %xmm6
mulss %xmm2, %xmm1
mulss %xmm3, %xmm1
addss %xmm5, %xmm6
leaq 0x1e006a(%rip), %rdi    # 0x23aa50
movl (%r14), %r8d
movl 0x4(%r14), %r9d
subl (%rdi), %r8d
xorps %xmm2, %xmm2
cvtsi2ss %r8d, %xmm2
movaps %xmm0, %xmm3
mulss %xmm6, %xmm3
leaq 0x1e004e(%rip), %rdi    # 0x23aa54
subl (%rdi), %r9d
subss %xmm3, %xmm2
xorps %xmm3, %xmm3
cvtsi2ss %r9d, %xmm3
mulss %xmm4, %xmm0
addss %xmm2, %xmm0
mulss %xmm1, %xmm6
subss %xmm6, %xmm3
mulss %xmm4, %xmm1
xorps %xmm4, %xmm4
cvtss2sd %xmm2, %xmm4
movsd 0x59ff70(%rip), %xmm7   # 0x5fa9a8
xorps %xmm5, %xmm5
cvtss2sd %xmm3, %xmm5
movsd 0x59ff70(%rip), %xmm8   # 0x5fa9b8
movapd %xmm8, %xmm2
mulsd %xmm5, %xmm2
movaps %xmm4, %xmm6
mulsd %xmm7, %xmm6
addsd %xmm2, %xmm6
xorps %xmm2, %xmm2
cvtsd2ss %xmm6, %xmm2
addss %xmm3, %xmm1
xorps %xmm6, %xmm6
cvtss2sd %xmm0, %xmm6
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm8
mulsd %xmm6, %xmm7
addsd %xmm8, %xmm7
xorps %xmm0, %xmm0
cvtsd2ss %xmm7, %xmm0
movss 0x1c685(%rip), %xmm3    # 0x77114
ucomiss %xmm2, %xmm3
jb 0x5aa9d
ucomiss %xmm0, %xmm3
jae 0x5b9e6
xorps %xmm8, %xmm8
cvtss2sd %xmm2, %xmm8
movsd 0x59ff01(%rip), %xmm9   # 0x5fa9b0
movsd 0x59ff08(%rip), %xmm10  # 0x5fa9c0
mulsd %xmm10, %xmm4
mulsd %xmm9, %xmm5
subsd %xmm4, %xmm5
xorps %xmm7, %xmm7
cvtsd2ss %xmm5, %xmm7
mulsd %xmm10, %xmm6
mulsd %xmm9, %xmm1
subsd %xmm6, %xmm1
cvtsd2ss %xmm1, %xmm1
xorps %xmm5, %xmm5
ucomiss %xmm2, %xmm3
movaps %xmm8, %xmm6
movaps %xmm7, %xmm4
jbe 0x5ab24
movsd 0x1b0ca(%rip), %xmm6    # 0x75bc0
movapd %xmm6, %xmm4
subsd %xmm8, %xmm4
movaps %xmm0, %xmm5
subss %xmm2, %xmm5
cvtss2sd %xmm5, %xmm5
divsd %xmm5, %xmm4
xorps %xmm5, %xmm5
cvtsd2ss %xmm4, %xmm5
movaps %xmm1, %xmm4
subss %xmm7, %xmm4
mulss %xmm5, %xmm4
addss %xmm7, %xmm4
ucomiss %xmm0, %xmm3
jbe 0x5b3e6
movsd 0x1b08a(%rip), %xmm9    # 0x75bc0
movapd %xmm9, %xmm3
subsd %xmm8, %xmm3
subss %xmm2, %xmm0
cvtss2sd %xmm0, %xmm0
divsd %xmm0, %xmm3
cvtsd2ss %xmm3, %xmm3
subss %xmm7, %xmm1
mulss %xmm3, %xmm1
addss %xmm7, %xmm1
jmp 0x5b3ef
movq %r8, %r13
testb $0x40, %al
jne 0x5ab6f
movl %eax, %ecx
andl $0x8, %ecx
jmp 0x5ab91
leaq 0x210eea(%rip), %rcx    # 0x26ba60
movl (%rcx), %ecx
cmpl 0x8(%r14), %ecx
setg %dl
movl %eax, %ecx
andl $0x8, %ecx
sete %sil
cmpb %dl, %sil
je 0x5b9e6
movl %r12d, %edi
negl %edi
testb $0x4, %al
cmovel %r12d, %edi
movl %r15d, %edx
negl %edx
testl %ecx, %ecx
cmovel %r15d, %edx
movzwl 0x1c(%r14), %eax
movl $0x7ff, %ecx            # imm = 0x7FF
movl %eax, %esi
addl $0x200, %eax            # imm = 0x200
andl %ecx, %eax
leaq 0x37418f(%rip), %r8     # 0x3ced50
movswl (%r8,%rax,2), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x1a4ab(%rip), %xmm1    # 0x75080
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm12
andl %ecx, %esi
movswl (%r8,%rsi,2), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd %xmm1, %xmm0
movq %r10, %r12
movswq (%r10), %rcx
leaq 0x3b5422(%rip), %rax    # 0x410020
movswl (%rax,%rcx,2), %r8d
sarl %r8d
movl %r8d, %r9d
subl %edi, %r9d
movzbl 0x14(%r14), %esi
imull %esi, %r9d
cvtsi2ss %r9d, %xmm2
cvtsd2ss %xmm0, %xmm3
leaq 0x3a6bbb(%rip), %r9     # 0x4017e0
movswl (%r9,%rcx,2), %r9d
sarl %r9d
movzbl 0x15(%r14), %ecx
addl %edi, %r8d
imull %esi, %r8d
cvtsi2ss %r8d, %xmm15
leal (%rdx,%r9), %edi
imull %ecx, %edi
xorps %xmm1, %xmm1
cvtsi2ss %edi, %xmm1
leaq 0x1dfdfd(%rip), %rdi    # 0x23aa50
movl (%rdi), %edi
leaq 0x1dfdf8(%rip), %r8     # 0x23aa54
movl (%r8), %r8d
movaps 0x1948a(%rip), %xmm5    # 0x740f0
movaps %xmm12, %xmm4
xorps %xmm5, %xmm4
movl (%r14), %r10d
subl %edi, %r10d
cvtsi2ss %r10d, %xmm6
movl 0x4(%r14), %r10d
movaps %xmm12, %xmm0
mulss %xmm1, %xmm0
movaps %xmm0, 0xb0(%rsp)
movaps %xmm0, %xmm7
subl %r8d, %r10d
cvtsi2ss %r10d, %xmm8
addss %xmm6, %xmm7
mulss %xmm3, %xmm1
movss %xmm1, 0xc(%rsp)
movaps %xmm1, %xmm9
subl %edx, %r9d
imull %ecx, %r9d
xorps %xmm0, %xmm0
cvtsi2ss %r9d, %xmm0
addss %xmm8, %xmm9
movaps %xmm12, %xmm1
mulss %xmm0, %xmm1
subss %xmm1, %xmm6
mulss %xmm3, %xmm0
subss %xmm0, %xmm8
shufps $0x0, %xmm9, %xmm9      # xmm9 = xmm9[0,0,0,0]
movaps %xmm9, 0x100(%rsp)
shufps $0x0, %xmm8, %xmm8      # xmm8 = xmm8[0,0,0,0]
movaps %xmm8, 0x110(%rsp)
shufps $0x0, %xmm7, %xmm7      # xmm7 = xmm7[0,0,0,0]
movaps %xmm7, 0x120(%rsp)
shufps $0x0, %xmm6, %xmm6      # xmm6 = xmm6[0,0,0,0]
movaps %xmm6, 0x70(%rsp)
movaps %xmm3, 0x90(%rsp)
shufps $0x0, %xmm3, %xmm3      # xmm3 = xmm3[0,0,0,0]
movaps %xmm3, 0xf0(%rsp)
xorps %xmm5, %xmm3
movaps %xmm2, 0xd0(%rsp)
movaps %xmm2, %xmm0
shufps $0x0, %xmm2, %xmm0      # xmm0 = xmm0[0,0],xmm2[0,0]
movaps %xmm12, 0xa0(%rsp)
shufps $0x0, %xmm12, %xmm12    # xmm12 = xmm12[0,0,0,0]
mulps %xmm0, %xmm3
movaps %xmm3, 0xe0(%rsp)
mulps %xmm0, %xmm12
movaps %xmm15, 0xc0(%rsp)
shufps $0x0, %xmm15, %xmm15    # xmm15 = xmm15[0,0,0,0]
movsd 0x59fc64(%rip), %xmm6   # 0x5fa9c0
unpcklpd %xmm6, %xmm6            # xmm6 = xmm6[0,0]
xorpd 0x1d2c8(%rip), %xmm6    # 0x78030
movsd 0x59fc40(%rip), %xmm1   # 0x5fa9b0
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
movsd 0x59fc3c(%rip), %xmm5   # 0x5fa9b8
unpcklpd %xmm5, %xmm5            # xmm5 = xmm5[0,0]
movsd 0x59fc20(%rip), %xmm2   # 0x5fa9a8
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
xorl %edx, %edx
movaps %xmm4, 0x80(%rsp)
pshufd $0x0, %xmm4, %xmm3      # xmm3 = xmm4[0,0,0,0]
mulps %xmm15, %xmm3
movdqa 0x19338(%rip), %xmm9    # 0x740e0
movdqa 0x1f990(%rip), %xmm0    # 0x7a740
movdqa 0x1f998(%rip), %xmm7    # 0x7a750
movdqa %xmm9, %xmm8
pxor 0x1932a(%rip), %xmm8    # 0x740f0
movdqa %xmm0, %xmm10
pcmpgtd %xmm8, %xmm10
pshufd $0xf5, %xmm0, %xmm11    # xmm11 = xmm0[1,1,3,3]
pshufd $0xf5, %xmm8, %xmm8     # xmm8 = xmm8[1,1,3,3]
pcmpeqd %xmm11, %xmm8
pand %xmm10, %xmm8
pshufd $0xe8, %xmm8, %xmm10    # xmm10 = xmm8[0,2,2,3]
movdqa %xmm10, %xmm8
pandn 0x110(%rsp), %xmm8
movdqa 0x100(%rsp), %xmm11
pand %xmm10, %xmm11
por %xmm8, %xmm11
movdqa 0x120(%rsp), %xmm8
pand %xmm10, %xmm8
pandn 0x70(%rsp), %xmm10
por %xmm8, %xmm10
movdqa %xmm9, %xmm4
psubq 0x1f929(%rip), %xmm4    # 0x7a760
pand %xmm7, %xmm4
pcmpeqd 0x1ca7d(%rip), %xmm4    # 0x778c0
pshufd $0xb1, %xmm4, %xmm8     # xmm8 = xmm4[1,0,3,2]
pand %xmm4, %xmm8
movaps 0xe0(%rsp), %xmm4
addps %xmm10, %xmm4
movaps %xmm12, %xmm14
addps %xmm11, %xmm14
movaps 0xf0(%rsp), %xmm13
mulps %xmm15, %xmm13
cvtps2pd %xmm14, %xmm14
addps %xmm10, %xmm13
movdqa %xmm8, %xmm10
pandn %xmm14, %xmm10
addps %xmm3, %xmm11
cvtps2pd %xmm11, %xmm11
pand %xmm8, %xmm11
por %xmm10, %xmm11
cvtps2pd %xmm4, %xmm4
cvtps2pd %xmm13, %xmm10
pand %xmm8, %xmm10
pandn %xmm4, %xmm8
por %xmm10, %xmm8
movapd %xmm6, %xmm4
mulpd %xmm8, %xmm4
movapd %xmm5, %xmm10
mulpd %xmm11, %xmm10
mulpd %xmm1, %xmm11
addpd %xmm4, %xmm11
movapd %xmm11, 0x40(%rsp,%rdx,8)
mulpd %xmm2, %xmm8
addpd %xmm10, %xmm8
movapd %xmm8, 0x10(%rsp,%rdx,8)
addq $0x2, %rdx
paddq %xmm7, %xmm9
cmpq $0x4, %rdx
jne 0x5adb8
movl 0x8(%r14), %r9d
leaq 0x210b64(%rip), %rdx    # 0x26ba60
subl (%rdx), %r9d
jge 0x5af80
xorps %xmm0, %xmm0
cvtsd2ss 0x40(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
movsd 0x58(%rsp), %xmm2
movsd %xmm1, 0x40(%rsp)
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x48(%rsp)
xorps %xmm0, %xmm0
cvtsd2ss 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movsd 0x28(%rsp), %xmm3
movsd %xmm1, 0x10(%rsp)
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
xorps %xmm0, %xmm0
cvtsd2ss 0x50(%rsp), %xmm0
movsd %xmm2, 0x50(%rsp)
cvtss2sd %xmm0, %xmm0
xorps %xmm1, %xmm1
cvtsd2ss 0x20(%rsp), %xmm1
movsd %xmm0, 0x58(%rsp)
movsd %xmm3, 0x20(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
xorl %edx, %edx
movl $0x1, %r10d
movsd 0x1ac2f(%rip), %xmm10   # 0x75bc0
movsd 0x1ac27(%rip), %xmm0    # 0x75bc0
movsd 0x8(%rsp,%r10,8), %xmm1
ucomisd %xmm10, %xmm1
jb 0x5afcf
xorps %xmm2, %xmm2
cvtsd2ss 0x38(%rsp,%r10,8), %xmm2
movslq %edx, %rdx
movss %xmm2, 0x150(%rsp,%rdx,4)
xorps %xmm2, %xmm2
cvtsd2ss %xmm1, %xmm2
movss %xmm2, 0x130(%rsp,%rdx,4)
incl %edx
movl %r10d, %r11d
andl $0x3, %r11d
movsd 0x10(%rsp,%r11,8), %xmm2
movapd %xmm0, %xmm3
cmplepd %xmm1, %xmm3
movapd %xmm0, %xmm4
cmpnlepd %xmm2, %xmm4
xorpd %xmm3, %xmm4
movd %xmm4, %r15d
testb $0x1, %r15b
jne 0x5b05b
movapd %xmm10, %xmm3
subsd %xmm1, %xmm3
subsd %xmm1, %xmm2
divsd %xmm2, %xmm3
cvtsd2ss %xmm3, %xmm3
movsd 0x40(%rsp,%r11,8), %xmm4
movsd 0x38(%rsp,%r10,8), %xmm5
subsd %xmm5, %xmm4
cvtss2sd %xmm3, %xmm3
mulsd %xmm3, %xmm4
addsd %xmm5, %xmm4
cvtsd2ss %xmm4, %xmm4
movslq %edx, %rdx
movss %xmm4, 0x150(%rsp,%rdx,4)
mulsd %xmm3, %xmm2
addsd %xmm1, %xmm2
xorps %xmm1, %xmm1
cvtsd2ss %xmm2, %xmm1
movss %xmm1, 0x130(%rsp,%rdx,4)
incl %edx
incq %r10
cmpq $0x5, %r10
jne 0x5af99
cmpl $0x3, %edx
jl 0x5b9e6
xorps %xmm0, %xmm0
cvtsi2ss %r9d, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x5a3b33(%rip), %xmm0   # 0x5febb8
cvtsd2ss %xmm0, %xmm0
movsd 0x59fa9e(%rip), %xmm9   # 0x5fab30
movsd 0x59fa9e(%rip), %xmm7   # 0x5fab38
movl %edx, %r10d
xorl %r11d, %r11d
movss 0x1c06c(%rip), %xmm1    # 0x77114
movaps %xmm1, %xmm2
divss 0x130(%rsp,%r11,4), %xmm2
xorps %xmm3, %xmm3
cvtss2sd 0x150(%rsp,%r11,4), %xmm3
mulsd %xmm9, %xmm3
xorps %xmm4, %xmm4
cvtss2sd %xmm2, %xmm4
mulsd %xmm3, %xmm4
addsd %xmm9, %xmm4
movsd %xmm4, 0x40(%rsp,%r11,8)
mulss %xmm0, %xmm2
cvtss2sd %xmm2, %xmm2
addsd %xmm7, %xmm2
movsd %xmm2, 0x10(%rsp,%r11,8)
incq %r11
cmpq %r11, %r10
jne 0x5b0a8
movq $0x0, 0x59fa4c(%rip) # 0x5fab50
movsd 0x5a3ab3(%rip), %xmm8   # 0x5febc0
xorps %xmm0, %xmm0
cvtsi2sd %r9d, %xmm0
divsd %xmm0, %xmm8
movsd %xmm8, 0x59fa35(%rip)   # 0x5fab58
xorpd 0x1cf05(%rip), %xmm7    # 0x78030
mulsd %xmm8, %xmm7
movsd %xmm7, 0x59fa28(%rip)   # 0x5fab60
xorps %xmm0, %xmm0
cvtsi2ssl (%r14), %xmm0
movaps 0x90(%rsp), %xmm2
movaps %xmm2, %xmm1
movaps 0xc0(%rsp), %xmm6
mulss %xmm6, %xmm1
addss %xmm0, %xmm1
movaps 0xb0(%rsp), %xmm11
addss %xmm1, %xmm11
movaps 0xd0(%rsp), %xmm5
addss %xmm6, %xmm5
movaps 0x18f74(%rip), %xmm0    # 0x740f0
xorps %xmm5, %xmm0
mulss %xmm2, %xmm0
xorps %xmm1, %xmm1
cvtsi2ssl 0x4(%r14), %xmm1
movss 0xc(%rsp), %xmm3
addss %xmm1, %xmm3
mulss 0x80(%rsp), %xmm6
mulss 0xa0(%rsp), %xmm5
movaps %xmm5, %xmm1
mulss %xmm5, %xmm1
movaps %xmm0, %xmm2
mulss %xmm0, %xmm2
addss %xmm1, %xmm2
xorps %xmm1, %xmm1
cvtss2sd %xmm2, %xmm1
sqrtsd %xmm1, %xmm1
divsd %xmm1, %xmm10
xorps %xmm1, %xmm1
cvtsd2ss %xmm10, %xmm1
addss %xmm3, %xmm6
mulss %xmm1, %xmm0
mulss %xmm1, %xmm5
leaq 0x214893(%rip), %r9     # 0x26fa78
xorps %xmm1, %xmm1
cvtsi2ssl (%r9), %xmm1
leaq 0x21487c(%rip), %r9     # 0x26fa70
xorps %xmm3, %xmm3
cvtsi2ssl (%r9), %xmm3
movaps %xmm1, %xmm2
mulss %xmm0, %xmm1
xorps %xmm4, %xmm4
cvtss2sd %xmm0, %xmm4
mulss %xmm3, %xmm0
mulss %xmm5, %xmm2
addss %xmm0, %xmm2
mulss %xmm5, %xmm3
subss %xmm3, %xmm1
xorps %xmm0, %xmm0
cvtsi2ss %r8d, %xmm0
subss %xmm6, %xmm0
cvtss2sd %xmm0, %xmm0
xorps %xmm3, %xmm3
cvtsi2ss %edi, %xmm3
cvtss2sd %xmm5, %xmm5
subss %xmm11, %xmm3
cvtss2sd %xmm3, %xmm3
movaps %xmm4, %xmm6
mulsd %xmm3, %xmm6
mulsd %xmm0, %xmm4
mulsd %xmm5, %xmm0
addsd %xmm6, %xmm0
xorps %xmm10, %xmm10
cvtsd2ss %xmm0, %xmm10
mulsd %xmm5, %xmm3
subsd %xmm4, %xmm3
xorps %xmm4, %xmm4
cvtsd2ss %xmm3, %xmm4
xorps %xmm6, %xmm6
cvtss2sd %xmm1, %xmm6
leaq 0x374ad5(%rip), %rdi    # 0x3cfd50
xorps %xmm3, %xmm3
cvtsi2sdl (%rdi), %xmm3
movaps %xmm6, %xmm1
mulsd %xmm3, %xmm1
movsd 0x1f677(%rip), %xmm5    # 0x7a908
mulsd %xmm5, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm2, %xmm0
mulsd %xmm0, %xmm3
mulsd %xmm5, %xmm3
cvtss2sd %xmm10, %xmm10
movapd %xmm8, %xmm2
mulsd %xmm10, %xmm2
cvtss2sd %xmm4, %xmm4
movapd %xmm8, %xmm5
mulsd %xmm4, %xmm5
mulsd %xmm7, %xmm10
mulsd %xmm7, %xmm4
movsd 0x1f58e(%rip), %xmm11   # 0x7a860
mulsd %xmm11, %xmm0
subsd %xmm1, %xmm0
mulsd %xmm9, %xmm0
addsd %xmm10, %xmm0
mulsd %xmm11, %xmm6
addsd %xmm3, %xmm6
mulsd %xmm9, %xmm6
movzbl %sil, %esi
cvtsi2sd %esi, %xmm9
movsd 0x1f60b(%rip), %xmm10   # 0x7a910
divsd %xmm9, %xmm10
xorps %xmm9, %xmm9
cvtsd2ss %xmm10, %xmm9
subsd %xmm6, %xmm4
xorps %xmm6, %xmm6
cvtss2sd %xmm9, %xmm6
mulsd %xmm6, %xmm1
movsd %xmm1, 0x59f83d(%rip)   # 0x5fab68
mulsd %xmm6, %xmm2
movsd %xmm2, 0x59f839(%rip)   # 0x5fab70
mulsd %xmm6, %xmm0
movsd %xmm0, 0x59f835(%rip)   # 0x5fab78
movzbl %cl, %ecx
xorps %xmm6, %xmm6
cvtsi2sd %ecx, %xmm6
movsd 0x1f5c2(%rip), %xmm9    # 0x7a918
divsd %xmm6, %xmm9
xorps %xmm6, %xmm6
cvtsd2ss %xmm9, %xmm6
cvtss2sd %xmm6, %xmm6
mulsd %xmm6, %xmm3
movsd %xmm3, 0x59f80d(%rip)   # 0x5fab80
mulsd %xmm6, %xmm5
movsd %xmm5, 0x59f809(%rip)   # 0x5fab88
mulsd %xmm6, %xmm4
movsd %xmm4, 0x59f805(%rip)   # 0x5fab90
testb $0x4, (%r13)
je 0x5b9aa
movswq (%r12), %rcx
movswl (%rax,%rcx,2), %eax
xorps %xmm3, %xmm3
cvtsi2sd %eax, %xmm3
movsd 0x59f7a2(%rip), %xmm4   # 0x5fab50
mulsd %xmm3, %xmm4
subsd %xmm1, %xmm4
movsd %xmm4, 0x59f7aa(%rip)   # 0x5fab68
mulsd %xmm3, %xmm8
subsd %xmm2, %xmm8
movsd %xmm8, 0x59f79f(%rip)   # 0x5fab70
mulsd %xmm3, %xmm7
subsd %xmm0, %xmm7
movsd %xmm7, 0x59f797(%rip)   # 0x5fab78
jmp 0x5b9aa
xorps %xmm9, %xmm9
cvtss2sd %xmm0, %xmm9
movlhps %xmm6, %xmm9            # xmm9 = xmm9[0],xmm6[0]
movzbl 0x15(%r14), %edi
xorps %xmm0, %xmm0
cvtsi2ss %edi, %xmm0
leaq 0x3a63da(%rip), %r9     # 0x4017e0
movswl (%r9,%rdx,2), %r8d
xorps %xmm6, %xmm6
cvtsi2ss %r8d, %xmm6
mulss %xmm0, %xmm6
movapd 0x1f291(%rip), %xmm2    # 0x7a6b0
divpd %xmm9, %xmm2
movsd 0x59f704(%rip), %xmm7   # 0x5fab30
xorps %xmm8, %xmm8
cvtss2sd %xmm4, %xmm8
mulsd %xmm7, %xmm8
cvtss2sd %xmm1, %xmm1
mulsd %xmm7, %xmm1
cvtpd2ps %xmm2, %xmm2
cvtps2pd %xmm2, %xmm2
mulsd %xmm2, %xmm1
movsd 0x5a3763(%rip), %xmm4   # 0x5febb8
unpcklpd %xmm4, %xmm4            # xmm4 = xmm4[0,0]
mulpd %xmm2, %xmm4
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
mulsd %xmm8, %xmm2
addsd %xmm7, %xmm2
imull %edi, %ecx
shll $0x2, %ecx
addl 0x8(%r14), %ecx
addsd %xmm7, %xmm1
movl %ecx, 0x8(%r14)
movzwl (%r9,%rdx,2), %r8d
testb %al, %al
jns 0x5b4ac
movswl %r8w, %r8d
addl %edi, %edi
imull %edi, %r8d
addl %r8d, %ecx
movl %ecx, 0x8(%r14)
movzwl (%r9,%rdx,2), %r8d
testb $0x1, %r8b
je 0x5b4ac
addl %edi, %ecx
movl %ecx, 0x8(%r14)
movzwl (%r9,%rdx,2), %r8d
mulss 0x1f104(%rip), %xmm6    # 0x7a5b8
cvtsd2ss %xmm2, %xmm2
cvtsd2ss %xmm1, %xmm1
cvtpd2ps %xmm4, %xmm4
leaq 0x210599(%rip), %rdi    # 0x26ba60
movl (%rdi), %edi
movl %ecx, %r9d
subl %edi, %r9d
testb $0x4, %al
je 0x5b4ef
movss 0x1bc39(%rip), %xmm7    # 0x77114
movaps %xmm7, %xmm8
subss %xmm5, %xmm8
subss %xmm3, %xmm7
movaps %xmm8, %xmm5
movaps %xmm7, %xmm3
xorps %xmm9, %xmm9
cvtsi2ss %r9d, %xmm9
movaps %xmm9, %xmm7
subss %xmm6, %xmm7
movapd %xmm4, %xmm13
shufps $0x55, %xmm4, %xmm13    # xmm13 = xmm13[1,1],xmm4[1,1]
movaps %xmm13, %xmm6
subss %xmm4, %xmm6
cvtss2sd %xmm6, %xmm11
movsd 0x5a36a1(%rip), %xmm6   # 0x5febc0
mulsd %xmm6, %xmm11
movaps %xmm2, %xmm8
subss %xmm1, %xmm8
cvtss2sd %xmm8, %xmm14
divsd %xmm14, %xmm11
cvtss2sd %xmm13, %xmm10
mulss %xmm4, %xmm3
mulss %xmm5, %xmm13
cvtss2sd %xmm13, %xmm12
subss %xmm3, %xmm13
cvtss2sd %xmm13, %xmm13
mulsd %xmm6, %xmm13
movswl (%rsi,%rdx,2), %edx
xorps %xmm3, %xmm3
cvtsi2sd %edx, %xmm3
mulsd %xmm3, %xmm13
divsd %xmm14, %xmm13
shufps $0x0, %xmm7, %xmm7      # xmm7 = xmm7[0,0,0,0]
mulps %xmm4, %xmm7
cvtps2pd %xmm7, %xmm5
mulsd %xmm6, %xmm10
mulsd %xmm6, %xmm12
movsd 0x59f5ae(%rip), %xmm7   # 0x5fab38
unpcklpd %xmm7, %xmm7            # xmm7 = xmm7[0,0]
addpd %xmm7, %xmm5
cvtpd2ps %xmm5, %xmm5
shufps $0x0, %xmm9, %xmm9      # xmm9 = xmm9[0,0,0,0]
mulps %xmm4, %xmm9
cvtps2pd %xmm9, %xmm6
mulsd %xmm3, %xmm12
xorps %xmm3, %xmm3
cvtss2sd %xmm2, %xmm3
movsd %xmm13, 0x59f5b0(%rip)  # 0x5fab68
mulsd %xmm3, %xmm13
subsd %xmm13, %xmm12
movapd %xmm5, %xmm9
addpd %xmm7, %xmm6
cvtpd2ps %xmm6, %xmm6
shufps $0x55, %xmm5, %xmm9     # xmm9 = xmm9[1,1],xmm5[1,1]
movsd %xmm12, 0x59f59b(%rip)  # 0x5fab78
movapd %xmm6, %xmm12
shufps $0x55, %xmm6, %xmm12    # xmm12 = xmm12[1,1],xmm6[1,1]
movsd %xmm11, 0x59f560(%rip)  # 0x5fab50
mulsd %xmm3, %xmm11
subsd %xmm11, %xmm10
movsd %xmm10, 0x59f55d(%rip)  # 0x5fab60
movswl %r8w, %edx
addsd %xmm11, %xmm10
xorps %xmm11, %xmm11
cvtsi2sd %edx, %xmm11
mulsd %xmm11, %xmm10
movaps %xmm9, %xmm11
subss %xmm12, %xmm11
mulss %xmm8, %xmm11
cvtss2sd %xmm11, %xmm11
divsd %xmm11, %xmm10
xorl %esi, %esi
movq %rsi, 0x59f51d(%rip)    # 0x5fab58
movq %rsi, 0x59f52e(%rip)    # 0x5fab70
cvtsd2ss %xmm10, %xmm10
testb $0x8, %al
je 0x5b65a
movaps %xmm6, %xmm11
subss %xmm12, %xmm11
movaps %xmm12, %xmm9
jmp 0x5b66c
movaps %xmm9, %xmm11
subss %xmm5, %xmm11
movaps %xmm1, %xmm8
subss %xmm2, %xmm8
mulss %xmm10, %xmm11
cvtss2sd %xmm11, %xmm11
mulss %xmm10, %xmm8
cvtss2sd %xmm8, %xmm8
movaps 0x1c9a8(%rip), %xmm10   # 0x78030
xorps %xmm11, %xmm10
cvtss2sd %xmm9, %xmm9
mulsd %xmm8, %xmm9
mulsd %xmm3, %xmm10
subsd %xmm9, %xmm10
movsd %xmm11, 0x59f4d7(%rip)  # 0x5fab80
movsd %xmm8, 0x59f4d6(%rip)   # 0x5fab88
movsd %xmm10, 0x59f4d5(%rip)  # 0x5fab90
movswq 0x18(%r14), %rsi
leaq (%rsi,%rsi,4), %rsi
leaq (%r11,%rsi,8), %rsi
testb $0x1, 0xc(%rsi)
jne 0x5b71b
xorps %xmm8, %xmm8
cvtsi2ss %edx, %xmm8
mulss %xmm0, %xmm8
mulss 0x1eed7(%rip), %xmm8    # 0x7a5bc
movl 0x4(%rsi), %edx
cvtsi2ss %edx, %xmm0
xorps %xmm9, %xmm9
cvtsi2ss %ecx, %xmm9
addss %xmm8, %xmm9
ucomiss %xmm9, %xmm0
jbe 0x5b71b
subl %edi, %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
mulps %xmm4, %xmm0
cvtps2pd %xmm0, %xmm0
addpd %xmm7, %xmm0
cvtpd2ps %xmm0, %xmm5
testb $0x1, 0xe(%rsi)
jne 0x5b743
movl 0x8(%rsi), %edx
cmpl %ecx, %edx
jge 0x5b743
subl %edi, %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
mulps %xmm4, %xmm0
cvtps2pd %xmm0, %xmm0
addpd %xmm0, %xmm7
cvtpd2ps %xmm7, %xmm6
ucomiss %xmm1, %xmm2
jbe 0x5b75c
testb $0x40, %al
jne 0x5b9e6
movaps %xmm3, %xmm0
xorps %xmm3, %xmm3
cvtss2sd %xmm1, %xmm3
jmp 0x5b76b
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
shufps $0xe1, %xmm5, %xmm5     # xmm5 = xmm5[1,0,2,3]
shufps $0xe1, %xmm6, %xmm6     # xmm6 = xmm6[1,0,2,3]
movsd %xmm3, 0x40(%rsp)
cvtps2pd %xmm5, %xmm1
movsd %xmm0, 0x48(%rsp)
movapd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x50(%rsp)
cvtps2pd %xmm6, %xmm0
movsd %xmm3, 0x58(%rsp)
shufpd $0x1, %xmm0, %xmm0      # xmm0 = xmm0[1,0]
movapd %xmm0, 0x20(%rsp)
movl $0x4, %edx
jmp 0x5b9aa
cvtss2sd %xmm3, %xmm3
xorps %xmm5, %xmm5
cvtss2sd %xmm7, %xmm5
movaps 0x1c87a(%rip), %xmm4    # 0x78030
xorps %xmm5, %xmm4
movlhps %xmm5, %xmm4            # xmm4 = xmm4[0],xmm5[0]
movlhps %xmm3, %xmm3            # xmm3 = xmm3[0,0]
mulpd 0x1ee59(%rip), %xmm4    # 0x7a620
addpd %xmm3, %xmm4
movlpd %xmm4, 0x10(%rsp)
movapd %xmm4, %xmm3
unpckhpd %xmm4, %xmm3            # xmm3 = xmm3[1],xmm4[1]
movhpd %xmm4, 0x28(%rsp)
movupd %xmm4, 0x18(%rsp)
xorl %edi, %edi
movq %rdi, 0x59f392(%rip)    # 0x5fab80
movq %rdi, 0x59f37b(%rip)    # 0x5fab70
movq %rdi, 0x59f35c(%rip)    # 0x5fab58
movq %rdi, 0x59f34d(%rip)    # 0x5fab50
movsd 0x5a33bd(%rip), %xmm5   # 0x5febc8
mulsd %xmm0, %xmm5
movsd %xmm5, 0x59f349(%rip)   # 0x5fab60
xorps %xmm7, %xmm7
cvtsi2sd %esi, %xmm7
mulsd %xmm5, %xmm7
movapd %xmm6, %xmm8
unpckhpd %xmm6, %xmm8            # xmm8 = xmm8[1],xmm6[1]
testb $0x4, %al
jne 0x5b860
subsd %xmm6, %xmm8
addsd 0x1f0ea(%rip), %xmm8    # 0x7a928
divsd %xmm8, %xmm7
movapd 0x1c7e4(%rip), %xmm8    # 0x78030
xorpd %xmm7, %xmm8
addsd 0x1f0d7(%rip), %xmm6    # 0x7a930
mulsd %xmm8, %xmm6
jmp 0x5b890
subsd %xmm8, %xmm6
addsd 0x1f0b3(%rip), %xmm6    # 0x7a920
divsd %xmm6, %xmm7
movapd 0x1c7b7(%rip), %xmm6    # 0x78030
xorpd %xmm7, %xmm6
addsd 0x1efea(%rip), %xmm8    # 0x7a870
mulsd %xmm6, %xmm8
movapd %xmm8, %xmm6
movsd %xmm7, 0x59f2d0(%rip)   # 0x5fab68
movsd %xmm6, 0x59f2d8(%rip)   # 0x5fab78
movswl %dx, %edx
xorps %xmm6, %xmm6
cvtsi2sd %edx, %xmm6
mulsd %xmm6, %xmm5
testb $0x8, %al
jne 0x5b8e0
movapd %xmm3, %xmm6
subsd %xmm4, %xmm6
addsd 0x1f066(%rip), %xmm6    # 0x7a928
divsd %xmm6, %xmm5
movapd 0x1c762(%rip), %xmm7    # 0x78030
xorpd %xmm5, %xmm7
movsd 0x1f056(%rip), %xmm6    # 0x7a930
addsd %xmm4, %xmm6
jmp 0x5b90c
movapd %xmm4, %xmm6
subsd %xmm3, %xmm6
addsd 0x1f030(%rip), %xmm6    # 0x7a920
divsd %xmm6, %xmm5
movapd 0x1c734(%rip), %xmm7    # 0x78030
xorpd %xmm5, %xmm7
movsd 0x1ef68(%rip), %xmm6    # 0x7a870
addsd %xmm3, %xmm6
mulsd %xmm7, %xmm6
movsd %xmm5, 0x59f270(%rip)   # 0x5fab88
movsd %xmm6, 0x59f270(%rip)   # 0x5fab90
movswq 0x18(%r14), %rax
leaq (%rax,%rax,4), %rax
leaq (%r11,%rax,8), %rax
testb $0x3, 0xc(%rax)
jne 0x5b969
movl 0x4(%rax), %edx
subl %ecx, %edx
xorps %xmm5, %xmm5
cvtsi2ss %edx, %xmm5
cvtss2sd %xmm5, %xmm5
mulsd %xmm1, %xmm5
mulsd %xmm0, %xmm5
addsd %xmm2, %xmm5
cvtsd2ss %xmm5, %xmm5
cvtss2sd %xmm5, %xmm5
ucomisd %xmm4, %xmm5
jbe 0x5b969
movsd %xmm5, 0x18(%rsp)
movsd %xmm5, 0x10(%rsp)
movl $0x4, %edx
testb $0x3, 0xe(%rax)
jne 0x5b9aa
movl 0x8(%rax), %eax
subl %ecx, %eax
xorps %xmm4, %xmm4
cvtsi2ss %eax, %xmm4
cvtss2sd %xmm4, %xmm4
mulsd %xmm4, %xmm1
mulsd %xmm0, %xmm1
addsd %xmm2, %xmm1
cvtsd2ss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
ucomisd %xmm0, %xmm3
jbe 0x5b9aa
movsd %xmm0, 0x28(%rsp)
movsd %xmm0, 0x20(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rsi
movl %ebx, %ecx
callq 0x5114d
leaq 0x350b1e(%rip), %rax    # 0x3ac4e0
cmpb $0x1, (%rax)
jne 0x5b9e6
movzwl %bp, %eax
movl %eax, %ecx
andl $0x7, %ecx
leaq 0x48dca(%rip), %rdx     # 0xa47a0
movb (%rdx,%rcx), %cl
shrl $0x3, %eax
leaq 0x34fafd(%rip), %rdx    # 0x3ab4e0
orb %cl, (%rdx,%rax)
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq