// File: /workspace/github_cpp_makefile_star2_O2/cjlin1[P]liblinear/linear.cpp
// Function: train
model* train(const problem *prob, const parameter *param)
{
	int i,j;
	int l = prob->l;
	int n = prob->n;
	int w_size = prob->n;
	model *model_ = Malloc(model,1);

	if(prob->bias>=0)
		model_->nr_feature=n-1;
	else
		model_->nr_feature=n;
	model_->param = *param;
	model_->bias = prob->bias;

	if(check_regression_model(model_))
	{
		model_->w = Malloc(double, w_size);

		if(param->init_sol != NULL)
			for(i=0;i<w_size;i++)
				model_->w[i] = param->init_sol[i];
		else
			for(i=0;i<w_size;i++)
				model_->w[i] = 0;

		model_->nr_class = 2;
		model_->label = NULL;
		train_one(prob, param, model_->w, 0, 0);
	}
	else if(check_oneclass_model(model_))
	{
		model_->w = Malloc(double, w_size);
		model_->nr_class = 2;
		model_->label = NULL;
		solve_oneclass_svm(prob, param, model_->w, &(model_->rho));
	}
	else
	{
		int nr_class;
		int *label = NULL;
		int *start = NULL;
		int *count = NULL;
		int *perm = Malloc(int,l);

		// group training data of the same class
		group_classes(prob,&nr_class,&label,&start,&count,perm);

		model_->nr_class=nr_class;
		model_->label = Malloc(int,nr_class);
		for(i=0;i<nr_class;i++)
			model_->label[i] = label[i];

		// calculate weighted C
		double *weighted_C = Malloc(double, nr_class);
		for(i=0;i<nr_class;i++)
			weighted_C[i] = param->C;
		for(i=0;i<param->nr_weight;i++)
		{
			for(j=0;j<nr_class;j++)
				if(param->weight_label[i] == label[j])
					break;
			if(j == nr_class)
				fprintf(stderr,"WARNING: class label %d specified in weight is not found\n", param->weight_label[i]);
			else
				weighted_C[j] *= param->weight[i];
		}

		// constructing the subproblem
		feature_node **x = Malloc(feature_node *,l);
		for(i=0;i<l;i++)
			x[i] = prob->x[perm[i]];

		int k;
		problem sub_prob;
		sub_prob.l = l;
		sub_prob.n = n;
		sub_prob.x = Malloc(feature_node *,sub_prob.l);
		sub_prob.y = Malloc(double,sub_prob.l);

		for(k=0; k<sub_prob.l; k++)
			sub_prob.x[k] = x[k];

		// multi-class svm by Crammer and Singer
		if(param->solver_type == MCSVM_CS)
		{
			model_->w=Malloc(double, n*nr_class);
			for(i=0;i<nr_class;i++)
				for(j=start[i];j<start[i]+count[i];j++)
					sub_prob.y[j] = i;
			Solver_MCSVM_CS Solver(&sub_prob, nr_class, weighted_C, param->eps);
			Solver.Solve(model_->w);
		}
		else
		{
			if(nr_class == 2)
			{
				model_->w=Malloc(double, w_size);

				int e0 = start[0]+count[0];
				k=0;
				for(; k<e0; k++)
					sub_prob.y[k] = +1;
				for(; k<sub_prob.l; k++)
					sub_prob.y[k] = -1;

				if(param->init_sol != NULL)
					for(i=0;i<w_size;i++)
						model_->w[i] = param->init_sol[i];
				else
					for(i=0;i<w_size;i++)
						model_->w[i] = 0;

				train_one(&sub_prob, param, model_->w, weighted_C[0], weighted_C[1]);
			}
			else
			{
				model_->w=Malloc(double, w_size*nr_class);
				double *w=Malloc(double, w_size);
				for(i=0;i<nr_class;i++)
				{
					int si = start[i];
					int ei = si+count[i];

					k=0;
					for(; k<si; k++)
						sub_prob.y[k] = -1;
					for(; k<ei; k++)
						sub_prob.y[k] = +1;
					for(; k<sub_prob.l; k++)
						sub_prob.y[k] = -1;

					if(param->init_sol != NULL)
						for(j=0;j<w_size;j++)
							w[j] = param->init_sol[j*nr_class+i];
					else
						for(j=0;j<w_size;j++)
							w[j] = 0;

					train_one(&sub_prob, param, w, weighted_C[i], param->C);

					for(j=0;j<w_size;j++)
						model_->w[j*nr_class+i] = w[j];
				}
				free(w);
			}

		}

		free(x);
		free(label);
		free(start);
		free(count);
		free(perm);
		free(sub_prob.x);
		free(sub_prob.y);
		free(weighted_C);
	}
	return model_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, %r15
movq %rdi, %rbx
movl (%rdi), %ebp
movl 0x4(%rdi), %r14d
movslq %r14d, %r12
pushq $0x78
popq %rdi
callq 0x21f0
movq %rbx, 0x48(%rsp)
movsd 0x18(%rbx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movl %r12d, %ecx
adcl $-0x1, %ecx
movq %rax, %rbx
movl %ecx, 0x54(%rax)
pushq $0xa
popq %rcx
movq %rax, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
movsd %xmm0, 0x68(%rax)
movq %rax, %rdi
callq 0x64dc
testl %eax, %eax
je 0x5420
leaq (,%r12,8), %rdi
callq 0x21f0
movq %rax, 0x58(%rbx)
movq 0x40(%r15), %rdx
xorl %ecx, %ecx
testl %r12d, %r12d
cmovgl %r14d, %ecx
testq %rdx, %rdx
je 0x5541
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x5552
movsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, (%rax,%rsi,8)
incq %rsi
jmp 0x5408
movq %r12, 0x30(%rsp)
movq %r14, 0x28(%rsp)
movslq %ebp, %r12
cmpl $0x15, (%rbx)
movl %ebp, 0x38(%rsp)
movq %rbx, 0x60(%rsp)
movq %r12, 0x50(%rsp)
jne 0x557b
movq %rbx, %r14
movq %r12, %rcx
shlq $0x4, %rcx
testl %ebp, %ebp
pushq $-0x1
popq %rax
cmovsq %rax, %rcx
movq %rcx, (%rsp)
movq %r12, %rcx
movl %ebp, %r12d
leaq (,%rcx,4), %r13
testl %ebp, %ebp
cmovsq %rax, %r13
leaq (,%rcx,8), %rbp
testl %r12d, %r12d
cmovsq %rax, %rbp
movq 0x30(%rsp), %rdi
shlq $0x3, %rdi
callq 0x21f0
movq %rax, %rbx
movq %rax, 0x58(%r14)
movl $0x2, 0x50(%r14)
andq $0x0, 0x60(%r14)
movsd 0x8(%r15), %xmm0
movsd %xmm0, 0x70(%rsp)
movsd 0x38(%r15), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbp, %rdi
callq 0x2030
movq %rax, 0x68(%rsp)
movq %rbp, %rdi
callq 0x2030
movq %rax, 0x20(%rsp)
movq %r13, %rdi
callq 0x2030
movq %rax, %r13
movq %rbp, %rdi
callq 0x2030
movq %rax, %rbp
movq (%rsp), %r15
movq %r15, %rdi
callq 0x2030
movq %rax, %r14
movq %r15, %rdi
callq 0x2030
movq %rax, 0x40(%rsp)
cvtsi2sd %r12d, %xmm0
mulsd 0x10(%rsp), %xmm0
cvttsd2si %xmm0, %eax
xorl %edx, %edx
testl %eax, %eax
movl $0x0, %ecx
cmovgl %eax, %ecx
movq 0x28(%rsp), %rsi
movabsq $0x3ff0000000000000, %rdi # imm = 0x3FF0000000000000
cmpq %rdx, %rcx
je 0x5684
movq %rdi, (%rbp,%rdx,8)
incq %rdx
jmp 0x552e
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x5552
andq $0x0, (%rax,%rdx,8)
incq %rdx
jmp 0x5543
movl $0x2, 0x50(%rbx)
andq $0x0, 0x60(%rbx)
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
movq 0x48(%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x64f4
jmp 0x64af
leaq (,%r12,4), %rbx
movq %rbx, %rdi
callq 0x21f0
movq %rax, 0x70(%rsp)
movq %r12, %r14
pushq $0x40
popq %r12
movq %r12, %rdi
callq 0x21f0
movq %rax, %r13
movq %r12, %rdi
callq 0x21f0
movq %rax, (%rsp)
movq %rbx, %rdi
callq 0x21f0
movq %rax, %r8
xorl %r12d, %r12d
testl %r14d, %r14d
movl $0x0, %edi
cmovgl %ebp, %edi
pushq $0x10
popq %r9
xorl %esi, %esi
movq %rdi, 0x40(%rsp)
movq %rax, 0x8(%rsp)
movslq %esi, %rbx
cmpq %rdi, %r12
je 0x56b2
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
cvttsd2si (%rax,%r12,8), %r14d
testl %esi, %esi
movl $0x0, %edx
cmovgl %esi, %edx
xorl %ecx, %ecx
movq (%rsp), %rax
cmpq %rcx, %rdx
je 0x5618
cmpl %r14d, (%r13,%rcx,4)
je 0x5613
incq %rcx
jmp 0x5602
incl (%rax,%rcx,4)
movl %ecx, %edx
movl %edx, (%r8,%r12,4)
cmpl %esi, %edx
jne 0x567c
cmpl %r9d, %esi
jne 0x566a
leal (%rsi,%rsi), %ecx
movl %ecx, 0x20(%rsp)
movslq %ecx, %rbp
shlq $0x2, %rbp
movq %r13, %rdi
movq %rsi, 0x10(%rsp)
movq %rbp, %rsi
movq %rax, (%rsp)
callq 0x2270
movq %rax, %r13
movq (%rsp), %rdi
movq %rbp, %rsi
callq 0x2270
movl 0x20(%rsp), %r9d
movq 0x8(%rsp), %r8
movq 0x40(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl %r14d, (%r13,%rbx,4)
movq %rax, (%rsp)
movl $0x1, (%rax,%rbx,4)
incl %esi
incq %r12
jmp 0x55d7
cmpl %eax, 0x38(%rsp)
jle 0x5698
cvtsi2sd %eax, %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, (%rbp,%rcx,8)
cltq
incq %rax
movq 0x50(%rsp), %rcx
cmpq %rcx, %rax
jge 0x5703
andq $0x0, (%rbp,%rax,8)
incq %rax
jmp 0x56a2
cmpl $0x2, %esi
movq 0x70(%rsp), %r14
movq (%rsp), %rcx
jne 0x5719
cmpl $-0x1, (%r13)
jne 0x5719
cmpl $0x1, 0x4(%r13)
jne 0x5719
movabsq $-0xffffffff, %rax      # imm = 0xFFFFFFFF00000001
movq %rax, (%r13)
movq (%rcx), %xmm0
pshufd $0xe1, %xmm0, %xmm0     # xmm0 = xmm0[1,0,2,3]
movq %xmm0, (%rcx)
xorl %eax, %eax
cmpq %rax, %rdi
je 0x5719
xorl %ecx, %ecx
cmpl $0x0, (%r8,%rax,4)
sete %cl
movl %ecx, (%r8,%rax,4)
incq %rax
jmp 0x56eb
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
cmpq %rax, %rsi
je 0x574b
andq $0x0, (%rbx,%rax,8)
incq %rax
jmp 0x570a
movq %rsi, 0x10(%rsp)
leaq (,%rbx,4), %rbp
movq %rbp, %rdi
callq 0x21f0
movq (%rsp), %rsi
andl $0x0, (%rax)
pushq $0x1
popq %rdx
xorl %ecx, %ecx
cmpq %rbx, %rdx
jge 0x57ae
addl -0x4(%rsi,%rdx,4), %ecx
movl %ecx, (%rax,%rdx,4)
incq %rdx
jmp 0x573a
movq %r14, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
xorl %r14d, %r14d
movl 0x38(%rsp), %eax
testl %eax, %eax
movl $0x0, %ecx
cmovgl %eax, %ecx
movq %rcx, 0x8(%rsp)
cmpq %r14, 0x8(%rsp)
je 0x57da
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax,%r14,8), %r15
movq %r15, %rdi
callq 0xb4ba
movq 0x68(%rsp), %rax
movsd %xmm0, (%rax,%r14,8)
movsd (%rbp,%r14,8), %xmm0
movq %r15, %rdi
movq %rbx, %rsi
callq 0xb47e
movl %r14d, (%r13,%r14,4)
incq %r14
jmp 0x576b
xorl %r9d, %r9d
movq 0x40(%rsp), %r8
movq 0x8(%rsp), %rdi
cmpq %r9, %r8
je 0x5dab
movslq (%rdi,%r9,4), %rcx
movslq (%rax,%rcx,4), %rdx
movl %r9d, (%r14,%rdx,4)
incl %edx
movl %edx, (%rax,%rcx,4)
incq %r9
jmp 0x57bb
movl 0x38(%rsp), %r15d
xorl %r14d, %r14d
movl %r14d, 0x7c(%rsp)
cmpl $0x3e8, %r14d           # imm = 0x3E8
je 0x5dc4
testl %r15d, %r15d
movl $0x0, %r14d
movl %r15d, 0x50(%rsp)
cmovgl %r15d, %r14d
xorl %r15d, %r15d
movsd 0x681f(%rip), %xmm4     # 0xc030
movsd 0x75bf(%rip), %xmm5     # 0xcdd8
cmpq %r15, %r14
je 0x58ac
movsd %xmm5, 0x10(%rsp)
movsd %xmm4, (%rsp)
movslq (%r13,%r15,4), %r12
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax,%r12,8), %rsi
movq %rbx, %rdi
callq 0xb45a
movq 0x20(%rsp), %rax
movsd %xmm0, (%rax,%r12,8)
movsd (%rbp,%r12,8), %xmm1
movsd 0x73df(%rip), %xmm2     # 0xcc40
ucomisd %xmm1, %xmm2
jbe 0x5883
movapd %xmm0, %xmm2
xorpd 0x740d(%rip), %xmm2     # 0xcc80
movsd 0x10(%rsp), %xmm5
maxsd %xmm2, %xmm5
xorpd %xmm2, %xmm2
jmp 0x588d
xorpd %xmm2, %xmm2
movsd 0x10(%rsp), %xmm5
ucomisd %xmm2, %xmm1
movsd (%rsp), %xmm4
jbe 0x58a4
xorpd 0x73e0(%rip), %xmm0     # 0xcc80
minsd %xmm0, %xmm4
incq %r15
jmp 0x5819
movapd %xmm5, %xmm0
subsd %xmm4, %xmm0
movsd 0x70(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x58e6
movl 0x38(%rsp), %r14d
cmpl %r14d, 0x50(%rsp)
je 0x5dc4
leaq 0x7663(%rip), %rdi      # 0xcf3a
xorl %eax, %eax
callq 0x52d8
movl %r14d, %r15d
jmp 0x57f4
xorl %eax, %eax
movq 0x30(%rsp), %r8
movsd 0x734b(%rip), %xmm2     # 0xcc40
xorpd %xmm3, %xmm3
movl 0x50(%rsp), %r9d
cmpl %r9d, %eax
jge 0x596f
movslq %eax, %rcx
movl (%r13,%rcx,4), %edx
movslq %edx, %rsi
movsd (%rbp,%rsi,8), %xmm0
ucomisd %xmm2, %xmm0
jne 0x5934
jp 0x5934
movq 0x20(%rsp), %rdi
movsd (%rdi,%rsi,8), %xmm1
xorpd 0x7352(%rip), %xmm1     # 0xcc80
ucomisd %xmm5, %xmm1
ja 0x5954
ucomisd %xmm3, %xmm0
jne 0x596b
jp 0x596b
movq 0x20(%rsp), %rdi
movsd (%rdi,%rsi,8), %xmm0
xorpd 0x7332(%rip), %xmm0     # 0xcc80
ucomisd %xmm0, %xmm4
jbe 0x596b
movslq %r9d, %rsi
decl %r9d
movl -0x4(%r13,%rsi,4), %edi
movl %edi, (%r13,%rcx,4)
movl %edx, -0x4(%r13,%rsi,4)
decl %eax
incl %eax
jmp 0x58fe
xorl %eax, %eax
testl %r9d, %r9d
movl $0x0, %ecx
movl %r9d, 0x50(%rsp)
cmovgl %r9d, %ecx
xorl %r15d, %r15d
xorl %r9d, %r9d
cmpq %rax, %rcx
je 0x59ee
movslq (%r13,%rax,4), %rdx
movq 0x20(%rsp), %rsi
movsd (%rsi,%rdx,8), %xmm0
xorpd 0x72dc(%rip), %xmm0     # 0xcc80
movsd (%rbp,%rdx,8), %xmm1
ucomisd %xmm1, %xmm2
jbe 0x59c8
movslq %r15d, %r15
movq %r15, %rsi
shlq $0x4, %rsi
movl %edx, (%r8,%rsi)
movsd %xmm0, 0x8(%r8,%rsi)
incl %r15d
ucomisd %xmm3, %xmm1
jbe 0x59e9
movslq %r9d, %r9
movq %r9, %rsi
shlq $0x4, %rsi
movq 0x40(%rsp), %rdi
movl %edx, (%rdi,%rsi)
movsd %xmm0, 0x8(%rdi,%rsi)
incl %r9d
incq %rax
jmp 0x5988
movl 0x50(%rsp), %eax
cltd
pushq $0xa
popq %rcx
idivl %ecx
cmpl $0x2, %eax
pushq $0x1
popq %rcx
cmovll %ecx, %eax
cmpl %r9d, %r15d
movl %r9d, %r14d
cmovll %r15d, %r14d
cmpl %r14d, %eax
cmovll %eax, %r14d
leal -0x1(%r15), %edx
movl %edx, (%rsp)
subl %r14d, %r15d
movq 0x30(%rsp), %rdi
xorl %esi, %esi
movl %r15d, %ecx
movq %r9, 0x10(%rsp)
callq 0xb2dc
movslq %r15d, %rdi
shlq $0x4, %rdi
addq 0x30(%rsp), %rdi
movslq %r14d, %r14
movq %r14, %rsi
pushq $0x10
popq %rdx
leaq 0x59e0(%rip), %r12      # 0xb42c
movq %r12, %rcx
callq 0x22e0
movq 0x10(%rsp), %rdx
decl %edx
movq 0x40(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
movl %r14d, %ecx
callq 0xb2dc
movq %r15, %rdi
movq %r14, %rsi
pushq $0x10
popq %rdx
movq %r12, %rcx
callq 0x22e0
xorpd %xmm3, %xmm3
movsd 0x71b6(%rip), %xmm2     # 0xcc40
testl %r14d, %r14d
movl $0x0, %ecx
cmovgl %r14d, %ecx
shlq $0x4, %rcx
xorl %r15d, %r15d
movq %rcx, 0xa0(%rsp)
cmpq %r15, %rcx
je 0x5d79
movslq (%rsp), %rax
shlq $0x4, %rax
movq 0x30(%rsp), %rdx
movslq (%rdx,%rax), %r14
movq 0x40(%rsp), %rax
movslq (%rax,%r15), %rdx
movsd (%rbp,%r14,8), %xmm1
ucomisd %xmm3, %xmm1
jne 0x5ae9
jp 0x5ae9
movsd (%rbp,%rdx,8), %xmm0
ucomisd %xmm3, %xmm0
jne 0x5ae9
jnp 0x5d6d
ucomisd %xmm2, %xmm1
jne 0x5b03
jp 0x5b03
movsd (%rbp,%rdx,8), %xmm0
ucomisd %xmm2, %xmm0
jne 0x5b03
jnp 0x5d6d
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax,%r14,8), %rsi
movq (%rax,%rdx,8), %r12
movq %rbx, %rdi
movq %rsi, 0xd0(%rsp)
movq %r14, 0xd8(%rsp)
movsd %xmm1, 0x10(%rsp)
movq %rdx, %r14
callq 0xb45a
movapd %xmm0, 0xb0(%rsp)
movq %rbx, %rdi
movq %r12, 0xa8(%rsp)
movq %r12, %rsi
callq 0xb45a
movq %r14, %rax
movsd 0x10(%rsp), %xmm4
movq 0xa0(%rsp), %rcx
xorpd %xmm3, %xmm3
movsd 0x70d2(%rip), %xmm2     # 0xcc40
movapd %xmm0, %xmm6
ucomisd %xmm4, %xmm2
jbe 0x5ba7
movsd (%rbp,%rax,8), %xmm5
ucomisd %xmm3, %xmm5
jbe 0x5ba7
movsd 0x70c4(%rip), %xmm0     # 0xcc50
subsd %xmm6, %xmm0
movapd 0xb0(%rsp), %xmm1
xorpd 0x70df(%rip), %xmm1     # 0xcc80
ucomisd %xmm0, %xmm1
ja 0x5be8
ucomisd %xmm3, %xmm4
jbe 0x5d6d
movsd (%rbp,%rax,8), %xmm5
ucomisd %xmm5, %xmm2
jbe 0x5d6d
movsd 0x7087(%rip), %xmm0     # 0xcc50
subsd 0xb0(%rsp), %xmm0
movapd %xmm6, %xmm1
xorpd 0x70a2(%rip), %xmm1     # 0xcc80
ucomisd %xmm0, %xmm1
jbe 0x5d6d
movsd %xmm5, 0xc8(%rsp)
movq 0xd0(%rsp), %r12
movq %r12, %rdi
movq 0xa8(%rsp), %rsi
movapd %xmm6, 0xe0(%rsp)
callq 0xb4d8
movsd 0xc8(%rsp), %xmm5
movq 0xd8(%rsp), %rcx
xorpd %xmm3, %xmm3
movsd 0x7011(%rip), %xmm2     # 0xcc40
movq 0x68(%rsp), %rax
movsd (%rax,%rcx,8), %xmm1
addsd (%rax,%r14,8), %xmm1
addsd %xmm0, %xmm0
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
cmpnlesd %xmm3, %xmm0
andpd %xmm0, %xmm1
movsd 0x6ff4(%rip), %xmm4     # 0xcc50
andnpd %xmm4, %xmm0
movsd 0x10(%rsp), %xmm4
orpd %xmm1, %xmm0
movapd 0xb0(%rsp), %xmm1
subsd 0xe0(%rsp), %xmm1
divsd %xmm0, %xmm1
movapd %xmm4, %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rbp,%rcx,8)
addsd (%rbp,%r14,8), %xmm1
addsd %xmm4, %xmm5
movsd %xmm1, (%rbp,%r14,8)
ucomisd %xmm2, %xmm5
jbe 0x5cef
movsd (%rbp,%rcx,8), %xmm0
ucomisd %xmm2, %xmm0
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
jbe 0x5cd4
movq %rax, (%rbp,%rcx,8)
movapd %xmm5, %xmm1
addsd 0x6373(%rip), %xmm1     # 0xc040
movsd %xmm1, (%rbp,%r14,8)
ucomisd %xmm2, %xmm1
jbe 0x5d20
movq %rax, (%rbp,%r14,8)
addsd 0x6359(%rip), %xmm5     # 0xc040
movsd %xmm5, (%rbp,%rcx,8)
jmp 0x5d20
ucomisd %xmm1, %xmm3
jbe 0x5d07
andq $0x0, (%rbp,%r14,8)
movsd %xmm5, (%rbp,%rcx,8)
movapd %xmm5, %xmm0
jmp 0x5d0d
movsd (%rbp,%rcx,8), %xmm0
ucomisd %xmm0, %xmm3
jbe 0x5d20
andq $0x0, (%rbp,%rcx,8)
movsd %xmm5, (%rbp,%r14,8)
movsd (%rbp,%rcx,8), %xmm0
subsd %xmm4, %xmm0
movapd %xmm0, 0x10(%rsp)
movq %r12, %rdi
movq %rbx, %rsi
callq 0xb47e
movapd 0x10(%rsp), %xmm0
xorpd 0x6f37(%rip), %xmm0     # 0xcc80
movq 0xa8(%rsp), %rdi
movq %rbx, %rsi
callq 0xb47e
movsd 0x6edf(%rip), %xmm2     # 0xcc40
xorpd %xmm3, %xmm3
movq 0xa0(%rsp), %rcx
addq $0x10, %r15
decl (%rsp)
jmp 0x5aa5
movl 0x7c(%rsp), %r14d
incl %r14d
movl %r14d, %eax
xorl %edx, %edx
pushq $0xa
popq %rcx
divl %ecx
testl %edx, %edx
movl 0x50(%rsp), %r15d
jne 0x57e2
leaq 0x7199(%rip), %rdi      # 0xcf38
xorl %eax, %eax
callq 0x52d8
jmp 0x57e2
andl $0x0, (%rax)
pushq $0x1
popq %rdx
xorl %ecx, %ecx
cmpq %rbx, %rdx
jge 0x5e13
addl -0x4(%rsi,%rdx,4), %ecx
movl %ecx, (%rax,%rdx,4)
incq %rdx
jmp 0x5db3
leaq 0x7171(%rip), %rdi      # 0xcf3c
movl 0x7c(%rsp), %r14d
movl %r14d, %esi
xorl %eax, %eax
callq 0x52d8
cmpl $0x3e8, %r14d           # imm = 0x3E8
jb 0x5df1
leaq 0x77aa(%rip), %rdi      # 0xd594
xorl %eax, %eax
callq 0x52d8
xorpd %xmm0, %xmm0
xorl %eax, %eax
movq 0x28(%rsp), %rcx
cmpq %rax, %rcx
je 0x5e57
movsd (%rbx,%rax,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
jmp 0x5dfc
movq %rax, 0x68(%rsp)
callq 0x21a0
movq 0x60(%rsp), %r14
movq 0x10(%rsp), %r12
movl %r12d, 0x50(%r14)
movq %rbp, %rdi
callq 0x21f0
movq %rax, 0x60(%r14)
xorl %ecx, %ecx
testl %r12d, %r12d
movl $0x0, %ebp
cmovgl %r12d, %ebp
cmpq %rcx, %rbp
je 0x5e7e
movl (%r13,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
incq %rcx
jmp 0x5e45
xorl %eax, %eax
xorpd %xmm1, %xmm1
xorl %r15d, %r15d
cmpq %rax, 0x8(%rsp)
je 0x5ea5
movsd (%rbp,%rax,8), %xmm2
xorl %ecx, %ecx
ucomisd %xmm1, %xmm2
seta %cl
addl %ecx, %r15d
incq %rax
jmp 0x5e60
shlq $0x3, %rbx
movq %rbx, %rdi
callq 0x21f0
xorl %ecx, %ecx
cmpq %rcx, %rbp
je 0x5f87
movsd 0x10(%r15), %xmm0
movsd %xmm0, (%rax,%rcx,8)
incq %rcx
jmp 0x5e8c
mulsd 0x6d83(%rip), %xmm0     # 0xcc30
leaq 0x70d9(%rip), %rdi      # 0xcf8d
movb $0x1, %al
callq 0x52d8
leaq 0x70e2(%rip), %rdi      # 0xcfa4
xorl %r14d, %r14d
movl %r15d, %esi
xorl %eax, %eax
callq 0x52d8
movsd 0x6f01(%rip), %xmm0     # 0xcdd8
movsd %xmm0, (%rsp)
movsd 0x614c(%rip), %xmm0     # 0xc030
movapd %xmm0, 0x10(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x38(%rsp)
movapd %xmm0, 0x50(%rsp)
cmpq %r14, 0x8(%rsp)
je 0x6009
movq 0x48(%rsp), %rax
movq 0x10(%rax), %rax
movq (%rax,%r14,8), %rsi
movq %rbx, %rdi
callq 0xb45a
movsd 0x6d1e(%rip), %xmm2     # 0xcc40
movsd (%rbp,%r14,8), %xmm1
ucomisd %xmm2, %xmm1
jne 0x5f41
jp 0x5f41
movsd (%rsp), %xmm1
maxsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
jmp 0x5f7f
ucomisd 0x60ef(%rip), %xmm1     # 0xc038
jne 0x5f5f
jp 0x5f5f
movapd 0x10(%rsp), %xmm1
minsd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
jmp 0x5f7f
movsd 0x38(%rsp), %xmm1
addsd %xmm2, %xmm1
movsd %xmm1, 0x38(%rsp)
movapd 0x50(%rsp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, 0x50(%rsp)
incq %r14
jmp 0x5efa
movq 0xb052(%rip), %r14      # 0x10fe0
xorl %r12d, %r12d
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rsi
movslq 0x18(%r15), %rcx
cmpq %rcx, %r12
jge 0x6096
xorl %edx, %edx
cmpq %rdx, %rbp
je 0x5fc3
movq 0x20(%r15), %rcx
movl (%rcx,%r12,4), %ecx
cmpl (%r13,%rdx,4), %ecx
je 0x5fc5
incq %rdx
jmp 0x5faa
movl %ebp, %edx
cmpl %esi, %edx
je 0x5fe4
movq 0x28(%r15), %rcx
movsd (%rcx,%r12,8), %xmm0
movl %edx, %ecx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
incq %r12
jmp 0x5f9b
movq (%r14), %rdi
movq 0x20(%r15), %rax
movl (%rax,%r12,4), %edx
leaq 0x6fb8(%rip), %rsi      # 0xcfae
xorl %eax, %eax
callq 0x2220
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rax
jmp 0x5fdf
movapd 0x10(%rsp), %xmm1
addsd (%rsp), %xmm1
mulsd 0x6c14(%rip), %xmm1     # 0xcc30
movapd 0x50(%rsp), %xmm2
movsd 0x38(%rsp), %xmm3
divsd %xmm3, %xmm2
xorpd %xmm0, %xmm0
cmpltsd %xmm3, %xmm0
andpd %xmm0, %xmm2
andnpd %xmm1, %xmm0
orpd %xmm2, %xmm0
movq 0x60(%rsp), %rbx
movlpd %xmm0, 0x70(%rbx)
leaq 0x7570(%rip), %rdi      # 0xd5c2
movb $0x1, %al
callq 0x52d8
movq 0x68(%rsp), %rdi
callq 0x21e0
movq 0x20(%rsp), %rdi
callq 0x21e0
movq %r13, %rdi
callq 0x21e0
movq %rbp, %rdi
callq 0x21e0
movq 0x30(%rsp), %rdi
callq 0x21e0
movq 0x40(%rsp), %rdi
callq 0x21e0
jmp 0x64af
movq 0x50(%rsp), %rax
leaq (,%rax,8), %rdi
movq %rdi, 0x20(%rsp)
callq 0x21f0
movq %rax, %r14
xorl %eax, %eax
movq 0x28(%rsp), %rsi
movq 0x70(%rsp), %r12
movq 0x40(%rsp), %rdi
cmpq %rax, %rdi
je 0x60e0
movq 0x48(%rsp), %rcx
movq 0x10(%rcx), %rcx
movslq (%r12,%rax,4), %rdx
movq (%rcx,%rdx,8), %rcx
movq %rcx, (%r14,%rax,8)
incq %rax
jmp 0x60c1
movl 0x38(%rsp), %eax
movl %eax, 0x80(%rsp)
movl %esi, 0x84(%rsp)
movq 0x20(%rsp), %rdi
callq 0x21f0
movq %rax, 0x90(%rsp)
movq 0x20(%rsp), %rdi
callq 0x21f0
movq 0x40(%rsp), %rdi
movq %rax, 0x88(%rsp)
xorl %eax, %eax
movq 0x10(%rsp), %rsi
cmpq %rax, %rdi
je 0x613c
movq (%r14,%rax,8), %rcx
movq 0x90(%rsp), %rdx
movq %rcx, (%rdx,%rax,8)
incq %rax
jmp 0x6122
cmpl $0x4, (%r15)
jne 0x619d
movq 0x28(%rsp), %rax
imull %esi, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x21f0
movq %rax, %rbx
movq 0x60(%rsp), %rax
movq %rbx, 0x58(%rax)
xorl %eax, %eax
movq (%rsp), %rdi
movq 0x68(%rsp), %r8
cmpq %rbp, %rax
je 0x61ee
movslq (%r8,%rax,4), %rcx
movslq (%rdi,%rax,4), %rdx
addq %rcx, %rdx
cvtsi2sd %eax, %xmm0
movq 0x88(%rsp), %rsi
cmpq %rdx, %rcx
jge 0x6198
movsd %xmm0, (%rsi,%rcx,8)
incq %rcx
jmp 0x6189
incq %rax
jmp 0x616d
cmpl $0x2, %esi
jne 0x6244
movq 0x30(%rsp), %rdi
shlq $0x3, %rdi
callq 0x21f0
movq 0x60(%rsp), %rbx
movq %rax, 0x58(%rbx)
movq (%rsp), %rcx
movl (%rcx), %ecx
movq 0x88(%rsp), %rdx
xorl %esi, %esi
testl %ecx, %ecx
cmovlel %esi, %ecx
movabsq $0x3ff0000000000000, %rdi # imm = 0x3FF0000000000000
cmpq %rsi, %rcx
je 0x63c3
movq %rdi, (%rdx,%rsi,8)
incq %rsi
jmp 0x61dc
movq %r14, %rbp
movsd 0x8(%r15), %xmm0
leaq 0xf0(%rsp), %r14
leaq 0x80(%rsp), %rsi
movq %r14, %rdi
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rcx
movl $0x186a0, %r8d          # imm = 0x186A0
callq 0x464a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4864
leaq 0xf0(%rsp), %rdi
callq 0x46a4
movq 0x60(%rsp), %rbx
movq %rbp, %r14
jmp 0x6460
movq %r14, 0x50(%rsp)
movq 0x28(%rsp), %r14
imull %r14d, %esi
movslq %esi, %rdi
shlq $0x3, %rdi
callq 0x21f0
movq %rax, %r12
movq 0x60(%rsp), %rax
movq %r12, 0x58(%rax)
movq 0x30(%rsp), %rdi
shlq $0x3, %rdi
callq 0x21f0
movq %r12, %rdx
movq %r14, %r8
xorl %r9d, %r9d
testl %r8d, %r8d
cmovlel %r9d, %r8d
movq %rax, %r12
movabsq $-0x4010000000000000, %r14 # imm = 0xBFF0000000000000
xorl %r10d, %r10d
movq %r8, 0x28(%rsp)
cmpq %rbp, %r10
je 0x63ea
movq %rdx, 0x10(%rsp)
movq 0x68(%rsp), %rax
movslq (%rax,%r10,4), %rdx
movq (%rsp), %rax
movslq (%rax,%r10,4), %rcx
movq 0x88(%rsp), %rsi
testl %edx, %edx
movl $0x0, %eax
cmovgl %edx, %eax
xorl %edi, %edi
cmpq %rdi, %rax
je 0x62de
movq %r14, (%rsi,%rdi,8)
incq %rdi
jmp 0x62d0
addq %rdx, %rcx
movq 0x88(%rsp), %rdx
movabsq $0x3ff0000000000000, %rsi # imm = 0x3FF0000000000000
movq 0x8(%rsp), %rdi
cmpq %rcx, %rax
jge 0x6306
movq %rsi, (%rdx,%rax,8)
incq %rax
jmp 0x62f8
movslq 0x80(%rsp), %rcx
movq 0x88(%rsp), %rdx
cmpq %rcx, %rax
jge 0x6324
movq %r14, (%rdx,%rax,8)
incq %rax
jmp 0x6316
movq 0x40(%r15), %rax
testq %rax, %rax
je 0x6349
addq %r9, %rax
xorl %ecx, %ecx
cmpq %rcx, %r8
je 0x635a
movsd (%rax), %xmm0
movsd %xmm0, (%r12,%rcx,8)
incq %rcx
addq %rbx, %rax
jmp 0x6332
xorl %eax, %eax
cmpq %rax, %r8
je 0x635a
andq $0x0, (%r12,%rax,8)
incq %rax
jmp 0x634b
movq %r10, 0x20(%rsp)
movsd (%rdi,%r10,8), %xmm0
movsd 0x10(%r15), %xmm1
leaq 0x80(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r9, 0x48(%rsp)
callq 0x64f4
movq 0x48(%rsp), %r9
movq 0x28(%rsp), %r8
movq 0x10(%rsp), %rdx
movq %rdx, %rax
xorl %ecx, %ecx
cmpq %rcx, %r8
je 0x63ae
movsd (%r12,%rcx,8), %xmm0
movsd %xmm0, (%rax)
incq %rcx
addq %rbx, %rax
jmp 0x6397
movq 0x20(%rsp), %r10
incq %r10
addq $0x8, %r9
addq $0x8, %rdx
jmp 0x629d
movq 0x88(%rsp), %rdx
movabsq $-0x4010000000000000, %rsi # imm = 0xBFF0000000000000
movq 0x28(%rsp), %rdi
cmpq 0x50(%rsp), %rcx
jge 0x6403
movq %rsi, (%rdx,%rcx,8)
incq %rcx
jmp 0x63da
movq %r12, %rdi
callq 0x21a0
movq 0x60(%rsp), %rbx
movq 0x70(%rsp), %r12
movq 0x50(%rsp), %r14
jmp 0x6460
movq 0x40(%r15), %rdx
xorl %ecx, %ecx
testl %edi, %edi
cmovgl %edi, %ecx
testq %rdx, %rdx
je 0x642e
xorl %esi, %esi
movq 0x8(%rsp), %rdi
cmpq %rsi, %rcx
je 0x6444
movsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, (%rax,%rsi,8)
incq %rsi
jmp 0x641a
xorl %edx, %edx
movq 0x8(%rsp), %rdi
cmpq %rdx, %rcx
je 0x6444
andq $0x0, (%rax,%rdx,8)
incq %rdx
jmp 0x6435
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm1
leaq 0x80(%rsp), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x64f4
movq %r14, %rdi
callq 0x21a0
movq %r13, %rdi
callq 0x21a0
movq 0x68(%rsp), %rdi
callq 0x21a0
movq (%rsp), %rdi
callq 0x21a0
movq %r12, %rdi
callq 0x21a0
movq 0x90(%rsp), %rdi
callq 0x21a0
movq 0x88(%rsp), %rdi
callq 0x21a0
movq 0x8(%rsp), %rdi
callq 0x21a0
movq %rbx, %rax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x46a4
movq %rbx, %rdi
callq 0x2290