// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/ltr/ltr_cluster_prepare_seq_visitor.c
// Function: gt_ltr_cluster_prepare_seq_visitor_feature_node
static int gt_ltr_cluster_prepare_seq_visitor_feature_node(GtNodeVisitor *nv,
                                               GtFeatureNode *fn,
                                               GtError *err)
{
  GtLTRClusterPrepareSeqVisitor *lcv;
  GtFeatureNode *curnode;
  GtFeatureNodeIterator *fni;
  GtStr *seqid = NULL;
  const char *fnt;
  char buffer[BUFSIZ];
  int had_err = 0;
  bool first_ltr = true;
  gt_error_check(err);

  lcv = gt_ltr_cluster_prepare_seq_visitor_cast(nv);
  gt_assert(lcv);
  gt_error_check(err);
  fni = gt_feature_node_iterator_new(fn);

  while (!had_err && (curnode = gt_feature_node_iterator_next(fni))) {
    GtFile *file = NULL;
    fnt = gt_feature_node_get_type(curnode);
    if (strcmp(fnt, gt_ft_repeat_region) == 0) {
      const char *rid;
      GtUword id;
      seqid = gt_genome_node_get_seqid((GtGenomeNode*) curnode);
      rid = gt_feature_node_get_attribute(curnode, "ID");
      (void) sscanf(rid, "repeat_region"GT_WU"", &id);
      (void) snprintf(buffer, BUFSIZ, "%s_"GT_WU"", gt_str_get(seqid), id);
    } else if (strcmp(fnt, gt_ft_protein_match) == 0) {
      GtRange range;
      const char *attr;
      GtEncseqBuilder *eb;
      char header[2*BUFSIZ];
      attr = gt_feature_node_get_attribute(curnode, "name");
      if (!attr)
        continue;
      range = gt_genome_node_get_range((GtGenomeNode*) curnode);
      (void) snprintf(header, 2*BUFSIZ, "%s_"GT_WU"_"GT_WU"", buffer,
                      range.start, range.end);
      if (!gt_hashmap_get(lcv->encseq_builders, attr)) {
        eb = gt_encseq_builder_new(gt_encseq_alphabet(lcv->src_encseq));
        gt_encseq_builder_create_ssp_tab(eb);
        gt_encseq_builder_create_sds_tab(eb);
        gt_encseq_builder_create_des_tab(eb);
        gt_hashmap_add(lcv->encseq_builders, gt_cstr_dup(attr),
                       eb);
        gt_log_log("builder %p added for feature %s", eb, attr);
        gt_str_array_add_cstr(lcv->feat_to_encseq_keys, attr);
      } else {
        eb = (GtEncseqBuilder*) gt_hashmap_get(lcv->encseq_builders, attr);
      }
      had_err = extract_feature_seq(eb, header, seqid, lcv->src_encseq, range,
                                    fnt, err);
      gt_file_delete(file);
    } else if (strcmp(fnt, gt_ft_LTR_retrotransposon) == 0) {
      continue;
    } else {
      char *tmp;
      GtRange range;
      GtEncseqBuilder *eb;
      char header[2*BUFSIZ];  /* XXX: use GtStr for safety */
      if (strcmp(fnt, gt_ft_long_terminal_repeat) == 0) {
        if (first_ltr) {
          tmp = gt_cstr_dup("lLTR");
          first_ltr = false;
        } else
          tmp = gt_cstr_dup("rLTR");
      } else
        tmp = gt_cstr_dup(fnt);
      range = gt_genome_node_get_range((GtGenomeNode*) curnode);
      if ((range.end - range.start + 1) < 10UL) {
        gt_free(tmp);
        continue;
      }
      (void) snprintf(header, 2*BUFSIZ, "%s_"GT_WU"_"GT_WU"", buffer,
                      range.start, range.end);
      if (!gt_hashmap_get(lcv->encseq_builders, tmp)) {
        eb = gt_encseq_builder_new(gt_encseq_alphabet(lcv->src_encseq));
        gt_encseq_builder_create_ssp_tab(eb);
        gt_encseq_builder_create_sds_tab(eb);
        gt_encseq_builder_create_des_tab(eb);
        gt_hashmap_add(lcv->encseq_builders, gt_cstr_dup(tmp),
                       eb);
        gt_str_array_add_cstr(lcv->feat_to_encseq_keys, tmp);
      } else {
        eb = (GtEncseqBuilder*) gt_hashmap_get(lcv->encseq_builders, tmp);
      }
      had_err = extract_feature_seq(eb, header, seqid, lcv->src_encseq, range,
                                    fnt, err);
      gt_free(tmp);
      gt_file_delete(file);
    }
  }
  gt_feature_node_iterator_delete(fni);

  return had_err;
}

// Assembly:
subq $0xa0f8, %rsp           # imm = 0xA0F8
movq %rdi, 0xa0f0(%rsp)
movq %rsi, 0xa0e8(%rsp)
movq %rdx, 0xa0e0(%rsp)
movq $0x0, 0xa0c0(%rsp)
movl $0x0, 0x80ac(%rsp)
movb $0x1, 0x80ab(%rsp)
cmpq $0x0, 0xa0e0(%rsp)
je 0x4e8d04
movq 0xa0e0(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x4e8ccc
jmp 0x4e8d04
movq 0x1532cd(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2d336(%rip), %rsi     # 0x516013
leaq 0x2d4db(%rip), %rdx     # 0x5161bf
leaq 0xd2cb7(%rip), %rcx     # 0x5bb9a2
leaq 0xd2b58(%rip), %r8      # 0x5bb84a
movl $0x59, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4e8d06
callq 0x4e8c20
movq %rax, %rdi
movq 0xa0f0(%rsp), %rsi
callq 0x1b2350
movq %rax, 0xa0d8(%rsp)
cmpq $0x0, 0xa0d8(%rsp)
jne 0x4e8d66
movq 0x15326b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2d2d4(%rip), %rsi     # 0x516013
leaq 0xd2ad9(%rip), %rdx     # 0x5bb81f
leaq 0xd2c55(%rip), %rcx     # 0x5bb9a2
leaq 0xd2af6(%rip), %r8      # 0x5bb84a
movl $0x5c, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4e8d68
jmp 0x4e8d6a
cmpq $0x0, 0xa0e0(%rsp)
je 0x4e8dc0
movq 0xa0e0(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x4e8d88
jmp 0x4e8dc0
movq 0x153211(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2d27a(%rip), %rsi     # 0x516013
leaq 0x2d41f(%rip), %rdx     # 0x5161bf
leaq 0xd2bfb(%rip), %rcx     # 0x5bb9a2
leaq 0xd2a9c(%rip), %r8      # 0x5bb84a
movl $0x5d, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4e8dc2
movq 0xa0e8(%rsp), %rdi
callq 0x170b00
movq %rax, 0xa0c8(%rsp)
xorl %eax, %eax
cmpl $0x0, 0x80ac(%rsp)
movb %al, 0x2f(%rsp)
jne 0x4e8e07
movq 0xa0c8(%rsp), %rdi
callq 0x170e30
movq %rax, 0xa0d0(%rsp)
cmpq $0x0, %rax
setne %al
movb %al, 0x2f(%rsp)
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0x4e8e14
jmp 0x4e9381
movq $0x0, 0x80a0(%rsp)
movq 0xa0d0(%rsp), %rdi
callq 0x16d430
movq %rax, 0xa0b8(%rsp)
movq 0xa0b8(%rsp), %rdi
leaq 0x804c6(%rip), %rsi     # 0x56930a
callq 0x19980
cmpl $0x0, %eax
jne 0x4e8ee3
movq 0xa0d0(%rsp), %rdi
callq 0x171b70
movq %rax, 0xa0c0(%rsp)
movq 0xa0d0(%rsp), %rdi
leaq 0xc6c37(%rip), %rsi     # 0x5afaad
callq 0x16c040
movq %rax, 0x8098(%rsp)
movq 0x8098(%rsp), %rdi
leaq 0xa9919(%rip), %rsi     # 0x5927ab
leaq 0x8090(%rsp), %rdx
movb $0x0, %al
callq 0x19770
leaq 0x80b0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xa0c0(%rsp), %rdi
callq 0x11dee0
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movq 0x8090(%rsp), %r8
movl $0x2000, %esi           # imm = 0x2000
leaq 0xa98e5(%rip), %rdx     # 0x5927bc
movb $0x0, %al
callq 0x19b90
jmp 0x4e937c
movq 0xa0b8(%rsp), %rdi
leaq 0x6a340(%rip), %rsi     # 0x553232
callq 0x19980
cmpl $0x0, %eax
jne 0x4e90ff
movq 0xa0d0(%rsp), %rdi
leaq 0x6beef(%rip), %rsi     # 0x554dfe
callq 0x16c040
movq %rax, 0x8078(%rsp)
cmpq $0x0, 0x8078(%rsp)
jne 0x4e8f2c
jmp 0x4e8dd7
movq 0xa0d0(%rsp), %rdi
callq 0x171cc0
movq %rax, 0x4060(%rsp)
movq %rdx, 0x4068(%rsp)
movq 0x4060(%rsp), %rax
movq %rax, 0x8080(%rsp)
movq 0x4068(%rsp), %rax
movq %rax, 0x8088(%rsp)
leaq 0x4070(%rsp), %rdi
leaq 0x80b0(%rsp), %rcx
movq 0x8080(%rsp), %r8
movq 0x8088(%rsp), %r9
movl $0x4000, %esi           # imm = 0x4000
leaq 0xa9a1f(%rip), %rdx     # 0x5929b4
movb $0x0, %al
callq 0x19b90
movq 0xa0d8(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x8078(%rsp), %rsi
callq 0xe0f20
cmpq $0x0, %rax
jne 0x4e9073
movq 0xa0d8(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xb0f00
movq %rax, %rdi
callq 0xbbec0
movq %rax, 0x8070(%rsp)
movq 0x8070(%rsp), %rdi
callq 0xbc090
movq 0x8070(%rsp), %rdi
callq 0xbc130
movq 0x8070(%rsp), %rdi
callq 0xbbff0
movq 0xa0d8(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x8078(%rsp), %rdi
callq 0xa2db0
movq 0x18(%rsp), %rdi
movq %rax, %rsi
movq 0x8070(%rsp), %rdx
callq 0xe0fc0
movq 0x8070(%rsp), %rsi
movq 0x8078(%rsp), %rdx
leaq 0xd2981(%rip), %rdi     # 0x5bb9d2
movb $0x0, %al
callq 0xe7740
movq 0xa0d8(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x8078(%rsp), %rsi
callq 0x11f720
jmp 0x4e9094
movq 0xa0d8(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x8078(%rsp), %rsi
callq 0xe0f20
movq %rax, 0x8070(%rsp)
movq 0x8070(%rsp), %rdi
leaq 0x4070(%rsp), %rsi
movq 0xa0c0(%rsp), %rdx
movq 0xa0d8(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0xa0b8(%rsp), %r10
movq 0xa0e0(%rsp), %rax
movq 0x8080(%rsp), %r8
movq 0x8088(%rsp), %r9
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x4e9770
movl %eax, 0x80ac(%rsp)
movq 0x80a0(%rsp), %rdi
callq 0xde430
jmp 0x4e937a
movq 0xa0b8(%rsp), %rdi
leaq 0x7e42e(%rip), %rsi     # 0x56753c
callq 0x19980
cmpl $0x0, %eax
jne 0x4e911d
jmp 0x4e8dd7
movq 0xa0b8(%rsp), %rdi
leaq 0x80d8a(%rip), %rsi     # 0x569eb6
callq 0x19980
cmpl $0x0, %eax
jne 0x4e9174
testb $0x1, 0x80ab(%rsp)
je 0x4e915e
leaq 0xa942d(%rip), %rdi     # 0x592574
callq 0xa2db0
movq %rax, 0x4058(%rsp)
movb $0x0, 0x80ab(%rsp)
jmp 0x4e9172
leaq 0xa9414(%rip), %rdi     # 0x592579
callq 0xa2db0
movq %rax, 0x4058(%rsp)
jmp 0x4e9189
movq 0xa0b8(%rsp), %rdi
callq 0xa2db0
movq %rax, 0x4058(%rsp)
movq 0xa0d0(%rsp), %rdi
callq 0x171cc0
movq %rax, 0x30(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x4048(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x4050(%rsp)
movq 0x4050(%rsp), %rax
subq 0x4048(%rsp), %rax
addq $0x1, %rax
cmpq $0xa, %rax
jae 0x4e91f2
movq 0x4058(%rsp), %rdi
leaq 0xd2667(%rip), %rsi     # 0x5bb84a
movl $0x95, %edx
callq 0xe88c0
jmp 0x4e8dd7
leaq 0x40(%rsp), %rdi
leaq 0x80b0(%rsp), %rcx
movq 0x4048(%rsp), %r8
movq 0x4050(%rsp), %r9
movl $0x4000, %esi           # imm = 0x4000
leaq 0xa9799(%rip), %rdx     # 0x5929b4
movb $0x0, %al
callq 0x19b90
movq 0xa0d8(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x4058(%rsp), %rsi
callq 0xe0f20
cmpq $0x0, %rax
jne 0x4e92db
movq 0xa0d8(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xb0f00
movq %rax, %rdi
callq 0xbbec0
movq %rax, 0x4040(%rsp)
movq 0x4040(%rsp), %rdi
callq 0xbc090
movq 0x4040(%rsp), %rdi
callq 0xbc130
movq 0x4040(%rsp), %rdi
callq 0xbbff0
movq 0xa0d8(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x4058(%rsp), %rdi
callq 0xa2db0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq 0x4040(%rsp), %rdx
callq 0xe0fc0
movq 0xa0d8(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x4058(%rsp), %rsi
callq 0x11f720
jmp 0x4e92fc
movq 0xa0d8(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x4058(%rsp), %rsi
callq 0xe0f20
movq %rax, 0x4040(%rsp)
movq 0x4040(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq 0xa0c0(%rsp), %rdx
movq 0xa0d8(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0xa0b8(%rsp), %r10
movq 0xa0e0(%rsp), %rax
movq 0x4048(%rsp), %r8
movq 0x4050(%rsp), %r9
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x4e9770
movl %eax, 0x80ac(%rsp)
movq 0x4058(%rsp), %rdi
leaq 0xd24e9(%rip), %rsi     # 0x5bb84a
movl $0xa7, %edx
callq 0xe88c0
movq 0x80a0(%rsp), %rdi
callq 0xde430
jmp 0x4e937a
jmp 0x4e937c
jmp 0x4e8dd7
movq 0xa0c8(%rsp), %rdi
callq 0x170f50
movl 0x80ac(%rsp), %eax
addq $0xa0f8, %rsp           # imm = 0xA0F8
retq
nopl (%rax)