// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/sfx-sain.c
// Function: gt_sain_bare_encseq_sortsuffixes
GtUsainindextype *gt_sain_bare_encseq_sortsuffixes(
                                      const GtBareEncseq *bare_encseq,
                                      GtReadmode readmode,
                                      bool intermediatecheck,
                                      bool finalcheck,
                                      GtLogger *logger,
                                      GtTimer *timer)
{
  GtUword nonspecialentries, suftabentries, totallength;
  GtUsainindextype *suftab;
  GtSainseq *sainseq;

  totallength = gt_bare_encseq_total_length(bare_encseq);
  nonspecialentries = totallength -
                      gt_bare_encseq_specialcharacters(bare_encseq);
  suftabentries = totallength+1;
  suftab = (GtUsainindextype *) gt_calloc((size_t) suftabentries,
                                          sizeof *suftab);
  sainseq = gt_sainseq_new_from_bare_encseq(bare_encseq,readmode);
  gt_sain_rec_sortsuffixes(0,
                           sainseq,
                           suftab,
                           0,
                           nonspecialentries,
                           suftabentries,
                           intermediatecheck,
                           finalcheck,
                           logger,
                           timer);
#ifdef GT_SAIN_WITHCOUNTS
  printf("countcharaccess="GT_WU" (%.2f)\n",gt_sain_countcharaccess,
          (double) gt_sain_countcharaccess/sainseq->totallength);
#endif
  gt_sainseq_delete(sainseq);
  return suftab;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, 0x28(%rsp)
movq %r8, 0x30(%rsp)
movl %ecx, 0x8(%rsp)
movl %edx, 0xc(%rsp)
movl %esi, %ebx
movq %rdi, %r14
callq 0x133da4
movq %rax, %r13
movq %r14, %rdi
callq 0x133e7b
movq %rax, 0x10(%rsp)
leaq 0x1(%r13), %rdi
leaq 0x1b465a(%rip), %rbp    # 0x3594f8
pushq $0x4
popq %rsi
movq %rdi, 0x18(%rsp)
movq %rbp, %rdx
movl $0x65d, %ecx            # imm = 0x65D
callq 0x9334a
movq %rax, 0x20(%rsp)
pushq $0x58
popq %rdi
movq %rbp, %rsi
movl $0xa8, %edx
callq 0x93160
movq %rax, %rbp
movl $0x3, 0x50(%rax)
movq %r14, %rdi
callq 0x133d5b
movq %rax, 0x38(%rbp)
movq %r14, %rdi
callq 0x133da4
movq %rax, (%rbp)
movq %r14, %rdi
callq 0x133de7
movq %rax, 0x8(%rbp)
movq %r14, 0x48(%rbp)
movl %ebx, 0x40(%rbp)
movq (%rbp), %rdx
leaq 0x100(%rdx), %rsi
movq %rbp, %rdi
callq 0x1a5332
andl $-0x2, %ebx
movb $0x3, %r12b
xorl %r15d, %r15d
cmpq 0x8(%rbp), %r15
jae 0x1a4f48
cmpl $0x2, %ebx
movzbl %r12b, %r12d
movl %r15d, %eax
cmovel %r12d, %eax
movzbl %al, %esi
movq %r14, %rdi
callq 0x133e2a
movq 0x18(%rbp), %rcx
movl %eax, (%rcx,%r15,4)
incq %r15
decb %r12b
jmp 0x1a4f19
subq 0x10(%rsp), %r13
movzbl 0x8(%rsp), %eax
movzbl 0xc(%rsp), %r10d
xorl %edi, %edi
movq %rbp, %rsi
movq 0x20(%rsp), %rbx
movq %rbx, %rdx
xorl %ecx, %ecx
movq %r13, %r8
movq 0x18(%rsp), %r9
pushq 0x28(%rsp)
pushq 0x38(%rsp)
pushq %rax
pushq %r10
callq 0x1a2937
addq $0x20, %rsp
movq %rbp, %rdi
callq 0x1a4dca
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq