// File: /workspace/github_c_makefile_star2_O1/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 0xc44f9
testl %r10d, %r10d
je 0xc4555
leal (%r10,%r10), %ecx
testb %dil, %dil
je 0xc455a
negb %cl
movq $-0x1, %r9
shlq %cl, %r9
jmp 0xc4567
jbe 0xc4522
testl %r11d, %r11d
je 0xc45de
leal (%r11,%r11), %ecx
testb %dil, %dil
je 0xc45e3
negb %cl
movq $-0x1, %r9
shlq %cl, %r9
jmp 0xc45f0
jne 0xc46d6
cmpl $0x1f, %r10d
ja 0xc459f
testl %r10d, %r10d
je 0xc466d
leaq (%r10,%r10), %rcx
testb %dil, %dil
je 0xc4672
negb %cl
movq $-0x1, %r9
shlq %cl, %r9
jmp 0xc467f
xorl %r9d, %r9d
jmp 0xc4567
movq $-0x1, %r9
shlq %cl, %r9
notq %r9
movq (%rax), %rax
andq %r9, %rax
andq (%r8), %r9
cmpq %r9, %rax
jne 0xc4624
testq %rdx, %rdx
je 0xc46db
cmpl $0x20, %r10d
jae 0xc46db
movl %r10d, (%rdx)
movw $0x1, 0x4(%rdx)
movl $0x1, %eax
jmp 0xc46b0
cmpl $0x20, %r10d
jne 0xc46e5
cmpl $0x20, %r11d
jne 0xc46e5
movq (%rax), %rax
movq (%r8), %rcx
cmpq %rcx, %rax
jne 0xc464a
testq %rdx, %rdx
je 0xc46ef
movl $0x20, (%rdx)
movw $0x0, 0x4(%rdx)
xorl %eax, %eax
jmp 0xc46b0
xorl %r9d, %r9d
jmp 0xc45f0
movq $-0x1, %r9
shlq %cl, %r9
notq %r9
movq (%rax), %rax
andq %r9, %rax
andq (%r8), %r9
cmpq %r9, %rax
jne 0xc4624
testq %rdx, %rdx
je 0xc46e0
cmpl $0x20, %r11d
jae 0xc46e0
movl %r11d, (%rdx)
movw $0x100, 0x4(%rdx)       # imm = 0x100
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0xc46b0
leaq -0x2cf(%rip), %rcx      # 0xc435c
leaq -0x214(%rip), %r8       # 0xc441e
testb %dil, %dil
cmovneq %rcx, %r8
movzbl %sil, %edi
movq %rdx, %rsi
movq %rax, %rdx
movq %r9, %rcx
popq %rax
jmpq *%r8
leaq -0x2f5(%rip), %r8       # 0xc435c
leaq -0x23a(%rip), %r9       # 0xc441e
testb %dil, %dil
cmovneq %r8, %r9
movzbl %sil, %edi
movq %rdx, %rsi
movq %rax, %rdx
popq %rax
jmpq *%r9
xorl %r9d, %r9d
jmp 0xc467f
movq $-0x1, %r9
shlq %cl, %r9
notq %r9
movq (%rax), %rcx
andq %r9, %rcx
andq (%r8), %r9
cmpq %r9, %rcx
jne 0xc46b2
testq %rdx, %rdx
je 0xc46ea
movl %r10d, (%rdx)
movw $0x101, 0x4(%rdx)       # imm = 0x101
movq 0x10(%rax), %rax
xorl %ecx, %ecx
cmpq 0x10(%r8), %rax
seta %cl
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovael %ecx, %eax
popq %rcx
retq
leaq -0x35d(%rip), %rax      # 0xc435c
leaq -0x2a2(%rip), %r8       # 0xc441e
testb %dil, %dil
cmovneq %rax, %r8
movzbl %sil, %edi
movq %rdx, %rsi
movq %rcx, %rdx
jmp 0xc4643
callq 0x2c1c8
callq 0x2c2e5
callq 0x2c2ac
callq 0x2c201
callq 0x2c273
callq 0x2c23a