// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/ltr/ltr_classify_stream.c
// Function: annotate_nodes
static int annotate_nodes(GtArray *candidates, GtArray *groups,
                          const char *famprefix, GtError *err)
{
  GtArray *group_member;
  GtBittab *group;
  GtFeatureNode *curnode;
  GtFeatureNodeIterator *fni = NULL;
  GtGenomeNode *gn;
  int had_err = 0;
  GtUword i, j, index, famno = 0;

  gt_assert(candidates && groups);
  gt_error_check(err);

  for (i = 0; i < gt_array_size(groups); i++) {
    group = *(GtBittab**) gt_array_get(groups, i);
    group_member = gt_array_new(sizeof(GtUword));
    gt_bittab_get_all_bitnums(group, group_member);
    if (gt_array_size(group_member) < 2UL) {
      gt_array_delete(group_member);
      continue;
    }
    for (j = 0; j < gt_array_size(group_member); j++) {
      index = *(GtUword*) gt_array_get(group_member, j);
      gn = *(GtGenomeNode**) gt_array_get(candidates, index);
      fni = gt_feature_node_iterator_new((GtFeatureNode*) gn);
      curnode = gt_feature_node_iterator_next(fni);
      if (strcmp(gt_feature_node_get_type(curnode), gt_ft_repeat_region) == 0) {
        char fam[BUFSIZ];
        if (famprefix != NULL)
          (void) snprintf(fam, BUFSIZ, "%s"GT_WU"", famprefix, famno);
        else
          (void) snprintf(fam, BUFSIZ, "ltrfam_"GT_WU"", famno);
        gt_feature_node_set_attribute(curnode, "ltrfam", fam);
      } else {
        gt_feature_node_iterator_delete(fni);
        gt_error_set(err, "repeat_region is not root node");
        had_err = -1;
        break;
      }
      gt_feature_node_iterator_delete(fni);
    }
    gt_array_delete(group_member);
    if (had_err)
      break;
    famno++;
  }
  return had_err;
}

// Assembly:
subq $0x2088, %rsp           # imm = 0x2088
movq %rdi, 0x2080(%rsp)
movq %rsi, 0x2078(%rsp)
movq %rdx, 0x2070(%rsp)
movq %rcx, 0x2068(%rsp)
movq $0x0, 0x2048(%rsp)
movl $0x0, 0x203c(%rsp)
movq $0x0, 0x2018(%rsp)
cmpq $0x0, 0x2080(%rsp)
je 0x2fea70
cmpq $0x0, 0x2078(%rsp)
jne 0x2feaa8
movq 0x33d529(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x217592(%rip), %rsi    # 0x516013
leaq 0x293b86(%rip), %rdx    # 0x59260e
leaq 0x293d0d(%rip), %rcx    # 0x59279c
leaq 0x293a7a(%rip), %r8     # 0x592510
movl $0xd6, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2feaaa
jmp 0x2feaac
cmpq $0x0, 0x2068(%rsp)
je 0x2feb02
movq 0x2068(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x2feaca
jmp 0x2feb02
movq 0x33d4cf(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x217538(%rip), %rsi    # 0x516013
leaq 0x2176dd(%rip), %rdx    # 0x5161bf
leaq 0x293cb3(%rip), %rcx    # 0x59279c
leaq 0x293a20(%rip), %r8     # 0x592510
movl $0xd7, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2feb04
movq $0x0, 0x2030(%rsp)
movq 0x2030(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x2078(%rsp), %rdi
callq 0x81370
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x2fed73
movq 0x2078(%rsp), %rdi
movq 0x2030(%rsp), %rsi
callq 0x80b60
movq (%rax), %rax
movq %rax, 0x2058(%rsp)
movl $0x8, %edi
callq 0x80990
movq %rax, 0x2060(%rsp)
movq 0x2058(%rsp), %rdi
movq 0x2060(%rsp), %rsi
callq 0x8a6d0
movq 0x2060(%rsp), %rdi
callq 0x81370
cmpq $0x2, %rax
jae 0x2feba7
movq 0x2060(%rsp), %rdi
callq 0x81f80
jmp 0x2fed5a
movq $0x0, 0x2028(%rsp)
movq 0x2028(%rsp), %rax
movq %rax, (%rsp)
movq 0x2060(%rsp), %rdi
callq 0x81370
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
jae 0x2fed2d
movq 0x2060(%rsp), %rdi
movq 0x2028(%rsp), %rsi
callq 0x80b60
movq (%rax), %rax
movq %rax, 0x2020(%rsp)
movq 0x2080(%rsp), %rdi
movq 0x2020(%rsp), %rsi
callq 0x80b60
movq (%rax), %rax
movq %rax, 0x2040(%rsp)
movq 0x2040(%rsp), %rdi
callq 0x170b00
movq %rax, 0x2048(%rsp)
movq 0x2048(%rsp), %rdi
callq 0x170e30
movq %rax, 0x2050(%rsp)
movq 0x2050(%rsp), %rdi
callq 0x16d430
movq %rax, %rdi
leaq 0x26a6ad(%rip), %rsi    # 0x56930a
callq 0x19980
cmpl $0x0, %eax
jne 0x2fecd7
cmpq $0x0, 0x2070(%rsp)
je 0x2fec9c
leaq 0x10(%rsp), %rdi
movq 0x2070(%rsp), %rcx
movq 0x2018(%rsp), %r8
movl $0x2000, %esi           # imm = 0x2000
leaq 0x293990(%rip), %rdx    # 0x592623
movb $0x0, %al
callq 0x19b90
jmp 0x2fecbc
leaq 0x10(%rsp), %rdi
movq 0x2018(%rsp), %rcx
movl $0x2000, %esi           # imm = 0x2000
leaq 0x293974(%rip), %rdx    # 0x592629
movb $0x0, %al
callq 0x19b90
movq 0x2050(%rsp), %rdi
leaq 0x10(%rsp), %rdx
leaq 0x293964(%rip), %rsi    # 0x592634
callq 0x16d660
jmp 0x2fed07
movq 0x2048(%rsp), %rdi
callq 0x170f50
movq 0x2068(%rsp), %rdi
leaq 0x293948(%rip), %rsi    # 0x59263b
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x203c(%rsp) # imm = 0xFFFFFFFF
jmp 0x2fed2d
movq 0x2048(%rsp), %rdi
callq 0x170f50
movq 0x2028(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x2028(%rsp)
jmp 0x2febb3
movq 0x2060(%rsp), %rdi
callq 0x81f80
cmpl $0x0, 0x203c(%rsp)
je 0x2fed46
jmp 0x2fed73
movq 0x2018(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x2018(%rsp)
movq 0x2030(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x2030(%rsp)
jmp 0x2feb10
movl 0x203c(%rsp), %eax
addq $0x2088, %rsp           # imm = 0x2088
retq
nopw %cs:(%rax,%rax)