// File: /workspace/github_cpp_makefile_star2_O2/FreeSlave[P]vhlt/hlvis/flow.cpp
// Function: WindingDist(winding_t const**)
vec_t WindingDist (const winding_t *w[2])
{
	vec_t minsqrdist = 99999999.0 * 99999999.0;
	vec_t sqrdist;
	int a, b;
	// point to point
	for (a = 0; a < w[0]->numpoints; a++)
	{
		for (b = 0; b < w[1]->numpoints; b++)
		{
			vec3_t v;
			VectorSubtract (w[0]->points[a], w[1]->points[b], v);
			sqrdist = DotProduct (v, v);
			if (sqrdist < minsqrdist)
			{
				minsqrdist = sqrdist;
			}
		}
	}
	// point to edge
	for (int side = 0; side < 2; side++)
	{
		for (a = 0; a < w[side]->numpoints; a++)
		{
			for (b = 0; b < w[!side]->numpoints; b++)
			{
				const vec3_t &p = w[side]->points[a];
				const vec3_t &p1 = w[!side]->points[b];
				const vec3_t &p2 = w[!side]->points[(b + 1) % w[!side]->numpoints];
				vec3_t delta;
				vec_t frac;
				vec3_t v;
				VectorSubtract (p2, p1, delta);
				if (VectorNormalize (delta) <= ON_EPSILON)
				{
					continue;
				}
				frac = DotProduct (p, delta) - DotProduct (p1, delta);
				if (frac <= ON_EPSILON || frac >= (DotProduct (p2, delta) - DotProduct (p1, delta)) - ON_EPSILON)
				{
					// p1 or p2 is closest to p
					continue;
				}
				VectorMA (p1, frac, delta, v);
				VectorSubtract (p, v, v);
				sqrdist = DotProduct (v, v);
				if (sqrdist < minsqrdist)
				{
					minsqrdist = sqrdist;
				}
			}
		}
	}
	// edge to edge
	for (a = 0; a < w[0]->numpoints; a++)
	{
		for (b = 0; b < w[1]->numpoints; b++)
		{
			const vec3_t &p1 = w[0]->points[a];
			const vec3_t &p2 = w[0]->points[(a + 1) % w[0]->numpoints];
			const vec3_t &p3 = w[1]->points[b];
			const vec3_t &p4 = w[1]->points[(b + 1) % w[1]->numpoints];
			vec3_t delta1;
			vec3_t delta2;
			vec3_t normal;
			vec3_t normal1;
			vec3_t normal2;
			VectorSubtract (p2, p1, delta1);
			VectorSubtract (p4, p3, delta2);
			CrossProduct (delta1, delta2, normal);
			if (!VectorNormalize (normal))
			{
				continue;
			}
			CrossProduct (normal, delta1, normal1); // same direction as delta2
			CrossProduct (delta2, normal, normal2); // same direction as delta1
			if (VectorNormalize (normal1) <= ON_EPSILON || VectorNormalize (normal2) <= ON_EPSILON)
			{
				continue;
			}
			if (DotProduct (p3, normal1) >= DotProduct (p1, normal1) - ON_EPSILON ||
				DotProduct (p4, normal1) <= DotProduct (p1, normal1) + ON_EPSILON ||
				DotProduct (p1, normal2) >= DotProduct (p3, normal2) - ON_EPSILON ||
				DotProduct (p2, normal2) <= DotProduct (p3, normal2) + ON_EPSILON )
			{
				// the edges are not crossing when viewed along normal
				continue;
			}
			sqrdist = DotProduct (p3, normal) - DotProduct (p1, normal);
			sqrdist = sqrdist * sqrdist;
			if (sqrdist < minsqrdist)
			{
				minsqrdist = sqrdist;
			}
		}
	}
	// point to face and edge to face
	for (int side = 0; side < 2; side++)
	{
		vec3_t planenormal;
		vec_t planedist;
		vec3_t *boundnormals;
		vec_t *bounddists;
		if (!BestNormalFromWinding (w[!side]->points, w[!side]->numpoints, planenormal))
		{
			continue;
		}
		planedist = DotProduct (planenormal, w[!side]->points[0]);
		hlassume (boundnormals = (vec3_t *)malloc (w[!side]->numpoints * sizeof (vec3_t)), assume_NoMemory);
		hlassume (bounddists = (vec_t *)malloc (w[!side]->numpoints * sizeof (vec_t)), assume_NoMemory);
		// build boundaries
		for (b = 0; b < w[!side]->numpoints; b++)
		{
			vec3_t v;
			const vec3_t &p1 = w[!side]->points[b];
			const vec3_t &p2 = w[!side]->points[(b + 1) % w[!side]->numpoints];
			VectorSubtract (p2, p1, v);
			CrossProduct (v, planenormal, boundnormals[b]);
			if (!VectorNormalize (boundnormals[b]))
			{
				bounddists[b] = 1.0;
			}
			else
			{
				bounddists[b] = DotProduct (p1, boundnormals[b]);
			}
		}
		for (a = 0; a < w[side]->numpoints; a++)
		{
			const vec3_t &p = w[side]->points[a];
			for (b = 0; b < w[!side]->numpoints; b++)
			{
				if (DotProduct (p, boundnormals[b]) - bounddists[b] >= -ON_EPSILON)
				{
					break;
				}
			}
			if (b < w[!side]->numpoints)
			{
				continue;
			}
			sqrdist = DotProduct (p, planenormal) - planedist;
			sqrdist = sqrdist * sqrdist;
			if (sqrdist < minsqrdist)
			{
				minsqrdist = sqrdist;
			}
		}
		for (a = 0; a < w[side]->numpoints; a++)
		{
			const vec3_t &p1 = w[side]->points[a];
			const vec3_t &p2 = w[side]->points[(a + 1) % w[side]->numpoints];
			vec_t dist1 = DotProduct (p1, planenormal) - planedist;
			vec_t dist2 = DotProduct (p2, planenormal) - planedist;
			vec3_t delta;
			vec_t frac;
			vec3_t v;
			if (dist1 > ON_EPSILON && dist2 < -ON_EPSILON || dist1 < -ON_EPSILON && dist2 > ON_EPSILON)
			{
				frac = dist1 / (dist1 - dist2);
				VectorSubtract (p2, p1, delta);
				VectorMA (p1, frac, delta, v);
				for (b = 0; b < w[!side]->numpoints; b++)
				{
					if (DotProduct (v, boundnormals[b]) - bounddists[b] >= -ON_EPSILON)
					{
						break;
					}
				}
				if (b < w[!side]->numpoints)
				{
					continue;
				}
				minsqrdist = 0;
			}
		}
		free (boundnormals);
		free (bounddists);
	}
	return (sqrt (minsqrdist));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %r15
movq (%rdi), %rax
movl 0x4(%rax), %ecx
addq $0x8, %rax
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
movss 0x7b17(%rip), %xmm0     # 0x133f0
xorl %esi, %esi
cmpq %rcx, %rsi
je 0xb94e
movq 0x8(%r15), %rdi
movl 0x4(%rdi), %r9d
imulq $0xc, %rsi, %r8
addq %rax, %r8
testl %r9d, %r9d
cmovlel %edx, %r9d
imulq $0xc, %r9, %r9
xorl %r10d, %r10d
cmpq %r10, %r9
je 0xb949
movss (%r8), %xmm3
movss 0x4(%r8), %xmm1
subss 0x8(%rdi,%r10), %xmm3
subss 0xc(%rdi,%r10), %xmm1
movss 0x8(%r8), %xmm2
subss 0x10(%rdi,%r10), %xmm2
mulss %xmm1, %xmm1
mulss %xmm3, %xmm3
addss %xmm1, %xmm3
mulss %xmm2, %xmm2
addss %xmm3, %xmm2
minss %xmm0, %xmm2
addq $0xc, %r10
movaps %xmm2, %xmm0
jmp 0xb8fd
incq %rsi
jmp 0xb8db
xorl %edx, %edx
movq %r15, 0x8(%rsp)
cmpq $0x2, %rdx
je 0xbb9c
movl %edx, %eax
xorq $0x1, %rax
movq %rax, 0x30(%rsp)
xorl %ecx, %ecx
movq (%r15,%rdx,8), %rax
movslq 0x4(%rax), %rax
cmpq %rax, %rcx
jge 0xbb94
movq %rcx, 0x80(%rsp)
imulq $0xc, %rcx, %rax
movq %rax, 0x70(%rsp)
pushq $0x10
popq %rbp
xorl %ebx, %ebx
movq 0x30(%rsp), %rax
movq (%r15,%rax,8), %r14
movslq 0x4(%r14), %rcx
cmpq %rcx, %rbx
jge 0xbb84
movss %xmm0, 0x4(%rsp)
movq %rdx, %r12
movq (%r15,%rdx,8), %r13
leal 0x1(%rbx), %eax
cltd
idivl %ecx
imulq $0xc, %rdx, %r15
movss 0x8(%r14,%r15), %xmm0
subss -0x8(%r14,%rbp), %xmm0
movss %xmm0, 0x10(%rsp)
movss 0xc(%r14,%r15), %xmm0
subss -0x4(%r14,%rbp), %xmm0
movss %xmm0, 0x14(%rsp)
movss 0x10(%r14,%r15), %xmm0
subss (%r14,%rbp), %xmm0
movss %xmm0, 0x18(%rsp)
leaq 0x10(%rsp), %rdi
callq 0xae51
cvtss2sd %xmm0, %xmm0
movsd 0x79b6(%rip), %xmm12    # 0x133c8
ucomisd %xmm0, %xmm12
jae 0xbb5d
movq 0x70(%rsp), %rax
movss 0x8(%r13,%rax), %xmm0
movss 0xc(%r13,%rax), %xmm2
movss 0x10(%rsp), %xmm5
movss 0x14(%rsp), %xmm3
movss 0x10(%r13,%rax), %xmm1
movss 0x18(%rsp), %xmm4
movss -0x8(%r14,%rbp), %xmm8
movss -0x4(%r14,%rbp), %xmm7
movss (%r14,%rbp), %xmm6
movaps %xmm3, %xmm9
shufps $0x0, %xmm3, %xmm9      # xmm9 = xmm9[0,0],xmm3[0,0]
movaps %xmm2, %xmm10
unpcklps %xmm7, %xmm10           # xmm10 = xmm10[0],xmm7[0],xmm10[1],xmm7[1]
mulps %xmm9, %xmm10
movaps %xmm0, %xmm9
unpcklps %xmm8, %xmm9            # xmm9 = xmm9[0],xmm8[0],xmm9[1],xmm8[1]
movaps %xmm5, %xmm11
shufps $0x0, %xmm5, %xmm11     # xmm11 = xmm11[0,0],xmm5[0,0]
mulps %xmm9, %xmm11
addps %xmm10, %xmm11
movaps %xmm1, %xmm10
unpcklps %xmm6, %xmm10           # xmm10 = xmm10[0],xmm6[0],xmm10[1],xmm6[1]
movaps %xmm4, %xmm9
shufps $0x0, %xmm4, %xmm9      # xmm9 = xmm9[0,0],xmm4[0,0]
mulps %xmm10, %xmm9
addps %xmm11, %xmm9
movaps %xmm9, %xmm11
shufps $0x55, %xmm9, %xmm11    # xmm11 = xmm11[1,1],xmm9[1,1]
subss %xmm11, %xmm9
cvtss2sd %xmm9, %xmm10
ucomisd %xmm10, %xmm12
jae 0xbb5d
leaq (%r14,%r15), %rax
addq $0x8, %rax
movss 0x4(%rax), %xmm12
mulss %xmm3, %xmm12
movss (%rax), %xmm13
mulss %xmm5, %xmm13
addss %xmm12, %xmm13
movss 0x8(%rax), %xmm12
mulss %xmm4, %xmm12
addss %xmm13, %xmm12
subss %xmm11, %xmm12
cvtss2sd %xmm12, %xmm11
addsd 0x78c9(%rip), %xmm11    # 0x133d0
ucomisd %xmm11, %xmm10
movq %r12, %rdx
jae 0xbb77
mulss %xmm9, %xmm5
addss %xmm8, %xmm5
mulss %xmm9, %xmm3
addss %xmm7, %xmm3
mulss %xmm9, %xmm4
addss %xmm6, %xmm4
subss %xmm5, %xmm0
subss %xmm3, %xmm2
subss %xmm4, %xmm1
mulss %xmm2, %xmm2
mulss %xmm0, %xmm0
addss %xmm2, %xmm0
mulss %xmm1, %xmm1
addss %xmm0, %xmm1
minss 0x4(%rsp), %xmm1
movaps %xmm1, %xmm0
movq 0x8(%rsp), %r15
jmp 0xbb6b
movq 0x8(%rsp), %r15
movss 0x4(%rsp), %xmm0
movq %r12, %rdx
addq $0xc, %rbp
incq %rbx
jmp 0xb993
movq 0x8(%rsp), %r15
movss 0x4(%rsp), %xmm0
jmp 0xbb6b
movq 0x80(%rsp), %rcx
incq %rcx
jmp 0xb96c
incq %rdx
jmp 0xb955
xorl %eax, %eax
movq (%r15), %rcx
movslq 0x4(%rcx), %rcx
cmpq %rcx, %rax
jge 0xbf94
imulq $0xc, %rax, %rcx
movq %rcx, 0x48(%rsp)
incq %rax
pushq $0x8
popq %r13
xorl %r12d, %r12d
movq %rax, 0x28(%rsp)
movq 0x8(%r15), %rbp
movslq 0x4(%rbp), %rcx
cmpq %rcx, %r12
jge 0xbb9e
movss %xmm0, 0x4(%rsp)
movq (%r15), %r15
cltd
idivl 0x4(%r15)
imulq $0xc, %rdx, %r14
leal 0x1(%r12), %eax
cltd
idivl %ecx
imulq $0xc, %rdx, %rbx
movss 0x8(%r15,%r14), %xmm0
movss 0xc(%r15,%r14), %xmm3
movss 0x10(%r15,%r14), %xmm5
unpcklps %xmm0, %xmm5            # xmm5 = xmm5[0],xmm0[0],xmm5[1],xmm0[1]
movq 0x48(%rsp), %rax
movss 0x8(%r15,%rax), %xmm0
movss 0xc(%r15,%rax), %xmm1
movss 0x10(%r15,%rax), %xmm2
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
subps %xmm2, %xmm5
movaps %xmm5, %xmm6
shufps $0x55, %xmm5, %xmm6     # xmm6 = xmm6[1,1],xmm5[1,1]
movsd 0xc(%rbp,%rbx), %xmm2
movsd 0x4(%rbp,%r13), %xmm0
subps %xmm0, %xmm2
movss 0x8(%rbp,%rbx), %xmm0
unpcklps %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1]
movss (%rbp,%r13), %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
subps %xmm1, %xmm3
movaps %xmm3, %xmm4
shufps $0x55, %xmm3, %xmm4     # xmm4 = xmm4[1,1],xmm3[1,1]
movaps %xmm2, %xmm0
mulps %xmm5, %xmm0
movaps %xmm5, 0xa0(%rsp)
movaps %xmm5, %xmm1
shufps $0x10, %xmm2, %xmm1     # xmm1 = xmm1[0,0],xmm2[1,0]
shufps $0xe2, %xmm2, %xmm1     # xmm1 = xmm1[2,0],xmm2[2,3]
mulps %xmm3, %xmm1
subps %xmm0, %xmm1
movlps %xmm1, 0x10(%rsp)
movaps %xmm4, 0x80(%rsp)
movaps %xmm4, %xmm0
movaps %xmm3, 0x30(%rsp)
mulss %xmm3, %xmm0
movaps %xmm6, 0x90(%rsp)
movaps %xmm6, %xmm1
movaps %xmm2, 0x70(%rsp)
mulss %xmm2, %xmm1
subss %xmm0, %xmm1
movss %xmm1, 0x18(%rsp)
leaq 0x10(%rsp), %rdi
callq 0xae51
ucomiss 0x43ac(%rip), %xmm0     # 0x10070
jne 0xbccc
jnp 0xbf78
movss 0x10(%rsp), %xmm1
movsd 0x14(%rsp), %xmm0
movaps %xmm1, %xmm2
shufps $0xd4, %xmm0, %xmm2     # xmm2 = xmm2[0,1],xmm0[1,3]
shufps $0x52, %xmm0, %xmm2     # xmm2 = xmm2[2,0],xmm0[1,1]
movaps 0x30(%rsp), %xmm4
movaps %xmm4, %xmm3
movaps 0xa0(%rsp), %xmm5
unpcklps %xmm5, %xmm3            # xmm3 = xmm3[0],xmm5[0],xmm3[1],xmm5[1]
mulps %xmm2, %xmm3
mulps %xmm0, %xmm5
subps %xmm3, %xmm5
movlps %xmm5, 0x60(%rsp)
movaps 0x90(%rsp), %xmm5
mulss %xmm0, %xmm5
movaps %xmm4, %xmm3
mulss %xmm1, %xmm3
subss %xmm5, %xmm3
movss %xmm3, 0x68(%rsp)
movaps 0x70(%rsp), %xmm3
shufps $0x55, %xmm3, %xmm4     # xmm4 = xmm4[1,1],xmm3[1,1]
shufps $0x52, %xmm3, %xmm4     # xmm4 = xmm4[2,0],xmm3[1,1]
mulps %xmm0, %xmm4
mulps %xmm3, %xmm2
subps %xmm4, %xmm2
movlps %xmm2, 0x50(%rsp)
mulss %xmm1, %xmm3
movaps 0x80(%rsp), %xmm1
mulss %xmm0, %xmm1
subss %xmm3, %xmm1
movss %xmm1, 0x58(%rsp)
leaq 0x60(%rsp), %rdi
callq 0xae51
cvtss2sd %xmm0, %xmm0
movsd 0x765c(%rip), %xmm1     # 0x133c8
ucomisd %xmm0, %xmm1
jae 0xbf78
leaq 0x50(%rsp), %rdi
callq 0xae51
movsd 0x763f(%rip), %xmm13    # 0x133c8
cvtss2sd %xmm0, %xmm0
ucomisd %xmm0, %xmm13
jae 0xbf78
movq 0x48(%rsp), %rax
addq %r15, %rax
addq $0x8, %rax
movss (%rbp,%r13), %xmm12
movss 0x4(%rbp,%r13), %xmm2
movss 0x60(%rsp), %xmm6
movss 0x64(%rsp), %xmm7
movaps %xmm2, %xmm1
mulss %xmm7, %xmm1
movaps %xmm12, %xmm3
mulss %xmm6, %xmm3
addss %xmm1, %xmm3
movss 0x8(%rbp,%r13), %xmm1
movss 0x68(%rsp), %xmm8
movaps %xmm1, %xmm4
mulss %xmm8, %xmm4
addss %xmm3, %xmm4
cvtss2sd %xmm4, %xmm10
movss (%rax), %xmm3
movss 0x4(%rax), %xmm5
movaps %xmm7, %xmm4
mulss %xmm5, %xmm4
movaps %xmm3, %xmm9
mulss %xmm6, %xmm9
addss %xmm4, %xmm9
movss 0x8(%rax), %xmm4
movaps %xmm4, %xmm11
mulss %xmm8, %xmm11
addss %xmm9, %xmm11
cvtss2sd %xmm11, %xmm9
movaps %xmm9, %xmm11
addsd 0x759d(%rip), %xmm11    # 0x133d0
ucomisd %xmm11, %xmm10
movss 0x4(%rsp), %xmm0
movq 0x28(%rsp), %rax
jae 0xbf71
leaq (%rbx,%rbp), %rcx
addq $0x8, %rcx
mulss 0x4(%rcx), %xmm7
mulss (%rcx), %xmm6
addss %xmm7, %xmm6
mulss 0x8(%rcx), %xmm8
addss %xmm6, %xmm8
cvtss2sd %xmm8, %xmm6
addsd %xmm13, %xmm9
ucomisd %xmm6, %xmm9
jae 0xbf71
movss 0x50(%rsp), %xmm6
movss 0x54(%rsp), %xmm7
movaps %xmm5, %xmm8
mulss %xmm7, %xmm8
movaps %xmm3, %xmm9
mulss %xmm6, %xmm9
addss %xmm8, %xmm9
movss 0x58(%rsp), %xmm8
movaps %xmm4, %xmm10
mulss %xmm8, %xmm10
addss %xmm9, %xmm10
cvtss2sd %xmm10, %xmm10
movaps %xmm2, %xmm9
mulss %xmm7, %xmm9
movaps %xmm12, %xmm11
mulss %xmm6, %xmm11
addss %xmm9, %xmm11
movaps %xmm1, %xmm9
mulss %xmm8, %xmm9
addss %xmm11, %xmm9
cvtss2sd %xmm9, %xmm9
movaps %xmm9, %xmm11
addsd 0x74de(%rip), %xmm11    # 0x133d0
ucomisd %xmm11, %xmm10
jae 0xbf71
leaq (%r15,%r14), %rcx
addq $0x8, %rcx
mulss 0x4(%rcx), %xmm7
mulss (%rcx), %xmm6
addss %xmm7, %xmm6
mulss 0x8(%rcx), %xmm8
addss %xmm6, %xmm8
cvtss2sd %xmm8, %xmm6
addsd %xmm13, %xmm9
ucomisd %xmm6, %xmm9
jae 0xbf71
unpcklps %xmm5, %xmm2            # xmm2 = xmm2[0],xmm5[0],xmm2[1],xmm5[1]
movaps 0x10(%rsp), %xmm5
movaps %xmm5, %xmm6
shufps $0x55, %xmm5, %xmm6     # xmm6 = xmm6[1,1],xmm5[1,1]
mulps %xmm2, %xmm6
unpcklps %xmm3, %xmm12           # xmm12 = xmm12[0],xmm3[0],xmm12[1],xmm3[1]
movaps %xmm5, %xmm2
shufps $0x0, %xmm5, %xmm2      # xmm2 = xmm2[0,0],xmm5[0,0]
mulps %xmm12, %xmm2
addps %xmm6, %xmm2
unpcklps %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
shufps $0xaa, %xmm5, %xmm5     # xmm5 = xmm5[2,2,2,2]
mulps %xmm1, %xmm5
addps %xmm2, %xmm5
movaps %xmm5, %xmm1
shufps $0x55, %xmm5, %xmm1     # xmm1 = xmm1[1,1],xmm5[1,1]
subss %xmm1, %xmm5
mulss %xmm5, %xmm5
minss %xmm0, %xmm5
movaps %xmm5, %xmm0
movq 0x8(%rsp), %r15
jmp 0xbf88
movq 0x8(%rsp), %r15
movss 0x4(%rsp), %xmm0
movq 0x28(%rsp), %rax
addq $0xc, %r13
incq %r12
jmp 0xbbc6
xorl %ebx, %ebx
leaq 0x10(%rsp), %r12
cmpq $0x2, %rbx
je 0xc407
movss %xmm0, 0x4(%rsp)
movl %ebx, %r14d
xorq $0x1, %r14
movq (%r15,%r14,8), %rdi
movl 0x4(%rdi), %esi
addq $0x8, %rdi
movq %r12, %rdx
callq 0xb60a
testb %al, %al
je 0xc3f9
movq %rbx, 0xa0(%rsp)
movss 0x10(%rsp), %xmm0
movaps %xmm0, 0x70(%rsp)
movq (%r15,%r14,8), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, 0x90(%rsp)
movss 0x10(%rax), %xmm0
movss %xmm0, 0x48(%rsp)
movsd 0x14(%rsp), %xmm1
movaps %xmm1, 0x30(%rsp)
movss 0xc(%rax), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, 0x28(%rsp)
movslq 0x4(%rax), %rax
imulq $0xc, %rax, %rdi
callq 0x3320
movq %r15, %rbx
movq %rax, %r15
xorl %edi, %edi
testq %rax, %rax
setne %dil
pushq $0x1
popq %rbp
movl %ebp, %esi
callq 0x80fb
movq (%rbx,%r14,8), %rax
movslq 0x4(%rax), %rdi
shlq $0x2, %rdi
callq 0x3320
movq %rax, %r12
xorl %edi, %edi
testq %rax, %rax
setne %dil
movl %ebp, %esi
callq 0x80fb
movaps 0x70(%rsp), %xmm15
movaps %xmm15, %xmm0
movaps 0x30(%rsp), %xmm1
shufps $0xd4, %xmm1, %xmm0     # xmm0 = xmm0[0,1],xmm1[1,3]
shufps $0xe2, %xmm1, %xmm0     # xmm0 = xmm0[2,0],xmm1[2,3]
movaps %xmm0, 0x80(%rsp)
xorl %ebx, %ebx
xorl %ebp, %ebp
movsd 0x733b(%rip), %xmm13    # 0x133c8
movq 0x8(%rsp), %rax
movq (%rax,%r14,8), %r13
movslq 0x4(%r13), %rcx
cmpq %rcx, %rbp
jge 0xc178
leal 0x1(%rbp), %eax
cltd
idivl %ecx
imulq $0xc, %rdx, %rax
movss 0x8(%r13,%rax), %xmm0
subss 0x8(%r13,%rbx), %xmm0
leaq (%r15,%rbx), %rdi
movsd 0xc(%r13,%rax), %xmm1
movsd 0xc(%r13,%rbx), %xmm2
subps %xmm2, %xmm1
movaps %xmm0, %xmm2
shufps $0xd4, %xmm1, %xmm2     # xmm2 = xmm2[0,1],xmm1[1,3]
shufps $0x52, %xmm1, %xmm2     # xmm2 = xmm2[2,0],xmm1[1,1]
movaps 0x30(%rsp), %xmm4
mulps %xmm4, %xmm2
movaps %xmm15, %xmm3
mulss %xmm1, %xmm3
mulps 0x80(%rsp), %xmm1
subps %xmm2, %xmm1
movlps %xmm1, (%r15,%rbx)
mulss %xmm4, %xmm0
subss %xmm3, %xmm0
movss %xmm0, 0x8(%r15,%rbx)
callq 0xae51
ucomiss 0x3f5a(%rip), %xmm0     # 0x10070
movss 0x3f46(%rip), %xmm0     # 0x10064
jne 0xc122
jnp 0xc157
addq $0x8, %r13
movss 0x4(%r13,%rbx), %xmm0
mulss 0x4(%r15,%rbx), %xmm0
movss (%r13,%rbx), %xmm1
mulss (%r15,%rbx), %xmm1
addss %xmm0, %xmm1
movss 0x8(%r13,%rbx), %xmm0
mulss 0x8(%r15,%rbx), %xmm0
addss %xmm1, %xmm0
movss %xmm0, (%r12,%rbp,4)
addq $0xc, %rbx
incq %rbp
movsd 0x725b(%rip), %xmm13    # 0x133c8
movaps 0x70(%rsp), %xmm15
jmp 0xc08d
movss 0x90(%rsp), %xmm2
mulss %xmm15, %xmm2
addss 0x28(%rsp), %xmm2
movaps 0x30(%rsp), %xmm0
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movaps %xmm0, %xmm1
mulss 0x48(%rsp), %xmm1
movq 0x8(%rsp), %rax
movq 0xa0(%rsp), %rbx
movq (%rax,%rbx,8), %rsi
movl 0x4(%rsi), %edi
addq $0x8, %rsi
testl %ecx, %ecx
movl $0x0, %r8d
cmovgl %ecx, %r8d
testl %edi, %edi
movl $0x0, %r9d
cmovgl %edi, %r9d
addss %xmm2, %xmm1
movq %r15, %r10
addq $0x8, %r10
xorl %eax, %eax
movss 0x4(%rsp), %xmm12
cmpq %r9, %rax
je 0xc27e
imulq $0xc, %rax, %rdx
leaq (%rsi,%rdx), %rcx
movss (%rsi,%rdx), %xmm2
movq %r10, %rdx
xorl %r11d, %r11d
cmpq %r11, %r8
je 0xc244
movss 0x4(%rcx), %xmm3
movss 0x8(%rcx), %xmm4
mulss -0x4(%rdx), %xmm3
movss -0x8(%rdx), %xmm5
mulss %xmm2, %xmm5
addss %xmm3, %xmm5
mulss (%rdx), %xmm4
addss %xmm5, %xmm4
subss (%r12,%r11,4), %xmm4
cvtss2sd %xmm4, %xmm3
incq %r11
addq $0xc, %rdx
ucomisd 0x7190(%rip), %xmm3     # 0x133d0
jb 0xc1fe
jmp 0xc276
movss 0x4(%rcx), %xmm3
mulss 0x30(%rsp), %xmm3
mulss %xmm15, %xmm2
addss %xmm3, %xmm2
movss 0x8(%rcx), %xmm3
mulss %xmm0, %xmm3
addss %xmm2, %xmm3
subss %xmm1, %xmm3
mulss %xmm3, %xmm3
minss %xmm12, %xmm3
movaps %xmm3, %xmm12
incq %rax
jmp 0xc1e2
xorl %ecx, %ecx
cmpq %r9, %rcx
je 0xc3d8
imulq $0xc, %rcx, %r11
incq %rcx
movl %ecx, %eax
cltd
idivl %edi
imulq $0xc, %rdx, %rax
movss (%rsi,%r11), %xmm6
movss 0x4(%rsi,%r11), %xmm5
movaps 0x30(%rsp), %xmm4
movaps %xmm4, %xmm2
mulss %xmm5, %xmm2
movaps %xmm6, %xmm3
mulss %xmm15, %xmm3
addss %xmm2, %xmm3
movss 0x8(%rsi,%r11), %xmm7
movaps %xmm7, %xmm8
mulss %xmm0, %xmm8
addss %xmm3, %xmm8
subss %xmm1, %xmm8
movss (%rsi,%rax), %xmm2
movss 0x4(%rsi,%rax), %xmm3
mulss %xmm3, %xmm4
movaps %xmm2, %xmm10
mulss %xmm15, %xmm10
addss %xmm4, %xmm10
movss 0x8(%rsi,%rax), %xmm4
movaps %xmm4, %xmm9
mulss %xmm0, %xmm9
addss %xmm10, %xmm9
subss %xmm1, %xmm9
cvtss2sd %xmm8, %xmm11
ucomisd %xmm13, %xmm11
cvtss2sd %xmm9, %xmm10
jbe 0xc32f
movsd 0x70a8(%rip), %xmm14    # 0x133d0
ucomisd %xmm10, %xmm14
ja 0xc34e
movsd 0x7098(%rip), %xmm14    # 0x133d0
ucomisd %xmm11, %xmm14
jbe 0xc280
ucomisd %xmm13, %xmm10
jbe 0xc280
movaps %xmm8, %xmm10
subss %xmm9, %xmm10
divss %xmm10, %xmm8
subss %xmm6, %xmm2
subss %xmm5, %xmm3
subss %xmm7, %xmm4
mulss %xmm8, %xmm2
addss %xmm6, %xmm2
mulss %xmm8, %xmm3
addss %xmm5, %xmm3
mulss %xmm8, %xmm4
addss %xmm7, %xmm4
movq %r10, %rax
xorl %edx, %edx
cmpq %rdx, %r8
je 0xc3cf
movss -0x4(%rax), %xmm5
mulss %xmm3, %xmm5
movss -0x8(%rax), %xmm6
mulss %xmm2, %xmm6
addss %xmm5, %xmm6
movss (%rax), %xmm5
mulss %xmm4, %xmm5
addss %xmm6, %xmm5
subss (%r12,%rdx,4), %xmm5
cvtss2sd %xmm5, %xmm5
incq %rdx
addq $0xc, %rax
ucomisd 0x7008(%rip), %xmm5     # 0x133d0
jb 0xc388
jmp 0xc280
xorps %xmm12, %xmm12
jmp 0xc280
movss %xmm12, 0x4(%rsp)
movq %r15, %rdi
callq 0x32c0
movq %r12, %rdi
callq 0x32c0
movq 0x8(%rsp), %r15
leaq 0x10(%rsp), %r12
incq %rbx
movss 0x4(%rsp), %xmm0
jmp 0xbf9b
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0xc415
sqrtss %xmm0, %xmm0
jmp 0xc41a
callq 0x3440
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq