// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/svm.c
// Function: svm_train
Svm_modelptr svm_train(Svm_problem prob, Svm_parameter param, int calculate_probability)
{
 /*Last Changed 04.01.2006 added probA, probB*/
	/*Last Changed 01.05.2005*/
	int i, j, k, l, nr_class, *start, *count, *perm, *nonzero, p = 0, si, sj, ci, cj, total_sv, *nz_count, nSV, *nz_start, q;
	Svm_weights f, *weights;
	Svm_modelptr model;
	Svm_node** x;
	Svm_problem sub_prob;
 model = safemalloc(sizeof(Svm_model), "svm_train", 6);
	model->prob = prob;
	model->param = param;
	if (in_list(param.svm_type, 3, ONE_CLASS, EPSILON_SVR, NU_SVR))
	 {
 		model->nr_class = 2;
   model->probA = NULL; 
   model->probB = NULL;
	 	model->nSV = NULL;
		 model->sv_coef = safemalloc(sizeof(double*), "svm_train", 12);
		 f = svm_train_one(prob, param, 0, 0);
		 model->rho = safemalloc(sizeof(double), "svm_train", 14);
		 model->rho[0] = f.rho;
		 model->l = f.nSV;
		 model->SV = safemalloc(sizeof(Svm_nodeptr) * f.nSV, "svm_train", 17);
		 model->sv_coef[0] = safemalloc(sizeof(double) * f.nSV, "svm_train", 18);
		 j = 0;
		 for (i = 0; i < prob.l; i++)
			  if (fabs(f.alpha[i]) > 0)
					 {
				   model->SV[j] = prob.x[i];
				   model->sv_coef[0][j] = f.alpha[i];
				   ++j;
					 }		
		 safe_free(f.alpha);
	 }
	else
	 {
 		l = prob.l;
 		start = NULL;
 		count = NULL;
 		perm = safemalloc(l * sizeof(int), "svm_train", 34);
 		nr_class = svm_group_classes(prob, &start, &count, perm);		
 		x = safemalloc(l * sizeof(Svm_nodeptr), "svm_train", 37);
 		for (i = 0; i < l; i++)
 			 x[i] = prob.x[perm[i]];
 		nonzero = safemalloc(l * sizeof(int), "svm_train", 40);
 		for (i = 0; i < l; i++)
 			 nonzero[i] = 0;
 		weights = safemalloc(sizeof(Svm_weights) * nr_class * (nr_class - 1) / 2, "svm_train", 43);
   if (calculate_probability)
    {
     model->probA = safemalloc(sizeof(double) * nr_class * (nr_class - 1) / 2, "svm_train", 44);
     model->probB = safemalloc(sizeof(double) * nr_class * (nr_class - 1) / 2, "svm_train", 44);
    }
   else
    {
     model->probA = NULL;
     model->probB = NULL;
    }
 		for (i = 0; i < nr_class; i++)
 			 for (j = i + 1; j < nr_class; j++)
					 {
			 	  si = start[i];
			 			sj = start[j];
			 	  ci = count[i];
			 			cj = count[j];
			 	  sub_prob.l = ci + cj;
			 	  sub_prob.x = safemalloc(sizeof(Svm_nodeptr) * sub_prob.l, "svm_train", 52);
			 	  sub_prob.y = safemalloc(sizeof(double) * sub_prob.l, "svm_train", 53);
			 	  for (k = 0; k < ci; k++)
							 {
				 	   sub_prob.x[k] = x[si + k];
				 	   sub_prob.y[k] = +1;
							 }
				   for (k = 0; k < cj; k++)
							 {
					    sub_prob.x[ci + k] = x[sj + k];
					    sub_prob.y[ci + k] = -1;
							 }
       if (calculate_probability)
         svm_binary_svc_probability(sub_prob, param, param.C * param.cweights[i], param.C * param.cweights[j], &(model->probA[p]), &(model->probB[p]));
			 	  weights[p] = svm_train_one(sub_prob, param, param.C * param.cweights[i], param.C * param.cweights[j]);
			 	  for (k = 0; k < ci; k++)
			 		   if (!nonzero[si + k] && fabs(weights[p].alpha[k]) > 0)
			 			    nonzero[si + k] = 1;
			 	  for (k = 0; k < cj; k++)
    					if (!nonzero[sj + k] && fabs(weights[p].alpha[ci+k]) > 0)
			 			    nonzero[sj + k] = 1;
  	 			safe_free(sub_prob.x);
	   			safe_free(sub_prob.y);
			 	  ++p;
					 }
		 model->nr_class = nr_class;
		 model->rho = safemalloc(sizeof(double) * nr_class * (nr_class - 1) / 2, "svm_train", 76);
		 for (i = 0;i < nr_class * (nr_class - 1) / 2; i++)
 	 		model->rho[i] = weights[i].rho;
		 total_sv = 0;
		 nz_count = safemalloc(nr_class * sizeof(int), "svm_train", 80);
		 model->nSV = safemalloc(nr_class * sizeof(int), "svm_train", 81);
		 for (i = 0; i < nr_class; i++)
			 {
	 		 nSV = 0;
	 		 for (j = 0; j < count[i]; j++)
	 			  if (nonzero[start[i] + j])
							 {	
				    	++nSV;
				 	   ++total_sv;
							 }
		 	 model->nSV[i] = nSV;
		 	 nz_count[i] = nSV;
			 }
 		model->l = total_sv;
 		model->SV = safemalloc(sizeof(Svm_nodeptr) * total_sv, "svm_train", 95);
 		p = 0;
 		for (i = 0; i < l; i++)
 			 if (nonzero[i]) 
				 	 model->SV[p++] = x[i];
   nz_start = safemalloc(nr_class * sizeof(int), "svm_train", 100);
 		nz_start[0] = 0;
 		for (i = 1; i < nr_class; i++)
 			 nz_start[i] = nz_start[i - 1] + nz_count[i - 1];
 		model->sv_coef = safemalloc(sizeof(double *) * (nr_class-1), "svm_train", 104);
 		for (i = 0; i < nr_class - 1; i++)
 			 model->sv_coef[i] = safemalloc(sizeof(double) * total_sv, "svm_train", 106);
 		p = 0;
 		for (i = 0; i < nr_class; i++)
 			 for (j = i + 1; j < nr_class; j++)
					 {
		 		  si = start[i];
		 		  sj = start[j];
		 		  ci = count[i];
		 		  cj = count[j];				
		 		  q = nz_start[i];
   				for (k = 0; k < ci; k++)
    					if (nonzero[si + k])
		 				    model->sv_coef[j - 1][q++] = weights[p].alpha[k];
   				q = nz_start[j];
		 		  for (k = 0; k < cj; k++)
    					if (nonzero[sj + k])
     						model->sv_coef[i][q++] = weights[p].alpha[ci+k];
   				++p;
					 }		
		 safe_free(count);
		 safe_free(perm);
		 safe_free(start);
		 safe_free(x);
		 safe_free(nonzero);
		 for (i = 0; i < nr_class * (nr_class - 1) / 2; i++)
 	 		safe_free(weights[i].alpha);
		 safe_free(weights);
		 safe_free(nz_count);
		 safe_free(nz_start);
	 }
	return model;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movl %edi, %ebp
leaq 0x1c0(%rsp), %r14
leaq 0x1a0(%rsp), %rbx
leaq 0x1feb0(%rip), %rsi     # 0xaea03
movl $0xb0, %edi
movl $0x6, %edx
callq 0x390f5
movq %rax, %r13
movaps (%rbx), %xmm0
movaps 0x10(%rbx), %xmm1
movups %xmm0, 0x80(%rax)
movups %xmm1, 0x90(%rax)
movl $0xb, %ecx
movq %rax, %rdi
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl (%r14), %edi
movl $0x3, %esi
movl $0x2, %edx
movl $0x3, %ecx
movl $0x4, %r8d
xorl %eax, %eax
callq 0x39a80
testl %eax, %eax
movq %r13, 0x78(%rsp)
je 0x8ece1
movl $0x2, 0x58(%r13)
movq $0x0, 0x78(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%r13)
leaq 0x1fe2d(%rip), %r15     # 0xaea03
movl $0x8, %edi
movq %r15, %rsi
movl $0xc, %edx
callq 0x390f5
movq %rax, 0x68(%r13)
leaq 0x20(%rsp), %rdi
movl $0xb, %ecx
movq %r14, %rsi
rep  movsq (%rsi), %es:(%rdi)
movups (%rbx), %xmm0
movupd 0x10(%rbx), %xmm1
movupd %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0xf8(%rsp), %r12
xorps %xmm0, %xmm0
xorpd %xmm1, %xmm1
movq %r12, %rdi
callq 0x8e771
movq (%r12), %r14
movsd 0x8(%r12), %xmm0
movsd %xmm0, 0x88(%rsp)
movslq 0x10(%r12), %r12
movl $0x8, %edi
movq %r15, %rsi
movl $0xe, %edx
callq 0x390f5
movq %rax, 0x70(%r13)
movsd 0x88(%rsp), %xmm0
movsd %xmm0, (%rax)
movl %r12d, 0x5c(%r13)
shlq $0x3, %r12
movq %r12, %rdi
movq %r15, %rsi
movl $0x11, %edx
callq 0x390f5
movq %rax, 0x60(%r13)
movq %r12, %rdi
movq %r15, %rsi
movl $0x12, %edx
callq 0x390f5
xorpd %xmm1, %xmm1
movq 0x68(%r13), %rcx
movq %rax, (%rcx)
movslq (%rbx), %rax
testq %rax, %rax
jle 0x8ecd9
xorl %ecx, %ecx
xorl %edx, %edx
movsd (%r14,%rcx,8), %xmm0
ucomisd %xmm0, %xmm1
je 0x8ecd1
movq 0x10(%rbx), %rsi
movq (%rsi,%rcx,8), %rsi
movq 0x60(%r13), %rdi
movslq %edx, %rdx
movq %rsi, (%rdi,%rdx,8)
movq 0x68(%r13), %rsi
movq (%rsi), %rsi
movsd %xmm0, (%rsi,%rdx,8)
incl %edx
incq %rcx
cmpq %rcx, %rax
jne 0x8eca4
movq %r14, %rdi
jmp 0x8f689
movl %ebp, 0xb8(%rsp)
movslq (%rbx), %rbp
xorl %eax, %eax
leaq 0xd8(%rsp), %r12
movq %rax, (%r12)
leaq 0xd0(%rsp), %r13
movq %rax, (%r13)
leaq (,%rbp,4), %r15
leaq 0x1fcef(%rip), %rsi     # 0xaea03
movq %r15, %rdi
movl $0x22, %edx
callq 0x390f5
movq %rax, %r14
movupd (%rbx), %xmm0
movupd 0x10(%rbx), %xmm1
movupd %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x8e997
movq %rax, 0x80(%rsp)
leaq (,%rbp,8), %rdi
leaq 0x1fca6(%rip), %rsi     # 0xaea03
movl $0x25, %edx
callq 0x390f5
testq %rbp, %rbp
jle 0x8ed86
xorl %esi, %esi
movq 0x10(%rbx), %rcx
movslq (%r14,%rsi,4), %rdx
movq (%rcx,%rdx,8), %rcx
movq %rcx, (%rax,%rsi,8)
incq %rsi
cmpq %rsi, %rbp
jne 0x8ed6e
movq %rax, 0xf0(%rsp)
movq %r14, 0x140(%rsp)
leaq 0x1fc66(%rip), %rsi     # 0xaea03
movq %r15, %rdi
movl $0x28, %edx
callq 0x390f5
movq %rax, %rbx
movq %rbp, 0x138(%rsp)
testl %ebp, %ebp
jle 0x8edc6
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x4050
movq %rbx, 0x98(%rsp)
movq 0x80(%rsp), %rax
movslq %eax, %r14
decl %eax
movl %eax, 0xac(%rsp)
movslq %eax, %rbx
movq %r14, %r15
imulq %rbx, %r15
leaq (,%r15,8), %rax
leaq (%rax,%rax,2), %rdi
shrq %rdi
leaq 0x1fc01(%rip), %rsi     # 0xaea03
movl $0x2b, %edx
callq 0x390f5
movq %rax, 0x90(%rsp)
movabsq $0x7ffffffffffffffc, %rax # imm = 0x7FFFFFFFFFFFFFFC
movl 0xb8(%rsp), %ebp
testl %ebp, %ebp
movq %rbx, 0x130(%rsp)
movq %r15, 0x120(%rsp)
je 0x8ee83
leaq (,%r15,4), %r15
andq %rax, %r15
leaq 0x1fbb8(%rip), %r12     # 0xaea03
movq %r15, %rdi
movq %r12, %rsi
movl $0x2c, %edx
callq 0x390f5
movq 0x78(%rsp), %rbx
movq %rax, 0xa0(%rbx)
movq %r15, %rdi
movq %r12, %rsi
movl $0x2c, %edx
callq 0x390f5
movq %rbx, %rcx
movq %rax, 0xa8(%rbx)
jmp 0x8ee94
xorpd %xmm0, %xmm0
movq 0x78(%rsp), %rcx
movupd %xmm0, 0xa0(%rcx)
movq %r14, 0x128(%rsp)
movq 0x80(%rsp), %rax
movl %eax, %r12d
testl %eax, %eax
movq %r12, 0x118(%rsp)
jle 0x8f222
movq 0xd8(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0xe8(%rsp)
xorl %eax, %eax
movl $0x1, %r14d
movabsq $0x3ff0000000000000, %r13 # imm = 0x3FF0000000000000
xorl %r15d, %r15d
movq %rax, %rdx
incq %rax
cmpq %r12, %rax
jae 0x8f216
movq %rax, 0xe0(%rsp)
movslq %r15d, %r15
movq %r14, 0x148(%rsp)
movq %rdx, 0xc0(%rsp)
movq %r15, 0x88(%rsp)
movq 0xb0(%rsp), %rax
movslq (%rax,%rdx,4), %rcx
movq %rcx, 0xc8(%rsp)
movslq (%rax,%r14,4), %rax
movq %rax, 0xa0(%rsp)
movq 0xe8(%rsp), %rax
movslq (%rax,%rdx,4), %r12
movl (%rax,%r14,4), %ebx
leal (%rbx,%r12), %eax
movl %eax, 0xf8(%rsp)
movslq %eax, %rdi
shlq $0x3, %rdi
leaq 0x1fa9c(%rip), %r15     # 0xaea03
movq %r15, %rsi
movl $0x34, %edx
callq 0x390f5
movq %rax, 0x108(%rsp)
movslq 0xf8(%rsp), %rdi
shlq $0x3, %rdi
movq %r15, %rsi
movl $0x35, %edx
callq 0x390f5
movq %rax, 0x100(%rsp)
testq %r12, %r12
movq 0xf0(%rsp), %rdi
jle 0x8efdc
movq 0xc8(%rsp), %rax
leaq (%rdi,%rax,8), %rax
xorl %ecx, %ecx
movq (%rax,%rcx,8), %rdx
movq 0x108(%rsp), %rsi
movq %rdx, (%rsi,%rcx,8)
movq 0x100(%rsp), %rdx
movq %r13, (%rdx,%rcx,8)
incq %rcx
cmpq %rcx, %r12
jne 0x8efb8
testl %ebx, %ebx
movabsq $-0x4010000000000000, %r8 # imm = 0xBFF0000000000000
jle 0x8f023
movq 0xa0(%rsp), %rax
leaq (%rdi,%rax,8), %rax
movq %rbx, %rcx
movq %r12, %rdx
movq (%rax), %rsi
movq 0x108(%rsp), %rdi
movq %rsi, (%rdi,%rdx,8)
movq 0x100(%rsp), %rsi
movq %r8, (%rsi,%rdx,8)
addq $0x8, %rax
incq %rdx
decq %rcx
jne 0x8effc
testl %ebp, %ebp
leaq 0x1c0(%rsp), %rsi
movq 0x88(%rsp), %r15
movq 0xc0(%rsp), %rcx
movq %r14, %r13
je 0x8f0b5
movsd 0x30(%rsi), %xmm1
movq 0x38(%rsi), %rax
movsd (%rax,%rcx,8), %xmm0
mulsd %xmm1, %xmm0
mulsd (%rax,%r13,8), %xmm1
leaq (,%r15,8), %rax
movq %rcx, %rbp
movq 0x78(%rsp), %rcx
movq 0xa0(%rcx), %rdx
addq %rax, %rdx
addq 0xa8(%rcx), %rax
leaq 0x20(%rsp), %rdi
movl $0xb, %ecx
movq %rsi, %r14
rep  movsq (%rsi), %es:(%rdi)
movups 0xf8(%rsp), %xmm2
movups 0x108(%rsp), %xmm3
movups %xmm3, 0x10(%rsp)
movups %xmm2, (%rsp)
movq %rdx, %rdi
movq %rax, %rsi
callq 0x8f6a5
movq %rbp, %rcx
movq %r14, %rsi
leaq (%r15,%r15,2), %r15
movq 0x90(%rsp), %rbp
movq %r13, %r14
leaq (,%r15,8), %r13
addq %rbp, %r13
movsd 0x30(%rsi), %xmm1
movq 0x38(%rsi), %rax
movsd (%rax,%rcx,8), %xmm0
mulsd %xmm1, %xmm0
mulsd (%rax,%r14,8), %xmm1
leaq 0x20(%rsp), %rdi
movl $0xb, %ecx
rep  movsq (%rsi), %es:(%rdi)
movups 0xf8(%rsp), %xmm2
movups 0x108(%rsp), %xmm3
movups %xmm3, 0x10(%rsp)
movups %xmm2, (%rsp)
leaq 0x150(%rsp), %rdi
callq 0x8e771
movq 0x160(%rsp), %rax
movq %rax, 0x10(%rbp,%r15,8)
movupd 0x150(%rsp), %xmm0
movupd %xmm0, (%rbp,%r15,8)
testl %r12d, %r12d
movq 0x98(%rsp), %rsi
xorpd %xmm0, %xmm0
jle 0x8f176
movq 0xc8(%rsp), %rax
leaq (%rsi,%rax,4), %rax
xorl %ecx, %ecx
cmpl $0x0, (%rax,%rcx,4)
jne 0x8f16e
movq (%r13), %rdx
ucomisd (%rdx,%rcx,8), %xmm0
je 0x8f16e
movl $0x1, (%rax,%rcx,4)
incq %rcx
cmpq %rcx, %r12
jne 0x8f156
testl %ebx, %ebx
movl 0xb8(%rsp), %ebp
movq 0x88(%rsp), %r15
jle 0x8f1be
movq 0xa0(%rsp), %rax
leaq (%rsi,%rax,4), %rax
shlq $0x3, %r12
xorl %ecx, %ecx
cmpl $0x0, (%rax,%rcx,4)
jne 0x8f1b6
movq (%r13), %rdx
addq %r12, %rdx
ucomisd (%rdx,%rcx,8), %xmm0
je 0x8f1b6
movl $0x1, (%rax,%rcx,4)
incq %rcx
cmpq %rcx, %rbx
jne 0x8f19b
movq 0x108(%rsp), %rdi
callq 0x39194
movq 0x100(%rsp), %rdi
callq 0x39194
incq %r15
incq %r14
movq 0x118(%rsp), %r12
cmpq %r12, %r14
movabsq $0x3ff0000000000000, %r13 # imm = 0x3FF0000000000000
movq 0xc0(%rsp), %rdx
jne 0x8ef16
movq 0x78(%rsp), %rcx
movq 0xe0(%rsp), %rax
movq 0x148(%rsp), %r14
incq %r14
cmpq %r12, %rax
jne 0x8eeec
movq 0x80(%rsp), %r14
movl %r14d, 0x58(%rcx)
movq 0x120(%rsp), %rdi
shlq $0x2, %rdi
movabsq $0x7ffffffffffffffc, %rax # imm = 0x7FFFFFFFFFFFFFFC
andq %rax, %rdi
leaq 0x1f7b5(%rip), %rsi     # 0xaea03
movl $0x4c, %edx
movq %rcx, %rbx
callq 0x390f5
movq %rax, 0x70(%rbx)
movl 0xac(%rsp), %edx
imull %r14d, %edx
movl %edx, %ecx
shrl $0x1f, %ecx
addl %edx, %ecx
sarl %ecx
movl %ecx, %esi
movl %edx, 0xe0(%rsp)
cmpl $0x2, %edx
jl 0x8f2a4
movq 0x90(%rsp), %rcx
addq $0x8, %rcx
xorl %edx, %edx
movsd (%rcx), %xmm0
movsd %xmm0, (%rax,%rdx,8)
incq %rdx
addq $0x18, %rcx
cmpq %rdx, %rsi
jne 0x8f28f
movq %rsi, 0xe8(%rsp)
movq 0x128(%rsp), %r14
shlq $0x2, %r14
leaq 0x1f744(%rip), %r15     # 0xaea03
movq %r14, %rdi
movq %r15, %rsi
movl $0x50, %edx
callq 0x390f5
movq %rax, %r13
movq %r14, %rdi
movq %r15, %rsi
movl $0x51, %edx
callq 0x390f5
movq 0x78(%rsp), %rcx
movq %rax, 0x78(%rcx)
cmpl $0x0, 0x80(%rsp)
jle 0x8f357
movq 0xd0(%rsp), %rdx
movq 0xd8(%rsp), %rsi
xorl %edi, %edi
xorl %ecx, %ecx
movq 0x98(%rsp), %r15
movslq (%rdx,%rdi,4), %r8
testq %r8, %r8
jle 0x8f341
movslq (%rsi,%rdi,4), %r9
leaq (%r15,%r9,4), %r10
xorl %r11d, %r11d
xorl %r9d, %r9d
xorl %ebx, %ebx
cmpl $0x0, (%r10,%r11,4)
setne %bl
addl %ebx, %ecx
addl %ebx, %r9d
incq %r11
cmpq %r11, %r8
jne 0x8f328
jmp 0x8f344
xorl %r9d, %r9d
movl %r9d, (%rax,%rdi,4)
movl %r9d, (%r13,%rdi,4)
incq %rdi
cmpq %r12, %rdi
jne 0x8f311
jmp 0x8f361
xorl %ecx, %ecx
movq 0x98(%rsp), %r15
movq 0x78(%rsp), %rbx
movl %ecx, 0x5c(%rbx)
movslq %ecx, %rbp
shlq $0x3, %rbp
leaq 0x1f68c(%rip), %rsi     # 0xaea03
movq %rbp, %rdi
movl $0x5f, %edx
callq 0x390f5
movq %rax, 0x60(%rbx)
movq 0x138(%rsp), %r10
testl %r10d, %r10d
movq 0xf0(%rsp), %r9
jle 0x8f3c4
movq %rbx, %r8
xorl %eax, %eax
xorl %ecx, %ecx
cmpl $0x0, (%r15,%rax,4)
je 0x8f3bc
movq (%r9,%rax,8), %rdx
movq 0x60(%r8), %rsi
movslq %ecx, %rdi
incl %ecx
movq %rdx, (%rsi,%rdi,8)
incq %rax
cmpq %rax, %r10
jne 0x8f3a4
movq %r13, %rbx
movq %rbp, %r13
leaq 0x1f632(%rip), %rsi     # 0xaea03
movq %r14, %rdi
movl $0x64, %edx
callq 0x390f5
movq %rax, %rbp
movl $0x0, (%rax)
cmpl $0x2, 0x80(%rsp)
jl 0x8f40a
movl (%rbp), %eax
leaq -0x1(%r12), %rcx
xorl %edx, %edx
addl (%rbx,%rdx,4), %eax
movl %eax, 0x4(%rbp,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0x8f3fb
movq %rbx, 0xb0(%rsp)
movq 0x130(%rsp), %rdi
shlq $0x3, %rdi
leaq 0x1f5de(%rip), %rsi     # 0xaea03
movl $0x68, %edx
callq 0x390f5
movq 0x78(%rsp), %rcx
movq %rax, 0x68(%rcx)
cmpl $0x2, 0x80(%rsp)
jl 0x8f475
movl 0xac(%rsp), %ebx
xorl %r14d, %r14d
movq %r13, %rdi
leaq 0x1f5ad(%rip), %rsi     # 0xaea03
movl $0x6a, %edx
callq 0x390f5
movq 0x78(%rsp), %rcx
movq 0x68(%rcx), %rcx
movq %rax, (%rcx,%r14,8)
incq %r14
cmpq %r14, %rbx
jne 0x8f44c
cmpl $0x0, 0x80(%rsp)
movq 0xb0(%rsp), %r13
jle 0x8f60a
movq 0xd8(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0xd0(%rsp), %rcx
xorl %eax, %eax
movl $0x1, %r14d
xorl %edi, %edi
movq %rbp, 0xa0(%rsp)
movq %rax, %r8
incq %rax
cmpq %r12, %rax
jae 0x8f5fe
movq %rax, 0xc0(%rsp)
movq 0x88(%rsp), %rax
movslq (%rax,%r8,4), %rdx
movl (%rcx,%r8,4), %r9d
movl (%rbp,%r8,4), %eax
movl %eax, 0xc8(%rsp)
movslq %r9d, %r11
movslq %edi, %rdi
leaq (%r15,%rdx,4), %rbx
shlq $0x3, %r11
movq %r14, 0xb8(%rsp)
movq 0x88(%rsp), %rax
movslq (%rax,%r14,4), %r13
movl (%rcx,%r14,4), %r12d
leaq (%rdi,%rdi,2), %rbp
testl %r9d, %r9d
jle 0x8f55f
movq 0x90(%rsp), %rax
leaq (%rax,%rbp,8), %rdx
xorl %r15d, %r15d
movl 0xc8(%rsp), %r10d
cmpl $0x0, (%rbx,%r15,4)
je 0x8f557
movq (%rdx), %rsi
movsd (%rsi,%r15,8), %xmm0
movq 0x78(%rsp), %rax
movq 0x68(%rax), %rsi
movq -0x8(%rsi,%r14,8), %rsi
movslq %r10d, %rax
incl %r10d
movsd %xmm0, (%rsi,%rax,8)
incq %r15
cmpq %r15, %r9
jne 0x8f52e
testl %r12d, %r12d
movq 0x78(%rsp), %r10
jle 0x8f5bf
movq 0xa0(%rsp), %rax
movl (%rax,%r14,4), %edx
movq 0x90(%rsp), %rax
leaq (%rax,%rbp,8), %rbp
movq 0x98(%rsp), %rax
leaq (%rax,%r13,4), %r13
xorl %r15d, %r15d
cmpl $0x0, (%r13,%r15,4)
je 0x8f5b7
movq (%rbp), %rax
addq %r11, %rax
movsd (%rax,%r15,8), %xmm0
movq 0x68(%r10), %rax
movq (%rax,%r8,8), %rax
movslq %edx, %rsi
incl %edx
movsd %xmm0, (%rax,%rsi,8)
incq %r15
cmpq %r15, %r12
jne 0x8f590
incq %rdi
incq %r14
movq 0x118(%rsp), %r12
cmpq %r12, %r14
jne 0x8f4fe
movq 0x98(%rsp), %r15
movq 0xb0(%rsp), %r13
movq 0xa0(%rsp), %rbp
movq 0xc0(%rsp), %rax
movq 0xb8(%rsp), %r14
incq %r14
cmpq %r12, %rax
jne 0x8f4b5
movq 0xd0(%rsp), %rdi
callq 0x39194
movq 0x140(%rsp), %rdi
callq 0x39194
movq 0xd8(%rsp), %rdi
callq 0x39194
movq 0xf0(%rsp), %rdi
callq 0x39194
movq %r15, %rdi
callq 0x39194
cmpl $0x2, 0xe0(%rsp)
movq 0xe8(%rsp), %r14
jl 0x8f671
movq 0x90(%rsp), %rbx
movq (%rbx), %rdi
callq 0x39194
addq $0x18, %rbx
decq %r14
jne 0x8f660
movq 0x90(%rsp), %rdi
callq 0x39194
movq %r13, %rdi
callq 0x39194
movq %rbp, %rdi
callq 0x39194
movq 0x78(%rsp), %rax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq