LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/c45rules.c
// Function: remove_rules_according_indexes_of_rule
void remove_rules_according_indexes_of_rule(Decisionruleptr* rules, int rulecount, int* subset, int subsetcount)
{
 /*!Last Changed 02.12.2004*/
 int i, j;
 BOOLEAN found;
 for (i = 0; i < rulecount; i++)
  {
   found = BOOLEAN_FALSE;
   for (j = 0; j < subsetcount; j++)
     if (subset[j] == i)
      {
       found = BOOLEAN_TRUE;
       break;
      }
   if (!found)
    {
     free_rule(*(rules[i]));
     safe_free(rules[i]);
    }
  }
}

// Assembly:
testl %esi, %esi
jle 0x7590
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movq %rdi, %r15
movl %esi, %r12d
movl %ecx, %r13d
xorl %ebp, %ebp
testl %ebx, %ebx
jle 0x7546
xorl %eax, %eax
movl (%r14,%rax,4), %ecx
cmpq %rcx, %rbp
je 0x757a
incq %rax
cmpq %rax, %r13
jne 0x7535
movq (%r15,%rbp,8), %rax
movq 0x30(%rax), %rcx
movq %rcx, 0x30(%rsp)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x7a989
movq (%r15,%rbp,8), %rdi
callq 0x39194
incq %rbp
cmpq %r12, %rbp
jne 0x752f
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/c45rules.c
// Function: remove_rules_according_rules_themselves
void remove_rules_according_rules_themselves(Decisionruleptr* rules, int rulecount, Decisionruleptr* subsetrules, int subsetcount)
{
 /*!Last Changed 02.12.2004*/
 int i, j;
 BOOLEAN found;
 for (i = 0; i < rulecount; i++)
  {
   found = BOOLEAN_FALSE;
   for (j = 0; j < subsetcount; j++)
     if (rules[i] == subsetrules[j])
      {
       found = BOOLEAN_TRUE;
       break;
      }
   if (!found)
    {
     free_rule(*(rules[i]));
     safe_free(rules[i]);
    }
  }
}

// Assembly:
testl %esi, %esi
jle 0x7619
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebx
movq %rdx, %r14
movq %rdi, %r15
movl %esi, %r12d
movl %ecx, %r13d
xorl %ebp, %ebp
testl %ebx, %ebx
jle 0x75cf
movq (%r15,%rbp,8), %rax
xorl %ecx, %ecx
cmpq (%r14,%rcx,8), %rax
je 0x7603
incq %rcx
cmpq %rcx, %r13
jne 0x75c1
movq (%r15,%rbp,8), %rax
movq 0x30(%rax), %rcx
movq %rcx, 0x30(%rsp)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x7a989
movq (%r15,%rbp,8), %rdi
callq 0x39194
incq %rbp
cmpq %r12, %rbp
jne 0x75b7
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/c45rules.c
// Function: check_all_subsets
Ruleset check_all_subsets(Decisionruleptr start, int rulecount, Instanceptr traindata, int conditioncount)
{
 /*!Last Changed 02.12.2004 added remove_rules_according_indexes_of_rule*/
 /*!Last Changed 30.10.2003*/
 Ruleset result;
 Decisionruleptr* rules;
 int **subsets, *counts, res, i, minindex = -1;
 double minlength = +1000000, length;
 empty_ruleset(&result);
 result.possibleconditioncount = conditioncount;
 rules = create_array_from_link_list_of_rules(start, rulecount);
 subsets = generate_subsets(rulecount, &res, &counts);
 for (i = 0; i < res; i++)
  {
   create_subset_of_ruleset(&result, rules, subsets[i], counts[i]);
   length = description_length_of_all(result, rules[0]->classno, 1, traindata);
   if (dless(length,minlength))
    {
     minlength = length;
     minindex = i;
    }
  }
 create_subset_of_ruleset(&result, rules, subsets[minindex], counts[minindex]);
 remove_rules_according_indexes_of_rule(rules, rulecount, subsets[minindex], counts[minindex]);
 for (i = 0; i < res; i++) 
   if (counts[i] > 0)
     safe_free(subsets[i]);
 safe_free(subsets);
 safe_free(counts);
 safe_free(rules);
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r8d, %r14d
movq %rcx, %r12
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
callq 0x7aa63
movl %r14d, 0x20(%rbx)
movq %r15, %rdi
movl %ebp, %esi
callq 0x779a
movq %rax, %r14
leaq 0x34(%rsp), %r13
leaq 0x38(%rsp), %rdx
movl %ebp, %edi
movq %r13, %rsi
callq 0x389b4
movq %rax, %r15
cmpl $0x0, (%r13)
jle 0x770c
movl %ebp, 0x44(%rsp)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movsd 0x9b6a1(%rip), %xmm0    # 0xa2d20
movsd %xmm0, 0x48(%rsp)
xorl %r13d, %r13d
movl %ecx, %ebp
movq (%r15,%r13,8), %rdx
movq 0x38(%rsp), %rax
movl (%rax,%r13,4), %ecx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x74b1
movq (%r14), %rax
movl (%rax), %edi
movq 0x20(%rbx), %rax
movq %rax, 0x20(%rsp)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movl $0x1, %esi
movq %r12, %rdx
xorl %eax, %eax
callq 0x7288
movsd %xmm0, 0x50(%rsp)
movsd 0x48(%rsp), %xmm1
callq 0x38d8e
movl %r13d, %ecx
testl %eax, %eax
cmovel %ebp, %ecx
je 0x76f6
movsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x48(%rsp)
incq %r13
movslq 0x34(%rsp), %rax
cmpq %rax, %r13
jl 0x7688
movslq %ecx, %r12
movl 0x44(%rsp), %ebp
jmp 0x7713
movq $-0x1, %r12
movq (%r15,%r12,8), %rdx
movq 0x38(%rsp), %rax
movl (%rax,%r12,4), %ecx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x74b1
movq (%r15,%r12,8), %rdx
movq 0x38(%rsp), %rax
movl (%rax,%r12,4), %ecx
movq %r14, %rdi
movl %ebp, %esi
callq 0x750d
cmpl $0x0, 0x34(%rsp)
jle 0x776e
xorl %r12d, %r12d
movq 0x38(%rsp), %rax
cmpl $0x0, (%rax,%r12,4)
jle 0x7761
movq (%r15,%r12,8), %rdi
callq 0x39194
incq %r12
movslq 0x34(%rsp), %rax
cmpq %rax, %r12
jl 0x774c
movq %r15, %rdi
callq 0x39194
movq 0x38(%rsp), %rdi
callq 0x39194
movq %r14, %rdi
callq 0x39194
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/c45rules.c
// Function: create_array_from_link_list_of_rules
Decisionruleptr* create_array_from_link_list_of_rules(Decisionruleptr start, int rulecount)
{
 /*!Last Changed 02.02.2004 added safemalloc*/
 /*!Last Changed 31.10.2003*/
 int i;
 Decisionruleptr tmp;
 Decisionruleptr* result;
 result = (Decisionruleptr*) safemalloc(rulecount * sizeof(Decisionruleptr), "create_array_from_link_list_of_rules", 4);
 for (i = 0, tmp = start; i < rulecount; i++)
  {
   result[i] = tmp;
   if (i != (rulecount - 1))
     tmp = tmp->next;
  }
 return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movslq %esi, %r15
leaq (,%r15,8), %rdi
leaq 0x9b571(%rip), %rsi     # 0xa2d28
movl $0x4, %edx
callq 0x390f5
testl %r15d, %r15d
jle 0x77e4
leal -0x1(%r14), %ecx
movl %r14d, %edx
xorl %esi, %esi
movq %rbx, (%rax,%rsi,8)
cmpq %rsi, %rcx
je 0x77dc
movq 0x30(%rbx), %rbx
incq %rsi
cmpq %rsi, %rdx
jne 0x77cf
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/c45rules.c
// Function: create_percentage_of_ruleset
void create_percentage_of_ruleset(Decisionruleptr* rules, int rulecount, int percentage, Ruleset* inlist, Ruleset* outlist)
{
 /*!Last Changed 01.11.2003*/
 int* rastgele, i;
 empty_ruleset(inlist);
 empty_ruleset(outlist);
 rastgele = random_array(rulecount);
 i = 0;
 while (i < rulecount)
  {
   if (i < (rulecount * percentage) / 10)
     add_rule(inlist, rules[rastgele[i]]);
   else
     add_rule(outlist, rules[rastgele[i]]);
   i++;
  }
 safe_free(rastgele);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movl %edx, %r13d
movl %esi, %ebp
movq %rdi, (%rsp)
movq %rcx, %rdi
callq 0x7aa63
movq %rbx, %r15
movq %rbx, %rdi
callq 0x7aa63
movl %ebp, %edi
callq 0x39fdc
movq %rax, %r12
testl %ebp, %ebp
jle 0x7ab3
imull %ebp, %r13d
movslq %r13d, %rax
imulq $0x66666667, %rax, %rax # imm = 0x66666667
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x22, %rax
addl %ecx, %eax
movslq %eax, %r13
movl %ebp, %ebp
xorl %ebx, %ebx
cmpq %r13, %rbx
movslq (%r12,%rbx,4), %rax
movq (%rsp), %rcx
movq (%rcx,%rax,8), %rsi
movq %r15, %rdi
cmovlq %r14, %rdi
callq 0x7b0fb
incq %rbx
cmpq %rbx, %rbp
jne 0x7a90
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x39194
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/c45rules.c
// Function: merge_rulesets
void merge_rulesets(Ruleset* r, Ruleset sets[MAXCLASSES], int classcount)
{
 /*!Last Changed 15.11.2010*/
 /*!Last Changed 01.11.2003*/
 int i;
 safe_free(r->counts);
 empty_ruleset(r);
 for (i = 0; i < classcount; i++)
   merge_ruleset(r, sets[i]);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rdi
callq 0x39194
movq %r14, %rdi
callq 0x7aa63
testl %ebp, %ebp
jle 0x7ca3
movl %ebp, %r15d
movq 0x20(%rbx), %rax
movq %rax, 0x20(%rsp)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r14, %rdi
callq 0x7aac5
addq $0x28, %rbx
decq %r15
jne 0x7c79
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/c45rules.c
// Function: find_class_rulesets
void find_class_rulesets(Ruleset* r, Instanceptr traindata)
{
/*!Last Changed 30.10.2003*/
 Ruleset sets[MAXCLASSES];
 Decisionruleptr rule = r->start;
 Decisionruleptr rulenext;
 Decisionruleptr rulesetstart = rule;
 int i, currentclass = rule->classno, rulecount = 1, classcount = 0;
 rule = rule->next;
 while (rule != NULL)
  {
   if (rule)
     rulenext = rule->next;
   if (rule->classno != currentclass)
    {
     if (rulecount <= 10)
       sets[classcount] = check_all_subsets(rulesetstart, rulecount, traindata, r->possibleconditioncount);
     else
       sets[classcount] = check_different_percentages(rulesetstart, rulecount, traindata, r->possibleconditioncount);
     classcount++;
     rulecount = 1;
     rulesetstart = rule;
     currentclass = rule->classno;
    }
   else
     rulecount++;
   rule = rulenext;
  }
 if (rulecount <= 10)
   sets[classcount] = check_all_subsets(rulesetstart, rulecount, traindata, r->possibleconditioncount);
 else
   sets[classcount] = check_different_percentages(rulesetstart, rulecount, traindata, r->possibleconditioncount);
 classcount++;
 merge_rulesets(r, sets, classcount);
 for (i = 0; i < classcount; i++)
   safe_free(sets[i].counts);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x808, %rsp            # imm = 0x808
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x30(%rsi), %r13
testq %r13, %r13
je 0x7d5a
movl (%rsi), %eax
movl $0x1, %edx
xorl %r12d, %r12d
movq 0x30(%r13), %rbp
cmpl %eax, (%r13)
jne 0x7ced
incl %edx
jmp 0x7d50
movslq %r12d, %rax
leaq (%rax,%rax,4), %rax
leaq (%rsp,%rax,8), %r15
addq $0x30, %r15
cmpl $0xa, %edx
jg 0x7d14
movl 0x20(%rbx), %r8d
leaq 0x8(%rsp), %rdi
movq %r14, %rcx
callq 0x761a
jmp 0x7d25
movl 0x20(%rbx), %r8d
leaq 0x8(%rsp), %rdi
movq %r14, %rcx
callq 0x7ac9
movq 0x28(%rsp), %rax
movq %rax, 0x20(%r15)
movups 0x8(%rsp), %xmm0
movups 0x18(%rsp), %xmm1
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
incl %r12d
movl (%r13), %eax
movl $0x1, %edx
movq %r13, %rsi
movq %rbp, %r13
testq %rbp, %rbp
jne 0x7cdf
jmp 0x7d62
xorl %r12d, %r12d
movl $0x1, %edx
movslq %r12d, %rax
leaq (%rax,%rax,4), %rax
leaq (%rsp,%rax,8), %r13
addq $0x30, %r13
cmpl $0xa, %edx
jg 0x7d8c
movl 0x20(%rbx), %r8d
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
callq 0x761a
jmp 0x7da0
movl 0x20(%rbx), %r8d
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
callq 0x7ac9
movq 0x20(%r15), %rax
movq %rax, 0x20(%r13)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups %xmm1, 0x10(%r13)
movups %xmm0, (%r13)
leal 0x1(%r12), %edx
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0x7c4f
testl %r12d, %r12d
js 0x7df7
movl %r12d, %eax
shlq $0x3, %rax
leaq (%rax,%rax,4), %rbx
addq $0x28, %rbx
xorl %r14d, %r14d
movq 0x48(%rsp,%r14), %rdi
callq 0x39194
addq $0x28, %r14
cmpq %r14, %rbx
jne 0x7de4
addq $0x808, %rsp            # imm = 0x808
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/c45rules.c
// Function: generalize_rule
void generalize_rule(Decisionruleptr rule, Instanceptr traindata)
{
 /*!Last Changed 27.10.2003*/
 int Y1, Y2, E1, E2;
 Decisionconditionptr condition, conditionbefore;
 conditionbefore = NULL;
 condition = rule->start;
 calculate_performance_for_prune(traindata, *rule, &Y1, &E1, rule->classno);
 while (condition)
  {
   remove_condition_after(rule, conditionbefore, condition);
   calculate_performance_for_prune(traindata, *rule, &Y2, &E2, rule->classno);
   if (is_pessimistic_error_rate_smaller(Y1, Y2, E1, E2))
    {
     free_condition(*condition);
     safe_free(condition);
     if (conditionbefore)
       condition = conditionbefore->next;
     else
       condition = rule->start;
     Y1 = Y2;
     E1 = E2;
    }
   else
    {
     add_condition_after(rule, conditionbefore, condition);
     conditionbefore = condition;
     condition = condition->next;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %r15
movl (%rdi), %ecx
movq 0x30(%rdi), %rax
movq %rax, 0x30(%rsp)
movupd (%rdi), %xmm0
movupd 0x10(%rdi), %xmm1
movupd 0x20(%rdi), %xmm2
movupd %xmm2, 0x20(%rsp)
movupd %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
leaq 0x7c(%rsp), %rsi
leaq 0x74(%rsp), %rdx
movq %rbx, %rdi
callq 0x7a84a
testq %r15, %r15
je 0x7f92
leaq 0x18(%r14), %rax
movq %rax, 0x80(%rsp)
xorl %ebp, %ebp
leaq 0x78(%rsp), %r12
leaq 0x70(%rsp), %r13
movq %r14, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x7af03
movl (%r14), %ecx
movq 0x30(%r14), %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)
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x7a84a
movl 0x74(%rsp), %eax
movl 0x70(%rsp), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
leal (%rcx,%rax), %edx
addl 0x7c(%rsp), %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
xorps %xmm2, %xmm2
cvtsi2sd %edx, %xmm2
addl 0x78(%rsp), %eax
addl %ecx, %eax
xorps %xmm3, %xmm3
cvtsi2sd %eax, %xmm3
divsd %xmm1, %xmm0
divsd %xmm3, %xmm2
ucomisd %xmm2, %xmm0
jae 0x7f48
movq %r14, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x7ae99
movq 0x48(%r15), %rax
movq %r15, %rbp
jmp 0x7f86
movl $0xe, %ecx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
callq 0x7a935
movq %r15, %rdi
callq 0x39194
leaq 0x48(%rbp), %rax
testq %rbp, %rbp
cmoveq 0x80(%rsp), %rax
movq (%rax), %rax
movl 0x78(%rsp), %ecx
movl %ecx, 0x7c(%rsp)
movl 0x70(%rsp), %ecx
movl %ecx, 0x74(%rsp)
movq %rax, %r15
testq %rax, %rax
jne 0x7eae
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/c45rules.c
// Function: choose_default_class
void choose_default_class(Ruleset* r, Instanceptr traindata)
{
 /*!Last Changed 02.02.2004 added safecalloc*/
 /*!Last Changed 03.11.2003*/
 int* classcounts, classno, i, max;
 Instanceptr tmp = traindata;
 classcounts = (int*) safecalloc(current_dataset->classno, sizeof(int), "choose_default_class", 3);
 while (tmp)
  {
   if (!ruleset_cover_instance(tmp, *r))
    {
     classno = give_classno(tmp);
     classcounts[classno]++;
    }
   tmp = tmp->next;
  }
 max = -1;
 for (i = 0; i < current_dataset->classno; i++)
   if (classcounts[i] > max)
    {
     r->defaultclass = i;
     max = classcounts[i];
    }
 safe_free(classcounts);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xca889(%rip), %r12     # 0xd2870
movq (%r12), %rax
movslq 0x10(%rax), %rdi
leaq 0x9ad57(%rip), %rdx     # 0xa2d4d
movl $0x4, %esi
movl $0x3, %ecx
callq 0x39210
movq %rax, %r14
testq %r15, %r15
je 0x8046
movq 0x20(%rbx), %rax
movq %rax, 0x20(%rsp)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %r15, %rdi
callq 0x7acbb
testl %eax, %eax
jne 0x8040
movq %r15, %rdi
callq 0x2eaca
cltq
incl (%r14,%rax,4)
movq 0x10(%r15), %r15
jmp 0x8008
movq (%r12), %rax
movslq 0x10(%rax), %rax
testq %rax, %rax
jle 0x806f
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpl %edx, (%r14,%rcx,4)
jle 0x8067
movl %ecx, 0x14(%rbx)
movl (%r14,%rcx,4), %edx
incq %rcx
cmpq %rcx, %rax
jne 0x805a
movq %r14, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x39194
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/c45rules.c
// Function: polish_ruleset
void polish_ruleset(Ruleset* r, Instanceptr traindata)
{
 /*!Last Changed 04.11.2003*/
 Decisionruleptr tmp, tmpbefore, tmpnext, deleted, deletedbefore;
 int error_decreased = YES, minerror = error_of_ruleset(*r, traindata), error;
 while (error_decreased)
  {
   error_decreased = NO;
   tmpbefore = NULL;
   tmp = r->start;
   while (tmp)
    {
     tmpnext = tmp->next;
     remove_rule_after(r, tmpbefore, tmp);
     error = error_of_ruleset(*r, traindata);
     if (error < minerror)
      {
       minerror = error;
       deleted = tmp;
       deletedbefore = tmpbefore;
       error_decreased = YES;
      }
     add_rule_after(r, tmpbefore, tmp);
     tmpbefore = tmp;
     tmp = tmpnext;
    }
   if (error_decreased)
    {
     remove_rule_after(r, deletedbefore, deleted);
     free_rule(*deleted);
     safe_free(deleted);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r14
movq 0x20(%rdi), %rax
movq %rax, 0x20(%rsp)
movups (%rdi), %xmm0
movups 0x10(%rdi), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rsi, %rbx
movq %rsi, %rdi
callq 0x7a03b
movl %eax, %ebp
movq (%r14), %r12
testq %r12, %r12
je 0x843b
movq $0x0, 0x40(%rsp)
xorl %r15d, %r15d
movq %r12, %r13
movq 0x30(%r12), %r12
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x7afd2
movq 0x20(%r14), %rax
movq %rax, 0x20(%rsp)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x7a03b
cmpl %ebp, %eax
jge 0x841b
movl $0x1, %ecx
movq %rcx, 0x40(%rsp)
movq %r13, 0x48(%rsp)
movq %r15, 0x50(%rsp)
movl %eax, %ebp
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x7afad
movq %r13, %r15
testq %r12, %r12
jne 0x83c8
cmpl $0x0, 0x40(%rsp)
sete %al
jmp 0x843d
movb $0x1, %al
testb %al, %al
jne 0x848d
movq %r14, %rdi
movq 0x50(%rsp), %rsi
movq 0x48(%rsp), %r15
movq %r15, %rdx
callq 0x7afd2
movq 0x30(%r15), %rax
movq %rax, 0x30(%rsp)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0x7a989
movq %r15, %rdi
callq 0x39194
jmp 0x83b4
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/c45rules.c
// Function: add_rules_from_tree
void add_rules_from_tree(Ruleset* r, Decisionnodeptr tree)
{
 /*!Last Changed 04.10.2004 added multivariate rules*/
 /*!Last Changed 24.10.2003*/
 int i, fno;
 Decisionruleptr newrule;
 if (tree->featureno == -1)
  {
   newrule = extract_rule_from_leaf(tree);
   add_rule(r, newrule);
  }
 else
  {
   fno = tree->featureno;
   if (fno < 0)
    {
     add_rules_from_tree(r, tree->left);
     add_rules_from_tree(r, tree->right);
    }
   else
     switch (current_dataset->features[fno].type){
       case INTEGER:
       case REAL:   add_rules_from_tree(r, tree->left);
                    add_rules_from_tree(r, tree->right);
                    break;
       case STRING: for (i=0;i<current_dataset->features[fno].valuecount;i++)
                      add_rules_from_tree(r, &(tree->string[i]));
                    break; 
     }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
leaq 0xca3b6(%rip), %r15     # 0xd2870
movl 0x30(%r14), %eax
cmpq %r12, %rax
je 0x84f3
testl %eax, %eax
js 0x84e2
movq (%r15), %rcx
imulq $0x340, %rax, %r13      # imm = 0x340
movl 0x30f08(%rcx,%r13), %eax
testl %eax, %eax
je 0x84e2
cmpl $0x2, %eax
jne 0x8514
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x849c
movq 0x8(%r14), %r14
jmp 0x84ba
movq %r14, %rdi
callq 0x7a629
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7b0fb
cmpl $0x1, %eax
jne 0x8555
movq (%r15), %rax
cmpl $0x0, 0x30f20(%rax,%r13)
jle 0x8555
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x10(%r14), %rsi
addq %r12, %rsi
movq %rbx, %rdi
callq 0x849c
incq %rbp
movq (%r15), %rax
movslq 0x30f20(%rax,%r13), %rax
addq $0x160, %r12            # imm = 0x160
cmpq %rax, %rbp
jl 0x852c
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/classification.c
// Function: read_posteriors
matrixptr read_posteriors(int numfolds, char *fname)
{
 /*!Last Changed 24.03.2006 Aydin*/
 FILE *infile;
 int i;
 char searchstring[100];
 matrixptr tmp = NULL;
 infile = fopen(fname, "r");
 if (infile)
   tmp = safemalloc(numfolds * sizeof(matrix), "read_posteriors", 6);
	else 
		 return NULL;
 for (i = 0 ; i < numfolds ; i++)
  {
   sprintf(searchstring, "####### CURRENT RUN COUNT %d", i + 1);
   infile = find_string_in_file(infile, searchstring);
   fscanf(infile, "%c", &searchstring[99]);
   tmp[i] = read_matrix_filehandle(infile);
  }
 fclose(infile);
 return(tmp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rax
movl %edi, %ebp
leaq 0xa02e9(%rip), %rsi     # 0xa888f
movq %rax, %rdi
callq 0x40f0
testq %rax, %rax
je 0x864c
movq %rax, %rbx
movslq %ebp, %r15
movq %r15, %rdi
shlq $0x4, %rdi
leaq 0x9a825(%rip), %rsi     # 0xa2df0
movl $0x6, %edx
callq 0x390f5
movq %rax, %r14
testl %r15d, %r15d
jle 0x8642
movl %ebp, %r12d
shlq $0x4, %r12
movl $0x1, %ebp
movq %rsp, %r13
xorl %r15d, %r15d
movq %r13, %rdi
leaq 0x9a807(%rip), %rsi     # 0xa2e00
movl %ebp, %edx
xorl %eax, %eax
callq 0x41b0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x38077
movq %rax, %rbx
movq %rax, %rdi
leaq 0x9e746(%rip), %rsi     # 0xa6d60
leaq 0x63(%rsp), %rdx
xorl %eax, %eax
callq 0x4070
movq %rbx, %rdi
callq 0x3de0f
movq %rax, (%r14,%r15)
movq %rdx, 0x8(%r14,%r15)
addq $0x10, %r15
incl %ebp
cmpq %r15, %r12
jne 0x85ef
movq %rbx, %rdi
callq 0x42a0
jmp 0x864f
xorl %r14d, %r14d
movq %r14, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/classification.c
// Function: print_confusion
void print_confusion(FILE* outfile, int** confusionmatrix, int classno)
{
 /*!Last Changed 02.08.2007*/
 int i, j;
 fprintf(outfile, "%d %d\n", classno, classno);
 for (i = 0; i < classno; i++)
  {
   for (j = 0; j < classno; j++)
     fprintf(outfile, "%d ", confusionmatrix[i][j]);
   fprintf(outfile, "\n");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x9a7b1(%rip), %rsi     # 0xa2e2c
movl %edx, %ecx
xorl %eax, %eax
callq 0x42e0
testl %ebp, %ebp
jle 0x86c8
movl %ebp, %r12d
leaq 0xa461b(%rip), %r15     # 0xaccad
xorl %r13d, %r13d
xorl %ebp, %ebp
movq (%rbx,%r13,8), %rax
movl (%rax,%rbp,4), %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x42e0
incq %rbp
cmpq %rbp, %r12
jne 0x8697
movl $0xa, %edi
movq %r14, %rsi
callq 0x4150
incq %r13
cmpq %r12, %r13
jne 0x8695
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/classification.c
// Function: print_posterior
void print_posterior(FILE* outfile, double** posteriors, int testsize, Instanceptr data)
{
 /*!Last Changed 01.11.2005*/
 int i = 0, j, classno;
 char pst[READLINELENGTH];
 Instanceptr tmp = data;
 fprintf(outfile, "# %d %d\n", testsize, current_dataset->classno + 1);
 while (tmp)
  {
   classno = give_classno(tmp);
   for (j = 0; j < current_dataset->classno; j++)
    {
     set_precision(pst, NULL, " ");
     fprintf(outfile, pst, posteriors[i][j]);
    }
   fprintf(outfile, "%d\n", classno);
   tmp = tmp->next;
   i++;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x7a148, %rsp          # imm = 0x7A148
movq %rcx, %rbp
movq %rsi, 0x10(%rsp)
movq %rdi, %r14
leaq 0xca155(%rip), %rax     # 0xd2870
movq (%rax), %rax
movl 0x10(%rax), %ecx
incl %ecx
leaq 0x9a700(%rip), %rsi     # 0xa2e2a
xorl %eax, %eax
callq 0x42e0
testq %rbp, %rbp
je 0x87e1
leaq 0x20(%rsp), %r13
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %rbp, 0x18(%rsp)
movq %rbp, %rdi
callq 0x2eaca
movl %eax, 0x4(%rsp)
leaq 0xca112(%rip), %rbx     # 0xd2870
movq (%rbx), %rax
cmpl $0x0, 0x10(%rax)
movq %r14, %r12
leaq 0x9cf1e(%rip), %r15     # 0xa568d
movq 0x10(%rsp), %r14
jle 0x87af
xorl %ebp, %ebp
movq %r13, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x39529
movq 0x8(%rsp), %rax
movq (%r14,%rax,8), %rax
movsd (%rax,%rbp,8), %xmm0
movq %r12, %rdi
movq %r13, %rsi
movb $0x1, %al
callq 0x42e0
incq %rbp
movq (%rbx), %rax
movslq 0x10(%rax), %rax
cmpq %rax, %rbp
jl 0x8778
movq %r12, %rdi
leaq 0xa4d90(%rip), %rsi     # 0xad549
movl 0x4(%rsp), %edx
xorl %eax, %eax
callq 0x42e0
movq 0x18(%rsp), %rbp
movq 0x10(%rbp), %rbp
movq 0x8(%rsp), %rax
incq %rax
testq %rbp, %rbp
movq %r12, %r14
jne 0x8741
addq $0x7a148, %rsp          # imm = 0x7A148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/classification.c
// Function: performance_initialize
Classificationresultptr performance_initialize(int testsize)
{
 /*!Last Changed 01.08.2007 added confusion matrix*/
 /*!Last Changed 02.02.2004 added safecalloc*/
 /*!Last Changed 19.03.2002*/
 int i;
 Classificationresultptr result;
 result = safemalloc(sizeof(Classificationresult), "performance_initialize", 2);
 result->performance = 0;
 result->confusion_matrix = (int**) safecalloc_2d(sizeof(int*), sizeof(int), current_dataset->classno, current_dataset->classno, "performance_initialize", 4);
 result->class_performance = safecalloc(current_dataset->classno, sizeof(int), "performance_initialize", 5);
 result->class_counts = safecalloc(current_dataset->classno, sizeof(int), "performance_initialize", 6);
 result->classno = current_dataset->classno;
 result->datasize = testsize;
 result->posteriors = (double **) safecalloc_2d(sizeof(double *), sizeof(double), testsize, current_dataset->classno, "performance_initialize", 8);
 result->hingeloss = 0.0;
 for (i = 0; i < 3; i++)
   result->knnloss[i] = 0.0;
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebp
leaq 0x9a38d(%rip), %r14     # 0xa2e45
movl $0x58, %edi
movq %r14, %rsi
movl $0x2, %edx
callq 0x390f5
movq %rax, %rbx
movl $0x0, (%rax)
leaq 0xc9d96(%rip), %r15     # 0xd2870
movq (%r15), %rax
movl 0x10(%rax), %ecx
movl $0x8, %edi
movl $0x4, %esi
movl %ecx, %edx
movq %r14, %r8
movl $0x4, %r9d
callq 0x39245
movq %rax, 0x18(%rbx)
movq (%r15), %rax
movslq 0x10(%rax), %rdi
movl $0x4, %esi
movq %r14, %rdx
movl $0x5, %ecx
callq 0x39210
movq %rax, 0x8(%rbx)
movq (%r15), %rax
movslq 0x10(%rax), %rdi
movl $0x4, %esi
movq %r14, %rdx
movl $0x6, %ecx
callq 0x39210
movq %rax, 0x10(%rbx)
movq (%r15), %rax
movl 0x10(%rax), %ecx
movl %ecx, 0x20(%rbx)
movl %ebp, 0x30(%rbx)
movl $0x8, %edi
movl $0x8, %esi
movl %ebp, %edx
movq %r14, %r8
movl $0x8, %r9d
callq 0x39245
movq %rax, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rbx)
movups %xmm0, 0x48(%rbx)
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/classification.c
// Function: free_performance
void free_performance(Classificationresultptr result){
 /*!Last Changed 01.08.2007*/
 free_2d((void **) result->confusion_matrix, result->classno);
 safe_free(result->class_performance);
 safe_free(result->class_counts);
 free_2d((void **) result->posteriors, result->datasize);
 safe_free(result);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movl 0x20(%rbx), %esi
callq 0x3915f
movq 0x8(%rbx), %rdi
callq 0x39194
movq 0x10(%rbx), %rdi
callq 0x39194
movq 0x28(%rbx), %rdi
movl 0x30(%rbx), %esi
callq 0x3915f
movq %rbx, %rdi
popq %rbx
jmp 0x39194
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/classification.c
// Function: train_select_max
void* train_select_max(Instanceptr* trdata, Instanceptr *cvdata, void* parameters)
{
 /*!Last Changed 04.08.2005*/
 /*!Last Changed 14.07.2001*/
 int i, *train_counts, datacount = data_size(*trdata);
 Model_selectmaxptr m;
 m = safemalloc(sizeof(Model_selectmax), "train_select_max", 3); 
 m->priors = safemalloc(current_dataset->classno * sizeof(double), "train_select_max", 4);
 train_counts = find_class_counts(*trdata);
 for (i = 0; i < current_dataset->classno; i++)
   m->priors[i] = train_counts[i] / (datacount + 0.0);
 m->classno = find_max_in_list(train_counts, current_dataset->classno);
 safe_free(train_counts);
 return m;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movq (%rdi), %rdi
callq 0x2fa14
movl %eax, %ebp
leaq 0x99e89(%rip), %r15     # 0xa2e85
movl $0x10, %edi
movq %r15, %rsi
movl $0x3, %edx
callq 0x390f5
movq %rax, %rbx
leaq 0xc9858(%rip), %r12     # 0xd2870
movq (%r12), %rax
movslq 0x10(%rax), %rdi
shlq $0x3, %rdi
movq %r15, %rsi
movl $0x4, %edx
callq 0x390f5
movq %rax, 0x8(%rbx)
movq (%r14), %rdi
callq 0x115e1
movq %rax, %r14
movq (%r12), %rax
movslq 0x10(%rax), %rsi
testq %rsi, %rsi
jle 0x9071
cvtsi2sd %ebp, %xmm0
movq 0x8(%rbx), %rax
xorl %ecx, %ecx
xorps %xmm1, %xmm1
cvtsi2sdl (%r14,%rcx,4), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rax,%rcx,8)
incq %rcx
cmpq %rcx, %rsi
jne 0x9057
movq %r14, %rdi
callq 0x37504
movl %eax, (%rbx)
movq %r14, %rdi
callq 0x39194
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/classification.c
// Function: test_select_max
Prediction test_select_max(Instanceptr data, void* model, void* parameters, double* posterior)
{
 /*!Last Changed 01.11.2005*/
 /*!Last Changed 04.08.2005*/
 /*!Last Changed 14.07.2001*/
 Prediction predicted;
 int i;
 Model_selectmaxptr m;
 m = (Model_selectmaxptr)model;
 predicted.classno = m->classno;
 for (i = 0; i < current_dataset->classno; i++)
   posterior[i] = m->priors[i];
 return predicted;
}

// Assembly:
movq %rdi, %rax
movl (%rdx), %ecx
movl %ecx, 0x8(%rdi)
leaq 0xc97d2(%rip), %rcx     # 0xd2870
movq (%rcx), %rcx
movslq 0x10(%rcx), %rcx
testq %rcx, %rcx
jle 0x90c3
movq 0x8(%rdx), %rdx
xorl %esi, %esi
movsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, (%r8,%rsi,8)
incq %rsi
cmpq %rsi, %rcx
jne 0x90b0
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/classification.c
// Function: train_randomforest
void* train_randomforest(Instanceptr* trdata, Instanceptr *cvdata, void* parameters)
{
 int i;
 Randomforest_parameterptr p;
 Decisionnodeptr* forest;
 Decisionnodeptr rootnode;
 Instanceptr data;
 p = (Randomforest_parameterptr) parameters;
 forest = safemalloc(p->forestsize * sizeof(Decisionnodeptr), "train_randomforest", 4);
 for (i = 0; i < p->forestsize; i++)
  {
   rootnode = createnewnode(NULL, 1);
   rootnode->instances = bootstrap_sample_without_stratification(*trdata);
   create_randomforestchildren(rootnode, p);
   data = NULL;
   accumulate_instances_tree(&data, rootnode);
   deallocate(data);
   forest[i] = rootnode;
  }
 return forest;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movslq (%rdx), %rdi
shlq $0x3, %rdi
leaq 0x99db3(%rip), %rsi     # 0xa2e96
movl $0x4, %edx
callq 0x390f5
movq %rax, %r15
cmpl $0x0, (%rbx)
jle 0x914b
xorl %ebp, %ebp
movq %rsp, %r12
xorl %edi, %edi
movl $0x1, %esi
callq 0x1c996
movq %rax, %r13
movq (%r14), %rdi
callq 0x2fede
movq %rax, 0x20(%r13)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1c227
movq $0x0, (%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x1c787
movq (%rsp), %rdi
callq 0x2f616
movq %r13, (%r15,%rbp,8)
incq %rbp
movslq (%rbx), %rax
cmpq %rax, %rbp
jl 0x90fa
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_O1/olcaytaner[P]Isell/classification.c
// Function: test_randomforest
Prediction test_randomforest(Instanceptr data, void* model, void* parameters, double* posterior)
{
 int i;
 double* votes;
 Randomforest_parameterptr p;
 Decisionnodeptr* forest;
 Prediction predicted, predictedc45;
 forest = (Decisionnodeptr*) model;
 p = (Randomforest_parameterptr) parameters;
 votes = safecalloc(current_dataset->classno, sizeof(double), "test_randomforest", 5);
 for (i = 0; i < p->forestsize; i++) 
  {
   predictedc45 = test_c45(data, forest[i], parameters, posterior);
   votes[predictedc45.classno]++;
  }
 normalize_array_of_doubles(votes, current_dataset->classno);
 memcpy(posterior, votes, current_dataset->classno * sizeof(double));
 safe_free(votes);
 predicted.classno = findMaxOutput(posterior, current_dataset->classno);
 return predicted;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, 0x8(%rsp)
leaq 0xc96ed(%rip), %rax     # 0xd2870
movq (%rax), %rax
movslq 0x10(%rax), %rdi
leaq 0x99d18(%rip), %rdx     # 0xa2ea9
movl $0x8, %esi
movl $0x5, %ecx
callq 0x39210
movq %rax, %r15
cmpl $0x0, (%r12)
jle 0x91e6
xorl %ebx, %ebx
movq (%r13,%rbx,8), %rdx
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
movq %r14, %r8
callq 0x9241
movslq 0x18(%rsp), %rax
movsd (%r15,%rax,8), %xmm0
addsd 0x9934c(%rip), %xmm0    # 0xa2520
movsd %xmm0, (%r15,%rax,8)
incq %rbx
movslq (%r12), %rax
cmpq %rax, %rbx
jl 0x91ac
leaq 0xc9683(%rip), %rbx     # 0xd2870
movq (%rbx), %rax
movl 0x10(%rax), %esi
movq %r15, %rdi
callq 0x37aff
movq (%rbx), %rax
movslq 0x10(%rax), %rdx
shlq $0x3, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4310
movq %r15, %rdi
callq 0x39194
movq (%rbx), %rax
movl 0x10(%rax), %esi
movq %r14, %rdi
callq 0x37852
movq 0x8(%rsp), %rcx
movl %eax, 0x8(%rcx)
movq %rcx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/classification.c
// Function: test_c45
Prediction test_c45(Instanceptr data, void* model, void* parameters, double* posterior)
{
 /*!Last Changed 11.07.2006 if there is no data at the node the posteriors will be same and 1 / classno*/
 /*!Last Changed 01.11.2005 added posteriors*/
 Decisionnodeptr currentnode, root = (Decisionnodeptr) model;
 Prediction predicted;
 currentnode = root;
 while (currentnode->featureno != LEAF_NODE)
   currentnode = next_node(currentnode, data);
 if (get_parameter_o("laplaceestimate") == ON)
   normalize_array_laplace(currentnode->counts, posterior, current_dataset->classno);
	else
   normalize_array(currentnode->counts, posterior, current_dataset->classno);
 predicted.classno = currentnode->classno;
 return predicted;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rdx, %r14
movq %rdi, %rbx
cmpl $-0x1, 0x30(%rdx)
je 0x926f
movq %rsi, %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x1cc8d
movq %rax, %r14
cmpl $-0x1, 0x30(%rax)
jne 0x925b
leaq 0x99c45(%rip), %rdi     # 0xa2ebb
callq 0x536e7
movq 0xa0(%r14), %rdi
leaq 0xc95e7(%rip), %rcx     # 0xd2870
movq (%rcx), %rcx
movl 0x10(%rcx), %edx
movq %r15, %rsi
cmpl $0x1, %eax
jne 0x929e
callq 0x37a9c
jmp 0x92a3
callq 0x37a34
movl 0x34(%r14), %eax
movl %eax, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/classification.c
// Function: train_kforest
void* train_kforest(Instanceptr* trdata, Instanceptr *cvdata, void* parameters)
{
 int i;
 Kforest_parameterptr p;
 Decisionnodeptr* forest;
 Decisionnodeptr rootnode;
 Instanceptr data;
 p = (Kforest_parameterptr) parameters;
 forest = safemalloc(p->forestsize * sizeof(Decisionnodeptr), "train_randomforest", 4);
 for (i = 0; i < p->forestsize; i++)
  {
   rootnode = createnewnode(NULL, 1);
   rootnode->instances = bootstrap_sample_without_stratification(*trdata);
   create_kforestchildren(rootnode, p);
   data = NULL;
   accumulate_instances_tree(&data, rootnode);
   deallocate(data);
   forest[i] = rootnode;
  }
 return forest;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
movslq (%rdx), %rdi
shlq $0x3, %rdi
leaq 0x99bbe(%rip), %rsi     # 0xa2e96
movl $0x4, %edx
callq 0x390f5
movq %rax, %r15
cmpl $0x0, (%rbx)
jle 0x9340
xorl %ebp, %ebp
movq %rsp, %r12
xorl %edi, %edi
movl $0x1, %esi
callq 0x1c996
movq %rax, %r13
movq (%r14), %rdi
callq 0x2fede
movq %rax, 0x20(%r13)
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1befc
movq $0x0, (%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x1c787
movq (%rsp), %rdi
callq 0x2f616
movq %r13, (%r15,%rbp,8)
incq %rbp
movslq (%rbx), %rax
cmpq %rax, %rbp
jl 0x92ef
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_O1/olcaytaner[P]Isell/classification.c
// Function: make_tree_stump
void make_tree_stump(Decisionnodeptr rootnode)
{
 int count, i;
 if (!make_children(rootnode))
  {
   setup_node_properties(rootnode);
   make_leaf_node(rootnode);
   return;
  }
 switch (current_dataset->features[rootnode->featureno].type)
  {
   case INTEGER:
   case REAL   :setup_node_properties(rootnode->left);
                make_leaf_node(rootnode->left);
                setup_node_properties(rootnode->right);
                make_leaf_node(rootnode->right);
                break;
   case STRING :count = current_dataset->features[rootnode->featureno].valuecount;
                for (i = 0; i < count; i++)
                 {
                  setup_node_properties(&(rootnode->string[i]));
                  make_leaf_node(&(rootnode->string[i]));
                 }
                break;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x9db4a
testl %eax, %eax
je 0x9490
leaq 0xc9422(%rip), %rax     # 0xd2870
movq (%rax), %rax
movslq 0x30(%rbx), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
movl 0x30f08(%rax,%rcx), %edx
cmpl $0x2, %edx
je 0x9471
cmpl $0x1, %edx
je 0x94a5
testl %edx, %edx
jne 0x94e5
movq (%rbx), %rdi
callq 0x1c85f
movq (%rbx), %rdi
callq 0x1c39c
movq 0x8(%rbx), %rdi
callq 0x1c85f
movq 0x8(%rbx), %rbx
jmp 0x9498
movq %rbx, %rdi
callq 0x1c85f
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x1c39c
addq %rcx, %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq 0x18(%rax), %rax
testq %rax, %rax
jle 0x94e5
imulq $0x160, %rax, %r14      # imm = 0x160
xorl %r15d, %r15d
movq 0x10(%rbx), %rdi
addq %r15, %rdi
callq 0x1c85f
movq 0x10(%rbx), %rdi
addq %r15, %rdi
callq 0x1c39c
addq $0x160, %r15            # imm = 0x160
cmpq %r15, %r14
jne 0x94c1
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/classification.c
// Function: train_c45stump
void* train_c45stump(Instanceptr* trdata, Instanceptr *cvdata, void* parameters)
{
 Decisionnodeptr rootnode;
 rootnode = createnewnode(NULL, 1);
 rootnode->instances = *trdata;
 rootnode->conditiontype = UNIVARIATE_CONDITION;
 rootnode->featureno = find_best_feature(rootnode->instances, &(rootnode->split));
 make_tree_stump(rootnode);
 *trdata = NULL;
 return rootnode;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %edi, %edi
movl $0x1, %esi
callq 0x1c996
movq %rax, %r14
movq (%rbx), %rdi
movq %rdi, 0x20(%rax)
movl $0x0, 0x98(%rax)
leaq 0x28(%rax), %rsi
callq 0x9daab
movl %eax, 0x30(%r14)
movq %r14, %rdi
callq 0x9436
movq $0x0, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/classification.c
// Function: test_c45stump
Prediction test_c45stump(Instanceptr data, void* model, void* parameters, double* posterior)
{
 Decisionnodeptr currentnode, root = (Decisionnodeptr) model;
 Prediction predicted;
 currentnode = root;
 while (currentnode->featureno != LEAF_NODE)
   currentnode = next_node(currentnode, data);
 normalize_array(currentnode->counts, posterior, current_dataset->classno);
 predicted.classno = currentnode->classno;
 return predicted;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rdx, %r15
movq %rdi, %rbx
cmpl $-0x1, 0x30(%rdx)
je 0x9567
movq %rsi, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x1cc8d
movq %rax, %r15
cmpl $-0x1, 0x30(%rax)
jne 0x9553
movq 0xa0(%r15), %rdi
leaq 0xc92fb(%rip), %rax     # 0xd2870
movq (%rax), %rax
movl 0x10(%rax), %edx
movq %r14, %rsi
callq 0x37a34
movl 0x34(%r15), %eax
movl %eax, 0x8(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/classification.c
// Function: train_ldtstump
void* train_ldtstump(Instanceptr* trdata, Instanceptr *cvdata, void* parameters)
{
 Decisionnodeptr rootnode;
 rootnode = createnewnode(NULL, 1);
 rootnode->instances = *trdata;
 rootnode->conditiontype = UNIVARIATE_CONDITION;
 rootnode->featureno = find_best_ldt_feature(rootnode->instances, &(rootnode->split));
 make_tree_stump(rootnode);
 *trdata = NULL;
 return rootnode;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %edi, %edi
movl $0x1, %esi
callq 0x1c996
movq %rax, %r14
movq (%rbx), %rdi
movq %rdi, 0x20(%rax)
movl $0x0, 0x98(%rax)
leaq 0x28(%rax), %rsi
callq 0x9f595
movl %eax, 0x30(%r14)
movq %r14, %rdi
callq 0x9436
movq $0x0, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/classification.c
// Function: train_multildtstump
void* train_multildtstump(Instanceptr* trdata, Instanceptr *cvdata, void* parameters)
{
 Decisionnodeptr rootnode;
 rootnode = createnewnode(NULL, 1);
 rootnode->instances = *trdata;
 rootnode->conditiontype = MULTIVARIATE_CONDITION;
 rootnode->lineard = find_best_multi_ldt_split(&(rootnode->instances), &(rootnode->w), &(rootnode->w0), MULTIVARIATE_LINEAR, 0.99);
 if (!(rootnode->lineard))
  {
   matrix_free(rootnode->w);
   setup_node_properties(rootnode);
   make_leaf_node(rootnode);
  }
 else
  {
   rootnode->featureno = LINEAR;
   make_multivariate_children(rootnode);
   setup_node_properties(rootnode->left);
   make_leaf_node(rootnode->left);
   setup_node_properties(rootnode->right);
   make_leaf_node(rootnode->right);
  }
 *trdata = NULL;
 return rootnode;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %edi, %edi
movl $0x1, %esi
callq 0x1c996
movq %rax, %r14
movq (%rbx), %rax
leaq 0x20(%r14), %rdi
movq %rax, 0x20(%r14)
movl $0x1, 0x98(%r14)
leaq 0x38(%r14), %rsi
leaq 0x48(%r14), %rdx
movsd 0x9977f(%rip), %xmm0    # 0xa2db0
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
callq 0x4cbee
movl %eax, 0x90(%r14)
testl %eax, %eax
je 0x9675
movl $0xfffffffe, 0x30(%r14) # imm = 0xFFFFFFFE
movq %r14, %rdi
callq 0x4c6b9
movq (%r14), %rdi
callq 0x1c85f
movq (%r14), %rdi
callq 0x1c39c
movq 0x8(%r14), %rdi
callq 0x1c85f
movq 0x8(%r14), %rdi
jmp 0x968d
movq 0x38(%r14), %rdi
movq 0x40(%r14), %rsi
callq 0x3dbad
movq %r14, %rdi
callq 0x1c85f
movq %r14, %rdi
callq 0x1c39c
movq $0x0, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/classification.c
// Function: train_softstump
void* train_softstump(Instanceptr* trdata, Instanceptr *cvdata, void* parameters)
{
	Decisionnodeptr treenode;
	Softregtree_parameterptr p;
	p = (Softregtree_parameterptr) parameters;
 treenode = createnewnode(NULL, 1);
 treenode->weight = 1.0;
 treenode->instances = *trdata;
 treenode->leaftype = p->leaftype;
 if (p->leaftype == CONSTANTLEAF)
   treenode->w0 = produce_random_value(-0.01, +0.01);
 else
   treenode->w = random_matrix(current_dataset->multifeaturecount, 1, -0.01, +0.01);
 find_best_soft_tree_split(treenode, treenode, *trdata, p);
 if (treenode->left != NULL)
  {
   make_leaf_node(treenode->left);
   make_leaf_node(treenode->right);
  }
 else
   make_leaf_node(treenode);
	*trdata = NULL;
	return treenode;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rdi, %rbx
xorl %edi, %edi
movl $0x1, %esi
callq 0x1c996
movq %rax, %r14
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%r14)
movq (%rbx), %rax
movq %rax, 0x20(%r14)
movl (%r15), %eax
movl %eax, 0x60(%r14)
testl %eax, %eax
je 0x9720
leaq 0xc917d(%rip), %rax     # 0xd2870
movq (%rax), %rax
movl 0x1c0(%rax), %edi
movsd 0x996b4(%rip), %xmm0    # 0xa2db8
movsd 0x996b4(%rip), %xmm1    # 0xa2dc0
movl $0x1, %esi
callq 0x3dd75
movq %rax, 0x38(%r14)
movq %rdx, 0x40(%r14)
jmp 0x973b
movsd 0x99690(%rip), %xmm0    # 0xa2db8
movsd 0x99690(%rip), %xmm1    # 0xa2dc0
callq 0x39f62
movsd %xmm0, 0x48(%r14)
movq (%rbx), %rdx
movq %r14, %rdi
movq %r14, %rsi
movq %r15, %rcx
callq 0x89b93
movq (%r14), %rdi
testq %rdi, %rdi
je 0x975f
callq 0x1c39c
movq 0x8(%r14), %rdi
jmp 0x9762
movq %r14, %rdi
callq 0x1c39c
movq $0x0, (%rbx)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/classification.c
// Function: train_c45
void* train_c45(Instanceptr* trdata, Instanceptr *cvdata, void* parameters)
{
 Decisionnodeptr rootnode;
 C45_parameterptr p;
 p = (C45_parameterptr) parameters;
 rootnode = createnewnode(NULL, 1);
 rootnode->instances = *trdata;
 create_c45children(rootnode, p);
 if (in_list(p->prunetype, 2, MODELSELECTIONPRUNING, VALIDATIONPRUNING))
  prune_tree(rootnode, rootnode, *cvdata);
 else
  if (p->prunetype == SRMPRUNING)
   {
   if (p->prunemodel == LOCAL)
    prune_tree_according_to_model_selection_method(rootnode, MODEL_SELECTION_SRM);
   else
    prune_tree_global(rootnode, rootnode, MODEL_SELECTION_SRM);
   }
 *trdata = NULL;
 return rootnode;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
xorl %edi, %edi
movl $0x1, %esi
callq 0x1c996
movq %rax, %r14
movq (%rbx), %rax
movq %rax, 0x20(%r14)
movq %r14, %rdi
movq %r15, %rsi
callq 0x9e0a2
movl (%r15), %edi
movl $0x2, %esi
movl $0x2, %edx
movl $0x1, %ecx
xorl %eax, %eax
callq 0x39a80
testl %eax, %eax
je 0x981b
movq (%r12), %rdx
movq %r14, %rdi
movq %r14, %rsi
callq 0x1d22a
jmp 0x9847
cmpl $0x4, (%r15)
jne 0x9847
cmpl $0x0, 0x4(%r15)
je 0x983a
movq %r14, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq 0x516d3
jmp 0x9847
movq %r14, %rdi
movl $0x3, %esi
callq 0x518e8
movq $0x0, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/classification.c
// Function: train_ktree
void* train_ktree(Instanceptr* trdata, Instanceptr *cvdata, void* parameters)
{
 Decisionnodeptr rootnode;
 C45_parameterptr p;
 p = (C45_parameterptr) parameters;
 rootnode = createnewnode(NULL, 1);
 rootnode->instances = *trdata;
 create_ktreechildren(rootnode, p);
 if (in_list(p->prunetype, 2, MODELSELECTIONPRUNING, VALIDATIONPRUNING))
   prune_tree(rootnode, rootnode, *cvdata);
 *trdata = NULL;
 return rootnode;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
xorl %edi, %edi
movl $0x1, %esi
callq 0x1c996
movq %rax, %r15
movq (%rbx), %rax
movq %rax, 0x20(%r15)
movq %r15, %rdi
movq %r12, %rsi
callq 0x32a29
movl (%r12), %edi
movl $0x2, %esi
movl $0x2, %edx
movl $0x1, %ecx
xorl %eax, %eax
callq 0x39a80
testl %eax, %eax
je 0x98bb
movq (%r14), %rdx
movq %r15, %rdi
movq %r15, %rsi
callq 0x1d22a
movq $0x0, (%rbx)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/classification.c
// Function: train_nearestmean
void* train_nearestmean(Instanceptr* trdata, Instanceptr *cvdata, void* parameters)
{
 /*!Last Changed 22.03.2005*/
 int *counts;
 Instanceptr classmeans;
 counts = find_class_counts(*trdata);
 classmeans = find_class_means(*trdata, counts);
 safe_free(counts);
 return classmeans;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x115e1
movq %rax, %r14
movq (%rbx), %rdi
movq %rax, %rsi
callq 0x11918
movq %rax, %rbx
movq %r14, %rdi
callq 0x39194
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq