LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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
movslq (%r8), %rax
xorl %ecx, %ecx
testq %rax, %rax
jle 0x48b09
cmpl %ebp, (%rbx,%rcx,4)
je 0x48b09
incq %rcx
cmpq %rcx, %rax
jne 0x48afa
jmp 0x48b0d
cmpl %eax, %ecx
jne 0x48b3f
incl %eax
movl %eax, (%r14)
leaq 0x61a16(%rip), %rsi     # 0xaa52f
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_O3/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
leaq (%rdx,%rdx,4), %rsi
movl $0x1, 0x10(%rcx,%rsi,4)
movslq (%r9), %rdi
movl %edx, -0x4(%r8,%rdi,4)
movl (%rcx,%rsi,4), %r8d
movl 0x4(%rcx,%rsi,4), %ecx
leaq 0x618e7(%rip), %rsi     # 0xaa474
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_O3/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 0x5c0e7(%rip), %rdi     # 0xa5928
callq 0x549ba
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 0x60bfc(%rip), %r15     # 0xaa474
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 0x5bc79(%rip), %xmm0    # 0xa5520
subsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
leaq 0x60be9(%rip), %rdi     # 0xaa4a1
callq 0x54afc
leaq 0xc(%rsp), %rdx
leaq 0x10(%rsp), %rcx
movl %eax, %edi
movq %rbx, %rsi
movsd (%rsp), %xmm0
callq 0x8dee7
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/model.c
// Function: compare_two_mlp_models
int compare_two_mlp_models(char** two_file, char* simulationdirectory, Datasetptr d, int model1, int model2)
{
	/*!Last Changed 17.07.2005*/
	int min, max, dummy;
	double confidence = 1 - get_parameter_f("confidencelevel"), conf;
	min = imin(model1, model2);
	max = model1 + model2 - min;
	sprintf(two_file[0], "%s/%s-%d.txt", simulationdirectory, d->name, min);
	sprintf(two_file[1], "%s/%s-%d.txt", simulationdirectory, d->name, max);
 return compare_two_files_using_test(get_parameter_l("testtype"), two_file, &dummy, confidence, &conf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movl %r8d, %ebp
movl %ecx, %r12d
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x5bdfa(%rip), %rdi     # 0xa5928
callq 0x549ba
movsd 0x5b9e5(%rip), %xmm1    # 0xa5520
subsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movl %r12d, %edi
movl %ebp, %esi
callq 0x39b49
addl %r12d, %ebp
subl %eax, %ebp
movq (%rbx), %rdi
movq 0x8(%r15), %rcx
leaq 0x609ca(%rip), %r12     # 0xaa52c
movq %r12, %rsi
movq %r14, %rdx
movl %eax, %r8d
xorl %eax, %eax
callq 0x41b0
movq 0x8(%rbx), %rdi
movq 0x8(%r15), %rcx
movq %r12, %rsi
movq %r14, %rdx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x41b0
leaq 0x60910(%rip), %rdi     # 0xaa4a1
callq 0x54afc
leaq 0x14(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movl %eax, %edi
movq %rbx, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x8dee7
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/model.c
// Function: hmm_model_simulation_one_forward
Hmm_model hmm_model_simulation_one_forward(char* simulationdirectory, int maxstates, int* tries)
{
 /*!Last Changed 10.01.2009*/
 char **two_file;
 int i;
 Hmm_model bestmodel;
 Hmm_modelptr models;
 models = safemalloc(sizeof(Hmm_model) * maxstates, "hmm_model_simulation_one_forward", 4);
 for (i = 0; i < maxstates; i++)
  {
   models[i].states = i + 1;
   models[i].mixture = 1;
   models[i].index = i;
  }
 bestmodel = models[0];
 two_file = (char**) safemalloc_2d(sizeof(char *), sizeof(char), 2, 500, "hmm_model_simulation_one_forward", 12);
 *tries = 1;
 while (bestmodel.index < maxstates)
  {
   (*tries)++;
   if (compare_two_hmm_models(two_file, simulationdirectory, bestmodel, models[bestmodel.index + 1]) == 0)
     break;
   bestmodel = models[bestmodel.index + 1];
  }
 free_2d((void**)two_file, 2);
 safe_free(models);
 return bestmodel;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, 0x38(%rsp)
movq %rdi, %rbx
movslq %edx, %r15
leaq (,%r15,4), %rax
leaq (%rax,%rax,4), %rdi
leaq 0x6094b(%rip), %rsi     # 0xaa539
movl $0x4, %edx
callq 0x3a0e1
testl %r15d, %r15d
jle 0x49c21
movl %ebp, %edi
leaq 0x8(%rax), %rcx
xorl %edx, %edx
leaq 0x1(%rdx), %rsi
movl %esi, -0x8(%rcx)
movl $0x1, -0x4(%rcx)
movl %edx, (%rcx)
addq $0x14, %rcx
movq %rsi, %rdx
cmpq %rsi, %rdi
jne 0x49c05
movl 0x10(%rax), %ecx
movl %ecx, 0x10(%rbx)
movq %rax, 0x30(%rsp)
movups (%rax), %xmm0
movups %xmm0, (%rbx)
leaq 0x60900(%rip), %r8      # 0xaa539
movl $0x8, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x1f4, %ecx            # imm = 0x1F4
movl $0xc, %r9d
callq 0x3a3ac
movq %rax, %r13
movl $0x1, (%r14)
movl 0x8(%rbx), %eax
cmpl %ebp, %eax
jge 0x49ce8
movq 0x30(%rsp), %r12
addq $0x14, %r12
incl (%r14)
cltq
leaq (%rax,%rax,4), %r15
movl 0x10(%rbx), %eax
movl %eax, 0x70(%rsp)
movups (%rbx), %xmm0
movaps %xmm0, 0x60(%rsp)
movl 0x10(%r12,%r15,4), %eax
movl %eax, 0x50(%rsp)
movups (%r12,%r15,4), %xmm0
movaps %xmm0, 0x40(%rsp)
movl 0x50(%rsp), %eax
movl %eax, 0x28(%rsp)
movaps 0x40(%rsp), %xmm0
movups %xmm0, 0x18(%rsp)
movl 0x70(%rsp), %eax
movl %eax, 0x10(%rsp)
movaps 0x60(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r13, %rdi
movq 0x38(%rsp), %rsi
callq 0x49829
testl %eax, %eax
je 0x49ce8
leaq (%r12,%r15,4), %rax
movups (%rax), %xmm0
movups %xmm0, (%rbx)
movl 0x10(%rax), %eax
movl %eax, 0x10(%rbx)
movl 0x8(%rbx), %eax
cmpl %ebp, %eax
jl 0x49c72
movq %r13, %rdi
movl $0x2, %esi
callq 0x3a14b
movq 0x30(%rsp), %rdi
callq 0x3a180
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/model.c
// Function: mlp_model_simulation_one_forward
int mlp_model_simulation_one_forward(Datasetptr d, char* simulationdirectory, int maxhidden, int starthidden, int* tries)
{
 /*!Last Changed 26.05.2006 added starthidden*/
	/*!Last Changed 16.07.2005*/
	char **two_file;
	int bestmodel;
 if (starthidden < 0 || starthidden > maxhidden)
   bestmodel = 0;
 else
   bestmodel = starthidden;
 two_file = (char**) safemalloc_2d(sizeof(char *), sizeof(char), 2, 500, "mlp_model_simulation_forward", 4);
	*tries = 1;
	while (bestmodel < maxhidden)
	 {
			(*tries)++;
			if (compare_two_mlp_models(two_file, simulationdirectory, d, bestmodel, bestmodel + 1) == 0)
				 break;
			bestmodel++;
	 }
	free_2d((void**)two_file, 2);
	return bestmodel;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movl %edx, %r15d
movq %rsi, (%rsp)
xorl %eax, %eax
testl %ecx, %ecx
movl $0x0, %ebp
cmovgl %ecx, %ebp
movq %rdi, %r12
cmpl %edx, %ecx
cmovgl %eax, %ebp
leaq 0x60819(%rip), %r8      # 0xaa55a
movl $0x8, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x1f4, %ecx            # imm = 0x1F4
movl $0x4, %r9d
callq 0x3a3ac
movq %rax, %r13
movl $0x1, (%r14)
cmpl %r15d, %ebp
cmovgl %ebp, %r15d
cmpl %ebp, %r15d
je 0x49d9b
incl (%r14)
leal 0x1(%rbp), %ebx
movq %r13, %rdi
movq (%rsp), %rsi
movq %r12, %rdx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x49b0c
movl %ebx, %ebp
testl %eax, %eax
jne 0x49d71
decl %ebx
movl %ebx, %r15d
movq %r13, %rdi
movl $0x2, %esi
callq 0x3a14b
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/model.c
// Function: hmm_model_simulation_one_backward
Hmm_model hmm_model_simulation_one_backward(char* simulationdirectory, int maxstates, int* tries)
{
 /*!Last Changed 10.01.2009*/
 char **two_file;
 int i;
 Hmm_model bestmodel;
 Hmm_modelptr models;
 models = safemalloc(sizeof(Hmm_model) * maxstates, "hmm_model_simulation_one_backward", 4);
 for (i = 0; i < maxstates; i++)
  {
   models[i].states = i + 1;
   models[i].mixture = 1;
   models[i].index = i;
  }
 bestmodel = models[maxstates - 1];
 two_file = (char**) safemalloc_2d(sizeof(char *), sizeof(char), 2, 500, "hmm_model_simulation_one_backward", 12);
 *tries = 1;
 while (bestmodel.index > 0)
  {
   (*tries)++;
   if (compare_two_hmm_models(two_file, simulationdirectory, bestmodel, models[bestmodel.index - 1]) == 0)
     break;
   bestmodel = models[bestmodel.index - 1];
  }
 safe_free(models);
 free_2d((void**)two_file, 2);
 return bestmodel;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movslq %edx, %r13
leaq (,%r13,4), %rax
leaq (%rax,%rax,4), %rdi
leaq 0x6078e(%rip), %rsi     # 0xaa577
movl $0x4, %edx
callq 0x3a0e1
testl %r13d, %r13d
jle 0x49e1c
movl %ebp, %edi
leaq 0x8(%rax), %rcx
xorl %edx, %edx
leaq 0x1(%rdx), %rsi
movl %esi, -0x8(%rcx)
movl $0x1, -0x4(%rcx)
movl %edx, (%rcx)
addq $0x14, %rcx
movq %rsi, %rdx
cmpq %rsi, %rdi
jne 0x49e00
leaq (,%r13,4), %rdx
addq %r13, %rdx
movl -0x4(%rax,%rdx,4), %ecx
movl %ecx, 0x10(%rbx)
movq %rax, 0x38(%rsp)
movups -0x14(%rax,%rdx,4), %xmm0
movups %xmm0, (%rbx)
leaq 0x60735(%rip), %r8      # 0xaa577
movl $0x8, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x1f4, %ecx            # imm = 0x1F4
movl $0xc, %r9d
callq 0x3a3ac
movq %rax, %r13
movl $0x1, (%r14)
movl 0x8(%rbx), %eax
testl %eax, %eax
jle 0x49efb
movq 0x38(%rsp), %rbp
addq $-0x14, %rbp
incl (%r14)
movl %eax, %eax
leaq (%rax,%rax,4), %r12
movl 0x10(%rbx), %eax
movl %eax, 0x70(%rsp)
movups (%rbx), %xmm0
movaps %xmm0, 0x60(%rsp)
movl 0x10(%rbp,%r12,4), %eax
movl %eax, 0x50(%rsp)
movups (%rbp,%r12,4), %xmm0
movaps %xmm0, 0x40(%rsp)
movl 0x50(%rsp), %eax
movl %eax, 0x28(%rsp)
movaps 0x40(%rsp), %xmm0
movups %xmm0, 0x18(%rsp)
movl 0x70(%rsp), %eax
movl %eax, 0x10(%rsp)
movaps 0x60(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r13, %rdi
movq %r15, %rsi
callq 0x49829
testl %eax, %eax
je 0x49efb
leaq (,%r12,4), %rax
addq %rbp, %rax
movups (%rax), %xmm0
movups %xmm0, (%rbx)
movl 0x10(%rax), %eax
movl %eax, 0x10(%rbx)
movl 0x8(%rbx), %eax
testl %eax, %eax
jg 0x49e7f
movq 0x38(%rsp), %rdi
callq 0x3a180
movq %r13, %rdi
movl $0x2, %esi
callq 0x3a14b
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/model.c
// Function: mlp_model_simulation_one_backward
int mlp_model_simulation_one_backward(Datasetptr d, char* simulationdirectory, int maxhidden, int starthidden, int* tries)
{
 /*!Last Changed 26.05.2006 added starthidden*/
	/*!Last Changed 16.07.2005*/
	char **two_file;
	int bestmodel;
 if (starthidden < 0 || starthidden > maxhidden)
   bestmodel = maxhidden;
 else
   bestmodel = starthidden;
 two_file = (char**) safemalloc_2d(sizeof(char *), sizeof(char), 2, 500, "mlp_model_simulation_backward", 4);
	*tries = 1;
	while (bestmodel > 0)
	 {
			(*tries)++;
			if (compare_two_mlp_models(two_file, simulationdirectory, d, bestmodel - 1, bestmodel) == 1)
				 break;
			bestmodel--;
	 }
	free_2d((void**)two_file, 2);
	return bestmodel;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rsi, %r14
cmpl %edx, %ecx
movl %edx, %ebp
cmovll %ecx, %ebp
movq %rdi, %r15
testl %ecx, %ecx
cmovsl %edx, %ebp
leaq 0x6064e(%rip), %r8      # 0xaa599
movl $0x8, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x1f4, %ecx            # imm = 0x1F4
movl $0x4, %r9d
callq 0x3a3ac
movq %rax, %r12
movl $0x1, (%rbx)
movl %ebp, %r13d
testl %ebp, %ebp
jle 0x49f98
incl (%rbx)
leal -0x1(%r13), %ebp
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
movl %r13d, %r8d
callq 0x49b0c
cmpl $0x1, %eax
jne 0x49f73
movq %r12, %rdi
movl $0x2, %esi
callq 0x3a14b
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/model.c
// Function: hmm_model_simulation
Hmm_model hmm_model_simulation(MOST_SEARCH_TYPE simulation_algorithm, char* simulationdirectory, int maxstates, int maxmixture, int* tries)
{
 /*!Last Changed 10.01.2009*/
 switch (simulation_algorithm)
  {
   case MULTIMOST    :return hmm_model_simulation_multitest(simulationdirectory, maxstates, maxmixture, tries);
                      break;
   case ONE_FORWARD  :return hmm_model_simulation_one_forward(simulationdirectory, maxstates, tries);
                      break;
   case ONE_BACKWARD :return hmm_model_simulation_one_backward(simulationdirectory, maxstates, tries);
                      break;
   case FORWARD_MOST :return hmm_model_simulation_most(simulationdirectory, maxstates, maxmixture, tries, FORWARD);
                      break;
   case BACKWARD_MOST:return hmm_model_simulation_most(simulationdirectory, maxstates, maxmixture, tries, BACKWARD);
                      break;
   default           :printf(m1242, simulation_algorithm);
                      return hmm_model_simulation_multitest(simulationdirectory, maxstates, maxmixture, tries);
                      break;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r9, %r14
movl %r8d, %r15d
movl %ecx, %ebp
movq %rdx, %r12
movq %rdi, %rbx
cmpl $0x4, %esi
ja 0x4a036
movl %esi, %eax
leaq 0x603f5(%rip), %rcx     # 0xaa3d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %r14, %rcx
callq 0x49bbd
jmp 0x4a057
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
movl %r15d, %ecx
movq %r14, %r8
movl $0x1, %r9d
jmp 0x4a02f
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
movq %r14, %rcx
callq 0x49dba
jmp 0x4a057
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
movl %r15d, %ecx
movq %r14, %r8
xorl %r9d, %r9d
callq 0x4951c
jmp 0x4a057
leaq 0x6057a(%rip), %rdi     # 0xaa5b7
xorl %eax, %eax
callq 0x4030
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
movl %r15d, %ecx
movq %r14, %r8
callq 0x48bba
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/model.c
// Function: mlp_model_simulation
int mlp_model_simulation(MOST_SEARCH_TYPE simulation_algorithm, char* datasetname, char* simulationdirectory, int maxhidden, int starthidden, int* tries)
{
	/*!Last Changed 16.07.2005*/
	Datasetptr d;
 d = search_dataset(Datasets, datasetname);
	if (d == NULL)
		 return 0;
	switch (simulation_algorithm)
	 {
	  case MULTIMOST    :return mlp_model_simulation_multitest(d, simulationdirectory, maxhidden, starthidden, tries);
				                  break;
			case ONE_FORWARD  :return mlp_model_simulation_one_forward(d, simulationdirectory, maxhidden, starthidden, tries);
				                  break;
			case ONE_BACKWARD :return mlp_model_simulation_one_backward(d, simulationdirectory, maxhidden, starthidden, tries);
				                  break;
			case FORWARD_MOST :return mlp_model_simulation_most(d, simulationdirectory, maxhidden, starthidden, tries, FORWARD);
				                  break;
			case BACKWARD_MOST:return mlp_model_simulation_most(d, simulationdirectory, maxhidden, starthidden, tries, BACKWARD);
				                  break;
   default           :printf(m1242, simulation_algorithm);
                      break;
	 }
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r9, %rbx
movl %r8d, %ebp
movl %ecx, %r14d
movq %rdx, %r15
movl %edi, %r12d
leaq 0x8b7f7(%rip), %rax     # 0xd5878
movq (%rax), %rdi
callq 0x14fb7
testq %rax, %rax
je 0x4a145
cmpl $0x4, %r12d
ja 0x4a134
movl %r12d, %ecx
leaq 0x6033e(%rip), %rdx     # 0xaa3e4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq %rax, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %ebp, %ecx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x48eb1
movq %rax, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %ebp, %ecx
movq %rbx, %r8
movl $0x1, %r9d
jmp 0x4a10c
movq %rax, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %ebp, %ecx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x49f24
movq %rax, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %ebp, %ecx
movq %rbx, %r8
xorl %r9d, %r9d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x498e2
movq %rax, %rdi
movq %r15, %rsi
movl %r14d, %edx
movl %ebp, %ecx
movq %rbx, %r8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x49d11
leaq 0x6047c(%rip), %rdi     # 0xaa5b7
movl %r12d, %esi
xorl %eax, %eax
callq 0x4030
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: multiplicative_term_value
double multiplicative_term_value(Mtermptr term, double* featurevalues)
{
	/*!Last Changed 11.04.2005*/
	double value;
	switch (term->functiontype)
	 {
	  case FUNC_CONSTANT:return term->value;
				                  break;
			case FUNC_POWER   :value = featurevalues[term->featureindex - 1];
				                  if (term->power == 1)
											             return value; 
				                  else
											             return fpow(value, term->power);
										            break;
			case FUNC_SINUS   :
			case FUNC_COSINUS :value = additive_term_value(term->interm, featurevalues);
				                  if (term->functiontype == FUNC_SINUS)
											             value = sin(value);
										            else
											             value = cos(value);
										            if (term->power == 1)
											             return value;
										            else
											             return fpow(value, term->power);
										            break;
   default           :printf(m1235, term->functiontype);
                      break;
	 }
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl 0x4(%rdi), %esi
leal -0x2(%rsi), %eax
cmpl $0x2, %eax
jb 0x4aaf8
cmpl $0x1, %esi
je 0x4ab4c
testl %esi, %esi
jne 0x4ab75
movsd 0x10(%rbx), %xmm0
jmp 0x4ab8b
movq 0x18(%rbx), %r12
movq 0x8(%r12), %r15
movsd 0x5aa17(%rip), %xmm1    # 0xa5520
testq %r15, %r15
je 0x4ab33
movsd %xmm1, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x4aac8
movsd (%rsp), %xmm1
mulsd %xmm0, %xmm1
movq 0x20(%r15), %r15
testq %r15, %r15
jne 0x4ab0e
movl 0x4(%rbx), %esi
xorps %xmm0, %xmm0
cvtsi2sdl (%r12), %xmm0
mulsd %xmm1, %xmm0
cmpl $0x2, %esi
jne 0x4ab59
callq 0x4320
jmp 0x4ab5e
movslq 0x8(%rbx), %rax
movsd -0x8(%r14,%rax,8), %xmm0
jmp 0x4ab5e
callq 0x4110
movl (%rbx), %edi
cmpl $0x1, %edi
je 0x4ab8b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x39b12
leaq 0x5fae4(%rip), %rdi     # 0xaa660
xorl %eax, %eax
callq 0x4030
movsd 0x5a995(%rip), %xmm0    # 0xa5520
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: additive_term_value
double additive_term_value(Atermptr term, double* featurevalues)
{
	/*!Last Changed 11.04.2005*/
	Mtermptr tmp;
	double value = 1;
	tmp = term->start;
	while (tmp)
	 {
		 value *= multiplicative_term_value(tmp, featurevalues);
		 tmp = tmp->next;
	 }
	return value * term->sign;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %r15
testq %r15, %r15
je 0x4abdd
movq %rsi, %r14
movsd 0x5a969(%rip), %xmm1    # 0xa5520
movsd %xmm1, 0x8(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x4aac8
movsd 0x8(%rsp), %xmm1
mulsd %xmm0, %xmm1
movq 0x20(%r15), %r15
testq %r15, %r15
jne 0x4abb7
jmp 0x4abe5
movsd 0x5a93b(%rip), %xmm1    # 0xa5520
xorps %xmm0, %xmm0
cvtsi2sdl (%rbx), %xmm0
mulsd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: single_model_value
double single_model_value(Singlemodel m, double* featurevalues)
{
	/*!Last Changed 11.04.2005*/
	Atermptr tmp;
	double value = 0, noise;
	tmp = m.start;
	while (tmp)
	 {
		 value += additive_term_value(tmp, featurevalues);
		 tmp = tmp->next;
	 }
	noise = produce_normal_value(0, m.noiselevel);
	return value + noise;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x30(%rsp), %r15
movq (%r15), %r14
testq %r14, %r14
je 0x4ac43
movq %rdi, %rbx
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4ab97
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x4ac1d
jmp 0x4ac4d
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%r15), %xmm1
xorpd %xmm0, %xmm0
callq 0x8f4b0
addsd 0x8(%rsp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: extract_multiplicative_terms
char** extract_multiplicative_terms(char* st, int* count)
{
	/*!Last Changed 10.04.2005*/
	int i, len = strlen(st), parcount = 0;
	char** result = NULL;
	char tempst[READLINELENGTH];
	*count = 0;
	strcpy(tempst, "");
	for (i = 0; i < len; i++)
		 switch (st[i])
	   {
		   case 'x':
					case 'c':
					case 's':if (parcount == 0 && i != 0)															 
														 {
						          (*count)++;
		              result = alloc(result, *count * sizeof(char*), *count);
										     	result[*count - 1] = strcopy(result[*count - 1], tempst);
																sprintf(tempst, "%c", st[i]);
														 }
						        else
															 sprintf(tempst, "%s%c", tempst, st[i]);
														break;
					case '(':parcount++;
              sprintf(tempst, "%s%c", tempst, st[i]);
						        break;
					case ')':parcount--;
						        sprintf(tempst, "%s%c", tempst, st[i]);
						        break;
					default :sprintf(tempst, "%s%c", tempst, st[i]);
		 				       break;
    }
	(*count)++;
	result = alloc(result, *count * sizeof(char*), *count);
	result[*count - 1] = strcopy(result[*count - 1], tempst);
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a128, %rsp          # imm = 0x7A128
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4190
movq %rax, %r15
movl $0x0, (%rbx)
movb $0x0, (%rsp)
testl %r15d, %r15d
jle 0x4ad7a
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
xorl %r12d, %r12d
xorl %ebp, %ebp
movzbl (%r14,%r13), %ecx
cmpl $0x62, %ecx
jle 0x4ad1b
cmpl $0x63, %ecx
je 0x4acca
cmpl $0x78, %ecx
je 0x4acca
cmpl $0x73, %ecx
jne 0x4ad51
testq %r13, %r13
je 0x4ad54
testl %ebp, %ebp
jne 0x4ad54
movslq (%rbx), %rax
leaq 0x1(%rax), %rdx
movl %edx, (%rbx)
leaq 0x8(,%rax,8), %rsi
movq %r12, %rdi
callq 0x3a0b4
movq %rax, %r12
movslq (%rbx), %rax
movq -0x8(%r12,%rax,8), %rdi
movq %rsp, %rsi
callq 0x3b494
movslq (%rbx), %rcx
movq %rax, -0x8(%r12,%rcx,8)
movb (%r14,%r13), %al
movb %al, (%rsp)
movb $0x0, 0x1(%rsp)
xorl %ebp, %ebp
jmp 0x4ad68
cmpl $0x28, %ecx
je 0x4ad3b
cmpl $0x29, %ecx
jne 0x4ad51
decl %ebp
movq %rsp, %rdi
leaq 0x5b8df(%rip), %rsi     # 0xa6610
movq %rdi, %rdx
movl $0x29, %ecx
jmp 0x4ad61
incl %ebp
movq %rsp, %rdi
leaq 0x5b8c9(%rip), %rsi     # 0xa6610
movq %rdi, %rdx
movl $0x28, %ecx
jmp 0x4ad61
movsbl %cl, %ecx
movq %rsp, %rdi
leaq 0x5b8b2(%rip), %rsi     # 0xa6610
movq %rdi, %rdx
xorl %eax, %eax
callq 0x41b0
incq %r13
cmpq %r13, %r15
jne 0x4acad
movl (%rbx), %eax
incl %eax
jmp 0x4ad82
movl $0x1, %eax
xorl %r12d, %r12d
movl %eax, (%rbx)
movslq %eax, %rdx
leaq (,%rdx,8), %rsi
movq %r12, %rdi
callq 0x3a0b4
movq %rax, %r14
movslq (%rbx), %rax
movq -0x8(%r14,%rax,8), %rdi
movq %rsp, %rsi
callq 0x3b494
movslq (%rbx), %rcx
movq %rax, -0x8(%r14,%rcx,8)
movq %r14, %rax
addq $0x7a128, %rsp          # imm = 0x7A128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: index_and_power_from_string
int index_and_power_from_string(char* st, int* power)
{
	/*!Last Changed 10.04.2005*/
	int i, len = strlen(st), pos = 0, index;
	char tmp[READLINELENGTH];
	strcpy(tmp, "");
	for (i = 1; i < len; i++)
		 if (st[i] == '^')
			 {
				 pos = 1;
     index = atoi(tmp);
	    strcpy(tmp, ""); 
			 }
			else
					sprintf(tmp, "%s%c", tmp, st[i]);
	if (pos == 0)
	 {
		 index = atoi(tmp);
			*power = 1;
	 }
	else
		 *power = atoi(tmp);
	return index;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a138, %rsp          # imm = 0x7A138
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
callq 0x4190
movq %rax, %r15
movb $0x0, 0x10(%rsp)
cmpl $0x2, %r15d
jl 0x4b00f
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
negq %r15
movb $0x1, %al
movl $0x1, %ebx
leaq 0x10(%rsp), %r12
leaq 0x5b65c(%rip), %r13     # 0xa6610
movl %eax, (%rsp)
incq %rbx
movsbl -0x1(%r14,%rbx), %ecx
cmpl $0x5e, %ecx
je 0x4afe7
movq %r12, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x41b0
leaq (%r15,%rbx), %rax
incq %rax
incq %rbx
cmpq $0x1, %rax
jne 0x4afba
jmp 0x4b009
leaq (%r15,%rbx), %rax
movq %rax, (%rsp)
movq %r12, %rdi
callq 0x4200
movl %eax, %ebp
xorl %eax, %eax
movb $0x0, 0x10(%rsp)
cmpq $0x0, (%rsp)
jne 0x4afb4
jmp 0x4b022
testb $0x1, (%rsp)
je 0x4b022
leaq 0x10(%rsp), %rdi
callq 0x4200
movl %eax, %ebp
movl $0x1, %eax
jmp 0x4b02c
leaq 0x10(%rsp), %rdi
callq 0x4200
movq 0x8(%rsp), %rcx
movl %eax, (%rcx)
movl %ebp, %eax
addq $0x7a138, %rsp          # imm = 0x7A138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: interm_and_power_from_string
char* interm_and_power_from_string(char* st, int* power)
{
	/*!Last Changed 10.04.2005*/
	char* result = NULL, tmp[READLINELENGTH];
	int i, len = strlen(st);
	strcpy(tmp, "");
	for (i = 0; i < len; i++)
		 if (st[i] == '(')
			 {
				 if (strlen(tmp) != 0)
  				 *power = atoi(tmp);
					else
					  *power = 1;
    	strcpy(tmp, "");
			 }
			else
			  if (st[i] != ')')
						 sprintf(tmp, "%s%c", tmp, st[i]);
	result = strcopy(result, tmp);
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a128, %rsp          # imm = 0x7A128
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4190
movq %rax, %r15
movb $0x0, (%rsp)
testl %r15d, %r15d
jle 0x4b0c9
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
movq %rsp, %r12
leaq 0x5b590(%rip), %r13     # 0xa6610
xorl %ebp, %ebp
movzbl (%r14,%rbp), %eax
cmpl $0x29, %eax
je 0x4b0c1
cmpl $0x28, %eax
jne 0x4b0a1
cmpb $0x0, (%rsp)
je 0x4b0b6
movq %r12, %rdi
callq 0x4200
jmp 0x4b0bb
movsbl %al, %ecx
movq %r12, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x41b0
jmp 0x4b0c1
movl $0x1, %eax
movl %eax, (%rbx)
movb $0x0, (%rsp)
incq %rbp
cmpq %rbp, %r15
jne 0x4b082
movq %rsp, %rsi
xorl %edi, %edi
callq 0x3b494
addq $0x7a128, %rsp          # imm = 0x7A128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: read_multiplicative_term_from_string
Mtermptr read_multiplicative_term_from_string(char* st)
{
	/*!Last Changed 10.04.2005*/
	Mtermptr result;
	char* termst;
	result = safemalloc(sizeof(Mterm), "read_multiplicative_term_from_string", 3);
	result->next = NULL;
	switch (st[0])
	 {
	  case 'x':result->functiontype = FUNC_POWER;
				        result->featureindex = index_and_power_from_string(&(st[1]), &(result->power));
												result->interm = NULL;
				        break;
			case 's':
			case 'c':if (st[0] == 's')
  				        result->functiontype = FUNC_SINUS;
				        else 
													 result->functiontype = FUNC_COSINUS;
												termst = interm_and_power_from_string(&(st[1]), &(result->power)); 
												result->interm = read_additive_term_from_string(termst);
												safe_free(termst);
				        break;
			default :result->functiontype = FUNC_CONSTANT;
				        result->value = atof(st);
												result->interm = NULL;
				        break;
	 }
	return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x5f599(%rip), %rsi     # 0xaa68c
movl $0x3, %ebp
movl $0x28, %edi
movl $0x3, %edx
callq 0x3a0e1
movq %rax, %rbx
movq $0x0, 0x20(%rax)
movzbl (%r14), %eax
cmpl $0x63, %eax
je 0x4b144
cmpl $0x73, %eax
je 0x4b13f
cmpl $0x78, %eax
jne 0x4b16e
movl $0x1, 0x4(%rbx)
incq %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4af6b
movl %eax, 0x8(%rbx)
jmp 0x4b182
movl $0x2, %ebp
movl %ebp, 0x4(%rbx)
incq %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4b047
movq %rax, %r14
movq %rax, %rdi
callq 0x4b192
movq %rax, 0x18(%rbx)
movq %r14, %rdi
callq 0x3a180
jmp 0x4b18a
movl $0x0, 0x4(%rbx)
movq %r14, %rdi
callq 0x4130
movsd %xmm0, 0x10(%rbx)
movq $0x0, 0x18(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: read_additive_term_from_string
Atermptr read_additive_term_from_string(char* st)
{
	/*!Last Changed 10.04.2005*/
	Atermptr result;
	Mtermptr tmp, before;
	char** terms;
	int mulcount, i;
	result = safemalloc(sizeof(Aterm), "read_additive_term_from_string", 5);
	result->next = NULL;
	if (st[0] == '-')
		 result->sign = -1;
 else
		 result->sign = 1;
	if (st[0] == '+' || st[0] == '-')
	  terms = extract_multiplicative_terms(&(st[1]), &mulcount);
	else
   terms = extract_multiplicative_terms(st, &mulcount);
 result->start = read_multiplicative_term_from_string(terms[0]);
	before = result->start;
	for (i = 1; i < mulcount; i++)
	 {
		 tmp = read_multiplicative_term_from_string(terms[i]);
			before->next = tmp;
			before = tmp;
	 }
	free_2d((void**)terms, mulcount);
	return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq 0x5f508(%rip), %rsi     # 0xaa6b1
movl $0x18, %edi
movl $0x5, %edx
callq 0x3a0e1
movq %rax, %rbx
movq $0x0, 0x10(%rax)
xorl %eax, %eax
cmpb $0x2d, (%r14)
setne %al
leal -0x1(,%rax,2), %eax
movl %eax, (%rbx)
movzbl (%r14), %eax
cmpl $0x2d, %eax
je 0x4b1e3
cmpl $0x2b, %eax
jne 0x4b1e6
incq %r14
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x4ac6c
movq %rax, %r14
movq (%rax), %rdi
callq 0x4b0e5
movq %rax, 0x8(%rbx)
movslq (%r15), %r15
cmpq $0x2, %r15
jl 0x4b230
movq %rax, %r12
movl $0x1, %r13d
movq (%r14,%r13,8), %rdi
callq 0x4b0e5
movq %rax, 0x20(%r12)
incq %r13
movq %rax, %r12
cmpq %r13, %r15
jne 0x4b217
movq %r14, %rdi
movl %r15d, %esi
callq 0x3a14b
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: read_single_model_from_string
void read_single_model_from_string(Singlemodelptr s, char* modelst)
{
	/*!Last Changed 10.04.2005*/
	int addcount, i;
	char** terms;
	Atermptr tmp, before;
 terms = extract_additive_terms(modelst, &addcount);
	s->start = read_additive_term_from_string(terms[0]);
	before = s->start;
 for (i = 1; i < addcount; i++)
	 {
		 tmp = read_additive_term_from_string(terms[i]);
			before->next = tmp;
			before = tmp;
	 }
	free_2d((void**)terms, addcount);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq 0x4(%rsp), %r12
movq %rsi, %rdi
movq %r12, %rsi
callq 0x4adc7
movq %rax, %rbx
movq (%rax), %rdi
callq 0x4b192
movq %rax, (%r14)
movslq (%r12), %r14
cmpq $0x2, %r14
jl 0x4b2a0
movq %rax, %r15
movl $0x1, %r12d
movq (%rbx,%r12,8), %rdi
callq 0x4b192
movq %rax, 0x10(%r15)
incq %r12
movq %rax, %r15
cmpq %r12, %r14
jne 0x4b288
movq %rbx, %rdi
movl %r14d, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3a14b
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: read_multiple_model_from_file
Multiplemodelptr read_multiple_model_from_file(char* modelfile)
{
	/*!Last Changed 10.04.2005*/
	FILE* infile;
	int i;
	char modelst[READLINELENGTH];
	Multiplemodelptr result;
 infile = fopen(modelfile, "r");
	if (!infile)
		 return NULL;
	result = safemalloc(sizeof(Multiplemodel), "read_multiple_model_from_file", 8);
	fscanf(infile, "%d", &(result->featurecount));
	result->min = safemalloc(result->featurecount * sizeof(double), "read_multiple_model_from_file", 10);
	result->max = safemalloc(result->featurecount * sizeof(double), "read_multiple_model_from_file", 11);
	for (i = 0; i < result->featurecount; i++)
		 fscanf(infile, "%lf%lf", &(result->min[i]), &(result->max[i]));
	fscanf(infile, "%d", &(result->modelcount));
	result->models = safemalloc(result->modelcount * sizeof(Singlemodel), "read_multiple_model_from_file", 15);
	for (i = 0; i < result->modelcount; i++)
	 {
		 fscanf(infile, "%d%lf", &(result->models[i].datacount), &(result->models[i].noiselevel));
			fscanf(infile, "%s", modelst);
   read_single_model_from_string(&(result->models[i]), modelst);
	 }
	fclose(infile);
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a128, %rsp          # imm = 0x7A128
leaq 0x6068d(%rip), %rsi     # 0xab95b
callq 0x40f0
testq %rax, %rax
je 0x4b42b
movq %rax, %rbx
leaq 0x5f3ea(%rip), %r15     # 0xaa6d0
movl $0x20, %edi
movq %r15, %rsi
movl $0x8, %edx
callq 0x3a0e1
movq %rax, %r14
leaq 0xc(%rax), %rdx
leaq 0x658ef(%rip), %rsi     # 0xb0bf5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4070
movslq 0xc(%r14), %rdi
shlq $0x3, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x3a0e1
movq %rax, 0x10(%r14)
movslq 0xc(%r14), %rdi
shlq $0x3, %rdi
movq %r15, %rsi
movl $0xb, %edx
callq 0x3a0e1
movq %rax, 0x18(%r14)
cmpl $0x0, 0xc(%r14)
jle 0x4b381
leaq 0x5eaeb(%rip), %r15     # 0xa9e3b
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x10(%r14), %rdx
addq %r12, %rdx
movq 0x18(%r14), %rcx
addq %r12, %rcx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x4070
incq %r13
movslq 0xc(%r14), %rax
addq $0x8, %r12
cmpq %rax, %r13
jl 0x4b356
movq %r14, %rdx
addq $0x8, %rdx
leaq 0x65866(%rip), %rsi     # 0xb0bf5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4070
movslq 0x8(%r14), %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
leaq 0x5f324(%rip), %rsi     # 0xaa6d0
movl $0xf, %edx
callq 0x3a0e1
movq %rax, (%r14)
cmpl $0x0, 0x8(%r14)
jle 0x4b421
leaq 0x5cb89(%rip), %r12     # 0xa7f50
movq %rsp, %r13
xorl %ebp, %ebp
xorl %r15d, %r15d
movq (%r14), %rax
leaq (%rax,%rbp), %rdx
addq $0x8, %rdx
leaq (%rax,%rbp), %rcx
addq $0x10, %rcx
movq %rbx, %rdi
leaq 0x5f302(%rip), %rsi     # 0xaa6ee
xorl %eax, %eax
callq 0x4070
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4070
movq (%r14), %rdi
addq %rbp, %rdi
movq %r13, %rsi
callq 0x4b24c
incq %r15
movslq 0x8(%r14), %rax
addq $0x18, %rbp
cmpq %rax, %r15
jl 0x4b3cf
movq %rbx, %rdi
callq 0x42a0
jmp 0x4b42e
xorl %r14d, %r14d
movq %r14, %rax
addq $0x7a128, %rsp          # imm = 0x7A128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: free_additive_term
void free_additive_term(Atermptr a)
{
	/*!Last Changed 11.04.2005*/
	Mtermptr tmp, next;
	tmp = a->start;
	while (tmp)
	 {
		 next = tmp->next;
			free_multiplicative_term(tmp);
			safe_free(tmp);
			tmp = next;
	 }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rbx
testq %rbx, %rbx
je 0x4b48a
movq 0x20(%rbx), %r14
movq %rbx, %rdi
callq 0x4b443
movq %rbx, %rdi
callq 0x3a180
movq %r14, %rbx
testq %r14, %r14
jne 0x4b46e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: free_single_model
void free_single_model(Singlemodel s)
{
	/*!Last Changed 11.04.2005*/
	Atermptr tmp, next;
 tmp = s.start;
	while (tmp)
	 {
		 next = tmp->next;
			free_additive_term(tmp);
			safe_free(tmp);
			tmp = next;
	 }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x20(%rsp), %rbx
testq %rbx, %rbx
je 0x4b4bc
movq 0x10(%rbx), %r14
movq %rbx, %rdi
callq 0x4b461
movq %rbx, %rdi
callq 0x3a180
movq %r14, %rbx
testq %r14, %r14
jne 0x4b4a0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: free_multiple_model
void free_multiple_model(Multiplemodelptr m)
{
	/*!Last Changed 11.04.2005*/
	int i;
	safe_free(m->min);
	safe_free(m->max);
	for (i = 0; i < m->modelcount; i++)
		 free_single_model(m->models[i]);
	safe_free(m->models);
	safe_free(m);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x3a180
movq 0x18(%rbx), %rdi
callq 0x3a180
movl 0x8(%rbx), %eax
testl %eax, %eax
jle 0x4b525
xorl %r15d, %r15d
movq (%rbx), %rcx
leaq (%r15,%r15,2), %rdx
movq (%rcx,%rdx,8), %r14
testq %r14, %r14
je 0x4b51a
movq 0x10(%r14), %r12
movq %r14, %rdi
callq 0x4b461
movq %r14, %rdi
callq 0x3a180
movq %r12, %r14
testq %r12, %r12
jne 0x4b4fb
movl 0x8(%rbx), %eax
incq %r15
movslq %eax, %rcx
cmpq %rcx, %r15
jl 0x4b4eb
movq (%rbx), %rdi
callq 0x3a180
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3a180
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: data_count_of_multiple_model
int data_count_of_multiple_model(Multiplemodelptr m)
{
	/*!Last Changed 11.04.2005*/
	int result = 0, i;
	for (i = 0; i < m->modelcount; i++)
		 result += m->models[i].datacount;
	return result;
}

// Assembly:
movslq 0x8(%rdi), %rax
testq %rax, %rax
jle 0x4b566
movq (%rdi), %rcx
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdx
xorl %esi, %esi
xorl %eax, %eax
addl 0x8(%rcx,%rsi), %eax
addq $0x18, %rsi
cmpq %rsi, %rdx
jne 0x4b558
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: generate_data_from_single_model
matrix generate_data_from_single_model(Singlemodel s, int featurecount, double* min, double* max)
{
	/*!Last Changed 11.04.2005*/
	int i, j;
	matrix result;
	result = matrix_alloc(s.datacount, featurecount + 1);
	for (i = 0; i < s.datacount; i++)
	 {
		 for (j = 0; j < featurecount; j++)
				 result.values[i][j] = produce_random_value(min[j], max[j]);
			result.values[i][j] = single_model_value(s, result.values[i]);
	 }
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movslq 0x78(%rsp), %r15
movq %rdi, 0x20(%rsp)
leal 0x1(%rdi), %esi
movl %r15d, %edi
callq 0x3d79d
movq %rax, 0x28(%rsp)
movq %rdx, %rbp
movq %r15, 0x30(%rsp)
testq %r15, %r15
jle 0x4b616
movl 0x20(%rsp), %r15d
xorl %r12d, %r12d
cmpl $0x0, 0x20(%rsp)
jle 0x4b5df
xorl %r13d, %r13d
movsd (%r14,%r13,8), %xmm0
movsd (%rbx,%r13,8), %xmm1
callq 0x3af6a
movq (%rbp,%r12,8), %rdi
movsd %xmm0, (%rdi,%r13,8)
incq %r13
cmpq %r13, %r15
jne 0x4b5b6
movq %r15, %r13
jmp 0x4b5e7
movq (%rbp,%r12,8), %rdi
xorl %r13d, %r13d
leaq 0x70(%rsp), %rcx
movq 0x10(%rcx), %rax
movq %rax, 0x10(%rsp)
movups (%rcx), %xmm0
movups %xmm0, (%rsp)
callq 0x4abfa
movq (%rbp,%r12,8), %rax
movsd %xmm0, (%rax,%r13,8)
incq %r12
cmpq 0x30(%rsp), %r12
jne 0x4b5ac
movq 0x28(%rsp), %rax
movq %rbp, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: generate_data_from_multiple_model
matrix generate_data_from_multiple_model(Multiplemodelptr m)
{
	/*!Last Changed 11.04.2005*/
	matrix result;
	int datacount, i, j, k, p;
 datacount = data_count_of_multiple_model(m);
	result = matrix_alloc(datacount, m->featurecount + 1);
	k = 0;
	for (i = 0; i < m->modelcount; i++)
		 for (j = 0; j < m->models[i].datacount; j++)
			 {
		   for (p = 0; p < m->featurecount; p++)
				   result.values[k][p] = produce_random_value(m->min[p], m->max[p]);
     result.values[k][p] = single_model_value(m->models[i], result.values[k]);
			  k++;
			 }
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movslq 0x8(%rdi), %rcx
testq %rcx, %rcx
jle 0x4b665
movq (%rbx), %rax
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
xorl %edi, %edi
addl 0x8(%rax,%rdx), %edi
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0x4b656
jmp 0x4b667
xorl %edi, %edi
movl 0xc(%rbx), %esi
incl %esi
callq 0x3d79d
movq %rax, 0x18(%rsp)
movq %rdx, %r15
movl 0x8(%rbx), %ecx
testl %ecx, %ecx
jle 0x4b73d
movq (%rbx), %rax
xorl %esi, %esi
xorl %r13d, %r13d
leaq (%rsi,%rsi,2), %rdx
cmpl $0x0, 0x8(%rax,%rdx,8)
jle 0x4b72e
movslq %r13d, %r13
xorl %ebp, %ebp
movq %rsi, 0x20(%rsp)
leaq (,%rsi,8), %rcx
leaq (%rcx,%rcx,2), %r14
cmpl $0x0, 0xc(%rbx)
jle 0x4b6ee
xorl %r12d, %r12d
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
movsd (%rax,%r12,8), %xmm0
movsd (%rcx,%r12,8), %xmm1
callq 0x3af6a
movq (%r15,%r13,8), %rdi
movsd %xmm0, (%rdi,%r12,8)
incq %r12
movslq 0xc(%rbx), %rax
cmpq %rax, %r12
jl 0x4b6ba
movq (%rbx), %rax
jmp 0x4b6f5
movq (%r15,%r13,8), %rdi
xorl %r12d, %r12d
movq 0x10(%rax,%r14), %rcx
movq %rcx, 0x10(%rsp)
movups (%rax,%r14), %xmm0
movups %xmm0, (%rsp)
callq 0x4abfa
movq (%r15,%r13,8), %rax
movsd %xmm0, (%rax,%r12,8)
incq %r13
incl %ebp
movq (%rbx), %rax
cmpl 0x8(%rax,%r14), %ebp
jl 0x4b6b1
movl 0x8(%rbx), %ecx
movq 0x20(%rsp), %rsi
incq %rsi
movslq %ecx, %rdx
cmpq %rdx, %rsi
jl 0x4b68c
movq 0x18(%rsp), %rax
movq %r15, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multiplemodel.c
// Function: remove_instances_according_to_threshold
void remove_instances_according_to_threshold(Instanceptr* parentlist, Instanceptr* removed, double threshold, matrix w, char which)
{
	/*!Last Changed 11.04.2005*/
	double value;
	Instanceptr last, tmp, before, next;
	last = *removed;
	if (last)
		 while (last->next != NULL)
				 last = last->next;
	tmp = *parentlist;
	before = NULL;
	while (tmp)
	 {
		 next = tmp->next;
		 value = fabs(linear_fit_value(w, tmp) - give_regressionvalue(tmp));
			if ((value > threshold && which == '>') || (value < threshold && which == '<'))
			 {
				 if (last)
  				 last->next = tmp;
					else
						 *removed = tmp;
					last = tmp;
					if (before)
						 before->next = tmp->next;
					else
						 *parentlist = tmp->next;
			 }
			else
				 before = tmp;
			tmp = next;
	 }
	last->next = NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, %ebx
movq %rcx, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
movq %rdi, (%rsp)
movq %rsi, 0x10(%rsp)
movq (%rsi), %rax
testq %rax, %rax
je 0x4b794
movq %rax, %r12
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x4b786
jmp 0x4b797
xorl %r12d, %r12d
movq (%rsp), %rax
movq (%rax), %rbp
testq %rbp, %rbp
je 0x4b851
movq $0x0, 0x8(%rsp)
cmpb $0x3c, %bl
sete %r15b
cmpb $0x3e, %bl
sete %r13b
movq 0x10(%rbp), %r14
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq %rbp, %rdx
callq 0x76f0b
movapd %xmm0, 0x30(%rsp)
movq %rbp, %rdi
callq 0x2f35e
movapd 0x30(%rsp), %xmm1
subsd %xmm0, %xmm1
andpd 0x5a9ec(%rip), %xmm1    # 0xa61e0
movsd 0x18(%rsp), %xmm0
ucomisd %xmm0, %xmm1
seta %cl
ucomisd %xmm1, %xmm0
seta %al
testb %cl, %r13b
jne 0x4b819
andb %al, %r15b
jne 0x4b819
movq %rbp, 0x8(%rsp)
jmp 0x4b845
leaq 0x10(%r12), %rax
testq %r12, %r12
cmoveq 0x10(%rsp), %rax
movq %rbp, (%rax)
movq 0x8(%rsp), %rcx
leaq 0x10(%rcx), %rax
testq %rcx, %rcx
movq 0x10(%rbp), %rcx
cmoveq (%rsp), %rax
movq %rcx, (%rax)
movq %rbp, %r12
movq %r14, %rbp
testq %r14, %r14
jne 0x4b7b0
movq $0x0, 0x10(%r12)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/multivariaterule.c
// Function: error_of_ruleset_with_deleted_rules
int error_of_ruleset_with_deleted_rules(Ruleset set, Instanceptr data, int* deleted)
{
/*!Last Changed 14.01.2004*/
 int instanceclassno, covered, error, i;
 Instanceptr test = data;
 Decisionruleptr tmp;
 error = 0;
 while (test)
  {
   instanceclassno = give_classno(test);
   covered = 0;
   tmp = set.start;
   i = 0;
   while (tmp)
    {
     if ((!deleted[i]) && rule_cover_instance(test, *tmp))
      {
       if (instanceclassno != tmp->classno)
         error++;
       covered = 1;
       break;
      }
     i++;
     tmp = tmp->next;
    }
   if (!covered)
     if (instanceclassno != set.defaultclass)
       error++;
   test=test->next;
  }
 return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, 0x50(%rsp)
testq %rdi, %rdi
je 0x4bca7
movq %rdi, %r14
leaq 0x90(%rsp), %rax
movq (%rax), %r12
movl 0x14(%rax), %eax
movl %eax, 0x44(%rsp)
xorl %ebp, %ebp
movq %r12, 0x48(%rsp)
movq %r14, %rdi
callq 0x2f33a
movl %eax, %r15d
movb $0x1, %bl
testq %r12, %r12
je 0x4bc89
movq 0x50(%rsp), %r13
cmpl $0x0, (%r13)
jne 0x4bc67
movq 0x30(%r12), %rax
movq %rax, 0x30(%rsp)
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdi
callq 0x7b9ee
testl %eax, %eax
jne 0x4bc77
movq 0x30(%r12), %r12
addq $0x4, %r13
testq %r12, %r12
jne 0x4bc2b
jmp 0x4bc84
xorl %eax, %eax
cmpl (%r12), %r15d
setne %al
addl %eax, %ebp
xorl %ebx, %ebx
movq 0x48(%rsp), %r12
cmpl 0x44(%rsp), %r15d
setne %al
andb %bl, %al
movzbl %al, %eax
addl %eax, %ebp
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x4bc14
jmp 0x4bca9
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq