// File: /workspace/github_c_makefile_star2_O2/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, 0x18(%rsp)
movl %edx, %r14d
movl %esi, %ebx
movl 0x5a2229(%rip), %r10d   # 0x5f3950
movzbl 0x1d8(%rsp), %r13d
movsbl %r9b, %r11d
movzbl 0x1d0(%rsp), %r12d
cmpl $0x3, %r10d
jne 0x5191f
cmpl $0x0, 0x4cdc2(%rip)     # 0x9e510
je 0x5191f
movl %r13d, %ecx
andl $0x4, %ecx
movl %ecx, %eax
shrl $0x2, %eax
movswq %r8w, %rsi
movq %rsi, %r15
shlq $0x4, %r15
imulq $0x24000, %rax, %rbp    # imm = 0x24000
addq 0x3a828(%rip), %rbp     # 0x8bfa0
movzwl 0xc(%r15,%rbp), %eax
movw %ax, 0x8(%rsp)
testw %ax, %ax
je 0x5191f
imulq $0xc, %rsi, %rdx
leaq 0x5f08a9(%rip), %rax    # 0x642040
cmpl $0x0, (%rax,%rdx)
js 0x5191f
addq %rdx, %rax
cmpl $0x0, 0x8(%rax)
js 0x5191f
addq %r15, %rbp
pxor %xmm0, %xmm0
movdqu %xmm0, 0x6c(%rsp)
movdqu %xmm0, 0x5c(%rsp)
movzwl 0xe(%rbp), %r10d
testb $0x1, %r10b
jne 0x523d1
movsd 0x5a2368(%rip), %xmm1   # 0x5f3b40
movsd %xmm1, 0x10(%rsp)
andq $0x0, 0x5a235a(%rip)    # 0x5f3b40
movsd 0x5a2332(%rip), %xmm1   # 0x5f3b20
movsd %xmm1, 0x40(%rsp)
cvtsi2sd %r14d, %xmm1
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x5a2316(%rip)    # 0x5f3b20
mulsd 0x1de66(%rip), %xmm1    # 0x6f678
movsd 0x5a230e(%rip), %xmm2   # 0x5f3b28
movsd %xmm2, 0x38(%rsp)
movzwl 0x18(%rsp), %eax
leal 0x200(%rax), %edx
movl $0x7ff, %r14d           # imm = 0x7FF
andl %r14d, %edx
leaq 0x376515(%rip), %r15    # 0x3c7d50
movsd 0x5a2305(%rip), %xmm2   # 0x5f3b48
movsd %xmm2, 0x18(%rsp)
pinsrw $0x1, (%r15,%rdx,2), %xmm0
andl %r14d, %eax
pinsrw $0x3, (%r15,%rax,2), %xmm0
psrad $0x10, %xmm0
cvtdq2pd %xmm0, %xmm0
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
mulpd %xmm0, %xmm1
movlpd %xmm1, 0x5a22b5(%rip)   # 0x5f3b28
movhpd %xmm1, 0x5a22cd(%rip)   # 0x5f3b48
leaq 0x3bbfaa(%rip), %rax    # 0x40d82c
movl (%rax), %r15d
movq %rax, %r14
movl %r11d, (%rax)
leaq 0x3b7772(%rip), %rax    # 0x409004
movl (%rax), %edx
movl %edx, 0xc(%rsp)
movl %r12d, (%rax)
movss 0x5a20d9(%rip), %xmm0   # 0x5f397c
movss %xmm0, 0x30(%rsp)
andl $0x0, 0x5a20cc(%rip)    # 0x5f397c
movsd 0x5a6308(%rip), %xmm0   # 0x5f7bc0
movsd %xmm0, 0x28(%rsp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x5a62f1(%rip)    # 0x5f7bc0
leaq 0x37747a(%rip), %rax    # 0x3c8d50
movl (%rax), %edx
movl %edx, 0x20(%rsp)
movl $0x10000, (%rax)        # imm = 0x10000
cvtps2pd (%rbp), %xmm0
testb $0x2, %r10b
jne 0x523e3
movd %ebx, %xmm2
movd %edi, %xmm3
punpckldq %xmm2, %xmm3    # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
cvtdq2pd %xmm3, %xmm2
mulpd 0x1dba8(%rip), %xmm2    # 0x6f4b0
movb 0x1d8(%rsp), %al
testb $0x10, %al
jne 0x523f3
movl %r15d, %r12d
jmp 0x52496
leaq 0x3b76ea(%rip), %r15    # 0x409010
movzwl (%r15), %eax
movw %ax, 0x40(%rsp)
movw %r8w, (%r15)
leaq 0x3bbef2(%rip), %rax    # 0x40d82c
movl (%rax), %ecx
movl %ecx, 0x38(%rsp)
movl %r11d, (%rax)
leaq 0x3b76ba(%rip), %rax    # 0x409004
movl (%rax), %ecx
movl %ecx, 0xc(%rsp)
movl %r12d, (%rax)
movsd 0x5a21d5(%rip), %xmm0   # 0x5f3b30
movsd %xmm0, 0x30(%rsp)
leaq 0x3af684(%rip), %rax    # 0x400fec
movl (%rax), %edx
movl %edx, %eax
sarl %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x5a21b6(%rip)   # 0x5f3b30
movsd 0x5a2226(%rip), %xmm1   # 0x5f3ba8
movsd %xmm1, 0x28(%rsp)
mulsd 0x1a5f8(%rip), %xmm0    # 0x6bf88
movsd 0x19167(%rip), %xmm12   # 0x6ab00
movapd %xmm12, %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x5a21fe(%rip)   # 0x5f3ba8
movsd 0x5a21ee(%rip), %xmm0   # 0x5f3ba0
movsd %xmm0, 0x20(%rsp)
movsd %xmm1, 0x5a21e0(%rip)   # 0x5f3ba0
movsd 0x5a2170(%rip), %xmm0   # 0x5f3b38
movsd %xmm0, 0xc8(%rsp)
leaq 0x3af618(%rip), %r12    # 0x400ff0
movl (%r12), %ecx
movl %ecx, %eax
sarl %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x5a214c(%rip)   # 0x5f3b38
leaq 0x37ed9d(%rip), %rsi    # 0x3d0790
movq (%rsi), %rax
movq %rax, 0xc0(%rsp)
leaq 0x1256ab(%rip), %rax    # 0x1770b0
movq (%rax), %rax
movq %rax, (%rsi)
leaq 0x4be1e(%rip), %rax     # 0x9d830
movl (%rax), %esi
movl %esi, 0x10(%rsp)
movl %edx, (%rax)
leaq 0x223073(%rip), %rax    # 0x274a94
movl (%rax), %esi
movl %esi, 0x8(%rsp)
movl %ecx, (%rax)
movsd 0x5a210f(%rip), %xmm0   # 0x5f3b40
movsd %xmm0, 0xb8(%rsp)
andq $0x0, 0x5a20fe(%rip)    # 0x5f3b40
movsd 0x5a20fe(%rip), %xmm0   # 0x5f3b48
movsd %xmm0, 0xb0(%rsp)
andq $0x0, 0x5a20ed(%rip)    # 0x5f3b48
movsd 0x5a20bd(%rip), %xmm0   # 0x5f3b20
movsd %xmm0, 0xa8(%rsp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x5a20a3(%rip)    # 0x5f3b20
movsd 0x5a20a3(%rip), %xmm0   # 0x5f3b28
movsd %xmm0, 0xa0(%rsp)
movq %rax, 0x5a2093(%rip)    # 0x5f3b28
cmpl $0x3, %r10d
jne 0x51adc
leaq 0x5a1c9e(%rip), %r15    # 0x5f3740
movq %r14, %rbp
movl %edi, %r14d
xorl %edi, %edi
xorl %esi, %esi
callq *0x80(%r15)
movl $0xbf800000, 0x5a1f0b(%rip) # imm = 0xBF800000
movl $0xb71, %edi            # imm = 0xB71
callq *0x48(%r15)
movl %r14d, %edi
movq %rbp, %r14
movsd 0x1902b(%rip), %xmm12   # 0x6ab00
leaq 0x3b7534(%rip), %r15    # 0x409010
movb 0x1d8(%rsp), %r10b
testb $0x40, %r10b
jne 0x51af4
testb $0x1, %r10b
jne 0x51af9
pushq $0x25
jmp 0x51af6
pushq $0x24
popq %rcx
jmp 0x51b08
movl %r13d, %eax
andl $0x20, %eax
cmpl $0x1, %eax
pushq $0x27
popq %rcx
sbbl $0x0, %ecx
movswq (%r15), %rax
leaq 0x3b750d(%rip), %rdx    # 0x409020
leaq 0x3a8cc6(%rip), %rsi    # 0x3fa7e0
movswl (%rsi,%rax,2), %r8d
movswl (%rdx,%rax,2), %ebp
testb $0x10, %r10b
jne 0x51b54
leaq 0x1e1f30(%rip), %rdx    # 0x233a60
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
cvtsi2sd %esi, %xmm0
jmp 0x51b5a
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 0x51d3f
leaq 0x3be0e8(%rip), %rax    # 0x40fc70
movl (%rax), %eax
testb $0x8, %r10b
jne 0x51bdf
leal (%r9,%rdx), %r15d
shll $0xf, %r15d
addl $0x10000, %r15d         # imm = 0x10000
addl $0xff600000, %edi       # imm = 0xFF600000
testl %eax, %eax
je 0x51c55
movl 0x8(%rsp), %eax
shll $0x10, %eax
leaq 0x3be0bd(%rip), %rdx    # 0x40fc78
movslq (%rdx), %rdx
imulq $0xc8, %rdx, %rsi
movslq %edi, %rdx
cltq
imulq %rdx, %rax
cqto
idivq %rsi
leaq 0x3dd9c6(%rip), %rdx    # 0x42f5a0
jmp 0x51c72
movq %r14, 0x98(%rsp)
movl %ecx, 0x4c(%rsp)
testl %eax, %eax
je 0x51caa
movl (%r12), %r10d
movl %r10d, %edx
shll $0x10, %edx
leaq 0x3af3e4(%rip), %rax    # 0x400fe8
movslq (%rax), %rax
leaq 0x3be06a(%rip), %rsi    # 0x40fc78
movslq (%rsi), %rsi
imulq $0xc8, %rsi, %r15
movslq %edx, %r14
imulq %r14, %rax
cqto
idivq %r15
movq %rax, %rsi
leaq 0x3af3be(%rip), %rax    # 0x400fec
movl (%rax), %ecx
shll $0xf, %ecx
addl $0xff600000, %edi       # imm = 0xFF600000
movslq %edi, %rax
imulq %r14, %rax
cqto
idivq %r15
leal (%rcx,%rax), %r15d
addl $0x8000, %r15d          # imm = 0x8000
jmp 0x51cf4
movslq 0x10(%rsp), %rdx
movslq %edi, %rax
imulq %rdx, %rax
movl $0x140, %esi            # imm = 0x140
cqto
idivq %rsi
leaq 0x222e26(%rip), %rdx    # 0x274a98
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 0x51d2a
leaq 0x3af33b(%rip), %rax    # 0x400fec
movslq (%rax), %rcx
leaq 0x3af32d(%rip), %rax    # 0x400fe8
movslq (%rax), %rax
imulq %rcx, %rax
movl $0x140, %r14d           # imm = 0x140
cqto
idivq %r14
movq %rax, %rsi
addl $0xff600000, %edi       # imm = 0xFF600000
movslq %edi, %rax
imulq %rcx, %rax
shll $0xf, %ecx
cqto
idivq %r14
leal (%rcx,%rax), %r15d
addl $0x8000, %r15d          # imm = 0x8000
movl (%r12), %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
movq 0x98(%rsp), %r14
movslq %r14d, %r14
imulq %rax, %r14
shrq $0x10, %r14
movl %r15d, %edi
leaq 0x3b72d1(%rip), %r15    # 0x409010
cvtsi2sd %r14d, %xmm2
mulsd 0x1d92c(%rip), %xmm2    # 0x6f678
movzwl 0x18(%rsp), %eax
leal 0x200(%rax), %r14d
movl $0x7ff, %edx            # imm = 0x7FF
andl %edx, %r14d
leaq 0x375fe9(%rip), %rsi    # 0x3c7d50
movswl (%rsi,%r14,2), %r14d
cvtsi2sd %r14d, %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 0x51db9
leaq 0x304b1b(%rip), %rax    # 0x3568b8
cvtsi2sdl (%rax), %xmm8
mulsd 0x18215(%rip), %xmm8    # 0x69fc0
movapd %xmm3, %xmm2
mulsd %xmm8, %xmm2
mulsd %xmm1, %xmm8
andq $0x0, 0x5a1d8f(%rip)    # 0x5f3b50
andq $0x0, 0x5a1d8f(%rip)    # 0x5f3b58
cvtsi2sd %edi, %xmm5
movsd 0x181eb(%rip), %xmm4    # 0x69fc0
mulsd %xmm4, %xmm5
cvtsi2sd %r11d, %xmm6
cvtsi2sd %ebx, %xmm7
mulsd %xmm4, %xmm7
cvtsi2sd %ebp, %xmm4
movapd %xmm4, %xmm9
unpcklpd %xmm6, %xmm9            # xmm9 = xmm9[0],xmm6[0]
unpcklpd %xmm0, %xmm6            # xmm6 = xmm6[0],xmm0[0]
movapd 0x1afa0(%rip), %xmm0    # 0x6cda0
movapd %xmm3, %xmm10
unpcklpd %xmm2, %xmm10           # xmm10 = xmm10[0],xmm2[0]
mulpd %xmm6, %xmm10
xorpd %xmm0, %xmm6
pshufd $0xee, %xmm6, %xmm6     # xmm6 = xmm6[2,3,2,3]
mulsd %xmm1, %xmm6
addsd %xmm7, %xmm6
unpcklpd %xmm5, %xmm6            # xmm6 = xmm6[0],xmm5[0]
subpd %xmm10, %xmm6
unpcklpd %xmm8, %xmm1            # xmm1 = xmm1[0],xmm8[0]
mulpd %xmm9, %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
movsd %xmm2, 0x58(%rsp)
cvtsi2sd %r8d, %xmm5
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)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x5a1c90(%rip)    # 0x5f3b60
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 0x1d76b(%rip), %xmm4    # 0x6f688
mulsd %xmm4, %xmm3
mulsd %xmm12, %xmm3
movsd %xmm3, 0x5a1c3a(%rip)   # 0x5f3b68
mulsd %xmm11, %xmm4
mulsd %xmm12, %xmm4
movsd %xmm4, 0x5a1c30(%rip)   # 0x5f3b70
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, 0x5a1c05(%rip)  # 0x5f3b78
testb $0x4, %r10b
movl 0x1e0(%rsp), %eax
jne 0x51fb0
addsd 0x1d700(%rip), %xmm5    # 0x6f688
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 0x51fe0
unpcklpd %xmm2, %xmm6            # xmm6 = xmm6[0],xmm2[0]
addsd 0x1d6cc(%rip), %xmm5    # 0x6f688
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, 0x5a1b84(%rip)  # 0x5f3b80
movhpd %xmm12, 0x5a1b83(%rip)  # 0x5f3b88
incl %r9d
cvtsi2sd %eax, %xmm1
cvtsi2sd %r9d, %xmm2
movsd %xmm0, 0x5a1b77(%rip)   # 0x5f3b90
xorl %eax, %eax
pushq $0x1
popq %rdx
xorpd %xmm0, %xmm0
cmpq $0x4, %rdx
movsd 0x48(%rsp,%rdx,8), %xmm3
movl $0x0, %esi
cmovneq %rdx, %rsi
ucomisd %xmm1, %xmm3
jb 0x52060
ucomisd %xmm3, %xmm2
jb 0x52060
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 0x520f0
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 0x52160
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 0x52022
cmpl $0x3, %eax
jl 0x52303
movl 0x1e8(%rsp), %edx
cvtsi2sd %edx, %xmm0
movl 0x1f8(%rsp), %edx
incl %edx
cvtsi2sd %edx, %xmm1
movl %eax, %eax
negq %rax
xorl %edx, %edx
pushq $0x1
popq %rsi
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 0x521dd
ucomisd %xmm3, %xmm1
jb 0x521dd
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 0x5226e
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 0x522dd
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 0x5219c
leaq 0x50(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x47666
movzwl 0x40(%rsp), %eax
movw %ax, (%r15)
leaq 0x3bb519(%rip), %rax    # 0x40d82c
movl 0x38(%rsp), %ecx
movl %ecx, (%rax)
leaq 0x3b6ce4(%rip), %rax    # 0x409004
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x5a17fc(%rip)   # 0x5f3b30
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x5a1866(%rip)   # 0x5f3ba8
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x5a1850(%rip)   # 0x5f3ba0
movsd 0xc8(%rsp), %xmm0
movsd %xmm0, 0x5a17d7(%rip)   # 0x5f3b38
leaq 0x37e428(%rip), %rax    # 0x3d0790
movq 0xc0(%rsp), %rcx
movq %rcx, (%rax)
leaq 0x4b4b6(%rip), %rax     # 0x9d830
movl 0x10(%rsp), %ecx
movl %ecx, (%rax)
leaq 0x22270d(%rip), %rax    # 0x274a94
movl 0x8(%rsp), %ecx
movl %ecx, (%rax)
movsd 0xa8(%rsp), %xmm0
movsd %xmm0, 0x5a1782(%rip)   # 0x5f3b20
movsd 0xb8(%rsp), %xmm0
movsd %xmm0, 0x5a1791(%rip)   # 0x5f3b40
movsd 0xa0(%rsp), %xmm0
movsd %xmm0, 0x5a1768(%rip)   # 0x5f3b28
movq 0xb0(%rsp), %xmm0
movq %xmm0, 0x5a1777(%rip)   # 0x5f3b48
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r15d, %r12d
movb 0x1d0(%rsp), %dil
jmp 0x524df
leaq 0x3b6c26(%rip), %rax    # 0x409020
movswl (%rax,%rsi,2), %edi
leaq 0x3a83db(%rip), %rax    # 0x3fa7e0
movswl (%rax,%rsi,2), %r10d
leaq 0x1e164f(%rip), %rax    # 0x233a60
movl (%rax,%rsi,4), %eax
movl %eax, %edx
shrl $0x8, %edx
movsbl %dl, %edx
sarl %edi
addl %edx, %edi
shrl $0x10, %eax
movsbl %al, %eax
sarl %r10d
addl %eax, %r10d
movl %r13d, %eax
andl $0xa, %eax
movapd %xmm1, %xmm3
cmpl $0x8, %eax
movl %r15d, %r12d
je 0x52459
leaq 0x304473(%rip), %rax    # 0x3568b8
cvtsi2sdl (%rax), %xmm3
mulsd 0x17b6f(%rip), %xmm3    # 0x69fc0
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
mulpd %xmm1, %xmm3
cvtsi2sd %edi, %xmm4
cvtsi2sd %r10d, %xmm5
movapd 0x1a936(%rip), %xmm6    # 0x6cda0
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), %al
movb 0x1d0(%rsp), %dil
testb $0x2, %al
jne 0x524cb
leaq 0x3aeb43(%rip), %rax    # 0x400fec
leaq 0x3aeb40(%rip), %rdx    # 0x400ff0
movd (%rdx), %xmm1
movd (%rax), %xmm3
punpckldq %xmm1, %xmm3    # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
pslld $0xf, %xmm3
cvtdq2pd %xmm3, %xmm1
divpd %xmm1, %xmm2
jmp 0x524d3
divpd 0x1cfed(%rip), %xmm2    # 0x6f4c0
addpd 0x1cf25(%rip), %xmm2    # 0x6f400
addpd %xmm2, %xmm0
movzwl 0x8(%rsp), %edx
movl 0x200(%rsp), %esi
cvtss2sd 0x8(%rbp), %xmm2
leaq 0x375839(%rip), %rax    # 0x3c7d30
addw (%rax), %dx
movw %dx, 0x6c(%rsp)
movw $0x2020, 0x64(%rsp)     # imm = 0x2020
movapd 0x1a892(%rip), %xmm3    # 0x6cda0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
testl %ecx, %ecx
je 0x52522
xorpd %xmm3, %xmm0
xorpd %xmm3, %xmm1
movsd 0x5a1496(%rip), %xmm4   # 0x5f39c0
xorpd %xmm4, %xmm3
leaq 0x1e151b(%rip), %rax    # 0x233a50
leaq 0x1e1518(%rip), %rdx    # 0x233a54
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movsd 0x5a1468(%rip), %xmm5   # 0x5f39b0
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 (%rdx), %xmm0
movss (%rax), %xmm3
unpcklps %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
cvtdq2pd %xmm3, %xmm0
mulpd 0x1cf5a(%rip), %xmm2    # 0x6f4d0
addpd %xmm0, %xmm2
cvttpd2dq %xmm2, %xmm0
movlpd %xmm0, 0x50(%rsp)
leaq 0x2124d5(%rip), %rax    # 0x264a60
cvtsi2sdl (%rax), %xmm0
mulsd 0x199d1(%rip), %xmm1    # 0x6bf68
mulsd 0x1d0e1(%rip), %xmm1    # 0x6f680
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
movl %eax, 0x58(%rsp)
movw %r8w, 0x5e(%rsp)
movb %r9b, 0x60(%rsp)
movb %dil, 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 0x3b6a22(%rip), %rcx    # 0x409000
movl %eax, (%rcx)
andl $0xa, %r13d
leaq 0x5a1155(%rip), %rbx    # 0x5f3740
movq 0x80(%rbx), %rax
cmpl $0x2, %r13d
jne 0x52634
leaq 0x378771(%rip), %rcx    # 0x3cad70
movl (%rcx), %edi
leaq 0x4aa2c(%rip), %rdx     # 0x9d034
leaq 0x3ae9d5(%rip), %rcx    # 0x400fe4
movl (%rcx), %ecx
movl %ecx, %esi
notl %esi
addl (%rdx), %esi
leaq 0x3ae9c2(%rip), %rdx    # 0x400fe0
movl (%rdx), %edx
subl %edi, %edx
incl %edx
leaq 0x37a555(%rip), %r8     # 0x3ccb80
subl (%r8), %ecx
incl %ecx
callq *%rax
jmp 0x52656
leaq 0x3ae9b1(%rip), %rcx    # 0x400fec
movl (%rcx), %edx
leaq 0x3ae9ac(%rip), %rcx    # 0x400ff0
movl (%rcx), %ecx
xorl %edi, %edi
xorl %esi, %esi
callq *%rax
movl $0xbf800000, 0x5a1372(%rip) # imm = 0xBF800000
testb $0x8, 0xe(%rbp)
jne 0x52686
movl $0xb71, %edi            # imm = 0xB71
callq *0x40(%rbx)
leaq 0x3c9821(%rip), %rax    # 0x41be8c
movl (%rax), %eax
cmpl %eax, 0x5a5565(%rip)    # 0x5f7bd8
je 0x52691
movl %eax, 0x5a555d(%rip)    # 0x5f7bd8
addq $0x8, %rbx
movl $0x100, %edi            # imm = 0x100
jmp 0x5268f
addq $0x48, %rbx
movl $0xb71, %edi            # imm = 0xB71
callq *(%rbx)
xorl %esi, %esi
cmpl $0x2, %r13d
setne %sil
leaq 0x50(%rsp), %rdi
callq 0x59070
leaq 0x3766a4(%rip), %rax    # 0x3c8d50
movl 0x20(%rsp), %ecx
movl %ecx, (%rax)
movss 0x30(%rsp), %xmm0
movss %xmm0, 0x5a12bc(%rip)   # 0x5f397c
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x5a54f2(%rip)   # 0x5f7bc0
movl %r12d, (%r14)
leaq 0x3b692c(%rip), %rax    # 0x409004
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
movsd 0x40(%rsp), %xmm0
movsd %xmm0, 0x5a1434(%rip)   # 0x5f3b20
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x5a1446(%rip)   # 0x5f3b40
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x5a1420(%rip)   # 0x5f3b28
movq 0x18(%rsp), %xmm0
jmp 0x523c9