// File: /workspace/github_c_makefile_star2_O0/jonof[P]jftekwar/jfbuild/src/mdsprite.c
// Function: voxdraw
int voxdraw (voxmodel *m, spritetype *tspr, int method)
{
	point3d m0, a0;
	float f, g, k0, k1, k2, k3, k4, k5, k6, k7, mat[16], omat[16], pc[4];
	struct polymostdrawpolycall draw;

	//updateanimation((md2model *)m,tspr);
	if ((tspr->cstat&48)==32) return 0;

	m0.x = m->scale;
	m0.y = m->scale;
	m0.z = m->scale;
	a0.x = a0.y = 0; a0.z = m->zadd*m->scale;

	//if (globalorientation&8) //y-flipping
	//{
	//   m0.z = -m0.z; a0.z = -a0.z;
	//      //Add height of 1st frame (use same frame to prevent animation bounce)
	//   a0.z += m->zsiz*m->scale;
	//}
	//if (globalorientation&4) { m0.y = -m0.y; a0.y = -a0.y; } //x-flipping

	f = ((float)tspr->xrepeat)*(256.0/320.0)/64.0*m->bscale;
	m0.x *= f; a0.x *= f; f = -f;
	m0.y *= f; a0.y *= f;
	f = ((float)tspr->yrepeat)/64.0*m->bscale;
	m0.z *= f; a0.z *= f;

	k0 = tspr->z;
	if (globalorientation&128) k0 += (float)((tilesizy[tspr->picnum]*tspr->yrepeat)<<1);

	f = (65536.0*512.0)/((float)xdimen*viewingrange);
	g = 32.0/((float)xdimen*gxyaspect);
	m0.y *= f; a0.y = (((float)(tspr->x-globalposx))/  1024.0 + a0.y)*f;
	m0.x *=-f; a0.x = (((float)(tspr->y-globalposy))/ -1024.0 + a0.x)*-f;
	m0.z *= g; a0.z = (((float)(k0     -globalposz))/-16384.0 + a0.z)*g;

	k0 = ((float)(tspr->x-globalposx))*f/1024.0;
	k1 = ((float)(tspr->y-globalposy))*f/1024.0;
	f = gcosang2*gshang;
	g = gsinang2*gshang;
	k4 = (float)sintable[(tspr->ang+spriteext[tspr->owner].angoff+1024)&2047] / 16384.0;
	k5 = (float)sintable[(tspr->ang+spriteext[tspr->owner].angoff+ 512)&2047] / 16384.0;
	k2 = k0*(1-k4)+k1*k5;
	k3 = k1*(1-k4)-k0*k5;
	k6 = f*gstang - gsinang*gctang; k7 = g*gstang + gcosang*gctang;
	mat[0] = k4*k6 + k5*k7; mat[4] = gchang*gstang; mat[ 8] = k4*k7 - k5*k6; mat[12] = k2*k6 + k3*k7;
	k6 = f*gctang + gsinang*gstang; k7 = g*gctang - gcosang*gstang;
	mat[1] = k4*k6 + k5*k7; mat[5] = gchang*gctang; mat[ 9] = k4*k7 - k5*k6; mat[13] = k2*k6 + k3*k7;
	k6 =           gcosang2*gchang; k7 =           gsinang2*gchang;
	mat[2] = k4*k6 + k5*k7; mat[6] =-gshang;        mat[10] = k4*k7 - k5*k6; mat[14] = k2*k6 + k3*k7;

	mat[12] += a0.y*mat[0] + a0.z*mat[4] + a0.x*mat[ 8];
	mat[13] += a0.y*mat[1] + a0.z*mat[5] + a0.x*mat[ 9];
	mat[14] += a0.y*mat[2] + a0.z*mat[6] + a0.x*mat[10];

		//Mirrors
	if (grhalfxdown10x < 0) { mat[0] = -mat[0]; mat[4] = -mat[4]; mat[8] = -mat[8]; mat[12] = -mat[12]; }

//------------
	//bit 10 is an ugly hack in game.c\animatesprites telling MD2SPRITE
	//to use Z-buffer hacks to hide overdraw problems with the shadows
	if (tspr->cstat&1024)
	{
		glfunc.glDepthFunc(GL_LESS); //NEVER,LESS,(,L)EQUAL,GREATER,(NOT,G)EQUAL,ALWAYS
#if (USE_OPENGL == USE_GLES2)
		glfunc.glDepthRangef(0.f,0.9999f);
#else
		glfunc.glDepthRange(0.0,0.9999);
#endif
	}
	if ((grhalfxdown10x >= 0) /*^ ((globalorientation&8) != 0) ^ ((globalorientation&4) != 0)*/) glfunc.glFrontFace(GL_CW); else glfunc.glFrontFace(GL_CCW);
	glfunc.glEnable(GL_CULL_FACE);
	glfunc.glCullFace(GL_BACK);

	pc[0] = pc[1] = pc[2] = ((float)(numpalookups-min(max(globalshade+m->shadeoff,0),numpalookups)))/((float)numpalookups);
	pc[0] *= (float)hictinting[globalpal].r / 255.0;
	pc[1] *= (float)hictinting[globalpal].g / 255.0;
	pc[2] *= (float)hictinting[globalpal].b / 255.0;
	if (tspr->cstat&2) { if (!(tspr->cstat&512)) pc[3] = 0.66; else pc[3] = 0.33; } else pc[3] = 1.0;
	if (tspr->cstat&2) glfunc.glEnable(GL_BLEND); else glfunc.glDisable(GL_BLEND);
//------------

		//transform to Build coords
	memcpy(omat,mat,sizeof(omat));
	f = 1.f/64.f;
	g = m0.x*f; mat[0] *= g; mat[1] *= g; mat[2] *= g;
	g = m0.y*f; mat[4] = omat[8]*g; mat[5] = omat[9]*g; mat[6] = omat[10]*g;
	g =-m0.z*f; mat[8] = omat[4]*g; mat[9] = omat[5]*g; mat[10] = omat[6]*g;
	mat[12] -= (m->xpiv*mat[0] + m->ypiv*mat[4] + (m->zpiv+m->zsiz*.5)*mat[ 8]);
	mat[13] -= (m->xpiv*mat[1] + m->ypiv*mat[5] + (m->zpiv+m->zsiz*.5)*mat[ 9]);
	mat[14] -= (m->xpiv*mat[2] + m->ypiv*mat[6] + (m->zpiv+m->zsiz*.5)*mat[10]);
	mat[3] = mat[7] = mat[11] = 0.f; mat[15] = 1.f;

	if (!m->texid[globalpal]) {
		m->texid[globalpal] = gloadtex(m->mytex,m->mytexx,m->mytexy,m->is8bit,globalpal);
	}

	draw.texture0 = m->texid[globalpal];
	draw.texture1 = 0;
	draw.alphacut = 0.32;
	draw.colour.r = pc[0];
	draw.colour.g = pc[1];
	draw.colour.b = pc[2];
	draw.colour.a = pc[3];
	draw.fogcolour.r = (float)palookupfog[gfogpalnum].r / 63.f;
	draw.fogcolour.g = (float)palookupfog[gfogpalnum].g / 63.f;
	draw.fogcolour.b = (float)palookupfog[gfogpalnum].b / 63.f;
	draw.fogcolour.a = 1.f;
	draw.fogdensity = gfogdensity;

	if (method & 1) {
		draw.projection = &grotatespriteprojmat[0][0];
	} else {
		draw.projection = &gdrawroomsprojmat[0][0];
	}
	draw.modelview = mat;

	if (!m->vertexbuf || !m->indexbuf) {
		voxloadbufs(m);
	}
	draw.indexcount = m->indexcount;
	draw.indexbuffer = m->indexbuf;
	draw.elementbuffer = m->vertexbuf;
	draw.elementcount = 0;
	draw.elementvbo = NULL;
	polymost_drawpoly_glcall(GL_TRIANGLES, &draw);

//------------
	glfunc.glDisable(GL_CULL_FACE);
	glfunc.glFrontFace(GL_CCW);
	if (tspr->cstat&1024)
	{
		glfunc.glDepthFunc(GL_LEQUAL); //NEVER,LESS,(,L)EQUAL,GREATER,(NOT,G)EQUAL,ALWAYS
#if (USE_OPENGL == USE_GLES2)
		glfunc.glDepthRangef(0.f,0.99999f);
#else
		glfunc.glDepthRange(0.0,0.99999);
#endif
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x160, %rsp            # imm = 0x160
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movswl 0xc(%rax), %eax
andl $0x30, %eax
cmpl $0x20, %eax
jne 0x924e2
movl $0x0, -0x4(%rbp)
jmp 0x93588
movq -0x10(%rbp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, -0x28(%rbp)
movq -0x10(%rbp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, -0x20(%rbp)
movl $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x10(%rbp), %rax
movss 0x8(%rax), %xmm1
movss 0x10(%rax), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x14(%rax), %eax
cvtsi2ss %eax, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x2405f(%rip), %xmm1    # 0xb65a8
mulsd %xmm1, %xmm0
movsd 0x24bf3(%rip), %xmm1    # 0xb7148
mulsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movss 0xc(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x38(%rbp), %xmm1
movss -0x28(%rbp), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, -0x28(%rbp)
movss -0x38(%rbp), %xmm1
movss -0x34(%rbp), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, -0x34(%rbp)
movaps 0x24140(%rip), %xmm1    # 0xb66e0
movss -0x38(%rbp), %xmm0
pxor %xmm1, %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x38(%rbp), %xmm1
movss -0x24(%rbp), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x38(%rbp), %xmm1
movss -0x30(%rbp), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, -0x30(%rbp)
movq -0x18(%rbp), %rax
movzbl 0x15(%rax), %eax
cvtsi2ss %eax, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x20704(%rip), %xmm1    # 0xb2cf0
divsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movss 0xc(%rax), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x38(%rbp), %xmm0
mulss -0x20(%rbp), %xmm0
movss %xmm0, -0x20(%rbp)
movss -0x38(%rbp), %xmm0
mulss -0x2c(%rbp), %xmm0
movss %xmm0, -0x2c(%rbp)
movq -0x18(%rbp), %rax
cvtsi2ssl 0x8(%rax), %xmm0
movss %xmm0, -0x40(%rbp)
leaq 0x3b8723(%rip), %rax    # 0x44ad60
movl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x92678
movq -0x18(%rbp), %rax
movswq 0xe(%rax), %rcx
leaq 0x3a9ee7(%rip), %rax    # 0x43c540
movswl (%rax,%rcx,2), %eax
movq -0x18(%rbp), %rcx
movzbl 0x15(%rcx), %ecx
imull %ecx, %eax
shll %eax
cvtsi2ss %eax, %xmm0
addss -0x40(%rbp), %xmm0
movss %xmm0, -0x40(%rbp)
leaq 0x4e6a1(%rip), %rax     # 0xe0d20
cvtsi2ssl (%rax), %xmm0
leaq 0x37a226(%rip), %rcx    # 0x40c8b0
cvtsi2ssl (%rcx), %xmm1
mulss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x23dea(%rip), %xmm0    # 0xb6488
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x38(%rbp)
cvtsi2ssl (%rax), %xmm0
cvtss2sd %xmm0, %xmm1
leaq 0x55f4d6(%rip), %rax    # 0x5f1b90
movsd (%rax), %xmm0
mulsd %xmm0, %xmm1
movsd 0x23e36(%rip), %xmm0    # 0xb6500
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x38(%rbp), %xmm1
movss -0x24(%rbp), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
leaq 0x1e4eb9(%rip), %rdx    # 0x2775b0
movl (%rdx), %ecx
subl %ecx, %eax
cvtsi2ss %eax, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x205fd(%rip), %xmm1    # 0xb2d08
mulsd %xmm1, %xmm0
movss -0x30(%rbp), %xmm2
cvtss2sd %xmm2, %xmm2
addsd %xmm2, %xmm0
movss -0x38(%rbp), %xmm2
cvtss2sd %xmm2, %xmm2
mulsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
movss -0x38(%rbp), %xmm2
movaps 0x23fa2(%rip), %xmm3    # 0xb66e0
pxor %xmm3, %xmm2
movss -0x28(%rbp), %xmm0
mulss %xmm2, %xmm0
movss %xmm0, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
leaq 0x1e4e56(%rip), %rcx    # 0x2775b4
movl (%rcx), %esi
subl %esi, %eax
cvtsi2ss %eax, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x249de(%rip), %xmm2    # 0xb7150
mulsd %xmm2, %xmm0
movss -0x34(%rbp), %xmm2
cvtss2sd %xmm2, %xmm2
addsd %xmm2, %xmm0
movss -0x38(%rbp), %xmm2
pxor %xmm3, %xmm2
cvtss2sd %xmm2, %xmm2
mulsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x34(%rbp)
movss -0x3c(%rbp), %xmm2
movss -0x20(%rbp), %xmm0
mulss %xmm2, %xmm0
movss %xmm0, -0x20(%rbp)
movss -0x40(%rbp), %xmm0
leaq 0x215e04(%rip), %rax    # 0x2a85c0
cvtsi2ssl (%rax), %xmm2
subss %xmm2, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x24988(%rip), %xmm2    # 0xb7158
mulsd %xmm2, %xmm0
movss -0x2c(%rbp), %xmm2
cvtss2sd %xmm2, %xmm2
addsd %xmm2, %xmm0
movss -0x3c(%rbp), %xmm2
cvtss2sd %xmm2, %xmm2
mulsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x2c(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl (%rdx), %edx
subl %edx, %eax
cvtsi2ss %eax, %xmm0
movss -0x38(%rbp), %xmm2
mulss %xmm2, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x40(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movl (%rcx), %ecx
subl %ecx, %eax
cvtsi2ss %eax, %xmm0
movss -0x38(%rbp), %xmm2
mulss %xmm2, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x44(%rbp)
leaq 0x55b129(%rip), %rax    # 0x5ed978
movsd (%rax), %xmm0
leaq 0x55b2b6(%rip), %rax    # 0x5edb10
movsd (%rax), %xmm1
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x38(%rbp)
leaq 0x55b116(%rip), %rcx    # 0x5ed988
movsd (%rcx), %xmm0
movsd (%rax), %xmm1
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movl 0x1c(%rax), %edx
movswq 0x1e(%rax), %rax
leaq (%rax,%rax,2), %rax
leaq 0x2d6f72(%rip), %rcx    # 0x369810
movzwl 0x6(%rcx,%rax,4), %esi
movl %edx, %eax
movl %esi, %edx
leal 0x400(%rax,%rdx), %eax
andl $0x7ff, %eax            # imm = 0x7FF
movl %eax, %edx
leaq 0x378ff4(%rip), %rax    # 0x40b8b0
movswl (%rax,%rdx,2), %edx
cvtsi2ss %edx, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x24890(%rip), %xmm1    # 0xb7160
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x50(%rbp)
movq -0x18(%rbp), %rsi
movl 0x1c(%rsi), %edx
movswq 0x1e(%rsi), %rsi
leaq (%rsi,%rsi,2), %rsi
movzwl 0x6(%rcx,%rsi,4), %esi
movl %edx, %ecx
movl %esi, %edx
leal 0x200(%rcx,%rdx), %ecx
andl $0x7ff, %ecx            # imm = 0x7FF
movswl (%rax,%rcx,2), %eax
cvtsi2ss %eax, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x203f9(%rip), %xmm1    # 0xb2d10
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x54(%rbp)
movss -0x40(%rbp), %xmm0
movss 0x204cf(%rip), %xmm2    # 0xb2e00
subss -0x50(%rbp), %xmm2
movss -0x44(%rbp), %xmm1
mulss -0x54(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x48(%rbp)
movss -0x44(%rbp), %xmm0
movss 0x204a6(%rip), %xmm2    # 0xb2e00
subss -0x50(%rbp), %xmm2
movss -0x40(%rbp), %xmm1
mulss -0x54(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x38(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x55b185(%rip), %rax    # 0x5edb18
movsd (%rax), %xmm2
leaq 0x55aff2(%rip), %rax    # 0x5ed990
movsd (%rax), %xmm1
leaq 0x55b14f(%rip), %rax    # 0x5edaf8
mulsd (%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x58(%rbp)
movss -0x3c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x55b133(%rip), %rax    # 0x5edb18
movsd (%rax), %xmm2
leaq 0x55af90(%rip), %rax    # 0x5ed980
movsd (%rax), %xmm1
leaq 0x55b0fd(%rip), %rax    # 0x5edaf8
mulsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x5c(%rbp)
movss -0x50(%rbp), %xmm0
movss -0x58(%rbp), %xmm2
movss -0x54(%rbp), %xmm1
mulss -0x5c(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0xa0(%rbp)
leaq 0x55b0b5(%rip), %rax    # 0x5edaf0
movsd (%rax), %xmm0
leaq 0x55b0d2(%rip), %rax    # 0x5edb18
mulsd (%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x90(%rbp)
movss -0x50(%rbp), %xmm0
movss -0x5c(%rbp), %xmm2
movss -0x54(%rbp), %xmm1
mulss -0x58(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x80(%rbp)
movss -0x48(%rbp), %xmm0
movss -0x58(%rbp), %xmm2
movss -0x4c(%rbp), %xmm1
mulss -0x5c(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x70(%rbp)
movss -0x38(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x55b043(%rip), %rax    # 0x5edaf8
movsd (%rax), %xmm2
leaq 0x55aed0(%rip), %rax    # 0x5ed990
movsd (%rax), %xmm1
leaq 0x55b04d(%rip), %rax    # 0x5edb18
mulsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x58(%rbp)
movss -0x3c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x55b008(%rip), %rax    # 0x5edaf8
movsd (%rax), %xmm2
leaq 0x55ae85(%rip), %rax    # 0x5ed980
movsd (%rax), %xmm1
leaq 0x55b012(%rip), %rax    # 0x5edb18
mulsd (%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x5c(%rbp)
movss -0x50(%rbp), %xmm0
movss -0x58(%rbp), %xmm2
movss -0x54(%rbp), %xmm1
mulss -0x5c(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x9c(%rbp)
leaq 0x55af93(%rip), %rax    # 0x5edaf0
movsd (%rax), %xmm0
leaq 0x55af90(%rip), %rax    # 0x5edaf8
mulsd (%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x8c(%rbp)
movss -0x50(%rbp), %xmm0
movss -0x5c(%rbp), %xmm2
movss -0x54(%rbp), %xmm1
mulss -0x58(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x7c(%rbp)
movss -0x48(%rbp), %xmm0
movss -0x58(%rbp), %xmm2
movss -0x4c(%rbp), %xmm1
mulss -0x5c(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x6c(%rbp)
leaq 0x55adaa(%rip), %rax    # 0x5ed978
movsd (%rax), %xmm0
leaq 0x55af17(%rip), %rax    # 0x5edaf0
mulsd (%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x58(%rbp)
leaq 0x55ad9b(%rip), %rax    # 0x5ed988
movsd (%rax), %xmm0
leaq 0x55aef8(%rip), %rax    # 0x5edaf0
mulsd (%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x5c(%rbp)
movss -0x50(%rbp), %xmm0
movss -0x58(%rbp), %xmm2
movss -0x54(%rbp), %xmm1
mulss -0x5c(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x98(%rbp)
leaq 0x55aee0(%rip), %rax    # 0x5edb10
movsd (%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x88(%rbp)
movss -0x50(%rbp), %xmm0
movss -0x5c(%rbp), %xmm2
movss -0x54(%rbp), %xmm1
mulss -0x58(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x78(%rbp)
movss -0x48(%rbp), %xmm0
movss -0x58(%rbp), %xmm2
movss -0x4c(%rbp), %xmm1
mulss -0x5c(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x68(%rbp)
movss -0x30(%rbp), %xmm1
movss -0xa0(%rbp), %xmm2
movss -0x2c(%rbp), %xmm0
mulss -0x90(%rbp), %xmm0
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movss -0x34(%rbp), %xmm0
movss -0x80(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
addss -0x70(%rbp), %xmm0
movss %xmm0, -0x70(%rbp)
movss -0x30(%rbp), %xmm1
movss -0x9c(%rbp), %xmm2
movss -0x2c(%rbp), %xmm0
mulss -0x8c(%rbp), %xmm0
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movss -0x34(%rbp), %xmm0
movss -0x7c(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
addss -0x6c(%rbp), %xmm0
movss %xmm0, -0x6c(%rbp)
movss -0x30(%rbp), %xmm1
movss -0x98(%rbp), %xmm2
movss -0x2c(%rbp), %xmm0
mulss -0x88(%rbp), %xmm0
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movss -0x34(%rbp), %xmm0
movss -0x78(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
addss -0x68(%rbp), %xmm0
movss %xmm0, -0x68(%rbp)
xorps %xmm0, %xmm0
leaq 0x55ae06(%rip), %rax    # 0x5edb70
ucomisd (%rax), %xmm0
jbe 0x92dd8
movss -0xa0(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, -0xa0(%rbp)
movss -0x90(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, -0x90(%rbp)
movss -0x80(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, -0x80(%rbp)
movss -0x70(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, -0x70(%rbp)
movq -0x18(%rbp), %rax
movswl 0xc(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x92e14
movl $0x201, %edi            # imm = 0x201
leaq 0x55a91a(%rip), %rax    # 0x5ed710
callq *0x98(%rax)
xorps %xmm0, %xmm0
movsd 0x24361(%rip), %xmm1    # 0xb7168
leaq 0x55a902(%rip), %rax    # 0x5ed710
callq *0xa8(%rax)
leaq 0x55ad55(%rip), %rax    # 0x5edb70
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x92e39
movl $0x900, %edi            # imm = 0x900
leaq 0x55a8dc(%rip), %rax    # 0x5ed710
callq *0x28(%rax)
jmp 0x92e48
movl $0x901, %edi            # imm = 0x901
leaq 0x55a8cb(%rip), %rax    # 0x5ed710
callq *0x28(%rax)
movl $0xb44, %edi            # imm = 0xB44
leaq 0x55a8bc(%rip), %rax    # 0x5ed710
callq *0x40(%rax)
movl $0x405, %edi            # imm = 0x405
leaq 0x55a8ad(%rip), %rax    # 0x5ed710
callq *0x20(%rax)
leaq 0x3bc71b(%rip), %rax    # 0x44f588
movswl (%rax), %eax
movl %eax, -0x14c(%rbp)
leaq 0x3bc70f(%rip), %rax    # 0x44f58c
movl (%rax), %eax
movq -0x10(%rbp), %rcx
addl 0x4(%rcx), %eax
cmpl $0x0, %eax
jle 0x92ea3
leaq 0x3bc6fa(%rip), %rax    # 0x44f58c
movl (%rax), %eax
movq -0x10(%rbp), %rcx
addl 0x4(%rcx), %eax
movl %eax, -0x150(%rbp)
jmp 0x92ead
xorl %eax, %eax
movl %eax, -0x150(%rbp)
jmp 0x92ead
movl -0x150(%rbp), %eax
leaq 0x3bc6ce(%rip), %rcx    # 0x44f588
movswl (%rcx), %ecx
cmpl %ecx, %eax
jge 0x92f06
leaq 0x3bc6c4(%rip), %rax    # 0x44f58c
movl (%rax), %eax
movq -0x10(%rbp), %rcx
addl 0x4(%rcx), %eax
cmpl $0x0, %eax
jle 0x92eee
leaq 0x3bc6af(%rip), %rax    # 0x44f58c
movl (%rax), %eax
movq -0x10(%rbp), %rcx
addl 0x4(%rcx), %eax
movl %eax, -0x154(%rbp)
jmp 0x92ef8
xorl %eax, %eax
movl %eax, -0x154(%rbp)
jmp 0x92ef8
movl -0x154(%rbp), %eax
movl %eax, -0x158(%rbp)
jmp 0x92f16
leaq 0x3bc67b(%rip), %rax    # 0x44f588
movswl (%rax), %eax
movl %eax, -0x158(%rbp)
movl -0x14c(%rbp), %eax
movl -0x158(%rbp), %ecx
subl %ecx, %eax
cvtsi2ss %eax, %xmm0
leaq 0x3bc659(%rip), %rax    # 0x44f588
movswl (%rax), %eax
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0xe8(%rbp)
movss %xmm0, -0xec(%rbp)
movss %xmm0, -0xf0(%rbp)
leaq 0x3b7e0b(%rip), %rcx    # 0x44ad64
movslq (%rcx), %rdx
leaq 0x5a8c9d(%rip), %rax    # 0x63bc00
movzbl (%rax,%rdx,4), %edx
cvtsi2ss %edx, %xmm0
cvtss2sd %xmm0, %xmm2
movsd 0x1fda9(%rip), %xmm0    # 0xb2d20
divsd %xmm0, %xmm2
movss -0xf0(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm2, %xmm1
cvtsd2ss %xmm1, %xmm1
movss %xmm1, -0xf0(%rbp)
movslq (%rcx), %rdx
movzbl 0x1(%rax,%rdx,4), %edx
cvtsi2ss %edx, %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm0, %xmm1
movss -0xec(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xec(%rbp)
movslq (%rcx), %rcx
movzbl 0x2(%rax,%rcx,4), %eax
cvtsi2ss %eax, %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x1fd41(%rip), %xmm0    # 0xb2d20
divsd %xmm0, %xmm1
movss -0xe8(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0xe8(%rbp)
movq -0x18(%rbp), %rax
movswl 0xc(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x93045
movq -0x18(%rbp), %rax
movswl 0xc(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
jne 0x93033
movss 0x235bf(%rip), %xmm0    # 0xb65e8
movss %xmm0, -0xe4(%rbp)
jmp 0x93043
movss 0x235a9(%rip), %xmm0    # 0xb65e4
movss %xmm0, -0xe4(%rbp)
jmp 0x93055
movss 0x1fdb3(%rip), %xmm0    # 0xb2e00
movss %xmm0, -0xe4(%rbp)
movq -0x18(%rbp), %rax
movswl 0xc(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x93076
movl $0xbe2, %edi            # imm = 0xBE2
leaq 0x55a69f(%rip), %rax    # 0x5ed710
callq *0x40(%rax)
jmp 0x93085
movl $0xbe2, %edi            # imm = 0xBE2
leaq 0x55a68e(%rip), %rax    # 0x5ed710
callq *0x48(%rax)
leaq -0xe0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movl $0x40, %edx
callq 0x60c0
movss 0x240cb(%rip), %xmm0    # 0xb7170
movss %xmm0, -0x38(%rbp)
movss -0x28(%rbp), %xmm0
mulss -0x38(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0x3c(%rbp), %xmm0
mulss -0xa0(%rbp), %xmm0
movss %xmm0, -0xa0(%rbp)
movss -0x3c(%rbp), %xmm0
mulss -0x9c(%rbp), %xmm0
movss %xmm0, -0x9c(%rbp)
movss -0x3c(%rbp), %xmm0
mulss -0x98(%rbp), %xmm0
movss %xmm0, -0x98(%rbp)
movss -0x24(%rbp), %xmm0
mulss -0x38(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0xc0(%rbp), %xmm0
mulss -0x3c(%rbp), %xmm0
movss %xmm0, -0x90(%rbp)
movss -0xbc(%rbp), %xmm0
mulss -0x3c(%rbp), %xmm0
movss %xmm0, -0x8c(%rbp)
movss -0xb8(%rbp), %xmm0
mulss -0x3c(%rbp), %xmm0
movss %xmm0, -0x88(%rbp)
movss -0x20(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
mulss -0x38(%rbp), %xmm0
movss %xmm0, -0x3c(%rbp)
movss -0xd0(%rbp), %xmm0
mulss -0x3c(%rbp), %xmm0
movss %xmm0, -0x80(%rbp)
movss -0xcc(%rbp), %xmm0
mulss -0x3c(%rbp), %xmm0
movss %xmm0, -0x7c(%rbp)
movss -0xc8(%rbp), %xmm0
mulss -0x3c(%rbp), %xmm0
movss %xmm0, -0x78(%rbp)
movq -0x10(%rbp), %rax
movss 0x64(%rax), %xmm0
movss -0xa0(%rbp), %xmm2
movq -0x10(%rbp), %rax
movss 0x68(%rax), %xmm1
mulss -0x90(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movss 0x6c(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movq -0x10(%rbp), %rax
cvtsi2sdl 0x60(%rax), %xmm1
movsd 0x2326c(%rip), %xmm3    # 0xb6450
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
movss -0x80(%rbp), %xmm2
cvtss2sd %xmm2, %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movss -0x70(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x70(%rbp)
movq -0x10(%rbp), %rax
movss 0x64(%rax), %xmm0
movss -0x9c(%rbp), %xmm2
movq -0x10(%rbp), %rax
movss 0x68(%rax), %xmm1
mulss -0x8c(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movss 0x6c(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movq -0x10(%rbp), %rax
cvtsi2sdl 0x60(%rax), %xmm1
movsd 0x231f1(%rip), %xmm3    # 0xb6450
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
movss -0x7c(%rbp), %xmm2
cvtss2sd %xmm2, %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movss -0x6c(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x6c(%rbp)
movq -0x10(%rbp), %rax
movss 0x64(%rax), %xmm0
movss -0x98(%rbp), %xmm2
movq -0x10(%rbp), %rax
movss 0x68(%rax), %xmm1
mulss -0x88(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movq -0x10(%rbp), %rax
movss 0x6c(%rax), %xmm1
cvtss2sd %xmm1, %xmm2
movq -0x10(%rbp), %rax
cvtsi2sdl 0x60(%rax), %xmm1
movsd 0x23176(%rip), %xmm3    # 0xb6450
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
movss -0x78(%rbp), %xmm2
cvtss2sd %xmm2, %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movss -0x68(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
subsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x68(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x74(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x84(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x94(%rbp)
movss 0x1fad1(%rip), %xmm0    # 0xb2e00
movss %xmm0, -0x64(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
leaq 0x3b7a21(%rip), %rcx    # 0x44ad64
movslq (%rcx), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x9338f
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x50(%rax), %esi
movq -0x10(%rbp), %rax
movl 0x54(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x70(%rax), %ecx
leaq 0x3b79f4(%rip), %rax    # 0x44ad64
movl (%rax), %r8d
callq 0x8ff90
movl %eax, %edx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
leaq 0x3b79db(%rip), %rcx    # 0x44ad64
movslq (%rcx), %rcx
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
leaq 0x3b79c6(%rip), %rcx    # 0x44ad64
movslq (%rcx), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x148(%rbp)
movl $0x0, -0x144(%rbp)
movl $0x3ea3d70a, -0x140(%rbp) # imm = 0x3EA3D70A
movss -0xf0(%rbp), %xmm0
movss %xmm0, -0x13c(%rbp)
movss -0xec(%rbp), %xmm0
movss %xmm0, -0x138(%rbp)
movss -0xe8(%rbp), %xmm0
movss %xmm0, -0x134(%rbp)
movss -0xe4(%rbp), %xmm0
movss %xmm0, -0x130(%rbp)
leaq 0x55a543(%rip), %rcx    # 0x5ed948
movslq (%rcx), %rdx
leaq 0x3dd9f1(%rip), %rax    # 0x470e00
movzbl (%rax,%rdx,4), %edx
cvtsi2ss %edx, %xmm0
movss 0x231c1(%rip), %xmm1    # 0xb65e0
divss %xmm1, %xmm0
movss %xmm0, -0x12c(%rbp)
movslq (%rcx), %rdx
movzbl 0x1(%rax,%rdx,4), %edx
cvtsi2ss %edx, %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x128(%rbp)
movslq (%rcx), %rcx
movzbl 0x2(%rax,%rcx,4), %eax
cvtsi2ss %eax, %xmm0
movss 0x23189(%rip), %xmm1    # 0xb65e0
divss %xmm1, %xmm0
movss %xmm0, -0x124(%rbp)
movss 0x1f995(%rip), %xmm0    # 0xb2e00
movss %xmm0, -0x120(%rbp)
leaq 0x55a4d2(%rip), %rax    # 0x5ed94c
movss (%rax), %xmm0
movss %xmm0, -0x11c(%rbp)
movl -0x1c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x934a1
leaq 0x55a5d8(%rip), %rax    # 0x5eda70
movq %rax, -0x110(%rbp)
jmp 0x934af
leaq 0x55a588(%rip), %rax    # 0x5eda30
movq %rax, -0x110(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x74(%rax)
je 0x934d1
movq -0x10(%rbp), %rax
cmpl $0x0, 0x78(%rax)
jne 0x934da
movq -0x10(%rbp), %rdi
callq 0x935a0
movq -0x10(%rbp), %rax
movl 0x7c(%rax), %eax
movl %eax, -0x104(%rbp)
movq -0x10(%rbp), %rax
movl 0x78(%rax), %eax
movl %eax, -0x108(%rbp)
movq -0x10(%rbp), %rax
movl 0x74(%rax), %eax
movl %eax, -0x100(%rbp)
movl $0x0, -0xfc(%rbp)
movq $0x0, -0xf8(%rbp)
movl $0x4, %edi
leaq -0x148(%rbp), %rsi
callq 0x73570
movl $0xb44, %edi            # imm = 0xB44
leaq 0x55a1dd(%rip), %rax    # 0x5ed710
callq *0x48(%rax)
movl $0x901, %edi            # imm = 0x901
leaq 0x55a1ce(%rip), %rax    # 0x5ed710
callq *0x28(%rax)
movq -0x18(%rbp), %rax
movswl 0xc(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x93581
movl $0x203, %edi            # imm = 0x203
leaq 0x55a1ad(%rip), %rax    # 0x5ed710
callq *0x98(%rax)
xorps %xmm0, %xmm0
movsd 0x22f2c(%rip), %xmm1    # 0xb64a0
leaq 0x55a195(%rip), %rax    # 0x5ed710
callq *0xa8(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x160, %rsp            # imm = 0x160
popq %rbp
retq
nopw %cs:(%rax,%rax)