// File: /workspace/github_c_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, (%rsp)
cmpq $0x1, %rdx
jbe 0x1ef46b
movq %rsi, %r13
movq %rdi, %r14
movq 0x2f0(%rdi), %rdi
testq %rdi, %rdi
je 0x1eeb04
cmpq %rdx, 0xa0(%r14)
ja 0x1eeb04
cmpq %rdx, 0xa8(%r14)
jae 0x1ef062
movq 0x2e0(%r14), %rdi
testq %rdi, %rdi
je 0x1eeb27
movq 0x40(%r14), %rax
cmpb $0x0, 0x34(%rax)
jne 0x1eeb27
cmpq %rdx, 0xb8(%r14)
jae 0x1ef092
movl 0x60(%r14), %ebp
testq %rbp, %rbp
sete %al
cmpq (%rsp), %rbp
seta %cl
orb %al, %cl
je 0x1eebcf
movq 0x40(%r14), %rax
cmpq %rdx, 0x8(%rax)
movq %rdx, 0x20(%rsp)
jae 0x1eec18
cmpq %rdx, 0x10(%rax)
jae 0x1ef10e
movq 0x28(%r14), %rax
cmpq %rax, 0x30(%r14)
jb 0x1eeb97
leaq 0x400(%rax), %rcx
movq %rcx, 0x28(%r14)
movq 0x20(%r14), %rdi
leaq 0x2000(,%rax,8), %rax
leaq (%rax,%rax,2), %rsi
leaq 0x1d01b7(%rip), %rdx    # 0x3bed40
movl $0x391, %ecx            # imm = 0x391
callq 0x1094e6
movq %rax, 0x20(%r14)
movq 0x20(%r14), %rax
testq %rax, %rax
je 0x1ef470
movq 0x30(%r14), %rcx
leaq (%rcx,%rcx,2), %rdx
movq %r13, (%rax,%rdx,8)
movq 0x20(%rsp), %rsi
movq %rsi, 0x8(%rax,%rdx,8)
movq (%rsp), %rsi
movq %rsi, 0x10(%rax,%rdx,8)
incq %rcx
movq %rcx, 0x30(%r14)
jmp 0x1ef411
movq 0x50(%r14), %rax
testq %rax, %rax
je 0x1ef411
movq 0x48(%r14), %rbx
movq 0x58(%r14), %r14
movq %rbx, %rdi
movq %rdx, %r15
movq %rax, %r12
callq 0x2061f2
addq %rax, %r13
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %r15, %rcx
movq (%rsp), %r8
movq %r12, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
testq %rbp, %rbp
movq %r13, 0x38(%rsp)
je 0x1ef149
incq 0x68(%r14)
movl $0x1, %ebx
xorl %r15d, %r15d
movq %r14, 0x18(%rsp)
movq %rbp, 0x10(%rsp)
movq %rbx, 0x40(%rsp)
movq %r15, 0x48(%rsp)
movq %rbx, %r15
movq 0x48(%r14), %rdi
leaq -0x1(%rbx), %rdx
movq %r13, %rsi
movq %rdx, 0x30(%rsp)
callq 0x206063
movq %rax, %rbx
movq 0x48(%r14), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x206063
movq %rax, %r11
movq 0x40(%r14), %rax
cmpb $0x1, 0x2c(%rax)
movq %r11, %r12
movq %r15, 0x28(%rsp)
movq %rbx, 0x50(%rsp)
jne 0x1eed8a
leaq (%rbx,%rbp), %r13
movq 0xb0(%r14), %rax
cmpq %rax, %r13
cmovaeq %rax, %r13
leaq (%r11,%rbp), %r15
cmpq %rax, %r15
cmovaeq %rax, %r15
movq %rbx, %rbp
movq (%rsp), %rbx
addq %rbx, %rbp
cmpq %rax, %rbp
jae 0x1eecd0
movq (%r14), %rsi
movq 0x8(%r14), %rdi
movl 0x18(%r14), %edx
movq %rbp, %rcx
callq 0xed48e
movq %r12, %r11
addq %r11, %rbx
cmpq 0xb0(%r14), %rbx
jae 0x1eecf2
movq (%r14), %rsi
movq 0x10(%r14), %rdi
movl 0x18(%r14), %edx
movq %rbx, %rcx
callq 0xed48e
movq %r12, %r11
cmpq %r13, %rbp
jae 0x1eed0d
movq 0x8(%r14), %rdi
callq 0xec7be
movq %r12, %r11
cmpb $-0x3, %al
ja 0x1eed0d
movzbl %al, %r14d
jmp 0x1eed14
leaq 0x100(%rbp), %r14
cmpq %r15, %rbx
jae 0x1eed33
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xec7be
movq %r12, %r11
cmpb $-0x3, %al
ja 0x1eed33
movzbl %al, %edx
jmp 0x1eed3a
leaq 0x100(%rbx), %rdx
movq %rbx, %rax
subq %r11, %rax
xorl %ecx, %ecx
cmpq 0x10(%rsp), %rax
jne 0x1eed53
movl $0x0, 0x8(%rsp)
jmp 0x1eed7b
jae 0x1ef420
cmpq %rdx, %r14
jne 0x1eed68
incq %rbp
incq %rbx
movb $0x1, %cl
jmp 0x1eed7b
xorl %ecx, %ecx
cmpq %rdx, %r14
movl $0x0, %edx
sbbl %edx, %edx
orl $0x1, %edx
movl %edx, 0x8(%rsp)
testb %cl, %cl
movq 0x18(%rsp), %r14
jne 0x1eecf2
jmp 0x1eede2
movq (%rsp), %rax
cmpq %rax, %rbp
jbe 0x1ef448
movl 0x18(%r14), %ecx
movq (%r14), %rdx
movq 0x8(%r14), %r8
movq 0x10(%r14), %r9
leaq 0x58(%rsp), %rdi
movq %rdx, %rsi
pushq %rbp
pushq %rax
pushq %r11
pushq %rbx
callq 0xf1ce3
addq $0x20, %rsp
movl %eax, 0x8(%rsp)
movq 0x60(%rsp), %rax
cmpq %rbp, %rax
ja 0x1ef452
jne 0x1eeddf
cmpl $0x0, 0x8(%rsp)
movq %r12, %r11
je 0x1eede2
jmp 0x1ef44d
movq %r12, %r11
movq 0x38(%r14), %rdx
testq %rdx, %rdx
movq 0x38(%rsp), %r13
movq 0x28(%rsp), %r15
je 0x1eef18
cmpq 0x40(%rsp), %r15
jae 0x1eeeb3
cmpl $0x0, 0x8(%rsp)
jle 0x1eeeb3
movq 0x8(%rdx), %rsi
testq %rsi, %rsi
je 0x1ef439
movq 0x10(%rdx), %r9
movq 0x20(%rdx), %r8
leaq (%r15,%r13), %rcx
addq %r8, %rcx
cmpq %r9, %rcx
jae 0x1ef439
movq (%rdx), %rdi
testq %rdi, %rdi
je 0x1eee57
movabsq $-0x8000000000000000, %r10 # imm = 0x8000000000000000
shrq %cl, %r10
shrq $0x6, %rcx
testq %r10, (%rdi,%rcx,8)
je 0x1ef461
leaq 0x1(%r15), %rcx
addq %r13, %rcx
addq %r8, %rcx
cmpq %r9, %rcx
jae 0x1ef457
leaq (%rsi,%r8,4), %r8
leaq (%r8,%r13,4), %r8
movl (%r8,%r15,4), %r8d
testq %rdi, %rdi
je 0x1eee90
movabsq $-0x8000000000000000, %r9 # imm = 0x8000000000000000
shrq %cl, %r9
shrq $0x6, %rcx
orq %r9, (%rdi,%rcx,8)
movq 0x20(%rdx), %rcx
leaq (%rsi,%rcx,4), %rcx
leaq (%rcx,%r13,4), %rcx
movq 0x30(%rsp), %rsi
movl %r8d, 0x8(%rcx,%rsi,4)
cmpl $0xff, %r8d
jb 0x1eeeb3
incq 0x18(%rdx)
movq 0x8(%rdx), %rsi
testq %rsi, %rsi
je 0x1ef425
leaq (%r15,%r13), %rcx
addq 0x20(%rdx), %rcx
cmpq 0x10(%rdx), %rcx
jae 0x1ef425
movq (%rdx), %rdi
testq %rdi, %rdi
je 0x1eeeef
movabsq $-0x8000000000000000, %r8 # imm = 0x8000000000000000
shrq %cl, %r8
shrq $0x6, %rcx
orq %r8, (%rdi,%rcx,8)
movq %rax, %rcx
shrq $0x20, %rcx
jne 0x1ef434
movq 0x20(%rdx), %rcx
leaq (%rsi,%rcx,4), %rcx
leaq (%rcx,%r13,4), %rcx
movl %eax, (%rcx,%r15,4)
cmpq $0xff, %rax
jb 0x1eef18
incq 0x18(%rdx)
cmpl $0x0, 0x8(%rsp)
js 0x1eef7b
movq 0x10(%rsp), %rbp
je 0x1eef87
movq 0x48(%r14), %rdi
movq %r13, %rsi
movq 0x30(%rsp), %rbx
movq %rbx, %rdx
movq %r11, %rcx
callq 0x2060df
movq 0x48(%r14), %rdi
movq %r13, %rsi
movq %r15, %rdx
movq 0x50(%rsp), %rcx
callq 0x2060df
movq 0x2c0(%r14), %rax
movb -0x1(%rax,%r15), %cl
movb (%rax,%r15), %dl
movb %dl, -0x1(%rax,%r15)
movb %cl, (%rax,%r15)
testq %rbx, %rbx
jne 0x1eec41
movl $0x1, %r15d
jmp 0x1eef9b
movq 0x48(%rsp), %r15
movq 0x10(%rsp), %rbp
jmp 0x1eef9b
movq 0x2c0(%r14), %rax
movb $0x1, (%rax,%r15)
movl $0x0, 0x8(%rsp)
movq 0x40(%rsp), %rbx
incq %rbx
cmpq 0x20(%rsp), %rbx
jne 0x1eec3c
testq %r15, %r15
je 0x1ef411
movq 0x48(%r14), %rdi
callq 0x2061f2
movq 0x20(%rsp), %rdx
movq %rax, %rbx
leaq (%rax,%r13), %r15
leaq -0x1(%rdx), %r12
xorl %r13d, %r13d
xorl %ecx, %ecx
movq 0x2c0(%r14), %rax
cmpb $0x1, 0x1(%rax,%r13)
jne 0x1eefef
movb $0x0, 0x1(%rax,%r13)
incq %rcx
jmp 0x1ef01b
testq %rcx, %rcx
je 0x1ef019
movq 0x50(%r14), %rax
testq %rax, %rax
je 0x1ef019
movq 0x48(%r14), %rsi
movq 0x58(%r14), %rdi
leaq (%r15,%r13), %rdx
subq %rcx, %rdx
incq %rcx
movq %rbp, %r8
callq *%rax
movq 0x20(%rsp), %rdx
xorl %ecx, %ecx
incq %r13
cmpq %r13, %r12
jne 0x1eefd5
testq %rcx, %rcx
movq 0x38(%rsp), %r9
je 0x1ef411
movq 0x50(%r14), %rax
testq %rax, %rax
je 0x1ef411
movq 0x48(%r14), %rsi
movq 0x58(%r14), %rdi
movq %rcx, %r8
notq %r8
addq %r9, %rdx
addq %rbx, %rdx
addq %r8, %rdx
incq %rcx
movq %rbp, %r8
callq *%rax
jmp 0x1ef411
movq %rdx, %r8
movl 0x60(%r14), %edx
movq 0x48(%r14), %r9
subq $0x8, %rsp
movq 0x8(%rsp), %rsi
movq %r13, %rcx
pushq 0x38(%r14)
callq 0x1f99a4
addq $0x10, %rsp
incq 0x80(%r14)
jmp 0x1ef411
movq %r14, %r15
movq %rdx, %r14
movq 0x98(%r15), %rdx
movl 0x18(%r15), %ecx
movq (%r15), %rsi
movq 0x8(%r15), %r8
movq 0x48(%r15), %r9
movl 0x60(%r15), %eax
pushq %rax
pushq 0x8(%rsp)
pushq %r14
pushq %r13
callq 0x1fec4d
addq $0x20, %rsp
cmpl $0x0, 0x60(%r15)
je 0x1ef105
movq 0x2e0(%r15), %rbx
movq 0x48(%r15), %rdi
callq 0x2061f2
movl 0x60(%r15), %r8d
movq 0x48(%r15), %r9
movups 0x50(%r15), %xmm0
subq $0x10, %rsp
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %rax, %rsi
movq %r13, %rdx
movq %r14, %rcx
callq 0x1ffb4b
addq $0x10, %rsp
incq 0x78(%r15)
jmp 0x1ef411
movq 0x2c8(%r14), %rdi
movq %rdx, %rcx
movq 0x38(%r14), %rdx
movups 0x50(%r14), %xmm0
subq $0x10, %rsp
movups %xmm0, (%rsp)
movq %r13, %rsi
movq 0x10(%rsp), %r8
movq %rbp, %r9
callq 0x1ef9bc
addq $0x10, %rsp
incq 0x90(%r14)
jmp 0x1ef411
incq 0x68(%r14)
movl $0x1, %ebx
xorl %r15d, %r15d
movq %rbx, 0x28(%rsp)
movq 0x48(%r14), %rdi
leaq -0x1(%rbx), %rdx
movq %r13, %rsi
movq %rdx, 0x10(%rsp)
callq 0x206063
movq %rax, %r12
movq 0x48(%r14), %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x206063
movq 0x40(%r14), %rcx
cmpb $0x1, 0x2c(%rcx)
movq %rbx, 0x8(%rsp)
movq %r12, 0x30(%rsp)
movq %rax, 0x18(%rsp)
jne 0x1ef258
movq %r12, %r13
addq (%rsp), %r13
cmpq 0xb0(%r14), %r13
jae 0x1ef1c1
movq (%r14), %rsi
movq 0x8(%r14), %rdi
movl 0x18(%r14), %edx
movq %r13, %rcx
callq 0xed48e
movq (%rsp), %rax
movq 0x18(%rsp), %rcx
leaq (%rcx,%rax), %r12
cmpq 0xb0(%r14), %r12
jae 0x1ef1ea
movq (%r14), %rsi
movq 0x10(%r14), %rdi
movl 0x18(%r14), %edx
movq %r12, %rcx
callq 0xed48e
cmpq 0xb0(%r14), %r13
jae 0x1ef205
movq 0x8(%r14), %rdi
callq 0xec7be
cmpb $-0x3, %al
ja 0x1ef205
movzbl %al, %ebx
jmp 0x1ef20c
leaq 0x100(%r13), %rbx
cmpq 0xb0(%r14), %r12
jae 0x1ef227
movq 0x10(%r14), %rdi
callq 0xec7be
cmpb $-0x3, %al
ja 0x1ef227
movzbl %al, %eax
jmp 0x1ef22f
leaq 0x100(%r12), %rax
cmpq %rax, %rbx
jne 0x1ef23c
incq %r13
incq %r12
jmp 0x1ef251
movq %r12, %r15
subq 0x18(%rsp), %r15
cmpq %rax, %rbx
movl $0x0, %ebp
sbbl %ebp, %ebp
orl $0x1, %ebp
cmpq %rax, %rbx
je 0x1ef1ea
jmp 0x1ef288
movl 0x18(%r14), %ecx
movq (%r14), %rdx
movq 0x8(%r14), %r8
movq 0x10(%r14), %r9
leaq 0x58(%rsp), %rdi
movq %rdx, %rsi
pushq $0x0
pushq 0x8(%rsp)
pushq %rax
pushq %r12
callq 0xf1ce3
addq $0x20, %rsp
movl %eax, %ebp
movq 0x60(%rsp), %r15
testl %ebp, %ebp
je 0x1ef42f
movq 0x38(%r14), %rax
testq %rax, %rax
movq 0x38(%rsp), %r13
movq 0x8(%rsp), %rbx
je 0x1ef3c1
cmpq 0x28(%rsp), %rbx
jae 0x1ef35b
testl %ebp, %ebp
jle 0x1ef35b
movq 0x8(%rax), %rdx
testq %rdx, %rdx
je 0x1ef43e
movq 0x10(%rax), %r8
movq 0x20(%rax), %rdi
leaq (%rbx,%r13), %rcx
addq %rdi, %rcx
cmpq %r8, %rcx
jae 0x1ef43e
movq (%rax), %rsi
testq %rsi, %rsi
je 0x1ef302
movabsq $-0x8000000000000000, %r9 # imm = 0x8000000000000000
shrq %cl, %r9
shrq $0x6, %rcx
testq %r9, (%rsi,%rcx,8)
je 0x1ef466
leaq 0x1(%rbx), %rcx
addq %r13, %rcx
addq %rdi, %rcx
cmpq %r8, %rcx
jae 0x1ef45c
leaq (%rdx,%rdi,4), %rdi
leaq (%rdi,%r13,4), %rdi
movl (%rdi,%rbx,4), %edi
testq %rsi, %rsi
je 0x1ef33a
movabsq $-0x8000000000000000, %r8 # imm = 0x8000000000000000
shrq %cl, %r8
shrq $0x6, %rcx
orq %r8, (%rsi,%rcx,8)
movq 0x20(%rax), %rcx
leaq (%rdx,%rcx,4), %rcx
leaq (%rcx,%r13,4), %rcx
movq 0x10(%rsp), %rdx
movl %edi, 0x8(%rcx,%rdx,4)
cmpl $0xff, %edi
jb 0x1ef35b
incq 0x18(%rax)
movq 0x8(%rax), %rdx
testq %rdx, %rdx
je 0x1ef42a
leaq (%rbx,%r13), %rcx
addq 0x20(%rax), %rcx
cmpq 0x10(%rax), %rcx
jae 0x1ef42a
movq (%rax), %rsi
testq %rsi, %rsi
je 0x1ef397
movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000
shrq %cl, %rdi
shrq $0x6, %rcx
orq %rdi, (%rsi,%rcx,8)
movq %r15, %rcx
shrq $0x20, %rcx
jne 0x1ef443
movq 0x20(%rax), %rcx
leaq (%rdx,%rcx,4), %rcx
leaq (%rcx,%r13,4), %rcx
movl %r15d, (%rcx,%rbx,4)
cmpq $0xff, %r15
jb 0x1ef3c1
incq 0x18(%rax)
testl %ebp, %ebp
js 0x1ef3fe
movq 0x48(%r14), %rdi
movq %r13, %rsi
movq 0x10(%rsp), %r12
movq %r12, %rdx
movq 0x18(%rsp), %rcx
callq 0x2060df
movq 0x48(%r14), %rdi
movq %r13, %rsi
movq %rbx, %rdx
movq 0x30(%rsp), %rcx
callq 0x2060df
movq %r12, %rbx
testq %r12, %r12
jne 0x1ef15a
movq 0x28(%rsp), %rbx
incq %rbx
cmpq 0x20(%rsp), %rbx
jne 0x1ef155
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x779e9
callq 0x77ac7
callq 0x77bda
callq 0x77c48
callq 0x77a90
callq 0x77afe
callq 0x77c11
callq 0x77ba3
callq 0x7793e
callq 0x77977
callq 0x779b0
callq 0x77a59
callq 0x77b6c
callq 0x77a22
callq 0x77b35
callq 0x77905
callq 0x77c81