// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/univariatetree.c
// Function: find_split_for_partition_without_outliers
double find_split_for_partition_without_outliers(Instanceptr instances, Partition p, int fno, int conditiontype, double variancerange)
{
 /*!Last Changed 30.12.2003*/
 int nl = 0, nr = 0;
 double ml, mr, sr, sl, llower, lupper, rlower, rupper;
 if (p.count == 0 || instances == NULL || fno < 0 || all_same_side(p))
   return ISELL;
 left_and_right_sum(instances, p, fno, &ml, &mr, &nl, &nr, conditiontype);
 if (nl > 0)
   ml /= nl;
 else
   return ISELL;
 if (nr > 0)
   mr /= nr;
 else
   return ISELL;
 left_and_right_variance(instances, p, fno, &sl, &sr, ml, mr, conditiontype);
 if (nl > 1)
   sl /= (nl-1);
 else
   sl = 0;
 if (nr > 1)
   sr /= (nr-1);
 else
   sr = 0;
 llower = ml - variancerange * sqrt(sl);
 lupper = ml + variancerange * sqrt(sl);
 rlower = mr - variancerange * sqrt(sr);
 rupper = mr + variancerange * sqrt(sr);
 left_and_right_sum_without_outliers(instances, p, fno, &ml, &mr, &nl, &nr, llower, lupper, rlower, rupper);
 if (nl > 0)
   ml /= nl;
 else
   return ISELL;
 if (nr > 0)
   mr /= nr;
 else
   return ISELL;
 left_and_right_variance_without_outliers(instances, p, fno, &sl, &sr, ml, mr, llower, lupper, rlower, rupper);
 if (nl > 1)
   sl /= (nl-1);
 else
   sl = 0;
 if (nr > 1)
   sr /= (nr-1);
 else
   sr = 0;
 return solve_for_ldt_second_order_equation(ml, mr, sl, sr, nl, nr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
cmpl $0x0, 0x10(%rax)
je 0xde64a
cmpq $0x0, -0x10(%rbp)
je 0xde64a
cmpl $0x0, -0x14(%rbp)
jl 0xde64a
movq -0x70(%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 0xde65c
movsd 0x4346(%rip), %xmm0     # 0xe2998
movsd %xmm0, -0x8(%rbp)
jmp 0xdea21
movq -0x70(%rbp), %r10
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %eax
leaq -0x30(%rbp), %rdx
leaq -0x38(%rbp), %rcx
leaq -0x24(%rbp), %r8
leaq -0x28(%rbp), %r9
movq (%r10), %r11
movq %r11, (%rsp)
movq 0x8(%r10), %r11
movq %r11, 0x8(%rsp)
movq 0x10(%r10), %r10
movq %r10, 0x10(%rsp)
movl %eax, 0x18(%rsp)
callq 0xdda10
cmpl $0x0, -0x24(%rbp)
jle 0xde6b7
cvtsi2sdl -0x24(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0xde6c9
movsd 0x42d9(%rip), %xmm0     # 0xe2998
movsd %xmm0, -0x8(%rbp)
jmp 0xdea21
cmpl $0x0, -0x28(%rbp)
jle 0xde6e4
cvtsi2sdl -0x28(%rbp), %xmm1
movsd -0x38(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
jmp 0xde6f6
movsd 0x42ac(%rip), %xmm0     # 0xe2998
movsd %xmm0, -0x8(%rbp)
jmp 0xdea21
movq -0x70(%rbp), %rax
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movl -0x18(%rbp), %r8d
leaq -0x48(%rbp), %rdx
leaq -0x40(%rbp), %rcx
movq (%rax), %r9
movq %r9, (%rsp)
movq 0x8(%rax), %r9
movq %r9, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xddfc0
cmpl $0x1, -0x24(%rbp)
jle 0xde755
movl -0x24(%rbp), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
movsd -0x48(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
jmp 0xde75d
xorps %xmm0, %xmm0
movsd %xmm0, -0x48(%rbp)
cmpl $0x1, -0x28(%rbp)
jle 0xde77d
movl -0x28(%rbp), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
movsd -0x40(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0xde785
xorps %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0xb0(%rbp)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0xa8(%rbp)
movsd -0x48(%rbp), %xmm0
callq 0x42a0
movsd -0xb0(%rbp), %xmm1
movaps %xmm0, %xmm2
movsd -0xa8(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x30(%rbp), %xmm0
movsd %xmm0, -0xa0(%rbp)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x48(%rbp), %xmm0
callq 0x42a0
movsd -0xa0(%rbp), %xmm1
movaps %xmm0, %xmm2
movsd -0x98(%rbp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x90(%rbp)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x88(%rbp)
movsd -0x40(%rbp), %xmm0
callq 0x42a0
movsd -0x90(%rbp), %xmm1
movaps %xmm0, %xmm2
movsd -0x88(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x40(%rbp), %xmm0
callq 0x42a0
movsd -0x80(%rbp), %xmm1
movq -0x70(%rbp), %rax
movaps %xmm0, %xmm2
movsd -0x78(%rbp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movsd -0x50(%rbp), %xmm0
movsd -0x58(%rbp), %xmm1
movsd -0x60(%rbp), %xmm2
movsd -0x68(%rbp), %xmm3
leaq -0x30(%rbp), %rdx
leaq -0x38(%rbp), %rcx
leaq -0x24(%rbp), %r8
leaq -0x28(%rbp), %r9
movq (%rax), %r10
movq %r10, (%rsp)
movq 0x8(%rax), %r10
movq %r10, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xddbc0
cmpl $0x0, -0x24(%rbp)
jle 0xde91f
cvtsi2sdl -0x24(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0xde931
movsd 0x4071(%rip), %xmm0     # 0xe2998
movsd %xmm0, -0x8(%rbp)
jmp 0xdea21
cmpl $0x0, -0x28(%rbp)
jle 0xde94c
cvtsi2sdl -0x28(%rbp), %xmm1
movsd -0x38(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
jmp 0xde95e
movsd 0x4044(%rip), %xmm0     # 0xe2998
movsd %xmm0, -0x8(%rbp)
jmp 0xdea21
movq -0x70(%rbp), %rax
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movsd -0x50(%rbp), %xmm2
movsd -0x58(%rbp), %xmm3
movsd -0x60(%rbp), %xmm4
movsd -0x68(%rbp), %xmm5
leaq -0x48(%rbp), %rdx
leaq -0x40(%rbp), %rcx
movq (%rax), %r8
movq %r8, (%rsp)
movq 0x8(%rax), %r8
movq %r8, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0xdddb0
cmpl $0x1, -0x24(%rbp)
jle 0xde9cd
movl -0x24(%rbp), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
movsd -0x48(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
jmp 0xde9d5
xorps %xmm0, %xmm0
movsd %xmm0, -0x48(%rbp)
cmpl $0x1, -0x28(%rbp)
jle 0xde9f5
movl -0x28(%rbp), %eax
subl $0x1, %eax
cvtsi2sd %eax, %xmm1
movsd -0x40(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0xde9fd
xorps %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movsd -0x48(%rbp), %xmm2
movsd -0x40(%rbp), %xmm3
movl -0x24(%rbp), %edi
movl -0x28(%rbp), %esi
callq 0xde190
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0xd0, %rsp
popq %rbp
retq
nop