// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x58, %rsp
movq 0x60(%rsp), %rax
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movl %edx, 0x44(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq %r9, 0x28(%rsp)
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x2e9cf0
movq %rax, 0x10(%rsp)
movb $0x0, 0xf(%rsp)
movq 0x10(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2ce8ab
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
jmp 0x2ce916
movq 0x30(%rsp), %rdi
shlq $0x3, %rdi
leaq 0x2bd43e(%rip), %rsi    # 0x58bcf9
movl $0x2b, %edx
callq 0xe80f0
movq %rax, 0x18(%rsp)
movb $0x1, 0xf(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x2ce914
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, %edx
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x2ce8d8
jmp 0x2ce916
movq 0x50(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x38(%rsp), %rcx
movq 0x48(%rsp), %r8
movl 0x44(%rsp), %eax
movl %eax, %r9d
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
callq 0x4d4430
testb $0x1, 0xf(%rsp)
je 0x2cea1f
jmp 0x2ce951
movq 0x10(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x2ce994
movq 0x36d63d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2476a6(%rip), %rsi    # 0x516013
leaq 0x2bd39f(%rip), %rdx    # 0x58bd13
leaq 0x2bd3bd(%rip), %rcx    # 0x58bd38
leaq 0x2bd377(%rip), %r8     # 0x58bcf9
movl $0x3b, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2ce996
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x2cea04
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl %eax, %edx
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rsp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x2ce9f2
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %rsi
addq 0x20(%rsp), %rsi
callq 0x2e9b50
jmp 0x2ce9f4
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x2ce99f
movq 0x18(%rsp), %rdi
leaq 0x2bd2e9(%rip), %rsi    # 0x58bcf9
movl $0x44, %edx
callq 0xe88c0
jmp 0x2ceabb
jmp 0x2cea21
movq 0x10(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x2cea65
movq 0x36d56c(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2475d5(%rip), %rsi    # 0x516013
leaq 0x2bd308(%rip), %rdx    # 0x58bd4d
leaq 0x2bd2ec(%rip), %rcx    # 0x58bd38
leaq 0x2bd2a6(%rip), %r8     # 0x58bcf9
movl $0x47, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2cea67
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x2ceab9
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x20(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x2ceaa7
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %rsi
addq 0x20(%rsp), %rsi
callq 0x2e9b50
jmp 0x2ceab9
jmp 0x2ceaa9
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x2cea70
jmp 0x2ceabb
movq 0x28(%rsp), %rdi
callq 0x2e9e50
addq $0x58, %rsp
retq
nopw (%rax,%rax)