// File: /workspace/github_c_makefile_star2_O3/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, 0x24(%rsp)
movq %r8, 0x80(%rsp)
movq %rcx, 0x68(%rsp)
movl %edx, %ebp
movq %rsi, %rbx
leaq 0x34(%rsp), %rsi
callq 0x5a438
movq %rax, %r12
leaq 0x44(%rsp), %rsi
movq %rbx, %rdi
callq 0x5a438
movq %rax, %rbx
leaq 0x497ee(%rip), %rdi     # 0xa57d6
callq 0x54afc
testl %eax, %eax
movq %r12, 0x78(%rsp)
movq %rbx, 0x70(%rsp)
je 0x5c346
testl %ebp, %ebp
js 0x5c424
movl 0x34(%rsp), %eax
cvtsi2sd %eax, %xmm0
movsd 0x49509(%rip), %xmm1    # 0xa5520
movsd %xmm0, 0x38(%rsp)
divsd %xmm0, %xmm1
movsd %xmm1, 0x50(%rsp)
incl %ebp
movq %rbp, 0x58(%rsp)
movq %rax, 0x18(%rsp)
leal -0x1(%rax), %ebp
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movsd 0x4a2ed(%rip), %xmm0    # 0xa6330
xorl %r13d, %r13d
movsd %xmm0, 0x48(%rsp)
cmpl $0x0, 0x24(%rsp)
je 0x5c07f
movq %r12, %rdi
movq 0x18(%rsp), %r14
movl %r14d, %esi
movl %r13d, %edx
callq 0x5b95f
movq %rax, %r15
movq %r12, %rdi
movl %r14d, %esi
movq %rax, %rdx
callq 0x5b74e
movsd %xmm0, 0x8(%rsp)
jmp 0x5c0bd
movq %r12, %rdi
movq 0x18(%rsp), %r14
movl %r14d, %esi
movl %r13d, %edx
callq 0x5bb7b
movq %rax, %r15
movq %r12, %rdi
movl %r14d, %esi
movq %rax, %rdx
callq 0x5b53b
movsd %xmm0, 0x8(%rsp)
movq %r12, %rdi
movl %r14d, %esi
movq %r15, %rdx
callq 0x5b646
movsd %xmm0, 0x28(%rsp)
leal 0x1(%r13), %r12d
leaq 0x4970e(%rip), %rdi     # 0xa57d6
callq 0x54afc
decl %eax
cmpl $0x3, %eax
ja 0x5c256
leaq 0x4ec95(%rip), %rcx     # 0xaad74
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x0, 0x24(%rsp)
leaq 0x49748(%rip), %r14     # 0xa583c
je 0x5c22b
movq %r14, %rdi
callq 0x549ba
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
xorps %xmm1, %xmm1
cvtsi2sd %r12d, %xmm1
jae 0x5c29c
movq %r14, %rdi
movsd %xmm1, 0x10(%rsp)
callq 0x549ba
movapd %xmm0, %xmm2
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movq 0x18(%rsp), %rdi
callq 0x488b4
jmp 0x5c250
cmpl $0x0, 0x24(%rsp)
je 0x5c1ed
movsd 0x8(%rsp), %xmm0
movl %r12d, %edi
movq 0x18(%rsp), %rsi
movsd 0x493ba(%rip), %xmm1    # 0xa5520
movapd %xmm1, %xmm2
callq 0x48a31
jmp 0x5c250
cmpl $0x0, 0x24(%rsp)
je 0x5c20e
movsd 0x8(%rsp), %xmm0
movl %r12d, %edi
movsd 0x50(%rsp), %xmm1
jmp 0x5c21f
xorps %xmm1, %xmm1
cvtsi2sd %r12d, %xmm1
cmpl $0x0, 0x24(%rsp)
leaq 0x49695(%rip), %r14     # 0xa583c
je 0x5c240
movsd %xmm1, 0x10(%rsp)
movq %r14, %rdi
callq 0x549ba
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x5c2ae
movq %r14, %rdi
callq 0x549ba
movapd %xmm0, %xmm2
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movq 0x18(%rsp), %rdi
callq 0x488d4
jmp 0x5c250
movsd 0x8(%rsp), %xmm0
movl %r12d, %edi
movq 0x18(%rsp), %rsi
movsd 0x4931d(%rip), %xmm1    # 0xa5520
movapd %xmm1, %xmm2
callq 0x4896e
jmp 0x5c250
movsd 0x8(%rsp), %xmm0
movl %r12d, %edi
movsd 0x49ba1(%rip), %xmm1    # 0xa5dc0
movl $0x6, %esi
callq 0x48abe
jmp 0x5c250
xorps %xmm1, %xmm1
cvtsi2sd %r12d, %xmm1
movsd 0x28(%rsp), %xmm0
callq 0x47871
jmp 0x5c250
movsd 0x28(%rsp), %xmm0
movq 0x18(%rsp), %rdi
callq 0x47cd7
movsd %xmm0, 0x10(%rsp)
movsd 0x48(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
ucomisd %xmm1, %xmm0
cmoval %r13d, %ebx
minsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movq %r15, %rdi
callq 0x5ac26
decl %ebp
movsd 0x8(%rsp), %xmm0
movl %r12d, %r13d
cmpl %r12d, 0x58(%rsp)
movq 0x78(%rsp), %r12
jne 0x5c046
jmp 0x5c770
movsd 0x8(%rsp), %xmm0
movq 0x18(%rsp), %rdi
callq 0x47841
jmp 0x5c2c4
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
movq 0x18(%rsp), %rdi
callq 0x47c88
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm1
mulsd 0x38(%rsp), %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
leaq 0x7a1b0(%rsp), %rdi
leaq 0x4d2db(%rip), %rsi     # 0xa95d1
movl %r12d, %edx
xorl %eax, %eax
callq 0x41b0
leaq 0xf42d0(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3a535
leaq 0x90(%rsp), %rdi
movq %r14, %rsi
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x41b0
leaq 0x7a1b0(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x33827
jmp 0x5c256
movslq 0x34(%rsp), %rbx
cmpq $0x31, %rbx
jg 0x5c42e
leal -0x1(%rbx), %r8d
leaq 0x4eadb(%rip), %r14     # 0xaae3b
movl $0x8, %edi
movl $0x8, %esi
movl $0x8, %edx
movl %ebx, %ecx
movl %r8d, 0x18(%rsp)
movl $0x2, %r9d
pushq $0x25
pushq %r14
callq 0x3a419
addq $0x10, %rsp
movq %rax, %r15
movl $0x8, %edi
movl $0x8, %esi
movl $0x8, %edx
movl %ebx, %ecx
movl $0x1, %r8d
movl $0x2, %r9d
pushq $0x26
pushq %r14
callq 0x3a419
addq $0x10, %rsp
movq %rax, %r13
testl %ebx, %ebx
jle 0x5c41b
xorl %eax, %eax
xorl %ecx, %ecx
xorl %edx, %edx
cmpq %rcx, %rax
jne 0x5c3e8
movq (%r12,%rax,8), %rsi
movsd (%rsi), %xmm0
movq (%r13,%rax,8), %rdi
movq (%rdi), %rdi
movsd %xmm0, (%rdi)
movsd 0x8(%rsi), %xmm0
movsd %xmm0, 0x8(%rdi)
jmp 0x5c40b
movq (%r12,%rcx,8), %rsi
movsd (%rsi), %xmm0
movq (%r15,%rax,8), %rdi
movslq %edx, %rdx
movq (%rdi,%rdx,8), %rdi
movsd %xmm0, (%rdi)
movsd 0x8(%rsi), %xmm0
movsd %xmm0, 0x8(%rdi)
incl %edx
incq %rcx
cmpq %rcx, %rbx
jne 0x5c3c3
incq %rax
cmpq %rbx, %rax
jne 0x5c3bf
movl %ebx, 0x28(%rsp)
jmp 0x5c56d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x5c770
movl %ebx, %r13d
shrl %r13d
leaq 0x4ea00(%rip), %r14     # 0xaae3b
movl $0x8, %edi
movl $0x8, %esi
movl $0x8, %edx
movl $0xa, %ecx
movl %r13d, %r8d
movl $0x2, %r9d
pushq $0x3f
pushq %r14
callq 0x3a419
addq $0x10, %rsp
movq %rax, %r15
movl $0x8, %edi
movl $0x8, %esi
movl $0x8, %edx
movl $0xa, %ecx
movl %r13d, 0x18(%rsp)
movl %r13d, %r8d
movl $0x2, %r9d
pushq $0x40
pushq %r14
callq 0x3a419
addq $0x10, %rsp
movq %rax, %r13
xorl %r14d, %r14d
movl %ebx, %edi
callq 0x3afe4
leaq (%r14,%r14), %rcx
leaq 0x1(,%r14,2), %rdx
xorl %esi, %esi
xorl %edi, %edi
movq (%r12,%rsi,8), %r8
movsd (%r8), %xmm0
testb $0x1, (%rax,%rsi,4)
movslq %edi, %r9
jne 0x5c502
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 (%r13,%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 0x5c544
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 (%r13,%rcx,8), %r10
subq %r9, %r10
movq (%r10,%rsi,8), %r9
movsd %xmm0, (%r9)
movsd 0x8(%r8), %xmm0
movsd %xmm0, 0x8(%r9)
incq %rsi
cmpq %rsi, %rbx
jne 0x5c4b4
movq %rax, %rdi
callq 0x3a180
incq %r14
cmpq $0x5, %r14
jne 0x5c49d
movl $0xa, 0x28(%rsp)
leal 0x1(%rbp), %r14d
movslq %r14d, %rdi
shlq $0x3, %rdi
leaq 0x4e8bc(%rip), %rsi     # 0xaae3b
movl $0x8a, %edx
callq 0x3a0e1
movq %rax, 0x38(%rsp)
testl %ebp, %ebp
js 0x5c6e4
subl 0x18(%rsp), %ebx
movl %r14d, 0x64(%rsp)
movl %r14d, %eax
movq %rax, 0x50(%rsp)
movl 0x28(%rsp), %eax
movq %rax, 0x58(%rsp)
xorl %ebp, %ebp
leaq 0x4dea3(%rip), %rdi     # 0xaa45c
callq 0x54a6f
leaq 0x90(%rsp), %r12
movq %r12, %rdi
leaq 0x4e875(%rip), %rsi     # 0xaae45
movq %rax, %rdx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x41b0
movq 0x38(%rsp), %r14
movq (%r14,%rbp,8), %rdi
movq %r12, %rsi
callq 0x3b494
movq %rax, (%r14,%rbp,8)
movq %r12, %rdi
leaq 0x4f372(%rip), %rsi     # 0xab96d
callq 0x40f0
movq %rax, 0x48(%rsp)
testq %rax, %rax
je 0x5c828
movq %rbp, 0x10(%rsp)
cmpl $0x0, 0x28(%rsp)
jle 0x5c6b7
xorl %ebp, %ebp
movq (%r15,%rbp,8), %rdi
cmpl $0x0, 0x24(%rsp)
je 0x5c64d
movl 0x18(%rsp), %esi
movq 0x10(%rsp), %rdx
callq 0x5b95f
movq %rax, %r12
movq (%r13,%rbp,8), %rdi
movl %ebx, %esi
movq %rax, %rdx
callq 0x5b74e
jmp 0x5c66d
movl 0x18(%rsp), %esi
movq 0x10(%rsp), %rdx
callq 0x5bb7b
movq %rax, %r12
movq (%r13,%rbp,8), %rdi
movl %ebx, %esi
movq %rax, %rdx
callq 0x5b53b
movsd %xmm0, 0x8(%rsp)
leaq 0xf42d0(%rsp), %r14
movq %r14, %rdi
xorl %esi, %esi
leaq 0x4cb14(%rip), %rdx     # 0xa919b
callq 0x3a535
movq 0x48(%rsp), %rdi
movq %r14, %rsi
movsd 0x8(%rsp), %xmm0
movb $0x1, %al
callq 0x42e0
movq %r12, %rdi
callq 0x5ac26
incq %rbp
cmpq %rbp, 0x58(%rsp)
jne 0x5c620
movq 0x48(%rsp), %rdi
callq 0x42a0
movq 0x10(%rsp), %rbp
incq %rbp
cmpq 0x50(%rsp), %rbp
movq 0x78(%rsp), %r12
jne 0x5c5b2
movl 0x18(%rsp), %edx
movl 0x64(%rsp), %r14d
jmp 0x5c6ea
movl 0x18(%rsp), %edx
subl %edx, %ebx
movq %r15, %rdi
movl 0x28(%rsp), %ebp
movl %ebp, %esi
callq 0x3a185
movq %r13, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x3a185
leaq 0x7a1b0(%rsp), %rbx
movw $0x2d, (%rbx)
leaq 0x4dd89(%rip), %rdi     # 0xaa4a1
callq 0x54afc
movl %eax, %ebp
leaq 0x49212(%rip), %rdi     # 0xa5938
callq 0x54afc
subq $0x8, %rsp
leaq 0x94(%rsp), %r8
leaq 0x90(%rsp), %r9
movq 0x40(%rsp), %r15
movq %r15, %rdi
movl %r14d, %esi
movl %ebp, %edx
movq %rbx, %rcx
pushq %rax
callq 0x8ec4a
addq $0x10, %rsp
movl (%rax), %ebx
decl %ebx
movq %rax, %rdi
callq 0x3a180
movq %r15, %rdi
movl %r14d, %esi
callq 0x3a14b
movl 0x34(%rsp), %ebp
cmpl $0x0, 0x24(%rsp)
je 0x5c7b8
movq %r12, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x5b95f
movq %rax, %r15
movq %r12, %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x5b74e
movq 0x68(%rsp), %rax
movsd %xmm0, (%rax)
movl 0x44(%rsp), %ebx
movq 0x70(%rsp), %r14
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x5b74e
jmp 0x5c7f3
movq %r12, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x5bb7b
movq %rax, %r15
movq %r12, %rdi
movl %ebp, %esi
movq %rax, %rdx
callq 0x5b53b
movq 0x68(%rsp), %rax
movsd %xmm0, (%rax)
movl 0x44(%rsp), %ebx
movq 0x70(%rsp), %r14
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
callq 0x5b53b
movq 0x80(%rsp), %rax
movsd %xmm0, (%rax)
movq %r12, %rdi
movl %ebp, %esi
callq 0x3a14b
movq %r14, %rdi
movl %ebx, %esi
callq 0x3a14b
movq %r15, %rax
addq $0x16e3f8, %rsp         # imm = 0x16E3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r15d, %r15d
jmp 0x5c813