// File: /workspace/github_c_makefile_star2_O2/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, %r15d
movq %rdx, %r13
movl %esi, 0x14(%rsp)
movq %rdi, 0x40(%rsp)
movb 0x90(%rsp), %bl
movb 0x88(%rsp), %bpl
movq %rdx, %rdi
callq 0x7055e
movq %rax, %r12
movl %ebp, %eax
xorb $0x1, %al
orb %bl, %al
je 0x1b0912
movq %r13, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x72260
movq %rax, 0x30(%rsp)
movq %r13, %rdi
movl %r15d, %esi
xorl %edx, %edx
callq 0x72260
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x80(%rsp)
je 0x1b0940
movl %ebx, %ebp
movq %r13, 0x20(%rsp)
movl %r15d, 0x4(%rsp)
movq %r14, %rdi
movq 0x8(%rsp), %rsi
xorl %edx, %edx
callq 0x1af8b2
cmpq %r12, %rax
jae 0x1b096e
movq %rax, %r15
movq 0x98(%rsp), %rbx
pushq $0x1
popq %r13
movzbl 0x88(%rsp), %eax
movl %eax, 0x1c(%rsp)
movzbl %bpl, %eax
movl %eax, 0x18(%rsp)
cmpq %r13, 0x80(%rsp)
je 0x1b0877
movq %r14, %rdi
movq 0x8(%rsp), %rsi
movq %r13, %rdx
callq 0x1af8b2
movq %rax, %rbp
cmpq %r12, %rax
jae 0x1b086f
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 0x77ebd
addq $0x20, %rsp
testl %eax, %eax
jg 0x1b089a
testq %rbx, %rbx
je 0x1b086f
cmpq %rbx, 0x38(%rsp)
ja 0x1b08da
incq %r13
movq %rbp, %r15
jmp 0x1b080f
movq 0x30(%rsp), %rdi
callq 0x722ae
movq 0x28(%rsp), %rdi
callq 0x722ae
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x1(%r13), %r10
leaq 0x1ab377(%rip), %rdx    # 0x35bc1c
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 0x1b0587
addq $0x30, %rsp
pushq $0x2
popq %rdi
callq 0x178f0
movq 0x287687(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x134728(%rip), %rsi    # 0x2e5013
leaq 0x1ab33e(%rip), %rdx    # 0x35bc30
leaq 0x1ab320(%rip), %rcx    # 0x35bc19
leaq 0x1ab2be(%rip), %r8     # 0x35bbbe
movl $0xb0, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x28764f(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1346f0(%rip), %rsi    # 0x2e5013
leaq 0x1ab2c1(%rip), %rdx    # 0x35bbeb
leaq 0x1ab2e8(%rip), %rcx    # 0x35bc19
leaq 0x1ab286(%rip), %r8     # 0x35bbbe
movl $0x8b, %r9d
jmp 0x1b0906
movq 0x287621(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1346c2(%rip), %rsi    # 0x2e5013
leaq 0x194a52(%rip), %rdx    # 0x3453aa
leaq 0x1ab2ba(%rip), %rcx    # 0x35bc19
leaq 0x1ab258(%rip), %r8     # 0x35bbbe
movl $0x8e, %r9d
jmp 0x1b0906
movq 0x2875f3(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x134694(%rip), %rsi    # 0x2e5013
leaq 0x15731c(%rip), %rdx    # 0x307ca2
leaq 0x1ab28c(%rip), %rcx    # 0x35bc19
leaq 0x1ab22a(%rip), %r8     # 0x35bbbe
movl $0x90, %r9d
jmp 0x1b0906
nop