// File: /workspace/github_c_makefile_star2_O2/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, %ebp
movq %rdi, %rbx
andl $0x0, 0x4c(%rsp)
andl $0x0, 0x44(%rsp)
movq (%rdi), %r14
movq %rcx, %rdi
callq 0x2c3cc
movl %eax, %r12d
movq %r13, %rdi
callq 0x2c3cc
movl %eax, %r13d
addl %r12d, %r13d
movq 0x58(%rsp), %rdi
callq 0x2c3cc
addl %r13d, %eax
movl %eax, %r13d
movq 0xb0(%rsp), %rdi
callq 0x2c3cc
movl %eax, %r12d
addl %r13d, %r12d
movl %r12d, 0x48(%rsp)
movq 0x60(%rsp), %rdi
movl %ebp, %esi
callq 0x10827
movl %eax, 0x50(%rsp)
movq 0x68(%rsp), %rdi
movl %ebp, %esi
callq 0x10827
movl %eax, %r13d
addl 0x50(%rsp), %r13d
movq 0x58(%rsp), %rdi
movl %ebp, %esi
callq 0x10827
addl %r13d, %eax
movl %eax, %r13d
movq 0xb0(%rsp), %rdi
movl %ebp, %esi
callq 0x10827
addl %r13d, %eax
movl %eax, 0x40(%rsp)
xorl %r13d, %r13d
testq %r14, %r14
je 0x8f347
cmpl %ebp, (%r14)
je 0x8f347
incl %r13d
movq 0x30(%r14), %r14
jmp 0x8f334
cmpl %r13d, %r15d
cmovlel %r13d, %r15d
xorpd %xmm0, %xmm0
movsd %xmm0, 0x50(%rsp)
xorl %edx, %edx
xorl %edi, %edi
cmpl %r15d, %r13d
je 0x8f3db
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 0x7072e
movsd 0x50(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x50(%rsp)
movl 0x4(%r14), %ecx
movl 0x8(%r14), %edx
leal (%rdx,%rcx), %edi
movl 0x48(%rsp), %r12d
subl %edi, %r12d
movl %r12d, 0x48(%rsp)
addl 0x4c(%rsp), %edi
movl %edi, 0x4c(%rsp)
addl 0x44(%rsp), %edx
movl %edx, 0x44(%rsp)
movl 0x40(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x40(%rsp)
movq 0x30(%r14), %r14
decl %r15d
jmp 0x8f35c
cmpl $0x0, 0xb8(%rsp)
jne 0x8f3e9
movq 0x30(%r14), %r14
testq %r14, %r14
je 0x8f4f2
movq %r14, %rdi
callq 0x71b80
leaq 0x4c(%rsp), %r15
leaq 0x48(%rsp), %r12
leaq 0x44(%rsp), %r13
leaq 0x40(%rsp), %rbp
movq %r14, %rdi
movq 0x60(%rsp), %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
movq %rbp, %r9
callq 0x8f517
movq %r14, %rdi
movq 0x68(%rsp), %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
movq %rbp, %r9
callq 0x8f517
movq %r14, %rdi
movq 0x58(%rsp), %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
movq %rbp, %r9
callq 0x8f517
movq %r14, %rdi
movq 0xb0(%rsp), %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
movq %rbp, %r9
callq 0x8f517
testq %r14, %r14
je 0x8f4e1
movl 0x20(%rbx), %r9d
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %rbp, %r8
movsd 0x70(%rsp), %xmm0
callq 0x8f5b6
testl %eax, %eax
jne 0x8f4db
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 0x7072e
movsd 0x50(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x50(%rsp)
movq 0x30(%r14), %r14
jmp 0x8f475
movl 0x4c(%rsp), %edi
movl 0x48(%rsp), %r12d
movl 0x44(%rsp), %edx
movl 0x40(%rsp), %eax
movl %r12d, %esi
movl %eax, %ecx
movsd 0x70(%rsp), %xmm0
callq 0x7084f
addsd 0x50(%rsp), %xmm0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq