LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/decisiontree.c
// Function: log_likelihood_for_classification
double log_likelihood_for_classification(int classcounts[])
{
 /*!Last Changed 22.11.2004*/
 int i, sum = 0;
 double result = 0, p;
 for (i = 0; i < current_dataset->classno; i++)
   sum += classcounts[i];
 for (i = 0; i < current_dataset->classno; i++)
   if (classcounts[i] != 0)
    {
     p = classcounts[i] / (sum + 0.0);
     result += classcounts[i] * log2(p);
    }
 return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0xb5137(%rip), %r14     # 0xd2870
movq (%r14), %rax
movslq 0x10(%rax), %rax
xorps %xmm0, %xmm0
xorpd %xmm1, %xmm1
movsd %xmm1, 0x10(%rsp)
testq %rax, %rax
jle 0x1d76e
xorl %ecx, %ecx
xorl %edx, %edx
addl (%rbx,%rcx,4), %edx
incq %rcx
cmpq %rcx, %rax
jne 0x1d756
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
movsd %xmm1, 0x10(%rsp)
movq (%r14), %rax
cmpl $0x0, 0x10(%rax)
jle 0x1d7d2
xorps %xmm0, %xmm0
xorl %r15d, %r15d
movl (%rbx,%r15,4), %eax
testl %eax, %eax
je 0x1d7c3
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, 0x8(%rsp)
movapd %xmm1, %xmm0
divsd 0x10(%rsp), %xmm0
callq 0x38e99
mulsd 0x18(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
incq %r15
movq (%r14), %rax
movslq 0x10(%rax), %rax
cmpq %rax, %r15
jl 0x1d77d
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/decisiontree.c
// Function: information_gain
double information_gain(int ratio[2][MAXCLASSES])
{
 int sum[2] = {0,0},i,j;
 double res[2] = {0,0},p;
 for (j = 0; j < 2; j++)
  {
   for (i = 0; i < current_dataset->classno; i++)
     sum[j] += ratio[j][i];
   if (sum[j] == 0)
     return ISELL;
   for (i = 0; i < current_dataset->classno; i++)
     if (ratio[j][i] > 0)
      {
       p = ratio[j][i] / (sum[j] + 0.0);
       res[j] -= p * log2(p);
      }
  }
 return (res[0] * sum[0] + res[1] * sum[1]) / (sum[0] + sum[1]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq $0x0, 0x8(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
xorl %r15d, %r15d
leaq 0xb506b(%rip), %r14     # 0xd2870
movsd 0x854e3(%rip), %xmm0    # 0xa2cf0
movq (%r14), %rax
movslq 0x10(%rax), %rax
testq %rax, %rax
jle 0x1d830
movl 0x8(%rsp,%r15,4), %ecx
xorl %edx, %edx
addl (%rbx,%rdx,4), %ecx
incq %rdx
cmpq %rdx, %rax
jne 0x1d820
movl %ecx, 0x8(%rsp,%r15,4)
movl 0x8(%rsp,%r15,4), %eax
testl %eax, %eax
je 0x1d8ef
movq (%r14), %rcx
cmpl $0x0, 0x10(%rcx)
jle 0x1d8a5
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd %xmm1, 0x28(%rsp)
xorl %r12d, %r12d
movl (%rbx,%r12,4), %eax
testl %eax, %eax
jle 0x1d896
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
callq 0x38e99
movsd 0x10(%rsp,%r15,8), %xmm1
mulsd 0x30(%rsp), %xmm0
subsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp,%r15,8)
movsd 0x8545a(%rip), %xmm0    # 0xa2cf0
incq %r12
movq (%r14), %rax
movslq 0x10(%rax), %rax
cmpq %rax, %r12
jl 0x1d856
leaq 0x1(%r15), %rax
addq $0xc8, %rbx
testq %r15, %r15
movq %rax, %r15
je 0x1d80d
movl 0x8(%rsp), %eax
movl 0xc(%rsp), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
mulsd 0x18(%rsp), %xmm1
mulsd 0x10(%rsp), %xmm0
addsd %xmm1, %xmm0
addl %eax, %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
divsd %xmm1, %xmm0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/decisiontree.c
// Function: get_initial_partition
Partition get_initial_partition(Instanceptr instances)
{
 /*!Last Changed 02.02.2004 added safemalloc*/
 /*!Last Changed 26.01.2003*/
 Partition result;
 int i, count;
 result.classes = get_classes(instances, &count);
 result.count = count;
 result.assignments = (int *)safemalloc(count*sizeof(int), "get_initial_partition", 5);
 if (count == 2)
  {
   result.assignments[0] = LEFT;
   result.assignments[1] = RIGHT;
  }
 else
   for (i = 0; i < count; i++)
     result.assignments[i] = myrand() % 2;
 return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r15
movq %rsi, %rdi
movq %r15, %rsi
callq 0x30f5c
movq %rax, (%rbx)
movslq (%r15), %rdi
movl %edi, 0x10(%rbx)
shlq $0x2, %rdi
leaq 0x86f4e(%rip), %rsi     # 0xa4912
movl $0x5, %edx
callq 0x390f5
movq %rax, %r14
movq %rax, 0x8(%rbx)
cmpl $0x2, (%r15)
jne 0x1d9ea
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, (%r14)
jmp 0x1da18
cmpl $0x0, 0xc(%rsp)
jle 0x1da18
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x39f18
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
andl $-0x2, %ecx
subl %ecx, %eax
movl %eax, (%r14,%r15,4)
incq %r15
movslq 0xc(%rsp), %rax
cmpq %rax, %r15
jl 0x1d9f4
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/decisiontree.c
// Function: get_start_partition
Partition get_start_partition(Instanceptr instances, int leftclass)
{
 /*!Last Changed 02.02.2004 added safemalloc*/
 /*!Last Changed 29.12.2003*/
 /*!Last Changed 04.02.2003*/
 Partition result;
 int i, count;
 result.classes = get_classes(instances, &count);
 result.count = count;
 result.assignments = (int *)safemalloc(count*sizeof(int), "get_start_partition", 5);
 for (i = 0; i < count; i++)
   result.assignments[i] = RIGHT;
 for (i = 0; i < count; i++)
   if (result.classes[i] == leftclass)
    {
     result.assignments[i] = LEFT;
     break;
    }
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
leaq 0x4(%rsp), %r15
movq %rsi, %rdi
movq %r15, %rsi
callq 0x30f5c
movq %rax, %r14
movq %rax, (%rbx)
movslq (%r15), %rdi
movl %edi, 0x10(%rbx)
shlq $0x2, %rdi
leaq 0x86ed0(%rip), %rsi     # 0xa4928
movl $0x5, %edx
callq 0x390f5
movq %rax, 0x8(%rbx)
movl (%r15), %ecx
testl %ecx, %ecx
jle 0x1da83
xorl %edx, %edx
movl $0x1, (%rax,%rdx,4)
incq %rdx
movslq 0x4(%rsp), %rcx
cmpq %rcx, %rdx
jl 0x1da6f
testl %ecx, %ecx
jle 0x1daa2
movl %ecx, %ecx
xorl %edx, %edx
cmpl %ebp, (%r14,%rdx,4)
je 0x1da9b
incq %rdx
cmpq %rdx, %rcx
jne 0x1da8b
jmp 0x1daa2
movl $0x0, (%rax,%rdx,4)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/decisiontree.c
// Function: soft_output_of_subdecisiontree
double soft_output_of_subdecisiontree(Decisionnodeptr subtree, double input1, double input2)
{
 double weight, output, multiplier;
 Decisionnodeptr tmpnode;
 if (subtree->featureno == LEAF_NODE)
  {
   if (subtree->leaftype == CONSTANTLEAF)
     output = subtree->w0;    
   else
     output = subtree->w.values[0][0] + subtree->w.values[1][0] * input1 + subtree->w.values[2][0] * input2; 
   multiplier = 1.0;
   tmpnode = subtree;
   while (tmpnode->parent)
    {
     weight = sigmoid(tmpnode->parent->w.values[0][0] + tmpnode->parent->w.values[1][0] * input1 + tmpnode->parent->w.values[2][0] * input2);
     if (tmpnode == tmpnode->parent->left)
       multiplier *= weight;
     else
       multiplier *= (1 - weight);
     tmpnode = tmpnode->parent;
    }
   return output * multiplier;   
  }
 else
   return soft_output_of_subdecisiontree(subtree->left, input1, input2) + soft_output_of_subdecisiontree(subtree->right, input1, input2);   
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpl $-0x1, 0x30(%rdi)
je 0x1dafa
movq (%rbx), %rdi
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, 0x10(%rsp)
callq 0x1dab0
movsd %xmm0, 0x8(%rsp)
movq 0x8(%rbx), %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
callq 0x1dab0
addsd 0x8(%rsp), %xmm0
jmp 0x1dbce
cmpl $0x0, 0x60(%rbx)
je 0x1db2f
movq 0x40(%rbx), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rdx
movsd (%rdx), %xmm2
mulsd %xmm0, %xmm2
addsd (%rcx), %xmm2
movq 0x10(%rax), %rax
movsd (%rax), %xmm3
mulsd %xmm1, %xmm3
addsd %xmm2, %xmm3
movsd %xmm3, 0x20(%rsp)
jmp 0x1db3a
movsd 0x48(%rbx), %xmm2
movsd %xmm2, 0x20(%rsp)
movq 0x18(%rbx), %rax
movsd 0x849da(%rip), %xmm2    # 0xa2520
testq %rax, %rax
je 0x1dbc4
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, 0x10(%rsp)
movsd %xmm2, 0x8(%rsp)
movq %rbx, %r14
movq 0x40(%rax), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rdx
movsd (%rdx), %xmm2
mulsd %xmm0, %xmm2
addsd (%rcx), %xmm2
movq 0x10(%rax), %rax
movsd (%rax), %xmm0
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
callq 0x54568
movq 0x18(%rbx), %rbx
cmpq (%rbx), %r14
je 0x1dba5
movsd 0x84983(%rip), %xmm1    # 0xa2520
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movsd 0x8(%rsp), %xmm2
mulsd %xmm0, %xmm2
movq 0x18(%rbx), %rax
testq %rax, %rax
movsd 0x18(%rsp), %xmm1
movsd 0x10(%rsp), %xmm0
jne 0x1db57
movsd 0x20(%rsp), %xmm0
mulsd %xmm2, %xmm0
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/decisiontree.c
// Function: depth_of_tree
int depth_of_tree(Decisionnodeptr node)
{
 /*!Last Changed 12.07.2006*/
 int i, maxdepth, depth, leftdepth, rightdepth;
 if (node->featureno == LEAF_NODE)
   return 1;
 else
  {
   if (node->featureno >= 0 && current_dataset->features[node->featureno].type == STRING)
    {
     maxdepth = -1;
     for (i = 0; i < current_dataset->features[node->featureno].valuecount; i++)
      { 
       depth = depth_of_tree(&(node->string[i]));
       if (depth > maxdepth)
         maxdepth = depth;
      }
     return maxdepth + 1;
    }
   else
    {
     leftdepth = depth_of_tree(node->left);
     rightdepth = depth_of_tree(node->right);
     if (leftdepth >= rightdepth)
       return leftdepth + 1;
     else
       return rightdepth + 1;     
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl 0x30(%rdi), %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
je 0x1dc5c
movq %rdi, %r14
testl %eax, %eax
js 0x1dc3f
leaq 0xb4c7a(%rip), %rcx     # 0xd2870
movq (%rcx), %rcx
imulq $0x340, %rax, %rax      # imm = 0x340
cmpl $0x1, 0x30f08(%rcx,%rax)
jne 0x1dc3f
addq $0x30f08, %rcx          # imm = 0x30F08
movslq 0x18(%rcx,%rax), %r15
testq %r15, %r15
jle 0x1dc6d
movq 0x10(%r14), %r14
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0x1dbd6
cmpl %ebx, %eax
cmovgl %eax, %ebx
addq $0x160, %r14            # imm = 0x160
decq %r15
jne 0x1dc24
jmp 0x1dc63
movq (%r14), %rdi
callq 0x1dbd6
movl %eax, %ebx
movq 0x8(%r14), %rdi
callq 0x1dbd6
cmpl %eax, %ebx
jge 0x1dc63
incl %eax
movl %eax, %ebx
jmp 0x1dc65
movl $0x1, %ebx
jmp 0x1dc65
incl %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
xorl %ebx, %ebx
jmp 0x1dc65
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/decisiontree.c
// Function: inorder_traversal_decision_tree
void inorder_traversal_decision_tree(Decisionnodeptr node, int* index)
{
 int i;
 if (node)
  {
   if (node->featureno >= 0 && current_dataset->features[node->featureno].type == STRING)
    {   
     for (i = 0; i < current_dataset->features[node->featureno].valuecount / 2; i++)
       inorder_traversal_decision_tree(&(node->string[i]), index);
     node->x = *index;
     (*index)++;     
     for (i = current_dataset->features[node->featureno].valuecount / 2; i < current_dataset->features[node->featureno].valuecount; i++)
       inorder_traversal_decision_tree(&(node->string[i]), index);
    }
   else
    {
     inorder_traversal_decision_tree(node->left, index);
     node->x = *index;
     (*index)++;
     inorder_traversal_decision_tree(node->right, index);        
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xb4be9(%rip), %r15     # 0xd2870
testq %r14, %r14
je 0x1dd96
movslq 0x30(%r14), %rax
testq %rax, %rax
js 0x1dcad
movq (%r15), %rcx
imulq $0x340, %rax, %rax      # imm = 0x340
cmpl $0x1, 0x30f08(%rcx,%rax)
je 0x1dcc9
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x1dc71
movl (%rbx), %eax
movl %eax, 0x134(%r14)
incl (%rbx)
movq 0x8(%r14), %r14
jmp 0x1dc87
movq (%r15), %rax
movslq 0x30(%r14), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
cmpl $0x2, 0x30f20(%rax,%rcx)
jl 0x1dd26
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x10(%r14), %rdi
addq %r12, %rdi
movq %rbx, %rsi
callq 0x1dc71
incq %r13
movq (%r15), %rax
movslq 0x30(%r14), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movl 0x30f20(%rax,%rcx), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
movslq %edx, %rcx
addq $0x160, %r12            # imm = 0x160
cmpq %rcx, %r13
jl 0x1dce7
movl (%rbx), %ecx
movl %ecx, 0x134(%r14)
incl (%rbx)
movslq 0x30(%r14), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movl 0x30f20(%rax,%rcx), %edx
movl %edx, %eax
shrl $0x1f, %eax
addl %edx, %eax
sarl %eax
movq (%r15), %rdx
cmpl 0x30f20(%rdx,%rcx), %eax
jge 0x1dd96
movslq %eax, %r12
imulq $0x160, %r12, %r13      # imm = 0x160
movq 0x10(%r14), %rdi
addq %r13, %rdi
movq %rbx, %rsi
callq 0x1dc71
incq %r12
movq (%r15), %rax
movslq 0x30(%r14), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movslq 0x30f20(%rax,%rcx), %rax
addq $0x160, %r13            # imm = 0x160
cmpq %rax, %r12
jl 0x1dd62
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/decisiontree.c
// Function: level_of_decision_tree
void level_of_decision_tree(Decisionnodeptr node)
{
 int i;
 if (node)
  {
   if (node->parent)
     node->y = node->parent->y + 1;
   else
     node->y = 0;
   if (node->featureno >= 0 && current_dataset->features[node->featureno].type == STRING)
     for (i = 0; i < current_dataset->features[node->featureno].valuecount; i++)
       level_of_decision_tree(&(node->string[i]));
   else
    {
     level_of_decision_tree(node->left);
     level_of_decision_tree(node->right);       
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xb4abe(%rip), %r14     # 0xd2870
testq %rbx, %rbx
je 0x1de50
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x1ddce
movl 0x138(%rax), %eax
incl %eax
jmp 0x1ddd0
xorl %eax, %eax
movl %eax, 0x138(%rbx)
movslq 0x30(%rbx), %rax
testq %rax, %rax
js 0x1ddf3
movq (%r14), %rcx
imulq $0x340, %rax, %rax      # imm = 0x340
cmpl $0x1, 0x30f08(%rcx,%rax)
je 0x1de01
movq (%rbx), %rdi
callq 0x1dda0
movq 0x8(%rbx), %rbx
jmp 0x1ddb2
movq (%r14), %rax
movslq 0x30(%rbx), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
cmpl $0x0, 0x30f20(%rax,%rcx)
jle 0x1de50
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x10(%rbx), %rdi
addq %r15, %rdi
callq 0x1dda0
incq %r12
movq (%r14), %rax
movslq 0x30(%rbx), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movslq 0x30f20(%rax,%rcx), %rax
addq $0x160, %r15            # imm = 0x160
cmpq %rax, %r12
jl 0x1de1f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/decisiontree.c
// Function: leaf_distribution
void leaf_distribution(Decisionnodeptr rootnode, int* counts)
{
 /*!Last Changed 01.10.2006 added decisiontree with single leaf node*/
 /*!Last Changed 13.07.2006*/
 int level, index;
 if (rootnode->featureno == LEAF_NODE)
  {
   level = level_of_node(rootnode);
   if (level == 0)
     index = 1;
   else
     if (rootnode->parent->left == rootnode) 
       if (rootnode->parent->right->featureno == LEAF_NODE)
         index = 2 * level;
       else
         index = 2 * level + 1;
     else
       if (rootnode->parent->left->featureno == LEAF_NODE)
         index = 2 * level;
       else
         index = 2 * level + 1;
   counts[index - 1]++;
  }
 else
  {
   leaf_distribution(rootnode->left, counts);
   leaf_distribution(rootnode->right, counts);
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpl $-0x1, 0x30(%r14)
je 0x1de8f
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x1de6d
movq 0x8(%r14), %r14
jmp 0x1de77
movl $0x2, %eax
movl $0x1, %ecx
movq %r14, %rdx
movq 0x18(%rdx), %rdx
addl $-0x2, %eax
decl %ecx
testq %rdx, %rdx
jne 0x1de9c
testl %ecx, %ecx
je 0x1decb
movq 0x18(%r14), %rcx
movq (%rcx), %rdx
cmpq %r14, %rdx
jne 0x1debe
movq 0x8(%rcx), %rdx
xorl %ecx, %ecx
cmpl $-0x1, 0x30(%rdx)
setne %cl
subl %eax, %ecx
jmp 0x1ded0
movl $0x1, %ecx
incl -0x4(%rbx,%rcx,4)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dimreduction.c
// Function: dimension_reduction_pca
Instanceptr dimension_reduction_pca(Datasetptr d, Instanceptr traindata, void* parameters, Datasetptr* new_dataset, char* new_dataset_name)
{
 /*!Last Changed 16.01.2008*/
 int howmany = 0;
 matrix eigenvectors, cov;
 double *eigenvalues;
 Instance mean;
 Pca_parameterptr ppca = (Pca_parameterptr) parameters;
 Instanceptr newlist;
 mean = find_mean(traindata);
 cov = covariance(traindata, mean);
 safe_free(mean.values);
 switch (ppca->reduction_type)
  {
   case REDUCTION_TYPE_FEATURE :eigenvalues = find_eigenvalues_eigenvectors_symmetric(&eigenvectors, cov);
                                if (ppca->featurecount <= d->multifeaturecount - 1)
                                  howmany = ppca->featurecount;
                                break;
   case REDUCTION_TYPE_VARIANCE:eigenvalues = find_eigenvalues_eigenvectors(&eigenvectors, cov, &howmany, ppca->variance_explained);
                                break;
  }
 safe_free(eigenvalues);
 newlist = reduce_dimension_of_instancelist(traindata, howmany, eigenvectors);
 *new_dataset = dimension_reduced_dataset(d, howmany + 1, newlist, new_dataset_name);
 matrix_free(eigenvectors);
 matrix_free(cov);
 return newlist;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r8, 0x68(%rsp)
movq %rcx, 0x70(%rsp)
movq %rdx, %rbx
movq %rsi, %rbp
movq %rdi, %r15
movl $0x0, 0x38(%rsp)
leaq 0x78(%rsp), %r14
movq %r14, %rdi
callq 0x12519
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbp, %rdi
callq 0x113c9
movq %rax, %r12
movq %rdx, %r13
movq (%r14), %rdi
callq 0x39194
cmpl $0x0, 0x10(%rbx)
je 0x1df69
movsd 0x8(%rbx), %xmm0
leaq 0x40(%rsp), %rdi
leaq 0x38(%rsp), %rcx
movq %r12, %rsi
movq %r13, %rdx
callq 0x415a9
jmp 0x1df88
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x41571
movl (%rbx), %ecx
cmpl 0x1c0(%r15), %ecx
jge 0x1df88
movl %ecx, 0x38(%rsp)
movq %r13, 0x50(%rsp)
movq %r12, 0x58(%rsp)
movq %r15, 0x60(%rsp)
movq %rax, %rdi
callq 0x39194
testq %rbp, %rbp
je 0x1dfed
movl 0x38(%rsp), %eax
movl %eax, 0x3c(%rsp)
movq 0x40(%rsp), %r15
movq 0x48(%rsp), %r12
xorl %ebx, %ebx
xorl %r14d, %r14d
movq %rbp, %rdi
movl 0x3c(%rsp), %esi
movq %r15, %rdx
movq %r12, %rcx
callq 0x1ea3a
movq %rax, %r13
testq %rbx, %rbx
je 0x1dfdc
movq %rax, 0x10(%r14)
movq %rbx, %r13
movq 0x10(%rbp), %rbp
movq %r13, %rbx
movq %rax, %r14
testq %rbp, %rbp
jne 0x1dfbb
jmp 0x1dff0
xorl %r13d, %r13d
movl 0x38(%rsp), %esi
incl %esi
movq 0x60(%rsp), %rdi
movq %r13, %rdx
movq 0x68(%rsp), %rcx
callq 0x15357
movq 0x70(%rsp), %rcx
movq %rax, (%rcx)
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x3dbad
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x3dbad
movq %r13, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dimreduction.c
// Function: dimension_reduction_mds
Instanceptr dimension_reduction_mds(Datasetptr d, Instanceptr traindata, void* parameters, Datasetptr* new_dataset, char* new_dataset_name)
{
 /*!Last Changed 17.01.2008*/
 int howmany;
 matrix eigenvectors, distancematrix, b;
 double *eigenvalues;
 Pca_parameterptr ppca = (Pca_parameterptr) parameters;
 Instanceptr newlist;
 distancematrix = distance_matrix(traindata);
 b = multi_dimensional_scaling(distancematrix);
 matrix_free(distancematrix);
 switch (ppca->reduction_type)
  {
   case REDUCTION_TYPE_FEATURE :eigenvalues = find_eigenvalues_eigenvectors_symmetric(&eigenvectors, b);
                                howmany = ppca->featurecount;
                                break;
   case REDUCTION_TYPE_VARIANCE:eigenvalues = find_eigenvalues_eigenvectors(&eigenvectors, b, &howmany, ppca->variance_explained);
                                break;
  }
 matrix_free(b);
 newlist = reduce_dimension_of_instancelist_mds(traindata, howmany, eigenvectors, eigenvalues);
 *new_dataset = dimension_reduced_dataset(d, howmany + 1, newlist, new_dataset_name);
 return newlist;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, 0x18(%rsp)
movq %rcx, 0x20(%rsp)
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, 0x10(%rsp)
movq %rsi, %rdi
callq 0x10b04
movq %rax, %r14
movq %rdx, %r15
movq %rax, %rdi
movq %rdx, %rsi
callq 0x1eea5
movq %rax, %r13
movq %rdx, %rbp
movq %r14, %rdi
movq %r15, %rsi
callq 0x3dbad
movl 0x10(%rbx), %eax
cmpl $0x1, %eax
je 0x1e295
testl %eax, %eax
jne 0x1e2b2
leaq 0x28(%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x41571
movq %rax, %r14
movl (%rbx), %eax
movl %eax, 0xc(%rsp)
jmp 0x1e2b2
movsd 0x8(%rbx), %xmm0
leaq 0x28(%rsp), %rdi
leaq 0xc(%rsp), %rcx
movq %r13, %rsi
movq %rbp, %rdx
callq 0x415a9
movq %rax, %r14
movq %r13, %rdi
movq %rbp, %rsi
callq 0x3dbad
movl 0xc(%rsp), %esi
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq %r12, %rdi
movq %r14, %r8
callq 0x1ed39
movq %rax, %rbx
movl 0xc(%rsp), %esi
incl %esi
movq 0x10(%rsp), %rdi
movq %rax, %rdx
movq 0x18(%rsp), %rcx
callq 0x15357
movq 0x20(%rsp), %rcx
movq %rax, (%rcx)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dimreduction.c
// Function: dimension_reduction_lle
Instanceptr dimension_reduction_lle(Datasetptr d, Instanceptr traindata, void* parameters, Datasetptr* new_dataset, char* new_dataset_name)
{
 /*!Last Changed 19.01.2008*/
 int howmany;
 matrix eigenvectors, neighborhood, w, M;
 double *eigenvalues;
 Isomap_parameterptr pisomap = (Isomap_parameterptr) parameters;
 Instanceptr newlist; 
 switch (pisomap->neighborhood_type)
  {
   case NEIGHBORHOOD_TYPE_EPSILON:neighborhood = determine_neighborhood_epsilon(traindata, pisomap->epsilon);
                                  break;
   case       NEIGHBORHOOD_TYPE_K:neighborhood = determine_neighborhood_k(traindata, pisomap->k);
                                  break;
  }
 w = local_contributions_of_neighbors(d, traindata, neighborhood);
 matrix_free(neighborhood);
 M = calculate_m_for_lle(w);
 matrix_free(w);
 switch (pisomap->ppca.reduction_type)
  {
   case REDUCTION_TYPE_FEATURE :eigenvalues = find_eigenvalues_eigenvectors_symmetric(&eigenvectors, M);
                                howmany = pisomap->ppca.featurecount;
                                break;
   case REDUCTION_TYPE_VARIANCE:eigenvalues = find_eigenvalues_eigenvectors(&eigenvectors, M, &howmany, 1 - pisomap->ppca.variance_explained);
                                break;
  }
 matrix_free(M);
 newlist = reduce_dimension_of_instancelist_lle(traindata, howmany, eigenvectors, eigenvalues);
 *new_dataset = dimension_reduced_dataset(d, howmany + 1, newlist, new_dataset_name);
 return newlist;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %r15
movl 0x24(%rdx), %eax
cmpl $0x1, %eax
movq %rcx, 0x8(%rsp)
movq %r8, 0x20(%rsp)
je 0x1e4a0
testl %eax, %eax
jne 0x1e4b4
movsd 0x18(%r13), %xmm0
movq %r12, %rdi
callq 0x1e996
jmp 0x1e4ac
movl 0x20(%r13), %esi
movq %r12, %rdi
callq 0x1e79d
movq %rax, %rbx
movq %rdx, %r14
jmp 0x1e4b4
movq %r15, 0x18(%rsp)
movq %r15, %rdi
movq %r12, 0x10(%rsp)
movq %r12, %rsi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x1f15d
movq %rax, %r15
movq %rdx, %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3dbad
movq %r15, %rdi
movq %r12, %rsi
callq 0x1f28e
movq %rax, %rbp
movq %rdx, %rbx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3dbad
movl 0x10(%r13), %eax
cmpl $0x1, %eax
je 0x1e52b
testl %eax, %eax
movq 0x8(%rsp), %r15
jne 0x1e556
leaq 0x28(%rsp), %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x41571
movq %rax, %r14
movl (%r13), %eax
movl %eax, 0x4(%rsp)
jmp 0x1e556
movsd 0x83fed(%rip), %xmm0    # 0xa2520
subsd 0x8(%r13), %xmm0
leaq 0x28(%rsp), %rdi
leaq 0x4(%rsp), %rcx
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x415a9
movq %rax, %r14
movq 0x8(%rsp), %r15
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x3dbad
movl 0x4(%rsp), %esi
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rcx
movq 0x10(%rsp), %rdi
movq %r14, %r8
callq 0x1ee0a
movq %rax, %rbx
movl 0x4(%rsp), %esi
incl %esi
movq 0x18(%rsp), %rdi
movq %rax, %rdx
movq 0x20(%rsp), %rcx
callq 0x15357
movq %rax, (%r15)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dimreduction.c
// Function: prepare_dimension_reduction_algorithm_parameters
void* prepare_dimension_reduction_algorithm_parameters(DIMENSION_REDUCTION_NAME algorithm)
{
 /*!Last Changed 12.01.2008*/
 Pca_parameterptr ppca;
 Isomap_parameterptr pisomap;
 switch (algorithm)
  {
   case PCA   :
   case LDA   :
   case MDS   :ppca = safemalloc(sizeof(Pca_parameter), "prepare_dimension_reduction_algorithm_parameters", 4);
               ppca->featurecount = get_parameter_i("reducedfeaturecount");
               ppca->variance_explained = get_parameter_f("variance_explained");
               ppca->reduction_type = get_parameter_l("dimensionreducetype");
               return ppca;
               break;
   case ISOMAP:
   case    LLE:pisomap = safemalloc(sizeof(Isomap_parameter), "prepare_dimension_reduction_algorithm_parameters", 12);
               pisomap->ppca.featurecount = get_parameter_i("reducedfeaturecount");
               pisomap->ppca.variance_explained = get_parameter_f("variance_explained");
               pisomap->ppca.reduction_type = get_parameter_l("dimensionreducetype");
               pisomap->epsilon = get_parameter_f("epsilon");
               pisomap->k = get_parameter_i("nearcount");
               pisomap->neighborhood_type = get_parameter_l("neighborhoodtype");
               return pisomap;
               break;
  }
 return NULL;
}

// Assembly:
pushq %rbx
cmpl $0x3, %edi
jae 0x1e5fe
leaq 0x8639a(%rip), %rsi     # 0xa4953
movl $0x18, %edi
movl $0x4, %edx
callq 0x390f5
movq %rax, %rbx
leaq 0x863b2(%rip), %rdi     # 0xa4984
callq 0x5341c
movl %eax, (%rbx)
leaq 0x842bb(%rip), %rdi     # 0xa289b
callq 0x534b6
movsd %xmm0, 0x8(%rbx)
leaq 0x863a7(%rip), %rdi     # 0xa4998
callq 0x535f7
movl %eax, 0x10(%rbx)
jmp 0x1e680
addl $-0x3, %edi
cmpl $0x2, %edi
jae 0x1e67e
leaq 0x86346(%rip), %rsi     # 0xa4953
movl $0x28, %edi
movl $0xc, %edx
callq 0x390f5
movq %rax, %rbx
leaq 0x8635e(%rip), %rdi     # 0xa4984
callq 0x5341c
movl %eax, (%rbx)
leaq 0x84267(%rip), %rdi     # 0xa289b
callq 0x534b6
movsd %xmm0, 0x8(%rbx)
leaq 0x86353(%rip), %rdi     # 0xa4998
callq 0x535f7
movl %eax, 0x10(%rbx)
leaq 0x843f7(%rip), %rdi     # 0xa2a4b
callq 0x534b6
movsd %xmm0, 0x18(%rbx)
leaq 0x841cd(%rip), %rdi     # 0xa2832
callq 0x5341c
movl %eax, 0x20(%rbx)
leaq 0x86338(%rip), %rdi     # 0xa49ac
callq 0x535f7
movl %eax, 0x24(%rbx)
jmp 0x1e680
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dimreduction.c
// Function: minimum_k_neighborhood
int minimum_k_neighborhood(Instanceptr inst)
{
 /*!Last Changed 08.04.2008 rewritten*/
 /*!Last Changed 04.04.2008*/
 int k, size = data_size(inst), upper, lower, mean;
 matrix graph;
 for (k = 1; k < size; k *= 2)
  {
   graph = determine_neighborhood_k(inst, k);
   if (is_graph_connected(graph))
    {
     matrix_free(graph);
     break;
    }
   matrix_free(graph);
  }
 if (k > size)
   upper = size;
 else
   upper = k;
 lower = k / 2;
 mean = (upper + lower) / 2;
 while (mean != lower)
  {
   graph = determine_neighborhood_k(inst, mean);
   if (is_graph_connected(graph))
     upper = mean;
   else
     lower = mean;
   mean = (upper + lower) / 2;     
   matrix_free(graph);
  }
 return upper;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, (%rsp)
callq 0x2fa14
movl %eax, %r14d
movl $0x1, %ebp
cmpl $0x2, %eax
jl 0x1e724
movq (%rsp), %rdi
movl %ebp, %esi
callq 0x1e79d
movq %rax, %r15
movq %rdx, %r12
movq %rax, %rdi
movq %rdx, %rsi
callq 0x1ad4a
movl %eax, %r13d
movq %r15, %rdi
movq %r12, %rsi
callq 0x3dbad
testl %r13d, %r13d
jne 0x1e724
addl %ebp, %ebp
cmpl %r14d, %ebp
jl 0x1e6ee
cmpl %r14d, %ebp
cmovll %ebp, %r14d
movl %ebp, %r13d
shrl $0x1f, %r13d
addl %ebp, %r13d
sarl %r13d
leal (%r14,%r13), %eax
movl %eax, %ebp
shrl $0x1f, %ebp
addl %eax, %ebp
sarl %ebp
cmpl %r13d, %ebp
je 0x1e78b
movq (%rsp), %rdi
movl %ebp, %esi
callq 0x1e79d
movq %rax, %r15
movq %rdx, %r12
movq %rax, %rdi
movq %rdx, %rsi
callq 0x1ad4a
testl %eax, %eax
jne 0x1e770
movl %ebp, %r13d
movl %r14d, %ebp
movl %ebp, %r14d
leal (%r14,%r13), %ebx
movq %r15, %rdi
movq %r12, %rsi
callq 0x3dbad
movl %ebx, %ebp
shrl $0x1f, %ebp
addl %ebx, %ebp
jmp 0x1e743
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dimreduction.c
// Function: determine_neighborhood_k
matrix determine_neighborhood_k(Instanceptr data, int k)
{
 /*!Last Changed 08.04.2008*/
 /*!Last Changed 19.01.2008*/
 int i, j, size;
 double threshold;
 Instanceptr temp1, temp2;
 matrix result;
 size = data_size(data);
 result = matrix_alloc(size, size);
 for (i = 0, temp1 = data; i < size; i++, temp1 = temp1->next)
  {
   threshold = find_k_nearest_neighbor_distance(data, temp1, k);  
   for (j = 0, temp2 = data; j < size; j++, temp2 = temp2->next)
     if (i != j && distance_between_instances(temp1, temp2) < threshold + DBL_DELTA)
       result.values[i][j] = 1;
     else
       result.values[i][j] = 0;
  }
 for (i = 0; i < size; i++)
   for (j = i + 1; j < size; j++)
     if (result.values[i][j] != result.values[j][i])
       result.values[i][j] = result.values[j][i] = 1;
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %esi, 0xc(%rsp)
movq %rdi, 0x10(%rsp)
callq 0x2fa14
movl %eax, %ebx
movl %eax, %edi
movl %eax, %esi
callq 0x3c6e5
movq %rax, 0x18(%rsp)
movq %rdx, %r14
movl %ebx, %r12d
movl %ebx, 0x8(%rsp)
testl %ebx, %ebx
jle 0x1e84b
xorl %ebp, %ebp
movq 0x10(%rsp), %r13
movq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
movl 0xc(%rsp), %edx
callq 0x31014
addsd 0x845de(%rip), %xmm0    # 0xa2dd8
movsd %xmm0, 0x20(%rsp)
xorl %ebx, %ebx
cmpq %rbx, %rbp
je 0x1e826
movq %r13, %rdi
movq %r15, %rsi
callq 0x2f4ea
movsd 0x20(%rsp), %xmm1
ucomisd %xmm0, %xmm1
movsd 0x83cfc(%rip), %xmm0    # 0xa2520
ja 0x1e82a
xorpd %xmm0, %xmm0
movq (%r14,%rbp,8), %rax
movsd %xmm0, (%rax,%rbx,8)
incq %rbx
movq 0x10(%r15), %r15
cmpq %rbx, %r12
jne 0x1e802
incq %rbp
movq 0x10(%r13), %r13
cmpq %r12, %rbp
jne 0x1e7de
cmpl $0x0, 0x8(%rsp)
jle 0x1e8b2
xorl %eax, %eax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %r12, %rdx
movq %r14, %rsi
xorl %edi, %edi
movq %rdi, %r8
incq %rdi
cmpq %r12, %rdi
jae 0x1e8a2
movq (%r14,%r8,8), %r9
addq %rax, %r9
movl $0x1, %r10d
movsd (%r9,%r10,8), %xmm0
movq (%rsi,%r10,8), %r11
ucomisd (%r11,%r8,8), %xmm0
jne 0x1e892
jnp 0x1e89a
movq %rcx, (%r11,%r8,8)
movq %rcx, (%r9,%r10,8)
incq %r10
cmpq %r10, %rdx
jne 0x1e87e
addq $0x8, %rsi
addq $0x8, %rax
decq %rdx
cmpq %r12, %rdi
jne 0x1e866
movq 0x18(%rsp), %rax
movq %r14, %rdx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dimreduction.c
// Function: minimum_epsilon_neighborhood
double minimum_epsilon_neighborhood(Instanceptr inst)
{
 /*!Last Changed 04.04.2008*/
 int i; 
 double epsilonmin = 0, epsilonmax, epsilonmean, epsilon;
 matrix graph, distancematrix = distance_matrix(inst);
 epsilonmax = matrix_max(distancematrix);
 matrix_free(distancematrix);
 epsilonmean = (epsilonmin + epsilonmax) / 2;
 epsilon = epsilonmax;
 for (i = 0; i < 30; i++)
  {
   graph = determine_neighborhood_epsilon(inst, epsilonmean);
   if (is_graph_connected(graph))
    {
     epsilon = epsilonmean;
     epsilonmax = epsilonmean;
    }
   else
     epsilonmin = epsilonmean;
   epsilonmean = (epsilonmax + epsilonmin) / 2;
   matrix_free(graph);
  }
 return epsilon;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
callq 0x10b04
movq %rax, %r14
movq %rdx, %r15
movq %rax, %rdi
movq %rdx, %rsi
callq 0x3ed86
movsd %xmm0, (%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3dbad
xorpd %xmm2, %xmm2
movsd (%rsp), %xmm0
xorpd %xmm1, %xmm1
movsd %xmm1, 0x10(%rsp)
addsd %xmm2, %xmm0
movl $0x1e, %ebp
mulsd 0x843f8(%rip), %xmm0    # 0xa2d18
movq %rbx, %rdi
movsd %xmm0, 0x8(%rsp)
callq 0x1e996
movq %rax, %r14
movq %rdx, %r15
movq %rax, %rdi
movq %rdx, %rsi
callq 0x1ad4a
testl %eax, %eax
je 0x1e956
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd 0x10(%rsp), %xmm1
jmp 0x1e961
movsd 0x8(%rsp), %xmm1
movsd (%rsp), %xmm0
movsd %xmm1, 0x10(%rsp)
addsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3dbad
movsd 0x8(%rsp), %xmm0
decl %ebp
jne 0x1e918
movsd (%rsp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dimreduction.c
// Function: determine_neighborhood_epsilon
matrix determine_neighborhood_epsilon(Instanceptr data, double epsilon)
{
 /*!Last Changed 19.01.2008*/
 int i, j, size;
 Instanceptr temp1, temp2;
 matrix result;
 size = data_size(data);
 result = matrix_alloc(size, size);
 for (i = 0, temp1 = data; i < size; i++, temp1 = temp1->next)
   for (j = 0, temp2 = data; j < size; j++, temp2 = temp2->next)
     if (i != j && distance_between_instances(temp1, temp2) < epsilon)
       result.values[i][j] = 1;
     else
       result.values[i][j] = 0;
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movsd %xmm0, 0x10(%rsp)
movq %rdi, (%rsp)
callq 0x2fa14
movl %eax, %ebp
movl %eax, %edi
movl %eax, %esi
callq 0x3c6e5
movq %rax, 0x8(%rsp)
movq %rdx, %r15
testl %ebp, %ebp
jle 0x1ea23
movl %ebp, %ebp
xorl %r14d, %r14d
movq (%rsp), %r12
xorl %ebx, %ebx
movq (%rsp), %r13
cmpq %rbx, %r14
je 0x1e9fd
movq %r12, %rdi
movq %r13, %rsi
callq 0x2f4ea
movsd 0x10(%rsp), %xmm1
ucomisd %xmm0, %xmm1
movsd 0x83b25(%rip), %xmm0    # 0xa2520
ja 0x1ea01
xorpd %xmm0, %xmm0
movq (%r15,%r14,8), %rax
movsd %xmm0, (%rax,%rbx,8)
incq %rbx
movq 0x10(%r13), %r13
cmpq %rbx, %rbp
jne 0x1e9d9
incq %r14
movq 0x10(%r12), %r12
cmpq %rbp, %r14
jne 0x1e9d3
movq 0x8(%rsp), %rax
movq %r15, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dimreduction.c
// Function: reduce_dimension_of_instance
Instanceptr reduce_dimension_of_instance(Instanceptr inst, int howmany, matrix eigenvectors)
{
 /*!Last Changed 12.01.2008*/
 Instanceptr newinst;
 double sum;
 int i, j;
 newinst = empty_instance(howmany + 1);
 for (i = 0; i < howmany; i++)
  {
   sum = 0.0;
   for (j = 0; j < eigenvectors.row; j++)
     sum += eigenvectors.values[j][i] * real_feature(inst, j);
   newinst->values[i].floatvalue = sum;
  }
 newinst->values[howmany].stringindex = give_classno(inst);
 return newinst;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, 0x10(%rsp)
movl %esi, %ebx
movq %rdi, %r12
leal 0x1(%rbx), %edi
callq 0x152fc
movq %rax, 0x18(%rsp)
movq %rbx, 0x8(%rsp)
testl %ebx, %ebx
jle 0x1eae5
movl 0x8(%rsp), %ebx
movq 0x10(%rsp), %r13
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %r15d, %r15d
cmpl $0x0, 0x10(%rsp)
jle 0x1eacc
xorps %xmm0, %xmm0
xorl %ebp, %ebp
movsd %xmm0, (%rsp)
movq (%r14,%rbp,8), %rax
movsd (%rax,%r15,8), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %r12, %rdi
movl %ebp, %esi
callq 0x2e4b6
mulsd 0x20(%rsp), %xmm0
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd (%rsp), %xmm0
incq %rbp
cmpq %rbp, %r13
jne 0x1ea8a
jmp 0x1eacf
xorps %xmm0, %xmm0
movq 0x18(%rsp), %rax
movq (%rax), %rax
movsd %xmm0, (%rax,%r15,8)
incq %r15
cmpq %rbx, %r15
jne 0x1ea7e
movq %r12, %rdi
callq 0x2eaca
movq 0x18(%rsp), %rsi
movq (%rsi), %rcx
movslq 0x8(%rsp), %rdx
movl %eax, (%rcx,%rdx,8)
movq %rsi, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dimreduction.c
// Function: reduce_dimension_of_instancelist
Instanceptr reduce_dimension_of_instancelist(Instanceptr data, int howmany, matrix eigenvectors)
{
 /*!Last Changed 12.01.2008*/
 Instanceptr newlist = NULL, prev = NULL, newinst, tmp;
 tmp = data;
 while (tmp)
  {
   newinst = reduce_dimension_of_instance(tmp, howmany, eigenvectors);
   if (newlist)
     prev->next = newinst;
   else
     newlist = newinst;
   prev = newinst;
   tmp = tmp->next;
  }
 return newlist;
}

// Assembly:
testq %rdi, %rdi
je 0x1eb6d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %r15, %rdi
movl %ebp, %esi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x1ea3a
movq %rax, %rcx
testq %r12, %r12
je 0x1eb4f
movq %rcx, 0x10(%r13)
movq %r12, %rax
movq 0x10(%r15), %r15
movq %rax, %r12
movq %rcx, %r13
testq %r15, %r15
jne 0x1eb30
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dimreduction.c
// Function: matrix_to_instancelist
Instanceptr matrix_to_instancelist(matrix m, Instanceptr data)
{
 /*!Last Changed 16.01.2008*/
 Instanceptr newinst, newlist = NULL, tmp, prev = NULL; 
 int i, index = 0;
 tmp = data;
 while (tmp)
  {
   newinst = empty_instance(m.col + 1);
   for (i = 0; i < m.col; i++)
     newinst->values[i].floatvalue = m.values[index][i];
   newinst->values[m.col].stringindex = give_classno(tmp);
   if (newlist)
     prev->next = newinst;
   else
     newlist = newinst;
   prev = newinst;
   tmp = tmp->next;
   index++;
  }
 return newlist;
}

// Assembly:
testq %rdx, %rdx
je 0x1ec25
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r13
shrq $0x20, %r13
leal 0x1(%r13), %eax
movl %eax, 0x4(%rsp)
sarq $0x20, %rdi
xorl %ebp, %ebp
xorl %r12d, %r12d
xorl %r15d, %r15d
movq %rdi, 0x8(%rsp)
movq %r12, 0x10(%rsp)
movl 0x4(%rsp), %edi
callq 0x152fc
movq %rax, %r12
testl %r13d, %r13d
jle 0x1ebdf
xorl %eax, %eax
movq (%r14,%rbp,8), %rcx
movsd (%rcx,%rax,8), %xmm0
movq (%r12), %rcx
movsd %xmm0, (%rcx,%rax,8)
incq %rax
cmpq %rax, %r13
jne 0x1ebc5
movq %rbx, %rdi
callq 0x2eaca
movq (%r12), %rcx
movq 0x8(%rsp), %rdi
movl %eax, (%rcx,%rdi,8)
movq %r12, %rax
testq %r15, %r15
je 0x1ec07
movq 0x10(%rsp), %rax
movq %r12, 0x10(%rax)
movq %r15, %rax
movq 0x10(%rbx), %rbx
incq %rbp
movq %rax, %r15
testq %rbx, %rbx
jne 0x1ebad
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dimreduction.c
// Function: reduce_dimension_of_covariance_matrix
void reduce_dimension_of_covariance_matrix(matrix* covariance, int howmany, matrix eigenvectors)
{
 matrix reduced, treduced, S1;
 reduced = matrix_partial(eigenvectors, 0, eigenvectors.row - 1, 0, howmany);
 treduced = matrix_transpose(reduced);
 matrix_free(reduced);
 S1 = matrix_multiply(treduced, *covariance);
 reduced = matrix_transpose(treduced);
 matrix_free(treduced);
 *covariance = matrix_multiply(S1, reduced);
 matrix_free(S1);
 matrix_free(reduced);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r9d
movq %rdi, %rbx
leal -0x1(%rdx), %eax
movq %rdx, %rdi
movq %rcx, %rsi
xorl %edx, %edx
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x3daf9
movq %rax, %r14
movq %rdx, %r15
movq %rax, %rdi
movq %rdx, %rsi
callq 0x3dbba
movq %rax, %r12
movq %rdx, %r13
movq %r14, %rdi
movq %r15, %rsi
callq 0x3dbad
movq %rbx, (%rsp)
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movq %r12, %rdi
movq %r13, %rsi
callq 0x3dc8b
movq %rax, %r14
movq %rdx, %r15
movq %r12, %rdi
movq %r13, %rsi
callq 0x3dbba
movq %rax, %rbp
movq %rdx, %rbx
movq %r12, %rdi
movq %r13, %rsi
callq 0x3dbad
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3dc8b
movq (%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x3dbad
movq %rbp, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3dbad
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dimreduction.c
// Function: reduce_dimension_of_vector
void reduce_dimension_of_vector(matrix* vector, int howmany, matrix eigenvectors)
{
 matrix reduced, result;
 reduced = matrix_partial(eigenvectors, 0, eigenvectors.row - 1, 0, howmany);
 result = matrix_multiply(*vector, reduced);
 matrix_free(*vector);
 *vector = result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %r9d
movq %rdi, %rbx
leal -0x1(%rdx), %eax
movq %rdx, %rdi
movq %rcx, %rsi
xorl %edx, %edx
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x3daf9
movq %rdx, %rcx
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movq %rax, %rdx
callq 0x3dc8b
movq %rax, %r14
movq %rdx, %r15
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x3dbad
movq %r14, (%rbx)
movq %r15, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dimreduction.c
// Function: reduce_dimension_of_instancelist_mds
Instanceptr reduce_dimension_of_instancelist_mds(Instanceptr data, int howmany, matrix eigenvectors, double* eigenvalues)
{
 /*!Last Changed 18.01.2008*/
 matrix c, x, dsqrt;
 Instanceptr newlist;
 c = matrix_partial(eigenvectors, 0, eigenvectors.row - 1, 0, howmany - 1);
 matrix_free(eigenvectors);
 dsqrt = matrix_diagonal(eigenvalues, howmany); 
 safe_free(eigenvalues);
 matrix_cell_power(&dsqrt, 0.5);
 x = matrix_multiply(c, dsqrt);
 matrix_free(dsqrt);
 matrix_free(c);
 newlist = matrix_to_instancelist(x, data);
 matrix_free(x);
 return newlist;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %rbp
movl %esi, %ebx
movq %rdi, (%rsp)
leal -0x1(%rdx), %ecx
leal -0x1(%rbx), %r9d
movq %rdx, %rdi
movq %r13, %rsi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x3daf9
movq %rax, %r14
movq %rdx, %r15
movq %rbp, %rdi
movq %r13, %rsi
callq 0x3dbad
movq %r12, %rdi
movl %ebx, %esi
callq 0x3e994
leaq 0x8(%rsp), %rbx
movq %rax, (%rbx)
movq %rdx, 0x8(%rbx)
movq %r12, %rdi
callq 0x39194
movsd 0x83f74(%rip), %xmm0    # 0xa2d18
movq %rbx, %rdi
callq 0x3e8ec
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3dc8b
movq %rax, %r12
movq %rdx, %r13
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x3dbad
movq %r14, %rdi
movq %r15, %rsi
callq 0x3dbad
movq %r12, %rdi
movq %r13, %rsi
movq (%rsp), %rdx
callq 0x1eb70
movq %rax, %rbx
movq %r12, %rdi
movq %r13, %rsi
callq 0x3dbad
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dimreduction.c
// Function: reduce_dimension_of_instancelist_lle
Instanceptr reduce_dimension_of_instancelist_lle(Instanceptr data, int howmany, matrix eigenvectors, double* eigenvalues)
{
 /*!Last Changed 19.01.2008*/
 matrix M;
 Instanceptr newlist;
 int i = eigenvectors.row - 1;
 while (eigenvalues[i] == 0.0)
   i--;
 M = matrix_partial(eigenvectors, 0, eigenvectors.row - 1, i - howmany + 1, i);
 matrix_free(eigenvectors);
 safe_free(eigenvalues);
 newlist = matrix_to_instancelist(M, data);
 matrix_free(M);
 return newlist;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %rbx
leal -0x1(%rdx), %ecx
movslq %ecx, %rax
leaq (%r8,%rax,8), %rdx
xorl %eax, %eax
xorpd %xmm0, %xmm0
movsd (%rdx,%rax,8), %xmm1
decq %rax
ucomisd %xmm0, %xmm1
jne 0x1ee41
jnp 0x1ee31
leal (%r12,%rax), %r9d
movl %r12d, %edx
subl %esi, %edx
leal (%rdx,%rax), %r8d
incl %r8d
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3daf9
movq %rax, %r13
movq %rdx, %rbp
movq %r12, %rdi
movq %r15, %rsi
callq 0x3dbad
movq %r14, %rdi
callq 0x39194
movq %r13, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x1eb70
movq %rax, %rbx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x3dbad
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/dimreduction.c
// Function: multi_dimensional_scaling
matrix multi_dimensional_scaling(matrix distancematrix)
{
 /*!Last Changed 17.01.2008*/
 double *ddots, *drdot, ddotdot;
 matrix b;
 int r, s, N = distancematrix.row;
 b = matrix_alloc(N, N);
 matrix_cell_square(&distancematrix);
 ddotdot = matrix_sum_of_elements(distancematrix) / (N * N);
 ddots = matrix_average_columns(distancematrix);
 drdot = matrix_average_rows(distancematrix);
 for (r = 0; r < N; r++)
   for (s = 0; s < N; s++)
     b.values[r][s] = 0.5 * (drdot[r] + ddots[s] - ddotdot - distancematrix.values[r][s]);
 safe_free(ddots);
 safe_free(drdot);
 return b;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbp
leaq 0x8(%rsp), %r13
movq %rdi, (%r13)
movq %rsi, 0x8(%r13)
movslq %ebp, %r15
movl %r15d, %edi
movl %r15d, %esi
callq 0x3c6e5
movq %rax, %rbx
movq %rdx, %r14
movq %r13, %rdi
callq 0x3e957
movq (%r13), %rdi
movq 0x8(%r13), %rsi
callq 0x3e9ee
movsd %xmm0, (%rsp)
movq (%r13), %rdi
movq 0x8(%r13), %rsi
callq 0x3eab7
movq %rax, %r12
movq (%r13), %rdi
movq 0x8(%r13), %rsi
callq 0x3ece6
movsd (%rsp), %xmm2
movq %rax, %r13
testq %r15, %r15
jle 0x1ef71
imull %ebp, %ebp
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
divsd %xmm0, %xmm2
movq 0x10(%rsp), %rax
xorl %ecx, %ecx
movsd 0x83de0(%rip), %xmm0    # 0xa2d18
movq (%rax,%rcx,8), %rdx
movq (%r14,%rcx,8), %rsi
xorl %edi, %edi
movsd (%r13,%rcx,8), %xmm1
addsd (%r12,%rdi,8), %xmm1
subsd %xmm2, %xmm1
subsd (%rdx,%rdi,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rsi,%rdi,8)
incq %rdi
cmpq %rdi, %r15
jne 0x1ef42
incq %rcx
cmpq %r15, %rcx
jne 0x1ef38
movq %r12, %rdi
callq 0x39194
movq %r13, %rdi
callq 0x39194
movq %rbx, %rax
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq