// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/core/encseq.c
// Function: gt_encseq_compare_pairof_twobitencodings
int gt_encseq_compare_pairof_twobitencodings(bool fwd,
                                             bool complement,
                                             GtCommonunits *commonunits,
                                             const GtEndofTwobitencoding *ptbe1,
                                             const GtEndofTwobitencoding *ptbe2)
{
  GtTwobitencoding mask;

  if (ptbe1->unitsnotspecial < ptbe2->unitsnotspecial)
      /* GT_ISSPECIAL(seq1[ptbe1.unitsnotspecial]) &&
         GT_ISNOTSPECIAL(seq2[ptbe2.unitsnotspecial]) */ {
    GtTwobitencoding tbe1, tbe2;

    mask = GT_ENCSEQ_MASKEND(fwd, ptbe1->unitsnotspecial);
    tbe1 = ptbe1->tbe & mask;
    tbe2 = ptbe2->tbe & mask;
    if (tbe1 == tbe2) {
      gt_assert(ptbe1->unitsnotspecial < (unsigned int) GT_UNITSIN2BITENC &&
                commonunits != NULL);
      commonunits->common = ptbe1->unitsnotspecial;
      commonunits->leftspecial = true;
      commonunits->rightspecial = false;
      return 1;
    }
    return gt_encseq_compare_pairof_different_twobitencodings(fwd, complement,
                                                              commonunits,
                                                              tbe1, tbe2);
  }
  if (ptbe1->unitsnotspecial > ptbe2->unitsnotspecial)
     /* GT_ISSPECIAL(seq2[ptbe2->unitsnotspecial]) &&
        GT_ISNOTSPECIAL(seq1[ptbe2NOT->unitsnotspecial]) */ {
    GtTwobitencoding tbe1, tbe2;

    mask = GT_ENCSEQ_MASKEND(fwd, ptbe2->unitsnotspecial);
    tbe1 = ptbe1->tbe & mask;
    tbe2 = ptbe2->tbe & mask;
    if (tbe1 == tbe2) {
      gt_assert(ptbe2->unitsnotspecial < (unsigned int) GT_UNITSIN2BITENC &&
                commonunits != NULL);
      commonunits->common = ptbe2->unitsnotspecial;
      commonunits->leftspecial = false;
      commonunits->rightspecial = true;
      return -1;
    }
    return gt_encseq_compare_pairof_different_twobitencodings(fwd, complement,
                                                              commonunits,
                                                              tbe1, tbe2);
  }
  gt_assert(ptbe1->unitsnotspecial == ptbe2->unitsnotspecial);
  if (ptbe1->unitsnotspecial < (unsigned int) GT_UNITSIN2BITENC) {
    GtTwobitencoding tbe1, tbe2;

    mask = GT_ENCSEQ_MASKEND(fwd, ptbe1->unitsnotspecial);
    tbe1 = ptbe1->tbe & mask;
    tbe2 = ptbe2->tbe & mask;
    if (tbe1 == tbe2) {
      gt_assert(commonunits != NULL);
      commonunits->common = ptbe1->unitsnotspecial;
      commonunits->leftspecial = commonunits->rightspecial = true;
      return (ptbe1->referstartpos < ptbe2->referstartpos)
                ? -1
                : ((ptbe1->referstartpos > ptbe2->referstartpos) ? 1 : 0);
    }
    return gt_encseq_compare_pairof_different_twobitencodings(fwd, complement,
                                                              commonunits,
                                                              tbe1, tbe2);
  }
  gt_assert(ptbe1->unitsnotspecial == (unsigned int) GT_UNITSIN2BITENC &&
            ptbe2->unitsnotspecial == (unsigned int) GT_UNITSIN2BITENC);
  if (ptbe1->tbe != ptbe2->tbe) {
    return gt_encseq_compare_pairof_different_twobitencodings(fwd, complement,
                                                              commonunits,
                                                              ptbe1->tbe,
                                                              ptbe2->tbe);
  }
  gt_assert(commonunits != NULL);
  commonunits->common = (unsigned int) GT_UNITSIN2BITENC;
  commonunits->leftspecial = commonunits->rightspecial = false;
  return 0;
}

// Assembly:
pushq %rax
movq %rcx, %rax
movl 0x8(%rcx), %r10d
movl 0x8(%r8), %r11d
cmpl %r11d, %r10d
jae 0xa8a8a
testl %r10d, %r10d
je 0xa8ada
leal (%r10,%r10), %ecx
testb %dil, %dil
je 0xa8adf
negb %cl
pushq $-0x1
popq %r9
shlq %cl, %r9
jmp 0xa8ae9
jbe 0xa8ab0
testl %r11d, %r11d
je 0xa8b48
leal (%r11,%r11), %ecx
testb %dil, %dil
je 0xa8b4d
negb %cl
pushq $-0x1
popq %r9
shlq %cl, %r9
jmp 0xa8b57
cmpl $0x1f, %r10d
ja 0xa8b1b
testl %r10d, %r10d
je 0xa8bcf
leaq (%r10,%r10), %rcx
testb %dil, %dil
je 0xa8bd4
negb %cl
pushq $-0x1
popq %r9
shlq %cl, %r9
jmp 0xa8bde
xorl %r9d, %r9d
jmp 0xa8ae9
pushq $-0x1
popq %r9
shlq %cl, %r9
notq %r9
movq (%rax), %rax
andq %r9, %rax
andq (%r8), %r9
cmpq %r9, %rax
jne 0xa8b86
testq %rdx, %rdx
je 0xa8c3a
cmpl $0x20, %r10d
jae 0xa8c3a
movl %r10d, (%rdx)
movw $0x1, 0x4(%rdx)
pushq $0x1
jmp 0xa8b83
cmpl $0x20, %r11d
jne 0xa8c6b
movq (%rax), %rax
movq (%r8), %rcx
cmpq %rcx, %rax
jne 0xa8bac
testq %rdx, %rdx
je 0xa8cf8
movl $0x20, (%rdx)
andw $0x0, 0x4(%rdx)
xorl %eax, %eax
jmp 0xa8b84
xorl %r9d, %r9d
jmp 0xa8b57
pushq $-0x1
popq %r9
shlq %cl, %r9
notq %r9
movq (%rax), %rax
andq %r9, %rax
andq (%r8), %r9
cmpq %r9, %rax
jne 0xa8b86
testq %rdx, %rdx
je 0xa8c9c
cmpl $0x20, %r11d
jae 0xa8c9c
movl %r11d, (%rdx)
movw $0x100, 0x4(%rdx)       # imm = 0x100
pushq $-0x1
popq %rax
popq %rcx
retq
leaq -0x312(%rip), %rcx      # 0xa887b
leaq -0x23e(%rip), %r8       # 0xa8956
testb %dil, %dil
cmovneq %rcx, %r8
movzbl %sil, %edi
movq %rdx, %rsi
movq %rax, %rdx
movq %r9, %rcx
popq %rax
jmpq *%r8
leaq -0x338(%rip), %r8       # 0xa887b
leaq -0x264(%rip), %r9       # 0xa8956
testb %dil, %dil
cmovneq %r8, %r9
movzbl %sil, %edi
movq %rdx, %rsi
movq %rax, %rdx
popq %rax
jmpq *%r9
xorl %r9d, %r9d
jmp 0xa8bde
pushq $-0x1
popq %r9
shlq %cl, %r9
notq %r9
movq (%rax), %rcx
andq %r9, %rcx
andq (%r8), %r9
cmpq %r9, %rcx
jne 0xa8c16
testq %rdx, %rdx
je 0xa8cca
movl %r10d, (%rdx)
movw $0x101, 0x4(%rdx)       # imm = 0x101
movq 0x10(%rax), %rax
xorl %ecx, %ecx
cmpq 0x10(%r8), %rax
seta %cl
pushq $-0x1
popq %rax
cmovael %ecx, %eax
jmp 0xa8b84
leaq -0x3a2(%rip), %rax      # 0xa887b
leaq -0x2ce(%rip), %r8       # 0xa8956
testb %dil, %dil
cmovneq %rax, %r8
movzbl %sil, %edi
movq %rdx, %rsi
movq %rcx, %rdx
jmp 0xa8ba5
movq 0x85377(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x2141b(%rip), %rsi     # 0xca066
leaq 0x440a3(%rip), %rdx     # 0xeccf5
leaq 0x440ed(%rip), %rcx     # 0xecd46
leaq 0x42f3a(%rip), %r8      # 0xebb9a
movl $0x194d, %r9d           # imm = 0x194D
jmp 0xa8d24
movq 0x85346(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x213ea(%rip), %rsi     # 0xca066
leaq 0x4413d(%rip), %rdx     # 0xecdc0
leaq 0x440bc(%rip), %rcx     # 0xecd46
leaq 0x42f09(%rip), %r8      # 0xebb9a
movl $0x197f, %r9d           # imm = 0x197F
jmp 0xa8d24
movq 0x85315(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x213b9(%rip), %rsi     # 0xca066
leaq 0x440bb(%rip), %rdx     # 0xecd6f
leaq 0x4408b(%rip), %rcx     # 0xecd46
leaq 0x42ed8(%rip), %r8      # 0xebb9a
movl $0x1961, %r9d           # imm = 0x1961
jmp 0xa8d24
movq 0x852e7(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x2138b(%rip), %rsi     # 0xca066
leaq 0x44050(%rip), %rdx     # 0xecd32
leaq 0x4405d(%rip), %rcx     # 0xecd46
leaq 0x42eaa(%rip), %r8      # 0xebb9a
movl $0x1973, %r9d           # imm = 0x1973
jmp 0xa8d24
movq 0x852b9(%rip), %rax     # 0x12dfb8
movq (%rax), %rdi
leaq 0x2135d(%rip), %rsi     # 0xca066
leaq 0x44022(%rip), %rdx     # 0xecd32
leaq 0x4402f(%rip), %rcx     # 0xecd46
leaq 0x42e7c(%rip), %r8      # 0xebb9a
movl $0x1986, %r9d           # imm = 0x1986
xorl %eax, %eax
callq 0xb8c0
callq 0xb300