LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: variance_of_linear_regression_for_array_of_instances
double variance_of_linear_regression_for_array_of_instances(matrix w, Instanceptr list, int start, int end, LEAF_TYPE leaftype)
{
	/*!Last Changed 01.03.2005*/
	int i, size = end - start + 1;
	double variance = 0;
	for (i = 0; i < size; i++)
		 variance += instance_regression_error(w, 0, &(list[start + i]), leaftype);
	return variance;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r14d
xorpd %xmm0, %xmm0
subl %ecx, %r14d
jl 0x76c79
movl %r9d, %ebx
movq %rdx, %r15
movq %rsi, %r12
movslq %ecx, %rax
incl %r14d
leaq (%rax,%rax,2), %rax
shlq $0x4, %rax
addq %rax, %r15
movsd %xmm0, 0x10(%rsp)
xorpd %xmm0, %xmm0
testl %ebx, %ebx
je 0x76c4a
movq %r12, %rsi
movq %r15, %rdx
callq 0x76f0b
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
callq 0x2f35e
subsd 0x8(%rsp), %xmm0
mulsd %xmm0, %xmm0
movsd 0x10(%rsp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x30, %r15
decq %r14
jne 0x76c31
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: linear_fit_value
double linear_fit_value(matrix w, Instanceptr inst)
{
	/*!Last Changed 28.02.2005*/
	int i;
	double result = w.values[0][0];
	for (i = 0; i < current_dataset->multifeaturecount - 1; i++)
			result += w.values[i + 1][0] * real_feature(inst, i);
	return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq (%rsi), %rax
movsd (%rax), %xmm0
leaq 0x5e94c(%rip), %r15     # 0xd5870
movq (%r15), %rax
cmpl $0x2, 0x1c0(%rax)
jl 0x76f8a
movq %rdx, %rbx
movq %rsi, %r14
xorl %esi, %esi
movsd %xmm0, 0x8(%rsp)
leaq 0x1(%rsi), %r12
movq 0x8(%r14,%rsi,8), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
callq 0x2ed6a
mulsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
movq (%r15), %rax
movslq 0x1c0(%rax), %rax
decq %rax
movq %r12, %rsi
cmpq %rax, %r12
jl 0x76f38
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: instance_regression_error
double instance_regression_error(matrix w, double regressionvalue, Instanceptr instance, LEAF_TYPE leaftype)
{
	/*!Last Changed 02.03.2005*/
	double mean, regvalue;
	if (leaftype == CONSTANTLEAF)
		 mean = regressionvalue;
	else
  	mean = linear_fit_value(w, instance);
	regvalue = give_regressionvalue(instance);
	return (regvalue - mean) * (regvalue - mean);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
testl %ecx, %ecx
je 0x76faa
movq %rbx, %rdx
callq 0x76f0b
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x2f35e
subsd 0x8(%rsp), %xmm0
mulsd %xmm0, %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: variance_of_linear_regression
double variance_of_linear_regression(matrix w, Instanceptr list, LEAF_TYPE leaftype)
{
	/*!Last Changed 28.02.2005*/
	double variance = 0;
	Instanceptr tmp;
	tmp = list;
	while (tmp)
	 {
			variance += instance_regression_error(w, 0, tmp, leaftype);
		 tmp = tmp->next;
	 }
	return variance;
}

// Assembly:
testq %rdx, %rdx
je 0x77032
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movq %rsi, %r15
xorpd %xmm0, %xmm0
movsd %xmm0, 0x8(%rsp)
xorpd %xmm0, %xmm0
testl %ebx, %ebx
je 0x76ffb
movq %r15, %rsi
movq %r14, %rdx
callq 0x76f0b
movsd %xmm0, (%rsp)
movq %r14, %rdi
callq 0x2f35e
subsd (%rsp), %xmm0
mulsd %xmm0, %xmm0
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x76fe2
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: create_regression_matrices
void create_regression_matrices(Instanceptr list, matrix* X, matrix* r)
{
	/*!Last Changed 01.03.2005*/
	int i, size = data_size(list), j;
	Instanceptr tmp;
	*X = matrix_alloc(size, current_dataset->multifeaturecount);
	*r = matrix_alloc(size, 1);
 tmp = list;
	i = 0;
	while (tmp)
	 {
		 (*X).values[i][0] = 1;
		 for (j = 0; j < current_dataset->multifeaturecount - 1; j++)
			  (*X).values[i][j + 1] = real_feature(tmp, j);
			(*r).values[i][0] = give_regressionvalue(tmp);
			i++;	 
		 tmp = tmp->next;
	 }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x30309
movl %eax, %ebp
leaq 0x5e818(%rip), %r13     # 0xd5870
movq (%r13), %rax
movl 0x1c0(%rax), %esi
movl %ebp, %edi
callq 0x3d79d
movq %rax, (%r14)
movq %rdx, 0x8(%r14)
movl %ebp, %edi
movl $0x1, %esi
callq 0x3d79d
movq %rax, (%rbx)
movq %rdx, 0x8(%rbx)
testq %r15, %r15
je 0x770ff
xorl %ebp, %ebp
movq 0x8(%r14), %rax
movq (%rax,%rbp,8), %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, (%rax)
movq (%r13), %rax
cmpl $0x2, 0x1c0(%rax)
jl 0x770df
xorl %r12d, %r12d
movq %r15, %rdi
movl %r12d, %esi
callq 0x2ed6a
movq 0x8(%r14), %rax
movq (%rax,%rbp,8), %rax
movsd %xmm0, 0x8(%rax,%r12,8)
incq %r12
movq (%r13), %rax
movslq 0x1c0(%rax), %rax
decq %rax
cmpq %rax, %r12
jl 0x770af
movq %r15, %rdi
callq 0x2f35e
movq 0x8(%rbx), %rax
movq (%rax,%rbp,8), %rax
movsd %xmm0, (%rax)
incq %rbp
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0x7708a
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/regressiontree.c
// Function: createnewregnode
Regressionnodeptr createnewregnode(Regressionnodeptr parentnode, int howmany, LEAF_TYPE leaftype)
{
	/*!Last Changed 25.08.2005 added leaftype*/
	/*!Last Changed 09.12.2004*/
	int j;
	Regressionnodeptr newnode;
	newnode = (Regressionnodeptr)safemalloc(howmany * sizeof(struct regressionnode), "createnewregnode", 3);
	newnode->featureno = LEAF_NODE;
	newnode->leaftype = leaftype;
	newnode->instances = NULL;
	newnode->cvinstances = NULL;
	for (j = 0; j < howmany; j++)
			newnode[j].parent = parentnode;
	return newnode;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movslq %esi, %r15
imulq $0x98, %r15, %rdi
leaq 0x38b4a(%rip), %rsi     # 0xafc78
movl $0x3, %edx
callq 0x3a0e1
movl $0xffffffff, 0x68(%rax) # imm = 0xFFFFFFFF
movl %ebp, 0x6c(%rax)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x20(%rax)
testl %r15d, %r15d
jle 0x771f1
movl %r14d, %ecx
incl %r14d
decq %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl %r14d
imulq $0x130, %r14, %rcx      # imm = 0x130
movdqa 0x2f2c7(%rip), %xmm1    # 0xa6440
xorl %edx, %edx
movdqa 0x2f2cd(%rip), %xmm2    # 0xa6450
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x2f2fd(%rip), %xmm4    # 0xa6490
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0x771ca
movq %rbx, 0x18(%rax,%rdx)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x771e1
movq %rbx, 0xb0(%rax,%rdx)
paddq %xmm4, %xmm1
addq $0x130, %rdx            # imm = 0x130
cmpq %rdx, %rcx
jne 0x77193
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: next_regression_node
Regressionnodeptr next_regression_node(Regressionnodeptr currentnode, Instanceptr tmp)
{
	/*!Last Changed 24.03.2005*/
	/*!Last Changed 09.12.2004*/
	if (currentnode->featureno >= 0)
   if (tmp->values[currentnode->featureno].floatvalue <= currentnode->split)
     return currentnode->left;
   else
     return currentnode->right;
	else
			if (nearest_center_in_regression_tree(tmp, currentnode->featureno, currentnode->leftcenter, currentnode->rightcenter) == LEFTCHILD)
     return currentnode->left;
   else
     return currentnode->right;
}

// Assembly:
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
movslq 0x68(%rdi), %rsi
testq %rsi, %rsi
js 0x77221
movq (%rax), %rax
movsd 0x50(%rbx), %xmm0
ucomisd (%rax,%rsi,8), %xmm0
jae 0x77242
addq $0x8, %rbx
jmp 0x77242
movq 0x80(%rbx), %rdx
movq 0x88(%rbx), %rcx
movq %rax, %rdi
callq 0x76460
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leaq (%rbx,%rcx,8), %rbx
movq (%rbx), %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: test_regtree
double test_regtree(Regressionnodeptr root, Instanceptr testingdata)
{
	/*!Last Changed 28.02.2005*/
	/*!Last Changed 09.12.2004*/
 Instanceptr test = testingdata;
 Regressionnodeptr currentnode;
	double performance = 0;
 while (test)
  {
   currentnode = root;
   while (currentnode->featureno != LEAF_NODE)
     currentnode = next_regression_node(currentnode, test); 
			performance += instance_regression_error(currentnode->w, currentnode->regressionvalue, test, currentnode->leaftype);
   test = test->next;
  }
	return performance;
}

// Assembly:
testq %rsi, %rsi
je 0x772d5
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorpd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
cmpl $-0x1, 0x68(%r14)
movq %r14, %rax
je 0x77285
movq %r14, %rax
movq %rax, %rdi
movq %rbx, %rsi
callq 0x771fc
cmpl $-0x1, 0x68(%rax)
jne 0x77274
cmpl $0x0, 0x6c(%rax)
je 0x77299
movq 0x38(%rax), %rsi
movq %rbx, %rdx
callq 0x76f0b
jmp 0x7729e
movsd 0x70(%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x2f35e
subsd 0x8(%rsp), %xmm0
mulsd %xmm0, %xmm0
movsd 0x10(%rsp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
jne 0x77261
addq $0x18, %rsp
popq %rbx
popq %r14
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: deallocate_regression_tree
void deallocate_regression_tree(Regressionnodeptr node)
{
	/*!Last Changed 23.03.2005 added deallocation of left and right centers*/
	/*!Last Changed 09.12.2004*/
 if (node->featureno == LEAF_NODE)
  {
   if (node->instances)
     deallocate(node->instances);
   if (node->cvinstances)
     deallocate(node->cvinstances);
   if (node->leaftype == LINEARLEAF)
     matrix_free(node->w);
  }
 else
  {
		 if (in_list(node->featureno, 2, LINEAR, QUADRATIC))
			 {
				 deallocate(node->leftcenter);
				 deallocate(node->rightcenter);
			 }
   else
     if (node->featureno == SOFTLIN)
       matrix_free(node->w);
   deallocate_regression_tree(node->left);
   safe_free(node->left);
   deallocate_regression_tree(node->right);
   safe_free(node->right);
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x68(%rdi), %edi
cmpl $-0x1, %edi
je 0x77319
movl $0x2, %esi
movl $0xfffffffe, %edx       # imm = 0xFFFFFFFE
movl $0xfffffffd, %ecx       # imm = 0xFFFFFFFD
xorl %eax, %eax
callq 0x3aa8c
testl %eax, %eax
je 0x77349
movq 0x80(%rbx), %rdi
callq 0x2ff55
movq 0x88(%rbx), %rdi
callq 0x2ff55
jmp 0x7735c
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x77327
callq 0x2ff55
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x77335
callq 0x2ff55
cmpl $0x1, 0x6c(%rbx)
jne 0x7737f
movq 0x30(%rbx), %rdi
movq 0x38(%rbx), %rsi
popq %rbx
jmp 0x3ed51
cmpl $-0x6, 0x68(%rbx)
jne 0x7735c
movq 0x30(%rbx), %rdi
movq 0x38(%rbx), %rsi
callq 0x3ed51
movq (%rbx), %rdi
callq 0x772d9
movq (%rbx), %rdi
callq 0x3a180
movq 0x8(%rbx), %rdi
callq 0x772d9
movq 0x8(%rbx), %rdi
popq %rbx
jmp 0x3a180
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: accumulate_instances_regression_tree
void accumulate_instances_regression_tree(Instanceptr* data, Instanceptr* cvdata, Regressionnodeptr root)
{
 /*!Last Changed 02.03.2005*/
	if (root->featureno == LEAF_NODE)
		 accumulate_instances_regression_leaf(data, cvdata, root);
	else
	 {
   accumulate_instances_regression_tree(data, cvdata, root->left);
			accumulate_instances_regression_tree(data, cvdata, root->right);
	 }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpl $-0x1, 0x68(%rdx)
je 0x77585
movq (%rbx), %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x77559
movq 0x8(%rbx), %rbx
cmpl $-0x1, 0x68(%rbx)
jne 0x7756d
movq (%r15), %rax
testq %rax, %rax
je 0x7759d
movq %rax, %r15
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x7758d
addq $0x10, %r15
movq 0x20(%rbx), %rax
movq %rax, (%r15)
movq $0x0, 0x20(%rbx)
movq (%r14), %rax
testq %rax, %rax
je 0x775c4
movq %rax, %r14
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x775b4
addq $0x10, %r14
movq 0x28(%rbx), %rax
movq %rax, (%r14)
movq $0x0, 0x28(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: setup_regressionnode_properties
void setup_regressionnode_properties(Regressionnodeptr node, LEAF_TYPE leaftype)
{
	matrix X, r, w;
	node->covered = data_size(node->instances);
	if (leaftype == CONSTANTLEAF)
	 {
   node->regressionvalue = find_mean_of_regression_value(node->instances);
   node->mseerror = find_variance_of_regression_value(node->instances, node->regressionvalue);
	 }
	else
	 {
   create_regression_matrices(node->instances, &X, &r);
   w = multivariate_regression(X, r);
   matrix_free(X);
   matrix_free(r);
   node->w = w;
   node->mseerror = variance_of_linear_regression(w, node->instances, leaftype);
	 } 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
callq 0x30309
movl %eax, 0x78(%rbx)
movq 0x20(%rbx), %rdi
testl %ebp, %ebp
je 0x77816
leaq 0x28(%rsp), %r14
leaq 0x18(%rsp), %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x77036
movq (%r14), %r12
movq 0x8(%r14), %r14
movq (%r15), %r13
movq 0x8(%r15), %r15
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x76b4b
movq %rax, 0x10(%rsp)
movl %ebp, 0xc(%rsp)
movq %rdx, %rbp
movq %r12, %rdi
movq %r14, %rsi
callq 0x3ed51
movq %r13, %rdi
movq %r15, %rsi
callq 0x3ed51
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rbx)
movq %rbp, 0x38(%rbx)
movq 0x20(%rbx), %rdx
movq %rbp, %rsi
movl 0xc(%rsp), %ecx
callq 0x76fc8
jmp 0x77829
callq 0x2ffe1
movsd %xmm0, 0x70(%rbx)
movq 0x20(%rbx), %rdi
callq 0x3002f
movsd %xmm0, 0x60(%rbx)
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/regressiontree.c
// Function: can_be_divided_regression
int can_be_divided_regression(Regressionnodeptr node, Regtree_parameterptr param)
{
	/*!Last Changed 01.03.2005*/
 setup_regressionnode_properties(node, param->leaftype);
 if (param->prunetype == VALIDATIONPRUNING || (param->prunetype == MODELSELECTIONPRUNING && param->modelselectionmethod == MODEL_SELECTION_CV))
  {
  	if (param->leaftype == CONSTANTLEAF)
     node->errorforprune = find_variance_of_regression_value(node->cvinstances, node->regressionvalue);
   else
     node->errorforprune = variance_of_linear_regression(node->w, node->cvinstances, param->leaftype);
  }
	if (node->mseerror / node->covered <= param->sigma)
	 {
		 make_leaf_regression_node(node, param->leaftype);
		 return 0;
	 }
	if (param->prunetype == PREPRUNING)
	 {
			if ((node->covered + 0.0) / current_dataset->traincount < param->pruningthreshold)
			 {
	  	 make_leaf_regression_node(node, param->leaftype);
     return 0;
			 }
	 }
	return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %esi
callq 0x7777a
movl 0x4(%r14), %eax
cmpl $0x1, %eax
je 0x77863
cmpl $0x2, %eax
jne 0x7788b
cmpl $0x0, 0x8(%r14)
jne 0x7788b
movl (%r14), %ecx
movq 0x28(%rbx), %rdx
testl %ecx, %ecx
je 0x77879
movq 0x38(%rbx), %rsi
callq 0x76fc8
jmp 0x77886
movsd 0x70(%rbx), %xmm0
movq %rdx, %rdi
callq 0x3002f
movsd %xmm0, 0x58(%rbx)
movsd 0x60(%rbx), %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl 0x78(%rbx), %xmm0
divsd %xmm0, %xmm1
movsd 0x20(%r14), %xmm2
ucomisd %xmm1, %xmm2
jae 0x778d9
movl $0x1, %eax
cmpl $0x0, 0x4(%r14)
jne 0x778f8
leaq 0x5dfb5(%rip), %rcx     # 0xd5870
movq (%rcx), %rcx
xorps %xmm1, %xmm1
cvtsi2sdl 0x1407124(%rcx), %xmm1
divsd %xmm1, %xmm0
movsd 0x10(%r14), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x778f8
movl (%r14), %eax
movl $0xffffffff, 0x68(%rbx) # imm = 0xFFFFFFFF
movl %eax, 0x6c(%rbx)
xorpd %xmm0, %xmm0
movupd %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: constant_or_linear_model_mse
double constant_or_linear_model_mse(Instanceptr train, Instanceptr test, LEAF_TYPE leaftype)
{
	/*!Last Changed 26.03.2005*/
	double regvalue, error;
	matrix X, r, w;
	if (leaftype == CONSTANTLEAF)
	 {
  	regvalue = find_mean_of_regression_value(train);
			error = find_variance_of_regression_value(test, regvalue);
	 }
	else
	 {
   create_regression_matrices(train, &X, &r);
		 w = multivariate_regression(X, r);
			matrix_free(X);
			matrix_free(r);
			error = variance_of_linear_regression(w, test, leaftype);
			matrix_free(w);
	}
	return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
testl %edx, %edx
je 0x779a9
movl %edx, %ebp
leaq 0x28(%rsp), %r14
leaq 0x18(%rsp), %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x77036
movq (%r14), %r12
movq 0x8(%r14), %r14
movq (%r15), %r13
movq 0x8(%r15), %r15
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x76b4b
movq %rax, 0x10(%rsp)
movq %rbx, 0x8(%rsp)
movq %rdx, %rbx
movq %r12, %rdi
movq %r14, %rsi
callq 0x3ed51
movq %r13, %rdi
movq %r15, %rsi
callq 0x3ed51
movq %rbx, %rsi
movq 0x8(%rsp), %rdx
movl %ebp, %ecx
callq 0x76fc8
movsd %xmm0, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x3ed51
movsd 0x8(%rsp), %xmm0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2ffe1
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3002f
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: find_linear_regression_split
int find_linear_regression_split(Instanceptr data, Instanceptr* left, Instanceptr* right)
{
	/*!Last Changed 24.03.2005*/
	int size = data_size(data);
	Instanceptr list;
	if (size < 2)
		 return 0;
	list = k_means_clustering(data, 2);
	*left = list;
	*right = list->next;
	list->next = NULL;
	return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x30309
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x2, %ecx
jl 0x77be4
movq %r15, %rdi
movl $0x2, %esi
callq 0xcdff
movq %rax, (%r14)
movq 0x10(%rax), %rcx
movq %rcx, (%rbx)
movq $0x0, 0x10(%rax)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: find_quadratic_regression_split
int find_quadratic_regression_split(Instanceptr data, Instanceptr* left, Instanceptr* right)
{
	/*!Last Changed 23.03.2005*/
	Instanceptr newlist, list;
	int size = data_size(data), oldfcount;
	if (size < 2)
		 return 0;
 newlist = generate_2d_copy_of_instance_list(data);
 oldfcount = current_dataset->multifeaturecount;
	current_dataset->multifeaturecount = multifeaturecount_2d(current_dataset) + 1;
	list = k_means_clustering(newlist, 2);
	*left = list;
	*right = list->next;
	list->next = NULL;
	deallocate(newlist);
 current_dataset->multifeaturecount = oldfcount;
	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x30309
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x2, %ecx
jl 0x77c6c
movq %r15, %rdi
callq 0x2ffa4
movq %rax, %r15
leaq 0x5dc55(%rip), %r12     # 0xd5870
movq (%r12), %rdi
movl 0x1c0(%rdi), %ebp
callq 0x1372c
incl %eax
movq (%r12), %rcx
movl %eax, 0x1c0(%rcx)
movq %r15, %rdi
movl $0x2, %esi
callq 0xcdff
movq %rax, (%r14)
movq 0x10(%rax), %rcx
movq %rcx, (%rbx)
movq $0x0, 0x10(%rax)
movq %r15, %rdi
callq 0x2ff55
movq (%r12), %rax
movl %ebp, 0x1c0(%rax)
movl $0x1, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: find_uni_and_multi_regression_splits
void find_uni_and_multi_regression_splits(Regressionnodeptr node, Instanceptr* leftlincenter, Instanceptr* rightlincenter, Instanceptr* leftquacenter, Instanceptr* rightquacenter)
{
	/*!Last Changed 24.03.2005*/
	char dummy3;
 if (node->leaftype == CONSTANTLEAF)
   node->featureno = best_regression_feature(node->instances, &(node->split), &dummy3);
	else
		 node->featureno = best_regression_feature_linear_leaves(node->instances, &(node->split), &dummy3);
 find_linear_regression_split(node->instances, leftlincenter, rightlincenter);
 find_quadratic_regression_split(node->instances, leftquacenter, rightquacenter);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
leaq 0x50(%rdi), %rsi
cmpl $0x0, 0x6c(%rdi)
movq 0x20(%rdi), %rdi
leaq 0xf(%rsp), %rdx
je 0x78220
callq 0x766e3
jmp 0x78225
callq 0x76c85
movl %eax, 0x68(%r15)
movq 0x20(%r15), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x77ba4
movq 0x20(%r15), %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x77bea
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: set_best_model_in_regression_tree
void set_best_model_in_regression_tree(Regressionnodeptr node, int bestmodel, Instanceptr leftl, Instanceptr rightl, Instanceptr leftq, Instanceptr rightq)
{
	/*!Last Changed 24.03.2005*/
	switch (bestmodel)
	 {
	  case MODEL_UNI:deallocate(leftl);
										        deallocate(rightl);
				              deallocate(leftq);
				              deallocate(rightq);
        										break;
	  case MODEL_LIN:node->featureno = LINEAR;
				              node->leftcenter = leftl;
				              node->rightcenter = rightl;
				              deallocate(leftq);
				              deallocate(rightq);
										        break;				      
			case MODEL_QUA:node->featureno = QUADRATIC;
				              node->leftcenter = leftq;
				              node->rightcenter = rightq;
				              deallocate(leftl);
				              deallocate(rightl);
										        break;				      
	 }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
cmpl $0x2, %esi
je 0x78299
cmpl $0x1, %esi
je 0x78282
testl %esi, %esi
jne 0x782c9
movq %rdx, %rdi
callq 0x2ff55
movq %r15, %rdi
callq 0x2ff55
jmp 0x782b4
movl $0xfffffffe, 0x68(%rdi) # imm = 0xFFFFFFFE
movq %rdx, 0x80(%rdi)
movq %r15, 0x88(%rdi)
jmp 0x782b4
movl $0xfffffffd, 0x68(%rdi) # imm = 0xFFFFFFFD
movq %r14, 0x80(%rdi)
movq %rbx, 0x88(%rdi)
movq %rdx, %r14
movq %r15, %rbx
movq %r14, %rdi
callq 0x2ff55
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2ff55
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: best_single_regression_tree_split
int best_single_regression_tree_split(Regressionnodeptr node, int nodetype)
{
	/*!Last Changed 23.03.2005*/
	char dummy;
	int found;
	switch (nodetype)
	 {
	  case UNIVARIATE:if (node->leaftype == CONSTANTLEAF)
                     return best_regression_feature(node->instances, &(node->split), &dummy);
	                  else
		                   return best_regression_feature_linear_leaves(node->instances, &(node->split), &dummy);
				               break;
		 case LINEAR    :found = find_linear_regression_split(node->instances, &(node->leftcenter), &(node->rightcenter));
				               break;
		 case QUADRATIC :found = find_quadratic_regression_split(node->instances, &(node->leftcenter), &(node->rightcenter));
				               break;
   default        :printf(m1231, nodetype);
                   found = 0;
                   break;
	 }
	if (found)
		 return nodetype;
	else
		 return LEAF_NODE;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movq %rdi, %rdx
cmpl $-0x3, %esi
je 0x78509
cmpl $-0x2, %ebx
je 0x784f0
testl %ebx, %ebx
jne 0x78526
leaq 0x50(%rdx), %rsi
cmpl $0x0, 0x6c(%rdx)
movq 0x20(%rdx), %rdi
leaq 0xf(%rsp), %rdx
je 0x7853d
callq 0x766e3
jmp 0x78542
movq 0x20(%rdx), %rdi
leaq 0x80(%rdx), %rsi
addq $0x88, %rdx
callq 0x77ba4
jmp 0x78520
movq 0x20(%rdx), %rdi
leaq 0x80(%rdx), %rsi
addq $0x88, %rdx
callq 0x77bea
testl %eax, %eax
jne 0x78544
jmp 0x78536
leaq 0x37695(%rip), %rdi     # 0xafbc2
movl %ebx, %esi
xorl %eax, %eax
callq 0x4030
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jmp 0x78544
callq 0x76c85
movl %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: best_hybrid_regression_tree_split
int best_hybrid_regression_tree_split(Regressionnodeptr node, Regtree_parameterptr param)
{
	/*!Last Changed 27.03.2005*/
	switch (param->modelselectionmethod)
	 {
	  case MODEL_SELECTION_CV :return best_hybrid_regression_tree_split_crossvalidation(node, param);
				                        break;
			case MODEL_SELECTION_AIC:
			case MODEL_SELECTION_BIC:return best_hybrid_regression_tree_split_aic_or_bic(node, param);
				                        break;
			case MODEL_SELECTION_UNI:return best_single_regression_tree_split(node, UNIVARIATE);
				                        break;
			case MODEL_SELECTION_LIN:return best_single_regression_tree_split(node, LINEAR);
				                        break;
			case MODEL_SELECTION_QUA:return best_single_regression_tree_split(node, QUADRATIC);
				                        break;
   default                 :printf(m1230, param->modelselectionmethod);
                            break;
	 }
	return LEAF_NODE;
}

// Assembly:
pushq %rax
movl 0x8(%rsi), %eax
cmpq $0x7, %rax
ja 0x785a6
movq %rdi, %rdx
leaq 0x376ec(%rip), %rcx     # 0xafc4c
movslq (%rcx,%rax,4), %rdi
addq %rcx, %rdi
jmpq *%rdi
movq %rdx, %rdi
callq 0x782cf
movl $0x1, %eax
jmp 0x785eb
movq 0x20(%rdx), %rdi
leaq 0x80(%rdx), %rsi
addq $0x88, %rdx
callq 0x77bea
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
sbbl %eax, %eax
orl $-0x3, %eax
jmp 0x785eb
movq %rdx, %rdi
popq %rax
jmp 0x77c75
leaq 0x375af(%rip), %rdi     # 0xafb5c
movl %eax, %esi
xorl %eax, %eax
callq 0x4030
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x785eb
movq %rdx, %rdi
xorl %esi, %esi
popq %rax
jmp 0x784be
movq 0x20(%rdx), %rdi
leaq 0x80(%rdx), %rsi
addq $0x88, %rdx
callq 0x77ba4
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
orl $-0x2, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: create_regtree
int create_regtree(Regressionnodeptr node, Regtree_parameterptr param)
{
	/*!Last Changed 09.12.2004 rewritten*/
 /*!Last Changed 11.04.2004*/
	if (!(can_be_divided_regression(node, param)))
   return 1;
	node->featureno = best_hybrid_regression_tree_split(node, param);
 if (!(make_regression_children(node, param->leaftype)))
   return 1;
 create_regtree(node->left, param);
 create_regtree(node->right, param);
 return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x7783d
testl %eax, %eax
je 0x78634
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7854c
movl %eax, 0x68(%r14)
movl (%rbx), %esi
movq %r14, %rdi
callq 0x77381
testl %eax, %eax
je 0x78634
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x785ed
movq 0x8(%r14), %r14
movq %r14, %rdi
movq %rbx, %rsi
jmp 0x785f7
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: inorder_traversal_regression_tree
void inorder_traversal_regression_tree(Regressionnodeptr node, int* index)
{
 if (node)
  { 
   inorder_traversal_regression_tree(node->left, index);
   node->x = *index;
   (*index)++;
   inorder_traversal_regression_tree(node->right, index);   
  }
}

// Assembly:
testq %rdi, %rdi
je 0x78678
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x78641
movl (%rbx), %eax
movl %eax, 0x90(%r14)
incl %eax
movl %eax, (%rbx)
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x78650
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: level_of_regression_tree
void level_of_regression_tree(Regressionnodeptr node)
{
 if (node)
  {
   if (node->parent)
     node->y = node->parent->y + 1;
   else
     node->y = 0;
   level_of_regression_tree(node->left);
   level_of_regression_tree(node->right);   
  }
}

// Assembly:
testq %rdi, %rdi
je 0x786af
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x78695
movl 0x94(%rax), %eax
incl %eax
jmp 0x78697
xorl %eax, %eax
movl %eax, 0x94(%rbx)
movq (%rbx), %rdi
callq 0x78679
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0x78682
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: soft_regtree_dimension_reduction
void soft_regtree_dimension_reduction(Regressionnodeptr node, char st[READLINELENGTH], int level)
{
 int i, count;
	if (node->featureno != LEAF_NODE)
	 {
   count = 0;
   for (i = 0; i < current_dataset->multifeaturecount; i++)
     if (node->w.values[i][0] != 0)
       count++;
   sprintf(st,"%s%d-%d;", st, level, count);
   soft_regtree_dimension_reduction(node->left, st, level + 1);
   soft_regtree_dimension_reduction(node->right, st, level + 1);
	 }
}

// Assembly:
cmpl $-0x1, 0x68(%rdi)
je 0x78752
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x5d19e(%rip), %r13     # 0xd5870
xorpd %xmm1, %xmm1
leaq 0x32320(%rip), %r12     # 0xaa9fd
movq (%r13), %rax
movslq 0x1c0(%rax), %rax
movl $0x0, %r8d
testq %rax, %rax
jle 0x78719
movq 0x38(%r15), %rcx
xorl %edx, %edx
xorl %r8d, %r8d
movq (%rcx,%rdx,8), %rsi
movsd (%rsi), %xmm0
cmpneqsd %xmm1, %xmm0
movq %xmm0, %rsi
subl %esi, %r8d
incq %rdx
cmpq %rdx, %rax
jne 0x786fc
movq %r14, %rdi
movq %r12, %rsi
movq %r14, %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x41b0
movq (%r15), %rdi
incl %ebx
movq %r14, %rsi
movl %ebx, %edx
callq 0x786b0
xorpd %xmm1, %xmm1
movq 0x8(%r15), %r15
cmpl $-0x1, 0x68(%r15)
jne 0x786dd
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: depth_of_regression_tree
int depth_of_regression_tree(Regressionnodeptr node)
{
 /*!Last Changed 12.07.2006*/
 int leftdepth, rightdepth;
 if (node->featureno == LEAF_NODE)
   return 1;
 else
  {
   leftdepth = depth_of_regression_tree(node->left);
   rightdepth = depth_of_regression_tree(node->right);
   if (leftdepth >= rightdepth)
     return leftdepth + 1;
   else
     return rightdepth + 1;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $-0x1, 0x68(%rdi)
je 0x7877d
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x78753
movl %eax, %ebx
movq 0x8(%r14), %rdi
callq 0x78753
cmpl %eax, %ebx
jge 0x78784
incl %eax
movl %eax, %ebx
jmp 0x78786
movl $0x1, %ebx
jmp 0x78786
incl %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: estimate_sigma_square_with_heuristic
double estimate_sigma_square_with_heuristic(Instanceptr data)
{
	/*!Last Changed 02.03.2005*/
	double* values, difference = +INT_MAX, d;
	Instanceptr tmp;
	int size = data_size(data), i;
	values = safemalloc(size * sizeof(double), "estimate_sigma_square_with_heuristic", 4);
	tmp = data;
	i = 0;
	while (tmp)
	 {
		 values[i] = give_regressionvalue(tmp);
			tmp = tmp->next;
		 i++;
	 }
	qsort(values, size, sizeof(double), sort_function_double_ascending);
	for (i = 0; i < size - 1; i++)
	 {
		 d = values[i + 1] - values[i];
		 if ((!dequal(d, 0)) && d < difference)
				 difference = d;
	 }
	safe_free(values);
	return difference * difference;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r12
callq 0x30309
movl %eax, %ebx
movslq %eax, %r15
leaq (,%r15,8), %rdi
leaq 0x374f2(%rip), %rsi     # 0xafcbb
movl $0x4, %edx
callq 0x3a0e1
movq %rax, %r14
testq %r12, %r12
je 0x787fa
movq %r14, %r13
movq %r12, %rdi
callq 0x2f35e
movsd %xmm0, (%r13)
movq 0x10(%r12), %r12
addq $0x8, %r13
testq %r12, %r12
jne 0x787de
leaq -0x3e20e(%rip), %rcx    # 0x3a5f3
movl $0x8, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4240
cmpl $0x2, %r15d
jl 0x78862
decl %ebx
movsd 0x2ccf7(%rip), %xmm0    # 0xa5518
movsd %xmm0, (%rsp)
xorl %r15d, %r15d
movsd 0x8(%r14,%r15,8), %xmm0
subsd (%r14,%r15,8), %xmm0
xorps %xmm1, %xmm1
movsd %xmm0, 0x8(%rsp)
callq 0x39ab2
testl %eax, %eax
jne 0x78858
movsd 0x8(%rsp), %xmm0
minsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
incq %r15
cmpq %r15, %rbx
jne 0x78829
jmp 0x7886f
movsd 0x2ccae(%rip), %xmm0    # 0xa5518
movsd %xmm0, (%rsp)
movq %r14, %rdi
callq 0x3a180
movsd (%rsp), %xmm0
mulsd %xmm0, %xmm0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/regressiontree.c
// Function: estimate_sigma_square_with_knn
double estimate_sigma_square_with_knn(Instanceptr data, int nearcount)
{
	/*!Last Changed 01.03.2005*/
	Instanceptr tmp, *nearestneighbors;
	int N = 0, i;
	double result = 0, yvalue, realvalue, h;
	tmp = data;
	while (tmp)
	 {
		 nearestneighbors = find_nearest_neighbors(data, tmp, nearcount);
			yvalue = 0;
			for (i = 0; i < nearcount; i++)
  			yvalue += give_regressionvalue(nearestneighbors[i]);
			yvalue /= nearcount;
			safe_free(nearestneighbors);
   realvalue = give_regressionvalue(tmp);
			result += (double) ((realvalue - yvalue) * (realvalue - yvalue));
			N++;
			tmp = tmp->next;
	 }
	h = pow(N, 0.8) / nearcount;
 return result / (N - h);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, %r14d
testq %rdi, %rdi
je 0x7896a
cvtsi2sd %r14d, %xmm0
movsd %xmm0, 0x18(%rsp)
movl %r14d, %r13d
xorpd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
xorl %ebp, %ebp
movq %rdi, %r15
movq %rdi, 0x20(%rsp)
movq %r15, %rsi
movl %r14d, %edx
callq 0x3151c
movq %rax, %r12
xorpd %xmm0, %xmm0
movl %r14d, %ebx
testl %r14d, %r14d
jle 0x78914
xorl %r14d, %r14d
movsd %xmm0, 0x8(%rsp)
movq (%r12,%r14,8), %rdi
callq 0x2f35e
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
incq %r14
cmpq %r14, %r13
jne 0x788e7
divsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r12, %rdi
callq 0x3a180
movq %r15, %rdi
callq 0x2f35e
subsd 0x8(%rsp), %xmm0
mulsd %xmm0, %xmm0
movsd 0x10(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
incl %ebp
movq 0x10(%r15), %r15
testq %r15, %r15
movq 0x20(%rsp), %rdi
movl %ebx, %r14d
jne 0x788ca
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
jmp 0x7897f
cvtsi2sd %r14d, %xmm0
movsd %xmm0, 0x18(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x2f3b9(%rip), %xmm1    # 0xa7d40
movsd %xmm0, 0x8(%rsp)
callq 0x42f0
divsd 0x18(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
movsd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/rise.c
// Function: most_specific_generalization
Decisionruleptr most_specific_generalization(Decisionruleptr rule, Instanceptr nearest)
{
 int fno;
 Decisionruleptr newrule;
 Decisionconditionptr current, before = NULL, next;
 newrule = create_copy_of_rule(rule);
 newrule->next = rule->next;
 current = newrule->start;
 while (current)
  {
   next = current->next;
   fno = current->featureindex;
   switch (current_dataset->features[fno].type)
    {
     case  STRING:if (nearest->values[fno].stringindex != current->value)
                    remove_condition_after(newrule, before, current);
                  else
                    before = current;
                  break;
     case INTEGER:if (nearest->values[fno].intvalue > current->upperlimit)
                    current->upperlimit = nearest->values[fno].intvalue;
                  else
                    if (nearest->values[fno].intvalue < current->lowerlimit)
                      current->lowerlimit = nearest->values[fno].intvalue;
                  before = current;
                  break;
     case    REAL:if (nearest->values[fno].floatvalue > current->upperlimit)
                    current->upperlimit = nearest->values[fno].floatvalue;
                  else
                    if (nearest->values[fno].floatvalue < current->lowerlimit)
                      current->lowerlimit = nearest->values[fno].floatvalue;
                  before = current;
                  break;
    }
   current = next;
  }
 return newrule;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r15
callq 0x7be1e
movq %rax, %r14
movq 0x30(%r15), %rax
movq %rax, 0x30(%r14)
movq 0x18(%r14), %r12
testq %r12, %r12
je 0x79f1d
leaq 0x5b9e9(%rip), %r13     # 0xd5870
movq (%r13), %rax
xorl %r15d, %r15d
movq %r12, %rdx
movq 0x48(%r12), %r12
movslq (%rdx), %rcx
imulq $0x340, %rcx, %rsi      # imm = 0x340
movl 0x30f08(%rax,%rsi), %esi
testl %esi, %esi
je 0x79ee8
cmpl $0x2, %esi
je 0x79ede
cmpl $0x1, %esi
jne 0x79f14
movq (%rbx), %rsi
xorps %xmm0, %xmm0
cvtsi2sdl (%rsi,%rcx,8), %xmm0
movsd 0x8(%rdx), %xmm1
ucomisd %xmm0, %xmm1
jne 0x79ecd
jnp 0x79f11
movq %r14, %rdi
movq %r15, %rsi
callq 0x7c7c4
movq (%r13), %rax
jmp 0x79f14
movq (%rbx), %rsi
movsd (%rsi,%rcx,8), %xmm0
jmp 0x79ef3
movq (%rbx), %rsi
xorps %xmm0, %xmm0
cvtsi2sdl (%rsi,%rcx,8), %xmm0
ucomisd 0x10(%rdx), %xmm0
jbe 0x79f01
movsd %xmm0, 0x10(%rdx)
jmp 0x79f11
movsd 0x18(%rdx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x79f11
movsd %xmm0, 0x18(%rdx)
movq %rdx, %r15
testq %r12, %r12
jne 0x79e8e
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/rise.c
// Function: nearest_example_not_covered
Instanceptr nearest_example_not_covered(Model_riseptr m, Decisionruleptr rule, Instanceptr instances)
{
 Instanceptr tmp, nearest = NULL;
 double distance, mindistance = +INT_MAX;
 tmp = instances;
 while (tmp)
  {
   if (give_classno(tmp) == rule->classno && !rule_cover_instance(tmp, *rule))
    {
     distance = distance_to_rule(m, tmp, rule);
     if (distance < mindistance)
      {
       mindistance = distance;
       nearest = tmp;
      }
    }
   tmp = tmp->next;
  }
 return nearest;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
testq %rdx, %rdx
je 0x79fc8
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movsd 0x2b5c9(%rip), %xmm0    # 0xa5518
movsd %xmm0, 0x40(%rsp)
xorl %r12d, %r12d
movq %rbx, %rdi
callq 0x2f33a
cmpl (%r14), %eax
jne 0x79fbd
movq 0x30(%r14), %rax
movq %rax, 0x30(%rsp)
movupd (%r14), %xmm0
movupd 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rsp)
movupd %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x7b9ee
testl %eax, %eax
jne 0x79fbd
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x79fda
movsd 0x40(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x79fbd
movq %rbx, %r12
movsd %xmm0, 0x40(%rsp)
movq 0x10(%rbx), %rbx
testq %rbx, %rbx
jne 0x79f58
jmp 0x79fcb
xorl %r12d, %r12d
movq %r12, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/rise.c
// Function: nearest_rule
Decisionruleptr nearest_rule(Model_riseptr m, Instanceptr instance, int leaveoneout)
{
 Decisionruleptr rule, nearest = NULL;
 double mindistance = +INT_MAX, distance, minlaplace = +INT_MAX, laplace;
 rule = m->rules.start;
 while (rule)
  {
   if (rule->covered + rule->falsepositives > 1 || !leaveoneout)
    {
     distance = distance_to_rule(m, instance, rule);
     if (distance < mindistance)
      {
       mindistance = distance;
       nearest = rule;
       minlaplace = laplace_estimate_of_rule_kclass(*rule);
      }
     else
       if (distance == mindistance)
        {
         laplace = laplace_estimate_of_rule_kclass(*rule);
         if (laplace < minlaplace)
          {
           minlaplace = laplace;
           nearest = rule;           
          }
         else
           if (laplace == minlaplace && m->counts[rule->classno] > m->counts[nearest->classno])
             nearest = rule;
        }
    }
   rule = rule->next;
  }
 return nearest;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq (%rdi), %r12
testq %r12, %r12
je 0x7a26e
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movsd 0x2b3b1(%rip), %xmm1    # 0xa5518
xorl %r13d, %r13d
movsd %xmm1, 0x48(%rsp)
testl %ebx, %ebx
je 0x7a187
movl 0x8(%r12), %eax
addl 0x4(%r12), %eax
cmpl $0x2, %eax
jl 0x7a25e
movsd %xmm1, 0x40(%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x79fda
movsd 0x48(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x7a1e4
movq 0x30(%r12), %rax
movq %rax, 0x30(%rsp)
movups (%r12), %xmm3
movsd %xmm0, 0x48(%rsp)
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm3, (%rsp)
callq 0x7cc35
movapd %xmm0, %xmm1
movq %r12, %r13
jmp 0x7a25e
ucomisd %xmm1, %xmm0
jne 0x7a231
jp 0x7a231
movq 0x30(%r12), %rax
movq %rax, 0x30(%rsp)
movupd (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
callq 0x7cc35
movsd 0x40(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x7a239
movq %r12, %r13
movapd %xmm0, %xmm1
jmp 0x7a25e
movsd 0x40(%rsp), %xmm1
jmp 0x7a25e
ucomisd %xmm1, %xmm0
jne 0x7a25e
jp 0x7a25e
movq 0x30(%r15), %rcx
movslq (%r12), %rax
movl (%rcx,%rax,4), %edx
movslq (%r13), %rsi
movq %r12, %rax
cmpl (%rcx,%rsi,4), %edx
jg 0x7a25b
movq %r13, %rax
movq %rax, %r13
movq 0x30(%r12), %r12
testq %r12, %r12
jne 0x7a170
jmp 0x7a271
xorl %r13d, %r13d
movq %r13, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/rise.c
// Function: create_rule_from_instance
Decisionruleptr create_rule_from_instance(Instanceptr inst)
{
 int i;
 Decisionruleptr result;
 Decisionconditionptr newcondition;
 result = empty_rule(give_classno(inst));
 for (i = 0; i < current_dataset->featurecount; i++)
   if (current_dataset->features[i].type != CLASSDEF)
    {
     newcondition = empty_condition();
     newcondition->conditiontype = UNIVARIATE_CONDITION;
     newcondition->featureindex = i;
     newcondition->freeparam = 1;
     switch (current_dataset->features[i].type)
      {
       case INTEGER:newcondition->lowerlimit = inst->values[i].intvalue;
                    newcondition->upperlimit = inst->values[i].intvalue;
                    newcondition->comparison = '*';
                    break;
       case    REAL:newcondition->lowerlimit = inst->values[i].floatvalue;
                    newcondition->upperlimit = inst->values[i].floatvalue;
                    newcondition->comparison = '*';
                    break;
       case  STRING:newcondition->comparison = '=';
                    newcondition->value = inst->values[i].stringindex;
                    break;
      }
     add_condition(result, newcondition);
    }
 return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x2f33a
movl %eax, %edi
callq 0x7bfd8
movq %rax, %r14
leaq 0x5b5cc(%rip), %r15     # 0xd5870
movq (%r15), %rax
cmpl $0x0, 0x1bc(%rax)
jle 0x7a35a
movl $0x61e1, %r12d          # imm = 0x61E1
xorl %r13d, %r13d
cmpl $0x3, (%rax,%r12,8)
je 0x7a343
xorl %eax, %eax
callq 0x7c366
movl %r13d, (%rax)
movq $0x1, 0x3c(%rax)
movq (%r15), %rcx
movl (%rcx,%r12,8), %ecx
cmpl $0x2, %ecx
je 0x7a31e
cmpl $0x1, %ecx
je 0x7a307
testl %ecx, %ecx
jne 0x7a335
movq (%rbx), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx,%r13,8), %xmm0
movsd %xmm0, 0x18(%rax)
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx,%r13,8), %xmm0
jmp 0x7a32c
movb $0x3d, 0x4(%rax)
movq (%rbx), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx,%r13,8), %xmm0
movsd %xmm0, 0x8(%rax)
jmp 0x7a335
movq (%rbx), %rcx
movsd (%rcx,%r13,8), %xmm0
movsd %xmm0, 0x18(%rax)
movsd %xmm0, 0x10(%rax)
movb $0x2a, 0x4(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x7c040
movq (%r15), %rax
incq %r13
movslq 0x1bc(%rax), %rcx
addq $0x68, %r12
cmpq %rcx, %r13
jl 0x7a2bd
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/rise.c
// Function: accuracy_of_ruleset
int accuracy_of_ruleset(Decisionruleptr* nearestrule, Instanceptr instances)
{
 int accuracy = 0, i = 0;
 Decisionruleptr rule;
 Instanceptr tmp;
 tmp = instances;
 while (tmp)
  {
   rule = nearestrule[i];
   if (rule)
    {
     if (give_classno(tmp) == rule->classno)
       accuracy++;
    }
   i++;
   tmp = tmp->next;
  }
 return accuracy;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x7a711
movq %rsi, %rbx
movq %rdi, %r14
xorl %ebp, %ebp
movq (%r14), %r15
testq %r15, %r15
je 0x7a702
movq %rbx, %rdi
callq 0x2f33a
xorl %ecx, %ecx
cmpl (%r15), %eax
sete %cl
addl %ecx, %ebp
movq 0x10(%rbx), %rbx
addq $0x8, %r14
testq %rbx, %rbx
jne 0x7a6e8
jmp 0x7a713
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/rule.c
// Function: complexity_of_ruleset
int complexity_of_ruleset(Ruleset set, int positive)
{
 /*!Last Changed 19.02.2005*/
	int result = 0;
	Decisionruleptr rule;
	rule = set.start;
	while (rule)
	 {
		 if (rule->classno == positive)
				 result += complexity_of_rule(rule);
		 rule = rule->next;
	 }
	return result; 
}

// Assembly:
movq 0x8(%rsp), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x7abdd
cmpl %edi, (%rcx)
jne 0x7abd7
movq 0x18(%rcx), %rsi
xorl %edx, %edx
testq %rsi, %rsi
je 0x7abd3
movl 0x3c(%rsi), %r8d
addl %r8d, %edx
incl %edx
movq 0x48(%rsi), %rsi
jmp 0x7abbf
addl %eax, %edx
movl %edx, %eax
movq 0x30(%rcx), %rcx
jmp 0x7abb0
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/rule.c
// Function: ruleset_complexity
int ruleset_complexity(Ruleset set)
{
 /*!Last Changed 20.02.2005*/
	int result = 0;
	Decisionruleptr rule;
	rule = set.start;
	while (rule)
	 {
			result += complexity_of_rule(rule);
		 rule = rule->next;
	 }
	return result;
}

// Assembly:
movq 0x8(%rsp), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x7ac12
movq 0x18(%rcx), %rsi
movl $0x0, %edx
testq %rsi, %rsi
je 0x7ac0a
xorl %edx, %edx
movl 0x3c(%rsi), %edi
addl %edi, %edx
incl %edx
movq 0x48(%rsi), %rsi
testq %rsi, %rsi
jne 0x7abfa
addl %edx, %eax
movq 0x30(%rcx), %rcx
jmp 0x7abe5
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/rule.c
// Function: description_length_of_rule
double description_length_of_rule(Decisionrule r, int possibleconditioncount)
{
 /*!Last Changed 02.12.2003*/
 double result = 0;
 if (r.decisioncount != 0)
   result += log2(r.decisioncount);
 if (log2(r.decisioncount) > 1)
   result += log2(log2(r.decisioncount));
 result += S(possibleconditioncount, r.decisioncount, (r.decisioncount + 0.0) / possibleconditioncount);
 return result / 2;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebp
movl 0x58(%rsp), %ebx
cvtsi2sd %ebx, %xmm0
testl %ebx, %ebx
je 0x7acca
movsd %xmm0, 0x10(%rsp)
callq 0x39bdc
xorpd %xmm1, %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
jmp 0x7acd4
xorpd %xmm1, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, 0x10(%rsp)
callq 0x39bdc
ucomisd 0x2a839(%rip), %xmm0    # 0xa5520
jbe 0x7ad09
movsd 0x10(%rsp), %xmm0
callq 0x39bdc
callq 0x39bdc
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
movsd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
movl %ebp, %edi
movl %ebx, %esi
callq 0x7ac13
addsd 0x8(%rsp), %xmm0
mulsd 0x2afe7(%rip), %xmm0    # 0xa5d18
addq $0x18, %rsp
popq %rbx
popq %rbp
retq