// File: /workspace/github_c_makefile_star2_O3/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 0xe7b9c
movq %rax, %r12
movl %r15d, %eax
xorb $0x1, %al
orb %bl, %al
je 0x1fd36d
movq %r13, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xe91b2
movq %rax, 0x30(%rsp)
movq %r13, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0xe91b2
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x80(%rsp)
je 0x1fd372
movq %r13, 0x20(%rsp)
movl %ebp, 0x4(%rsp)
movq %r14, %rdi
movq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x1fc965
cmpq %r12, %rax
jae 0x1fd377
cmpq $0x1, 0x80(%rsp)
je 0x1fd303
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 0x1fc965
movq %rax, %rbp
cmpq %r12, %rax
jae 0x1fd2f6
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 0xedc49
addq $0x20, %rsp
testl %eax, %eax
jg 0x1fd326
testq %rbx, %rbx
je 0x1fd2f6
cmpq %rbx, 0x38(%rsp)
ja 0x1fd368
incq %r13
cmpq %r13, 0x80(%rsp)
jne 0x1fd29d
movq 0x30(%rsp), %rdi
callq 0xe9204
movq 0x28(%rsp), %rdi
callq 0xe9204
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x1(%r13), %r10
leaq 0x1be48b(%rip), %rdx    # 0x3bb7bc
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 0x7e563
addq $0x30, %rsp
movl $0x2, %edi
callq 0x17940
callq 0x7e778
callq 0x7e706
callq 0x7e7b1
callq 0x7e73f