// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/univariaterule.c
// Function: description_length_with_or_without_rule
double description_length_with_or_without_rule(Ruleset* r, int positive, int startrule, Instanceptr list1, Instanceptr list2, Instanceptr list3, Instanceptr list4, double proportion, int with)
{
 /*!Last Changed 04.12.2003*/
 int covered = 0, uncovered, fp = 0, fn, rulecount = 0;
 Decisionruleptr rule = r->start;
 double dlnow = 0;
 uncovered = data_size(list1) + data_size(list2) + data_size(list3) + data_size(list4);
 fn = find_class_count(list1, positive) + find_class_count(list2, positive) + find_class_count(list3, positive) + find_class_count(list4, positive);
 while (rule && rule->classno != positive)
  {
   rulecount++;
   rule = rule->next;
  }
 while (rulecount < startrule)
  {
   dlnow += description_length_of_rule(*rule, r->possibleconditioncount);
   uncovered -= rule->covered + rule->falsepositives;
   covered += rule->covered + rule->falsepositives;
   fp += rule->falsepositives;
   fn -= rule->covered;
   rule = rule->next;
   rulecount++;
  }
 if (!with)
   rule = rule->next;
 if (rule)
  {
   initialize_counts(rule);
   update_counts_rules(rule, list1, &covered, &uncovered, &fp, &fn);
   update_counts_rules(rule, list2, &covered, &uncovered, &fp, &fn);
   update_counts_rules(rule, list3, &covered, &uncovered, &fp, &fn);
   update_counts_rules(rule, list4, &covered, &uncovered, &fp, &fn);
   while (rule)
    {
     if (!can_delete_rule(rule, &covered, &uncovered, &fp, &fn, proportion, r->possibleconditioncount))
       dlnow += description_length_of_rule(*rule, r->possibleconditioncount);
     rule = rule->next;
    }
  }
 dlnow += description_length_of_exceptions(covered, uncovered, fp, fn, proportion);
 return dlnow;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movsd %xmm0, 0x70(%rsp)
movq %r9, 0x58(%rsp)
movq %r8, %r13
movq %r8, 0x68(%rsp)
movq %rcx, 0x60(%rsp)
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %rbx
xorl %ebp, %ebp
movl %ebp, 0x54(%rsp)
movl %ebp, 0x4c(%rsp)
movq (%rdi), %r14
movq %rcx, %rdi
callq 0x2fa14
movl %eax, 0x40(%rsp)
movq %r13, %rdi
callq 0x2fa14
movl %eax, %r13d
addl 0x40(%rsp), %r13d
movq 0x58(%rsp), %rdi
callq 0x2fa14
addl %r13d, %eax
movl %eax, %r13d
movq 0xb0(%rsp), %rdi
callq 0x2fa14
addl %r13d, %eax
movl %eax, 0x50(%rsp)
movq 0x60(%rsp), %rdi
movl %r12d, %esi
callq 0x11534
movl %eax, 0x40(%rsp)
movq 0x68(%rsp), %rdi
movl %r12d, %esi
callq 0x11534
movl %eax, %r13d
addl 0x40(%rsp), %r13d
movq 0x58(%rsp), %rdi
movl %r12d, %esi
callq 0x11534
addl %r13d, %eax
movl %eax, %r13d
movq 0xb0(%rsp), %rdi
movl %r12d, %esi
callq 0x11534
addl %r13d, %eax
movl %eax, 0x48(%rsp)
testq %r14, %r14
je 0x9b587
xorl %ebp, %ebp
cmpl %r12d, (%r14)
je 0x9b587
incl %ebp
movq 0x30(%r14), %r14
testq %r14, %r14
jne 0x9b577
movl 0xb8(%rsp), %r12d
xorpd %xmm0, %xmm0
subl %ebp, %r15d
jle 0x9b607
movsd %xmm0, 0x40(%rsp)
movl 0x20(%rbx), %edi
movq 0x30(%r14), %rax
movq %rax, 0x30(%rsp)
movupd (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
callq 0x79355
movl 0x4(%r14), %eax
movl 0x8(%r14), %ecx
leal (%rcx,%rax), %edx
subl %edx, 0x50(%rsp)
addl %edx, 0x54(%rsp)
addl %ecx, 0x4c(%rsp)
subl %eax, 0x48(%rsp)
movsd 0x40(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
movq 0x30(%r14), %r14
decl %r15d
jne 0x9b598
testl %r12d, %r12d
jne 0x9b610
movq 0x30(%r14), %r14
movsd %xmm0, 0x40(%rsp)
testq %r14, %r14
je 0x9b70c
movq %r14, %rdi
callq 0x7a921
leaq 0x54(%rsp), %r15
leaq 0x50(%rsp), %r12
leaq 0x4c(%rsp), %r13
leaq 0x48(%rsp), %rbp
movq %r14, %rdi
movq 0x60(%rsp), %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
movq %rbp, %r9
callq 0x9b73c
movq %r14, %rdi
movq 0x68(%rsp), %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
movq %rbp, %r9
callq 0x9b73c
movq %r14, %rdi
movq 0x58(%rsp), %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
movq %rbp, %r9
callq 0x9b73c
movq %r14, %rdi
movq 0xb0(%rsp), %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
movq %rbp, %r9
callq 0x9b73c
movl 0x20(%rbx), %r9d
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %rbp, %r8
movsd 0x70(%rsp), %xmm0
callq 0x9b7e7
testl %eax, %eax
jne 0x9b703
movl 0x20(%rbx), %edi
movq 0x30(%r14), %rax
movq %rax, 0x30(%rsp)
movupd (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movupd %xmm0, (%rsp)
callq 0x79355
movsd 0x40(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x40(%rsp)
movq 0x30(%r14), %r14
testq %r14, %r14
jne 0x9b6a2
movl 0x54(%rsp), %edi
movl 0x50(%rsp), %esi
movl 0x4c(%rsp), %edx
movl 0x48(%rsp), %ecx
movsd 0x70(%rsp), %xmm0
callq 0x79482
addsd 0x40(%rsp), %xmm0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq