// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/encseq.c
// Function: gt_encseq_check_comparetwosuffixes
int gt_encseq_check_comparetwosuffixes(const GtEncseq *encseq,
                                       GtReadmode readmode,
                                       GtUword *maxlcp,
                                       bool specialsareequal,
                                       bool specialsareequalatdepth0,
                                       GtUword maxdepth,
                                       GtUword start1,
                                       GtUword start2,
                                       GtEncseqReader *esr1,
                                       GtEncseqReader *esr2)
{
  GtUchar cc1, cc2;
  GtUword pos1, pos2, end1, end2;
  int retval;

  end1 = end2 = encseq->logicaltotallength;
  if (maxdepth > 0) {
    if (end1 > start1 + maxdepth)
      end1 = start1 + maxdepth;
    if (end2 > start2 + maxdepth)
      end2 = start2 + maxdepth;
  }
  if (esr1 != NULL && esr2 != NULL) {
    gt_encseq_reader_reinit_with_readmode(esr1, encseq, readmode, start1);
    gt_encseq_reader_reinit_with_readmode(esr2, encseq, readmode, start2);
  }
  else
    gt_assert(esr1 == NULL && esr2 == NULL);
  for (pos1=start1, pos2=start2; /* Nothing */; pos1++, pos2++) {
    if (pos1 >= end1 || pos2 >= end2) {
      *maxlcp = pos1 - start1;
      retval = 0;
      break;
    }
    if (esr1 != NULL) {
      cc1 = gt_encseq_reader_next_encoded_char(esr1);
      GT_CHECKENCCHAR(cc1, encseq, pos1, readmode);
    }
    else {
      cc1 = gt_encseq_get_encoded_char(encseq, pos1, readmode);
    }
    if (esr2 != NULL) {
      cc2 = gt_encseq_reader_next_encoded_char(esr2);
      GT_CHECKENCCHAR(cc2, encseq, pos2, readmode);
    }
    else {
      cc2 = gt_encseq_get_encoded_char(encseq, pos2, readmode);
    }
    if (GT_ISSPECIAL(cc1)) {
      if (GT_ISSPECIAL(cc2)) {
        if (specialsareequal || (pos1 == start1 && specialsareequalatdepth0)) {
          *maxlcp = pos1 - start1 + 1;
          retval = 0;
          break;
        }
        if (pos1 < pos2) {
          *maxlcp = pos1  - start1;
          retval = -1; /* a < b */
          break;
        }
        if (pos1 > pos2) {
          *maxlcp = pos1 - start1;
          retval = 1; /* a > b */
          break;
        }
        *maxlcp = pos1 - start1 + 1;
        retval = 0; /* a = b */
        break;
      }
      *maxlcp = pos1 - start1;
      retval = 1; /* a > b */
      break;
    }
    else {
      if (GT_ISSPECIAL(cc2)) {
        *maxlcp = pos1 - start1;
        retval = -1; /* a < b */
        break;
      }
      if (cc1 < cc2) {
        *maxlcp = pos1 - start1;
        retval = -1; /* a < b */
        break;
      }
      if (cc1 > cc2) {
        *maxlcp = pos1 - start1;
        retval = 1; /* a > b */
        break;
      }
    }
  }
  return retval;
}

// Assembly:
subq $0x58, %rsp
movb %r8b, %al
movq 0x78(%rsp), %r8
movq 0x70(%rsp), %r8
movq 0x68(%rsp), %r8
movq 0x60(%rsp), %r8
movq %rdi, 0x50(%rsp)
movl %esi, 0x4c(%rsp)
movq %rdx, 0x40(%rsp)
andb $0x1, %cl
movb %cl, 0x3f(%rsp)
andb $0x1, %al
movb %al, 0x3e(%rsp)
movq %r9, 0x30(%rsp)
movq 0x50(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x8(%rsp)
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x30(%rsp)
jbe 0x1201be
movq 0x10(%rsp), %rax
movq 0x60(%rsp), %rcx
addq 0x30(%rsp), %rcx
cmpq %rcx, %rax
jbe 0x120199
movq 0x60(%rsp), %rax
addq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq 0x68(%rsp), %rcx
addq 0x30(%rsp), %rcx
cmpq %rcx, %rax
jbe 0x1201bc
movq 0x68(%rsp), %rax
addq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x1201be
cmpq $0x0, 0x70(%rsp)
je 0x120200
cmpq $0x0, 0x78(%rsp)
je 0x120200
movq 0x70(%rsp), %rdi
movq 0x50(%rsp), %rsi
movl 0x4c(%rsp), %edx
movq 0x60(%rsp), %rcx
callq 0x115f90
movq 0x78(%rsp), %rdi
movq 0x50(%rsp), %rsi
movl 0x4c(%rsp), %edx
movq 0x68(%rsp), %rcx
callq 0x115f90
jmp 0x12024e
jmp 0x120202
cmpq $0x0, 0x70(%rsp)
jne 0x120212
cmpq $0x0, 0x78(%rsp)
je 0x12024a
movq 0x93dbf(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x3de43(%rip), %rsi     # 0x15e066
leaq 0x6693c(%rip), %rdx     # 0x186b66
leaq 0x66952(%rip), %rcx     # 0x186b83
leaq 0x65426(%rip), %r8      # 0x18565e
movl $0x1cf0, %r9d           # imm = 0x1CF0
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x12024c
jmp 0x12024e
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x10(%rsp), %rax
jae 0x12027a
movq 0x18(%rsp), %rax
cmpq 0x8(%rsp), %rax
jb 0x120299
movq 0x20(%rsp), %rcx
subq 0x60(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x4(%rsp)
jmp 0x12048d
cmpq $0x0, 0x70(%rsp)
je 0x1202b1
movq 0x70(%rsp), %rdi
callq 0x115010
movb %al, 0x2f(%rsp)
jmp 0x1202c8
movq 0x50(%rsp), %rdi
movq 0x20(%rsp), %rsi
movl 0x4c(%rsp), %edx
callq 0x113f80
movb %al, 0x2f(%rsp)
cmpq $0x0, 0x78(%rsp)
je 0x1202e0
movq 0x78(%rsp), %rdi
callq 0x115010
movb %al, 0x2e(%rsp)
jmp 0x1202f7
movq 0x50(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl 0x4c(%rsp), %edx
callq 0x113f80
movb %al, 0x2e(%rsp)
movzbl 0x2f(%rsp), %eax
cmpl $0xfe, %eax
jl 0x1203ec
movzbl 0x2e(%rsp), %eax
cmpl $0xfe, %eax
jl 0x1203cd
testb $0x1, 0x3f(%rsp)
jne 0x120331
movq 0x20(%rsp), %rax
cmpq 0x60(%rsp), %rax
jne 0x120354
testb $0x1, 0x3e(%rsp)
je 0x120354
movq 0x20(%rsp), %rcx
subq 0x60(%rsp), %rcx
addq $0x1, %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x4(%rsp)
jmp 0x12048d
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x12037f
movq 0x20(%rsp), %rcx
subq 0x60(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movl $0xffffffff, 0x4(%rsp)  # imm = 0xFFFFFFFF
jmp 0x12048d
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
jbe 0x1203aa
movq 0x20(%rsp), %rcx
subq 0x60(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movl $0x1, 0x4(%rsp)
jmp 0x12048d
movq 0x20(%rsp), %rcx
subq 0x60(%rsp), %rcx
addq $0x1, %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movl $0x0, 0x4(%rsp)
jmp 0x12048d
movq 0x20(%rsp), %rcx
subq 0x60(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movl $0x1, 0x4(%rsp)
jmp 0x12048d
movzbl 0x2e(%rsp), %eax
cmpl $0xfe, %eax
jl 0x120414
movq 0x20(%rsp), %rcx
subq 0x60(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movl $0xffffffff, 0x4(%rsp)  # imm = 0xFFFFFFFF
jmp 0x12048d
movzbl 0x2f(%rsp), %eax
movzbl 0x2e(%rsp), %ecx
cmpl %ecx, %eax
jge 0x12043e
movq 0x20(%rsp), %rcx
subq 0x60(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movl $0xffffffff, 0x4(%rsp)  # imm = 0xFFFFFFFF
jmp 0x12048d
movzbl 0x2f(%rsp), %eax
movzbl 0x2e(%rsp), %ecx
cmpl %ecx, %eax
jle 0x120468
movq 0x20(%rsp), %rcx
subq 0x60(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, (%rax)
movl $0x1, 0x4(%rsp)
jmp 0x12048d
jmp 0x12046a
jmp 0x12046c
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x120262
movl 0x4(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)