// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/univariatetree.c
// Function: left_and_right_sum
void left_and_right_sum(Instanceptr instances, Partition p, int fno, double* leftsum, double* rightsum, int* leftcount, int* rightcount, int conditiontype)
{
/* Last Changed 09.02.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 (conditiontype == HYBRID_CONDITION)
     value = real_feature(tmp, fno);
   else
     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)
    {
     (*leftcount)++;
     (*leftsum) += value;
    }
   else
    {
     (*rightcount)++;
     (*rightsum) += value;
    }
   tmp = tmp->next;
  }
 safe_free(classassignments);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl 0x28(%rbp), %eax
leaq 0x10(%rbp), %rax
movq %rax, -0x58(%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)
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 0xddaa2
cmpq $0x0, -0x8(%rbp)
je 0xddaa2
movq -0x58(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0xddaa2
movq -0x58(%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 0xddaa7
jmp 0xddbb8
movq -0x58(%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, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0xddbaf
cmpl $0x2, 0x28(%rbp)
jne 0xddaf9
movq -0x50(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x42c40
movsd %xmm0, -0x48(%rbp)
jmp 0xddb4a
leaq 0x27d40(%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 0xddb33
movq -0x50(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
cvtsi2sdl (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x48(%rbp)
jmp 0xddb48
movq -0x50(%rbp), %rax
movq (%rax), %rax
movslq -0xc(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x48(%rbp)
jmp 0xddb4a
movq -0x50(%rbp), %rdi
callq 0x43530
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movslq -0x3c(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0xddb82
movq -0x28(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movsd -0x48(%rbp), %xmm0
movq -0x18(%rbp), %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
jmp 0xddb9e
movq -0x30(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movsd -0x48(%rbp), %xmm0
movq -0x20(%rbp), %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0xddad5
movq -0x38(%rbp), %rdi
callq 0x52e80
addq $0x70, %rsp
popq %rbp
retq
nop