// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-bentsedg.c
// Function: subsort_bentleysedgewick
static void subsort_bentleysedgewick(GtBentsedgresources *bsr,
                                     GtUword subbucketleft,
                                     GtUword width,
                                     GtUword depth)
{
  gt_assert(width > 1UL);
  if (width > 1UL)
  {
#ifdef SKDEBUG
    if (depth > 0)
    {
      gt_checkifprefixesareidentical(__FILE__,
                                     __LINE__,
                                     bsr->encseq,
                                     bsr->readmode,
                                     bsr->sssp,
                                     subbucketleft,
                                     width,
                                     depth);
    }
#endif
    if (bsr->rsi != NULL && width >= bsr->radixsortminwidth
                         && width <= bsr->radixsortmaxwidth)
    {
      gt_sfx_radixsort_str(bsr->rsi,
                           depth,
                           bsr->sortmaxdepth,
                           subbucketleft,
                           width,
                           bsr->sssp,
                           bsr->tableoflcpvalues);
      bsr->countradixsort++;
      return;
    }
    if (bsr->srsw != NULL &&
        !bsr->sfxstrategy->noshortreadsort &&
        width <= bsr->shortreadsort_maxwidth)
    {
      gt_shortreadsort_sssp_sort(bsr->srsw,
                                 bsr->encseq,
                                 bsr->srs_maxremain,
                                 bsr->readmode,
                                 bsr->esr1,
                                 bsr->sssp,
                                 subbucketleft,
                                 width,
                                 depth,
                                 (GtUword) bsr->sortmaxdepth);
      if (bsr->sortmaxdepth > 0)
      {
        gt_shortreadsort_sssp_add_unsorted(
                              bsr->srsw,
                              gt_suffixsortspace_bucketleftidx_get(bsr->sssp),
                              subbucketleft,
                              width,
                              (GtUword) bsr->sortmaxdepth,
                              bsr->sssp,
                              bsr->processunsortedsuffixrange,
                              bsr->processunsortedsuffixrangeinfo);
      }
      bsr->countshortreadsort++;
      return;
    }
    if (bsr->sortmaxdepth > 0 && depth >= (GtUword) bsr->sortmaxdepth)
    {
      if (bsr->processunsortedsuffixrange != NULL)
      {
        bsr->processunsortedsuffixrange(
                         bsr->processunsortedsuffixrangeinfo,
                         bsr->sssp,
                         gt_suffixsortspace_bucketleftidx_get(bsr->sssp) +
                         subbucketleft,
                         width,depth);
      }
      return;
    }
    if (multistrategysort(bsr,subbucketleft,width,depth,
                          (GtUword) bsr->sortmaxdepth))
    {
      return;
    }
    /* push */
    GT_CHECKARRAYSPACE(&bsr->mkvauxstack,GtMKVstack,1024);
    STACKTOP.subbucketleft = subbucketleft;
    STACKTOP.width = width;
    STACKTOP.depth = depth;
    bsr->mkvauxstack.nextfreeGtMKVstack++;
  }
}

// Assembly:
pushq %rbx
subq $0x70, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
movq %rcx, 0x50(%rsp)
cmpq $0x1, 0x58(%rsp)
ja 0x2b4589
movq 0x387a48(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x261ab1(%rip), %rsi    # 0x516013
leaq 0x2d4106(%rip), %rdx    # 0x58866f
leaq 0x2d410b(%rip), %rcx    # 0x58867b
leaq 0x2d3ff9(%rip), %r8     # 0x588570
movl $0x344, %r9d            # imm = 0x344
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2b458b
cmpq $0x1, 0x58(%rsp)
jbe 0x2b4971
movq 0x68(%rsp), %rax
cmpq $0x0, 0x2f0(%rax)
je 0x2b462a
movq 0x58(%rsp), %rax
movq 0x68(%rsp), %rcx
cmpq 0xa0(%rcx), %rax
jb 0x2b462a
movq 0x58(%rsp), %rax
movq 0x68(%rsp), %rcx
cmpq 0xa8(%rcx), %rax
ja 0x2b462a
movq 0x68(%rsp), %rax
movq 0x2f0(%rax), %rdi
movq 0x50(%rsp), %rsi
movq 0x68(%rsp), %rax
movl 0x60(%rax), %edx
movq 0x60(%rsp), %rcx
movq 0x58(%rsp), %r8
movq 0x68(%rsp), %rax
movq 0x48(%rax), %r9
movq 0x68(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, (%rsp)
callq 0x2ce850
movq 0x68(%rsp), %rax
movq 0x80(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x80(%rax)
jmp 0x2b4971
movq 0x68(%rsp), %rax
cmpq $0x0, 0x2e0(%rax)
je 0x2b4756
movq 0x68(%rsp), %rax
movq 0x40(%rax), %rax
testb $0x1, 0x34(%rax)
jne 0x2b4756
movq 0x58(%rsp), %rax
movq 0x68(%rsp), %rcx
cmpq 0xb8(%rcx), %rax
ja 0x2b4756
movq 0x68(%rsp), %rax
movq 0x2e0(%rax), %rdi
movq 0x68(%rsp), %rax
movq (%rax), %rsi
movq 0x68(%rsp), %rax
movq 0x98(%rax), %rdx
movq 0x68(%rsp), %rax
movl 0x18(%rax), %ecx
movq 0x68(%rsp), %rax
movq 0x8(%rax), %r8
movq 0x68(%rsp), %rax
movq 0x48(%rax), %r9
movq 0x60(%rsp), %rbx
movq 0x58(%rsp), %r11
movq 0x50(%rsp), %r10
movq 0x68(%rsp), %rax
movl 0x60(%rax), %eax
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x2dab70
movq 0x68(%rsp), %rax
cmpl $0x0, 0x60(%rax)
jbe 0x2b4740
movq 0x68(%rsp), %rax
movq 0x2e0(%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x68(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x2ea3a0
movq 0x40(%rsp), %rdi
movq %rax, %rsi
movq 0x60(%rsp), %rdx
movq 0x58(%rsp), %rcx
movq 0x68(%rsp), %rax
movl 0x60(%rax), %eax
movl %eax, %r8d
movq 0x68(%rsp), %rax
movq 0x48(%rax), %r9
movq 0x68(%rsp), %rax
movq 0x50(%rax), %r10
movq 0x68(%rsp), %rax
movq 0x58(%rax), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2dcb80
movq 0x68(%rsp), %rax
movq 0x78(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x78(%rax)
jmp 0x2b4971
movq 0x68(%rsp), %rax
cmpl $0x0, 0x60(%rax)
jbe 0x2b47df
movq 0x50(%rsp), %rax
movq 0x68(%rsp), %rcx
movl 0x60(%rcx), %ecx
cmpq %rcx, %rax
jb 0x2b47df
movq 0x68(%rsp), %rax
cmpq $0x0, 0x50(%rax)
je 0x2b47da
movq 0x68(%rsp), %rax
movq 0x50(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x68(%rsp), %rax
movq 0x58(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x68(%rsp), %rax
movq 0x48(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x68(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x2ea3a0
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq %rax, %rdx
movq 0x38(%rsp), %rax
addq 0x60(%rsp), %rdx
movq 0x58(%rsp), %rcx
movq 0x50(%rsp), %r8
callq *%rax
jmp 0x2b4971
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x50(%rsp), %rcx
movq 0x68(%rsp), %rax
movl 0x60(%rax), %eax
movl %eax, %r8d
callq 0x2b5870
testb $0x1, %al
jne 0x2b4809
jmp 0x2b480e
jmp 0x2b4971
jmp 0x2b4810
movq 0x68(%rsp), %rax
movq 0x30(%rax), %rax
addq $0x0, %rax
movq 0x68(%rsp), %rcx
cmpq 0x28(%rcx), %rax
jb 0x2b48ba
movq $0x400, 0x48(%rsp)      # imm = 0x400
xorl %eax, %eax
cmpq 0x48(%rsp), %rax
jbe 0x2b4876
movq 0x38775b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2617c4(%rip), %rsi    # 0x516013
leaq 0x264951(%rip), %rdx    # 0x5191a7
leaq 0x2d3e1e(%rip), %rcx    # 0x58867b
leaq 0x2d3d0c(%rip), %r8     # 0x588570
movl $0x391, %r9d            # imm = 0x391
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2b4878
movq 0x48(%rsp), %rcx
movq 0x68(%rsp), %rax
addq 0x28(%rax), %rcx
movq %rcx, 0x28(%rax)
movq 0x68(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x68(%rsp), %rax
imulq $0x18, 0x28(%rax), %rsi
leaq 0x2d3ccc(%rip), %rdx    # 0x588570
movl $0x391, %ecx            # imm = 0x391
callq 0xe8540
movq %rax, %rcx
movq 0x68(%rsp), %rax
movq %rcx, 0x20(%rax)
jmp 0x2b48bc
movq 0x68(%rsp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x2b4900
movq 0x3876d1(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x26173a(%rip), %rsi    # 0x516013
leaq 0x2d3db4(%rip), %rdx    # 0x588694
leaq 0x2d3d94(%rip), %rcx    # 0x58867b
leaq 0x2d3c82(%rip), %r8     # 0x588570
movl $0x391, %r9d            # imm = 0x391
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2b4902
jmp 0x2b4904
movq 0x60(%rsp), %rcx
movq 0x68(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x68(%rsp), %rdx
imulq $0x18, 0x30(%rdx), %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq 0x58(%rsp), %rcx
movq 0x68(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x68(%rsp), %rdx
imulq $0x18, 0x30(%rdx), %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq 0x50(%rsp), %rcx
movq 0x68(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x68(%rsp), %rdx
imulq $0x18, 0x30(%rdx), %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq 0x68(%rsp), %rax
movq 0x30(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rax)
addq $0x70, %rsp
popq %rbx
retq
nopw (%rax,%rax)