// File: /workspace/github_cpp_makefile_star2_O3/cjlin1[P]liblinear/linear.cpp
// Function: Solver_MCSVM_CS::Solve(double*)
void Solver_MCSVM_CS::Solve(double *w)
{
	int i, m, s;
	int iter = 0;
	double *alpha = new double[l*nr_class];
	double *alpha_new = new double[nr_class];
	int *index = new int[l];
	double *QD = new double[l];
	int *d_ind = new int[nr_class];
	double *d_val = new double[nr_class];
	int *alpha_index = new int[nr_class*l];
	int *y_index = new int[l];
	int active_size = l;
	int *active_size_i = new int[l];
	double eps_shrink = max(10.0*eps, 1.0); // stopping tolerance for shrinking
	bool start_from_all = true;

	// Initial alpha can be set here. Note that
	// sum_m alpha[i*nr_class+m] = 0, for all i=1,...,l-1
	// alpha[i*nr_class+m] <= C[GETI(i)] if prob->y[i] == m
	// alpha[i*nr_class+m] <= 0 if prob->y[i] != m
	// If initial alpha isn't zero, uncomment the for loop below to initialize w
	for(i=0;i<l*nr_class;i++)
		alpha[i] = 0;

	for(i=0;i<w_size*nr_class;i++)
		w[i] = 0;
	for(i=0;i<l;i++)
	{
		for(m=0;m<nr_class;m++)
			alpha_index[i*nr_class+m] = m;
		feature_node *xi = prob->x[i];
		QD[i] = 0;
		while(xi->index != -1)
		{
			double val = xi->value;
			QD[i] += val*val;

			// Uncomment the for loop if initial alpha isn't zero
			// for(m=0; m<nr_class; m++)
			//	w[(xi->index-1)*nr_class+m] += alpha[i*nr_class+m]*val;
			xi++;
		}
		active_size_i[i] = nr_class;
		y_index[i] = (int)prob->y[i];
		index[i] = i;
	}

	while(iter < max_iter)
	{
		double stopping = -INF;
		for(i=0;i<active_size;i++)
		{
			int j = i+rand()%(active_size-i);
			swap(index[i], index[j]);
		}
		for(s=0;s<active_size;s++)
		{
			i = index[s];
			double Ai = QD[i];
			double *alpha_i = &alpha[i*nr_class];
			int *alpha_index_i = &alpha_index[i*nr_class];

			if(Ai > 0)
			{
				for(m=0;m<active_size_i[i];m++)
					G[m] = 1;
				if(y_index[i] < active_size_i[i])
					G[y_index[i]] = 0;

				feature_node *xi = prob->x[i];
				while(xi->index!= -1)
				{
					double *w_i = &w[(xi->index-1)*nr_class];
					for(m=0;m<active_size_i[i];m++)
						G[m] += w_i[alpha_index_i[m]]*(xi->value);
					xi++;
				}

				double minG = INF;
				double maxG = -INF;
				for(m=0;m<active_size_i[i];m++)
				{
					if(alpha_i[alpha_index_i[m]] < 0 && G[m] < minG)
						minG = G[m];
					if(G[m] > maxG)
						maxG = G[m];
				}
				if(y_index[i] < active_size_i[i])
					if(alpha_i[(int) prob->y[i]] < C[GETI(i)] && G[y_index[i]] < minG)
						minG = G[y_index[i]];

				for(m=0;m<active_size_i[i];m++)
				{
					if(be_shrunk(i, m, y_index[i], alpha_i[alpha_index_i[m]], minG))
					{
						active_size_i[i]--;
						while(active_size_i[i]>m)
						{
							if(!be_shrunk(i, active_size_i[i], y_index[i],
											alpha_i[alpha_index_i[active_size_i[i]]], minG))
							{
								swap(alpha_index_i[m], alpha_index_i[active_size_i[i]]);
								swap(G[m], G[active_size_i[i]]);
								if(y_index[i] == active_size_i[i])
									y_index[i] = m;
								else if(y_index[i] == m)
									y_index[i] = active_size_i[i];
								break;
							}
							active_size_i[i]--;
						}
					}
				}

				if(active_size_i[i] <= 1)
				{
					active_size--;
					swap(index[s], index[active_size]);
					s--;
					continue;
				}

				if(maxG-minG <= 1e-12)
					continue;
				else
					stopping = max(maxG - minG, stopping);

				for(m=0;m<active_size_i[i];m++)
					B[m] = G[m] - Ai*alpha_i[alpha_index_i[m]] ;

				solve_sub_problem(Ai, y_index[i], C[GETI(i)], active_size_i[i], alpha_new);
				int nz_d = 0;
				for(m=0;m<active_size_i[i];m++)
				{
					double d = alpha_new[m] - alpha_i[alpha_index_i[m]];
					alpha_i[alpha_index_i[m]] = alpha_new[m];
					if(fabs(d) >= 1e-12)
					{
						d_ind[nz_d] = alpha_index_i[m];
						d_val[nz_d] = d;
						nz_d++;
					}
				}

				xi = prob->x[i];
				while(xi->index != -1)
				{
					double *w_i = &w[(xi->index-1)*nr_class];
					for(m=0;m<nz_d;m++)
						w_i[d_ind[m]] += d_val[m]*xi->value;
					xi++;
				}
			}
		}

		iter++;
		if(iter % 10 == 0)
		{
			info(".");
		}

		if(stopping < eps_shrink)
		{
			if(stopping < eps && start_from_all == true)
				break;
			else
			{
				active_size = l;
				for(i=0;i<l;i++)
					active_size_i[i] = nr_class;
				info("*");
				eps_shrink = max(eps_shrink/2, eps);
				start_from_all = true;
			}
		}
		else
			start_from_all = false;
	}

	info("\noptimization finished, #iter = %d\n",iter);
	if (iter >= max_iter)
		info("\nWARNING: reaching max number of iterations\n");

	// calculate objective value
	double v = 0;
	int nSV = 0;
	for(i=0;i<w_size*nr_class;i++)
		v += w[i]*w[i];
	v = 0.5*v;
	for(i=0;i<l*nr_class;i++)
	{
		v += alpha[i];
		if(fabs(alpha[i]) > 0)
			nSV++;
	}
	for(i=0;i<l;i++)
		v -= alpha[i*nr_class+(int)prob->y[i]];
	info("Objective value = %lf\n",v);
	info("nSV = %d\n",nSV);

	delete [] alpha;
	delete [] alpha_new;
	delete [] index;
	delete [] QD;
	delete [] d_ind;
	delete [] d_val;
	delete [] alpha_index;
	delete [] y_index;
	delete [] active_size_i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, 0x88(%rsp)
movq %rdi, 0x10(%rsp)
movslq 0x1c(%rdi), %r12
movslq 0x20(%rdi), %rbx
movl %ebx, %eax
imull %r12d, %eax
movl %eax, 0x50(%rsp)
cltq
movq %rax, 0x40(%rsp)
leaq (,%rax,8), %rdi
testl %eax, %eax
movq $-0x1, %r14
cmovsq %r14, %rdi
leaq (,%rax,4), %rax
cmovsq %r14, %rax
movq %rax, 0x30(%rsp)
callq 0x2030
movq %rax, 0x68(%rsp)
leaq (,%rbx,8), %rbp
testq %rbx, %rbx
cmovsq %r14, %rbp
leaq (,%rbx,4), %r13
cmovsq %r14, %r13
movq %rbp, %rdi
callq 0x2030
movq %rax, 0x98(%rsp)
leaq (,%r12,4), %r15
testq %r12, %r12
cmovsq %r14, %r15
movq %r12, 0x28(%rsp)
leaq (,%r12,8), %r12
cmovsq %r14, %r12
movq %r15, %rdi
callq 0x2030
movq %rax, 0x60(%rsp)
movq %r12, %rdi
callq 0x2030
movq %rax, 0x38(%rsp)
movq %r13, %rdi
callq 0x2030
movq %rax, %r13
movq %rbp, %rdi
callq 0x2030
movq %rax, %r14
movq 0x30(%rsp), %rdi
callq 0x2030
movq %rax, 0x78(%rsp)
movq %r15, %rdi
callq 0x2030
movq %rax, 0x80(%rsp)
movq %r15, %rdi
callq 0x2030
movq %rax, 0x20(%rsp)
movq 0x10(%rsp), %rax
movq 0x28(%rax), %xmm0
movq %xmm0, 0x58(%rsp)
cmpl $0x0, 0x40(%rsp)
movq 0x68(%rsp), %rdi
jle 0x5161
movl 0x50(%rsp), %edx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x20c0
movq 0x10(%rsp), %rax
movl 0x18(%rax), %eax
imull %ebx, %eax
testl %eax, %eax
movq 0x88(%rsp), %rbp
jle 0x5188
movl %eax, %edx
shlq $0x3, %rdx
movq %rbp, %rdi
xorl %esi, %esi
callq 0x20c0
cmpl $0x0, 0x28(%rsp)
movq 0x60(%rsp), %r15
jle 0x52c8
movl %ebx, %eax
movq 0x10(%rsp), %rcx
movq 0x30(%rcx), %rdx
movq 0x8(%rdx), %rcx
movq 0x10(%rdx), %rdx
leal 0x1(%rax), %esi
andl $-0x2, %esi
leaq -0x1(%rax), %rdi
movq %rdi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movq 0x78(%rsp), %rdi
addq $0x4, %rdi
shlq $0x2, %rax
xorl %r8d, %r8d
movdqa 0x9c89(%rip), %xmm1     # 0xee60
movdqa 0x9c91(%rip), %xmm2     # 0xee70
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x9c91(%rip), %xmm4     # 0xee80
testl %ebx, %ebx
jle 0x525b
xorl %r9d, %r9d
movdqa %xmm1, %xmm5
movdqa %xmm5, %xmm6
pxor %xmm2, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %r10d
notl %r10d
testb $0x1, %r10b
je 0x5236
movl %r9d, -0x4(%rdi,%r9,4)
pxor %xmm3, %xmm6
pextrw $0x4, %xmm6, %r10d
testb $0x1, %r10b
je 0x524e
leal 0x1(%r9), %r10d
movl %r10d, (%rdi,%r9,4)
addq $0x2, %r9
paddq %xmm4, %xmm5
cmpq %r9, %rsi
jne 0x51fa
movq (%rdx,%r8,8), %r9
movq 0x38(%rsp), %r10
movq $0x0, (%r10,%r8,8)
cmpl $-0x1, (%r9)
je 0x5298
addq $0x10, %r9
pxor %xmm5, %xmm5
movsd -0x8(%r9), %xmm6
mulsd %xmm6, %xmm6
addsd %xmm6, %xmm5
movsd %xmm5, (%r10,%r8,8)
cmpl $-0x1, (%r9)
leaq 0x10(%r9), %r9
jne 0x527a
movq 0x20(%rsp), %r9
movl %ebx, (%r9,%r8,4)
cvttsd2si (%rcx,%r8,8), %r9d
movq 0x80(%rsp), %r10
movl %r9d, (%r10,%r8,4)
movl %r8d, (%r15,%r8,4)
incq %r8
addq %rax, %rdi
cmpq 0x28(%rsp), %r8
jne 0x51ef
movq 0x10(%rsp), %rbx
cmpl $0x0, 0x24(%rbx)
jle 0x5bf2
movsd 0x58(%rsp), %xmm0
mulsd 0x9aeb(%rip), %xmm0     # 0xedd0
maxsd 0x9953(%rip), %xmm0     # 0xec40
movsd %xmm0, 0x58(%rsp)
movq 0x78(%rsp), %rax
addq $-0x4, %rax
movq %rax, 0xc8(%rsp)
movb $0x1, 0xf(%rsp)
movsd 0x9ac7(%rip), %xmm6     # 0xedd8
movdqa 0x9b56(%rip), %xmm8     # 0xee70
pcmpeqd %xmm9, %xmm9
movl $0x0, 0x1c(%rsp)
movq 0x28(%rsp), %rdx
movq %r13, 0xa0(%rsp)
movq %r14, 0x90(%rsp)
testl %edx, %edx
jle 0x59fa
movl %edx, %ebx
movq %rdx, %r12
movl %edx, %ebp
xorl %r14d, %r14d
callq 0x2090
cltd
idivl %ebp
movslq %edx, %rax
addq %r14, %rax
movl (%r15,%r14,4), %ecx
movl (%r15,%rax,4), %edx
movl %edx, (%r15,%r14,4)
movl %ecx, (%r15,%rax,4)
incq %r14
decl %ebp
cmpq %r14, %rbx
jne 0x534e
movsd 0x9a5a(%rip), %xmm6     # 0xedd8
movapd %xmm6, %xmm13
movq %r12, %rdx
testl %edx, %edx
movq 0x38(%rsp), %rax
movq 0x90(%rsp), %r14
movq 0x88(%rsp), %rbp
pxor %xmm7, %xmm7
movdqa 0x9ac6(%rip), %xmm8     # 0xee70
pcmpeqd %xmm9, %xmm9
movdqa 0x9ac8(%rip), %xmm10    # 0xee80
movsd 0x8c6f(%rip), %xmm11    # 0xe030
movsd 0x9886(%rip), %xmm12    # 0xec50
jle 0x59ff
xorl %ecx, %ecx
movl %ebx, %edx
movapd %xmm6, %xmm13
movslq %ecx, %rsi
movl (%r15,%rsi,4), %edi
movslq %edi, %r11
movsd (%rax,%r11,8), %xmm0
ucomisd %xmm7, %xmm0
jbe 0x59ee
movl %edi, 0x74(%rsp)
movq %rsi, 0xd0(%rsp)
movl %ecx, 0x4c(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x10(%rsp), %rdi
movl 0x20(%rdi), %r9d
movq 0x20(%rsp), %rax
movl (%rax,%r11,4), %edx
testl %edx, %edx
movabsq $0x3ff0000000000000, %r10 # imm = 0x3FF0000000000000
jle 0x54b3
movq 0x10(%rdi), %rax
leal 0x1(%rdx), %ecx
leaq -0x1(%rdx), %rsi
movq %rsi, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
shrl %ecx
shlq $0x4, %rcx
pxor %xmm8, %xmm1
xorl %esi, %esi
movdqa 0x9a0a(%rip), %xmm2     # 0xee60
movdqa %xmm2, %xmm3
pxor %xmm8, %xmm3
movdqa %xmm3, %xmm4
pcmpgtd %xmm1, %xmm4
pcmpeqd %xmm1, %xmm3
pshufd $0xf5, %xmm3, %xmm5     # xmm5 = xmm3[1,1,3,3]
pand %xmm4, %xmm5
pshufd $0xf5, %xmm4, %xmm3     # xmm3 = xmm4[1,1,3,3]
por %xmm5, %xmm3
movd %xmm3, %r8d
notl %r8d
testb $0x1, %r8b
je 0x548f
movq %r10, (%rax,%rsi)
pxor %xmm9, %xmm3
pextrw $0x4, %xmm3, %r8d
testb $0x1, %r8b
je 0x54a5
movq %r10, 0x8(%rax,%rsi)
paddq %xmm10, %xmm2
addq $0x10, %rsi
cmpq %rsi, %rcx
jne 0x5456
movq 0x80(%rsp), %rax
movl (%rax,%r11,4), %eax
movl %eax, %r12d
movslq %eax, %rcx
cmpl %edx, %ecx
jge 0x54d5
movq 0x10(%rdi), %rax
movq $0x0, (%rax,%rcx,8)
movl %r9d, %eax
imull 0x74(%rsp), %eax
movslq %eax, %r8
movq 0x78(%rsp), %rax
leaq (%rax,%r8,4), %r15
movq 0x30(%rdi), %rax
movq %rax, 0x50(%rsp)
movq 0x10(%rax), %rax
movq %r11, 0x40(%rsp)
movq (%rax,%r11,8), %rax
movl (%rax), %esi
cmpl $-0x1, %esi
je 0x5553
movq 0x10(%rdi), %r10
testl %edx, %edx
jle 0x5547
decl %esi
imull %r9d, %esi
movslq %esi, %rsi
leaq (,%rsi,8), %rbx
addq %rbp, %rbx
xorl %r11d, %r11d
movslq (%r15,%r11,4), %rsi
movsd (%rbx,%rsi,8), %xmm1
mulsd 0x8(%rax), %xmm1
addsd (%r10,%r11,8), %xmm1
movsd %xmm1, (%r10,%r11,8)
incq %r11
cmpq %r11, %rdx
jne 0x5525
movl 0x10(%rax), %esi
addq $0x10, %rax
cmpl $-0x1, %esi
jne 0x550a
movq 0x68(%rsp), %rax
leaq (%rax,%r8,8), %r11
movapd %xmm11, %xmm1
movapd %xmm6, %xmm5
testl %edx, %edx
movq 0x40(%rsp), %r10
jle 0x55c6
movq 0x10(%rdi), %rax
xorl %r9d, %r9d
movapd %xmm6, %xmm2
movapd %xmm11, %xmm3
movslq (%r15,%r9,4), %rsi
movsd (%rax,%r9,8), %xmm5
movsd (%r11,%rsi,8), %xmm1
cmpltpd %xmm7, %xmm1
movapd %xmm5, %xmm4
cmpltpd %xmm3, %xmm4
andpd %xmm1, %xmm4
movd %xmm4, %esi
movapd %xmm5, %xmm1
testb $0x1, %sil
jne 0x55b2
movapd %xmm3, %xmm1
maxsd %xmm2, %xmm5
incq %r9
movapd %xmm5, %xmm2
movapd %xmm1, %xmm3
cmpq %r9, %rdx
jne 0x557e
movl %r12d, %esi
cmpl %edx, %r12d
jge 0x5604
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rax
cvttsd2si (%rax,%r10,8), %eax
cltq
movq 0x8(%rdi), %r9
movsd (%r9,%rax,8), %xmm2
ucomisd (%r11,%rax,8), %xmm2
jbe 0x5604
movq 0x10(%rdi), %rax
movsd (%rax,%rcx,8), %xmm2
ucomisd %xmm2, %xmm1
jbe 0x5604
movapd %xmm2, %xmm1
testl %edx, %edx
jle 0x599e
movq 0x8(%rdi), %rax
movq %rax, 0xf0(%rsp)
movq 0x10(%rdi), %rbx
movq 0xc8(%rsp), %rax
leaq (%rax,%r8,4), %rax
movq %rax, 0xe0(%rsp)
leaq -0x8(%rbx), %rax
movq %rax, 0xd8(%rsp)
xorl %ecx, %ecx
movq %r11, 0x30(%rsp)
movq %rbx, 0xa8(%rsp)
movl %esi, %eax
xorpd %xmm2, %xmm2
cmpq %rax, %rcx
jne 0x5676
movq 0x50(%rsp), %r8
movq 0x8(%r8), %r8
cvttsd2si (%r8,%r10,8), %r8d
movslq %r8d, %r8
movq 0xf0(%rsp), %r9
movsd (%r9,%r8,8), %xmm2
movslq (%r15,%rcx,4), %r12
ucomisd (%r11,%r12,8), %xmm2
jne 0x57e8
jp 0x57e8
movsd (%rbx,%rcx,8), %xmm2
ucomisd %xmm2, %xmm1
jbe 0x57e8
movq 0x8(%rdi), %rbp
movq 0x10(%rdi), %rdi
movslq %edx, %r11
movq 0xe0(%rsp), %r8
leaq (%r8,%r11,4), %r8
movl %esi, 0xb0(%rsp)
movl %esi, %r10d
negl %r10d
leal -0x1(%r11), %r9d
addq %r10, %r9
leaq -0x1(%r11), %rbx
movq %r11, 0xe8(%rsp)
leaq (%rdi,%r11,8), %rdi
addq $-0x8, %rdi
xorl %r13d, %r13d
movq 0x50(%rsp), %rsi
movq %r13, %r11
leaq (%rbx,%r13), %r10
cmpq %rcx, %r10
jle 0x57ad
movl %r9d, %r10d
pxor %xmm3, %xmm3
addl %r11d, %r10d
jne 0x5717
movq 0x8(%rsi), %r14
movq 0x40(%rsp), %r13
cvttsd2si (%r14,%r13,8), %r14d
movslq %r14d, %r14
movq (%rbp,%r14,8), %xmm3
movslq (%r8,%r11,4), %r14
movq 0x30(%rsp), %r13
ucomisd (%r13,%r14,8), %xmm3
jne 0x5737
jp 0x5737
leaq -0x1(%r11), %r13
ucomisd (%rdi,%r11,8), %xmm1
ja 0x56e2
cmpq %rax, %rcx
leal -0x1(%rdx,%r11), %edx
movl 0xb0(%rsp), %esi
cmovel %edx, %esi
testl %r10d, %r10d
movl %r14d, (%r15,%rcx,4)
movl %r12d, (%r8,%r11,4)
movq 0xd8(%rsp), %rax
movq 0xe8(%rsp), %rdi
leaq (%rax,%rdi,8), %rax
movq (%rax,%r11,8), %xmm3
movq 0xa8(%rsp), %rbx
movq %xmm3, (%rbx,%rcx,8)
movsd %xmm2, (%rax,%r11,8)
cmovel %ecx, %esi
movq 0xa0(%rsp), %r13
movq 0x90(%rsp), %r14
movq 0x10(%rsp), %rdi
movq 0x88(%rsp), %rbp
movq 0x40(%rsp), %r10
movq 0x30(%rsp), %r11
jmp 0x57e8
addl %r11d, %edx
decl %edx
movq 0xa0(%rsp), %r13
movq 0x90(%rsp), %r14
movq 0x10(%rsp), %rdi
movq 0x88(%rsp), %rbp
movq 0x40(%rsp), %r10
movl 0xb0(%rsp), %esi
movq 0x30(%rsp), %r11
movq 0xa8(%rsp), %rbx
incq %rcx
movslq %edx, %rax
cmpq %rax, %rcx
jl 0x564b
movq 0x80(%rsp), %rax
movl %esi, (%rax,%r10,4)
movq 0x20(%rsp), %rax
movl %edx, (%rax,%r10,4)
cmpl $0x1, %edx
jle 0x59a7
subsd %xmm1, %xmm5
ucomisd %xmm5, %xmm12
jae 0x59db
maxsd %xmm13, %xmm5
movapd %xmm5, 0xb0(%rsp)
movq (%rdi), %rax
movq 0x10(%rdi), %rcx
movapd %xmm0, %xmm1
xorpd 0x943b(%rip), %xmm1     # 0xec80
movl %edx, %r12d
xorl %r8d, %r8d
movslq (%r15,%r8,4), %r9
movsd (%r11,%r9,8), %xmm2
mulsd %xmm1, %xmm2
addsd (%rcx,%r8,8), %xmm2
movsd %xmm2, (%rax,%r8,8)
incq %r8
cmpq %r8, %r12
jne 0x584b
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rax
cvttsd2si (%rax,%r10,8), %eax
movq 0x8(%rdi), %rcx
cltq
movsd (%rcx,%rax,8), %xmm1
movq 0x98(%rsp), %rbx
movq %rbx, %rcx
callq 0x4e86
movq 0x30(%rsp), %rsi
xorl %ecx, %ecx
xorl %eax, %eax
movsd 0x9530(%rip), %xmm6     # 0xedd8
xorpd %xmm7, %xmm7
movdqa 0x95bb(%rip), %xmm8     # 0xee70
pcmpeqd %xmm9, %xmm9
movdqa 0x95bd(%rip), %xmm10    # 0xee80
movsd 0x8764(%rip), %xmm11    # 0xe030
movsd 0x937b(%rip), %xmm12    # 0xec50
movapd 0x9393(%rip), %xmm2     # 0xec70
movsd (%rbx,%rcx,8), %xmm1
movslq (%r15,%rcx,4), %rdx
movapd %xmm1, %xmm0
subsd (%rsi,%rdx,8), %xmm0
movsd %xmm1, (%rsi,%rdx,8)
movapd %xmm0, %xmm1
andpd %xmm2, %xmm1
ucomisd %xmm12, %xmm1
jb 0x5912
cltq
movl %edx, (%r13,%rax,4)
movsd %xmm0, (%r14,%rax,8)
incl %eax
incq %rcx
cmpq %rcx, %r12
jne 0x58dd
movq 0x10(%rsp), %rdx
movq 0x30(%rdx), %rcx
movq 0x10(%rcx), %rcx
movq 0x40(%rsp), %rsi
movq (%rcx,%rsi,8), %rcx
movl (%rcx), %edi
cmpl $-0x1, %edi
movapd 0xb0(%rsp), %xmm13
je 0x59db
movslq 0x20(%rdx), %rdx
movl %eax, %esi
movq 0x60(%rsp), %r15
testl %eax, %eax
jle 0x5990
movslq %edi, %rdi
decq %rdi
imulq %rdx, %rdi
leaq (,%rdi,8), %rdi
addq %rbp, %rdi
xorl %r8d, %r8d
movsd (%r14,%r8,8), %xmm0
movslq (%r13,%r8,4), %r9
mulsd 0x8(%rcx), %xmm0
addsd (%rdi,%r9,8), %xmm0
movsd %xmm0, (%rdi,%r9,8)
incq %r8
cmpq %r8, %rsi
jne 0x596c
movl 0x10(%rcx), %edi
addq $0x10, %rcx
cmpl $-0x1, %edi
jne 0x5950
jmp 0x59e0
movq 0x20(%rsp), %rax
movl %edx, (%rax,%r10,4)
movq 0x28(%rsp), %rdx
movslq %edx, %rax
decl %edx
movq 0x60(%rsp), %r15
movl -0x4(%r15,%rax,4), %ecx
movq 0xd0(%rsp), %rsi
movl %ecx, (%r15,%rsi,4)
movl 0x74(%rsp), %ecx
movl %ecx, -0x4(%r15,%rax,4)
decl %esi
movl %esi, %ecx
movq 0x38(%rsp), %rax
jmp 0x59ee
movq 0x60(%rsp), %r15
movq 0x38(%rsp), %rax
movq 0x28(%rsp), %rdx
movl 0x4c(%rsp), %ecx
incl %ecx
cmpl %edx, %ecx
jl 0x53d9
jmp 0x59ff
movapd %xmm6, %xmm13
movl 0x1c(%rsp), %eax
incl %eax
movl %eax, 0x1c(%rsp)
imull $0xcccccccd, %eax, %eax # imm = 0xCCCCCCCD
rorl %eax
cmpl $0x19999999, %eax       # imm = 0x19999999
ja 0x5a50
movq %rdx, %rbx
leaq 0x9576(%rip), %rdi      # 0xef98
xorl %eax, %eax
movsd %xmm13, 0x30(%rsp)
callq 0x5d62
movsd 0x30(%rsp), %xmm13
pcmpeqd %xmm9, %xmm9
movdqa 0x942b(%rip), %xmm8     # 0xee70
movsd 0x938b(%rip), %xmm6     # 0xedd8
movq %rbx, %rdx
movsd 0x58(%rsp), %xmm0
ucomisd %xmm13, %xmm0
seta %bl
movdqa 0x943a(%rip), %xmm7     # 0xeea0
jbe 0x5bd7
movq 0x10(%rsp), %rcx
movsd 0x28(%rcx), %xmm0
ucomisd %xmm13, %xmm0
seta %al
testb %al, 0xf(%rsp)
jne 0x5bfc
movslq 0x1c(%rcx), %rdi
testq %rdi, %rdi
jle 0x5b8d
movq 0x10(%rsp), %rax
movl 0x20(%rax), %eax
leal 0x3(%rdi), %ecx
leaq -0x1(%rdi), %rdx
movq %rdx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl $0x2, %ecx
shlq $0x4, %rcx
xorl %edx, %edx
movdqa 0x93a1(%rip), %xmm1     # 0xee60
movdqa 0x93c9(%rip), %xmm2     # 0xee90
movdqa %xmm0, %xmm3
pxor %xmm8, %xmm3
movdqa %xmm1, %xmm4
pxor %xmm8, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm3, %xmm5
pcmpeqd %xmm3, %xmm4
pshufd $0xf5, %xmm4, %xmm6     # xmm6 = xmm4[1,1,3,3]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm4     # xmm4 = xmm5[1,1,3,3]
por %xmm6, %xmm4
movd %xmm4, %esi
notl %esi
testb $0x1, %sil
je 0x5b0b
movq 0x20(%rsp), %rsi
movl %eax, (%rsi,%rdx)
pxor %xmm9, %xmm4
pextrw $0x4, %xmm4, %esi
testb $0x1, %sil
je 0x5b24
movq 0x20(%rsp), %rsi
movl %eax, 0x4(%rsi,%rdx)
movdqa %xmm2, %xmm4
pxor %xmm8, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm3, %xmm5
pcmpeqd %xmm3, %xmm4
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pand %xmm5, %xmm4
pshufd $0xf5, %xmm5, %xmm3     # xmm3 = xmm5[1,1,3,3]
por %xmm4, %xmm3
pxor %xmm9, %xmm3
pextrw $0x0, %xmm3, %esi
testb $0x1, %sil
je 0x5b64
movq 0x20(%rsp), %rsi
movl %eax, 0x8(%rsi,%rdx)
pextrw $0x4, %xmm3, %esi
testb $0x1, %sil
je 0x5b78
movq 0x20(%rsp), %rsi
movl %eax, 0xc(%rsi,%rdx)
paddq %xmm7, %xmm1
paddq %xmm7, %xmm2
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0x5ac7
movq %rdi, %r12
leaq 0x9403(%rip), %rdi      # 0xef9a
xorl %eax, %eax
callq 0x5d62
pcmpeqd %xmm9, %xmm9
movdqa 0x92c4(%rip), %xmm8     # 0xee70
movq %r12, %rdx
movsd 0x58(%rsp), %xmm0
mulsd 0x9073(%rip), %xmm0     # 0xec30
movq 0x10(%rsp), %rax
maxsd 0x28(%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0x9203(%rip), %xmm6     # 0xedd8
jmp 0x5bdc
movq 0x10(%rsp), %rax
movb %bl, 0xf(%rsp)
movl 0x1c(%rsp), %ecx
cmpl 0x24(%rax), %ecx
movq %rax, %rbx
jl 0x533c
jmp 0x5bff
movl $0x0, 0x1c(%rsp)
jmp 0x5bff
movq %rcx, %rbx
leaq 0x9396(%rip), %rdi      # 0xef9c
movl 0x1c(%rsp), %r12d
movl %r12d, %esi
xorl %eax, %eax
callq 0x5d62
cmpl 0x24(%rbx), %r12d
jl 0x5c29
leaq 0x939e(%rip), %rdi      # 0xefc0
xorl %eax, %eax
callq 0x5d62
movslq 0x20(%rbx), %rax
movl 0x18(%rbx), %ecx
imull %eax, %ecx
testl %ecx, %ecx
jle 0x5c64
movl %ecx, %ecx
xorpd %xmm0, %xmm0
xorl %edx, %edx
movq 0x68(%rsp), %r8
movsd (%rbp,%rdx,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rdx
cmpq %rdx, %rcx
jne 0x5c44
mulsd 0x8fce(%rip), %xmm0     # 0xec30
jmp 0x5c6d
xorpd %xmm0, %xmm0
movq 0x68(%rsp), %r8
movl 0x1c(%rbx), %ecx
movl %ecx, %edx
imull %eax, %edx
testl %edx, %edx
jle 0x5ca3
movl %edx, %edx
xorl %esi, %esi
pxor %xmm1, %xmm1
xorl %ebx, %ebx
movsd (%r8,%rsi,8), %xmm2
addsd %xmm2, %xmm0
xorl %edi, %edi
ucomisd %xmm2, %xmm1
setne %dil
addl %edi, %ebx
incq %rsi
cmpq %rsi, %rdx
jne 0x5c83
jmp 0x5ca5
xorl %ebx, %ebx
testl %ecx, %ecx
jle 0x5cd9
movq 0x10(%rsp), %rdx
movq 0x30(%rdx), %rdx
movq 0x8(%rdx), %rdx
shlq $0x3, %rax
xorl %esi, %esi
movq %r8, %rdi
cvttsd2si (%rdx,%rsi,8), %r8d
movslq %r8d, %r8
subsd (%rdi,%r8,8), %xmm0
incq %rsi
addq %rax, %rdi
cmpq %rsi, %rcx
jne 0x5cbf
leaq 0x930d(%rip), %rdi      # 0xefed
movb $0x1, %al
callq 0x5d62
leaq 0x9316(%rip), %rdi      # 0xf004
movl %ebx, %esi
xorl %eax, %eax
callq 0x5d62
movq 0x68(%rsp), %rdi
callq 0x21e0
movq 0x98(%rsp), %rdi
callq 0x21e0
movq %r15, %rdi
callq 0x21e0
movq 0x38(%rsp), %rdi
callq 0x21e0
movq %r13, %rdi
callq 0x21e0
movq %r14, %rdi
callq 0x21e0
movq 0x78(%rsp), %rdi
callq 0x21e0
movq 0x80(%rsp), %rdi
callq 0x21e0
movq 0x20(%rsp), %rdi
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21e0