// File: /workspace/github_c_makefile_star2_O1/jonof[P]jftekwar/jfbuild/src/polymost.c
// Function: domost
static void domost (float x0, float y0, float x1, float y1, int polymethod)
{
	double dpx[4], dpy[4];
	float d, f, n, t, slop, dx, dx0, dx1, nx, nx0, ny0, nx1, ny1;
	float spx[4], spy[4], cy[2], cv[2];
	int i, j, k, z, ni, vcnt = 0, scnt, newi, dir, spt[4];

#ifdef DEBUGGINGAIDS
	polymostcallcounts.domost++;
#endif
	polymethod |= METH_LAYERS;

	if (x0 < x1)
	{
		dir = 1; //clip dmost (floor)
		y0 -= .01; y1 -= .01;
	}
	else
	{
		if (x0 == x1) return;
		f = x0; x0 = x1; x1 = f;
		f = y0; y0 = y1; y1 = f;
		dir = 0; //clip umost (ceiling)
		//y0 += .01; y1 += .01; //necessary?
	}

	slop = (y1-y0)/(x1-x0);
	for(i=vsp[0].n;i;i=newi)
	{
		newi = vsp[i].n; nx0 = vsp[i].x; nx1 = vsp[newi].x;
		if ((x0 >= nx1) || (nx0 >= x1) || (vsp[i].ctag <= 0)) continue;
		dx = nx1-nx0;
		cy[0] = vsp[i].cy[0]; cv[0] = vsp[i].cy[1]-cy[0];
		cy[1] = vsp[i].fy[0]; cv[1] = vsp[i].fy[1]-cy[1];

		scnt = 0;

			//Test if left edge requires split (x0,y0) (nx0,cy(0)),<dx,cv(0)>
		if ((x0 > nx0) && (x0 < nx1))
		{
			t = (x0-nx0)*cv[dir] - (y0-cy[dir])*dx;
			if (((!dir) && (t < 0)) || ((dir) && (t > 0)))
				{ spx[scnt] = x0; spy[scnt] = y0; spt[scnt] = -1; scnt++; }
		}

			//Test for intersection on umost (j == 0) and dmost (j == 1)
		for(j=0;j<2;j++)
		{
			d = (y0-y1)*dx - (x0-x1)*cv[j];
			n = (y0-cy[j])*dx - (x0-nx0)*cv[j];
			if ((fabs(n) <= fabs(d)) && (d*n >= 0) && (d != 0))
			{
				t = n/d; nx = (x1-x0)*t + x0;
				if ((nx > nx0) && (nx < nx1))
				{
					spx[scnt] = nx; spy[scnt] = (y1-y0)*t + y0;
					spt[scnt] = j; scnt++;
				}
			}
		}

			//Nice hack to avoid full sort later :)
		if ((scnt >= 2) && (spx[scnt-1] < spx[scnt-2]))
		{
			f = spx[scnt-1]; spx[scnt-1] = spx[scnt-2]; spx[scnt-2] = f;
			f = spy[scnt-1]; spy[scnt-1] = spy[scnt-2]; spy[scnt-2] = f;
			j = spt[scnt-1]; spt[scnt-1] = spt[scnt-2]; spt[scnt-2] = j;
		}

			//Test if right edge requires split
		if ((x1 > nx0) && (x1 < nx1))
		{
			t = (x1-nx0)*cv[dir] - (y1-cy[dir])*dx;
			if (((!dir) && (t < 0)) || ((dir) && (t > 0)))
				{ spx[scnt] = x1; spy[scnt] = y1; spt[scnt] = -1; scnt++; }
		}

		vsp[i].tag = vsp[newi].tag = -1;
		for(z=0;z<=scnt;z++,i=vcnt)
		{
			if (z < scnt)
			{
				vcnt = vsinsaft(i);
				t = (spx[z]-nx0)/dx;
				vsp[i].cy[1] = t*cv[0] + cy[0];
				vsp[i].fy[1] = t*cv[1] + cy[1];
				vsp[vcnt].x = spx[z];
				vsp[vcnt].cy[0] = vsp[i].cy[1];
				vsp[vcnt].fy[0] = vsp[i].fy[1];
				vsp[vcnt].tag = spt[z];
			}

			ni = vsp[i].n; if (!ni) continue; //this 'if' fixes many bugs!
			dx0 = vsp[i].x; if (x0 > dx0) continue;
			dx1 = vsp[ni].x; if (x1 < dx1) continue;
			ny0 = (dx0-x0)*slop + y0;
			ny1 = (dx1-x0)*slop + y0;

				//      dx0           dx1
				//       ~             ~
				//----------------------------
				//     t0+=0         t1+=0
				//   vsp[i].cy[0]  vsp[i].cy[1]
				//============================
				//     t0+=1         t1+=3
				//============================
				//   vsp[i].fy[0]    vsp[i].fy[1]
				//     t0+=2         t1+=6
				//
				//     ny0 ?         ny1 ?

			k = 1+3;
			if ((vsp[i].tag == 0) || (ny0 <= vsp[i].cy[0]+.01)) k--;
			if ((vsp[i].tag == 1) || (ny0 >= vsp[i].fy[0]-.01)) k++;
			if ((vsp[ni].tag == 0) || (ny1 <= vsp[i].cy[1]+.01)) k -= 3;
			if ((vsp[ni].tag == 1) || (ny1 >= vsp[i].fy[1]-.01)) k += 3;

			if (!dir)
			{
				switch(k)
				{
					case 1: case 2:
						dpx[0] = dx0; dpy[0] = vsp[i].cy[0];
						dpx[1] = dx1; dpy[1] = vsp[i].cy[1];
						dpx[2] = dx0; dpy[2] = ny0; drawpoly(dpx,dpy,3,polymethod);
						vsp[i].cy[0] = ny0; vsp[i].ctag = gtag; break;
					case 3: case 6:
						dpx[0] = dx0; dpy[0] = vsp[i].cy[0];
						dpx[1] = dx1; dpy[1] = vsp[i].cy[1];
						dpx[2] = dx1; dpy[2] = ny1; drawpoly(dpx,dpy,3,polymethod);
						vsp[i].cy[1] = ny1; vsp[i].ctag = gtag; break;
					case 4: case 5: case 7:
						dpx[0] = dx0; dpy[0] = vsp[i].cy[0];
						dpx[1] = dx1; dpy[1] = vsp[i].cy[1];
						dpx[2] = dx1; dpy[2] = ny1;
						dpx[3] = dx0; dpy[3] = ny0; drawpoly(dpx,dpy,4,polymethod);
						vsp[i].cy[0] = ny0; vsp[i].cy[1] = ny1; vsp[i].ctag = gtag; break;
					case 8:
						dpx[0] = dx0; dpy[0] = vsp[i].cy[0];
						dpx[1] = dx1; dpy[1] = vsp[i].cy[1];
						dpx[2] = dx1; dpy[2] = vsp[i].fy[1];
						dpx[3] = dx0; dpy[3] = vsp[i].fy[0]; drawpoly(dpx,dpy,4,polymethod);
						vsp[i].ctag = vsp[i].ftag = -1; break;
					default: break;
				}
			}
			else
			{
				switch(k)
				{
					case 7: case 6:
						dpx[0] = dx0; dpy[0] = ny0;
						dpx[1] = dx1; dpy[1] = vsp[i].fy[1];
						dpx[2] = dx0; dpy[2] = vsp[i].fy[0]; drawpoly(dpx,dpy,3,polymethod);
						vsp[i].fy[0] = ny0; vsp[i].ftag = gtag; break;
					case 5: case 2:
						dpx[0] = dx0; dpy[0] = vsp[i].fy[0];
						dpx[1] = dx1; dpy[1] = ny1;
						dpx[2] = dx1; dpy[2] = vsp[i].fy[1]; drawpoly(dpx,dpy,3,polymethod);
						vsp[i].fy[1] = ny1; vsp[i].ftag = gtag; break;
					case 4: case 3: case 1:
						dpx[0] = dx0; dpy[0] = ny0;
						dpx[1] = dx1; dpy[1] = ny1;
						dpx[2] = dx1; dpy[2] = vsp[i].fy[1];
						dpx[3] = dx0; dpy[3] = vsp[i].fy[0]; drawpoly(dpx,dpy,4,polymethod);
						vsp[i].fy[0] = ny0; vsp[i].fy[1] = ny1; vsp[i].ftag = gtag; break;
					case 0:
						dpx[0] = dx0; dpy[0] = vsp[i].cy[0];
						dpx[1] = dx1; dpy[1] = vsp[i].cy[1];
						dpx[2] = dx1; dpy[2] = vsp[i].fy[1];
						dpx[3] = dx0; dpy[3] = vsp[i].fy[0]; drawpoly(dpx,dpy,4,polymethod);
						vsp[i].ctag = vsp[i].ftag = -1; break;
					default: break;
				}
			}
		}
	}

	gtag++;

		//Combine neighboring vertical strips with matching collinear top&bottom edges
		//This prevents x-splits from propagating through the entire scan
	i = vsp[0].n;
	while (i)
	{
		ni = vsp[i].n;
		if ((vsp[i].cy[0] >= vsp[i].fy[0]) && (vsp[i].cy[1] >= vsp[i].fy[1])) { vsp[i].ctag = vsp[i].ftag = -1; }
		if ((vsp[i].ctag == vsp[ni].ctag) && (vsp[i].ftag == vsp[ni].ftag))
			{ vsp[i].cy[1] = vsp[ni].cy[1]; vsp[i].fy[1] = vsp[ni].fy[1]; vsdel(ni); }
		else i = ni;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movl %edi, 0x10(%rsp)
movaps %xmm2, %xmm10
ucomiss %xmm0, %xmm2
jbe 0x5cbbe
cvtss2sd %xmm1, %xmm4
movsd 0x1c8f8(%rip), %xmm1    # 0x79460
addsd %xmm1, %xmm4
xorps %xmm2, %xmm2
cvtss2sd %xmm3, %xmm2
xorps %xmm3, %xmm3
cvtsd2ss %xmm4, %xmm3
leaq 0x9c(%rsp), %rax
movq %rax, 0xd8(%rsp)
addsd %xmm1, %xmm2
xorps %xmm1, %xmm1
cvtsd2ss %xmm2, %xmm1
movss %xmm1, 0x8c(%rsp)
leaq 0x94(%rsp), %rax
movq %rax, 0xd0(%rsp)
movaps %xmm10, %xmm11
movss %xmm0, 0x3c(%rsp)
movaps %xmm0, %xmm12
jmp 0x5cc01
ucomiss %xmm10, %xmm0
jne 0x5cbca
jnp 0x5d739
movss %xmm1, 0x8c(%rsp)
leaq 0x98(%rsp), %rax
movq %rax, 0xd8(%rsp)
leaq 0x90(%rsp), %rax
movq %rax, 0xd0(%rsp)
movss %xmm0, 0x3c(%rsp)
movaps %xmm0, %xmm11
movaps %xmm10, %xmm12
movl 0x5b0ffd(%rip), %eax    # 0x60dc04
testl %eax, %eax
je 0x5d672
orl $0x8, 0x10(%rsp)
movss 0x8c(%rsp), %xmm0
movaps %xmm0, %xmm2
subss %xmm3, %xmm2
movaps %xmm11, %xmm13
subss %xmm12, %xmm13
movss %xmm2, 0xe4(%rsp)
movaps %xmm2, %xmm14
divss %xmm13, %xmm14
movaps %xmm3, %xmm2
subss %xmm0, %xmm2
movss %xmm2, 0xe0(%rsp)
movaps %xmm12, %xmm15
subss %xmm11, %xmm15
xorps 0x1b810(%rip), %xmm15   # 0x78470
xorl %r12d, %r12d
leaq 0x5b0f86(%rip), %rbp    # 0x60dbf0
xorps %xmm1, %xmm1
movss %xmm10, 0x28(%rsp)
movss %xmm3, 0x24(%rsp)
movss %xmm11, 0x20(%rsp)
movss %xmm12, 0x1c(%rsp)
movss %xmm13, 0x18(%rsp)
movss %xmm14, 0x14(%rsp)
movaps %xmm15, 0xa0(%rsp)
movslq %eax, %rcx
leaq (%rcx,%rcx,4), %rcx
movslq 0x14(%rbp,%rcx,8), %r10
leaq (%r10,%r10,4), %rdx
movss (%rbp,%rdx,8), %xmm8
ucomiss %xmm8, %xmm12
jae 0x5d666
movss (%rbp,%rcx,8), %xmm2
movss %xmm2, 0x34(%rsp)
ucomiss %xmm11, %xmm2
jae 0x5d666
leaq (,%rcx,8), %rcx
addq %rbp, %rcx
cmpl $0x0, 0x20(%rcx)
jle 0x5d666
movaps %xmm8, %xmm2
movss 0x34(%rsp), %xmm5
subss %xmm5, %xmm2
movss %xmm2, 0x38(%rsp)
movss 0x4(%rcx), %xmm2
movss %xmm2, 0x98(%rsp)
movss 0x8(%rcx), %xmm4
movss %xmm2, 0xc(%rsp)
subss %xmm2, %xmm4
movss %xmm4, 0x8(%rsp)
movss %xmm4, 0x90(%rsp)
movss 0xc(%rcx), %xmm4
movss %xmm4, 0x9c(%rsp)
movss 0x10(%rcx), %xmm2
subss %xmm4, %xmm2
movss %xmm2, 0x94(%rsp)
xorl %r14d, %r14d
ucomiss %xmm5, %xmm12
jbe 0x5cdd3
ucomiss %xmm12, %xmm8
jbe 0x5cdd3
movaps %xmm12, %xmm4
subss 0x34(%rsp), %xmm4
movaps %xmm3, %xmm2
movq 0xd8(%rsp), %rsi
subss (%rsi), %xmm2
mulss 0x38(%rsp), %xmm2
movq 0xd0(%rsp), %rsi
mulss (%rsi), %xmm4
subss %xmm2, %xmm4
xorl %esi, %esi
ucomiss %xmm4, %xmm1
setbe %sil
xorl %edi, %edi
ucomiss %xmm1, %xmm4
setbe %dil
movaps %xmm10, %xmm0
ucomiss 0x3c(%rsp), %xmm10
cmoval %edi, %esi
testb %sil, %sil
jne 0x5cdd7
movss %xmm12, 0xc0(%rsp)
movss %xmm3, 0xf0(%rsp)
movl $0xffffffff, 0xb0(%rsp) # imm = 0xFFFFFFFF
movl $0x1, %r14d
jmp 0x5cdd7
movaps %xmm10, %xmm0
leaq (,%rdx,8), %rdx
addq %rbp, %rdx
movaps %xmm12, %xmm10
subss 0x34(%rsp), %xmm10
xorps 0x1b67b(%rip), %xmm10   # 0x78470
movss 0xe0(%rsp), %xmm2
mulss 0x38(%rsp), %xmm2
xorl %esi, %esi
movss 0x90(%rsp,%rsi,4), %xmm5
movaps %xmm5, %xmm4
mulss %xmm15, %xmm4
addss %xmm2, %xmm4
movaps %xmm3, %xmm9
subss 0x98(%rsp,%rsi,4), %xmm9
mulss %xmm10, %xmm5
mulss 0x38(%rsp), %xmm9
addss %xmm5, %xmm9
movaps %xmm9, %xmm5
movaps 0x1b61b(%rip), %xmm7    # 0x78460
andps %xmm7, %xmm5
movaps %xmm4, %xmm6
andps %xmm7, %xmm6
ucomiss %xmm5, %xmm6
jae 0x5ce5e
incq %rsi
cmpq $0x1, %rsi
je 0x5ce06
jmp 0x5cec8
xorps %xmm6, %xmm6
ucomiss %xmm6, %xmm4
jne 0x5ce68
jnp 0x5ce53
movaps %xmm4, %xmm5
mulss %xmm9, %xmm5
ucomiss %xmm6, %xmm5
jb 0x5ce53
divss %xmm4, %xmm9
movaps %xmm13, %xmm4
mulss %xmm9, %xmm4
addss %xmm12, %xmm4
ucomiss 0x34(%rsp), %xmm4
jbe 0x5ce53
ucomiss %xmm4, %xmm8
jbe 0x5ce53
movslq %r14d, %r14
movss %xmm4, 0xc0(%rsp,%r14,4)
mulss 0xe4(%rsp), %xmm9
addss %xmm3, %xmm9
movss %xmm9, 0xf0(%rsp,%r14,4)
movl %esi, 0xb0(%rsp,%r14,4)
incl %r14d
jmp 0x5ce53
cmpl $0x2, %r14d
jl 0x5cf43
leal -0x1(%r14), %esi
movss 0xc0(%rsp,%rsi,4), %xmm4
leal -0x2(%r14), %edi
movss 0xc0(%rsp,%rdi,4), %xmm2
ucomiss %xmm4, %xmm2
jbe 0x5cf43
movss %xmm2, 0xc0(%rsp,%rsi,4)
movss %xmm4, 0xc0(%rsp,%rdi,4)
movss 0xf0(%rsp,%rsi,4), %xmm4
movss 0xf0(%rsp,%rdi,4), %xmm2
movss %xmm2, 0xf0(%rsp,%rsi,4)
movss %xmm4, 0xf0(%rsp,%rdi,4)
movl 0xb0(%rsp,%rsi,4), %r8d
movl 0xb0(%rsp,%rdi,4), %r9d
movl %r9d, 0xb0(%rsp,%rsi,4)
movl %r8d, 0xb0(%rsp,%rdi,4)
ucomiss 0x34(%rsp), %xmm11
xorps %xmm1, %xmm1
movaps %xmm0, %xmm10
jbe 0x5cfeb
ucomiss %xmm11, %xmm8
movss 0x8c(%rsp), %xmm0
jbe 0x5cfeb
movaps %xmm11, %xmm2
subss 0x34(%rsp), %xmm2
movaps %xmm0, %xmm4
movq 0xd8(%rsp), %rsi
subss (%rsi), %xmm4
mulss 0x38(%rsp), %xmm4
movq 0xd0(%rsp), %rsi
mulss (%rsi), %xmm2
subss %xmm4, %xmm2
xorl %esi, %esi
ucomiss %xmm2, %xmm1
setbe %sil
xorl %edi, %edi
ucomiss %xmm1, %xmm2
setbe %dil
ucomiss 0x3c(%rsp), %xmm10
cmoval %edi, %esi
testb %sil, %sil
movss 0xc(%rsp), %xmm7
movss 0x8(%rsp), %xmm8
jne 0x5cff8
movslq %r14d, %rsi
movss %xmm11, 0xc0(%rsp,%rsi,4)
movss %xmm0, 0xf0(%rsp,%rsi,4)
movl $0xffffffff, 0xb0(%rsp,%rsi,4) # imm = 0xFFFFFFFF
incl %r14d
jmp 0x5cff8
movss 0xc(%rsp), %xmm7
movss 0x8(%rsp), %xmm8
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl %esi, 0x1c(%rdx)
movl %esi, 0x1c(%rcx)
testl %r14d, %r14d
js 0x5d666
movss 0x94(%rsp), %xmm2
movss %xmm2, 0xec(%rsp)
movss 0x9c(%rsp), %xmm2
movss %xmm2, 0xe8(%rsp)
movl %r14d, %r15d
incl %r14d
xorl %ebx, %ebx
movq %r10, 0x80(%rsp)
cltq
cmpq %r15, %rbx
jae 0x5d10d
movslq 0x5d8b8a(%rip), %r12    # 0x635bdc
leaq (%r12,%r12,4), %rcx
movslq 0x14(%rbp,%rcx,8), %rdx
leaq (%rdx,%rdx,4), %rsi
movl $0xfff, 0x18(%rbp,%rsi,8) # imm = 0xFFF
movl %edx, 0x5d8b6f(%rip)    # 0x635bdc
leaq (%rax,%rax,4), %rdx
movups (%rbp,%rdx,8), %xmm2
movups 0x10(%rbp,%rdx,8), %xmm4
movups %xmm4, 0x10(%rbp,%rcx,8)
movq 0x20(%rbp,%rdx,8), %rsi
movq %rsi, 0x20(%rbp,%rcx,8)
movups %xmm2, (%rbp,%rcx,8)
movl %eax, 0x18(%rbp,%rcx,8)
movl 0x14(%rbp,%rdx,8), %esi
movl %esi, 0x14(%rbp,%rcx,8)
movslq 0x14(%rbp,%rdx,8), %rsi
leaq (%rsi,%rsi,4), %rsi
movl %r12d, 0x18(%rbp,%rsi,8)
movl %r12d, 0x14(%rbp,%rdx,8)
movss 0xc0(%rsp,%rbx,4), %xmm4
movaps %xmm4, %xmm5
subss 0x34(%rsp), %xmm5
divss 0x38(%rsp), %xmm5
movaps %xmm5, %xmm2
mulss %xmm8, %xmm2
addss %xmm7, %xmm2
movss %xmm2, 0x8(%rbp,%rdx,8)
mulss 0xec(%rsp), %xmm5
addss 0xe8(%rsp), %xmm5
movss %xmm5, 0x10(%rbp,%rdx,8)
movss %xmm4, (%rbp,%rcx,8)
movss %xmm2, 0x4(%rbp,%rcx,8)
movss %xmm5, 0xc(%rbp,%rcx,8)
movl 0xb0(%rsp,%rbx,4), %edx
movl %edx, 0x1c(%rbp,%rcx,8)
leaq (%rax,%rax,4), %rcx
movslq 0x14(%rbp,%rcx,8), %rax
testq %rax, %rax
je 0x5d657
leaq (,%rcx,8), %r13
addq %rbp, %r13
movss (%r13), %xmm6
ucomiss %xmm6, %xmm12
ja 0x5d657
leaq (%rax,%rax,4), %rcx
movss (%rbp,%rcx,8), %xmm4
ucomiss %xmm11, %xmm4
ja 0x5d657
movaps %xmm6, %xmm9
subss %xmm12, %xmm9
mulss %xmm14, %xmm9
addss %xmm3, %xmm9
movl 0x1c(%r13), %edx
testl %edx, %edx
je 0x5d18d
xorps %xmm2, %xmm2
cvtss2sd %xmm9, %xmm2
xorps %xmm5, %xmm5
cvtss2sd 0x4(%r13), %xmm5
addsd 0x1b2fe(%rip), %xmm5    # 0x78480
movl $0x4, %eax
ucomisd %xmm2, %xmm5
jb 0x5d192
movl $0x3, %eax
cmpl $0x1, %edx
je 0x5d1b6
xorps %xmm2, %xmm2
cvtss2sd 0xc(%r13), %xmm2
xorps %xmm5, %xmm5
cvtss2sd %xmm9, %xmm5
addsd 0x1c2b0(%rip), %xmm2    # 0x79460
ucomisd %xmm2, %xmm5
jb 0x5d1b8
incl %eax
leaq (,%rcx,8), %rcx
addq %rbp, %rcx
movaps %xmm4, %xmm5
subss %xmm12, %xmm5
mulss %xmm14, %xmm5
addss %xmm3, %xmm5
movl 0x1c(%rcx), %ecx
testl %ecx, %ecx
je 0x5d1f9
xorps %xmm2, %xmm2
cvtss2sd 0x8(%r13), %xmm2
xorps %xmm0, %xmm0
cvtss2sd %xmm5, %xmm0
addsd 0x1b28d(%rip), %xmm2    # 0x78480
ucomisd %xmm0, %xmm2
jb 0x5d1fc
addl $-0x3, %eax
cmpl $0x1, %ecx
je 0x5d21f
xorps %xmm2, %xmm2
cvtss2sd 0x10(%r13), %xmm2
xorps %xmm0, %xmm0
cvtss2sd %xmm5, %xmm0
addsd 0x1c247(%rip), %xmm2    # 0x79460
ucomisd %xmm2, %xmm0
jb 0x5d222
addl $0x3, %eax
ucomiss 0x3c(%rsp), %xmm10
jbe 0x5d2de
cmpl $0x7, %eax
ja 0x5d657
movl %eax, %eax
leaq 0x1c2f0(%rip), %rcx     # 0x79530
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorps %xmm1, %xmm1
cvtss2sd %xmm6, %xmm1
movsd %xmm1, 0x60(%rsp)
movss %xmm9, 0x30(%rsp)
xorps %xmm2, %xmm2
cvtss2sd %xmm9, %xmm2
movsd %xmm2, 0x40(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm4, %xmm0
movsd %xmm0, 0x68(%rsp)
xorps %xmm2, %xmm2
cvtss2sd %xmm5, %xmm2
movsd %xmm2, 0x48(%rsp)
movsd %xmm0, 0x70(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x10(%r13), %xmm0
movsd %xmm0, 0x50(%rsp)
movsd %xmm1, 0x78(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0xc(%r13), %xmm0
movsd %xmm0, 0x58(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movl $0x4, %edx
movl 0x10(%rsp), %ecx
movss %xmm5, 0x2c(%rsp)
callq 0x4e9e3
movss 0x30(%rsp), %xmm0
movss %xmm0, 0xc(%r13)
jmp 0x5d3f7
decl %eax
cmpl $0x7, %eax
ja 0x5d657
leaq 0x1c220(%rip), %rcx     # 0x79510
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
xorps %xmm1, %xmm1
cvtss2sd %xmm6, %xmm1
movsd %xmm1, 0x60(%rsp)
xorps %xmm2, %xmm2
cvtss2sd 0x4(%r13), %xmm2
movsd %xmm2, 0x40(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm4, %xmm0
xorps %xmm2, %xmm2
cvtss2sd 0x8(%r13), %xmm2
movsd %xmm0, 0x68(%rsp)
movsd %xmm2, 0x48(%rsp)
movsd %xmm0, 0x70(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm5, %xmm0
movsd %xmm0, 0x50(%rsp)
movsd %xmm1, 0x78(%rsp)
movss %xmm9, 0x30(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm9, %xmm0
movsd %xmm0, 0x58(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movl $0x4, %edx
movl 0x10(%rsp), %ecx
movss %xmm5, 0x2c(%rsp)
callq 0x4e9e3
movss 0x30(%rsp), %xmm0
movss %xmm0, 0x4(%r13)
jmp 0x5d5f7
xorps %xmm1, %xmm1
cvtss2sd %xmm6, %xmm1
movsd %xmm1, 0x60(%rsp)
xorps %xmm1, %xmm1
cvtss2sd 0xc(%r13), %xmm1
movsd %xmm1, 0x40(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm4, %xmm0
movsd %xmm0, 0x68(%rsp)
xorps %xmm1, %xmm1
cvtss2sd %xmm5, %xmm1
movsd %xmm1, 0x48(%rsp)
movsd %xmm0, 0x70(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x10(%r13), %xmm0
movsd %xmm0, 0x50(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movl $0x3, %edx
movl 0x10(%rsp), %ecx
movss %xmm5, 0x2c(%rsp)
callq 0x4e9e3
movss 0x2c(%rsp), %xmm0
movss %xmm0, 0x10(%r13)
jmp 0x5d506
xorps %xmm1, %xmm1
cvtss2sd %xmm6, %xmm1
movsd %xmm1, 0x60(%rsp)
xorps %xmm2, %xmm2
cvtss2sd 0x4(%r13), %xmm2
movsd %xmm2, 0x40(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm4, %xmm0
movsd %xmm0, 0x68(%rsp)
xorps %xmm2, %xmm2
cvtss2sd 0x8(%r13), %xmm2
movsd %xmm2, 0x48(%rsp)
movsd %xmm0, 0x70(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x10(%r13), %xmm0
movsd %xmm0, 0x50(%rsp)
movsd %xmm1, 0x78(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0xc(%r13), %xmm0
movsd %xmm0, 0x58(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movl $0x4, %edx
movl 0x10(%rsp), %ecx
callq 0x4e9e3
movq $-0x1, 0x20(%r13)
jmp 0x5d60d
xorps %xmm1, %xmm1
cvtss2sd %xmm6, %xmm1
movsd %xmm1, 0x60(%rsp)
movss %xmm9, 0x30(%rsp)
xorps %xmm2, %xmm2
cvtss2sd %xmm9, %xmm2
movsd %xmm2, 0x40(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm4, %xmm0
movsd %xmm0, 0x68(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x10(%r13), %xmm0
movsd %xmm0, 0x48(%rsp)
movsd %xmm1, 0x70(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0xc(%r13), %xmm0
movsd %xmm0, 0x50(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movl $0x3, %edx
movl 0x10(%rsp), %ecx
callq 0x4e9e3
movss 0x30(%rsp), %xmm0
movss %xmm0, 0xc(%r13)
movl 0x5d86e4(%rip), %eax    # 0x635bf0
movl %eax, 0x24(%r13)
jmp 0x5d60d
xorps %xmm1, %xmm1
cvtss2sd %xmm6, %xmm1
movsd %xmm1, 0x60(%rsp)
xorps %xmm2, %xmm2
cvtss2sd 0x4(%r13), %xmm2
movsd %xmm2, 0x40(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm4, %xmm0
movsd %xmm0, 0x68(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x8(%r13), %xmm0
movsd %xmm0, 0x48(%rsp)
movsd %xmm1, 0x70(%rsp)
movss %xmm9, 0x30(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm9, %xmm0
movsd %xmm0, 0x50(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movl $0x3, %edx
movl 0x10(%rsp), %ecx
callq 0x4e9e3
movss 0x30(%rsp), %xmm0
movss %xmm0, 0x4(%r13)
jmp 0x5d603
xorps %xmm1, %xmm1
cvtss2sd %xmm6, %xmm1
movsd %xmm1, 0x60(%rsp)
xorps %xmm1, %xmm1
cvtss2sd 0x4(%r13), %xmm1
movsd %xmm1, 0x40(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm4, %xmm0
movsd %xmm0, 0x68(%rsp)
xorps %xmm1, %xmm1
cvtss2sd 0x8(%r13), %xmm1
movsd %xmm1, 0x48(%rsp)
movsd %xmm0, 0x70(%rsp)
xorps %xmm0, %xmm0
cvtss2sd %xmm5, %xmm0
movsd %xmm0, 0x50(%rsp)
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movl $0x3, %edx
movl 0x10(%rsp), %ecx
movss %xmm5, 0x2c(%rsp)
callq 0x4e9e3
movss 0x2c(%rsp), %xmm0
movss %xmm0, 0x8(%r13)
movl 0x5d85e7(%rip), %eax    # 0x635bf0
movl %eax, 0x20(%r13)
movss 0x28(%rsp), %xmm10
movss 0x24(%rsp), %xmm3
movss 0x20(%rsp), %xmm11
movss 0x1c(%rsp), %xmm12
movss 0x18(%rsp), %xmm13
movss 0x14(%rsp), %xmm14
movaps 0xa0(%rsp), %xmm15
xorps %xmm1, %xmm1
movq 0x80(%rsp), %r10
movss 0xc(%rsp), %xmm7
movss 0x8(%rsp), %xmm8
incq %rbx
movl %r12d, %eax
cmpq %rbx, %r14
jne 0x5d040
movl %r10d, %eax
testl %r10d, %r10d
jne 0x5cc9f
incl 0x5d8578(%rip)          # 0x635bf0
movl 0x5b0586(%rip), %eax    # 0x60dc04
testl %eax, %eax
je 0x5d739
leaq 0x5b0563(%rip), %rcx    # 0x60dbf0
movslq %eax, %rdx
leaq (%rdx,%rdx,4), %rdx
leaq (%rcx,%rdx,8), %rsi
movss 0x4(%rsi), %xmm0
ucomiss 0xc(%rsi), %xmm0
jb 0x5d6b6
movss 0x8(%rsi), %xmm0
ucomiss 0x10(%rsi), %xmm0
jb 0x5d6b6
movq $-0x1, 0x20(%rsi)
movl 0x14(%rcx,%rdx,8), %edx
movslq %edx, %rdi
movl 0x20(%rsi), %r8d
leaq (%rdi,%rdi,4), %rdi
cmpl 0x20(%rcx,%rdi,8), %r8d
jne 0x5d72f
leaq (%rcx,%rdi,8), %rdi
movl 0x24(%rsi), %r8d
cmpl 0x24(%rdi), %r8d
jne 0x5d72f
movss 0x8(%rdi), %xmm0
movss %xmm0, 0x8(%rsi)
movss 0x10(%rdi), %xmm0
movss %xmm0, 0x10(%rsi)
movslq 0x18(%rdi), %rsi
movslq 0x14(%rdi), %r8
leaq (%r8,%r8,4), %r9
movl %esi, 0x18(%rcx,%r9,8)
leaq (%rsi,%rsi,4), %rsi
movl %r8d, 0x14(%rcx,%rsi,8)
movl 0x5d84ce(%rip), %esi    # 0x635bdc
movl %esi, 0x14(%rdi)
movl $0xfff, 0x18(%rdi)      # imm = 0xFFF
movslq 0x5d84bd(%rip), %rsi    # 0x635bdc
leaq (%rsi,%rsi,4), %rsi
movl %edx, 0x18(%rcx,%rsi,8)
movl %edx, 0x5d84af(%rip)    # 0x635bdc
jmp 0x5d731
movl %edx, %eax
testl %eax, %eax
jne 0x5d68d
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq