// File: FreeSlave[P]vhlt/hlcsg/brush.cpp
// Function: CreateHullBrush(brush_s const*)
hullbrush_t *CreateHullBrush (const brush_t *b)
{
	const int MAXSIZE = 256;

	hullbrush_t *hb;
	int numplanes;
	plane_t planes[MAXSIZE];
	Winding *w[MAXSIZE];
	int numedges;
	hullbrushedge_t edges[MAXSIZE];
	int numvertexes;
	hullbrushvertex_t vertexes[MAXSIZE];
	int i;
	int j;
	int k;
	int e;
	int e2;
	vec3_t origin;
	bool failed = false;

	// planes

	numplanes = 0;
	GetVectorForKey (&g_entities[b->entitynum], "origin", origin);

	for (i = 0; i < b->numsides; i++)
	{
		side_t *s;
		vec3_t p[3];
		vec3_t v1;
		vec3_t v2;
		vec3_t normal;
		planetypes axial;

		s = &g_brushsides[b->firstside + i];
		for (j = 0; j < 3; j++)
		{
			VectorSubtract (s->planepts[j], origin, p[j]);
			for (k = 0; k < 3; k++)
			{
				if (fabs (p[j][k] - floor (p[j][k] + 0.5)) <= ON_EPSILON && p[j][k] != floor (p[j][k] + 0.5))
				{
					Warning ("Entity %i, Brush %i: vertex (%4.8f %4.8f %4.8f) of an info_hullshape entity is slightly off-grid.",
#ifdef HLCSG_COUNT_NEW
							b->originalentitynum, b->originalbrushnum,
#else
							b->entitynum, b->brushnum,
#endif
							p[j][0], p[j][1], p[j][2]);
				}
			}
		}
		VectorSubtract (p[0], p[1], v1);
		VectorSubtract (p[2], p[1], v2);
		CrossProduct (v1, v2, normal);
		if (!VectorNormalize (normal))
		{
			failed = true;
			continue;
		}
		for (k = 0; k < 3; k++)
		{
			if (fabs (normal[k]) < NORMAL_EPSILON)
			{
				normal[k] = 0.0;
				VectorNormalize (normal);
			}
		}
		axial = PlaneTypeForNormal (normal);
		if (axial <= last_axial)
		{
			int sign = normal[axial] > 0? 1: -1;
			VectorClear (normal);
			normal[axial] = sign;
		}

		if (numplanes >= MAXSIZE)
		{
			failed = true;
			continue;
		}
		VectorCopy (normal, planes[numplanes].normal);
		planes[numplanes].dist = DotProduct (p[1], normal);
		numplanes++;
	}

	// windings

	for (i = 0; i < numplanes; i++)
	{
		w[i] = new Winding (planes[i].normal, planes[i].dist);
		for (j = 0; j < numplanes; j++)
		{
			if (j == i)
			{
				continue;
			}
			vec3_t normal;
			vec_t dist;
			VectorSubtract (vec3_origin, planes[j].normal, normal);
			dist = -planes[j].dist;
			if (!w[i]->Chop (normal, dist))
			{
				failed = true;
				break;
			}
		}
	}

	// edges
	numedges = 0;
	for (i = 0; i < numplanes; i++)
	{
		for (e = 0; e < w[i]->m_NumPoints; e++)
		{
			hullbrushedge_t *edge;
			int found;
			if (numedges >= MAXSIZE)
			{
				failed = true;
				continue;
			}
			edge = &edges[numedges];
			VectorCopy (w[i]->m_Points[(e + 1) % w[i]->m_NumPoints], edge->vertexes[0]);
			VectorCopy (w[i]->m_Points[e], edge->vertexes[1]);
			VectorCopy (edge->vertexes[0], edge->point);
			VectorSubtract (edge->vertexes[1], edge->vertexes[0], edge->delta);
			if (VectorLength (edge->delta) < 1 - ON_EPSILON)
			{
				failed = true;
				continue;
			}
			VectorCopy (planes[i].normal, edge->normals[0]);
			found = 0;
			for (k = 0; k < numplanes; k++)
			{
				for (e2 = 0; e2 < w[k]->m_NumPoints; e2++)
				{
					if (VectorCompare (w[k]->m_Points[(e2 + 1) % w[k]->m_NumPoints], edge->vertexes[1]) &&
						VectorCompare (w[k]->m_Points[e2], edge->vertexes[0]))
					{
						found++;
						VectorCopy (planes[k].normal, edge->normals[1]);
						j = k;
					}
				}
			}
			if (found != 1)
			{
				failed = true;
				continue;
			}
			if (fabs (DotProduct (edge->vertexes[0], edge->normals[0]) - planes[i].dist) > NORMAL_EPSILON
				|| fabs (DotProduct (edge->vertexes[1], edge->normals[0]) - planes[i].dist) > NORMAL_EPSILON
				|| fabs (DotProduct (edge->vertexes[0], edge->normals[1]) - planes[j].dist) > NORMAL_EPSILON
				|| fabs (DotProduct (edge->vertexes[1], edge->normals[1]) - planes[j].dist) > NORMAL_EPSILON)
			{
				failed = true;
				continue;
			}
			if (j > i)
			{
				numedges++;
			}
		}
	}

	// vertexes
	numvertexes = 0;
	for (i = 0; i < numplanes; i++)
	{
		for (e = 0; e < w[i]->m_NumPoints; e++)
		{
			vec3_t v;
			VectorCopy (w[i]->m_Points[e], v);
			for (j = 0; j < numvertexes; j++)
			{
				if (VectorCompare (vertexes[j].point, v))
				{
					break;
				}
			}
			if (j < numvertexes)
			{
				continue;
			}
			if (numvertexes > MAXSIZE)
			{
				failed = true;
				continue;
			}

			VectorCopy (v, vertexes[numvertexes].point);
			numvertexes++;

			for (k = 0; k < numplanes; k++)
			{
				if (fabs (DotProduct (v, planes[k].normal) - planes[k].dist) < ON_EPSILON)
				{
					if (fabs (DotProduct (v, planes[k].normal) - planes[k].dist) > NORMAL_EPSILON)
					{
						failed = true;
					}
				}
			}
		}
	}

	// copy to hull brush

	if (!failed)
	{
		hb = (hullbrush_t *)malloc (sizeof (hullbrush_t));
		hlassume (hb != NULL, assume_NoMemory);

		hb->numfaces = numplanes;
		hb->faces = (hullbrushface_t *)malloc (hb->numfaces * sizeof (hullbrushface_t));
		hlassume (hb->faces != NULL, assume_NoMemory);
		for (i = 0; i < numplanes; i++)
		{
			hullbrushface_t *f = &hb->faces[i];
			VectorCopy (planes[i].normal, f->normal);
			VectorCopy (w[i]->m_Points[0], f->point);
			f->numvertexes = w[i]->m_NumPoints;
			f->vertexes = (vec3_t *)malloc (f->numvertexes * sizeof (vec3_t));
			hlassume (f->vertexes != NULL, assume_NoMemory);
			for (k = 0; k < w[i]->m_NumPoints; k++)
			{
				VectorCopy (w[i]->m_Points[k], f->vertexes[k]);
			}
		}

		hb->numedges = numedges;
		hb->edges = (hullbrushedge_t *)malloc (hb->numedges * sizeof (hullbrushedge_t));
		hlassume (hb->edges != NULL, assume_NoMemory);
		memcpy (hb->edges, edges, hb->numedges * sizeof (hullbrushedge_t));

		hb->numvertexes = numvertexes;
		hb->vertexes = (hullbrushvertex_t *)malloc (hb->numvertexes * sizeof (hullbrushvertex_t));
		hlassume (hb->vertexes != NULL, assume_NoMemory);
		memcpy (hb->vertexes, vertexes, hb->numvertexes * sizeof (hullbrushvertex_t));

		Developer (DEVELOPER_LEVEL_MESSAGE, "info_hullshape @ (%.0f,%.0f,%.0f): %d faces, %d edges, %d vertexes.\n", origin[0], origin[1], origin[2], hb->numfaces, hb->numedges, hb->numvertexes);
	}
	else
	{
		hb = NULL;
		Error ("Entity %i, Brush %i: invalid brush. This brush cannot be used for info_hullshape.",
#ifdef HLCSG_COUNT_NEW
				b->originalentitynum, b->originalbrushnum
#else
				b->entitynum, b->brushnum
#endif
				);
	}

	for (i = 0; i < numplanes; i++)
	{
		delete w[i];
	}

	return hb;
}

// Assembly:
subq $0xf1d8, %rsp           # imm = 0xF1D8
movq %rdi, 0xf1d0(%rsp)
movl $0x100, 0xf1cc(%rsp) # imm = 0x100
movb $0x0, 0x15f(%rsp)
movl $0x0, 0xf1bc(%rsp)
movq 0xf1d0(%rsp), %rax
movslq 0x8(%rax), %rax
leaq 0x2016700(%rip), %rdi   # 0x202d4b0
imulq $0x28, %rax, %rax
addq %rax, %rdi
leaq 0x160(%rsp), %rdx
leaq 0x18dfa(%rip), %rsi     # 0x2fbc0
callq 0x9110
movl $0x0, 0x18c(%rsp)
movl 0x18c(%rsp), %eax
movq 0xf1d0(%rsp), %rcx
cmpl 0x14(%rcx), %eax
jge 0x1746e
movq 0xf1d0(%rsp), %rax
movl 0x10(%rax), %eax
addl 0x18c(%rsp), %eax
movslq %eax, %rcx
leaq 0x3ac4846(%rip), %rax   # 0x3adb650
imulq $0xd0, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x150(%rsp)
movl $0x0, 0x188(%rsp)
cmpl $0x3, 0x188(%rsp)
jge 0x170b7
movq 0x150(%rsp), %rax
addq $0x88, %rax
movslq 0x188(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
subsd 0x160(%rsp), %xmm0
movslq 0x188(%rsp), %rcx
leaq 0x100(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, (%rax)
movq 0x150(%rsp), %rax
addq $0x88, %rax
movslq 0x188(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
subsd 0x168(%rsp), %xmm0
movslq 0x188(%rsp), %rcx
leaq 0x100(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movq 0x150(%rsp), %rax
addq $0x88, %rax
movslq 0x188(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
subsd 0x170(%rsp), %xmm0
movslq 0x188(%rsp), %rcx
leaq 0x100(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x10(%rax)
movl $0x0, 0x184(%rsp)
cmpl $0x3, 0x184(%rsp)
jge 0x1709f
movslq 0x188(%rsp), %rcx
leaq 0x100(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x184(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x30(%rsp)
movslq 0x188(%rsp), %rcx
leaq 0x100(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x184(%rsp), %rcx
movsd 0x1650e(%rip), %xmm0    # 0x2d480
addsd (%rax,%rcx,8), %xmm0
callq 0x4640
movsd 0x30(%rsp), %xmm1
subsd %xmm0, %xmm1
movaps 0x16523(%rip), %xmm0    # 0x2d4b0
pand %xmm0, %xmm1
movsd 0x166bf(%rip), %xmm0    # 0x2d658
ucomisd %xmm1, %xmm0
jb 0x17087
movslq 0x188(%rsp), %rcx
leaq 0x100(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x184(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x28(%rsp)
movslq 0x188(%rsp), %rcx
leaq 0x100(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movslq 0x184(%rsp), %rcx
movsd 0x1648c(%rip), %xmm0    # 0x2d480
addsd (%rax,%rcx,8), %xmm0
callq 0x4640
movaps %xmm0, %xmm1
movsd 0x28(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jne 0x17011
jp 0x17011
jmp 0x17087
movq 0xf1d0(%rsp), %rax
movl (%rax), %esi
movq 0xf1d0(%rsp), %rax
movl 0x4(%rax), %edx
movslq 0x188(%rsp), %rcx
leaq 0x100(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movslq 0x188(%rsp), %rcx
leaq 0x100(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm1
movslq 0x188(%rsp), %rcx
leaq 0x100(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm2
leaq 0x16a4a(%rip), %rdi     # 0x2daca
movb $0x3, %al
callq 0xbef0
jmp 0x17089
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x184(%rsp)
jmp 0x16f13
jmp 0x170a1
movl 0x188(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x188(%rsp)
jmp 0x16e27
movsd 0x100(%rsp), %xmm0
subsd 0x118(%rsp), %xmm0
movsd %xmm0, 0xe0(%rsp)
movsd 0x108(%rsp), %xmm0
subsd 0x120(%rsp), %xmm0
movsd %xmm0, 0xe8(%rsp)
movsd 0x110(%rsp), %xmm0
subsd 0x128(%rsp), %xmm0
movsd %xmm0, 0xf0(%rsp)
movsd 0x130(%rsp), %xmm0
subsd 0x118(%rsp), %xmm0
movsd %xmm0, 0xc0(%rsp)
movsd 0x138(%rsp), %xmm0
subsd 0x120(%rsp), %xmm0
movsd %xmm0, 0xc8(%rsp)
movsd 0x140(%rsp), %xmm0
subsd 0x128(%rsp), %xmm0
movsd %xmm0, 0xd0(%rsp)
movsd 0xe8(%rsp), %xmm0
movsd 0xd0(%rsp), %xmm2
movsd 0xf0(%rsp), %xmm1
mulsd 0xc8(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xa0(%rsp)
movsd 0xf0(%rsp), %xmm0
movsd 0xc0(%rsp), %xmm2
movsd 0xe0(%rsp), %xmm1
mulsd 0xd0(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xa8(%rsp)
movsd 0xe0(%rsp), %xmm0
movsd 0xc8(%rsp), %xmm2
movsd 0xe8(%rsp), %xmm1
mulsd 0xc0(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xb0(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x121b0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x17262
jp 0x17262
movb $0x1, 0x15f(%rsp)
jmp 0x17458
movl $0x0, 0x184(%rsp)
cmpl $0x3, 0x184(%rsp)
jge 0x172d7
movslq 0x184(%rsp), %rax
movsd 0xa0(%rsp,%rax,8), %xmm1
movaps 0x16221(%rip), %xmm0    # 0x2d4b0
pand %xmm0, %xmm1
movsd 0x12dcd(%rip), %xmm0    # 0x2a068
ucomisd %xmm1, %xmm0
jbe 0x172c2
movslq 0x184(%rsp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0xa0(%rsp,%rax,8)
leaq 0xa0(%rsp), %rdi
callq 0x121b0
jmp 0x172c4
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x184(%rsp)
jmp 0x1726d
leaq 0xa0(%rsp), %rdi
callq 0x18d90
movl %eax, 0x9c(%rsp)
cmpl $0x2, 0x9c(%rsp)
jg 0x1735d
movl 0x9c(%rsp), %eax
movsd 0xa0(%rsp,%rax,8), %xmm0
xorps %xmm1, %xmm1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x1, %ecx
ucomisd %xmm1, %xmm0
cmoval %ecx, %eax
movl %eax, 0x98(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0xb0(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0xa8(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0xa0(%rsp)
cvtsi2sdl 0x98(%rsp), %xmm0
movl 0x9c(%rsp), %eax
movsd %xmm0, 0xa0(%rsp,%rax,8)
cmpl $0x100, 0xf1bc(%rsp) # imm = 0x100
jl 0x17377
movb $0x1, 0x15f(%rsp)
jmp 0x17458
movsd 0xa0(%rsp), %xmm0
movslq 0xf1bc(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd %xmm0, (%rax)
movsd 0xa8(%rsp), %xmm0
movslq 0xf1bc(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movsd 0xb0(%rsp), %xmm0
movslq 0xf1bc(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd %xmm0, 0x10(%rax)
movsd 0x118(%rsp), %xmm1
movsd 0xa0(%rsp), %xmm2
movsd 0x120(%rsp), %xmm0
mulsd 0xa8(%rsp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x128(%rsp), %xmm0
movsd 0xb0(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movslq 0xf1bc(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd %xmm0, 0x30(%rax)
movl 0xf1bc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xf1bc(%rsp)
movl 0x18c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18c(%rsp)
jmp 0x16dd6
movl $0x0, 0x18c(%rsp)
movl 0x18c(%rsp), %eax
cmpl 0xf1bc(%rsp), %eax
jge 0x17661
movl $0x20, %edi
callq 0x43b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movslq 0x18c(%rsp), %rax
shlq $0x6, %rax
leaq 0xb1b0(%rsp,%rax), %rsi
movsd 0xb1e0(%rsp,%rax), %xmm0
callq 0xf770
jmp 0x174c6
movq 0x20(%rsp), %rcx
movslq 0x18c(%rsp), %rax
movq %rcx, 0xa9b0(%rsp,%rax,8)
movl $0x0, 0x188(%rsp)
movl 0x188(%rsp), %eax
cmpl 0xf1bc(%rsp), %eax
jge 0x17649
movl 0x188(%rsp), %eax
cmpl 0x18c(%rsp), %eax
jne 0x17537
jmp 0x17633
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
movl $0x20, %esi
callq 0x43c0
jmp 0x186d3
leaq 0x14952(%rip), %rax     # 0x2be90
movsd (%rax), %xmm0
movslq 0x188(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
subsd (%rax), %xmm0
movsd %xmm0, 0x70(%rsp)
leaq 0x14926(%rip), %rax     # 0x2be90
movsd 0x8(%rax), %xmm0
movslq 0x188(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
subsd 0x8(%rax), %xmm0
movsd %xmm0, 0x78(%rsp)
leaq 0x148f8(%rip), %rax     # 0x2be90
movsd 0x10(%rax), %xmm0
movslq 0x188(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
subsd 0x10(%rax), %xmm0
movsd %xmm0, 0x80(%rsp)
movslq 0x188(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd 0x30(%rax), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0x68(%rsp)
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rdi
leaq 0x70(%rsp), %rsi
movsd 0x68(%rsp), %xmm0
movsd 0x1603a(%rip), %xmm1    # 0x2d658
callq 0x10900
testb $0x1, %al
jne 0x17631
movb $0x1, 0x15f(%rsp)
jmp 0x17649
jmp 0x17633
movl 0x188(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x188(%rsp)
jmp 0x174e6
jmp 0x1764b
movl 0x18c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18c(%rsp)
jmp 0x17479
movl $0x0, 0xa9ac(%rsp)
movl $0x0, 0x18c(%rsp)
movl 0x18c(%rsp), %eax
cmpl 0xf1bc(%rsp), %eax
jge 0x17e23
movl $0x0, 0x180(%rsp)
movl 0x180(%rsp), %eax
movslq 0x18c(%rsp), %rcx
movq 0xa9b0(%rsp,%rcx,8), %rcx
cmpl 0x8(%rcx), %eax
jae 0x17e0b
cmpl $0x100, 0xa9ac(%rsp) # imm = 0x100
jl 0x176d0
movb $0x1, 0x15f(%rsp)
jmp 0x17df5
movslq 0xa9ac(%rsp), %rcx
leaq 0x19a0(%rsp), %rax
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x60(%rsp)
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq 0x10(%rax), %rax
movq %rax, 0x8(%rsp)
movl 0x180(%rsp), %eax
addl $0x1, %eax
movslq 0x18c(%rsp), %rcx
movq 0xa9b0(%rsp,%rcx,8), %rcx
xorl %edx, %edx
divl 0x8(%rcx)
movq 0x8(%rsp), %rax
movl %edx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x48(%rax)
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
movl 0x180(%rsp), %eax
addl $0x1, %eax
movslq 0x18c(%rsp), %rcx
movq 0xa9b0(%rsp,%rcx,8), %rcx
xorl %edx, %edx
divl 0x8(%rcx)
movq 0x10(%rsp), %rax
movl %edx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x50(%rax)
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq 0x10(%rax), %rax
movq %rax, 0x18(%rsp)
movl 0x180(%rsp), %eax
addl $0x1, %eax
movslq 0x18c(%rsp), %rcx
movq 0xa9b0(%rsp,%rcx,8), %rcx
xorl %edx, %edx
divl 0x8(%rcx)
movq 0x18(%rsp), %rax
movl %edx, %ecx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x58(%rax)
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq 0x10(%rax), %rax
movslq 0x180(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x60(%rax)
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq 0x10(%rax), %rax
movslq 0x180(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x68(%rax)
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq 0x10(%rax), %rax
movslq 0x180(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x70(%rax)
movq 0x60(%rsp), %rax
movsd 0x48(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x30(%rax)
movq 0x60(%rsp), %rax
movsd 0x50(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x38(%rax)
movq 0x60(%rsp), %rax
movsd 0x58(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x40(%rax)
movq 0x60(%rsp), %rax
movsd 0x60(%rax), %xmm0
movq 0x60(%rsp), %rax
subsd 0x48(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x78(%rax)
movq 0x60(%rsp), %rax
movsd 0x68(%rax), %xmm0
movq 0x60(%rsp), %rax
subsd 0x50(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x80(%rax)
movq 0x60(%rsp), %rax
movsd 0x70(%rax), %xmm0
movq 0x60(%rsp), %rax
subsd 0x58(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x88(%rax)
movq 0x60(%rsp), %rax
movsd 0x78(%rax), %xmm1
movq 0x60(%rsp), %rax
movsd 0x78(%rax), %xmm2
movq 0x60(%rsp), %rax
movsd 0x80(%rax), %xmm0
movq 0x60(%rsp), %rax
mulsd 0x80(%rax), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movq 0x60(%rsp), %rax
movsd 0x88(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd 0x88(%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x42f0
movaps %xmm0, %xmm1
movsd 0x15cea(%rip), %xmm0    # 0x2d670
ucomisd %xmm1, %xmm0
jbe 0x17999
movb $0x1, 0x15f(%rsp)
jmp 0x17df5
movslq 0x18c(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, (%rax)
movslq 0x18c(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x8(%rax)
movslq 0x18c(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x10(%rax)
movl $0x0, 0x5c(%rsp)
movl $0x0, 0x184(%rsp)
movl 0x184(%rsp), %eax
cmpl 0xf1bc(%rsp), %eax
jge 0x17ba6
movl $0x0, 0x17c(%rsp)
movl 0x17c(%rsp), %eax
movslq 0x184(%rsp), %rcx
movq 0xa9b0(%rsp,%rcx,8), %rcx
cmpl 0x8(%rcx), %eax
jae 0x17b8e
movslq 0x184(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq 0x10(%rax), %rdi
movl 0x17c(%rsp), %eax
addl $0x1, %eax
movslq 0x184(%rsp), %rcx
movq 0xa9b0(%rsp,%rcx,8), %rcx
xorl %edx, %edx
divl 0x8(%rcx)
movl %edx, %eax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movq 0x60(%rsp), %rsi
addq $0x48, %rsi
addq $0x18, %rsi
callq 0x18f00
testb $0x1, %al
jne 0x17ab2
jmp 0x17b76
movslq 0x184(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq 0x10(%rax), %rdi
movslq 0x17c(%rsp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movq 0x60(%rsp), %rsi
addq $0x48, %rsi
callq 0x18f00
testb $0x1, %al
jne 0x17aec
jmp 0x17b76
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
movslq 0x184(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x18(%rax)
movslq 0x184(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x20(%rax)
movslq 0x184(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd %xmm0, 0x28(%rax)
movl 0x184(%rsp), %eax
movl %eax, 0x188(%rsp)
jmp 0x17b78
movl 0x17c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x17c(%rsp)
jmp 0x17a3b
jmp 0x17b90
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x184(%rsp)
jmp 0x17a1c
cmpl $0x1, 0x5c(%rsp)
je 0x17bba
movb $0x1, 0x15f(%rsp)
jmp 0x17df5
movq 0x60(%rsp), %rax
movsd 0x48(%rax), %xmm1
movq 0x60(%rsp), %rax
movsd (%rax), %xmm2
movq 0x60(%rsp), %rax
movsd 0x50(%rax), %xmm0
movq 0x60(%rsp), %rax
mulsd 0x8(%rax), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movq 0x60(%rsp), %rax
movsd 0x58(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd 0x10(%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movslq 0x18c(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
subsd 0x30(%rax), %xmm0
movaps 0x15888(%rip), %xmm1    # 0x2d4b0
pand %xmm1, %xmm0
movsd 0x12434(%rip), %xmm1    # 0x2a068
ucomisd %xmm1, %xmm0
ja 0x17dc8
movq 0x60(%rsp), %rax
movsd 0x60(%rax), %xmm1
movq 0x60(%rsp), %rax
movsd (%rax), %xmm2
movq 0x60(%rsp), %rax
movsd 0x68(%rax), %xmm0
movq 0x60(%rsp), %rax
mulsd 0x8(%rax), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movq 0x60(%rsp), %rax
movsd 0x70(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd 0x10(%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movslq 0x18c(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
subsd 0x30(%rax), %xmm0
movaps 0x15804(%rip), %xmm1    # 0x2d4b0
pand %xmm1, %xmm0
movsd 0x123b0(%rip), %xmm1    # 0x2a068
ucomisd %xmm1, %xmm0
ja 0x17dc8
movq 0x60(%rsp), %rax
movsd 0x48(%rax), %xmm1
movq 0x60(%rsp), %rax
movsd 0x18(%rax), %xmm2
movq 0x60(%rsp), %rax
movsd 0x50(%rax), %xmm0
movq 0x60(%rsp), %rax
mulsd 0x20(%rax), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movq 0x60(%rsp), %rax
movsd 0x58(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd 0x28(%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movslq 0x188(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
subsd 0x30(%rax), %xmm0
movaps 0x1577f(%rip), %xmm1    # 0x2d4b0
pand %xmm1, %xmm0
movsd 0x1232b(%rip), %xmm1    # 0x2a068
ucomisd %xmm1, %xmm0
ja 0x17dc8
movq 0x60(%rsp), %rax
movsd 0x60(%rax), %xmm1
movq 0x60(%rsp), %rax
movsd 0x18(%rax), %xmm2
movq 0x60(%rsp), %rax
movsd 0x68(%rax), %xmm0
movq 0x60(%rsp), %rax
mulsd 0x20(%rax), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movq 0x60(%rsp), %rax
movsd 0x70(%rax), %xmm0
movq 0x60(%rsp), %rax
movsd 0x28(%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movslq 0x188(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
subsd 0x30(%rax), %xmm0
movaps 0x156fa(%rip), %xmm1    # 0x2d4b0
pand %xmm1, %xmm0
movsd 0x122a6(%rip), %xmm1    # 0x2a068
ucomisd %xmm1, %xmm0
jbe 0x17dd2
movb $0x1, 0x15f(%rsp)
jmp 0x17df5
movl 0x188(%rsp), %eax
cmpl 0x18c(%rsp), %eax
jle 0x17df3
movl 0xa9ac(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xa9ac(%rsp)
jmp 0x17df5
movl 0x180(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x180(%rsp)
jmp 0x17696
jmp 0x17e0d
movl 0x18c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18c(%rsp)
jmp 0x17677
movl $0x0, 0x199c(%rsp)
movl $0x0, 0x18c(%rsp)
movl 0x18c(%rsp), %eax
cmpl 0xf1bc(%rsp), %eax
jge 0x181c8
movl $0x0, 0x180(%rsp)
movl 0x180(%rsp), %eax
movslq 0x18c(%rsp), %rcx
movq 0xa9b0(%rsp,%rcx,8), %rcx
cmpl 0x8(%rcx), %eax
jae 0x181b0
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq 0x10(%rax), %rax
movslq 0x180(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq 0x10(%rax), %rax
movslq 0x180(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq 0x10(%rax), %rax
movslq 0x180(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
movl $0x0, 0x188(%rsp)
movl 0x188(%rsp), %eax
cmpl 0x199c(%rsp), %eax
jge 0x17f5a
movslq 0x188(%rsp), %rax
leaq 0x190(%rsp), %rdi
imulq $0x18, %rax, %rax
addq %rax, %rdi
leaq 0x40(%rsp), %rsi
callq 0x18f00
testb $0x1, %al
jne 0x17f43
jmp 0x17f45
jmp 0x17f5a
jmp 0x17f47
movl 0x188(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x188(%rsp)
jmp 0x17f0c
movl 0x188(%rsp), %eax
cmpl 0x199c(%rsp), %eax
jge 0x17f6f
jmp 0x1819a
cmpl $0x100, 0x199c(%rsp) # imm = 0x100
jle 0x17f89
movb $0x1, 0x15f(%rsp)
jmp 0x1819a
movsd 0x40(%rsp), %xmm0
movslq 0x199c(%rsp), %rcx
leaq 0x190(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, (%rax)
movsd 0x48(%rsp), %xmm0
movslq 0x199c(%rsp), %rcx
leaq 0x190(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movsd 0x50(%rsp), %xmm0
movslq 0x199c(%rsp), %rcx
leaq 0x190(%rsp), %rax
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x10(%rax)
movl 0x199c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x199c(%rsp)
movl $0x0, 0x184(%rsp)
movl 0x184(%rsp), %eax
cmpl 0xf1bc(%rsp), %eax
jge 0x18198
movsd 0x40(%rsp), %xmm0
movslq 0x184(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd (%rax), %xmm2
movsd 0x48(%rsp), %xmm1
movslq 0x184(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
mulsd 0x8(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x50(%rsp), %xmm1
movslq 0x184(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movslq 0x184(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
subsd 0x30(%rax), %xmm1
movaps 0x153fa(%rip), %xmm0    # 0x2d4b0
pand %xmm0, %xmm1
movsd 0x15596(%rip), %xmm0    # 0x2d658
ucomisd %xmm1, %xmm0
jbe 0x18180
movsd 0x40(%rsp), %xmm1
movslq 0x184(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd (%rax), %xmm2
movsd 0x48(%rsp), %xmm0
movslq 0x184(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
mulsd 0x8(%rax), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x50(%rsp), %xmm0
movslq 0x184(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movslq 0x184(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
subsd 0x30(%rax), %xmm0
movaps 0x1534c(%rip), %xmm1    # 0x2d4b0
pand %xmm1, %xmm0
movsd 0x11ef8(%rip), %xmm1    # 0x2a068
ucomisd %xmm1, %xmm0
jbe 0x1817e
movb $0x1, 0x15f(%rsp)
jmp 0x18180
jmp 0x18182
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x184(%rsp)
jmp 0x1800a
jmp 0x1819a
movl 0x180(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x180(%rsp)
jmp 0x17e58
jmp 0x181b2
movl 0x18c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18c(%rsp)
jmp 0x17e39
testb $0x1, 0x15f(%rsp)
jne 0x18640
movl $0x30, %edi
callq 0x4500
movq %rax, 0xf1c0(%rsp)
cmpq $0x0, 0xf1c0(%rsp)
setne %al
movzbl %al, %edi
andl $0x1, %edi
movl $0x1, %esi
callq 0xc400
movl 0xf1bc(%rsp), %ecx
movq 0xf1c0(%rsp), %rax
movl %ecx, (%rax)
movq 0xf1c0(%rsp), %rax
movslq (%rax), %rdi
shlq $0x6, %rdi
callq 0x4500
movq %rax, %rcx
movq 0xf1c0(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0xf1c0(%rsp), %rax
cmpq $0x0, 0x8(%rax)
setne %al
movzbl %al, %edi
andl $0x1, %edi
movl $0x1, %esi
callq 0xc400
movl $0x0, 0x18c(%rsp)
movl 0x18c(%rsp), %eax
cmpl 0xf1bc(%rsp), %eax
jge 0x184eb
movq 0xf1c0(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x18c(%rsp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, 0x38(%rsp)
movslq 0x18c(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movq 0x38(%rsp), %rax
movsd %xmm0, (%rax)
movslq 0x18c(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movq 0x38(%rsp), %rax
movsd %xmm0, 0x8(%rax)
movslq 0x18c(%rsp), %rcx
leaq 0xb1b0(%rsp), %rax
shlq $0x6, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movq 0x38(%rsp), %rax
movsd %xmm0, 0x10(%rax)
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq 0x10(%rax), %rax
movsd (%rax), %xmm0
movq 0x38(%rsp), %rax
movsd %xmm0, 0x18(%rax)
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq 0x10(%rax), %rax
movsd 0x8(%rax), %xmm0
movq 0x38(%rsp), %rax
movsd %xmm0, 0x20(%rax)
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq 0x10(%rax), %rax
movsd 0x10(%rax), %xmm0
movq 0x38(%rsp), %rax
movsd %xmm0, 0x28(%rax)
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movl 0x8(%rax), %ecx
movq 0x38(%rsp), %rax
movl %ecx, 0x30(%rax)
movq 0x38(%rsp), %rax
movslq 0x30(%rax), %rax
imulq $0x18, %rax, %rdi
callq 0x4500
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x38(%rsp), %rax
cmpq $0x0, 0x38(%rax)
setne %al
movzbl %al, %edi
andl $0x1, %edi
movl $0x1, %esi
callq 0xc400
movl $0x0, 0x184(%rsp)
movl 0x184(%rsp), %eax
movslq 0x18c(%rsp), %rcx
movq 0xa9b0(%rsp,%rcx,8), %rcx
cmpl 0x8(%rcx), %eax
jae 0x184d3
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq 0x10(%rax), %rax
movslq 0x184(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rax
movslq 0x184(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, (%rax)
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq 0x10(%rax), %rax
movslq 0x184(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rax
movslq 0x184(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq 0x10(%rax), %rax
movslq 0x184(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd 0x10(%rax), %xmm0
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rax
movslq 0x184(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x10(%rax)
movl 0x184(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x184(%rsp)
jmp 0x183d0
jmp 0x184d5
movl 0x18c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18c(%rsp)
jmp 0x18263
movl 0xa9ac(%rsp), %ecx
movq 0xf1c0(%rsp), %rax
movl %ecx, 0x10(%rax)
movq 0xf1c0(%rsp), %rax
movslq 0x10(%rax), %rax
imulq $0x90, %rax, %rdi
callq 0x4500
movq %rax, %rcx
movq 0xf1c0(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0xf1c0(%rsp), %rax
cmpq $0x0, 0x18(%rax)
setne %al
movzbl %al, %edi
andl $0x1, %edi
movl $0x1, %esi
callq 0xc400
movq 0xf1c0(%rsp), %rax
movq 0x18(%rax), %rdi
leaq 0x19a0(%rsp), %rsi
movq 0xf1c0(%rsp), %rax
movslq 0x10(%rax), %rax
imulq $0x90, %rax, %rdx
callq 0x4310
movl 0x199c(%rsp), %ecx
movq 0xf1c0(%rsp), %rax
movl %ecx, 0x20(%rax)
movq 0xf1c0(%rsp), %rax
movslq 0x20(%rax), %rax
imulq $0x18, %rax, %rdi
callq 0x4500
movq %rax, %rcx
movq 0xf1c0(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0xf1c0(%rsp), %rax
cmpq $0x0, 0x28(%rax)
setne %al
movzbl %al, %edi
andl $0x1, %edi
movl $0x1, %esi
callq 0xc400
movq 0xf1c0(%rsp), %rax
movq 0x28(%rax), %rdi
leaq 0x190(%rsp), %rsi
movq 0xf1c0(%rsp), %rax
movslq 0x20(%rax), %rax
imulq $0x18, %rax, %rdx
callq 0x4310
movsd 0x160(%rsp), %xmm0
movsd 0x168(%rsp), %xmm1
movsd 0x170(%rsp), %xmm2
movq 0xf1c0(%rsp), %rax
movl (%rax), %edx
movq 0xf1c0(%rsp), %rax
movl 0x10(%rax), %ecx
movq 0xf1c0(%rsp), %rax
movl 0x20(%rax), %r8d
movl $0x3, %edi
leaq 0x154f5(%rip), %rsi     # 0x2db2c
movb $0x3, %al
callq 0xc0f0
jmp 0x1866f
movq $0x0, 0xf1c0(%rsp)
movq 0xf1d0(%rsp), %rax
movl (%rax), %esi
movq 0xf1d0(%rsp), %rax
movl 0x4(%rax), %edx
leaq 0x15509(%rip), %rdi     # 0x2db71
movb $0x0, %al
callq 0xba80
movl $0x0, 0x18c(%rsp)
movl 0x18c(%rsp), %eax
cmpl 0xf1bc(%rsp), %eax
jge 0x186c3
movslq 0x18c(%rsp), %rax
movq 0xa9b0(%rsp,%rax,8), %rax
movq %rax, (%rsp)
cmpq $0x0, %rax
je 0x186ae
movq (%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x186b0
movl 0x18c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18c(%rsp)
jmp 0x1867a
movq 0xf1c0(%rsp), %rax
addq $0xf1d8, %rsp           # imm = 0xF1D8
retq
movq 0x90(%rsp), %rdi
callq 0x4650