// File: /workspace/github_c_makefile_star2_O2/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
cmpq $0x1, %rdx
jbe 0x194bc4
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r9
movq 0x2f0(%rdi), %rdi
testq %rdi, %rdi
je 0x1942da
cmpq %r15, 0xa0(%r9)
ja 0x1942da
cmpq %r15, 0xa8(%r9)
jae 0x194670
movq 0x2e0(%r9), %rdi
testq %rdi, %rdi
movq %r9, (%rsp)
je 0x194301
movq 0x40(%r9), %rax
cmpb $0x0, 0x34(%rax)
jne 0x194301
cmpq %r15, 0xb8(%r9)
jae 0x19469f
movl 0x60(%r9), %r13d
testq %r13, %r13
sete %al
cmpq %r12, %r13
seta %cl
orb %al, %cl
je 0x194340
movq 0x40(%r9), %rax
cmpq %r15, 0x8(%rax)
jae 0x19438b
cmpq %r15, 0x10(%rax)
jae 0x1947b0
movq 0x28(%r9), %rax
cmpq %rax, 0x30(%r9)
jae 0x194a6e
movq 0x20(%r9), %rax
jmp 0x194a99
movq 0x50(%r9), %rax
testq %rax, %rax
je 0x194abf
movq %r12, %r13
movq %rbx, %r12
movq 0x48(%r9), %rbx
movq 0x58(%r9), %r14
movq %rbx, %rdi
movq %rax, %rbp
callq 0x1afb8c
addq %rax, %r12
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r13, %r8
movq %rbp, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
testq %r13, %r13
movq %r15, 0x28(%rsp)
movq %rbx, 0x8(%rsp)
movq %r12, 0x38(%rsp)
je 0x19482b
incq 0x68(%r9)
pushq $0x1
popq %rax
movq $0x0, 0x40(%rsp)
movq %r13, 0x20(%rsp)
cmpq %r15, %rax
jae 0x194730
movq %rax, 0x48(%rsp)
movq %rax, %rbp
movq %rax, %rdx
subq $0x1, %rdx
jb 0x19465e
movq 0x48(%r9), %rdi
movq %rbx, %rsi
movq %rdx, 0x30(%rsp)
callq 0x1af8b2
movq %rax, %r12
movq (%rsp), %rax
movq 0x48(%rax), %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x1af8b2
movq (%rsp), %r9
movq %rax, %r15
movq 0x40(%r9), %rax
cmpb $0x1, 0x2c(%rax)
movq %r12, 0x10(%rsp)
movq %rbp, 0x18(%rsp)
jne 0x1944ee
leaq (%r12,%r13), %rbx
movq 0xb0(%r9), %rax
cmpq %rax, %rbx
cmovaeq %rax, %rbx
leaq (%r15,%r13), %rbp
cmpq %rax, %rbp
cmovaeq %rax, %rbp
movq 0x38(%rsp), %r13
leaq (%r12,%r13), %rcx
cmpq %rax, %rcx
jae 0x194462
movq (%r9), %rsi
movq 0x8(%r9), %rdi
movl 0x18(%r9), %edx
callq 0x71f38
movq (%rsp), %r9
movq 0xb0(%r9), %rax
leaq (%r15,%r13), %rcx
cmpq %rax, %rcx
jae 0x19447f
movq (%r9), %rsi
movq 0x10(%r9), %rdi
movl 0x18(%r9), %edx
callq 0x71f38
movq (%rsp), %r9
movq 0x10(%rsp), %r12
leaq (%r12,%r13), %rax
cmpq %rbx, %rax
jae 0x1944a4
movq 0x8(%r9), %rdi
callq 0x70f55
movq (%rsp), %r9
cmpb $-0x3, %al
ja 0x1944a4
movzbl %al, %r12d
jmp 0x1944ae
addq %r13, %r12
addq $0x100, %r12            # imm = 0x100
leaq (%r15,%r13), %rax
cmpq %rbp, %rax
jae 0x1944cd
movq 0x10(%r9), %rdi
callq 0x70f55
movq (%rsp), %r9
cmpb $-0x3, %al
ja 0x1944cd
movzbl %al, %eax
jmp 0x1944d7
leaq (%r15,%r13), %rax
addq $0x100, %rax            # imm = 0x100
cmpq %r13, 0x20(%rsp)
je 0x19454a
jbe 0x194ace
cmpq %rax, %r12
jne 0x19455a
incq %r13
jmp 0x19447f
movq 0x38(%rsp), %r12
cmpq %r12, %r13
jbe 0x194b06
movl 0x18(%r9), %ecx
movq (%r9), %rdx
movq 0x8(%r9), %r8
movq 0x10(%r9), %r9
leaq 0x58(%rsp), %rdi
movq %rdx, %rsi
pushq %r13
pushq %r12
pushq %r15
pushq 0x28(%rsp)
callq 0x777e6
addq $0x20, %rsp
movl %eax, %r14d
movq %r13, %rax
movq 0x60(%rsp), %r13
cmpq %rax, %r13
ja 0x194b62
jne 0x194554
testl %r14d, %r14d
movq (%rsp), %r9
je 0x194567
jmp 0x194b34
xorl %r14d, %r14d
movq 0x20(%rsp), %r13
jmp 0x194567
movq (%rsp), %r9
jmp 0x194567
movl $0x0, %r14d
sbbl %r14d, %r14d
orl $0x1, %r14d
movq 0x38(%r9), %rbx
testq %rbx, %rbx
je 0x1945de
movq 0x18(%rsp), %rax
cmpq 0x48(%rsp), %rax
jae 0x1945bf
testl %r14d, %r14d
jle 0x1945bf
movq 0x18(%rsp), %rbp
leaq 0x1(%rbp), %rax
movq %rax, 0x50(%rsp)
movq %rbx, %rdi
movq 0x8(%rsp), %r12
movq %r12, %rsi
movq %rbp, %rdx
callq 0x194d5d
movq %rbx, %rdi
movq %r12, %rsi
movq 0x50(%rsp), %rdx
movq %rax, %rcx
callq 0x194c9a
movq (%rsp), %rax
movq 0x38(%rax), %rbx
jmp 0x1945c9
movq 0x8(%rsp), %r12
movq 0x18(%rsp), %rbp
movq %rbx, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %r13, %rcx
callq 0x194c9a
movq (%rsp), %r9
testl %r14d, %r14d
movq 0x8(%rsp), %rbx
movq 0x20(%rsp), %r13
js 0x19465e
je 0x194649
movq 0x48(%r9), %rdi
movq %rbx, %rsi
movq 0x30(%rsp), %rbp
movq %rbp, %rdx
movq %r15, %rcx
callq 0x1af9c7
movq (%rsp), %rax
movq 0x48(%rax), %rdi
movq %rbx, %rsi
movq 0x18(%rsp), %r15
movq %r15, %rdx
movq 0x10(%rsp), %rcx
callq 0x1af9c7
movq (%rsp), %r9
movq 0x2c0(%r9), %rax
movb (%rax,%rbp), %cl
movb (%rax,%r15), %dl
movb %dl, (%rax,%rbp)
movb %cl, (%rax,%r15)
movq %r15, 0x40(%rsp)
movq %rbp, %rdx
jmp 0x1943cc
movq 0x2c0(%r9), %rax
movq 0x18(%rsp), %rcx
movb $0x1, (%rax,%rcx)
movq %rcx, 0x40(%rsp)
movq 0x48(%rsp), %rax
incq %rax
movq 0x28(%rsp), %r15
jmp 0x1943b8
movl 0x60(%r9), %edx
movq %r9, %r14
movq 0x48(%r9), %r9
subq $0x8, %rsp
movq %r12, %rsi
movq %rbx, %rcx
movq %r15, %r8
pushq 0x38(%r14)
callq 0x1a16a8
popq %rax
popq %rcx
incq 0x80(%r14)
jmp 0x194abf
movq 0x98(%r9), %rdx
movl 0x18(%r9), %ecx
movq (%r9), %rsi
movq 0x8(%r9), %r8
movq (%rsp), %rax
movq 0x48(%rax), %r9
movq (%rsp), %rax
movl 0x60(%rax), %eax
pushq %rax
pushq %r12
pushq %r15
pushq %rbx
callq 0x1a7b13
movq 0x20(%rsp), %rax
addq $0x20, %rsp
cmpl $0x0, 0x60(%rax)
je 0x194727
movq %rbx, %r12
movq 0x2e0(%rax), %rbx
movq 0x48(%rax), %rdi
callq 0x1afb8c
movq (%rsp), %rcx
movl 0x60(%rcx), %r8d
movq (%rsp), %rcx
movq 0x48(%rcx), %r9
movq (%rsp), %rcx
movups 0x50(%rcx), %xmm0
subq $0x10, %rsp
movups %xmm0, (%rsp)
movq %rbx, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x1a88f7
movq 0x10(%rsp), %rax
addq $0x10, %rsp
incq 0x78(%rax)
jmp 0x194abf
cmpq $0x0, 0x40(%rsp)
je 0x194abf
movq 0x48(%r9), %rdi
callq 0x1afb8c
movq (%rsp), %rdx
movq %rax, %rbx
movq 0x8(%rsp), %rax
leaq (%rbx,%rax), %r15
pushq $0x1
popq %r12
xorl %ecx, %ecx
cmpq 0x28(%rsp), %r12
jae 0x1947ea
movq 0x2c0(%rdx), %rax
cmpb $0x1, (%rax,%r12)
jne 0x19477e
movb $0x0, (%rax,%r12)
incq %rcx
jmp 0x1947a8
testq %rcx, %rcx
je 0x1947a6
movq 0x50(%rdx), %rax
testq %rax, %rax
je 0x1947a6
movq 0x48(%rdx), %rsi
movq 0x58(%rdx), %rdi
movq %r15, %rdx
subq %rcx, %rdx
incq %rcx
movq %r13, %r8
callq *%rax
movq (%rsp), %rdx
xorl %ecx, %ecx
incq %r12
incq %r15
jmp 0x19475b
movq 0x2c8(%r9), %rdi
movq 0x38(%r9), %rdx
movups 0x50(%r9), %xmm0
subq $0x10, %rsp
movups %xmm0, (%rsp)
movq %rbx, %rsi
movq %r15, %rcx
movq %r12, %r8
movq %r9, %rbx
movq %r13, %r9
callq 0x1953b1
popq %rax
popq %rcx
incq 0x90(%rbx)
jmp 0x194abf
testq %rcx, %rcx
je 0x194abf
movq 0x50(%rdx), %rax
testq %rax, %rax
je 0x194abf
movq 0x48(%rdx), %rsi
movq 0x58(%rdx), %rdi
movq %rcx, %r8
notq %r8
movq 0x28(%rsp), %rdx
addq 0x8(%rsp), %rdx
addq %rbx, %rdx
addq %r8, %rdx
incq %rcx
movq %r13, %r8
callq *%rax
jmp 0x194abf
incq 0x68(%r9)
pushq $0x1
popq %rax
cmpq %r15, %rax
jae 0x194abf
movq %rax, 0x30(%rsp)
movq %rax, 0x10(%rsp)
movq %rax, %rdx
subq $0x1, %rdx
jb 0x194a61
movq 0x48(%r9), %rdi
movq %rbx, %rsi
movq %rdx, 0x20(%rsp)
callq 0x1af8b2
movq %rax, %r13
movq (%rsp), %rax
movq 0x48(%rax), %rdi
movq %rbx, %rsi
movq 0x10(%rsp), %rdx
callq 0x1af8b2
movq (%rsp), %r9
movq %rax, %rbp
movq 0x40(%r9), %rax
cmpb $0x1, 0x2c(%rax)
jne 0x194961
leaq (%r12,%r13), %rcx
movq 0xb0(%r9), %rax
cmpq %rax, %rcx
jae 0x1948bb
movq (%r9), %rsi
movq 0x8(%r9), %rdi
movl 0x18(%r9), %edx
callq 0x71f38
movq (%rsp), %r9
movq 0xb0(%r9), %rax
leaq (%r12,%rbp), %rcx
cmpq %rax, %rcx
jae 0x1948d8
movq (%r9), %rsi
movq 0x10(%r9), %rdi
movl 0x18(%r9), %edx
callq 0x71f38
movq (%rsp), %r9
movl $0x100, %eax            # imm = 0x100
movq %rbp, %r14
leaq (%rax,%rbp), %r15
leaq (%rax,%r13), %r12
movq 0x38(%rsp), %rbx
movq %r13, %rbp
leaq (%rbx,%r13), %rax
cmpq 0xb0(%r9), %rax
jae 0x194914
movq 0x8(%r9), %rdi
callq 0x70f55
movq (%rsp), %r9
cmpb $-0x3, %al
ja 0x194914
movzbl %al, %r13d
jmp 0x194918
leaq (%r12,%rbx), %r13
leaq (%r14,%rbx), %rax
cmpq 0xb0(%r9), %rax
jae 0x19493b
movq 0x10(%r9), %rdi
callq 0x70f55
movq (%rsp), %r9
cmpb $-0x3, %al
ja 0x19493b
movzbl %al, %eax
jmp 0x19493f
leaq (%r15,%rbx), %rax
cmpq %rax, %r13
jne 0x19494c
incq %rbx
movq %rbp, %r13
jmp 0x1948ed
movl $0x0, %r15d
sbbl %r15d, %r15d
orl $0x1, %r15d
movq %rbp, %r13
movq %r14, %rbp
jmp 0x19499c
movl 0x18(%r9), %ecx
movq (%r9), %rdx
movq 0x8(%r9), %r8
movq 0x10(%r9), %r9
leaq 0x58(%rsp), %rdi
movq %rdx, %rsi
pushq $0x0
pushq %r12
pushq %rbp
pushq %r13
callq 0x777e6
addq $0x20, %rsp
testl %eax, %eax
je 0x194b93
movl %eax, %r15d
movq 0x60(%rsp), %rbx
movq (%rsp), %r9
movq %r13, 0x18(%rsp)
movq 0x38(%r9), %r12
testq %r12, %r12
je 0x194a0b
movq 0x10(%rsp), %rdx
cmpq 0x30(%rsp), %rdx
jae 0x1949f4
testl %r15d, %r15d
jle 0x1949f4
leaq 0x1(%rdx), %r14
movq %r12, %rdi
movq 0x8(%rsp), %r13
movq %r13, %rsi
movq 0x10(%rsp), %rdx
callq 0x194d5d
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %rax, %rcx
callq 0x194c9a
movq 0x10(%rsp), %rdx
movq (%rsp), %rax
movq 0x38(%rax), %r12
jmp 0x1949f9
movq 0x8(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rcx
callq 0x194c9a
movq (%rsp), %r9
testl %r15d, %r15d
movq 0x28(%rsp), %r15
movq 0x8(%rsp), %rbx
movq 0x38(%rsp), %r12
movq 0x20(%rsp), %r13
js 0x194a61
movq 0x48(%r9), %rdi
movq %rbx, %rsi
movq %r13, %rdx
movq %rbp, %rcx
callq 0x1af9c7
movq (%rsp), %rax
movq 0x48(%rax), %rdi
movq %rbx, %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
callq 0x1af9c7
movq (%rsp), %r9
movq %r13, 0x10(%rsp)
movq %r13, %rdx
jmp 0x194848
movq 0x30(%rsp), %rax
incq %rax
jmp 0x194832
addq $0x400, %rax            # imm = 0x400
movq %rax, 0x28(%r9)
movq 0x20(%r9), %rdi
imulq $0x18, %rax, %rsi
leaq 0x1c10f9(%rip), %rdx    # 0x355b80
movl $0x391, %ecx            # imm = 0x391
callq 0x93472
movq (%rsp), %r9
movq %rax, 0x20(%r9)
testq %rax, %rax
je 0x194bf5
movq 0x30(%r9), %rcx
imulq $0x18, %rcx, %rdx
movq %rbx, (%rax,%rdx)
movq %r15, 0x8(%rax,%rdx)
movq %r12, 0x10(%rax,%rdx)
incq %rcx
movq %rcx, 0x30(%r9)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2a3493(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x150534(%rip), %rsi    # 0x2e5013
leaq 0x1c134d(%rip), %rdx    # 0x355e33
leaq 0x1c135c(%rip), %rcx    # 0x355e49
leaq 0x1c108c(%rip), %r8     # 0x355b80
movl $0x1a9, %r9d            # imm = 0x1A9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x2a345b(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1504fc(%rip), %rsi    # 0x2e5013
leaq 0x1c1843(%rip), %rdx    # 0x356361
leaq 0x1c1324(%rip), %rcx    # 0x355e49
leaq 0x1c1054(%rip), %r8     # 0x355b80
movl $0x1b4, %r9d            # imm = 0x1B4
jmp 0x194afa
movq 0x2a342d(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1504ce(%rip), %rsi    # 0x2e5013
leaq 0x173cc7(%rip), %rdx    # 0x308813
leaq 0x1c12f6(%rip), %rcx    # 0x355e49
leaq 0x1c1026(%rip), %r8     # 0x355b80
movl $0x1c3, %r9d            # imm = 0x1C3
jmp 0x194afa
movq 0x2a33ff(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1504a0(%rip), %rsi    # 0x2e5013
leaq 0x1c12e8(%rip), %rdx    # 0x355e62
leaq 0x1c12c8(%rip), %rcx    # 0x355e49
leaq 0x1c0ff8(%rip), %r8     # 0x355b80
movl $0x1c0, %r9d            # imm = 0x1C0
jmp 0x194afa
movq 0x2a33ce(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x15046f(%rip), %rsi    # 0x2e5013
leaq 0x1c1126(%rip), %rdx    # 0x355cd1
leaq 0x1c112b(%rip), %rcx    # 0x355cdd
leaq 0x1c0fc7(%rip), %r8     # 0x355b80
movl $0x15a, %r9d            # imm = 0x15A
jmp 0x194afa
movq 0x2a339d(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x15043e(%rip), %rsi    # 0x2e5013
leaq 0x1c10a3(%rip), %rdx    # 0x355c7f
leaq 0x1c10a8(%rip), %rcx    # 0x355c8b
leaq 0x1c0f96(%rip), %r8     # 0x355b80
movl $0x344, %r9d            # imm = 0x344
jmp 0x194afa
movq 0x2a336c(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x15040d(%rip), %rsi    # 0x2e5013
leaq 0x1c1097(%rip), %rdx    # 0x355ca4
leaq 0x1c1077(%rip), %rcx    # 0x355c8b
leaq 0x1c0f65(%rip), %r8     # 0x355b80
movl $0x391, %r9d            # imm = 0x391
jmp 0x194afa