// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_sfxmap.c
// Function: gt_sfxmap_performsortmaxdepth
static int gt_sfxmap_performsortmaxdepth(const Sfxmapoptions *arguments,
                                         GtLogger *logger,GtError *err)
{
  bool haserr = false;
  GtEncseqLoader *el = NULL;
  Checkunsortedrangeinfo curi;
  Sfxstrategy sfxstrategy;
  const char *indexname;

  gt_error_check(err);
  indexname = gt_str_get(arguments->esaindexname);
  el = gt_encseq_loader_new();
  curi.encseq = gt_encseq_loader_load(el, indexname, err);
  if (curi.encseq == NULL)
  {
    haserr = true;
  }
  if (!haserr)
  {
    gt_logger_log(logger,"%s(%s,%u)",__func__,
                  indexname,arguments->sortmaxdepth);
    defaultsfxstrategy(&sfxstrategy,
                       gt_encseq_bitwise_cmp_ok(curi.encseq) ? false : true);
    if (gt_str_array_size(arguments->algbounds) > 0 &&
        gt_parse_algbounds(&sfxstrategy,arguments->algbounds,err) != 0)
    {
      haserr = true;
    }
  }
  if (!haserr)
  {
    GtUword totallength = gt_encseq_total_length(curi.encseq);

    curi.sssp = gt_suffixsortspace_new(totallength+1,totallength, true, logger);
    gt_suffixsortspace_init_identity(curi.sssp,totallength+1);
    curi.readmode = GT_READMODE_FORWARD;
    curi.sortmaxdepth = arguments->sortmaxdepth;
    gt_sortallsuffixesfromstart(curi.sssp,
                                totallength+1,
                                curi.encseq,
                                curi.readmode,
                                NULL,
                                arguments->sortmaxdepth,
                                &sfxstrategy,
                                gt_sfxmap_sortmaxdepth_processunsortedrange,
                                &curi, /* voiddcov */
                                logger);
    gt_checksortedsuffixes(__FILE__,
                           __LINE__,
                           curi.encseq,
                           curi.readmode,
                           curi.sssp,
                           0,
                           totallength+1,
                           false, /* specialsareequal  */
                           false,  /* specialsareequalatdepth0 */
                           (GtUword) curi.sortmaxdepth);
    gt_suffixsortspace_delete(curi.sssp,false);
  }
  gt_encseq_delete(curi.encseq);
  gt_encseq_loader_delete(el);
  return haserr ? -1 : 0;
}

// Assembly:
pushq %rbx
subq $0xb0, %rsp
movq %rdi, 0xa8(%rsp)
movq %rsi, 0xa0(%rsp)
movq %rdx, 0x98(%rsp)
movb $0x0, 0x97(%rsp)
movq $0x0, 0x88(%rsp)
cmpq $0x0, 0x98(%rsp)
je 0x6b9ca
movq 0x98(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x6b992
jmp 0x6b9ca
movq 0x5d0607(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4aa670(%rip), %rsi    # 0x516013
leaq 0x4aa815(%rip), %rdx    # 0x5161bf
leaq 0x4bfb9f(%rip), %rcx    # 0x52b550
leaq 0x4bec32(%rip), %r8     # 0x52a5ea
movl $0x534, %r9d            # imm = 0x534
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x6b9cc
movq 0xa8(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x11dee0
movq %rax, 0x30(%rsp)
callq 0xb7a40
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x98(%rsp), %rdx
callq 0xb7aa0
movq %rax, 0x70(%rsp)
cmpq $0x0, 0x70(%rsp)
jne 0x6ba1e
movb $0x1, 0x97(%rsp)
testb $0x1, 0x97(%rsp)
jne 0x6bacd
movq 0xa0(%rsp), %rdi
movq 0x30(%rsp), %rcx
movq 0xa8(%rsp), %rax
movl 0x30(%rax), %r8d
leaq 0x4bfb22(%rip), %rsi    # 0x52b56e
leaq 0x4bfafd(%rip), %rdx    # 0x52b550
movb $0x0, %al
callq 0xe7cd0
movq 0x70(%rsp), %rdi
callq 0xaf3b0
movb %al, %dl
movl $0x1, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
setne %al
movzbl %al, %esi
andl $0x1, %esi
leaq 0x38(%rsp), %rdi
callq 0x6d3d0
movq 0xa8(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x11fcc0
cmpq $0x0, %rax
jbe 0x6bacb
movq 0xa8(%rsp), %rax
movq 0x38(%rax), %rsi
movq 0x98(%rsp), %rdx
leaq 0x38(%rsp), %rdi
callq 0x25b910
cmpl $0x0, %eax
je 0x6bacb
movb $0x1, 0x97(%rsp)
jmp 0x6bacd
testb $0x1, 0x97(%rsp)
jne 0x6bbf6
movq 0x70(%rsp), %rdi
callq 0xa9d00
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
addq $0x1, %rdi
movq 0x28(%rsp), %rsi
movq 0xa0(%rsp), %rcx
movl $0x1, %edx
callq 0x2e94c0
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
movq 0x28(%rsp), %rsi
addq $0x1, %rsi
callq 0x2ea350
movl $0x0, 0x78(%rsp)
movq 0xa8(%rsp), %rax
movl 0x30(%rax), %eax
movl %eax, 0x7c(%rsp)
movq 0x80(%rsp), %rdi
movq 0x28(%rsp), %rsi
addq $0x1, %rsi
movq 0x70(%rsp), %rdx
movl 0x78(%rsp), %ecx
movq 0xa8(%rsp), %rax
movl 0x30(%rax), %r9d
movq 0xa0(%rsp), %rax
xorl %r8d, %r8d
leaq 0x38(%rsp), %rbx
leaq 0x1934(%rip), %r11      # 0x6d4b0
leaq 0x70(%rsp), %r10
movq %rbx, (%rsp)
movq %r11, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x2b3bf0
movq 0x70(%rsp), %rdx
movl 0x78(%rsp), %ecx
movq 0x80(%rsp), %r8
movq 0x28(%rsp), %r10
addq $0x1, %r10
movl 0x7c(%rsp), %eax
leaq 0x4bea2c(%rip), %rdi    # 0x52a5ea
movl $0x55b, %esi            # imm = 0x55B
xorl %r9d, %r9d
xorl %r11d, %r11d
movq %r10, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x2eb730
movq 0x80(%rsp), %rdi
xorl %esi, %esi
callq 0x2e9940
movq 0x70(%rsp), %rdi
callq 0xae070
movq 0x88(%rsp), %rdi
callq 0xb7e50
movb 0x97(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0xb0, %rsp
popq %rbx
retq
nopw (%rax,%rax)