// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/univariatetree.c
// Function: left_and_right_variance_without_outliers
void left_and_right_variance_without_outliers(Instanceptr instances, Partition p, int fno, double* leftsum, double* rightsum, double leftmean, double rightmean, double llower, double lupper, double rlower, double rupper)
{
/* Last Changed 30.12.2003*/
 int *classassignments, i;
 double value, sub, added;
 Instanceptr tmp;
 *leftsum = 0;
 *rightsum = 0;
 if (fno < 0 || instances == NULL || p.count == 0 || all_same_side(p))
   return;
 classassignments = find_class_assignments(p);
 tmp = instances;
 while (tmp)
  {
   if (current_dataset->features[fno].type == INTEGER)
     value = tmp->values[fno].intvalue;
   else
     value = tmp->values[fno].floatvalue;
   i = give_classno(tmp);
   if (classassignments[i] == LEFT && value >= llower && value <= lupper)
    {
     sub = value - leftmean;
     added = sub * sub;
     (*leftsum) += added;
    }
   else
     if (value >= rlower && value <= rupper)
      {
       sub = value - rightmean;
       added = sub * sub;
       (*rightsum) += added;
      }
   tmp = tmp->next;
  }
 safe_free(classassignments);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movsd %xmm1, -0x30(%rbp)
movsd %xmm2, -0x38(%rbp)
movsd %xmm3, -0x40(%rbp)
movsd %xmm4, -0x48(%rbp)
movsd %xmm5, -0x50(%rbp)
movq -0x18(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movq -0x20(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
cmpl $0x0, -0xc(%rbp)
jl 0xdde4d
cmpq $0x0, -0x8(%rbp)
je 0xdde4d
movq -0x88(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0xdde4d
movq -0x88(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7a7f0
cmpl $0x0, %eax
je 0xdde52
jmp 0xddfab
movq -0x88(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x7a860
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x80(%rbp)
je 0xddfa2
leaq 0x279ab(%rip), %rax     # 0x105840
movq (%rax), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0xc(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
cmpl $0x0, (%rax)
jne 0xddec8
movq -0x80(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
cvtsi2sdl (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x68(%rbp)
jmp 0xddedd
movq -0x80(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0x80(%rbp), %rdi
callq 0x43530
movl %eax, -0x5c(%rbp)
movq -0x58(%rbp), %rax
movslq -0x5c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0xddf44
movsd -0x68(%rbp), %xmm0
ucomisd -0x38(%rbp), %xmm0
jb 0xddf44
movsd -0x68(%rbp), %xmm1
movsd -0x40(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0xddf44
movsd -0x68(%rbp), %xmm0
subsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
mulsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x78(%rbp), %xmm0
movq -0x18(%rbp), %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
jmp 0xddf91
movsd -0x68(%rbp), %xmm0
ucomisd -0x48(%rbp), %xmm0
jb 0xddf8f
movsd -0x68(%rbp), %xmm1
movsd -0x50(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0xddf8f
movsd -0x68(%rbp), %xmm0
subsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
mulsd -0x70(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x78(%rbp), %xmm0
movq -0x20(%rbp), %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
jmp 0xddf91
movq -0x80(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x80(%rbp)
jmp 0xdde83
movq -0x58(%rbp), %rdi
callq 0x52e80
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)