// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/univariatetree.c
// Function: left_and_right_sum_without_outliers
void left_and_right_sum_without_outliers(Instanceptr instances, Partition p, int fno, double* leftsum, double* rightsum, int* leftcount, int* rightcount, double llower, double lupper, double rlower, double rupper)
{
/* Last Changed 30.12.2003*/
 int *classassignments, i;
 double value;
 Instanceptr tmp;
 *leftsum = 0;
 *rightsum = 0;
 *leftcount = 0;
 *rightcount = 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)
    {
     (*leftcount)++;
     (*leftsum) += value;
    }
   else
     if (value >= rlower && value <= rupper)
      {
       (*rightcount)++;
       (*rightsum) += value;
      }
   tmp = tmp->next;
  }
 safe_free(classassignments);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movsd %xmm0, -0x38(%rbp)
movsd %xmm1, -0x40(%rbp)
movsd %xmm2, -0x48(%rbp)
movsd %xmm3, -0x50(%rbp)
movq -0x18(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movq -0x20(%rbp), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movq -0x28(%rbp), %rax
movl $0x0, (%rax)
movq -0x30(%rbp), %rax
movl $0x0, (%rax)
cmpl $0x0, -0xc(%rbp)
jl 0xddc66
cmpq $0x0, -0x8(%rbp)
je 0xddc66
movq -0x78(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0xddc66
movq -0x78(%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 0xddc6b
jmp 0xddd9b
movq -0x78(%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, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
je 0xddd92
leaq 0x27b95(%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 0xddcde
movq -0x70(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
cvtsi2sdl (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x68(%rbp)
jmp 0xddcf3
movq -0x70(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0x70(%rbp), %rdi
callq 0x43530
movl %eax, -0x5c(%rbp)
movq -0x58(%rbp), %rax
movslq -0x5c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0xddd47
movsd -0x68(%rbp), %xmm0
ucomisd -0x38(%rbp), %xmm0
jb 0xddd47
movsd -0x68(%rbp), %xmm1
movsd -0x40(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0xddd47
movq -0x28(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movsd -0x68(%rbp), %xmm0
movq -0x18(%rbp), %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
jmp 0xddd81
movsd -0x68(%rbp), %xmm0
ucomisd -0x48(%rbp), %xmm0
jb 0xddd7f
movsd -0x68(%rbp), %xmm1
movsd -0x50(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0xddd7f
movq -0x30(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movsd -0x68(%rbp), %xmm0
movq -0x20(%rbp), %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
jmp 0xddd81
movq -0x70(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x70(%rbp)
jmp 0xddc99
movq -0x58(%rbp), %rdi
callq 0x52e80
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)