// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/sfx-suftaborder.c
// Function: gt_checksortedsuffixes
void gt_checksortedsuffixes(const char *filename,
                            int line,
                            const GtEncseq *encseq,
                            GtReadmode readmode,
                            const GtSuffixsortspace *suffixsortspace,
                            GtUword subbucketleft,
                            GtUword numberofsuffixes,
                            bool specialsareequal,
                            bool specialsareequalatdepth0,
                            GtUword depth)
{
  GtUword idx, pos1, pos2, maxlcp,
                totallength = gt_encseq_total_length(encseq);
  GtEncseqReader *esr1, *esr2;
  int cmp;

  gt_assert(!specialsareequal || specialsareequalatdepth0);
  esr1 = gt_encseq_create_reader_with_readmode(encseq, readmode, 0);
  esr2 = gt_encseq_create_reader_with_readmode(encseq, readmode, 0);
  gt_assert(numberofsuffixes > 0);
  pos1 = gt_suffixsortspace_get(suffixsortspace,subbucketleft,0);
  gt_assert(pos1 < totallength);
  for (idx = 1UL; idx < numberofsuffixes; idx++)
  {
    pos2 = gt_suffixsortspace_get(suffixsortspace,subbucketleft,idx);
    if (pos2 < totallength)
    {
      cmp = gt_encseq_check_comparetwosuffixes(encseq,
                                               readmode,
                                               &maxlcp,
                                               specialsareequal,
                                               specialsareequalatdepth0,
                                               depth,
                                               pos1,
                                               pos2,
                                               esr1,
                                               esr2);
      if (cmp > 0)
      {
        showcomparisonfailure(filename,
                              line,
                              "checksortedsuffixes",
                              encseq,
                              readmode,
                              suffixsortspace,
                              subbucketleft,
                              depth,
                              idx-1,
                              idx,
                              cmp,
                              maxlcp);
        exit(GT_EXIT_PROGRAMMING_ERROR);
      }
      gt_assert(depth == 0 || maxlcp <= depth);
    }
    pos1 = pos2;
  }
  gt_encseq_reader_delete(esr1);
  gt_encseq_reader_delete(esr2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, 0x8(%rsp)
movq %r8, %r14
movl %ecx, %ebp
movq %rdx, %r13
movl %esi, 0x14(%rsp)
movq %rdi, 0x40(%rsp)
movb 0x90(%rsp), %bl
movb 0x88(%rsp), %r15b
movq %rdx, %rdi
callq 0xec1d8
movq %rax, %r12
movl %r15d, %eax
xorb $0x1, %al
orb %bl, %al
je 0x206a47
movq %r13, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xed76d
movq %rax, 0x30(%rsp)
movq %r13, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xed76d
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x80(%rsp)
je 0x206a4c
movq %r13, 0x20(%rsp)
movl %ebp, 0x4(%rsp)
movq %r14, %rdi
movq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x206063
cmpq %r12, %rax
jae 0x206a51
cmpq $0x1, 0x80(%rsp)
je 0x2069dd
movq %rax, %rbp
movl %ebx, %eax
movq 0x98(%rsp), %rbx
movl $0x1, %r13d
movzbl %r15b, %ecx
movl %ecx, 0x1c(%rsp)
movzbl %al, %eax
movl %eax, 0x18(%rsp)
movq %rbp, %r15
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
callq 0x206063
movq %rax, %rbp
cmpq %r12, %rax
jae 0x2069d0
movq 0x20(%rsp), %rdi
movl 0x4(%rsp), %esi
leaq 0x38(%rsp), %rdx
movl 0x1c(%rsp), %ecx
movl 0x18(%rsp), %r8d
movq %rbx, %r9
pushq 0x28(%rsp)
pushq 0x38(%rsp)
pushq %rbp
pushq %r15
callq 0xf2285
addq $0x20, %rsp
testl %eax, %eax
jg 0x206a00
testq %rbx, %rbx
je 0x2069d0
cmpq %rbx, 0x38(%rsp)
ja 0x206a42
incq %r13
cmpq %r13, 0x80(%rsp)
jne 0x206977
movq 0x30(%rsp), %rdi
callq 0xed7bf
movq 0x28(%rsp), %rdi
callq 0xed7bf
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x1(%r13), %r10
leaq 0x1be421(%rip), %rdx    # 0x3c4e2c
movq 0x40(%rsp), %rdi
movl 0x14(%rsp), %esi
movq 0x20(%rsp), %rcx
movl 0x4(%rsp), %r8d
movq %r14, %r9
pushq 0x38(%rsp)
pushq %rax
pushq %r13
pushq %r10
pushq %rbx
pushq 0x30(%rsp)
callq 0x8036d
addq $0x30, %rsp
movl $0x2, %edi
callq 0x17940
callq 0x80582
callq 0x80510
callq 0x805bb
callq 0x80549
nop