// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/sfx-radixsort.c
// Function: gt_sfx_radixsort_str
void gt_sfx_radixsort_str(GtRadixsortstringinfo *rsi,
                          GtUword depth,
                          unsigned int sortmaxdepth,
                          GtUword subbucketleft,
                          GtUword width,
                          GtSuffixsortspace *sssp,
                          GtLcpvalues *lcpvalues)
{
  GtUword idx, *suffixes;
  GtSuffixsortspace_exportptr *exportptr
    = gt_suffixsortspace_exportptr(sssp, subbucketleft);
  bool allocated = false;

  if (exportptr->ulongtabsectionptr != NULL)
  {
    suffixes = exportptr->ulongtabsectionptr;
  } else
  {
    suffixes = gt_malloc(sizeof (*suffixes) * width);
    allocated = true;
    for (idx = 0; idx < width; idx++)
    {
      suffixes[idx] = (GtUword) exportptr->uinttabsectionptr[idx];
    }
  }
  gt_radixsort_str_eqlen(rsi,
                         suffixes,
                         lcpvalues,
                         subbucketleft,
                         depth,
                         (GtUword) sortmaxdepth,
                         width);
  if (allocated)
  {
    gt_assert(exportptr->uinttabsectionptr != NULL);
    for (idx = 0; idx < width; idx++)
    {
      exportptr->uinttabsectionptr[idx] = (uint32_t) suffixes[idx];
      if (exportptr->uinttabsectionptr[idx] == 0)
      {
        gt_suffixsortspace_updatelongest(sssp,subbucketleft + idx);
      }
    }
    gt_free(suffixes);
  } else
  {
    gt_assert(exportptr->ulongtabsectionptr != NULL);
    for (idx = 0; idx < width; idx++)
    {
      if (exportptr->ulongtabsectionptr[idx] == 0)
      {
        gt_suffixsortspace_updatelongest(sssp,subbucketleft + idx);
        break;
      }
    }
  }
  gt_suffixsortspace_export_done(sssp);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, %r15
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r13
movq 0x60(%rsp), %r12
movq %r9, 0x20(%rsp)
movq %r9, %rdi
movq %rcx, %rsi
callq 0x205fd8
movq %r13, %rdi
movq %r12, %rdx
movq %rbx, %r8
movq %rax, %r12
movq 0x8(%rax), %rbx
movq %rbx, %r13
testq %rbx, %rbx
jne 0x1f9a52
movl %ebp, 0xc(%rsp)
movq %rbx, 0x10(%rsp)
movq %rdi, %rbp
movq %r14, 0x18(%rsp)
movq %rdx, %r14
movq %r8, %rbx
leaq (,%r15,8), %rdi
leaq 0x1c897c(%rip), %rsi    # 0x3c238f
movl $0x2b, %edx
callq 0x1092b2
movq %rax, %r13
testq %r15, %r15
je 0x1f9a3b
movq (%r12), %rax
xorl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movq %rdx, (%r13,%rcx,8)
incq %rcx
cmpq %rcx, %r15
jne 0x1f9a2b
movq %rbx, %r8
movq %r14, %rdx
movq 0x18(%rsp), %r14
movq %rbp, %rdi
movq 0x10(%rsp), %rbx
movl 0xc(%rsp), %ebp
movl %ebp, %r9d
movq %r15, (%rsp)
movq %r13, %rsi
movq %r14, %rcx
callq 0x32ac49
testq %rbx, %rbx
je 0x1f9a94
movq 0x8(%r12), %rax
testq %rax, %rax
movq 0x20(%rsp), %rbx
je 0x1f9b05
testq %r15, %r15
je 0x1f9aef
xorl %ecx, %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0x1f9ae1
incq %rcx
cmpq %rcx, %r15
jne 0x1f9a83
jmp 0x1f9aef
cmpq $0x0, (%r12)
movq 0x20(%rsp), %rbx
je 0x1f9b0a
testq %r15, %r15
je 0x1f9acb
xorl %ebp, %ebp
movl (%r13,%rbp,8), %eax
movq (%r12), %rcx
movl %eax, (%rcx,%rbp,4)
testl %eax, %eax
jne 0x1f9ac3
leaq (%r14,%rbp), %rsi
movq %rbx, %rdi
callq 0x205f1e
incq %rbp
cmpq %rbp, %r15
jne 0x1f9aa7
leaq 0x1c88bd(%rip), %rsi    # 0x3c238f
movq %r13, %rdi
movl $0x44, %edx
callq 0x109670
jmp 0x1f9aef
addq %rcx, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x205f1e
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20604d
callq 0x7bc94
callq 0x7bccb
nop