LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/network.c
// Function: qsort_independence
void qsort_independence(double **result,int left,int right)
{
/*!Last Changed 11.02.2001*/
 int i,last;
 if (left>=right)
   return;
 swap_independence(result,left,(left+right)/2);
 last=left;
 for (i=left+1;i<=right;i++)
   if (result[i][2]>result[left][2])
    {
     last++;
     swap_independence(result,last,i);
    }
 swap_independence(result,left,last);
 qsort_independence(result,left,last-1);
 qsort_independence(result,last+1,right);
}

// Assembly:
cmpl %edx, %esi
jge 0x4ed11
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
movslq %edx, %r15
leal (%rsi,%rbx), %eax
movl %eax, %edx
shrl $0x1f, %edx
addl %eax, %edx
sarl %edx
movslq %esi, %rcx
movq (%r14,%rcx,8), %rax
movslq %edx, %rdx
movq (%r14,%rdx,8), %rdx
xorl %edi, %edi
movsd (%rax,%rdi,8), %xmm0
movsd (%rdx,%rdi,8), %xmm1
movsd %xmm1, (%rax,%rdi,8)
movsd %xmm0, (%rdx,%rdi,8)
incq %rdi
cmpq $0x3, %rdi
jne 0x4ec52
movq %rax, %rdx
movl %esi, %r12d
cmpl %ebx, %esi
jge 0x4eccb
movl %esi, %r12d
movq 0x8(%r14,%rcx,8), %rdx
movsd 0x10(%rdx), %xmm0
ucomisd 0x10(%rax), %xmm0
jbe 0x4ecbc
movslq %r12d, %rdi
incl %r12d
movq 0x8(%r14,%rdi,8), %rdi
xorl %r8d, %r8d
movsd (%rdi,%r8,8), %xmm0
movsd (%rdx,%r8,8), %xmm1
movsd %xmm1, (%rdi,%r8,8)
movsd %xmm0, (%rdx,%r8,8)
incq %r8
cmpq $0x3, %r8
jne 0x4ec9b
incq %rcx
cmpq %r15, %rcx
jne 0x4ec7c
movslq %r12d, %rcx
movq (%r14,%rcx,8), %rdx
xorl %ecx, %ecx
movsd (%rax,%rcx,8), %xmm0
movsd (%rdx,%rcx,8), %xmm1
movsd %xmm1, (%rax,%rcx,8)
movsd %xmm0, (%rdx,%rcx,8)
incq %rcx
cmpq $0x3, %rcx
jne 0x4eccd
leal -0x1(%r12), %edx
movq %r14, %rdi
callq 0x4ec1e
incl %r12d
movl %r12d, %esi
cmpl %ebx, %r12d
jl 0x4ec36
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/network.c
// Function: sort_independence
double **sort_independence(bayesiangraphptr mygraph)
{
	/*!Last Changed 02.02.2004 added safemalloc*/
 /*!Last Changed 21.01.2001*/
 int total=(mygraph->nodecount)*(mygraph->nodecount-1)/2,i,j,k;
 double **result;
 result = (double **)safemalloc_2d(sizeof(double *), sizeof(double), total, 3, "sort_independence", 3);
 k=0;
 for (i=0;i<mygraph->nodecount;i++)
   for (j=i+1;j<mygraph->nodecount;j++)
    {
     result[k][0]=i;
     result[k][1]=j;
     result[k][2]=mygraph->independence[i][j];
     k++;
    }
 qsort_independence(result,0,total-1);
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movl 0x10(%rdi), %eax
leal -0x1(%rax), %ecx
imull %eax, %ecx
movl %ecx, %ebx
shrl $0x1f, %ebx
addl %ecx, %ebx
sarl %ebx
leaq 0x5ba23(%rip), %r8      # 0xaa75c
movl $0x8, %r12d
movl $0x8, %edi
movl $0x8, %esi
movl %ebx, %edx
movl $0x3, %ecx
movl $0x3, %r9d
callq 0x3a3ac
movq %rax, %r15
movslq 0x10(%r14), %rax
testq %rax, %rax
jle 0x4ede3
movq %rax, %rcx
negq %rcx
xorl %esi, %esi
movl $0x1, %edx
xorl %edi, %edi
movq %rsi, %r8
incq %rsi
cmpq %rax, %rsi
jae 0x4edd7
xorps %xmm0, %xmm0
cvtsi2sd %r8d, %xmm0
movq 0x30(%r14), %r9
movslq %edi, %r10
movq (%r9,%r8,8), %r8
addq %r12, %r8
leaq (%rcx,%rdx), %r9
leaq (%r15,%r10,8), %r11
xorl %r10d, %r10d
movq (%r11,%r10,8), %r13
movsd %xmm0, (%r13)
leal (%rdx,%r10), %ebp
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
movsd %xmm1, 0x8(%r13)
movsd (%r8,%r10,8), %xmm1
movsd %xmm1, 0x10(%r13)
incq %r10
movq %r9, %r13
addq %r10, %r13
jne 0x4eda2
addl %r10d, %edi
incq %rdx
addq $0x8, %r12
cmpq %rax, %rsi
jne 0x4ed76
decl %ebx
movq %r15, %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0x4ec1e
movq %r15, %rax
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/network.c
// Function: cycle_now
int cycle_now(bayesiangraphptr mygraph,int from,int to)
{
/*!Last Changed 25.02.2001*/
/*Daha onceden fromdan toya bir arc vard. Bu arc yon degistirince cycle oluyor mu?*/
 int pos;
 pos=mygraph->nodes[to].pointer;
 while (pos!=-1)
  {
   if (from==mygraph->dest[pos])
     return 1;
   if (cycle_now(mygraph,from,mygraph->dest[pos]))
     return 1;
   pos=mygraph->arcs[pos].pointer;
  }
 return 0; 
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x8(%rdi), %rax
movslq %edx, %rcx
leaq (%rcx,%rcx,8), %rcx
movl 0x30(%rax,%rcx,8), %eax
cmpl $-0x1, %eax
je 0x4ee53
movl %esi, %ebx
movq %rdi, %r14
movq 0x28(%rdi), %r15
movl $0x1, %ebp
movslq %eax, %r12
movl (%r15,%r12,4), %edx
cmpl %ebx, %edx
je 0x4ee55
movq %r14, %rdi
movl %ebx, %esi
callq 0x4ee03
testl %eax, %eax
jne 0x4ee55
movq 0x18(%r14), %rax
movl (%rax,%r12,4), %eax
cmpl $-0x1, %eax
jne 0x4ee2d
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/network.c
// Function: add_arcs_according_to_ordering
void add_arcs_according_to_ordering(bayesiangraphptr mygraph,double **edges,int edgecount)
{
/*!Last Changed 13.03.2001*/
 int i,j,k;
 for (i = 0; i < edgecount; i++)
  {
   j = (int) edges[i][0];
   k = (int) edges[i][1];
   add_one_arc(mygraph);
   if (mygraph->ordering[j]>mygraph->ordering[k])
    {
     add_one_pointer(mygraph,&mygraph->nodes[j],k);
     add_parent_counts(mygraph,&mygraph->nodes[j],k);
    }
   else
    {
     add_one_pointer(mygraph,&mygraph->nodes[k],j);
     add_parent_counts(mygraph,&mygraph->nodes[k],j);
    }
  }
}

// Assembly:
testl %edx, %edx
jle 0x4f5c9
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r12d
xorl %r13d, %r13d
movq (%rbx,%r13,8), %rax
cvttsd2si (%rax), %ebp
cvttsd2si 0x8(%rax), %r15d
movq %r14, %rdi
callq 0x4e881
movq 0x8(%r14), %rax
movq 0x40(%r14), %rsi
movslq %ebp, %rcx
movl (%rsi,%rcx,4), %edi
movslq %r15d, %rdx
cmpl (%rsi,%rdx,4), %edi
jle 0x4f547
leaq (%rcx,%rcx,8), %rcx
leaq (%rax,%rcx,8), %rsi
movl 0x30(%rsi), %ecx
cmpl $-0x1, %ecx
je 0x4f572
movq 0x18(%r14), %rax
movslq %ecx, %rdx
movl (%rax,%rdx,4), %ecx
cmpl $-0x1, %ecx
jne 0x4f530
movl 0x20(%r14), %ecx
leal -0x1(%rcx), %edi
movl %edi, (%rax,%rdx,4)
jmp 0x4f57c
leaq (%rdx,%rdx,8), %rcx
leaq (%rax,%rcx,8), %rsi
movl 0x30(%rsi), %ecx
cmpl $-0x1, %ecx
je 0x4f590
movq 0x18(%r14), %rax
movslq %ecx, %rdx
movl (%rax,%rdx,4), %ecx
cmpl $-0x1, %ecx
jne 0x4f55b
movl 0x20(%r14), %ecx
leal -0x1(%rcx), %edi
movl %edi, (%rax,%rdx,4)
jmp 0x4f59a
movl 0x20(%r14), %ecx
leal -0x1(%rcx), %eax
movl %eax, 0x30(%rsi)
movq 0x28(%r14), %rax
movslq %ecx, %rcx
movl %r15d, -0x4(%rax,%rcx,4)
movq %r14, %rdi
movl %r15d, %edx
jmp 0x4f5aa
movl 0x20(%r14), %ecx
leal -0x1(%rcx), %eax
movl %eax, 0x30(%rsi)
movq 0x28(%r14), %rax
movslq %ecx, %rcx
movl %ebp, -0x4(%rax,%rcx,4)
movq %r14, %rdi
movl %ebp, %edx
callq 0x4e964
incq %r13
cmpq %r12, %r13
jne 0x4f4f0
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/network.c
// Function: load_network
void load_network(char *filename)
{
 int i = net_extension(filename);
 bayesiangraphptr newnetwork = NULL;
 switch (i)
  {
   case NET_FILE  :newnetwork = (bayesiangraphptr)read_network_net(filename);
                   break;
   case XML_FILE  :newnetwork = (bayesiangraphptr)read_network_xml(filename);
                   break;
   case HUGIN_FILE:newnetwork = (bayesiangraphptr)read_network_hugin(filename);
                   break;
   case BIF_FILE  :newnetwork = (bayesiangraphptr)read_network_bif(filename);
                   break;
 };
 if (newnetwork==NULL)
  {
   printf(m1044);
   return;
  }
 add_network(newnetwork);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x38e26
cmpl $0x3, %eax
ja 0x4fc34
movl %eax, %eax
leaq 0x5ab58(%rip), %rcx     # 0xaa71c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
callq 0x71cc9
jmp 0x4fbf3
movq %rbx, %rdi
callq 0x711fc
jmp 0x4fbf3
movq %rbx, %rdi
callq 0x70c50
jmp 0x4fbf3
movq %rbx, %rdi
callq 0x7152e
movq %rax, %rbx
testq %rax, %rax
je 0x4fc34
leaq 0x858fe(%rip), %r14     # 0xd5500
movslq (%r14), %rax
leaq 0x1(%rax), %rdx
movl %edx, (%r14)
leaq 0x2e8255(%rip), %r15    # 0x337e68
movq (%r15), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x3a0b4
movq %rax, (%r15)
movslq (%r14), %rcx
movq %rbx, -0x8(%rax,%rcx,8)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x5ab7f(%rip), %rdi     # 0xaa7ba
popq %rbx
popq %r14
popq %r15
jmp 0x4090
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/network.c
// Function: print_independences
void print_independences(void (*print)(bayesiangraphptr mygraph), char* networkname)
{
 bayesiangraphptr G;
 if (networkname)
  {
   G = find_network(networkname);
   if (G)
     print(G);
   else
     printf(m1273, networkname);
  }
 else
   printf(m1020);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x4fc70
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x4fc9b
testq %rax, %rax
je 0x4fc83
movq %rax, %rdi
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
leaq 0x5ab5d(%rip), %rdi     # 0xaa7d4
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4090
leaq 0x5ab0a(%rip), %rdi     # 0xaa794
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4030
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/network.c
// Function: learn_network
void learn_network(char *graph_name, char *train_file, char *cv_file, char *test_file, int algorithm)
{
 bayesiangraphptr newnetwork;
 switch (algorithm){
   case 0:newnetwork = (bayesiangraphptr)simulated_annealing_bn(graph_name, train_file, cv_file, test_file, get_parameter_l("ordering"), get_parameter_f("infthreshold"));
          break;
   case 1:newnetwork = (bayesiangraphptr)k2_bn(graph_name, train_file, cv_file, test_file, get_parameter_l("ordering"), 2);
          break;
 }
 if (newnetwork)
   add_network(newnetwork);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
cmpl $0x1, %r8d
je 0x4fd40
testl %r8d, %r8d
jne 0x4fd6e
leaq 0x5ade3(%rip), %rdi     # 0xaaafa
callq 0x54afc
movl %eax, %ebp
leaq 0x5aa88(%rip), %rdi     # 0xaa7ad
callq 0x549ba
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
callq 0x90228
jmp 0x4fd66
leaq 0x5adb3(%rip), %rdi     # 0xaaafa
callq 0x54afc
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbx, %rcx
movl %eax, %r8d
movl $0x2, %r9d
callq 0x9031f
movq %rax, %r15
testq %rax, %rax
je 0x4fda0
leaq 0x8578b(%rip), %rbx     # 0xd5500
movslq (%rbx), %rax
leaq 0x1(%rax), %rdx
movl %edx, (%rbx)
leaq 0x2e80e3(%rip), %r14    # 0x337e68
movq (%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x3a0b4
movq %rax, (%r14)
movslq (%rbx), %rcx
movq %r15, -0x8(%rax,%rcx,8)
addq $0x8, %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/nodeboundedtree.c
// Function: prune_node_bounded_tree_nodes
void prune_node_bounded_tree_nodes(Decisionnodeptr root, Decisionnodeptr toberemoved, Nodeboundedtree_parameterptr param, Decisionnodeptr* nodes, double* generalizationerror, int* index, int datasize)
{
 /*!Last Changed 30.09.2007*/
 int tmp, h;
 double error;
 if (toberemoved->featureno == LEAF_NODE)
   return;
 (*index)++;
 nodes[*index] = toberemoved;
 tmp = toberemoved->featureno;
 toberemoved->featureno = LEAF_NODE;
 error = decisiontree_falsepositive_count(root) / (datasize + 0.0);
 h = decisiontree_vc_dimension_wrt_nodetype(current_dataset, decisiontree_node_count(root), param->model - 5);
 generalizationerror[*index] = srm_classification(error, h, datasize, param->a1, param->a2);
 toberemoved->featureno = tmp;
 prune_node_bounded_tree_nodes(root, toberemoved->left, param, nodes, generalizationerror, index, datasize);
 prune_node_bounded_tree_nodes(root, toberemoved->right, param, nodes, generalizationerror, index, datasize);
}

// Assembly:
cmpl $-0x1, 0x30(%rsi)
je 0x4febf
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
cvtsi2sdl 0x60(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movslq (%rbx), %rax
leaq 0x1(%rax), %rcx
movl %ecx, (%rbx)
movq %r13, 0x8(%r15,%rax,8)
movl 0x30(%r13), %eax
movl %eax, 0xc(%rsp)
movl $0xffffffff, 0x30(%r13) # imm = 0xFFFFFFFF
movq %rbp, %rdi
callq 0x1cac6
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
divsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %r14, %r15
leaq 0x85a42(%rip), %rax     # 0xd5870
movq (%rax), %r14
movq %rbp, %rdi
callq 0x1cce7
movl 0x8(%r12), %edx
addl $-0x5, %edx
movq %r14, %rdi
movq %r15, %r14
movq 0x18(%rsp), %r15
movl %eax, %esi
callq 0xa323d
movsd 0x18(%r12), %xmm1
movsd 0x20(%r12), %xmm2
movsd 0x20(%rsp), %xmm0
movl %eax, %edi
movl 0x60(%rsp), %esi
callq 0x4896e
movslq (%rbx), %rax
movsd %xmm0, (%r14,%rax,8)
movl 0xc(%rsp), %eax
movl %eax, 0x30(%r13)
movq (%r13), %rsi
movl 0x60(%rsp), %eax
movl %eax, (%rsp)
movq %rbp, %rdi
movq %r12, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %rbx, %r9
callq 0x4fdb0
movq 0x8(%r13), %r13
cmpl $-0x1, 0x30(%r13)
jne 0x4fdeb
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/nodeboundedtree.c
// Function: add_node_to_heap
void add_node_to_heap(Decisionnodeptr node, Node_expandedptr* list, int nodeindex)
{
 /*!Last Changed 11.07.2006*/
 Node_expandedptr newexpanded, tmp, tmpbefore = NULL;
 newexpanded = safemalloc(sizeof(Node_expanded), "add_node_to_expanded_list", 8);
 newexpanded->next = NULL;
 newexpanded->node = node;
 if (nodeindex == -1)
   newexpanded->value = -log_likelihood_for_classification(node->counts);
 else
   if (nodeindex == -2)
     newexpanded->value = -entropy(node->counts);
   else
     newexpanded->value = -nodeindex;
 if (!(*list))
   *list = newexpanded;
 else
  {
   tmp = *list;
   while (tmp && tmp->value > newexpanded->value)
    {
     tmpbefore = tmp;
     tmp = tmp->next;
    }
   if (tmpbefore)
    {
     newexpanded->next = tmpbefore->next;
     tmpbefore->next = newexpanded;
    }
   else
    {
     newexpanded->next = *list;
     *list = newexpanded;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
leaq 0x5a7b5(%rip), %rsi     # 0xaa814
movl $0x18, %edi
movl $0x8, %edx
callq 0x3a0e1
movq %rax, %rbx
movq $0x0, 0x10(%rax)
movq %r15, (%rax)
cmpl $-0x2, %ebp
je 0x50094
cmpl $-0x1, %ebp
jne 0x500aa
movq 0xa0(%r15), %rdi
callq 0x1de84
jmp 0x500a0
movq 0xa0(%r15), %rdi
callq 0x1dba0
xorpd 0x56128(%rip), %xmm0    # 0xa61d0
jmp 0x500b0
negl %ebp
cvtsi2sd %ebp, %xmm0
movsd %xmm0, 0x8(%rbx)
movq (%r14), %rax
testq %rax, %rax
je 0x500fa
movsd 0x8(%rax), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x500e4
movq %rax, %rdx
movq %rdx, %rcx
movq 0x10(%rdx), %rdx
testq %rdx, %rdx
je 0x500eb
movsd 0x8(%rdx), %xmm1
ucomisd %xmm0, %xmm1
ja 0x500cb
jmp 0x500e6
xorl %ecx, %ecx
testq %rcx, %rcx
je 0x500f6
movq 0x10(%rcx), %rax
addq $0x10, %rcx
movq %rcx, %r14
movq %rax, 0x10(%rbx)
movq %rbx, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/nodeboundedtree.c
// Function: add_node_to_expanded_list
int add_node_to_expanded_list(Decisionnodeptr node, Node_expandedptr* list, int nodeindex, int usediscrete)
{
 /*!Last Changed 01.07.2006 added nodeindex*/
 /*!Last Changed 19.03.2006*/
 if (!usediscrete)
   node->conditiontype = HYBRID_CONDITION;
 else
   node->conditiontype = UNIVARIATE_CONDITION;
 if (!can_be_divided(node, NULL))
  {
   make_leaf_node(node);
   return 0;
  }
 add_node_to_heap(node, list, nodeindex);
 return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
xorl %eax, %eax
testl %ecx, %ecx
sete %al
addl %eax, %eax
movl %eax, 0x98(%rdi)
xorl %r12d, %r12d
xorl %esi, %esi
callq 0x1d053
movq %r14, %rdi
testl %eax, %eax
je 0x5014a
movq %r15, %rsi
movl %ebx, %edx
callq 0x50049
movl $0x1, %r12d
jmp 0x5014f
callq 0x1cab0
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/nodeboundedtree.c
// Function: empty_heap
void empty_heap(Node_expandedptr header)
{
 /*!Last Changed 01.07.2006*/
 Node_expandedptr nextexpanded;
 while (header)
  {
   nextexpanded = header->next;
   make_leaf_node(header->node);
   safe_free(header);
   header = nextexpanded;
  }
}

// Assembly:
testq %rdi, %rdi
je 0x5018d
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rbx), %rdi
movq 0x10(%rbx), %r14
callq 0x1cab0
movq %rbx, %rdi
callq 0x3a180
movq %r14, %rbx
testq %r14, %r14
jne 0x5016a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/nodeboundedtree.c
// Function: create_binary_tree_according_model_string
Decisionnodeptr create_binary_tree_according_model_string(char* model)
{
 /*!Last Changed 11.07.2006*/
 Node_expandedptr header = NULL, nextexpanded;
 int nodeindex = 0;
 char ch;
 Decisionnodeptr rootnode, expanded_node, leftnode, rightnode;
 rootnode = createnewnode(NULL, 1);
 add_node_to_heap(rootnode, &header, nodeindex);
 nodeindex++;
 while (header)
  {
   nextexpanded = header->next;
   expanded_node = header->node;
   ch = model[-2 * (int) (header->value) + 1];
   safe_free(header);
   header = nextexpanded;
   expanded_node->featureno = DUMMY_MODEL;
   leftnode = createnewnode(expanded_node, 1);
   expanded_node->left = leftnode;
   rightnode = createnewnode(expanded_node, 1);
   expanded_node->right = rightnode; 
   switch (ch)
    {
     case '1':add_node_to_heap(leftnode, &header, nodeindex);
              nodeindex++;
              break;
     case '2':add_node_to_heap(leftnode, &header, nodeindex);
              nodeindex++;
              add_node_to_heap(rightnode, &header, nodeindex);
              nodeindex++;
              break;
    }
  }
 return rootnode;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r12
movq $0x0, (%r12)
movl $0x1, %r14d
xorl %edi, %edi
movl $0x1, %esi
callq 0x1d107
movq %rax, 0x10(%rsp)
movq %rax, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x50049
movq (%r12), %rdi
testq %rdi, %rdi
je 0x5027f
movq (%rdi), %r15
movq 0x10(%rdi), %r13
cvttsd2si 0x8(%rdi), %eax
addl %eax, %eax
negl %eax
cltq
movzbl 0x1(%rbx,%rax), %r12d
callq 0x3a180
movq %r13, 0x8(%rsp)
movl $0xfffffc18, 0x30(%r15) # imm = 0xFFFFFC18
movq %r15, %rdi
movl $0x1, %esi
callq 0x1d107
movq %rax, %r13
movq %rax, (%r15)
movq %r15, %rdi
movl $0x1, %esi
callq 0x1d107
movq %rax, 0x8(%r15)
cmpl $0x32, %r12d
je 0x5024c
cmpl $0x31, %r12d
jne 0x50275
movq %r13, %rdi
leaq 0x8(%rsp), %rsi
movl %r14d, %edx
callq 0x50049
incl %r14d
jmp 0x50275
movq %rax, %rbp
movq %r13, %rdi
leaq 0x8(%rsp), %r15
movq %r15, %rsi
movl %r14d, %edx
callq 0x50049
leal 0x1(%r14), %edx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x50049
addl $0x2, %r14d
movq 0x8(%rsp), %rdi
jmp 0x501d4
movq 0x10(%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/omnivariaterule.c
// Function: write_nodetypes_rule
void write_nodetypes_rule(Ruleset r, char* st)
{
 /*!Last Changed 19.02.2005*/
 /*!Last Changed 24.01.2004*/
 Decisionruleptr tmprule;
 Decisionconditionptr tmpcondition;
 sprintf(st, "%s", "");
 tmprule = r.start;
 while (tmprule)
  {
   tmpcondition = tmprule->start;
   while (tmpcondition)
    {     
     if (tmpcondition->featureindex == LINEAR)
       sprintf(st, "%sL", st);
     else
       if (tmpcondition->featureindex == QUADRATIC)
         sprintf(st, "%sQ", st);
       else 
         if (tmpcondition->featureindex == UNIVARIATE)
           sprintf(st, "%sU", st);
         else
           if (tmpcondition->featureindex == DISCRETEMIX)
             sprintf(st, "%s%c", st, 'A' + tmpcondition->ksplit.featurecount - 1);
           else
             sprintf(st, "%sU", st);
     tmpcondition = tmpcondition->next;
    }
   sprintf(st, "%s-%d;", st, tmprule->classno);
   tmprule = tmprule->next;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb $0x0, (%rdi)
movq 0x40(%rsp), %r14
testq %r14, %r14
je 0x508f5
movq %rdi, %rbx
leaq 0x5a056(%rip), %r15     # 0xaa8b4
leaq 0x5a02f(%rip), %r12     # 0xaa894
leaq 0x5a040(%rip), %rbp     # 0xaa8ac
movq 0x18(%r14), %r13
testq %r13, %r13
je 0x508d1
movl (%r13), %eax
addl $0x5, %eax
cmpl $0x5, %eax
ja 0x5088a
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x508c1
movq %rbx, %rdi
leaq 0x5a014(%rip), %rsi     # 0xaa8b0
jmp 0x508c1
movl 0x50(%r13), %ecx
addl $0x40, %ecx
movq %rbx, %rdi
leaq 0x55d61(%rip), %rsi     # 0xa6610
movq %rbx, %rdx
xorl %eax, %eax
callq 0x41b0
jmp 0x508cb
movq %rbx, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x41b0
movq 0x48(%r13), %r13
jmp 0x50870
movl (%r14), %ecx
movq %rbx, %rdi
leaq 0x59fda(%rip), %rsi     # 0xaa8b8
movq %rbx, %rdx
xorl %eax, %eax
callq 0x41b0
movq 0x30(%r14), %r14
testq %r14, %r14
jne 0x5086c
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/omnivariaterule.c
// Function: write_datasizes_and_nodetypes_rule
void write_datasizes_and_nodetypes_rule(Ruleset r, char* st)
{
 /*!Last Changed 19.02.2005*/
 /*!Last Changed 24.01.2004*/
 Decisionruleptr tmprule;
 Decisionconditionptr tmpcondition;
 sprintf(st, "%s", "");
 tmprule = r.start;
 while (tmprule)
  {
   tmpcondition = tmprule->start;
   while (tmpcondition)
    {
     sprintf(st,"%s-%d,",st,tmpcondition->datasize);
     if (tmpcondition->featureindex == LINEAR)
       sprintf(st,"%sL",st);
     else 
       if (tmpcondition->featureindex == QUADRATIC)         
         sprintf(st,"%sQ",st);
       else
         sprintf(st,"%sU",st);
     tmpcondition = tmpcondition->next;
    }
   sprintf(st,"%s;",st);
   tmprule = tmprule->next;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb $0x0, (%rdi)
movq 0x40(%rsp), %rax
testq %rax, %rax
je 0x509ab
movq %rdi, %rbx
leaq 0x59f95(%rip), %r15     # 0xaa8bf
leaq 0x59f7f(%rip), %r13     # 0xaa8b0
leaq 0x59f7c(%rip), %rbp     # 0xaa8b4
leaq 0x59f6d(%rip), %r14     # 0xaa8ac
movq %rax, (%rsp)
movq 0x18(%rax), %r12
testq %r12, %r12
je 0x5098a
movl 0x38(%r12), %ecx
movq %rbx, %rdi
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x41b0
movl (%r12), %eax
cmpl $-0x3, %eax
movq %rbp, %rsi
cmoveq %r13, %rsi
cmpl $-0x2, %eax
cmoveq %r14, %rsi
movq %rbx, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x41b0
movq 0x48(%r12), %r12
jmp 0x50947
movq %rbx, %rdi
leaq 0x59f32(%rip), %rsi     # 0xaa8c6
movq %rbx, %rdx
xorl %eax, %eax
callq 0x41b0
movq (%rsp), %rax
movq 0x30(%rax), %rax
testq %rax, %rax
jne 0x5093f
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/omnivariaterule.c
// Function: log_likelihood_for_rule_induction
double log_likelihood_for_rule_induction(int poscount, int negcount)
{
 /*!Last Changed 20.02.2005*/
 int sum;
 double ratio;
 sum = poscount + negcount;
 if (sum * poscount * negcount == 0)
   return 0;
 ratio = poscount / (sum + 0.0);
 return poscount * log2(ratio);
}

// Assembly:
leal (%rsi,%rdi), %eax
imull %edi, %esi
imull %eax, %esi
testl %esi, %esi
je 0x509e8
pushq %rax
cvtsi2sd %edi, %xmm0
movsd %xmm0, (%rsp)
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
callq 0x39bdc
mulsd (%rsp), %xmm0
addq $0x8, %rsp
retq
xorps %xmm0, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/omnivariaterule.c
// Function: log_likelihood_of_condition
double log_likelihood_of_condition(Decisionconditionptr c, Instanceptr list, int positive, int* covered)
{
 /*!Last Changed 19.02.2005*/
 int poscovered = 0, negcovered = 0, posuncovered = 0, neguncovered = 0, classno;
 Instanceptr tmp;
 tmp = list;
 while (tmp)
  {
   classno = give_classno(tmp);
   if (condition_cover_instance(tmp, c))
     if (classno == positive)
       poscovered++;
     else
       negcovered++;
   else
     if (classno == positive)
       posuncovered++;
     else
       neguncovered++;
   tmp = tmp->next;
  }
 *covered = poscovered + posuncovered;
 return log_likelihood_for_rule_induction(poscovered, negcovered) + log_likelihood_for_rule_induction(posuncovered, neguncovered);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, 0x10(%rsp)
testq %rsi, %rsi
je 0x50a72
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
xorl %r13d, %r13d
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x2f33a
movl %eax, %r12d
movq %r14, %rdi
movq %r15, %rsi
callq 0x7af32
testl %eax, %eax
je 0x50a46
cmpl %ebp, %r12d
jne 0x50a59
incl %r13d
jmp 0x50a67
cmpl %ebp, %r12d
jne 0x50a5d
movq 0x8(%rsp), %rax
incl %eax
movq %rax, 0x8(%rsp)
jmp 0x50a67
incl %ebx
jmp 0x50a67
movq (%rsp), %rax
incl %eax
movq %rax, (%rsp)
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x50a22
jmp 0x50a88
xorl %ebx, %ebx
movq $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
xorl %r13d, %r13d
movq 0x8(%rsp), %r14
leal (%r14,%r13), %eax
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
leal (%rbx,%r13), %eax
imull %r13d, %ebx
imull %eax, %ebx
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
testl %ebx, %ebx
je 0x50adb
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
movsd %xmm0, 0x10(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
callq 0x39bdc
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
mulsd 0x10(%rsp), %xmm1
movq (%rsp), %rcx
leal (%rcx,%r14), %eax
imull %r14d, %ecx
imull %eax, %ecx
testl %ecx, %ecx
je 0x50b1c
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
movsd %xmm0, (%rsp)
movsd %xmm1, 0x8(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
callq 0x39bdc
movsd 0x8(%rsp), %xmm1
mulsd (%rsp), %xmm0
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/omnivariaterule.c
// Function: log_likelihood_of_rule
double log_likelihood_of_rule(Decisionruleptr c, Instanceptr list, int* covered)
{
 /*!Last Changed 19.02.2005*/
 int poscovered = 0, negcovered = 0, posuncovered = 0, neguncovered = 0, classno;
 Instanceptr tmp;
 tmp = list;
 while (tmp)
  {
   classno = give_classno(tmp);
   if (rule_cover_instance(tmp, *c))
     if (classno == c->classno)
       poscovered++;
     else
       negcovered++;
   else
     if (classno == c->classno)
       posuncovered++;
     else
       neguncovered++;
   tmp = tmp->next;
  }
 *covered = poscovered + posuncovered;
 return log_likelihood_for_rule_induction(poscovered, negcovered) + log_likelihood_for_rule_induction(posuncovered, neguncovered);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, 0x40(%rsp)
testq %rsi, %rsi
je 0x50bd5
movq %rsi, %r14
movq %rdi, %r15
xorl %ebx, %ebx
xorl %r13d, %r13d
movq $0x0, 0x38(%rsp)
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x2f33a
movl %eax, %ebp
movq 0x30(%r15), %rax
movq %rax, 0x30(%rsp)
movupd (%r15), %xmm0
movupd 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x20(%rsp)
movupd %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
movq %r14, %rdi
callq 0x7b9ee
movl (%r15), %ecx
testl %eax, %eax
je 0x50bb0
cmpl %ecx, %ebp
jne 0x50bc2
incl %ebx
jmp 0x50bca
cmpl %ecx, %ebp
jne 0x50bc7
movq 0x38(%rsp), %rax
incl %eax
movq %rax, 0x38(%rsp)
jmp 0x50bca
incl %r12d
jmp 0x50bca
incl %r13d
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x50b66
jmp 0x50be6
xorl %r12d, %r12d
movq $0x0, 0x38(%rsp)
xorl %r13d, %r13d
xorl %ebx, %ebx
movq 0x38(%rsp), %r14
leal (%rbx,%r14), %eax
movq 0x40(%rsp), %rcx
movl %eax, (%rcx)
leal (%rbx,%r12), %eax
imull %ebx, %r12d
imull %eax, %r12d
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
testl %r12d, %r12d
je 0x50c3a
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movsd %xmm0, 0x40(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
callq 0x39bdc
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
mulsd 0x40(%rsp), %xmm1
leal (%r14,%r13), %eax
imull %r14d, %r13d
imull %eax, %r13d
testl %r13d, %r13d
je 0x50c7b
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
movsd %xmm0, 0x40(%rsp)
movsd %xmm1, 0x38(%rsp)
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
callq 0x39bdc
movsd 0x38(%rsp), %xmm1
mulsd 0x40(%rsp), %xmm0
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/omnivariaterule.c
// Function: generalization_error_after_pruning
double generalization_error_after_pruning(Ruleset r, Instanceptr data, int positive, int modelselectionmethod)
{
 /*!Last Changed 19.02.2005*/
 int *deleted, rulecount, i;
 double result, tmp;
 Decisionruleptr rule;
 deleted = safecalloc(r.rulecount, sizeof(int), "generalization_error_after_pruning", 4);
 result = generalization_error_of_ruleset_with_deleted_rules(r, data, deleted, positive, modelselectionmethod);
 rule = r.start;
 rulecount = 0;
 while (rule && rule->classno != positive)
  {
   rule = rule->next;
   rulecount++;
  }
 for (i = r.rulecount - 1; i >= rulecount; i--)
  {
   deleted[i] = 1;
   tmp = generalization_error_of_ruleset_with_deleted_rules(r, data, deleted, positive, modelselectionmethod);
   if (tmp > result)
     deleted[i] = 0;
   else
     result = tmp;
  }
 safe_free(deleted);
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movslq 0x80(%rsp), %r15
leaq 0x5973b(%rip), %rdx     # 0xaa917
movl $0x4, %esi
movq %r15, %rdi
movl $0x4, %ecx
callq 0x3a1fc
movq %rax, %r12
movq 0x90(%rsp), %rax
movq %rax, 0x20(%rsp)
movapd 0x70(%rsp), %xmm0
movapd 0x80(%rsp), %xmm1
movupd %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
movq %r14, 0x30(%rsp)
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %edx
movl %ebx, %r14d
movl %ebx, %ecx
callq 0x50ed1
movq 0x70(%rsp), %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x51247
cmpl %ebp, (%rcx)
je 0x51247
incl %eax
movq 0x30(%rcx), %rcx
jmp 0x51236
cmpl %eax, %r15d
jle 0x512be
leaq 0x70(%rsp), %r13
movslq %eax, %rbx
movsd %xmm0, 0x28(%rsp)
movl $0x1, -0x4(%r12,%r15,4)
movq 0x20(%r13), %rax
movq %rax, 0x20(%rsp)
movupd (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
movq 0x30(%rsp), %rdi
movq %r12, %rsi
movl %ebp, %edx
movl %r14d, %ecx
callq 0x50ed1
movapd %xmm0, %xmm1
movsd 0x28(%rsp), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x512b0
movl $0x0, -0x4(%r12,%r15,4)
movapd %xmm0, %xmm1
decq %r15
movapd %xmm1, %xmm0
cmpq %rbx, %r15
jg 0x51254
jmp 0x512c2
movapd %xmm0, %xmm1
movsd %xmm1, 0x28(%rsp)
movq %r12, %rdi
callq 0x3a180
movsd 0x28(%rsp), %xmm0
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/omnivariaterule.c
// Function: growrule_omnivariate
Decisionruleptr growrule_omnivariate(Instanceptr* growset, int positive, Ripper_parameterptr param)
{
 /*!Last Changed 21.01.2004*/
 /*!Last Changed 29.12.2003*/
 /*!Last Changed 02.12.2003*/
 /*!Last Changed 10.05.2003*/
 Decisionruleptr result;
 Decisionconditionptr newcondition = NULL;
 Instanceptr obey, notobey = NULL;
 int n, pnew, nnew;
 result = empty_rule(positive);
 obey = (*growset);
 if (rule_cover_negative(obey, *result))
   n = 1;
 else
   n = 0;
 while (n > 0)
  {
   newcondition = find_best_hybrid_condition(&obey, positive, param);
   if (newcondition && newcondition->featureindex != -1)
    {
     count_examples_for_condition(newcondition, &pnew, &nnew, positive, obey);
     if (result->decisioncount == 0 || nnew != n)
       n = nnew;
     else
      {
       free_condition(*newcondition);
       safe_free(newcondition);
       break;
      }
     send_exceptions(newcondition, &obey, &notobey);
     add_condition(result, newcondition);
    }
   else
    {
     if (newcondition && newcondition->featureindex == -1)
      {
       free_condition(*newcondition);
       safe_free(newcondition);
      }
     break;
    }
  }
 if (notobey)
  {
   merge_instancelist(&notobey, obey);
   (*growset) = notobey;
  }
 else
   (*growset) = obey;
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, 0x98(%rsp)
movl %esi, %ebp
movq %rdi, %rbx
movq $0x0, 0x80(%rsp)
movl %esi, %edi
callq 0x7bfd8
movq %rax, %r14
movq %rbx, 0x90(%rsp)
movq (%rbx), %rdi
movq %rdi, 0x78(%rsp)
movq 0x30(%rax), %rax
movq %rax, 0x30(%rsp)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x7c604
testl %eax, %eax
je 0x51947
movl $0x1, %r15d
leaq 0x78(%rsp), %r12
movq %r12, %rdi
movl %ebp, %esi
movq 0x98(%rsp), %rdx
callq 0x52191
testq %rax, %rax
je 0x51947
movq %rax, %r13
cmpl $-0x1, (%rax)
je 0x5192c
movq 0x78(%rsp), %r8
movq %r13, %rdi
leaq 0xa4(%rsp), %rsi
leaq 0x8c(%rsp), %rdx
movl %ebp, %ecx
callq 0x7b141
cmpl $0x0, 0x28(%r14)
setne %al
movl 0x8c(%rsp), %ebx
cmpl %r15d, %ebx
sete %cl
testb %cl, %al
jne 0x5192c
movq %r13, %rdi
movq %r12, %rsi
leaq 0x80(%rsp), %rdx
callq 0x9f29e
movq %r14, %rdi
movq %r13, %rsi
callq 0x7c040
movl %ebx, %r15d
testl %ebx, %ebx
jg 0x518aa
jmp 0x51947
movl $0xe, %ecx
movq %rsp, %rdi
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x7c1f4
movq %r13, %rdi
callq 0x3a180
cmpq $0x0, 0x80(%rsp)
je 0x51969
movq 0x78(%rsp), %rsi
leaq 0x80(%rsp), %rbx
movq %rbx, %rdi
callq 0x30648
jmp 0x5196e
leaq 0x78(%rsp), %rbx
movq (%rbx), %rax
movq 0x90(%rsp), %rcx
movq %rax, (%rcx)
movq %r14, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/omnivariatetree.c
// Function: decisiontree_node_types
void decisiontree_node_types(Decisionnodeptr node, char st[READLINELENGTH], int level)
{
 int i;
 if (node->featureno != LEAF_NODE)
  {
   if (node->featureno >= 0)
     sprintf(st, "%s%d-U-%d;", st, level, node->covered);
   else
     if (node->featureno == LINEAR)
       sprintf(st, "%s%d-L-%d;", st, level, node->covered);
     else
       if (node->featureno == QUADRATIC) 
         sprintf(st, "%s%d-Q-%d;", st, level, node->covered);
       else
         if (node->featureno == DISCRETEMIX)
           sprintf(st, "%s%d-%d;", st, level, node->ksplit.featurecount);
   if (node->featureno >= 0 && current_dataset->features[node->featureno].type == STRING)
    {
     for (i = 0; i < current_dataset->features[node->featureno].valuecount; i++)
       decisiontree_node_types(&(node->string[i]), st, level + 1);
    }
   else
    {
     decisiontree_node_types(node->left, st, level + 1);
     decisiontree_node_types(node->right, st, level + 1);    
    }
  }
}

// Assembly:
movl 0x30(%rdi), %eax
cmpl $-0x1, %eax
je 0x52bc4
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x30(%rdi), %r13
leaq 0x57f2e(%rip), %r12     # 0xaa9dc
leaq 0x57f48(%rip), %rbp     # 0xaa9fd
testl %eax, %eax
js 0x52b1b
movl 0x84(%r15), %r8d
movq %r14, %rdi
movq %r12, %rsi
movq %r14, %rdx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x41b0
movslq (%r13), %rcx
testq %rcx, %rcx
js 0x52af6
leaq 0x82d8e(%rip), %rax     # 0xd5870
movq (%rax), %rax
imulq $0x340, %rcx, %rcx      # imm = 0x340
cmpl $0x1, 0x30f08(%rax,%rcx)
je 0x52b65
movq (%r15), %rdi
incl %ebx
movq %r14, %rsi
movl %ebx, %edx
callq 0x52a84
movq 0x8(%r15), %r15
leaq 0x30(%r15), %r13
movl 0x30(%r15), %eax
cmpl $-0x1, %eax
jne 0x52ab5
jmp 0x52bb6
cmpl $-0x5, %eax
je 0x52b53
cmpl $-0x3, %eax
je 0x52b3d
cmpl $-0x2, %eax
jne 0x52af6
movl 0x84(%r15), %r8d
movq %r14, %rdi
leaq 0x57eac(%rip), %rsi     # 0xaa9e7
jmp 0x52ac6
movl 0x84(%r15), %r8d
movq %r14, %rdi
leaq 0x57ea4(%rip), %rsi     # 0xaa9f2
jmp 0x52ac6
movl 0x140(%r15), %r8d
movq %r14, %rdi
movq %rbp, %rsi
jmp 0x52ac6
addq $0x30f08, %rax          # imm = 0x30F08
cmpl $0x0, 0x18(%rax,%rcx)
jle 0x52bb6
incl %ebx
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x10(%r15), %rdi
addq %r12, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x52a84
incq %rbp
leaq 0x82cdc(%rip), %rax     # 0xd5870
movq (%rax), %rax
movslq (%r13), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movslq 0x30f20(%rax,%rcx), %rax
addq $0x160, %r12            # imm = 0x160
cmpq %rax, %rbp
jl 0x52b79
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/omnivariatetree.c
// Function: find_uni_and_multi_splits
void find_uni_and_multi_splits(Decisionnodeptr node, matrix* qw, double* qw0, double points[3], double variance_explained, int hybridspace)
{
 /*!Last Changed 22.11.2004*/
 node->featureno = find_best_ldt_feature_for_realized(node->instances, &(node->split));
 points[0] = node->featureno;
 node->lineard = find_best_multi_ldt_split(&(node->instances), &(node->w), &(node->w0), MULTIVARIATE_LINEAR, variance_explained);
 points[1] = node->lineard - 1;
 if (points[1] == -1)
   matrix_free(node->w);
 points[2] = -1;
 if (hybridspace == 3)
  {
   node->quadraticd = find_best_multi_ldt_split(&(node->instances), qw, qw0, MULTIVARIATE_QUADRATIC, variance_explained);
   points[2] = node->quadraticd - 1;
   if (points[2] == -1)
     matrix_free(*qw);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movsd %xmm0, (%rsp)
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x20(%rdi), %r13
movq 0x20(%rdi), %rdi
leaq 0x28(%r15), %rsi
callq 0xa211d
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movl %eax, 0x30(%r15)
movsd %xmm0, (%r14)
leaq 0x38(%r15), %rsi
leaq 0x48(%r15), %rdx
movq %r13, %rdi
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
movsd (%rsp), %xmm0
callq 0x4e089
movl %eax, 0x90(%r15)
subl $0x1, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x8(%r14)
jae 0x53279
movq 0x38(%r15), %rdi
movq 0x40(%r15), %rsi
callq 0x3ed51
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x10(%r14)
cmpl $0x3, %ebp
jne 0x532d7
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movl $0xfffffffd, %ecx       # imm = 0xFFFFFFFD
movsd (%rsp), %xmm0
callq 0x4e089
movl %eax, 0x94(%r15)
subl $0x1, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x10(%r14)
jae 0x532d7
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3ed51
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/omnivariatetree.c
// Function: calculate_counts_for_ldt_splits
void calculate_counts_for_ldt_splits(int univariate, Decisionnodeptr node, int *C, int *U, int *fp, int *fn)
{
 /*!Last Changed 22.11.2004*/
 int counts[2][MAXCLASSES], i, leftclass, rightclass;
 if (univariate)
   find_counts_for_split(node->instances, node->featureno, node->split, counts[0], counts[1], node->conditiontype);
 else
   find_counts_for_multivariate_split(node->instances, node->w, node->w0, counts[0], counts[1]);
 leftclass = find_max_in_list(counts[0], MAXCLASSES);
 rightclass = find_max_in_list(counts[1], MAXCLASSES);
 *C = 0;
 *U = 0;
 *fp = 0;
 *fn = 0;
 for (i = 0; i < current_dataset->classno; i++)
  {
   *C += counts[0][i];
   *U += counts[1][i];
   if (i != leftclass)
     *fp += counts[0][i];
   if (i != rightclass)
     *fn += counts[1][i];
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x190, %rsp            # imm = 0x190
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r12
movl %edi, %eax
movq 0x20(%rsi), %rdi
testl %eax, %eax
je 0x5332e
movl 0x30(%rsi), %eax
movsd 0x28(%rsi), %xmm0
leaq 0xc8(%rsp), %rcx
movl 0x98(%rsi), %r8d
movq %rsp, %rdx
movl %eax, %esi
callq 0xa11fa
jmp 0x5334e
movsd 0x48(%rsi), %xmm0
leaq 0xc8(%rsp), %r8
movq 0x38(%rsi), %rax
movq 0x40(%rsi), %rdx
movq %rsp, %rcx
movq %rax, %rsi
callq 0x4de0c
movq %rsp, %rdi
movl $0x32, %esi
callq 0x38002
movl %eax, %ebp
leaq 0xc8(%rsp), %rdi
movl $0x32, %esi
callq 0x38002
xorl %edx, %edx
movl %edx, (%r12)
movl %edx, (%r15)
movl %edx, (%r14)
movl %edx, (%rbx)
leaq 0x824ec(%rip), %rcx     # 0xd5870
movq (%rcx), %rcx
cmpl %edx, 0x10(%rcx)
jle 0x533bf
movl %ebp, %edx
movl %eax, %eax
xorl %esi, %esi
movl (%rsp,%rsi,4), %r8d
addl %r8d, (%r12)
movl 0xc8(%rsp,%rsi,4), %edi
addl %edi, (%r15)
cmpq %rsi, %rdx
je 0x533ac
addl %r8d, (%r14)
cmpq %rsi, %rax
je 0x533b3
addl %edi, (%rbx)
incq %rsi
movslq 0x10(%rcx), %rdi
cmpq %rdi, %rsi
jl 0x53392
addq $0x190, %rsp            # imm = 0x190
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/omnivariatetree.c
// Function: set_best_hybrid_split
int set_best_hybrid_split(double results[3], Decisionnodeptr node, matrix qw, double qw0, int hybridspace)
{
 /*!Last Changed 01.02.2005*/
 int bestmodel;
 bestmodel = find_min_in_list_double(results, hybridspace);
 if (bestmodel == -1)
  {
   node->featureno = LEAF_NODE;
   return 0;
  }
 switch (bestmodel)
  {
   case MODEL_UNI:if (results[1] != -1)
                    matrix_free(node->w);
                  if (results[2] != -1 && hybridspace == 3)
                    matrix_free(qw);
                  break;
   case MODEL_LIN:node->featureno = LINEAR;
                  if (results[2] != -1 && hybridspace == 3)
                    matrix_free(qw);
                  break;
   case MODEL_QUA:node->featureno = QUADRATIC;
                  if (results[1] != -1)
                    matrix_free(node->w);
                  node->w = qw;
                  node->w0 = qw0;
                  break;
  }
 return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movsd %xmm0, (%rsp)
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r13
movl %r8d, %esi
callq 0x38250
movl $0x1, %ebx
incl %eax
cmpl $0x3, %eax
ja 0x534b6
leaq 0x57593(%rip), %rcx     # 0xaa9a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0xffffffff, 0x30(%r12) # imm = 0xFFFFFFFF
xorl %ebx, %ebx
jmp 0x534b6
movl $0xfffffffe, 0x30(%r12) # imm = 0xFFFFFFFE
jmp 0x53494
movl $0xfffffffd, 0x30(%r12) # imm = 0xFFFFFFFD
movsd 0x8(%r13), %xmm0
ucomisd 0x52960(%rip), %xmm0    # 0xa5da8
jne 0x5344c
jnp 0x5345b
movq 0x38(%r12), %rdi
movq 0x40(%r12), %rsi
callq 0x3ed51
movq %r15, 0x38(%r12)
movq %r14, 0x40(%r12)
movsd (%rsp), %xmm0
movsd %xmm0, 0x48(%r12)
jmp 0x534b6
movsd 0x8(%r13), %xmm0
ucomisd 0x52927(%rip), %xmm0    # 0xa5da8
jne 0x53485
jnp 0x53494
movq 0x38(%r12), %rdi
movq 0x40(%r12), %rsi
callq 0x3ed51
cmpl $0x3, %ebp
jne 0x534b6
movsd 0x10(%r13), %xmm0
ucomisd 0x52901(%rip), %xmm0    # 0xa5da8
jne 0x534ab
jnp 0x534b6
movq %r15, %rdi
movq %r14, %rsi
callq 0x3ed51
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/omnivariatetree.c
// Function: find_best_hybrid_ldt_split_single_model
int find_best_hybrid_ldt_split_single_model(Decisionnodeptr node, NODE_TYPE model, double variance_explained)
{
 /*!Last Changed 13.02.2005*/
 switch (model)
  {
   case UNIVARIATE:node->featureno = find_best_ldt_feature_for_realized(node->instances, &(node->split));
                   if (node->featureno == -1)
                     return 0;
                   break;
   case     LINEAR:node->lineard = find_best_multi_ldt_split(&(node->instances), &(node->w), &(node->w0), MULTIVARIATE_LINEAR, variance_explained);
                   if (node->lineard == 0)
                    {
                     matrix_free(node->w);
                     node->featureno = LEAF_NODE;
                     return 0;
                    }
                   else
                     node->featureno = LINEAR;
                   break;
   case  QUADRATIC:node->quadraticd = find_best_multi_ldt_split(&(node->instances), &(node->w), &(node->w0), MULTIVARIATE_QUADRATIC, variance_explained);
                   if (node->quadraticd == 0)
                    {
                     matrix_free(node->w);
                     node->featureno = LEAF_NODE;
                     return 0;
                    }
                   else
                     node->featureno = QUADRATIC;
                   break;
   default        :node->featureno = LEAF_NODE;
                   printf("This node type is not supported\n");
                   break;
  }
 return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpl $-0x3, %esi
je 0x5351c
cmpl $-0x2, %esi
je 0x534f3
testl %esi, %esi
jne 0x53545
movq 0x20(%rbx), %rdi
leaq 0x28(%rbx), %rsi
callq 0xa211d
movl %eax, 0x30(%rbx)
cmpl $-0x1, %eax
jne 0x53558
jmp 0x53573
leaq 0x20(%rbx), %rdi
leaq 0x38(%rbx), %rsi
leaq 0x48(%rbx), %rdx
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
callq 0x4e089
movl %eax, 0x90(%rbx)
testl %eax, %eax
je 0x5355f
movl $0xfffffffe, 0x30(%rbx) # imm = 0xFFFFFFFE
jmp 0x53558
leaq 0x20(%rbx), %rdi
leaq 0x38(%rbx), %rsi
leaq 0x48(%rbx), %rdx
movl $0xfffffffd, %ecx       # imm = 0xFFFFFFFD
callq 0x4e089
movl %eax, 0x94(%rbx)
testl %eax, %eax
je 0x5355f
movl $0xfffffffd, 0x30(%rbx) # imm = 0xFFFFFFFD
jmp 0x53558
movl $0xffffffff, 0x30(%rbx) # imm = 0xFFFFFFFF
leaq 0x574e2(%rip), %rdi     # 0xaaa35
callq 0x4090
movl $0x1, %eax
jmp 0x53575
movq 0x38(%rbx), %rdi
movq 0x40(%rbx), %rsi
callq 0x3ed51
movl $0xffffffff, 0x30(%rbx) # imm = 0xFFFFFFFF
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/omnivariatetree.c
// Function: find_best_hybrid_ldt_split_aic
int find_best_hybrid_ldt_split_aic(Decisionnodeptr node, Multildt_parameterptr param)
{
 /*!Last Changed 01.02.2005*/
 /*!Last Changed 22.11.2004*/
 int hybridspace = get_parameter_i("hybridspace");
 matrix qw;
 int d, i;
 double qw0, results[3], loglikelihood;
 find_uni_and_multi_splits(node, &qw, &qw0, results, param->variance_explained, hybridspace);
 for (i = 0; i < hybridspace; i++)
   if (results[i] != -1)
    {
     switch (i)
      {
       case 0:loglikelihood = log_likelihood_for_uni_ldt_splits(node->instances, node->featureno, node->split, param->conditiontype);
              d = 2;
              break;
       case 1:loglikelihood = log_likelihood_for_multi_ldt_splits(node->instances, node->w, node->w0);
              d = node->lineard + 1;
              break;
       case 2:loglikelihood = log_likelihood_for_multi_ldt_splits(node->instances, qw, qw0);
              d = node->quadraticd + 1;
              break;
       default:loglikelihood = 0.0;
               d = 0;
               break;
      }
     results[i] = aic_loglikelihood(loglikelihood, d);
    }
 return set_best_hybrid_split(results, node, qw, qw0, hybridspace);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x55708(%rip), %rdi     # 0xa8c98
callq 0x54920
movl %eax, %ebp
movsd 0x20(%r14), %xmm0
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %rbx, %rdi
movl %eax, %r8d
callq 0x531f9
testl %ebp, %ebp
jle 0x5366f
movl %ebp, %r15d
xorl %r12d, %r12d
movsd 0x20(%rsp,%r12,8), %xmm0
ucomisd 0x527d4(%rip), %xmm0    # 0xa5da8
jne 0x535dc
jnp 0x53663
cmpl $0x2, %r12d
je 0x53627
cmpl $0x1, %r12d
je 0x53609
testl %r12d, %r12d
jne 0x5364a
movq 0x20(%rbx), %rdi
movl 0x30(%rbx), %esi
movsd 0x28(%rbx), %xmm0
movl 0x2c(%r14), %edx
callq 0xa2a22
movl $0x2, %eax
jmp 0x53650
movsd 0x48(%rbx), %xmm0
movq 0x20(%rbx), %rdi
movq 0x38(%rbx), %rsi
movq 0x40(%rbx), %rdx
callq 0x4e038
movl 0x90(%rbx), %eax
jmp 0x53646
movq 0x20(%rbx), %rdi
movsd 0x8(%rsp), %xmm0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x4e038
movl 0x94(%rbx), %eax
incl %eax
jmp 0x53650
xorpd %xmm0, %xmm0
xorl %eax, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
callq 0x47871
movsd %xmm0, 0x20(%rsp,%r12,8)
incq %r12
cmpq %r12, %r15
jne 0x535c5
movsd 0x8(%rsp), %xmm0
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
movl %ebp, %r8d
callq 0x533cf
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq