// File: /workspace/github_c_makefile_star2_O3/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: polymost_dorotatesprite
void polymost_dorotatesprite (int sx, int sy, int z, short a, short picnum,
	signed char dashade, unsigned char dapalnum, unsigned char dastat, int cx1, int cy1, int cx2, int cy2, int uniqid)
{
	int n, nn, x, zz, xoff, yoff, xsiz, ysiz, method;
	int ogpicnum, ogshade, ogpal, oxdimen, oydimen;
	intptr_t ofoffset;
	double ogchang, ogshang, ogctang, ogstang, oghalfx, oghoriz, fx, fy, x1, y1, x2, y2;
	double ogrhalfxdown10, ogrhalfxdown10x;
	double d, cosang, sinang, cosang2, sinang2, px[8], py[8], px2[8], py2[8];

#if USE_OPENGL
	double z1;
	double ogxyaspect, ogfogdensity;
	int oldviewingrange;
	static int onumframes = 0;

	if (rendmode == 3 && usemodels && hudmem[(dastat&4)>>2][picnum].angadd)
	{
		if ((tile2model[picnum].modelid >= 0) && (tile2model[picnum].framenum >= 0))
		{
			spritetype tspr;
			memset(&tspr,0,sizeof(spritetype));

			if (hudmem[(dastat&4)>>2][picnum].flags&1) return; //"HIDE" is specified in DEF

			ogchang = gchang; gchang = 1.0;
			ogshang = gshang; gshang = 0.0; d = (double)z/(65536.0*16384.0);
			ogctang = gctang; gctang = (double)sintable[(a+512)&2047]*d;
			ogstang = gstang; gstang = (double)sintable[a&2047]*d;
			ogshade  = globalshade;  globalshade  = dashade;
			ogpal    = globalpal;    globalpal    = (int)((unsigned char)dapalnum);
			ogxyaspect = gxyaspect; gxyaspect = 1.0;
			ogfogdensity = gfogdensity; gfogdensity = 0.0;
			oldviewingrange = viewingrange; viewingrange = 65536;

			x1 = hudmem[(dastat&4)>>2][picnum].xadd;
			y1 = hudmem[(dastat&4)>>2][picnum].yadd;
			z1 = hudmem[(dastat&4)>>2][picnum].zadd;
			if (!(hudmem[(dastat&4)>>2][picnum].flags&2)) //"NOBOB" is specified in DEF
			{
				fx = ((double)sx)*(1.0/65536.0);
				fy = ((double)sy)*(1.0/65536.0);

				if (dastat&16)
				{
					xsiz = tilesizx[picnum]; ysiz = tilesizy[picnum];
					xoff = (int)((signed char)((picanm[picnum]>>8)&255))+(xsiz>>1);
					yoff = (int)((signed char)((picanm[picnum]>>16)&255))+(ysiz>>1);

					d = (double)z/(65536.0*16384.0);
					cosang2 = cosang = (double)sintable[(a+512)&2047]*d;
					sinang2 = sinang = (double)sintable[a&2047]*d;
					if ((dastat&2) || (!(dastat&8))) //Don't aspect unscaled perms
						{ d = (double)xyaspect/65536.0; cosang2 *= d; sinang2 *= d; }
					fx += -(double)xoff*cosang2+ (double)yoff*sinang2;
					fy += -(double)xoff*sinang - (double)yoff*cosang;
			}

				if (!(dastat&2))
			{
					x1 += fx/((double)(xdim<<15))-1.0; //-1: left of screen, +1: right of screen
					y1 += fy/((double)(ydim<<15))-1.0; //-1: top of screen, +1: bottom of screen
			}
			else
			{
					x1 += fx/160.0-1.0; //-1: left of screen, +1: right of screen
					y1 += fy/100.0-1.0; //-1: top of screen, +1: bottom of screen
			}
			}
			tspr.ang = hudmem[(dastat&4)>>2][picnum].angadd+globalang;
			tspr.xrepeat = tspr.yrepeat = 32;

			if (dastat&4) { x1 = -x1; y1 = -y1; }
			tspr.x = (int)(((double)gcosang*z1 - (double)gsinang*x1)*16384.0 + globalposx);
			tspr.y = (int)(((double)gsinang*z1 + (double)gcosang*x1)*16384.0 + globalposy);
			tspr.z = (int)(globalposz + y1*16384.0*0.8);
			tspr.picnum = picnum;
			tspr.shade = dashade;
			tspr.pal = dapalnum;
			tspr.owner = uniqid+MAXSPRITES;
			globalorientation = (dastat&1)+((dastat&32)<<4)+((dastat&4)<<1);

			if ((dastat&10) == 2) glfunc.glViewport(windowx1,yres-(windowy2+1),windowx2-windowx1+1,windowy2-windowy1+1);
			else { glfunc.glViewport(0,0,xdim,ydim); glox1 = -1; } //Force fullscreen (glox1=-1 forces it to restore)

			if (hudmem[(dastat&4)>>2][picnum].flags&8) //NODEPTH flag
				glfunc.glDisable(GL_DEPTH_TEST);
			else
			{
				glfunc.glEnable(GL_DEPTH_TEST);
				if (onumframes != numframes)
				{
					onumframes = numframes;
					glfunc.glClear(GL_DEPTH_BUFFER_BIT);
				}
			}

			mddraw(&tspr, !!((dastat&10) != 2));

			viewingrange = oldviewingrange;
			gfogdensity = ogfogdensity;
			gxyaspect = ogxyaspect;
			globalshade  = ogshade;
			globalpal    = ogpal;
			gchang = ogchang;
			gshang = ogshang;
			gctang = ogctang;
			gstang = ogstang;
			return;
		}
	}
#endif

	ogpicnum = globalpicnum; globalpicnum = picnum;
	ogshade  = globalshade;  globalshade  = dashade;
	ogpal    = globalpal;    globalpal    = (int)((unsigned char)dapalnum);
	oghalfx  = ghalfx;       ghalfx       = (double)(xdim>>1);
	ogrhalfxdown10 = grhalfxdown10;    grhalfxdown10 = 1.0/(((double)ghalfx)*1024);
	ogrhalfxdown10x = grhalfxdown10x;  grhalfxdown10x = grhalfxdown10;
	oghoriz  = ghoriz;       ghoriz       = (double)(ydim>>1);
	ofoffset = frameoffset;  frameoffset  = frameplace;
	oxdimen  = xdimen;       xdimen       = xdim;
	oydimen  = ydimen;       ydimen       = ydim;
	ogchang = gchang; gchang = 1.0;
	ogshang = gshang; gshang = 0.0;
	ogctang = gctang; gctang = 1.0;
	ogstang = gstang; gstang = 0.0;

#if USE_OPENGL
	if (rendmode == 3)
	{
		glfunc.glViewport(0,0,xdim,ydim); glox1 = -1; //Force fullscreen (glox1=-1 forces it to restore)
		glfunc.glDisable(GL_DEPTH_TEST);
	}
#endif

	method = METH_SOLID;
	if (!(dastat&64))
	{
		 method = METH_MASKED;
		 if (dastat&1) { if (!(dastat&32)) method = METH_TRANS; else method = METH_INTRANS; }
	}
	method |= METH_CLAMPED; //Use OpenGL clamping - dorotatesprite never repeats
	method |= METH_ROTATESPRITE;	//Use rotatesprite projection

	xsiz = tilesizx[globalpicnum]; ysiz = tilesizy[globalpicnum];
	if (dastat&16) { xoff = 0; yoff = 0; }
	else
	{
		xoff = (int)((signed char)((picanm[globalpicnum]>>8)&255))+(xsiz>>1);
		yoff = (int)((signed char)((picanm[globalpicnum]>>16)&255))+(ysiz>>1);
	}
	if (dastat&4) yoff = ysiz-yoff;

	if (dastat&2)  //Auto window size scaling
	{
		if (!(dastat&8))
		{
			if (widescreen) {
				x = ydimenscale;   //= scale(xdimen,yxaspect,320);
				sx = ((cx1+cx2+2)<<15)+scale(sx-(320<<15),oydimen<<16,200*pixelaspect);
			} else {
				x = xdimenscale;   //= scale(xdimen,yxaspect,320);
				sx = ((cx1+cx2+2)<<15)+scale(sx-(320<<15),oxdimen,320);
			}
			sy = ((cy1+cy2+2)<<15)+mulscale16(sy-(200<<15),x);
		}
		else
		{
				//If not clipping to startmosts, & auto-scaling on, as a
				//hard-coded bonus, scale to full screen instead
			if (widescreen) {
				x = scale(ydim<<16,yxaspect,200*pixelaspect);
				sx = (xdim<<15)+32768+scale(sx-(320<<15),ydim<<16,200*pixelaspect);
			} else {
				x = scale(xdim,yxaspect,320);
				sx = (xdim<<15)+32768+scale(sx-(320<<15),xdim,320);
			}
			sy = (ydim<<15)+32768+mulscale16(sy-(200<<15),x);
		}
		z = mulscale16(z,x);
	}

	d = (double)z/(65536.0*16384.0);
	cosang2 = cosang = (double)sintable[(a+512)&2047]*d;
	sinang2 = sinang = (double)sintable[a&2047]*d;
	if ((dastat&2) || (!(dastat&8))) //Don't aspect unscaled perms
		{ d = (double)xyaspect/65536.0; cosang2 *= d; sinang2 *= d; }
	px[0] = (double)sx/65536.0 - (double)xoff*cosang2+ (double)yoff*sinang2;
	py[0] = (double)sy/65536.0 - (double)xoff*sinang - (double)yoff*cosang;
	px[1] = px[0] + (double)xsiz*cosang2;
	py[1] = py[0] + (double)xsiz*sinang;
	px[3] = px[0] - (double)ysiz*sinang2;
	py[3] = py[0] + (double)ysiz*cosang;
	px[2] = px[1]+px[3]-px[0];
	py[2] = py[1]+py[3]-py[0];
	n = 4;

	gdx = 0; gdy = 0; gdo = 1.0;
		//px[0]*gux + py[0]*guy + guo = 0
		//px[1]*gux + py[1]*guy + guo = xsiz-.0001
		//px[3]*gux + py[3]*guy + guo = 0
	d = 1.0/(px[0]*(py[1]-py[3]) + px[1]*(py[3]-py[0]) + px[3]*(py[0]-py[1]));
	gux = (py[3]-py[0])*((double)xsiz-.0001)*d;
	guy = (px[0]-px[3])*((double)xsiz-.0001)*d;
	guo = 0 - px[0]*gux - py[0]*guy;

	if (!(dastat&4))
	{     //px[0]*gvx + py[0]*gvy + gvo = 0
			//px[1]*gvx + py[1]*gvy + gvo = 0
			//px[3]*gvx + py[3]*gvy + gvo = ysiz-.0001
		gvx = (py[0]-py[1])*((double)ysiz-.0001)*d;
		gvy = (px[1]-px[0])*((double)ysiz-.0001)*d;
		gvo = 0 - px[0]*gvx - py[0]*gvy;
	}
	else
	{     //px[0]*gvx + py[0]*gvy + gvo = ysiz-.0001
			//px[1]*gvx + py[1]*gvy + gvo = ysiz-.0001
			//px[3]*gvx + py[3]*gvy + gvo = 0
		gvx = (py[1]-py[0])*((double)ysiz-.0001)*d;
		gvy = (px[0]-px[1])*((double)ysiz-.0001)*d;
		gvo = (double)ysiz-.0001 - px[0]*gvx - py[0]*gvy;
	}

	cx2++; cy2++;
		//Clippoly4 (converted from int to double)
	nn = z = 0;
	do
	{
		zz = z+1; if (zz == n) zz = 0;
		x1 = px[z]; x2 = px[zz]-x1; if ((cx1 <= x1) && (x1 <= cx2)) { px2[nn] = x1; py2[nn] = py[z]; nn++; }
		if (x2 <= 0) fx = cx2; else fx = cx1;  d = fx-x1;
		if ((d < x2) != (d < 0)) { px2[nn] = fx; py2[nn] = (py[zz]-py[z])*d/x2 + py[z]; nn++; }
		if (x2 <= 0) fx = cx1; else fx = cx2;  d = fx-x1;
		if ((d < x2) != (d < 0)) { px2[nn] = fx; py2[nn] = (py[zz]-py[z])*d/x2 + py[z]; nn++; }
		z = zz;
	} while (z);
	if (nn >= 3)
	{
		n = z = 0;
		do
		{
			zz = z+1; if (zz == nn) zz = 0;
			y1 = py2[z]; y2 = py2[zz]-y1; if ((cy1 <= y1) && (y1 <= cy2)) { py[n] = y1; px[n] = px2[z]; n++; }
			if (y2 <= 0) fy = cy2; else fy = cy1;  d = fy-y1;
			if ((d < y2) != (d < 0)) { py[n] = fy; px[n] = (px2[zz]-px2[z])*d/y2 + px2[z]; n++; }
			if (y2 <= 0) fy = cy1; else fy = cy2;  d = fy-y1;
			if ((d < y2) != (d < 0)) { py[n] = fy; px[n] = (px2[zz]-px2[z])*d/y2 + px2[z]; n++; }
			z = zz;
		} while (z);
		drawpoly(px,py,n,method);
	}

	globalpicnum = ogpicnum;
	globalshade  = ogshade;
	globalpal    = ogpal;
	ghalfx       = oghalfx;
	grhalfxdown10 = ogrhalfxdown10;
	grhalfxdown10x = ogrhalfxdown10x;
	ghoriz       = oghoriz;
	frameoffset  = ofoffset;
	xdimen       = oxdimen;
	ydimen       = oydimen;
	gchang = ogchang;
	gshang = ogshang;
	gctang = ogctang;
	gstang = ogstang;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movl %ecx, 0x20(%rsp)
movl %edx, %r14d
movl %esi, %ebx
movl %edi, %r12d
movb 0x1d0(%rsp), %al
movl 0x59ef2e(%rip), %esi    # 0x5fa950
movzbl 0x1d8(%rsp), %r13d
cmpl $0x3, %esi
jne 0x5bc25
cmpl $0x0, 0x49ad5(%rip)     # 0xa5510
je 0x5bc25
movl %r13d, %ecx
andl $0x4, %ecx
movl %ecx, %edx
shrl $0x2, %edx
movswq %r8w, %rdi
movq %rdi, %r10
shlq $0x4, %r10
leaq (%rdx,%rdx,8), %rbp
shll $0xe, %ebp
addq 0x37553(%rip), %rbp     # 0x92fb8
movzwl 0xc(%r10,%rbp), %edx
testw %dx, %dx
je 0x5bc25
leaq (%rdi,%rdi,2), %r11
leaq 0x5ed5c1(%rip), %r15    # 0x649040
cmpl $0x0, (%r15,%r11,4)
js 0x5bc25
leaq (%r15,%r11,4), %r11
cmpl $0x0, 0x8(%r11)
js 0x5bc25
addq %r10, %rbp
pxor %xmm0, %xmm0
movdqu %xmm0, 0x6c(%rsp)
movdqu %xmm0, 0x5c(%rsp)
movzwl 0xe(%rbp), %esi
testb $0x1, %sil
jne 0x5c72b
movsd 0x59f05e(%rip), %xmm1   # 0x5fab20
movsd %xmm1, 0x18(%rsp)
movabsq $0x3ff0000000000000, %r10 # imm = 0x3FF0000000000000
movq %r10, 0x59f047(%rip)    # 0x5fab20
movsd 0x59f05f(%rip), %xmm1   # 0x5fab40
movsd %xmm1, 0x10(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %r14d, %xmm1
movq $0x0, 0x59f046(%rip) # 0x5fab40
mulsd 0x1ee36(%rip), %xmm1    # 0x7a938
movsd 0x59f01e(%rip), %xmm2   # 0x5fab28
movsd %xmm2, 0x40(%rsp)
movzwl 0x20(%rsp), %r11d
leal 0x200(%r11), %r14d
movl $0x7ff, %r15d           # imm = 0x7FF
andl %r15d, %r14d
leaq 0x373223(%rip), %r10    # 0x3ced50
movsd 0x59f013(%rip), %xmm2   # 0x5fab48
movsd %xmm2, 0x20(%rsp)
pinsrw $0x1, (%r10,%r14,2), %xmm0
andl %r15d, %r11d
pinsrw $0x3, (%r10,%r11,2), %xmm0
psrad $0x10, %xmm0
cvtdq2pd %xmm0, %xmm0
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm0, %xmm1
movlpd %xmm1, 0x59efc3(%rip)   # 0x5fab28
movhpd %xmm1, 0x59efdb(%rip)   # 0x5fab48
leaq 0x3b8cb8(%rip), %r11    # 0x41482c
movl (%r11), %r15d
movsbl %r9b, %r10d
movq %r11, %r14
movl %r10d, (%r11)
leaq 0x3b447c(%rip), %r11    # 0x410004
movl (%r11), %r10d
movl %r10d, 0xc(%rsp)
movzbl %al, %r10d
movl %r10d, (%r11)
movsd 0x5a3021(%rip), %xmm0   # 0x5febc0
movsd %xmm0, 0x38(%rsp)
movabsq $0x3ff0000000000000, %r10 # imm = 0x3FF0000000000000
movq %r10, 0x5a300a(%rip)    # 0x5febc0
movss 0x59edbe(%rip), %xmm0   # 0x5fa97c
movss %xmm0, 0x30(%rsp)
movl $0x0, 0x59edae(%rip)    # 0x5fa97c
leaq 0x37417b(%rip), %r10    # 0x3cfd50
movl (%r10), %r11d
movl %r11d, 0x28(%rsp)
movl $0x10000, (%r10)        # imm = 0x10000
cvtps2pd (%rbp), %xmm0
testb $0x2, %sil
jne 0x5c73d
movd %ebx, %xmm2
movd %r12d, %xmm3
punpckldq %xmm2, %xmm3    # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
cvtdq2pd %xmm3, %xmm2
mulpd 0x1eb65(%rip), %xmm2    # 0x7a770
movb 0x1d8(%rsp), %sil
testb $0x10, %sil
jne 0x5c745
movl %r15d, %r12d
jmp 0x5c7f2
leaq 0x3ac3c0(%rip), %rcx    # 0x407fec
movl (%rcx), %edx
movl %edx, %r10d
sarl %r10d
leaq 0x3ac3b5(%rip), %rcx    # 0x407ff0
movl (%rcx), %ecx
movl %ecx, %r11d
sarl %r11d
xorl %edi, %edi
leaq 0x3b43c4(%rip), %r15    # 0x410010
movzwl (%r15), %ebp
movw %bp, 0x40(%rsp)
movw %r8w, (%r15)
leaq 0x3b8bcc(%rip), %rbp    # 0x41482c
movl (%rbp), %r8d
movl %r8d, 0xc(%rsp)
movsbl %r9b, %r8d
movl %r8d, (%rbp)
leaq 0x3b438c(%rip), %r8     # 0x410004
movl (%r8), %r9d
movl %r9d, 0x38(%rsp)
movzbl %al, %eax
movl %eax, (%r8)
cvtsi2sd %r10d, %xmm0
movsd 0x59ee9d(%rip), %xmm1   # 0x5fab30
movsd %xmm1, 0x30(%rsp)
movsd %xmm0, 0x59ee8f(%rip)   # 0x5fab30
mulsd 0x1b437(%rip), %xmm0    # 0x770e0
movsd 0x59eef7(%rip), %xmm1   # 0x5faba8
movsd %xmm1, 0x28(%rsp)
movsd 0x19f00(%rip), %xmm12   # 0x75bc0
movapd %xmm12, %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x59eed7(%rip)   # 0x5faba8
movsd 0x59eec7(%rip), %xmm0   # 0x5faba0
movsd %xmm0, 0xc8(%rsp)
movsd %xmm1, 0x59eeb6(%rip)   # 0x5faba0
movsd 0x59ee46(%rip), %xmm0   # 0x5fab38
movsd %xmm0, 0xc0(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %r11d, %xmm0
movsd %xmm0, 0x59ee2d(%rip)   # 0x5fab38
leaq 0x37ba7e(%rip), %r8     # 0x3d7790
movq (%r8), %rax
movq %rax, 0xb8(%rsp)
leaq 0x12238c(%rip), %rax    # 0x17e0b0
movq (%rax), %rax
movq %rax, (%r8)
leaq 0x48aff(%rip), %rax     # 0xa4830
movsd 0x59ee07(%rip), %xmm0   # 0x5fab40
movsd %xmm0, 0xb0(%rsp)
movq %rdi, 0x59edf7(%rip)    # 0x5fab40
movsd 0x59edf7(%rip), %xmm0   # 0x5fab48
movsd %xmm0, 0xa8(%rsp)
movq %rdi, 0x59ede7(%rip)    # 0x5fab48
movl (%rax), %edi
movl %edi, 0x10(%rsp)
movl %edx, (%rax)
leaq 0x21fd24(%rip), %rax    # 0x27ba94
movl (%rax), %edi
movl %edi, 0x18(%rsp)
movl %ecx, (%rax)
movsd 0x59eda0(%rip), %xmm0   # 0x5fab20
movsd %xmm0, 0xa0(%rsp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x59ed86(%rip)    # 0x5fab20
movsd 0x59ed86(%rip), %xmm0   # 0x5fab28
movsd %xmm0, 0x98(%rsp)
movq %rax, 0x59ed76(%rip)    # 0x5fab28
cmpl $0x3, %esi
jne 0x5bdeb
movq %r15, %rbp
leaq 0x59e97f(%rip), %r15    # 0x5fa740
xorl %edi, %edi
xorl %esi, %esi
callq *0x80(%r15)
movl $0xbf800000, 0x59ebf2(%rip) # imm = 0xBF800000
movl $0xb71, %edi            # imm = 0xB71
callq *0x48(%r15)
movsd 0x19dd8(%rip), %xmm12   # 0x75bc0
movq %rbp, %r15
movl $0x24, %ecx
movb 0x1d8(%rsp), %r10b
testb $0x40, %r10b
jne 0x5be1a
movl $0x25, %ecx
testb $0x1, %r10b
je 0x5be1a
movl %r13d, %eax
andl $0x20, %eax
cmpl $0x1, %eax
movl $0x27, %ecx
sbbl $0x0, %ecx
movswq (%r15), %rax
leaq 0x3b41fb(%rip), %rdx    # 0x410020
leaq 0x3a59b4(%rip), %rsi    # 0x4017e0
movswl (%rsi,%rax,2), %r8d
movswl (%rdx,%rax,2), %ebp
testb $0x10, %r10b
jne 0x5be69
leaq 0x1dec1e(%rip), %rdx    # 0x23aa60
movl (%rdx,%rax,4), %eax
movl %eax, %edx
shrl $0x8, %edx
movsbl %dl, %edx
movl %ebp, %esi
sarl %esi
addl %edx, %esi
shrl $0x10, %eax
movsbl %al, %edx
movl %r8d, %eax
sarl %eax
addl %edx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
jmp 0x5be6f
xorpd %xmm0, %xmm0
xorl %eax, %eax
movl 0x1f0(%rsp), %r9d
movl 0x1e0(%rsp), %edx
movl %r8d, %r11d
subl %eax, %r11d
testb $0x4, %r10b
cmovel %eax, %r11d
testb $0x2, %r10b
je 0x5c07f
leaq 0x3badd3(%rip), %rax    # 0x416c70
movl (%rax), %eax
testb $0x8, %r10b
jne 0x5bef5
leal (%r9,%rdx), %r15d
shll $0xf, %r15d
addl $0x10000, %r15d         # imm = 0x10000
addl $0xff600000, %r12d      # imm = 0xFF600000
testl %eax, %eax
je 0x5bf6a
movl 0x18(%rsp), %eax
shll $0x10, %eax
leaq 0x3bada7(%rip), %rdx    # 0x416c78
movslq (%rdx), %rdx
imulq $0xc8, %rdx, %rsi
movslq %r12d, %rdx
cltq
imulq %rdx, %rax
cqto
idivq %rsi
leaq 0x3da6b0(%rip), %rdx    # 0x4365a0
jmp 0x5bf98
movl %ecx, 0x4c(%rsp)
testl %eax, %eax
je 0x5bfd0
leaq 0x3ac0e8(%rip), %rax    # 0x407ff0
movl (%rax), %r10d
movl %r10d, %edx
shll $0x10, %edx
leaq 0x3ac0d0(%rip), %rax    # 0x407fe8
movslq (%rax), %rax
leaq 0x3bad56(%rip), %rsi    # 0x416c78
movslq (%rsi), %rsi
imulq $0xc8, %rsi, %r15
movslq %edx, %rdi
imulq %rdi, %rax
cqto
idivq %r15
movq %rax, %rsi
leaq 0x3ac0aa(%rip), %rax    # 0x407fec
movl (%rax), %ecx
shll $0xf, %ecx
addl $0xff600000, %r12d      # imm = 0xFF600000
movslq %r12d, %rax
imulq %rdi, %rax
cqto
idivq %r15
leal (%rcx,%rax), %r15d
addl $0x8000, %r15d          # imm = 0x8000
jmp 0x5c03c
movslq 0x10(%rsp), %rdx
movslq %r12d, %rax
imulq %rdx, %rax
movabsq $0x6666666666666667, %rdx # imm = 0x6666666666666667
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rdx
sarq $0x7, %rax
addq %rdx, %rax
leaq 0x21fb00(%rip), %rdx    # 0x27ba98
addl %eax, %r15d
movslq (%rdx), %rax
movl 0x1f8(%rsp), %edx
movl 0x1e8(%rsp), %esi
addl %esi, %edx
shll $0xf, %edx
addl $0xff9c0000, %ebx       # imm = 0xFF9C0000
movslq %ebx, %rsi
imulq %rax, %rsi
shrq $0x10, %rsi
leal (%rdx,%rsi), %ebx
addl $0x10000, %ebx          # imm = 0x10000
jmp 0x5c06a
leaq 0x3ac015(%rip), %rax    # 0x407fec
movslq (%rax), %rcx
leaq 0x3ac007(%rip), %rax    # 0x407fe8
movslq (%rax), %rax
imulq %rcx, %rax
movabsq $0x6666666666666667, %rdi # imm = 0x6666666666666667
imulq %rdi
movq %rdx, %rsi
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rsi
addq %rax, %rsi
addl $0xff600000, %r12d      # imm = 0xFF600000
movslq %r12d, %rax
imulq %rcx, %rax
imulq %rdi
shll $0xf, %ecx
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x7, %rdx
addl %eax, %edx
leal (%rcx,%rdx), %r15d
addl $0x8000, %r15d          # imm = 0x8000
leaq 0x3abfb7(%rip), %rax    # 0x407ff0
movl (%rax), %r10d
shll $0xf, %r10d
addl $0xff9c0000, %ebx       # imm = 0xFF9C0000
movslq %ebx, %rcx
movslq %esi, %rax
imulq %rax, %rcx
shrq $0x10, %rcx
leal (%r10,%rcx), %ebx
addl $0x8000, %ebx           # imm = 0x8000
movl 0x4c(%rsp), %ecx
movb 0x1d8(%rsp), %r10b
movslq %r14d, %r14
imulq %rax, %r14
shrq $0x10, %r14
movl %r15d, %r12d
leaq 0x3b3f91(%rip), %r15    # 0x410010
cvtsi2sd %r14d, %xmm2
mulsd 0x1e8ac(%rip), %xmm2    # 0x7a938
movzwl 0x20(%rsp), %eax
leal 0x200(%rax), %edi
movl $0x7ff, %edx            # imm = 0x7FF
andl %edx, %edi
leaq 0x372cab(%rip), %rsi    # 0x3ced50
movswl (%rsi,%rdi,2), %edi
cvtsi2sd %edi, %xmm3
mulsd %xmm2, %xmm3
andl %edx, %eax
movswl (%rsi,%rax,2), %eax
cvtsi2sd %eax, %xmm1
mulsd %xmm2, %xmm1
andl $0xa, %r13d
movapd %xmm3, %xmm2
movapd %xmm1, %xmm8
cmpl $0x8, %r13d
je 0x5c0f9
leaq 0x3017df(%rip), %rax    # 0x35d8b8
xorps %xmm8, %xmm8
cvtsi2sdl (%rax), %xmm8
mulsd 0x18f95(%rip), %xmm8    # 0x75080
movapd %xmm3, %xmm2
mulsd %xmm8, %xmm2
mulsd %xmm1, %xmm8
xorl %eax, %eax
cvtsi2sd %r12d, %xmm5
movsd 0x18f78(%rip), %xmm6    # 0x75080
mulsd %xmm6, %xmm5
cvtsi2sd %r11d, %xmm7
cvtsi2sd %ebx, %xmm9
cvtsi2sd %ebp, %xmm4
mulsd %xmm6, %xmm9
movapd %xmm4, %xmm10
unpcklpd %xmm7, %xmm10           # xmm10 = xmm10[0],xmm7[0]
unpcklpd %xmm0, %xmm7            # xmm7 = xmm7[0],xmm0[0]
movapd 0x1befb(%rip), %xmm0    # 0x78030
movapd %xmm3, %xmm11
unpcklpd %xmm2, %xmm11           # xmm11 = xmm11[0],xmm2[0]
mulpd %xmm7, %xmm11
xorpd %xmm0, %xmm7
pshufd $0xee, %xmm7, %xmm6     # xmm6 = xmm7[2,3,2,3]
mulsd %xmm1, %xmm6
addsd %xmm9, %xmm6
unpcklpd %xmm5, %xmm6            # xmm6 = xmm6[0],xmm5[0]
subpd %xmm11, %xmm6
unpcklpd %xmm8, %xmm1            # xmm1 = xmm1[0],xmm8[0]
mulpd %xmm10, %xmm1
addpd %xmm6, %xmm1
movapd %xmm1, %xmm7
unpckhpd %xmm1, %xmm7            # xmm7 = xmm7[1],xmm1[1]
movhpd %xmm1, 0x50(%rsp)
movapd %xmm6, %xmm5
unpcklpd %xmm1, %xmm5            # xmm5 = xmm5[0],xmm1[0]
movapd %xmm5, 0xd0(%rsp)
mulsd %xmm4, %xmm2
addsd %xmm7, %xmm2
xorps %xmm5, %xmm5
cvtsi2sd %r8d, %xmm5
movsd %xmm2, 0x58(%rsp)
mulsd %xmm5, %xmm8
movapd %xmm7, %xmm10
subsd %xmm8, %xmm10
movsd %xmm10, 0x68(%rsp)
mulsd %xmm5, %xmm3
addsd %xmm6, %xmm3
movsd %xmm3, 0xe8(%rsp)
movapd %xmm2, %xmm8
addsd %xmm10, %xmm8
subsd %xmm7, %xmm8
movsd %xmm8, 0x60(%rsp)
movapd %xmm1, %xmm8
addsd %xmm3, %xmm8
subsd %xmm6, %xmm8
movsd %xmm8, 0xe0(%rsp)
movq %rax, 0x59e951(%rip)    # 0x5fab50
movq %rax, 0x59e952(%rip)    # 0x5fab58
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x59e949(%rip)    # 0x5fab60
movapd %xmm1, %xmm8
subsd %xmm3, %xmm8
subsd %xmm6, %xmm3
movapd %xmm3, %xmm9
mulsd %xmm2, %xmm9
mulsd %xmm7, %xmm8
addsd %xmm9, %xmm8
movapd %xmm6, %xmm9
subpd %xmm1, %xmm9
movapd %xmm7, %xmm11
subsd %xmm10, %xmm11
mulsd %xmm9, %xmm10
addsd %xmm8, %xmm10
divsd %xmm10, %xmm12
addsd 0x1e6e4(%rip), %xmm4    # 0x7a948
mulsd %xmm4, %xmm3
mulsd %xmm12, %xmm3
movsd %xmm3, 0x59e8f3(%rip)   # 0x5fab68
mulsd %xmm11, %xmm4
mulsd %xmm12, %xmm4
movsd %xmm4, 0x59e8e9(%rip)   # 0x5fab70
movapd %xmm7, %xmm8
xorpd %xmm0, %xmm8
mulsd %xmm7, %xmm3
xorpd %xmm10, %xmm10
xorpd %xmm11, %xmm11
subsd %xmm3, %xmm11
xorpd %xmm6, %xmm0
mulsd %xmm6, %xmm4
subsd %xmm4, %xmm11
movsd %xmm11, 0x59e8be(%rip)  # 0x5fab78
testb $0x4, %r10b
movl 0x1e0(%rsp), %eax
jne 0x5c2f7
addsd 0x1e679(%rip), %xmm5    # 0x7a948
subsd %xmm7, %xmm2
unpcklpd %xmm5, %xmm5            # xmm5 = xmm5[0,0]
unpcklpd %xmm2, %xmm9            # xmm9 = xmm9[0],xmm2[0]
mulpd %xmm5, %xmm9
unpcklpd %xmm12, %xmm12          # xmm12 = xmm12[0,0]
mulpd %xmm9, %xmm12
mulsd %xmm12, %xmm8
addsd %xmm10, %xmm8
jmp 0x5c327
unpcklpd %xmm2, %xmm6            # xmm6 = xmm6[0],xmm2[0]
addsd 0x1e645(%rip), %xmm5    # 0x7a948
subpd %xmm6, %xmm1
movapd %xmm5, %xmm2
unpcklpd %xmm5, %xmm2            # xmm2 = xmm2[0],xmm5[0]
mulpd %xmm1, %xmm2
unpcklpd %xmm12, %xmm12          # xmm12 = xmm12[0,0]
mulpd %xmm2, %xmm12
mulsd %xmm12, %xmm8
addsd %xmm5, %xmm8
movapd %xmm12, %xmm1
unpckhpd %xmm12, %xmm1           # xmm1 = xmm1[1],xmm12[1]
mulsd %xmm1, %xmm0
addsd %xmm8, %xmm0
movlpd %xmm12, 0x59e83d(%rip)  # 0x5fab80
movhpd %xmm12, 0x59e83c(%rip)  # 0x5fab88
incl %r9d
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
xorps %xmm2, %xmm2
cvtsi2sd %r9d, %xmm2
movsd %xmm0, 0x59e82a(%rip)   # 0x5fab90
xorl %eax, %eax
movl $0x1, %edx
xorpd %xmm0, %xmm0
cmpq $0x4, %rdx
movsd 0x48(%rsp,%rdx,8), %xmm3
movl $0x0, %esi
cmovneq %rdx, %rsi
ucomisd %xmm1, %xmm3
jb 0x5c3af
ucomisd %xmm3, %xmm2
jb 0x5c3af
cltq
movsd %xmm3, 0x110(%rsp,%rax,8)
movsd 0xc8(%rsp,%rdx,8), %xmm4
movsd %xmm4, 0x150(%rsp,%rax,8)
incl %eax
movsd 0x50(%rsp,%rsi,8), %xmm4
subsd %xmm3, %xmm4
movapd %xmm4, %xmm5
cmplesd %xmm0, %xmm5
movapd %xmm5, %xmm6
andpd %xmm2, %xmm6
movapd %xmm5, %xmm7
andnpd %xmm1, %xmm7
orpd %xmm6, %xmm7
movapd %xmm7, %xmm6
subsd %xmm3, %xmm6
movapd %xmm6, %xmm8
cmpnltpd %xmm0, %xmm8
movapd %xmm6, %xmm9
cmpltpd %xmm4, %xmm9
xorpd %xmm8, %xmm9
movd %xmm9, %edi
testb $0x1, %dil
jne 0x5c43f
cltq
movsd %xmm7, 0x110(%rsp,%rax,8)
movsd 0xd0(%rsp,%rsi,8), %xmm7
movsd 0xc8(%rsp,%rdx,8), %xmm8
subsd %xmm8, %xmm7
mulsd %xmm7, %xmm6
divsd %xmm4, %xmm6
addsd %xmm8, %xmm6
movsd %xmm6, 0x150(%rsp,%rax,8)
incl %eax
movapd %xmm5, %xmm6
andpd %xmm1, %xmm6
andnpd %xmm2, %xmm5
orpd %xmm6, %xmm5
movapd %xmm5, %xmm6
subsd %xmm3, %xmm6
movapd %xmm6, %xmm3
cmpnltpd %xmm0, %xmm3
movapd %xmm6, %xmm7
cmpltpd %xmm4, %xmm7
xorpd %xmm3, %xmm7
movd %xmm7, %edi
testb $0x1, %dil
jne 0x5c4af
cltq
movsd %xmm5, 0x110(%rsp,%rax,8)
movsd 0xd0(%rsp,%rsi,8), %xmm3
movsd 0xc8(%rsp,%rdx,8), %xmm5
subsd %xmm5, %xmm3
mulsd %xmm3, %xmm6
divsd %xmm4, %xmm6
addsd %xmm5, %xmm6
movsd %xmm6, 0x150(%rsp,%rax,8)
incl %eax
incq %rdx
cmpq $0x5, %rdx
jne 0x5c371
cmpl $0x3, %eax
jl 0x5c65a
movl 0x1e8(%rsp), %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
movl 0x1f8(%rsp), %edx
incl %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
movl %eax, %eax
negq %rax
xorl %edx, %edx
movl $0x1, %esi
xorpd %xmm2, %xmm2
movq %rax, %rdi
addq %rsi, %rdi
movsd 0x148(%rsp,%rsi,8), %xmm3
movl $0x0, %edi
cmovneq %rsi, %rdi
ucomisd %xmm0, %xmm3
jb 0x5c534
ucomisd %xmm3, %xmm1
jb 0x5c534
movslq %edx, %rdx
movsd %xmm3, 0xd0(%rsp,%rdx,8)
movsd 0x108(%rsp,%rsi,8), %xmm4
movsd %xmm4, 0x50(%rsp,%rdx,8)
incl %edx
movsd 0x150(%rsp,%rdi,8), %xmm4
subsd %xmm3, %xmm4
movapd %xmm4, %xmm5
cmplesd %xmm2, %xmm5
movapd %xmm5, %xmm6
andpd %xmm1, %xmm6
movapd %xmm5, %xmm7
andnpd %xmm0, %xmm7
orpd %xmm6, %xmm7
movapd %xmm7, %xmm6
subsd %xmm3, %xmm6
movapd %xmm6, %xmm8
cmpnltpd %xmm2, %xmm8
movapd %xmm6, %xmm9
cmpltpd %xmm4, %xmm9
xorpd %xmm8, %xmm9
movd %xmm9, %r8d
testb $0x1, %r8b
jne 0x5c5c5
movslq %edx, %rdx
movsd %xmm7, 0xd0(%rsp,%rdx,8)
movsd 0x110(%rsp,%rdi,8), %xmm7
movsd 0x108(%rsp,%rsi,8), %xmm8
subsd %xmm8, %xmm7
mulsd %xmm7, %xmm6
divsd %xmm4, %xmm6
addsd %xmm8, %xmm6
movsd %xmm6, 0x50(%rsp,%rdx,8)
incl %edx
movapd %xmm5, %xmm6
andpd %xmm0, %xmm6
andnpd %xmm1, %xmm5
orpd %xmm6, %xmm5
movapd %xmm5, %xmm6
subsd %xmm3, %xmm6
movapd %xmm6, %xmm3
cmpnltpd %xmm2, %xmm3
movapd %xmm6, %xmm7
cmpltpd %xmm4, %xmm7
xorpd %xmm3, %xmm7
movd %xmm7, %r8d
testb $0x1, %r8b
jne 0x5c634
movslq %edx, %rdx
movsd %xmm5, 0xd0(%rsp,%rdx,8)
movsd 0x110(%rsp,%rdi,8), %xmm3
movsd 0x108(%rsp,%rsi,8), %xmm5
subsd %xmm5, %xmm3
mulsd %xmm3, %xmm6
divsd %xmm4, %xmm6
addsd %xmm5, %xmm6
movsd %xmm6, 0x50(%rsp,%rdx,8)
incl %edx
leaq (%rax,%rsi), %rdi
incq %rdi
incq %rsi
cmpq $0x1, %rdi
jne 0x5c4f3
leaq 0x50(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x5114d
movzwl 0x40(%rsp), %eax
movw %ax, (%r15)
leaq 0x3b81c2(%rip), %rax    # 0x41482c
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
leaq 0x3b398d(%rip), %rax    # 0x410004
movl 0x38(%rsp), %ecx
movl %ecx, (%rax)
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x59e4a5(%rip)   # 0x5fab30
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x59e50f(%rip)   # 0x5faba8
movsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0x59e4f6(%rip)   # 0x5faba0
movsd 0xc0(%rsp), %xmm0
movsd %xmm0, 0x59e47d(%rip)   # 0x5fab38
leaq 0x37b0ce(%rip), %rax    # 0x3d7790
movq 0xb8(%rsp), %rcx
movq %rcx, (%rax)
leaq 0x4815c(%rip), %rax     # 0xa4830
movl 0x10(%rsp), %ecx
movl %ecx, (%rax)
leaq 0x21f3b3(%rip), %rax    # 0x27ba94
movl 0x18(%rsp), %ecx
movl %ecx, (%rax)
movsd 0xa0(%rsp), %xmm0
movsd %xmm0, 0x59e428(%rip)   # 0x5fab20
movsd 0xb0(%rsp), %xmm0
movsd %xmm0, 0x59e437(%rip)   # 0x5fab40
movsd 0x98(%rsp), %xmm0
movsd %xmm0, 0x59e40e(%rip)   # 0x5fab28
movq 0xa8(%rsp), %xmm0
movq %xmm0, 0x59e41d(%rip)   # 0x5fab48
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r15d, %r12d
jmp 0x5c835
leaq 0x3b38d4(%rip), %rsi    # 0x410020
movswl (%rsi,%rdi,2), %esi
leaq 0x3a5089(%rip), %r10    # 0x4017e0
movswl (%r10,%rdi,2), %r10d
leaq 0x1de2fd(%rip), %r11    # 0x23aa60
movl (%r11,%rdi,4), %edi
movl %edi, %r11d
shrl $0x8, %r11d
movsbl %r11b, %r11d
sarl %esi
addl %r11d, %esi
shrl $0x10, %edi
movsbl %dil, %edi
sarl %r10d
addl %edi, %r10d
movl %r13d, %edi
andl $0xa, %edi
movapd %xmm1, %xmm3
cmpl $0x8, %edi
movl %r15d, %r12d
je 0x5c7b4
leaq 0x30111b(%rip), %rdi    # 0x35d8b8
xorps %xmm3, %xmm3
cvtsi2sdl (%rdi), %xmm3
mulsd 0x188d4(%rip), %xmm3    # 0x75080
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
mulpd %xmm1, %xmm3
cvtsi2sd %esi, %xmm4
cvtsi2sd %r10d, %xmm5
movapd 0x1b86b(%rip), %xmm6    # 0x78030
xorpd %xmm1, %xmm6
movsd %xmm3, %xmm1            # xmm1 = xmm3[0],xmm1[1]
shufpd $0x1, %xmm6, %xmm3      # xmm3 = xmm3[1],xmm6[0]
unpcklpd %xmm5, %xmm5            # xmm5 = xmm5[0,0]
mulpd %xmm3, %xmm5
unpcklpd %xmm4, %xmm4            # xmm4 = xmm4[0,0]
mulpd %xmm1, %xmm4
subpd %xmm4, %xmm5
addpd %xmm5, %xmm2
movb 0x1d8(%rsp), %sil
testb $0x2, %sil
jne 0x5c821
leaq 0x3ab7ed(%rip), %rsi    # 0x407fec
leaq 0x3ab7ea(%rip), %rdi    # 0x407ff0
movd (%rdi), %xmm1
movd (%rsi), %xmm3
punpckldq %xmm1, %xmm3    # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
pslld $0xf, %xmm3
cvtdq2pd %xmm3, %xmm1
divpd %xmm1, %xmm2
jmp 0x5c829
divpd 0x1df57(%rip), %xmm2    # 0x7a780
addpd 0x1de5f(%rip), %xmm2    # 0x7a690
addpd %xmm2, %xmm0
movl 0x200(%rsp), %esi
xorps %xmm2, %xmm2
cvtss2sd 0x8(%rbp), %xmm2
leaq 0x3724e5(%rip), %rdi    # 0x3ced30
addw (%rdi), %dx
movw %dx, 0x6c(%rsp)
movw $0x2020, 0x64(%rsp)     # imm = 0x2020
movapd 0x1b7ce(%rip), %xmm3    # 0x78030
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
testl %ecx, %ecx
je 0x5c876
xorpd %xmm3, %xmm0
xorpd %xmm3, %xmm1
movsd 0x59e142(%rip), %xmm4   # 0x5fa9c0
xorpd %xmm4, %xmm3
leaq 0x1de1c7(%rip), %rdx    # 0x23aa50
leaq 0x1de1c4(%rip), %rdi    # 0x23aa54
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movsd 0x59e114(%rip), %xmm5   # 0x5fa9b0
unpcklpd %xmm5, %xmm3            # xmm3 = xmm3[0],xmm5[0]
mulpd %xmm0, %xmm3
unpcklpd %xmm4, %xmm5            # xmm5 = xmm5[0],xmm4[0]
movlhps %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm5, %xmm2
addpd %xmm3, %xmm2
movss (%rdi), %xmm0
movss (%rdx), %xmm3
unpcklps %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
cvtdq2pd %xmm3, %xmm0
mulpd 0x1dec6(%rip), %xmm2    # 0x7a790
addpd %xmm0, %xmm2
cvttpd2dq %xmm2, %xmm0
movlpd %xmm0, 0x50(%rsp)
leaq 0x20f181(%rip), %rdx    # 0x26ba60
xorps %xmm0, %xmm0
cvtsi2sdl (%rdx), %xmm0
mulsd 0x1a7d2(%rip), %xmm1    # 0x770c0
mulsd 0x1e04a(%rip), %xmm1    # 0x7a940
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %edx
movl %edx, 0x58(%rsp)
movw %r8w, 0x5e(%rsp)
movb %r9b, 0x60(%rsp)
movb %al, 0x61(%rsp)
addl $0x4000, %esi           # imm = 0x4000
movw %si, 0x6e(%rsp)
movl %r13d, %eax
shll $0x4, %eax
orl %r13d, %eax
andl $0x201, %eax            # imm = 0x201
leal (%rax,%rcx,2), %eax
leaq 0x3b36cc(%rip), %rcx    # 0x410000
movl %eax, (%rcx)
andl $0xa, %r13d
leaq 0x59ddff(%rip), %rbx    # 0x5fa740
movq 0x80(%rbx), %rax
cmpl $0x2, %r13d
jne 0x5c98a
leaq 0x37541b(%rip), %rcx    # 0x3d1d70
movl (%rcx), %edi
leaq 0x476d6(%rip), %rdx     # 0xa4034
leaq 0x3ab67f(%rip), %rcx    # 0x407fe4
movl (%rcx), %ecx
movl %ecx, %esi
notl %esi
addl (%rdx), %esi
leaq 0x3ab66c(%rip), %rdx    # 0x407fe0
movl (%rdx), %edx
subl %edi, %edx
incl %edx
leaq 0x3771ff(%rip), %r8     # 0x3d3b80
subl (%r8), %ecx
incl %ecx
callq *%rax
jmp 0x5c9ac
leaq 0x3ab65b(%rip), %rcx    # 0x407fec
movl (%rcx), %edx
leaq 0x3ab656(%rip), %rcx    # 0x407ff0
movl (%rcx), %ecx
xorl %edi, %edi
xorl %esi, %esi
callq *%rax
movl $0xbf800000, 0x59e01c(%rip) # imm = 0xBF800000
testb $0x8, 0xe(%rbp)
jne 0x5c9dc
movl $0xb71, %edi            # imm = 0xB71
callq *0x40(%rbx)
leaq 0x3c64cb(%rip), %rax    # 0x422e8c
movl (%rax), %eax
cmpl %eax, 0x5a220f(%rip)    # 0x5febd8
je 0x5c9e7
movl %eax, 0x5a2207(%rip)    # 0x5febd8
addq $0x8, %rbx
movl $0x100, %edi            # imm = 0x100
jmp 0x5c9e5
addq $0x48, %rbx
movl $0xb71, %edi            # imm = 0xB71
callq *(%rbx)
xorl %esi, %esi
cmpl $0x2, %r13d
setne %sil
leaq 0x50(%rsp), %rdi
callq 0x638e3
leaq 0x37334e(%rip), %rax    # 0x3cfd50
movl 0x28(%rsp), %ecx
movl %ecx, (%rax)
movss 0x30(%rsp), %xmm0
movss %xmm0, 0x59df66(%rip)   # 0x5fa97c
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x5a219c(%rip)   # 0x5febc0
movl %r12d, (%r14)
leaq 0x3b35d6(%rip), %rax    # 0x410004
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x59e0de(%rip)   # 0x5fab20
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x59e0f0(%rip)   # 0x5fab40
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x59e0ca(%rip)   # 0x5fab28
movq 0x20(%rsp), %xmm0
jmp 0x5c723