// File: /workspace/github_c_makefile_star2_O3/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, %r12d
movl %esi, %ebp
movq %rdi, %rbx
xorl %r15d, %r15d
movl %r15d, 0x54(%rsp)
movl %r15d, 0x4c(%rsp)
movq (%rdi), %r14
movq %rcx, %rdi
callq 0x30309
movl %eax, 0x40(%rsp)
movq %r13, %rdi
callq 0x30309
movl %eax, %r13d
addl 0x40(%rsp), %r13d
movq 0x58(%rsp), %rdi
callq 0x30309
addl %r13d, %eax
movl %eax, 0x40(%rsp)
movq 0xb0(%rsp), %rdi
callq 0x30309
movl %eax, %r13d
addl 0x40(%rsp), %r13d
movl %r13d, 0x50(%rsp)
movq 0x60(%rsp), %rdi
movl %ebp, %esi
callq 0x114f9
movl %eax, 0x40(%rsp)
movq 0x68(%rsp), %rdi
movl %ebp, %esi
callq 0x114f9
addl 0x40(%rsp), %eax
movl %eax, 0x40(%rsp)
movq 0x58(%rsp), %rdi
movl %ebp, %esi
callq 0x114f9
addl 0x40(%rsp), %eax
movl %eax, 0x40(%rsp)
movq 0xb0(%rsp), %rdi
movl %ebp, %esi
callq 0x114f9
addl 0x40(%rsp), %eax
movl %eax, 0x48(%rsp)
xorl %ecx, %ecx
testq %r14, %r14
je 0x9e597
cmpl %ebp, (%r14)
je 0x9e59a
incl %ecx
movq 0x30(%r14), %r14
jmp 0x9e585
xorl %r14d, %r14d
movl 0xb8(%rsp), %ebp
xorpd %xmm0, %xmm0
subl %ecx, %r12d
jle 0x9e63d
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 0x7ac95
movsd 0x40(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
movl 0x4(%r14), %ecx
movl 0x8(%r14), %r15d
leal (%r15,%rcx), %edi
movl 0x50(%rsp), %r13d
subl %edi, %r13d
movl %r13d, 0x50(%rsp)
addl 0x54(%rsp), %edi
movl %edi, 0x54(%rsp)
addl 0x4c(%rsp), %r15d
movl %r15d, 0x4c(%rsp)
movl 0x48(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x48(%rsp)
movq 0x30(%r14), %r14
decl %r12d
jne 0x9e5ae
jmp 0x9e63f
xorl %edi, %edi
testl %ebp, %ebp
jne 0x9e647
movq 0x30(%r14), %r14
movsd %xmm0, 0x40(%rsp)
testq %r14, %r14
je 0x9e755
movq %r14, %rdi
callq 0x7c1e0
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 0x9e77d
movq %r14, %rdi
movq 0x68(%rsp), %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
movq %rbp, %r9
callq 0x9e77d
movq %r14, %rdi
movq 0x58(%rsp), %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
movq %rbp, %r9
callq 0x9e77d
movq %r14, %rdi
movq 0xb0(%rsp), %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
movq %rbp, %r9
callq 0x9e77d
movl 0x20(%rbx), %r9d
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %rbp, %r8
movsd 0x70(%rsp), %xmm0
callq 0x9e828
testl %eax, %eax
jne 0x9e73a
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 0x7ac95
movsd 0x40(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x40(%rsp)
movq 0x30(%r14), %r14
testq %r14, %r14
jne 0x9e6d9
movl 0x54(%rsp), %edi
movl 0x50(%rsp), %r13d
movl 0x4c(%rsp), %r15d
movl 0x48(%rsp), %eax
movl %r13d, %esi
movl %r15d, %edx
movl %eax, %ecx
movsd 0x70(%rsp), %xmm0
callq 0x7adc2
addsd 0x40(%rsp), %xmm0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq