// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x38(%rsp), %rax
cmpq 0x30(%rsp), %rax
jb 0xa8114
jmp 0xa83e8
movq 0x30(%rsp), %rax
subq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
cmpq $0x5, 0x28(%rsp)
jae 0xa8148
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0xa7d50
jmp 0xa83e6
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x40(%rsp), %rcx
movq 0x30(%rsp), %rdx
cmpq (%rcx,%rdx,8), %rax
jbe 0xa817a
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0xa83f0
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
cmpq (%rsp), %rax
jbe 0xa81e2
movq 0x593def(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x46de58(%rip), %rsi    # 0x516013
leaq 0x48c60a(%rip), %rdx    # 0x5347cc
leaq 0x48c6ae(%rip), %rcx    # 0x534877
leaq 0x48c62e(%rip), %r8     # 0x5347fe
movl $0x4c, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0xa81e4
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x30(%rsp)
ja 0xa8240
movq 0x593d91(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x46ddfa(%rip), %rsi    # 0x516013
leaq 0x48c5fa(%rip), %rdx    # 0x53481a
leaq 0x48c650(%rip), %rcx    # 0x534877
leaq 0x48c5d0(%rip), %r8     # 0x5347fe
movl $0x4f, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0xa8242
movq 0x30(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x10(%rsp), %rax
ja 0xa82ee
movq 0x40(%rsp), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpq 0x8(%rsp), %rax
jae 0xa82a3
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rdx
movq %rdx, %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
callq 0xa83f0
jmp 0xa82e9
movq (%rsp), %rax
movq 0x40(%rsp), %rcx
movq 0x20(%rsp), %rdx
cmpq (%rcx,%rdx,8), %rax
jae 0xa82d9
movq 0x40(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rdx, %rax
addq $-0x1, %rax
movq %rax, 0x10(%rsp)
callq 0xa83f0
jmp 0xa82e7
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0xa82e9
jmp 0xa8250
jmp 0xa82f0
cmpq $0x0, 0x18(%rsp)
ja 0xa8330
movq 0x593ca1(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x46dd0a(%rip), %rsi    # 0x516013
leaq 0x48c518(%rip), %rdx    # 0x534828
leaq 0x48c560(%rip), %rcx    # 0x534877
leaq 0x48c4e0(%rip), %r8     # 0x5347fe
movl $0x61, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0xa8332
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq $-0x1, %rdx
movq %rdx, 0x18(%rsp)
callq 0xa83f0
movq 0x40(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rsp)
callq 0xa83f0
cmpq $0x1, 0x18(%rsp)
jb 0xa838c
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x18(%rsp), %rdx
subq $0x1, %rdx
callq 0xa80f0
cmpq $0x1, 0x10(%rsp)
jb 0xa83ce
movq 0x40(%rsp), %rax
movq 0x18(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x40(%rsp), %rcx
movq 0x10(%rsp), %rdx
cmpq (%rcx,%rdx,8), %rax
jae 0xa83ce
movq 0x40(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x1, %rsi
movq 0x10(%rsp), %rdx
subq $0x1, %rdx
callq 0xa80f0
movq 0x40(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0x1, %rsi
movq 0x30(%rsp), %rdx
callq 0xa80f0
jmp 0xa83e8
addq $0x48, %rsp
retq
nopl (%rax)