// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/univariatetree.c
// Function: quicksort_three_elements
Instance quicksort_three_elements(Instanceptr instances, int start, int end, int fno)
{
 /*!Last Changed 22.05.2005*/
 int mid = (start + end) / 2;
 if (sort_function_instances(&(instances[mid]), &(instances[start]), fno) < 0)
   exchange_instances(instances, start, mid);
 if (sort_function_instances(&(instances[end]), &(instances[mid]), fno) < 0)
   exchange_instances(instances, end, mid);
 if (sort_function_instances(&(instances[mid]), &(instances[start]), fno) < 0)
   exchange_instances(instances, start, mid);
 exchange_instances(instances, mid, end);
 return instances[end];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %ebp
movl %ecx, %r13d
movl %edx, %ecx
movq %rsi, %r14
movq %rdi, %rbx
leal (%r13,%rcx), %eax
pushq $0x2
popq %rsi
cltd
idivl %esi
cltq
imulq $0x30, %rax, %r15
addq %r14, %r15
movslq %ecx, %rax
imulq $0x30, %rax, %r12
addq %r14, %r12
movq %r15, %rdi
movq %r12, %rsi
movl %r8d, %edx
callq 0x90e80
testl %eax, %eax
jns 0x90fe7
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movaps %xmm2, 0x20(%rsp)
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x20(%r12)
movups %xmm1, 0x10(%r12)
movups %xmm0, (%r12)
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
movups %xmm2, 0x20(%r15)
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
movslq %r13d, %rax
imulq $0x30, %rax, %rax
addq %rax, %r14
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x90e80
testl %eax, %eax
jns 0x91056
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movaps %xmm2, 0x20(%rsp)
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x20(%r14)
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
movups %xmm2, 0x20(%r15)
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
movq %r15, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x90e80
testl %eax, %eax
jns 0x910c1
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movaps %xmm2, 0x20(%rsp)
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x20(%r12)
movups %xmm1, 0x10(%r12)
movups %xmm0, (%r12)
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
movups %xmm2, 0x20(%r15)
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movaps %xmm2, 0x20(%rsp)
movaps %xmm1, 0x10(%rsp)
movaps %xmm0, (%rsp)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%r15)
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
movaps (%rsp), %xmm0
movaps 0x10(%rsp), %xmm1
movaps 0x20(%rsp), %xmm2
movups %xmm2, 0x20(%r14)
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq