// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/ltr/ltr_classify_stream.c
// Function: ltr_candidates_compatible
static bool ltr_candidates_compatible(GtGenomeNode *candidate1,
                                      GtGenomeNode *candidate2,
                                      GtHashmap *features,
                                      GT_UNUSED GtError *err)
{
  GtGenomeNode *candidate;
  GtFeatureNode *curnode1,
                *curnode2;
  GtFeatureNodeIterator *fni1,
                        *fni2;
  GtHashmap *fnmap;
  const char *clid1,
             *clid2,
             *fnt;
  bool compatible = false,
       seen_a = false,
       first_ltr = true;
  GtUword clnum1,
                clnum2;

  gt_error_check(err);
  gt_assert(candidate1 && candidate2);

  fni1 = gt_feature_node_iterator_new((GtFeatureNode*) candidate1);
  curnode1 = gt_feature_node_iterator_next(fni1);
  fni2 = gt_feature_node_iterator_new((GtFeatureNode*) candidate2);
  curnode2 = gt_feature_node_iterator_next(fni2);

  if (gt_feature_node_number_of_children(curnode1) <=
      gt_feature_node_number_of_children(curnode2)) {
    gt_feature_node_iterator_delete(fni2);
    candidate = candidate2;
  } else {
    gt_feature_node_iterator_delete(fni1);
    fni1 = fni2;
    candidate = candidate1;
  }
  fnmap = (GtHashmap*) gt_genome_node_get_user_data(candidate, "fnmap");

  while ((curnode1 = gt_feature_node_iterator_next(fni1)) != NULL) {
    fnt = gt_feature_node_get_type(curnode1);
    if ((strcmp(fnt, gt_ft_LTR_retrotransposon) == 0))
      continue;
    else if (strcmp(fnt, gt_ft_long_terminal_repeat) == 0) {
      if (first_ltr) {
        fnt = "lLTR";
        first_ltr = false;
      } else
        fnt = "rLTR";
    } else if (strcmp(fnt, gt_ft_protein_match) == 0) {
      fnt = gt_feature_node_get_attribute(curnode1, "name");
    }
    if (!fnt)
      continue;
    if (features != NULL)
      if (gt_hashmap_get(features, fnt) == NULL)
        continue;
    curnode2 = (GtFeatureNode*) gt_hashmap_get(fnmap, fnt);
    if (curnode2 != NULL) {
      clid1 = gt_feature_node_get_attribute(curnode1, "clid");
      if (clid1 != NULL)
        (void) sscanf(clid1, ""GT_WU"", &clnum1);
      else
        clnum1 = GT_UNDEF_UWORD;
      clid2 = gt_feature_node_get_attribute(curnode2, "clid");
      if (clid2 != NULL)
        (void) sscanf(clid2, ""GT_WU"", &clnum2);
      else
        clnum2 = GT_UNDEF_UWORD;
      if (clnum1 == clnum2) {
        if ((clnum1 != GT_UNDEF_UWORD) && (clnum2 != GT_UNDEF_UWORD))
          seen_a = true;
        compatible = true;
      }
      else if ((clnum1 == GT_UNDEF_UWORD && clnum2 != GT_UNDEF_UWORD) ||
               (clnum1 != GT_UNDEF_UWORD && clnum2 == GT_UNDEF_UWORD))
        compatible = true;
      else if (clnum1 != clnum2) {
        compatible = false;
        break;
      }
    }
  }
  gt_feature_node_iterator_delete(fni1);

  return (compatible && seen_a);
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movq %rdx, 0x80(%rsp)
movq %rcx, 0x78(%rsp)
movb $0x0, 0x2f(%rsp)
movb $0x0, 0x2e(%rsp)
movb $0x1, 0x2d(%rsp)
cmpq $0x0, 0x78(%rsp)
je 0x2feeb3
movq 0x78(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x2fee7b
jmp 0x2feeb3
movq 0x33d11e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x217187(%rip), %rsi    # 0x516013
leaq 0x21732c(%rip), %rdx    # 0x5161bf
leaq 0x293721(%rip), %rcx    # 0x5925bb
leaq 0x29366f(%rip), %r8     # 0x592510
movl $0x44, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2feeb5
jmp 0x2feeb7
cmpq $0x0, 0x90(%rsp)
je 0x2feecd
cmpq $0x0, 0x88(%rsp)
jne 0x2fef05
movq 0x33d0cc(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x217135(%rip), %rsi    # 0x516013
leaq 0x2936f0(%rip), %rdx    # 0x5925d5
leaq 0x2936cf(%rip), %rcx    # 0x5925bb
leaq 0x29361d(%rip), %r8     # 0x592510
movl $0x45, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2fef07
movq 0x90(%rsp), %rdi
callq 0x170b00
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0x170e30
movq %rax, 0x68(%rsp)
movq 0x88(%rsp), %rdi
callq 0x170b00
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
callq 0x170e30
movq %rax, 0x60(%rsp)
movq 0x68(%rsp), %rdi
callq 0x16fb00
movq %rax, 0x10(%rsp)
movq 0x60(%rsp), %rdi
callq 0x16fb00
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
ja 0x2fef88
movq 0x50(%rsp), %rdi
callq 0x170f50
movq 0x88(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x2fefa9
movq 0x58(%rsp), %rdi
callq 0x170f50
movq 0x50(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rdi
leaq 0x2935c9(%rip), %rsi    # 0x59257e
callq 0x1728c0
movq %rax, 0x48(%rsp)
movq 0x58(%rsp), %rdi
callq 0x170e30
movq %rax, 0x68(%rsp)
cmpq $0x0, %rax
je 0x2ff1b3
movq 0x68(%rsp), %rdi
callq 0x16d430
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x268549(%rip), %rsi    # 0x56753c
callq 0x19980
cmpl $0x0, %eax
jne 0x2fefff
jmp 0x2fefbf
movq 0x30(%rsp), %rdi
leaq 0x26aeab(%rip), %rsi    # 0x569eb6
callq 0x19980
cmpl $0x0, %eax
jne 0x2ff03d
testb $0x1, 0x2d(%rsp)
je 0x2ff02f
leaq 0x293551(%rip), %rax    # 0x592574
movq %rax, 0x30(%rsp)
movb $0x0, 0x2d(%rsp)
jmp 0x2ff03b
leaq 0x293543(%rip), %rax    # 0x592579
movq %rax, 0x30(%rsp)
jmp 0x2ff06b
movq 0x30(%rsp), %rdi
leaq 0x2541e9(%rip), %rsi    # 0x553232
callq 0x19980
cmpl $0x0, %eax
jne 0x2ff069
movq 0x68(%rsp), %rdi
leaq 0x255d9f(%rip), %rsi    # 0x554dfe
callq 0x16c040
movq %rax, 0x30(%rsp)
jmp 0x2ff06b
jmp 0x2ff06d
cmpq $0x0, 0x30(%rsp)
jne 0x2ff07a
jmp 0x2fefbf
cmpq $0x0, 0x80(%rsp)
je 0x2ff0a4
movq 0x80(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0xe0f20
cmpq $0x0, %rax
jne 0x2ff0a2
jmp 0x2fefbf
jmp 0x2ff0a4
movq 0x48(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0xe0f20
movq %rax, 0x60(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0x2ff1ae
movq 0x68(%rsp), %rdi
leaq 0x29351e(%rip), %rsi    # 0x5925ee
callq 0x16c040
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0x2ff0fc
movq 0x40(%rsp), %rdi
leaq 0x28ff1b(%rip), %rsi    # 0x58f009
leaq 0x20(%rsp), %rdx
movb $0x0, %al
callq 0x19770
jmp 0x2ff105
movq $-0x1, 0x20(%rsp)
movq 0x60(%rsp), %rdi
leaq 0x2934dd(%rip), %rsi    # 0x5925ee
callq 0x16c040
movq %rax, 0x38(%rsp)
cmpq $0x0, 0x38(%rsp)
je 0x2ff13d
movq 0x38(%rsp), %rdi
leaq 0x28feda(%rip), %rsi    # 0x58f009
leaq 0x18(%rsp), %rdx
movb $0x0, %al
callq 0x19770
jmp 0x2ff146
movq $-0x1, 0x18(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
jne 0x2ff16e
cmpq $-0x1, 0x20(%rsp)
je 0x2ff167
cmpq $-0x1, 0x18(%rsp)
je 0x2ff167
movb $0x1, 0x2e(%rsp)
movb $0x1, 0x2f(%rsp)
jmp 0x2ff1ac
cmpq $-0x1, 0x20(%rsp)
jne 0x2ff17e
cmpq $-0x1, 0x18(%rsp)
jne 0x2ff18e
cmpq $-0x1, 0x20(%rsp)
je 0x2ff195
cmpq $-0x1, 0x18(%rsp)
jne 0x2ff195
movb $0x1, 0x2f(%rsp)
jmp 0x2ff1aa
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x2ff1a8
movb $0x0, 0x2f(%rsp)
jmp 0x2ff1b3
jmp 0x2ff1aa
jmp 0x2ff1ac
jmp 0x2ff1ae
jmp 0x2fefbf
movq 0x58(%rsp), %rdi
callq 0x170f50
xorl %eax, %eax
testb $0x1, 0x2f(%rsp)
movb %al, 0xf(%rsp)
je 0x2ff1d2
movb 0x2e(%rsp), %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
andb $0x1, %al
addq $0x98, %rsp
retq