// File: /workspace/github_c_makefile_star2_O3/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 $0x38, %rsp
movq %r8, %r15
movq %rcx, %r13
movl %edx, %r14d
movq %rsi, 0x18(%rsp)
movq %rdi, %rbx
movq 0x70(%rsp), %rbp
movq %r9, 0x10(%rsp)
movq %r9, %rdi
movq %rcx, %rsi
callq 0x1fc8da
movq %rax, %r12
movq 0x8(%rax), %rsi
testq %rsi, %rsi
je 0x1f0254
movl %r14d, %r9d
movq %r15, (%rsp)
movq %rbx, %rdi
movq %rbp, %rdx
movq %r13, %rcx
movq 0x18(%rsp), %r8
callq 0x320909
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x1f0365
testq %r15, %r15
movq 0x10(%rsp), %rbx
je 0x1f034f
xorl %ecx, %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0x1f02fc
incq %rcx
cmpq %rcx, %r15
jne 0x1f023c
jmp 0x1f034f
movq %r13, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
movq %rbp, 0x30(%rsp)
leaq (,%r15,8), %rdi
leaq 0x1c8aab(%rip), %rsi    # 0x3b8d1d
movl $0x2b, %edx
callq 0x104226
movq %rax, %r13
testq %r15, %r15
je 0x1f030c
movq (%r12), %rax
xorl %ecx, %ecx
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rbx
movl (%rax,%rcx,4), %esi
movq %rsi, (%r13,%rcx,8)
incq %rcx
cmpq %rcx, %r15
jne 0x1f029d
movl %r14d, %r9d
movq %r15, (%rsp)
movq %r13, %rsi
movq 0x20(%rsp), %r14
movq %r14, %rcx
movq 0x18(%rsp), %r8
callq 0x320909
cmpq $0x0, (%r12)
je 0x1f036a
xorl %ebp, %ebp
movl (%r13,%rbp,8), %eax
movq (%r12), %rcx
movl %eax, (%rcx,%rbp,4)
testl %eax, %eax
jne 0x1f02f2
leaq (%r14,%rbp), %rsi
movq %rbx, %rdi
callq 0x1fc820
incq %rbp
cmpq %rbp, %r15
jne 0x1f02d6
jmp 0x1f033b
addq %rcx, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1fc820
jmp 0x1f034f
movl %r14d, %r9d
movq %r15, (%rsp)
movq 0x28(%rsp), %rdi
movq %r13, %rsi
movq 0x30(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %r8
callq 0x320909
cmpq $0x0, (%r12)
movq 0x10(%rsp), %rbx
je 0x1f036a
leaq 0x1c89db(%rip), %rsi    # 0x3b8d1d
movq %r13, %rdi
movl $0x44, %edx
callq 0x1045eb
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1fc94f
callq 0x79f35
callq 0x79f6c
nop