// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/core/dual-pivot-qsort.c
// Function: gt_rec_dual_pivot_quicksort
static void gt_rec_dual_pivot_quicksort(GtUword *input,GtUword lowindex,
                                        GtUword highindex)
{
  if (lowindex >= highindex)
  {
    return;
  } else
  {
    GtUword len = highindex - lowindex + 1;

    if (len < 5UL)
    {
      gt_dual_insertion_sort(input,lowindex,highindex);
    } else
    {
      GtUword i, lt, gt, pivot1, pivot2;

      if (input[lowindex] > input[highindex])
      {
        gt_dpqs_exchange(input, lowindex, highindex);
      }
      pivot1 = input[lowindex];
      pivot2 = input[highindex];
      gt_assert(pivot1 <= pivot2);
      i = lowindex + 1;
      lt = lowindex + 1;
      gt_assert(highindex > 0);
      gt = highindex - 1;
      while (i <= gt)
      {
        if (input[i] < pivot1)
        {
          gt_dpqs_exchange(input, i++, lt++);
        } else
        {
          if (pivot2 < input[i])
          {
            gt_dpqs_exchange(input, i, gt--);
          } else
          {
            i++;
          }
        }
      }
      gt_assert(lt > 0);
      gt_dpqs_exchange(input, lowindex, --lt);
      gt_dpqs_exchange(input, highindex, ++gt);
      if (lt >= 1UL)
      {
        gt_rec_dual_pivot_quicksort(input, lowindex, lt - 1);
      }
      if (gt >= 1UL && input[lt] < input[gt])
      {
        gt_rec_dual_pivot_quicksort(input, lt + 1, gt - 1);
      }
      gt_rec_dual_pivot_quicksort(input, gt + 1, highindex);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x1(%rdx), %r13
cmpq %rbx, %rsi
jae 0x6f678
movq %r13, %rax
subq %rsi, %rax
cmpq $0x4, %rax
jbe 0x6f687
movq (%r14,%rsi,8), %rax
movq (%r14,%rbx,8), %rcx
cmpq %rcx, %rax
jbe 0x6f5c4
movq %rcx, (%r14,%rsi,8)
movq %rax, (%r14,%rbx,8)
movq %rax, %rcx
movq (%r14,%rsi,8), %rax
cmpq %rcx, %rax
ja 0x6f6a0
leaq 0x1(%rsi), %r15
movq %rbx, %rbp
movq %r15, %rdx
leaq -0x1(%rbp), %r12
cmpq %r12, %rdx
ja 0x6f615
movq (%r14,%rdx,8), %rdi
cmpq %rax, %rdi
jb 0x6f5f3
cmpq %rdi, %rcx
jb 0x6f604
incq %rdx
jmp 0x6f5db
movq (%r14,%r15,8), %r8
movq %r8, (%r14,%rdx,8)
movq %rdi, (%r14,%r15,8)
incq %r15
jmp 0x6f5ee
movq (%r14,%r12,8), %r8
movq %r8, (%r14,%rdx,8)
movq %rdi, (%r14,%r12,8)
movq %r12, %rbp
jmp 0x6f5d7
testq %r15, %r15
je 0x6f6ca
movq (%r14,%rsi,8), %rax
movq -0x8(%r14,%r15,8), %rcx
movq %rcx, (%r14,%rsi,8)
movq %rax, -0x8(%r14,%r15,8)
movq (%r14,%rbx,8), %rax
movq (%r14,%rbp,8), %rcx
movq %rcx, (%r14,%rbx,8)
movq %r15, %rcx
movq %rax, (%r14,%rbp,8)
decq %rcx
je 0x6f658
leaq -0x2(%r15), %rdx
movq %r14, %rdi
callq 0x6f57a
movq (%r14,%rbp,8), %rax
cmpq %rax, -0x8(%r14,%r15,8)
jae 0x6f66d
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x6f57a
incq %rbp
movq %rbp, %rsi
jmp 0x6f58f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6f539
movq 0x3c88c1(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x275962(%rip), %rsi    # 0x2e5013
leaq 0x293e1f(%rip), %rdx    # 0x3034d7
leaq 0x293eb5(%rip), %rcx    # 0x303574
leaq 0x293e43(%rip), %r8     # 0x303509
pushq $0x4c
jmp 0x6f6f2
movq 0x3c8897(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x275938(%rip), %rsi    # 0x2e5013
leaq 0x293e43(%rip), %rdx    # 0x303525
leaq 0x293e8b(%rip), %rcx    # 0x303574
leaq 0x293e19(%rip), %r8     # 0x303509
pushq $0x61
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390