// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/univariaterule.c
// Function: remove_covered_by_ruleset
void remove_covered_by_ruleset(Instanceptr* list1, Instanceptr* list2, Ruleset r, int startcount)
{
 /*!Last Changed 22.05.2003*/
 Instanceptr tmp, next, last, tmpbefore;
 int covered, i = 0;
 Decisionruleptr rule, startrule;
 startrule = r.start;
 while (i < startcount)
  {
   startrule = startrule->next;
   i++;
  }
 last = *list2;
 if (last)
   while (last->next)
     last = last->next;
 tmpbefore = NULL;
 tmp = *list1;
 while (tmp)
  {
   next = tmp->next;
   rule = startrule;
   covered = 0;
   while (rule)
    {
     if (rule_cover_instance(tmp, *rule))
      {
       if (last)
         last->next = tmp;
       else
         (*list2) = tmp;
       last = tmp;
       covered = 1;
       break;
      }
     rule = rule->next;
    }
   if (!covered)
    {
     if (tmpbefore)
       tmpbefore->next = tmp;
     else
       (*list1) = tmp;
     tmpbefore = tmp;
    }
   tmp = next;
  }
 if (last)
   last->next = NULL;
 if (tmpbefore)
   tmpbefore->next = NULL;
 else
   (*list1) = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
leaq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl $0x0, -0x40(%rbp)
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0xdb457
movq -0x50(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x50(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0xdb438
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xdb486
jmp 0xdb46b
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xdb484
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xdb46b
jmp 0xdb486
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xdb573
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x48(%rbp)
movl $0x0, -0x3c(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0xdb538
movq -0x20(%rbp), %rdi
movq -0x48(%rbp), %rcx
movq 0x30(%rcx), %rdx
movq %rsp, %rax
movq %rdx, 0x30(%rax)
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups 0x20(%rcx), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
callq 0xacfd0
cmpl $0x0, %eax
je 0xdb52a
cmpq $0x0, -0x30(%rbp)
je 0xdb50e
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0xdb519
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x1, -0x3c(%rbp)
jmp 0xdb538
movq -0x48(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0xdb4bf
cmpl $0x0, -0x3c(%rbp)
jne 0xdb566
cmpq $0x0, -0x38(%rbp)
je 0xdb553
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0xdb55e
movq -0x20(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0xdb499
cmpq $0x0, -0x30(%rbp)
je 0xdb586
movq -0x30(%rbp), %rax
movq $0x0, 0x10(%rax)
cmpq $0x0, -0x38(%rbp)
je 0xdb59b
movq -0x38(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0xdb5a6
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
addq $0x90, %rsp
popq %rbp
retq
nop