LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/metaclassification.c
// Function: free_model_of_meta_classification_algorithm
void free_model_of_meta_classification_algorithm(int meta_algorithm, int algorithm, void** model, Datasetptr current_dataset)
{
 int i, d;
 d = current_dataset->classno;
 switch (meta_algorithm)
  {
   case         ONE_VERSUS_ONE:current_dataset->classno = 2;
                               for (i = 0; i < d * (d - 1) / 2; i++)
                                 free_model_of_supervised_algorithm(algorithm, model[i], current_dataset);
                               current_dataset->classno = d;
                               break;
   case        ONE_VERSUS_REST:current_dataset->classno = 2;
                               for (i = 0; i < d; i++)
                                 free_model_of_supervised_algorithm(algorithm, model[i], current_dataset);
                               current_dataset->classno = d;
                               break;
   case BAGGING_CLASSIFICATION:for (i = 0; i < get_parameter_i("weaklearnercount"); i++)
                                 free_model_of_supervised_algorithm(algorithm, model[i], current_dataset);
                               break;
  }
 safe_free(model);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %ebp
movl 0x10(%rcx), %r12d
cmpl $0x64, %edi
je 0x3cea3
cmpl $0x65, %edi
je 0x3ce73
cmpl $0x66, %edi
jne 0x3cede
xorl %r12d, %r12d
leaq 0x5d375(%rip), %r15     # 0x9a1c6
movq %r15, %rdi
callq 0x4cd35
cltq
cmpq %rax, %r12
jge 0x3cede
movq (%rbx,%r12,8), %rsi
movl %ebp, %edi
movq %r14, %rdx
callq 0x4d2f
incq %r12
jmp 0x3ce51
movl $0x2, 0x10(%r14)
xorl %r15d, %r15d
testl %r12d, %r12d
movl $0x0, %r13d
cmovgl %r12d, %r13d
cmpq %r15, %r13
je 0x3ceda
movq (%rbx,%r15,8), %rsi
movl %ebp, %edi
movq %r14, %rdx
callq 0x4d2f
incq %r15
jmp 0x3ce8b
pushq $0x2
popq %rcx
movl %ecx, 0x10(%r14)
leal -0x1(%r12), %eax
imull %r12d, %eax
cltd
idivl %ecx
movl %eax, %r15d
xorl %r13d, %r13d
testl %eax, %eax
cmovlel %r13d, %r15d
cmpq %r13, %r15
je 0x3ceda
movq (%rbx,%r13,8), %rsi
movl %ebp, %edi
movq %r14, %rdx
callq 0x4d2f
incq %r13
jmp 0x3cec2
movl %r12d, 0x10(%r14)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x34ff7
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/metaregression.c
// Function: train_bagging_regression
void** train_bagging_regression(Instanceptr* trdata, Instanceptr* cvdata, int algorithm, void* parameters)
{
 int i, learner_count;
 Instanceptr traindata, validationdata;
 void** model;
 learner_count = get_parameter_i("weaklearnercount");
 model = safemalloc(sizeof(void*) * learner_count, "train_bagging_regression", 4);
 for (i = 0; i < learner_count; i++)
  {
   traindata = bootstrap_sample_without_stratification(*trdata);
   if (is_cvdata_needed(algorithm))
     validationdata = bootstrap_sample_without_stratification(*cvdata);
   else
     validationdata = NULL;
   model[i] = regression_algorithms[algorithm - ONEFEATURE].train_algorithm(&traindata, &validationdata, parameters);
  }
 return model;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x10(%rsp)
movl %edx, %r14d
movq %rsi, 0x8(%rsp)
movq %rdi, %r12
leaq 0x5d079(%rip), %rdi     # 0x9a1c6
callq 0x4cd35
movslq %eax, %rbp
leaq (,%rbp,8), %rdi
leaq 0x5d0f7(%rip), %rsi     # 0x9a25b
pushq $0x4
popq %rdx
callq 0x34f59
movq %rax, %r13
leal -0x7d0(%r14), %eax
cltq
imulq $0x28, %rax, %r15
addq 0x8ee65(%rip), %r15     # 0xcbfe8
xorl %ebx, %ebx
testl %ebp, %ebp
cmovlel %ebx, %ebp
cmpq %rbx, %rbp
je 0x3d1db
movq (%r12), %rdi
callq 0x2c859
movq %rax, 0x20(%rsp)
movl %r14d, %edi
callq 0x591a
testl %eax, %eax
je 0x3d1b8
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x2c859
jmp 0x3d1ba
xorl %eax, %eax
movq %rax, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq *(%r15)
movq %rax, (%r13,%rbx,8)
incq %rbx
jmp 0x3d18a
movq %r13, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/metaregression.c
// Function: test_bagging_regression
Prediction test_bagging_regression(Instanceptr data, void** model, int algorithm, void* parameters, double* posterior)
{
 int i, learner_count;
 double* outputs;
 Prediction result, prediction;
 learner_count = get_parameter_i("weaklearnercount");
 outputs = safemalloc(sizeof(double) * learner_count, "test_bagging_regression", 4);
 for (i = 0; i < learner_count; i++)
  {
   prediction = regression_algorithms[algorithm - ONEFEATURE].test_algorithm(data, model[i], parameters, NULL);
   outputs[i] = prediction.regvalue;
  }
 qsort(outputs, learner_count, sizeof(double), sort_function_double_ascending);
 result.regvalue = outputs[learner_count / 2];
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, 0x18(%rsp)
movl %ecx, %ebx
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, 0x10(%rsp)
leaq 0x5cfb2(%rip), %rdi     # 0x9a1c6
callq 0x4cd35
movslq %eax, %r15
leaq (,%r15,8), %rdi
leaq 0x5d049(%rip), %rsi     # 0x9a274
pushq $0x4
popq %rdx
callq 0x34f59
movq %rax, %r13
addl $0xfffff830, %ebx       # imm = 0xFFFFF830
movslq %ebx, %rax
imulq $0x28, %rax, %rax
leaq 0x8f5e6(%rip), %rcx     # 0xcc830
leaq (%rcx,%rax), %r14
addq $0x8, %r14
xorl %ebx, %ebx
movq %r15, %rax
testl %eax, %eax
movl $0x0, %r15d
movq %rax, 0x8(%rsp)
cmovgl %eax, %r15d
cmpq %rbx, %r15
je 0x3d296
movq (%r12,%rbx,8), %rdx
leaq 0x20(%rsp), %rdi
movq %rbp, %rsi
movq 0x18(%rsp), %rcx
xorl %r8d, %r8d
callq *(%r14)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, (%r13,%rbx,8)
incq %rbx
jmp 0x3d268
leaq -0x7ede(%rip), %rcx     # 0x353bf
pushq $0x8
popq %rdx
movq %r13, %rdi
movq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x4240
pushq $0x2
popq %rcx
movl %ebx, %eax
cltd
idivl %ecx
cltq
movsd (%r13,%rax,8), %xmm0
movq 0x10(%rsp), %rax
movsd %xmm0, (%rax)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/metaregression.c
// Function: free_model_of_meta_regression_algorithm
void free_model_of_meta_regression_algorithm(int meta_algorithm, int algorithm, void** model, Datasetptr current_dataset)
{
 int i;
 switch (meta_algorithm)
  {
   case BAGGING_REGRESSION:for (i = 0; i < get_parameter_i("weaklearnercount"); i++)
                             free_model_of_supervised_algorithm(algorithm, model[i], current_dataset);
                           break;
  }
 safe_free(model);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
cmpl $0xc8, %edi
jne 0x3d31d
movq %rcx, %r14
movl %esi, %ebp
xorl %r12d, %r12d
leaq 0x5cecb(%rip), %r15     # 0x9a1c6
movq %r15, %rdi
callq 0x4cd35
cltq
cmpq %rax, %r12
jge 0x3d31d
movq (%rbx,%r12,8), %rsi
movl %ebp, %edi
movq %r14, %rdx
callq 0x4d2f
incq %r12
jmp 0x3d2fb
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x34ff7
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mixture.c
// Function: mixture_class_at_value
int mixture_class_at_value(Mixtureptr mix, double value)
{
	/*!Last Changed 26.01.2005*/
	int i, j, index;
	double maxprob = -1, prob;
	for (i = 0; i < mix->classcount; i++)
	 {
		 prob = 0;
			for (j = 0; j < mix->numberofmodels[i]; j++)
				 prob += mix->mixtureprob[i][j] * gaussian(value, mix->mixturemeans[i][j], mix->mixturedeviations[i][j]);
			if (prob > maxprob)
			 {
				 maxprob = prob;
					index = i;
			 }
	 }
	return index;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movsd %xmm0, 0x10(%rsp)
movq %rdi, %rbx
movsd 0x58824(%rip), %xmm0    # 0x95db0
movsd %xmm0, 0x8(%rsp)
xorl %r14d, %r14d
movslq (%rbx), %rax
cmpq %rax, %r14
jge 0x3d62b
xorpd %xmm1, %xmm1
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movslq (%rax,%r14,4), %rax
cmpq %rax, %r15
jge 0x3d60b
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
movq (%rax,%r14,8), %rax
movsd (%rax,%r15,8), %xmm0
movsd %xmm0, 0x18(%rsp)
movq (%rcx,%r14,8), %rax
movsd %xmm1, 0x20(%rsp)
movsd (%rax,%r15,8), %xmm1
movq 0x28(%rbx), %rax
movq (%rax,%r14,8), %rax
movsd (%rax,%r15,8), %xmm2
movsd 0x10(%rsp), %xmm0
callq 0x803b8
movsd 0x20(%rsp), %xmm1
mulsd 0x18(%rsp), %xmm0
addsd %xmm0, %xmm1
incq %r15
jmp 0x3d5a8
movsd 0x8(%rsp), %xmm0
ucomisd %xmm0, %xmm1
cmoval %r14d, %ebp
maxsd %xmm0, %xmm1
incq %r14
movsd %xmm1, 0x8(%rsp)
jmp 0x3d595
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mixture.c
// Function: mixture_value
double mixture_value(Mixtureptr mix, double value, int classno)
{
	/*!Last Changed 26.01.2005*/
	int i, j;
	double totalprob = 0, prob, realprob;
	for (i = 0; i < mix->classcount; i++)
	 {
		 prob = 0;
			for (j = 0; j < mix->numberofmodels[i]; j++)
				 prob += mix->mixtureprob[i][j] * gaussian(value, mix->mixturemeans[i][j], mix->mixturedeviations[i][j]);
			if (i == classno)
				 realprob = prob;
			totalprob += prob;
	 }
	return realprob / totalprob;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movsd %xmm0, 0x10(%rsp)
movq %rdi, %rbx
movl %esi, %r14d
xorps %xmm0, %xmm0
movsd %xmm0, (%rsp)
xorl %r15d, %r15d
movslq (%rbx), %rax
cmpq %rax, %r15
jge 0x3d6fb
movsd %xmm0, 0x8(%rsp)
xorpd %xmm2, %xmm2
xorl %r12d, %r12d
movq 0x8(%rbx), %rax
movslq (%rax,%r15,4), %rax
cmpq %rax, %r12
jge 0x3d6d6
movq 0x18(%rbx), %rax
movq 0x20(%rbx), %rcx
movq (%rax,%r15,8), %rax
movsd (%rax,%r12,8), %xmm0
movsd %xmm0, 0x18(%rsp)
movq (%rcx,%r15,8), %rax
movsd (%rax,%r12,8), %xmm1
movq 0x28(%rbx), %rax
movq (%rax,%r15,8), %rax
movsd %xmm2, 0x20(%rsp)
movsd (%rax,%r12,8), %xmm2
movsd 0x10(%rsp), %xmm0
callq 0x803b8
movsd 0x20(%rsp), %xmm2
mulsd 0x18(%rsp), %xmm0
addsd %xmm0, %xmm2
incq %r12
jmp 0x3d673
movapd %xmm2, %xmm0
cmpq %r14, %r15
je 0x3d6e5
movsd 0x8(%rsp), %xmm0
movsd (%rsp), %xmm1
addsd %xmm2, %xmm1
movsd %xmm1, (%rsp)
incq %r15
jmp 0x3d65a
divsd (%rsp), %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mixture.c
// Function: free_mixture
void free_mixture(Mixtureptr mix)
{
	/*!Last Changed 26.01.2005*/
	safe_free(mix->numberofmodels);
	safe_free(mix->classpriors);
	free_2d((void**)mix->mixtureprob, mix->classcount);
	free_2d((void**)mix->mixturemeans, mix->classcount);
	free_2d((void**)mix->mixturedeviations, mix->classcount);
	safe_free(mix);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x34ff7
movq 0x10(%rbx), %rdi
callq 0x34ff7
movq 0x18(%rbx), %rdi
movl (%rbx), %esi
callq 0x34fc3
movq 0x20(%rbx), %rdi
movl (%rbx), %esi
callq 0x34fc3
movq 0x28(%rbx), %rdi
movl (%rbx), %esi
callq 0x34fc3
movq %rbx, %rdi
popq %rbx
jmp 0x34ff7
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mixture.c
// Function: generate_data_from_mixture_file
double** generate_data_from_mixture_file(char* modeldefinition, int datasize)
{
	/*!Last Changed 26.01.2005*/
	Mixtureptr mix;
	double** data;
	mix = read_mixture_from_file(modeldefinition);
 data = generate_data_from_mixture_model(mix, datasize);
	free_mixture(mix);
	return data;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
callq 0x3d330
movq %rax, %r14
movq %rax, %rdi
movl %ebx, %esi
callq 0x3d77a
movq %rax, %rbx
movq %r14, %rdi
callq 0x3d70c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mixture.c
// Function: generate_data_from_mixture_model
double** generate_data_from_mixture_model(Mixtureptr mix, int datasize)
{
	/*!Last Changed 26.01.2005*/
	int i, whichclass, whichmodel;
	double** data, prob;
 data = (double**) safemalloc_2d(sizeof(double*), sizeof(double), datasize, 2, "generate_data_from_mixture_model", 5); 
	for (i = 0; i < datasize; i++)
	 {
		 prob = produce_random_value(0, 1);
   whichclass = find_bin(mix->classpriors, mix->classcount, prob);
			data[i][1] = whichclass;
			prob = produce_random_value(0, 1);
   whichmodel = find_bin(mix->mixtureprob[whichclass], mix->numberofmodels[whichclass], prob);
			data[i][0] = produce_normal_value(mix->mixturemeans[whichclass][whichmodel], mix->mixturedeviations[whichclass][whichmodel]);
	 }
	return data;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x5cb12(%rip), %r8      # 0x9a2a3
pushq $0x8
popq %rdi
pushq $0x2
popq %rcx
pushq $0x5
popq %r9
movq %rdi, %rsi
movl %ebx, %edx
callq 0x351c3
movq %rax, %r15
xorl %r12d, %r12d
testl %ebx, %ebx
cmovlel %r12d, %ebx
cmpq %r12, %rbx
je 0x3d83f
xorps %xmm0, %xmm0
movsd 0x57d5b(%rip), %xmm1    # 0x95520
callq 0x35cae
movq 0x10(%r14), %rdi
movl (%r14), %esi
callq 0x33688
movl %eax, %ebp
cvtsi2sd %eax, %xmm0
movq (%r15,%r12,8), %rax
movsd %xmm0, 0x8(%rax)
xorpd %xmm0, %xmm0
movsd 0x57d2f(%rip), %xmm1    # 0x95520
callq 0x35cae
movq 0x8(%r14), %rax
movq 0x18(%r14), %rcx
movslq %ebp, %r13
movq (%rcx,%r13,8), %rdi
movl (%rax,%r13,4), %esi
callq 0x33688
movq 0x20(%r14), %rcx
movq 0x28(%r14), %rdx
movq (%rcx,%r13,8), %rcx
cltq
movsd (%rcx,%rax,8), %xmm0
movq (%rdx,%r13,8), %rcx
movsd (%rcx,%rax,8), %xmm1
callq 0x81937
movq (%r15,%r12,8), %rax
movsd %xmm0, (%rax)
incq %r12
jmp 0x3d7b1
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: copy_of_Mlpnetwork
Mlpnetwork copy_of_Mlpnetwork(Mlpnetwork source)
{
	/*!Last Changed 29.06.2005*/
 Mlpnetwork dest;
	int li;
	dest = allocate_mlpnnetwork(source.P);
	dest.P = source.P;
	for (li = 0; li < source.P.layernum + 1; li++)
		 matrix_identical(&(dest.weights[li]), source.weights[li]);
	return dest;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
leaq 0xc8(%rsp), %r15
leaq 0x8(%rdi), %r12
pushq $0x12
popq %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
xorl %r13d, %r13d
xorl %edi, %edi
xorl %esi, %esi
callq 0x3eb62
movq %rax, %r14
movq %rax, (%rbx)
movl $0x90, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x4310
movslq 0x54(%r15), %r12
movq -0x8(%r15), %r15
addq $0x8, %r15
cmpq %r12, %r13
jg 0x3d8ce
movq -0x8(%r15), %rsi
movq (%r15), %rdx
movq %r14, %rdi
callq 0x3a763
incq %r13
addq $0x10, %r15
addq $0x10, %r14
jmp 0x3d8ad
movq %rbx, %rax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: mlp_network_train_general
Mlpnetwork mlp_network_train_general(matrix train, matrix cv, Mlpparametersptr mlpparams)
{
	/*!Last Changed 26.06.2005*/
	mlpparams->inputnum = train.row;
	mlpparams->trnum = train.row;
	mlpparams->cvnum = cv.row;
 if (current_dataset->classno == 0)
  	return mlpn_general(train, cv, mlpparams, REGRESSION);
	else
  	return mlpn_general(train, cv, mlpparams, CLASSIFICATION);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl %esi, 0x8(%r9)
movl %esi, 0x10(%r9)
movl %ecx, 0xc(%r9)
leaq 0x8ff24(%rip), %rax     # 0xcd870
movq (%rax), %rax
xorl %esi, %esi
cmpl $0x0, 0x10(%rax)
sete %sil
movl %esi, (%rsp)
callq 0x3d96a
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: testMlpnNetwork_cls
int testMlpnNetwork_cls(matrix Data, Mlpnetwork N, double* loglikelihood)
{
	/*!Last Changed 22.05.2005 fixed class results*/
	/*!Last Changed 09.02.2004 Oya*/
	int k, res, performance = 0;
	double prob;
	matrix testY;
	*loglikelihood = 0;
	for (k = 0; k < Data.row; k++)
	 {
		 testMlpnInput_cls(Data.values[k], &testY, N, &res, &prob);
			if (prob != 0)
				 *loglikelihood += log2(prob);
   performance += res;				 
			matrix_free(testY);
	 }
	return performance;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdx, %rbx
movq %rsi, %r14
andq $0x0, (%rdx)
movq %rdi, %r15
xorl %r12d, %r12d
testl %r15d, %r15d
cmovlel %r12d, %r15d
leaq 0xa0(%rsp), %r13
xorl %ebp, %ebp
cmpq %r12, %r15
je 0x3dd86
movq (%r14,%r12,8), %rax
pushq $0x13
popq %rcx
movq %rsp, %rdi
leaq 0xf0(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
leaq 0xa8(%rsp), %rsi
leaq 0x9c(%rsp), %rdx
movq %r13, %rcx
callq 0x3fa90
movsd 0xa0(%rsp), %xmm0
ucomisd 0x57fc4(%rip), %xmm0    # 0x95d18
jne 0x3dd58
jnp 0x3dd65
callq 0x34d77
addsd (%rbx), %xmm0
movsd %xmm0, (%rbx)
addl 0x9c(%rsp), %ebp
movq 0xa8(%rsp), %rdi
movq 0xb0(%rsp), %rsi
callq 0x3929f
incq %r12
jmp 0x3dd0e
movl %ebp, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: test_mlp_network
double test_mlp_network(Mlpnetwork neuralnetwork, matrix test)
{
	/*!Last Changed 26.06.2005*/
	double loglikelihood;
	int performance;
	if (current_dataset->classno == 0)
	  return testMlpnNetwork_reg(test, neuralnetwork) / test.row;
	else
		{
	  performance = testMlpnNetwork_cls(test, neuralnetwork, &loglikelihood);
			return 100.0 * ((test.row - performance + 0.0) / test.row);
		}
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
movq %rsi, %rax
movq %rdi, %rbx
leaq 0xb0(%rsp), %rsi
leaq 0x8fab9(%rip), %rcx     # 0xcd870
movq (%rcx), %rcx
cmpl $0x0, 0x10(%rcx)
je 0x3ddf4
pushq $0x13
popq %rcx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
leaq 0x98(%rsp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3dcdc
cvtsi2sd %ebx, %xmm1
subl %eax, %ebx
cvtsi2sd %ebx, %xmm0
divsd %xmm1, %xmm0
mulsd 0x57fb6(%rip), %xmm0    # 0x95da8
jmp 0x3de10
pushq $0x13
popq %rcx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3de19
cvtsi2sd %ebx, %xmm1
divsd %xmm1, %xmm0
addq $0xa0, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: testMlpnNetwork_reg
double testMlpnNetwork_reg(matrix Data, Mlpnetwork N)
{
	/*!Last Changed 16.03.2004 Oya*/
	double sqrdError = 0;
	matrix output_error, testY;
	int k;
 output_error = matrix_alloc(1, N.P.classnum);
	for (k = 0; k < Data.row; k++)
	 {
   sqrdError =  sqrdError + testMlpnInput_reg(Data.values[k], &testY, N, &output_error);
   matrix_free(testY);
	 } 	
	matrix_free(output_error);
	return sqrdError;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x110(%rsp), %rax
movl 0x8(%rax), %esi
pushq $0x1
popq %rdi
callq 0x380d3
leaq 0xc8(%rsp), %rbp
movq %rax, 0xb0(%rsp)
movq %rax, (%rbp)
xorl %r15d, %r15d
testl %r14d, %r14d
cmovlel %r15d, %r14d
movq %rdx, 0xa8(%rsp)
movq %rdx, 0x8(%rbp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0xa0(%rsp)
pushq $0x13
popq %r12
leaq 0xb8(%rsp), %r13
cmpq %r15, %r14
je 0x3dede
movq (%rbx,%r15,8), %rax
movq %r12, %rcx
movq %rsp, %rdi
leaq 0x110(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x3fc66
movsd 0xa0(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0xa0(%rsp)
movq 0xb8(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x3929f
incq %r15
jmp 0x3de86
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
callq 0x3929f
movsd 0xa0(%rsp), %xmm0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: number_of_weights_in_mlp_network
int number_of_weights_in_mlp_network(Mlpnetwork N)
{
	/*!Last Changed 18.06.2005*/
	int result = 0, i;
	for (i = 0; i <= N.P.layernum; i++)
		 result += N.weights[i].row * N.weights[i].col;
	return result;
}

// Assembly:
movslq 0x64(%rsp), %rcx
movq 0x8(%rsp), %rdx
addq $0x4, %rdx
xorl %esi, %esi
xorl %eax, %eax
cmpq %rcx, %rsi
jg 0x3e0af
movl (%rdx), %edi
imull -0x4(%rdx), %edi
addl %edi, %eax
incq %rsi
addq $0x10, %rdx
jmp 0x3e099
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: calculate_hidden_values
void calculate_hidden_values(double *inputdata, matrix weight, matrixptr hidden)
{
	/*!Last Changed 09.02.2004 Oya*/
	int i, hi;
	double sum;	
	for (hi = 0; hi < weight.row; hi++)
  {
		 sum = weight.values[hi][0];
		 for (i = 1; i < weight.col; i++)
    {
				 sum = sum + weight.values[hi][i] * inputdata[i - 1];
		  }
		 hidden->values[0][hi] = sigmoid(sum);
	 }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rdi, %r15
movq %rsi, %r12
sarq $0x20, %r12
xorl %r13d, %r13d
testl %esi, %esi
movl $0x0, %ebp
cmovgl %esi, %ebp
cmpq %rbp, %r13
je 0x3e644
movq (%r14,%r13,8), %rax
movsd (%rax), %xmm0
pushq $0x1
popq %rcx
cmpq %r12, %rcx
jge 0x3e62d
movsd (%rax,%rcx,8), %xmm1
mulsd -0x8(%r15,%rcx,8), %xmm1
addsd %xmm1, %xmm0
incq %rcx
jmp 0x3e613
callq 0x4dd58
movq 0x8(%rbx), %rax
movq (%rax), %rax
movsd %xmm0, (%rax,%r13,8)
incq %r13
jmp 0x3e603
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: calculate_output_values_reg
void calculate_output_values_reg(double *inputdata, matrix weight, matrixptr output)
{	
	/*!Last Changed 16.03.2004 Oya*/
	int i, hi;
	double sum;	
	for (hi=0; hi<weight.row; hi++)
  {
		 sum = weight.values[hi][0];
		 for (i=1; i<weight.col; i++)
    {
		 		sum = sum + weight.values[hi][i] * inputdata[i-1];
		  }
		 output->values[0][hi] = sum;
	 }
}

// Assembly:
movq %rsi, %rax
sarq $0x20, %rax
xorl %r8d, %r8d
testl %esi, %esi
movl $0x0, %r9d
cmovgl %esi, %r9d
pushq $0x1
popq %rsi
cmpq %r9, %r8
je 0x3eaa1
movq (%rdx,%r8,8), %r10
movsd (%r10), %xmm0
movq %rsi, %r11
cmpq %rax, %r11
jge 0x3ea8f
movsd (%r10,%r11,8), %xmm1
mulsd -0x8(%rdi,%r11,8), %xmm1
addsd %xmm1, %xmm0
incq %r11
jmp 0x3ea74
movq 0x8(%rcx), %r10
movq (%r10), %r10
movsd %xmm0, (%r10,%r8,8)
incq %r8
jmp 0x3ea63
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: softmax_with_calculation_of_outputs
void softmax_with_calculation_of_outputs(double *inputdata, matrix weights, matrixptr Y)
{
	/*!Last Changed 09.02.2004 Oya*/
	int i, j;
	double sum;
	sum = 0;
	for (i = 0; i < Y->col; i++)
	 {
 		Y->values[0][i] = weights.values[i][0];     /*for bias term*/
 		for (j = 1; j < weights.col; j++)
  			Y->values[0][i] = Y->values[0][i] + weights.values[i][j] * inputdata[j - 1];
 		Y->values[0][i] = exp(Y->values[0][i]);
 		sum = sum + Y->values[0][i];
	 }
	for (i = 0; i < Y->col; i++)
 		Y->values[0][i] = Y->values[0][i] / sum;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
sarq $0x20, %r15
xorpd %xmm1, %xmm1
xorl %r13d, %r13d
pushq $0x1
popq %rbp
movslq 0x4(%rbx), %rax
cmpq %rax, %r13
jge 0x3eb2d
movsd %xmm1, (%rsp)
movq (%r14,%r13,8), %rax
movsd (%rax), %xmm0
movq 0x8(%rbx), %rcx
movq (%rcx), %rcx
movsd %xmm0, (%rcx,%r13,8)
movq %rbp, %rdx
cmpq %r15, %rdx
jge 0x3eb0d
movsd (%rax,%rdx,8), %xmm1
mulsd -0x8(%r12,%rdx,8), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%rcx,%r13,8)
incq %rdx
jmp 0x3eaed
callq 0x4060
movq 0x8(%rbx), %rax
movq (%rax), %rax
movsd %xmm0, (%rax,%r13,8)
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
incq %r13
jmp 0x3eac7
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
cmpq %rcx, %rax
je 0x3eb53
movq 0x8(%rbx), %rdx
movq (%rdx), %rdx
movsd (%rdx,%rcx,8), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rdx,%rcx,8)
incq %rcx
jmp 0x3eb34
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: allocate_weights
matrixptr allocate_weights(Mlpparameters P, INITIALIZATION_TYPE inittype, int initvalue)
{
 /*!Last Changed 09.02.2004 Oya*/
 /*if inittype is 0 then assign random values, then init value is useless*/
 /*else if inittype is 1 assign initvalue*/
 /*else no initialization*/
 matrixptr weights;
 int i; /*allocations*/
 weights = (matrixptr) safemalloc ((P.layernum + 1) * sizeof(matrix), "allocate_weights", 3);
 for (i = 0; i < P.layernum; i++)
  {
   if (i == 0)
     weights[i] = matrix_alloc(P.hidden[i], P.dimnum + 1);
   else
     weights[i] = matrix_alloc(P.hidden[i], P.hidden[i - 1] + 1);
  }
 if (P.layernum == 0)
   weights[P.layernum] = matrix_alloc(P.classnum, P.dimnum + 1);
 else
   weights[P.layernum] = matrix_alloc(P.classnum, P.hidden[P.layernum - 1] + 1);
 for (i = 0; i <= P.layernum; i++)
   if (inittype == RANDOM)
     assignTwoDimRandomWeights(&weights[i], P.randrange);
   else 
     if (inittype == INITIAL_VALUE)
       initialize_matrix(&weights[i], initvalue); 
 return weights;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, (%rsp)
movl %edi, %ebx
leaq 0x50(%rsp), %r12
movslq 0x54(%r12), %r13
movq %r13, %rax
shlq $0x4, %rax
movq %rax, 0x10(%rsp)
leaq 0x10(%rax), %rdi
leaq 0x5b72e(%rip), %rsi     # 0x9a2c4
pushq $0x3
popq %rdx
callq 0x34f59
movq %rax, %r14
movl 0x4(%r12), %r15d
movl 0x48(%r12), %eax
movl %eax, 0x8(%rsp)
incl %r15d
xorl %ebp, %ebp
testl %r13d, %r13d
cmovgl %r13d, %ebp
pushq $0x48
popq %r12
subq $0x1, %rbp
jb 0x3ec0b
cmpq $0x48, %r12
jne 0x3ebe0
movl 0x8(%rsp), %edi
movl %r15d, %esi
callq 0x380d3
movq %rax, (%r14)
movq %rdx, 0x8(%r14)
jmp 0x3ec05
leaq 0x50(%rsp), %rax
movl -0x4(%rax,%r12), %esi
movl (%rax,%r12), %edi
incl %esi
callq 0x380d3
movq %rax, -0x120(%r14,%r12,4)
movq %rdx, -0x118(%r14,%r12,4)
addq $0x4, %r12
jmp 0x3ebbf
leaq 0x50(%rsp), %r12
testl %r13d, %r13d
je 0x3ec35
movl (%r12), %edi
movl 0x44(%r12,%r13,4), %esi
incl %esi
callq 0x380d3
movq 0x10(%rsp), %rcx
movq %rax, (%r14,%rcx)
movq %rdx, 0x8(%r14,%rcx)
jmp 0x3ec4b
movl (%r12), %edi
movl %r15d, %esi
callq 0x380d3
movq %rax, (%r14)
movq %rdx, 0x8(%r14)
xorl %r13d, %r13d
cvtsi2sdl (%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x28(%r12), %xmm0
movsd %xmm0, (%rsp)
xorl %r12d, %r12d
movq %r14, %r15
cmpq %r13, %r12
jg 0x3ec9c
cmpl $0x1, %ebx
je 0x3ec85
testl %ebx, %ebx
jne 0x3ec93
movq %r15, %rdi
movsd (%rsp), %xmm0
callq 0x398bd
jmp 0x3ec93
movq %r15, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x397a4
incq %r12
addq $0x10, %r15
jmp 0x3ec68
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: allocate_hiddens
matrixptr allocate_hiddens(Mlpparameters P)
{
	/*!Last Changed 09.02.2004 Oya*/
	matrixptr hiddens;
	int i;	 
	/*allocations*/
	if (P.layernum > 0)
	 {
	 	hiddens = (matrixptr) safemalloc (P.layernum * sizeof(matrix), "allocate_hiddens", 4);
	 	for (i = 0; i < P.layernum; i++)
	  		hiddens[i] = matrix_alloc(1, P.hidden[i]);
		 return hiddens;
	 }
	else
	 	return NULL;	
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq 0x84(%rsp), %r14
testq %r14, %r14
jle 0x3ee6d
leaq 0x30(%rsp), %r15
movq %r14, %rdi
shlq $0x4, %rdi
leaq 0x5b49d(%rip), %rsi     # 0x9a2d5
pushq $0x4
popq %rdx
callq 0x34f59
movq %rax, %rbx
shlq $0x2, %r14
xorl %r12d, %r12d
pushq $0x1
popq %rbp
cmpq %r12, %r14
je 0x3ee6f
movl 0x48(%r15,%r12), %esi
movl %ebp, %edi
callq 0x380d3
movq %rax, (%rbx,%r12,4)
movq %rdx, 0x8(%rbx,%r12,4)
addq $0x4, %r12
jmp 0x3ee4d
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: free_weights
void free_weights(matrixptr weights, int layer)
{
	/*!Last Changed 09.02.2004 Oya*/
	int i;	
	for (i = 0; i < (layer + 1); i++)
		 matrix_free(weights[i]);
	safe_free(weights);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq %esi, %r14
leaq 0x8(%rdi), %r15
xorl %r12d, %r12d
cmpq %r14, %r12
jg 0x3eeef
movq -0x8(%r15), %rdi
movq (%r15), %rsi
callq 0x3929f
incq %r12
addq $0x10, %r15
jmp 0x3eed5
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x34ff7
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: free_hiddens
void free_hiddens(matrixptr hiddens, int layer)
{
	/*!Last Changed 09.02.2004 Oya*/
	int i;	
	if (layer > 0)
	 {	
 		for (i = 0; i < layer; i++)
 			 matrix_free(hiddens[i]);
 		safe_free(hiddens);
	 }
}

// Assembly:
testl %esi, %esi
jle 0x3ef3e
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl %esi, %r14d
shlq $0x4, %r14
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x3ef31
movq (%rbx,%r15), %rdi
movq 0x8(%rbx,%r15), %rsi
callq 0x3929f
addq $0x10, %r15
jmp 0x3ef18
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x34ff7
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: calculate_error_values_cls
double calculate_error_values_cls(double outputclass, matrix output, matrixptr output_error)
{
	/*!Last Changed 09.02.2004 Oya*/
	int i;
	double sqrderror = 0;
	/*for error in classification*/
	for (i=0; i<output.col; i++)
	 {
 		output_error->values[0][i] = equal((int)outputclass,i) - output.values[0][i];
 		sqrderror = sqrderror + (-1 * equal((int)outputclass,i) * log(output.values[0][i]));
	 }
	sqrderror = sqrderror / output.col;
	return sqrderror;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
shrq $0x20, %r14
cvttsd2si %xmm0, %ebp
xorl %r12d, %r12d
testl %r14d, %r14d
movl $0x0, %r13d
cmovgl %r14d, %r13d
xorpd %xmm1, %xmm1
cmpq %r12, %r13
je 0x3efda
movl %ebp, %edi
movl %r12d, %esi
movsd %xmm1, 0x10(%rsp)
callq 0x34c88
cvtsi2sd %eax, %xmm0
movq (%r15), %rax
subsd (%rax,%r12,8), %xmm0
movq 0x8(%rbx), %rax
movq (%rax), %rax
movsd %xmm0, (%rax,%r12,8)
movl %ebp, %edi
movl %r12d, %esi
callq 0x34c88
negl %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%rsp)
movq (%r15), %rax
movsd (%rax,%r12,8), %xmm0
callq 0x4160
movsd 0x10(%rsp), %xmm1
mulsd 0x8(%rsp), %xmm0
addsd %xmm0, %xmm1
incq %r12
jmp 0x3ef72
cvtsi2sd %r14d, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: calculate_error_values_reg
double calculate_error_values_reg(double outputdata, matrix output, matrixptr output_error)
{	
	/*!Last Changed 16.03.2004 Oya*/
	int i;
	double sqrderror = 0;
	/*for error in regression*/
	for (i=0; i<output.col; i++)
  {
		 output_error->values[0][i] = outputdata - output.values[0][i];
		 sqrderror = sqrderror + output_error->values[0][i] * output_error->values[0][i];
	 }
	sqrderror = sqrderror / output.col;
	return sqrderror;
}

// Assembly:
shrq $0x20, %rdi
xorl %eax, %eax
testl %edi, %edi
movl $0x0, %ecx
cmovgl %edi, %ecx
xorpd %xmm1, %xmm1
cmpq %rax, %rcx
je 0x3f036
movq (%rsi), %r8
movapd %xmm0, %xmm2
subsd (%r8,%rax,8), %xmm2
movq 0x8(%rdx), %r8
movq (%r8), %r8
movsd %xmm2, (%r8,%rax,8)
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm1
incq %rax
jmp 0x3f00a
cvtsi2sd %edi, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: calculate_error_values_autoencoder
double calculate_error_values_autoencoder(double* outputdata, matrix output, matrixptr output_error)
{
	int i;
	double sqrderror = 0;
	for (i = 0; i < output.col; i++)
  {
   output_error->values[0][i] = outputdata[i] - output.values[0][i];
   sqrderror = sqrderror + output_error->values[0][i] * output_error->values[0][i];
  }
	sqrderror = sqrderror / output.col;
	return sqrderror;
}

// Assembly:
shrq $0x20, %rsi
xorl %eax, %eax
testl %esi, %esi
movl $0x0, %r8d
cmovgl %esi, %r8d
xorpd %xmm0, %xmm0
cmpq %rax, %r8
je 0x3f086
movsd (%rdi,%rax,8), %xmm1
movq (%rdx), %r9
subsd (%r9,%rax,8), %xmm1
movq 0x8(%rcx), %r9
movq (%r9), %r9
movsd %xmm1, (%r9,%rax,8)
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
jmp 0x3f059
cvtsi2sd %esi, %xmm1
divsd %xmm1, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: update_weights
void update_weights(matrixptr weights, matrixptr dweights, matrixptr prevWeights, Mlpparameters P)
{
	/*!Last Changed 23.06.2005 added weight decay*/
	/*!Last Changed 09.02.2004 Oya*/
	int li, i, j;	
	for (li=0; li<(P.layernum+1); li++)
 		for (i=0; i<weights[li].row; i++)
  			for (j=0; j<weights[li].col; j++)
  					weights[li].values[i][j] = weights[li].values[i][j] + dweights[li].values[i][j] + P.alpha * prevWeights[li].values[i][j] + P.weightdecay * P.decayalpha * P.eta * weights[li].values[i][j]; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movslq 0x8c(%rsp), %rax
movsd 0x68(%rsp), %xmm0
cvtsi2sdl 0x90(%rsp), %xmm1
mulsd 0x98(%rsp), %xmm1
mulsd 0x70(%rsp), %xmm1
xorl %ecx, %ecx
xorl %r8d, %r8d
cmpq %rax, %r8
jg 0x3f3e0
movq %r8, %rbx
shlq $0x4, %rbx
leaq (%rdi,%rbx), %r9
movl (%rdi,%rbx), %r10d
leaq (%rsi,%rbx), %r11
addq $0x8, %r11
addq %rdx, %rbx
addq $0x8, %rbx
testl %r10d, %r10d
cmovlel %ecx, %r10d
xorl %r14d, %r14d
cmpq %r10, %r14
je 0x3f3d8
movl 0x4(%r9), %r15d
testl %r15d, %r15d
cmovlel %ecx, %r15d
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x3f3d3
movq 0x8(%r9), %r13
movq (%r13,%r14,8), %r13
movsd (%r13,%r12,8), %xmm2
movq (%r11), %rbp
movq (%rbp,%r14,8), %rbp
movapd %xmm1, %xmm3
mulsd %xmm2, %xmm3
addsd (%rbp,%r12,8), %xmm2
movq (%rbx), %rbp
movq (%rbp,%r14,8), %rbp
movsd (%rbp,%r12,8), %xmm4
mulsd %xmm0, %xmm4
addsd %xmm2, %xmm4
addsd %xmm3, %xmm4
movsd %xmm4, (%r13,%r12,8)
incq %r12
jmp 0x3f380
incq %r14
jmp 0x3f36d
incq %r8
jmp 0x3f33c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: testMlpnInput_reg
double testMlpnInput_reg(double *Test, matrix* testY, Mlpnetwork N, matrixptr output_error)
{
	/*!Last Changed 16.03.2004 Oya*/
	double sqrderror;
	matrixptr testH;
	int li;			
	*testY = matrix_alloc(1, N.P.classnum);
	testH = allocate_hiddens(N.P);
	/*calculate hidden layers*/
	for (li=0; li<N.P.layernum; li++)
	 {
 		if (li==0)
  			calculate_hidden_values(Test, N.weights[0], &testH[0]);
	 	else
	  		calculate_hidden_values(testH[li-1].values[0], N.weights[li], &testH[li]);
	 }
	/*calculate outputs*/
	if (N.P.layernum == 0)
   calculate_output_values_reg(Test, N.weights[N.P.layernum], testY);
	else
		 calculate_output_values_reg(testH[N.P.layernum-1].values[0], N.weights[N.P.layernum], testY);
	/*calculate error*/
	sqrderror = calculate_error_values_reg(Test[N.P.dimnum], *testY, output_error);
	free_hiddens(testH, N.P.layernum);
	return sqrderror;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, 0x98(%rsp)
movq %rsi, %rbx
movq %rdi, %r15
leaq 0xe8(%rsp), %rbp
movl (%rbp), %esi
pushq $0x1
popq %rdi
callq 0x380d3
movq %rax, (%rbx)
movq %rbx, 0xa0(%rsp)
movq %rdx, 0x8(%rbx)
pushq $0x12
popq %rcx
movq %rsp, %rdi
movq %rbp, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x3ee10
movq %rax, %r12
movslq 0x54(%rbp), %r13
movq -0x8(%rbp), %rbp
xorl %ebx, %ebx
testl %r13d, %r13d
movl $0x0, %r14d
cmovgl %r13d, %r14d
shlq $0x4, %r14
cmpq %rbx, %r14
je 0x3fd11
testq %rbx, %rbx
je 0x3fcf8
leaq (%r12,%rbx), %rcx
movq -0x8(%r12,%rbx), %rax
movq (%rax), %rdi
movq (%rbp,%rbx), %rsi
movq 0x8(%rbp,%rbx), %rdx
jmp 0x3fd06
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq %r15, %rdi
movq %r12, %rcx
callq 0x3e5db
addq $0x10, %rbx
jmp 0x3fcd6
testl %r13d, %r13d
je 0x3fd31
movq %r13, %rax
shlq $0x4, %rax
movq -0x8(%r12,%rax), %rcx
movq (%rcx), %rdi
movq (%rbp,%rax), %rsi
movq 0x8(%rbp,%rax), %rdx
jmp 0x3fd3c
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq %r15, %rdi
movq 0xa0(%rsp), %rbx
movq %rbx, %rcx
callq 0x3ea4a
leaq 0xe0(%rsp), %rax
movslq 0xc(%rax), %rax
movsd (%r15,%rax,8), %xmm0
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movq 0x98(%rsp), %rdx
callq 0x3eff6
movsd %xmm0, 0x98(%rsp)
movq %r12, %rdi
movl %r13d, %esi
callq 0x3ef02
movsd 0x98(%rsp), %xmm0
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: testMlpnInput_autoencoder
double testMlpnInput_autoencoder(double *Test, matrix* testY, Mlpnetwork N, matrixptr output_error)
{
	double sqrderror;
	matrixptr testH;
	int li;
	*testY = matrix_alloc(1, N.P.classnum);
	testH = allocate_hiddens(N.P);
	/*calculate hidden layers*/
	for (li = 0; li < N.P.layernum; li++)
  {
   if (li == 0)
     calculate_hidden_values(Test, N.weights[0], &testH[0]);
   else
     calculate_hidden_values(testH[li-1].values[0], N.weights[li], &testH[li]);
  }
	/*calculate outputs*/
 calculate_output_values_reg(testH[N.P.layernum-1].values[0], N.weights[N.P.layernum], testY);
	/*calculate error*/
	sqrderror = calculate_error_values_autoencoder(Test, *testY, output_error);
	free_hiddens(testH, N.P.layernum);
	return sqrderror;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, 0x98(%rsp)
movq %rsi, %r15
movq %rdi, %r14
leaq 0xe8(%rsp), %rbp
movl (%rbp), %esi
pushq $0x1
popq %rdi
callq 0x380d3
movq %rax, (%r15)
movq %rdx, 0x8(%r15)
pushq $0x12
popq %rcx
movq %rsp, %rdi
movq %rbp, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x3ee10
movq %rax, %r12
movslq 0x54(%rbp), %rax
movq -0x8(%rbp), %rbp
xorl %ebx, %ebx
testl %eax, %eax
movl $0x0, %r13d
movq %rax, 0xa0(%rsp)
cmovgl %eax, %r13d
shlq $0x4, %r13
cmpq %rbx, %r13
je 0x3fe4b
testq %rbx, %rbx
je 0x3fe32
leaq (%r12,%rbx), %rcx
movq -0x8(%r12,%rbx), %rax
movq (%rax), %rdi
movq (%rbp,%rbx), %rsi
movq 0x8(%rbp,%rbx), %rdx
jmp 0x3fe40
movq (%rbp), %rsi
movq 0x8(%rbp), %rdx
movq %r14, %rdi
movq %r12, %rcx
callq 0x3e5db
addq $0x10, %rbx
jmp 0x3fe10
movq 0xa0(%rsp), %rbx
movq %rbx, %rax
shlq $0x4, %rax
movq -0x8(%r12,%rax), %rcx
movq (%rcx), %rdi
movq (%rbp,%rax), %rsi
movq 0x8(%rbp,%rax), %rdx
movq %r15, %rcx
callq 0x3ea4a
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
movq 0x98(%rsp), %rcx
callq 0x3f043
movsd %xmm0, 0x98(%rsp)
movq %r12, %rdi
movl %ebx, %esi
callq 0x3ef02
movsd 0x98(%rsp), %xmm0
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: testMlpnNetwork2_cls
int testMlpnNetwork2_cls(matrix Data, Mlpnetwork N, double* loglikelihood, double *sqrdError)
{
	/*!Last Changed 22.05.2005 fixed class results*/
	/*!Last Changed 09.02.2004 Oya*/
	int k, res, performance = 0;
	double prob;	
	matrix testY;
	*sqrdError = 0;
	*loglikelihood = 0;
	for (k = 0; k < Data.row; k++)
	 {
		 *sqrdError += testMlpnInput_cls(Data.values[k], &testY, N, &res, &prob);
			if (prob != 0)
				 *loglikelihood += log2(prob);
   performance += res;				 
			matrix_free(testY);
	 }
	*sqrdError = *sqrdError / Data.row;
	return performance;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
andq $0x0, (%rcx)
andq $0x0, (%rdx)
xorl %r12d, %r12d
testl %edi, %edi
movl $0x0, %r13d
movq %rdi, 0xa8(%rsp)
cmovgl %edi, %r13d
xorl %ebp, %ebp
cmpq %r12, %r13
je 0x3ff82
movq (%r15,%r12,8), %rax
pushq $0x13
popq %rcx
movq %rsp, %rdi
leaq 0x100(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
leaq 0xb8(%rsp), %rsi
leaq 0xa4(%rsp), %rdx
leaq 0xb0(%rsp), %rcx
callq 0x3fa90
addsd (%rbx), %xmm0
movsd %xmm0, (%rbx)
movsd 0xb0(%rsp), %xmm0
ucomisd 0x55dcd(%rip), %xmm0    # 0x95d18
jne 0x3ff4f
jnp 0x3ff5e
callq 0x34d77
addsd (%r14), %xmm0
movsd %xmm0, (%r14)
addl 0xa4(%rsp), %ebp
movq 0xb8(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x3929f
incq %r12
jmp 0x3fef4
cvtsi2sdl 0xa8(%rsp), %xmm0
movsd (%rbx), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rbx)
movl %ebp, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/mlp.c
// Function: testMlpnNetwork_autoencoder
double testMlpnNetwork_autoencoder(matrix Data, Mlpnetwork N)
{
	double sqrdError = 0;
	matrix output_error, testY;
	int k;
 output_error = matrix_alloc(1, N.P.classnum);
	for (k = 0; k < Data.row; k++)
  {
   sqrdError =  sqrdError + testMlpnInput_autoencoder(Data.values[k], &testY, N, &output_error);
   matrix_free(testY);
  }
	matrix_free(output_error);
	return sqrdError;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x110(%rsp), %rax
movl 0x8(%rax), %esi
pushq $0x1
popq %rdi
callq 0x380d3
leaq 0xc8(%rsp), %rbp
movq %rax, 0xb0(%rsp)
movq %rax, (%rbp)
xorl %r15d, %r15d
testl %r14d, %r14d
cmovlel %r15d, %r14d
movq %rdx, 0xa8(%rsp)
movq %rdx, 0x8(%rbp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0xa0(%rsp)
pushq $0x13
popq %r12
leaq 0xb8(%rsp), %r13
cmpq %r15, %r14
je 0x40070
movq (%rbx,%r15,8), %rax
movq %r12, %rcx
movq %rsp, %rdi
leaq 0x110(%rsp), %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rax, %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x3fda1
movsd 0xa0(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0xa0(%rsp)
movq 0xb8(%rsp), %rdi
movq 0xc0(%rsp), %rsi
callq 0x3929f
incq %r15
jmp 0x40018
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
callq 0x3929f
movsd 0xa0(%rsp), %xmm0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/model.c
// Function: number_of_free_parameters_of_hessian
double number_of_free_parameters_of_hessian(double* eigenvalues, int weightcount, double alpha)
{
	/*!Last Changed 26.06.2005*/
	double sum = 0;
	int i;
	for (i = 0; i < weightcount; i++)
		 sum += eigenvalues[i] / (eigenvalues[i] + alpha);
	return sum;
}

// Assembly:
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
xorpd %xmm1, %xmm1
cmpq %rax, %rsi
je 0x40776
movsd (%rdi,%rax,8), %xmm2
movapd %xmm2, %xmm3
addsd %xmm0, %xmm3
divsd %xmm3, %xmm2
addsd %xmm2, %xmm1
incq %rax
jmp 0x40757
movapd %xmm1, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/model.c
// Function: hinge_loss
double hinge_loss(double y, double fx)
{
 HINGELOSS_TYPE hingelosstype = get_parameter_l("hingelosstype");
 if (1 - y * fx > 0.0)
   switch (hingelosstype)
    {
     case REGULAR_LOSS:return 1 - y * fx;
     case HINGELOSS_01:if (1 - y * fx < 1.0)
                         return 1 - y * fx;
                       else
                         return 1.0;
     case HINGELOSS_02:if (1 - y * fx < 2.0)
                         return 1 - y * fx;
                       else
                         return 2.0;
    } 
 return 0.0;
}

// Assembly:
subq $0x18, %rsp
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
leaq 0x59bbe(%rip), %rdi     # 0x9a350
callq 0x4cf11
movsd 0x8(%rsp), %xmm0
mulsd 0x10(%rsp), %xmm0
movsd 0x54d75(%rip), %xmm1    # 0x95520
subsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jbe 0x407dd
testl %eax, %eax
je 0x407d9
cmpl $0x2, %eax
je 0x407d1
cmpl $0x1, %eax
jne 0x407dd
minsd 0x54d51(%rip), %xmm1    # 0x95520
jmp 0x407d9
minsd 0x5586f(%rip), %xmm1    # 0x96048
movapd %xmm1, %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/model.c
// Function: srm_classification
double srm_classification(double error, int h, int N, double a1, double a2)
{
	/*!Last Changed 22.01.2005*/
 double epsilon, upperbound;
	epsilon = srm_epsilon(h, N, a1, a2);
 upperbound = error + (epsilon / 2) * (1 + sqrt(1 + (4 * error) / epsilon));
	return upperbound;
}

// Assembly:
subq $0x18, %rsp
movsd %xmm0, 0x8(%rsp)
movapd %xmm1, %xmm0
movaps %xmm2, %xmm1
callq 0x41bea
movapd %xmm0, %xmm1
movsd 0x540c0(%rip), %xmm2    # 0x95d20
movsd 0x54188(%rip), %xmm0    # 0x95df0
mulsd 0x8(%rsp), %xmm0
divsd %xmm1, %xmm0
addsd 0x538a6(%rip), %xmm0    # 0x95520
mulsd %xmm1, %xmm2
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x41c8e
sqrtsd %xmm0, %xmm0
jmp 0x41c9f
movsd %xmm2, 0x10(%rsp)
callq 0x4300
movsd 0x10(%rsp), %xmm2
addsd 0x53879(%rip), %xmm0    # 0x95520
mulsd %xmm0, %xmm2
addsd 0x8(%rsp), %xmm2
movapd %xmm2, %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/model.c
// Function: srm_regression
double srm_regression(double error, int h, int N, double a1, double a2)
{
	/*!Last Changed 22.01.2005*/
	double epsilon, upperbound;
	int c;
	c = 1;
	epsilon = srm_epsilon(h, N, a1, a2);
	upperbound = error / (1 - c * sqrt(epsilon));
	return upperbound;
}

// Assembly:
pushq %rax
movsd %xmm0, (%rsp)
movapd %xmm1, %xmm0
movapd %xmm2, %xmm1
callq 0x41bea
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x41cdd
sqrtsd %xmm0, %xmm0
jmp 0x41ce2
callq 0x4300
movsd 0x53836(%rip), %xmm1    # 0x95520
subsd %xmm0, %xmm1
movsd (%rsp), %xmm0
divsd %xmm1, %xmm0
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/model.c
// Function: search_and_add_candidate_model
void search_and_add_candidate_model(char** filenames, char* directory, int model, int* models, int* filecount)
{
	/*!Last Changed 02.06.2004*/
	int i;
	char filename[READLINELENGTH];
	for (i = 0; i < *filecount; i++)
		 if (models[i] == model)
				 break;
	if (i == *filecount)
	 {
		 (*filecount)++;
			sprintf(filename,"%s-%d.txt", directory, model);
			strcpy(filenames[(*filecount) - 1], filename); 
   models[(*filecount) - 1] = model;
	 }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x7a120, %rsp          # imm = 0x7A120
movq %r8, %r14
movq %rcx, %rbx
movl %edx, %ebp
movq %rsi, %rdx
movq %rdi, %r15
movl (%r8), %eax
xorl %esi, %esi
testl %eax, %eax
movl $0x0, %ecx
cmovgl %eax, %ecx
cmpq %rsi, %rcx
je 0x41d4b
cmpl %ebp, (%rbx,%rsi,4)
je 0x41d49
incq %rsi
jmp 0x41d3a
movl %esi, %ecx
cmpl %eax, %ecx
jne 0x41d81
incl %eax
movl %eax, (%r14)
leaq 0x58704(%rip), %rsi     # 0x9a45f
movq %rsp, %r12
movq %r12, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x41b0
movslq (%r14), %rax
movq -0x8(%r15,%rax,8), %rdi
movq %r12, %rsi
callq 0x4270
movslq (%r14), %rax
movl %ebp, -0x4(%rbx,%rax,4)
addq $0x7a120, %rsp          # imm = 0x7A120
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/model.c
// Function: hmm_add_candidate_model
void hmm_add_candidate_model(char** filenames, char* directory, int index, Hmm_modelptr models, int* models_searched, int* filecount)
{
 /*!Last Changed 02.06.2004*/
 char filename[READLINELENGTH];
 (*filecount)++;
 models[index].tried = BOOLEAN_TRUE;
 models_searched[(*filecount) - 1] = index;
 sprintf(filename,"%s/%dM%dS.txt", directory, models[index].mixture, models[index].states);
 strcpy(filenames[(*filecount) - 1], filename); 
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x7a120, %rsp          # imm = 0x7A120
movq %r9, %rbx
movq %rsi, %rax
incl (%r9)
movq %rdi, %r14
movslq %edx, %rdx
imulq $0x14, %rdx, %rsi
movl $0x1, 0x10(%rcx,%rsi)
movslq (%r9), %rdi
movl %edx, -0x4(%r8,%rdi,4)
movl (%rcx,%rsi), %r8d
movl 0x4(%rcx,%rsi), %ecx
leaq 0x585d5(%rip), %rsi     # 0x9a3a4
movq %rsp, %r15
movq %r15, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x41b0
movslq (%rbx), %rax
movq -0x8(%r14,%rax,8), %rdi
movq %r15, %rsi
callq 0x4270
addq $0x7a120, %rsp          # imm = 0x7A120
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/model.c
// Function: compare_two_hmm_models
int compare_two_hmm_models(char** two_file, char* simulationdirectory, Hmm_model model1, Hmm_model model2)
{
 /*!Last Changed 10.01.2009*/
 int dummy;
 double confidence = 1 - get_parameter_f("confidencelevel"), conf;
 if (model1.index < model2.index)
  {
   sprintf(two_file[0], "%s/%dM%dS.txt", simulationdirectory, model1.mixture, model1.states);
   sprintf(two_file[1], "%s/%dM%dS.txt", simulationdirectory, model2.mixture, model2.states);
  }
 else
  {
   sprintf(two_file[0], "%s/%dM%dS.txt", simulationdirectory, model2.mixture, model2.states);
   sprintf(two_file[1], "%s/%dM%dS.txt", simulationdirectory, model1.mixture, model1.states);
  }
 return compare_two_files_using_test(get_parameter_l("testtype"), two_file, &dummy, confidence, &conf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x52f1b(%rip), %rdi     # 0x95928
callq 0x4cdcf
movsd %xmm0, (%rsp)
leaq 0x40(%rsp), %r12
movl 0x8(%r12), %eax
leaq 0x58(%rsp), %rcx
cmpl 0x8(%rcx), %eax
movq (%rbx), %rdi
movq %rcx, %rax
cmovlq %r12, %rax
cmovlq %rcx, %r12
movl (%rax), %r8d
movl 0x4(%rax), %ecx
leaq 0x57960(%rip), %r15     # 0x9a3a4
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x41b0
movq 0x8(%rbx), %rdi
movl (%r12), %r8d
movl 0x4(%r12), %ecx
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x41b0
movsd 0x52aad(%rip), %xmm0    # 0x95520
subsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
leaq 0x5794d(%rip), %rdi     # 0x9a3d1
callq 0x4cf11
leaq 0xc(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movl %eax, %edi
movq %rbx, %rsi
movsd (%rsp), %xmm0
callq 0x80505
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq