// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/poly.c
// Function: polylearn
Polynomptr polylearn(char* trainfname, char* testfname, int maxdegree, double* trainerror, double* testerror, int regression)
{
	/*!Last Changed 22.01.2005 rewritten*/
	/*!Last Changed 02.02.2004 added safemalloc*/
 char varname[MAXLENGTH];
 char varvalue[MAXLENGTH], pst[READLINELENGTH];
	FILE* errorfile;
 Polynomptr p;
	double** traindata, **testdata, bestgeneralization = +LONG_MAX, error, generalizationerror, calcsigma;
	double*** trainfolds, ***testfolds, loglikelihood;
	char fname[20], **fnames, line[READLINELENGTH];
	int traincount, testcount, i, bestdegree = -1, d, j, k, *trainortest;
 int foldcount, foldtraincount, dummy1, dummy2, *ordering;
	traindata = readpolydata(trainfname, &traincount);
	testdata = readpolydata(testfname, &testcount);
	if (get_parameter_l("modelselectionmethod") != 0)
	 {
   for (i = 0; i <= maxdegree; i++)
			 {
				 if (regression)
					 {
  	  	 p = polyfit(traindata, traincount, i);
							error = calculate_mse(traindata, traincount, p);
					 }
					else
					 {
						 p = polyfitcls(traindata, traincount, i);
							error = calculate_poly_clserror(traindata, traincount, p);
							loglikelihood = calculate_poly_loglikelihood(traindata, traincount, p);
					 }
		  	d = i + 1;
			  switch (get_parameter_l("modelselectionmethod"))
					 {
			  		case MODEL_SELECTION_AIC:if (regression)
															                   if (get_parameter_f("sigma") <= 0.0)
																                   {
								                            generalizationerror = aic_squared_error(error, d, traincount);
															  	                  calcsigma = (error * traincount) / (traincount - d);
	                                   sprintf(varname,"aout1[%d]", d);
			                                 set_precision(pst, NULL, NULL);
	                                   sprintf(varvalue, pst, calcsigma);
	                                   set_variable(varname, varvalue);
																                   }
																                  else
																	                   generalizationerror = aic_squared_error_with_sigma(error, d, traincount, get_parameter_f("sigma"));
								                        else
															                   generalizationerror = aic_loglikelihood(loglikelihood, d);
														                  break;
			  		case MODEL_SELECTION_BIC:if (regression)
															                   if (get_parameter_f("sigma") <= 0.0)
																                   {
														  	                   generalizationerror = bic_squared_error(error, d, traincount);
														  		                  calcsigma = (error * traincount) / (traincount - d);
	                                   sprintf(varname,"aout1[%d]", d);
			                                 set_precision(pst, NULL, NULL);
	                                   sprintf(varvalue, pst, calcsigma);
	                                   set_variable(varname, varvalue);
																                   }
																                  else
																	                   generalizationerror = bic_squared_error_with_sigma(error, d, traincount, get_parameter_f("sigma"));
								                        else
															                   generalizationerror = bic_loglikelihood(loglikelihood, d, traincount);
								                        break;
			  		case MODEL_SELECTION_SRM:if (regression) 
															                   generalizationerror = srm_regression(error, d, traincount, 1.0, 1.0);
								                        else
															                   generalizationerror = srm_classification(error, d, traincount, 1.0, 1.0);
														                  break;
				  	case MODEL_SELECTION_MDL:if (regression)
  								                        generalizationerror = mdl(error, d, 1.0 / traincount, 6);
								                        else
															                   generalizationerror = mdl(error, d, 0.01, 6);
														                  break;
					 }
					if (generalizationerror < bestgeneralization)
					 {
						 bestdegree = i;
       bestgeneralization = generalizationerror;
					 }
			  free_polynom(p);
			 }
	 }
	else
	 {
		 if (traincount < 50) /*Leave one out*/
			 {
				 foldcount = traincount;
					foldtraincount = traincount - 1;
				 trainfolds = (double***) safemalloc_3d(sizeof(double**), sizeof(double*), sizeof(double), traincount, traincount - 1, 2, "polylearn", 37);
					testfolds = (double***) safemalloc_3d(sizeof(double**), sizeof(double*), sizeof(double), traincount, 1, 2, "polylearn", 38);
					for (i = 0; i < traincount; i++)
					 { /*Prepare fold i*/
							k = 0;
							for (j = 0; j < traincount; j++)
								 if (i != j)
									 {
										 trainfolds[i][k][0] = traindata[j][0];
										 trainfolds[i][k][1] = traindata[j][1];
											k++;
									 }
									else
									 {
										 testfolds[i][0][0] = traindata[j][0];
										 testfolds[i][0][1] = traindata[j][1];
									 }       
					 }
			 }
			else /*5x2 Cross validation*/
			 {
				 foldcount = 10;
					foldtraincount = traincount / 2;
				 trainfolds = (double***) safemalloc_3d(sizeof(double**), sizeof(double*), sizeof(double), 10, traincount / 2, 2, "polylearn", 63);
					testfolds = (double***) safemalloc_3d(sizeof(double**), sizeof(double*), sizeof(double), 10, traincount / 2, 2, "polylearn", 64);
					for (i = 0; i < 5; i++)
					 {
       trainortest = random_array(traincount);
							k = 0;
       for (j = 0; j < traincount; j++)
								 if (trainortest[j] % 2 == 0)
									 {
										 trainfolds[2 * i][k][0] = traindata[j][0];
										 trainfolds[2 * i][k][1] = traindata[j][1];
											testfolds[2 * i + 1][k][0] = traindata[j][0];
											testfolds[2 * i + 1][k][1] = traindata[j][1];
											k++;
									 }
									else
									 {
										 trainfolds[2 * i + 1][j - k][0] = traindata[j][0];
										 trainfolds[2 * i + 1][j - k][1] = traindata[j][1];
											testfolds[2 * i][j - k][0] = traindata[j][0];
											testfolds[2 * i][j - k][1] = traindata[j][1];										 
									 }
					  safe_free(trainortest);
					 }
			 }
			fnames = safemalloc((maxdegree + 1) * sizeof(char *), "polylearn", 138); 
   for (i = 0; i <= maxdegree; i++)
			 { 
				 sprintf(fname, "%s/error%d.txt", get_parameter_s("tempdirectory"), i);
					fnames[i] = strcopy(fnames[i], fname);
				 errorfile = fopen(fname, "w");
					if (!errorfile)
						 return NULL;
				 for (j = 0; j < foldcount; j++)
					 {
						 if (regression)
							 {
  						 p = polyfit(trainfolds[j], foldtraincount, i);
							  error = calculate_mse(testfolds[j], traincount - foldtraincount, p);
							 }
							else
							 {
								 p = polyfitcls(trainfolds[j], foldtraincount, i);
									error = calculate_poly_clserror(testfolds[j], traincount - foldtraincount, p);
							 }
			    set_precision(pst, NULL, "\n");
							fprintf(errorfile, pst, error);
							free_polynom(p);
					 }
					fclose(errorfile);
 			}
			free_3d((void***)trainfolds, foldcount, foldtraincount);
			free_3d((void***)testfolds, foldcount, traincount - foldtraincount);
			sprintf(line, "-");
			ordering = multiple_comparison(fnames, maxdegree + 1, get_parameter_l("testtype"), line, &dummy1, &dummy2, get_parameter_l("correctiontype"));
			bestdegree = ordering[0] - 1;
			safe_free(ordering);
   free_2d((void**)fnames, maxdegree + 1);
	 }
	if (regression)
	 {
  	p = polyfit(traindata, traincount, bestdegree);
	  *trainerror = calculate_mse(traindata, traincount, p);
	  *testerror = calculate_mse(testdata, testcount, p);
	 }
 else
	 {
		 p = polyfitcls(traindata, traincount, bestdegree);
			*trainerror = calculate_poly_clserror(traindata, traincount, p);
			*testerror = calculate_poly_clserror(testdata, testcount, p);
	 }
	free_2d((void**)traindata, traincount);
	free_2d((void**)testdata, testcount);
 return p;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x16e3f8, %rsp         # imm = 0x16E3F8
movl %r9d, 0x1c(%rsp)
movq %r8, %r14
movq %rcx, 0x70(%rsp)
movl %edx, 0x2c(%rsp)
movq %rsi, %rbx
leaq 0x4c(%rsp), %rsi
callq 0x523b8
movq %rax, %r13
leaq 0x48(%rsp), %rsi
movq %rbx, %rdi
callq 0x523b8
movq %rax, %rbx
leaq 0x41c7e(%rip), %rdi     # 0x957d6
callq 0x4cf11
testl %eax, %eax
movq %r13, 0x68(%rsp)
movq %r14, 0x78(%rsp)
movq %rbx, 0x80(%rsp)
je 0x53eb1
movl 0x4c(%rsp), %r15d
cvtsi2sd %r15d, %xmm0
movsd 0x41997(%rip), %xmm1    # 0x95520
movsd %xmm0, 0x50(%rsp)
divsd %xmm0, %xmm1
movsd %xmm1, 0x60(%rsp)
leal -0x1(%r15), %ebp
movsd 0x4278b(%rip), %xmm0    # 0x96330
pushq $-0x1
popq %rax
movl %eax, 0x40(%rsp)
leaq 0x41c89(%rip), %r14     # 0x9583c
xorl %r13d, %r13d
movq %r15, 0x20(%rsp)
cmpl 0x2c(%rsp), %r13d
jg 0x53e9e
movl %r13d, %ebx
movsd %xmm0, 0x30(%rsp)
movq %r14, %r12
cmpl $0x0, 0x1c(%rsp)
movq 0x68(%rsp), %r13
movq %r13, %rdi
movl %r15d, %esi
movl %ebx, %edx
movq %r15, %r14
je 0x53c07
callq 0x535d2
movq %rax, %r15
movq %r13, %rdi
movl %r14d, %esi
movq %rax, %rdx
callq 0x5345e
movsd %xmm0, 0x10(%rsp)
jmp 0x53c37
callq 0x537d7
movq %rax, %r15
movq %r13, %rdi
movl %r14d, %esi
movq %rax, %rdx
callq 0x5330b
movsd %xmm0, 0x10(%rsp)
movq %r13, %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x533bf
movsd %xmm0, 0x58(%rsp)
leal 0x1(%rbx), %r13d
leaq 0x41b94(%rip), %rdi     # 0x957d6
callq 0x4cf11
decl %eax
cmpl $0x3, %eax
movq %r12, %r14
ja 0x53db4
leaq 0x47048(%rip), %rcx     # 0x9aca4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
cvtsi2sd %r13d, %xmm1
cvtsi2sd %ebp, %xmm0
jmpq *%rax
cmpl $0x0, 0x1c(%rsp)
je 0x53d91
movsd %xmm0, 0x38(%rsp)
movsd %xmm1, 0x8(%rsp)
movq %r14, %rdi
callq 0x4cdcf
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x53df3
movq %r14, %rdi
callq 0x4cdcf
movapd %xmm0, %xmm2
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq 0x20(%rsp), %rdi
callq 0x41b8d
jmp 0x53dae
cmpl $0x0, 0x1c(%rsp)
movq 0x20(%rsp), %rsi
je 0x53d5a
movsd 0x10(%rsp), %xmm0
movl %r13d, %edi
movsd 0x4183d(%rip), %xmm1    # 0x95520
movapd %xmm1, %xmm2
callq 0x41cba
jmp 0x53dae
cmpl $0x0, 0x1c(%rsp)
je 0x53d76
movsd 0x10(%rsp), %xmm0
movl %r13d, %edi
movsd 0x60(%rsp), %xmm1
jmp 0x53d87
cmpl $0x0, 0x1c(%rsp)
je 0x53d9e
movsd %xmm0, 0x38(%rsp)
movsd %xmm1, 0x8(%rsp)
movq %r14, %rdi
callq 0x4cdcf
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x53e0b
movq %r14, %rdi
callq 0x4cdcf
movapd %xmm0, %xmm2
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq 0x20(%rsp), %rdi
callq 0x41baa
jmp 0x53dae
movsd 0x10(%rsp), %xmm0
movl %r13d, %edi
movsd 0x417b5(%rip), %xmm1    # 0x95520
movapd %xmm1, %xmm2
callq 0x41c3e
jmp 0x53dae
movsd 0x10(%rsp), %xmm0
movl %r13d, %edi
movsd 0x42041(%rip), %xmm1    # 0x95dc8
pushq $0x6
popq %rsi
callq 0x41cf9
jmp 0x53dae
movsd 0x58(%rsp), %xmm0
callq 0x40bcb
jmp 0x53dae
movsd 0x58(%rsp), %xmm0
movq 0x20(%rsp), %rdi
callq 0x40fa5
movsd %xmm0, 0x8(%rsp)
movsd 0x30(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
ucomisd %xmm1, %xmm0
movl 0x40(%rsp), %eax
cmoval %ebx, %eax
movl %eax, 0x40(%rsp)
minsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movq %r15, %rdi
callq 0x52a0f
decl %ebp
movsd 0x10(%rsp), %xmm0
movq 0x20(%rsp), %r15
jmp 0x53bbb
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq 0x20(%rsp), %rdi
callq 0x40b9e
jmp 0x53e21
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq 0x20(%rsp), %rdi
callq 0x40f59
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
mulsd 0x50(%rsp), %xmm0
divsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0x7a1b0(%rsp), %rdi
leaq 0x456f3(%rip), %rsi     # 0x99541
movl %r13d, %edx
xorl %eax, %eax
callq 0x41b0
leaq 0xf42d0(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x35305
leaq 0x90(%rsp), %rdi
movq %r12, %rsi
movsd 0x10(%rsp), %xmm0
movb $0x1, %al
callq 0x41b0
leaq 0x7a1b0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x2f4fc
jmp 0x53db4
movq 0x68(%rsp), %r13
movq 0x78(%rsp), %rbp
movl 0x40(%rsp), %ebx
jmp 0x542e7
movl 0x4c(%rsp), %ecx
cmpl $0x31, %ecx
movq %rcx, 0x20(%rsp)
jg 0x53f94
leal -0x1(%rcx), %r8d
leaq 0x46e9d(%rip), %r14     # 0x9ad6b
pushq $0x8
popq %rbx
pushq $0x2
popq %rbp
movq %rbx, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movl %r8d, 0x30(%rsp)
movl %ebp, %r9d
pushq $0x25
pushq %r14
callq 0x3522d
popq %rcx
popq %rdx
movq %rax, %r15
pushq $0x1
popq %r8
movq %rbx, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movq 0x20(%rsp), %rcx
movl %ebp, %r9d
pushq $0x26
pushq %r14
callq 0x3522d
movq 0x30(%rsp), %r9
addq $0x10, %rsp
movq %rax, %rbx
xorl %eax, %eax
testl %r9d, %r9d
movl $0x0, %ecx
cmovgl %r9d, %ecx
cmpq %rcx, %rax
je 0x540cb
xorl %edx, %edx
xorl %esi, %esi
cmpq %rdx, %r9
je 0x53f8f
cmpq %rdx, %rax
jne 0x53f64
movq (%r13,%rax,8), %rdi
movsd (%rdi), %xmm0
movq (%rbx,%rax,8), %r8
movq (%r8), %r8
movsd %xmm0, (%r8)
movsd 0x8(%rdi), %xmm0
movsd %xmm0, 0x8(%r8)
jmp 0x53f8a
movq (%r13,%rdx,8), %rdi
movsd (%rdi), %xmm0
movq (%r15,%rax,8), %r8
movslq %esi, %rsi
movq (%r8,%rsi,8), %r8
movsd %xmm0, (%r8)
movsd 0x8(%rdi), %xmm0
movsd %xmm0, 0x8(%r8)
incl %esi
incq %rdx
jmp 0x53f38
incq %rax
jmp 0x53f2b
movl %ecx, %r14d
shrl %r14d
leaq 0x46dca(%rip), %rax     # 0x9ad6b
pushq $0x8
popq %rbx
pushq $0xa
popq %rbp
pushq $0x2
popq %r9
movq %rbx, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
movl %r14d, %r8d
pushq $0x3f
pushq %rax
callq 0x3522d
popq %rcx
popq %rdx
movq %rax, %r15
movq %rbx, %rdi
movq %rbx, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
movl %r14d, 0x30(%rsp)
movl %r14d, %r8d
pushq $0x2
popq %r9
pushq $0x40
leaq 0x46d85(%rip), %rax     # 0x9ad6b
pushq %rax
callq 0x3522d
popq %rcx
popq %rdx
movq %rax, %rbx
xorl %r14d, %r14d
movq 0x20(%rsp), %r12
cmpq $0x5, %r14
je 0x540d3
movl %r12d, %edi
callq 0x35cf7
leaq (%r14,%r14), %rcx
leaq 0x1(,%r14,2), %rdx
xorl %esi, %esi
xorl %edi, %edi
cmpq %rsi, %r12
je 0x540bb
movq (%r13,%rsi,8), %r8
movsd (%r8), %xmm0
testb $0x1, (%rax,%rsi,4)
movslq %edi, %r9
jne 0x54072
movq (%r15,%rcx,8), %rdi
movq (%rdi,%r9,8), %rdi
movsd %xmm0, (%rdi)
movsd 0x8(%r8), %xmm0
movsd %xmm0, 0x8(%rdi)
movsd (%r8), %xmm0
movq (%rbx,%rdx,8), %rdi
movq (%rdi,%r9,8), %rdi
movsd %xmm0, (%rdi)
movsd 0x8(%r8), %xmm0
movsd %xmm0, 0x8(%rdi)
incl %r9d
movl %r9d, %edi
jmp 0x540b3
movq (%r15,%rdx,8), %r10
shlq $0x3, %r9
subq %r9, %r10
movq (%r10,%rsi,8), %r10
movsd %xmm0, (%r10)
movsd 0x8(%r8), %xmm0
movsd %xmm0, 0x8(%r10)
movsd (%r8), %xmm0
movq (%rbx,%rcx,8), %r10
subq %r9, %r10
movq (%r10,%rsi,8), %r9
movsd %xmm0, (%r9)
movsd 0x8(%r8), %xmm0
movsd %xmm0, 0x8(%r9)
incq %rsi
jmp 0x5401b
movq %rax, %rdi
callq 0x34ff7
incq %r14
jmp 0x53ff9
movl %r9d, %ebp
movq %r9, %r14
jmp 0x540db
movq 0x20(%rsp), %r14
pushq $0xa
popq %rbp
movl 0x2c(%rsp), %eax
movslq %eax, %rcx
incl %eax
movl %eax, 0x2c(%rsp)
movq %rcx, 0x50(%rsp)
leaq 0x8(,%rcx,8), %rdi
leaq 0x46c6f(%rip), %rsi     # 0x9ad6b
movl $0x8a, %edx
callq 0x34f59
movl %r14d, %ecx
subl 0x30(%rsp), %ecx
movl %ecx, 0x8(%rsp)
testl %ebp, %ebp
movl $0x0, %ecx
movl %ebp, 0x60(%rsp)
cmovgl %ebp, %ecx
movq %rcx, 0x10(%rsp)
movq %rax, 0x38(%rsp)
xorl %r12d, %r12d
movq %r15, 0x58(%rsp)
cmpq 0x50(%rsp), %r12
jg 0x5424c
leaq 0x46249(%rip), %rdi     # 0x9a38c
callq 0x4ce84
leaq 0x90(%rsp), %r13
movq %r13, %rdi
leaq 0x46c1b(%rip), %rsi     # 0x9ad75
movq %rax, %rdx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x41b0
movq 0x38(%rsp), %r14
movq (%r14,%r12,8), %rdi
movq %r13, %rsi
callq 0x3604c
movq %rax, (%r14,%r12,8)
movq %r13, %rdi
leaq 0x4770b(%rip), %rsi     # 0x9b891
callq 0x40f0
testq %rax, %rax
je 0x5438f
movq %rax, %r13
xorl %r14d, %r14d
cmpq %r14, 0x10(%rsp)
je 0x54237
movq (%r15,%r14,8), %rdi
cmpl $0x0, 0x1c(%rsp)
je 0x541d1
movl 0x30(%rsp), %esi
movl %r12d, %edx
callq 0x535d2
movq %rax, %rbp
movq (%rbx,%r14,8), %rdi
movl 0x8(%rsp), %esi
movq %rax, %rdx
callq 0x5345e
jmp 0x541f0
movl 0x30(%rsp), %esi
movl %r12d, %edx
callq 0x537d7
movq %rax, %rbp
movq (%rbx,%r14,8), %rdi
movl 0x8(%rsp), %esi
movq %rax, %rdx
callq 0x5330b
movsd %xmm0, 0x40(%rsp)
leaq 0xf42d0(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
leaq 0x44f01(%rip), %rdx     # 0x9910b
callq 0x35305
movq %r13, %rdi
movq %r15, %rsi
movsd 0x40(%rsp), %xmm0
movb $0x1, %al
callq 0x42e0
movq %rbp, %rdi
callq 0x52a0f
incq %r14
movq 0x58(%rsp), %r15
jmp 0x5419a
movq %r13, %rdi
callq 0x42a0
incq %r12
movq 0x68(%rsp), %r13
jmp 0x54131
movq %r15, %rdi
movl 0x60(%rsp), %ebp
movl %ebp, %esi
movl 0x30(%rsp), %edx
callq 0x34ffc
movq %rbx, %rdi
movl %ebp, %esi
movl 0x8(%rsp), %edx
callq 0x34ffc
leaq 0x7a1b0(%rsp), %rbx
movw $0x2d, (%rbx)
leaq 0x46151(%rip), %rdi     # 0x9a3d1
callq 0x4cf11
movl %eax, %ebp
leaq 0x416aa(%rip), %rdi     # 0x95938
callq 0x4cf11
subq $0x8, %rsp
leaq 0x94(%rsp), %r8
leaq 0x90(%rsp), %r9
movq 0x40(%rsp), %r15
movq %r15, %rdi
movl 0x34(%rsp), %r14d
movl %r14d, %esi
movl %ebp, %edx
movq %rbx, %rcx
pushq %rax
callq 0x81133
addq $0x10, %rsp
movl (%rax), %ebx
decl %ebx
movq %rax, %rdi
callq 0x34ff7
movq %r15, %rdi
movl %r14d, %esi
callq 0x34fc3
movq 0x78(%rsp), %rbp
movq 0x20(%rsp), %r15
cmpl $0x0, 0x1c(%rsp)
movq 0x80(%rsp), %r14
movq %r13, %rdi
movl %r15d, %esi
movl %ebx, %edx
je 0x54330
callq 0x535d2
movq %rax, %r12
movq %r13, %rdi
movl %r15d, %esi
movq %rax, %rdx
callq 0x5345e
movq 0x70(%rsp), %rax
movsd %xmm0, (%rax)
movl 0x48(%rsp), %ebx
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x5345e
jmp 0x54360
callq 0x537d7
movq %rax, %r12
movq %r13, %rdi
movl %r15d, %esi
movq %rax, %rdx
callq 0x5330b
movq 0x70(%rsp), %rax
movsd %xmm0, (%rax)
movl 0x48(%rsp), %ebx
movq %r14, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x5330b
movsd %xmm0, (%rbp)
movq %r13, %rdi
movl %r15d, %esi
callq 0x34fc3
movq %r14, %rdi
movl %ebx, %esi
callq 0x34fc3
movq %r12, %rax
addq $0x16e3f8, %rsp         # imm = 0x16E3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r12d, %r12d
jmp 0x5437a