// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/extract_feature_visitor.c
// Function: extract_feature_visitor_feature_node
static int extract_feature_visitor_feature_node(GtNodeVisitor *nv,
                                                GtFeatureNode *fn, GtError *err)
{
  GtExtractFeatureVisitor *efv;
  GtFeatureNodeIterator *fni;
  GtFeatureNode *child;
  GtStrArray *target_ids = NULL;
  GtStr *seqid = NULL,
        *description,
        *sequence;
  int had_err = 0;
  gt_error_check(err);
  efv = gt_extract_feature_visitor_cast(nv);
  gt_assert(efv->region_mapping);
  fni = gt_feature_node_iterator_new(fn);
  if (efv->target)
    target_ids = gt_str_array_new();
  if (efv->seqid)
    seqid = gt_str_new();
  description = gt_str_new();
  sequence = gt_str_new();
  while (!had_err && (child = gt_feature_node_iterator_next(fni))) {
    if (seqid)
      gt_str_reset(seqid);
    if (target_ids)
      gt_str_array_reset(target_ids);
    if (efv->translate) {
      if (gt_extract_and_translate_feature_sequence(child,
                                                    efv->type, efv->join,
                                                    seqid, target_ids,
                                                    efv->region_mapping,
                                                    efv->ttable,
                                                    sequence, NULL, NULL,
                                                    err)) {
        had_err = -1;
      }
    } else {
      if (gt_extract_feature_sequence(sequence, (GtGenomeNode*) child,
                                      efv->type,
                                      efv->join, seqid, target_ids,
                                      efv->region_mapping, err)) {
        had_err = -1;
      }
    }
    if (!had_err && gt_str_length(sequence)) {
      efv->fastaseq_counter++;
      GtRange coords;
      if (efv->retain_ids && gt_feature_node_get_attribute(child, "ID")) {
        gt_assert(!gt_str_length(description));
        gt_str_append_cstr(description, gt_feature_node_get_attribute(child,
                                                                      "ID"));
      }
      coords = gt_genome_node_get_range((GtGenomeNode*) child);
      construct_description(description, efv->type, efv->fastaseq_counter,
                            efv->join, efv->translate,
                            efv->coords ? &coords : NULL,
                            gt_feature_node_get_strand(child),
                            seqid, target_ids);
      gt_fasta_show_entry(gt_str_get(description), gt_str_get(sequence),
                          gt_str_length(sequence),  efv->width,  efv->outfp);
      gt_str_reset(description);
      gt_str_reset(sequence);
    }
  }
  gt_str_delete(sequence);
  gt_str_delete(description);
  gt_str_delete(seqid);
  gt_str_array_delete(target_ids);
  gt_feature_node_iterator_delete(fni);
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x146b11
movq %r13, %rdi
callq 0x101a9a
testb %al, %al
jne 0x146f42
callq 0x146a70
movq %rax, %rdi
movq %r14, %rsi
callq 0x16af21
cmpq $0x0, 0x38(%rax)
je 0x146f3d
movq %rax, %r12
movq %rbx, %rdi
callq 0x14b1a8
movq %rax, %rbx
cmpb $0x1, 0x23(%r12)
jne 0x146b4c
callq 0x121b54
movq %rax, %r15
jmp 0x146b4f
xorl %r15d, %r15d
movq $0x0, 0x40(%rsp)
cmpb $0x1, 0x22(%r12)
jne 0x146b6c
callq 0x1208f8
movq %rax, 0x38(%rsp)
jmp 0x146b75
movq $0x0, 0x38(%rsp)
callq 0x1208f8
movq %rax, %rbp
callq 0x1208f8
movq %rax, 0x48(%rsp)
movq %rbx, %rdi
callq 0x14b33e
testq %rax, %rax
je 0x146ef3
movq %rax, %r14
movq %r13, 0x58(%rsp)
movq %rbx, 0x50(%rsp)
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x146bb4
callq 0x120db4
testq %r15, %r15
je 0x146bc1
movq %r15, %rdi
callq 0x121e66
movq 0x38(%r12), %r9
cmpb $0x1, 0x21(%r12)
jne 0x146c0b
movzbl 0x20(%r12), %edx
movq 0x10(%r12), %rsi
movq 0x18(%r12), %rax
movq %r13, 0x20(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movq 0x48(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq %rax, (%rsp)
movq %r14, %rdi
movq 0x38(%rsp), %rcx
movq %r15, %r8
callq 0x307bf5
jmp 0x146c34
movq 0x10(%r12), %rdx
movzbl 0x20(%r12), %ecx
movq %r13, 0x8(%rsp)
movq %r9, (%rsp)
movq 0x48(%rsp), %rdi
movq %r14, %rsi
movq 0x38(%rsp), %r8
movq %r15, %r9
callq 0x307764
movl %eax, 0x40(%rsp)
testl %eax, %eax
jne 0x146ee6
movq 0x48(%rsp), %rdi
callq 0x120d4c
testq %rax, %rax
je 0x146ecb
incq 0x28(%r12)
cmpb $0x1, 0x25(%r12)
jne 0x146c9f
movq %r14, %rdi
leaq 0x29d102(%rip), %rsi    # 0x3e3d6c
callq 0x14918c
testq %rax, %rax
je 0x146c9f
movq %rbp, %rdi
callq 0x120d4c
testq %rax, %rax
jne 0x146f38
movq %r14, %rdi
leaq 0x29d0dd(%rip), %rsi    # 0x3e3d6c
callq 0x14918c
movq %rbp, %rdi
movq %rax, %rsi
callq 0x12097f
movq %r14, %rdi
callq 0x14b8df
movq %rax, 0x60(%rsp)
movq %rdx, 0x68(%rsp)
movq 0x10(%r12), %rbx
movq 0x28(%r12), %rax
movq %rax, 0x70(%rsp)
movb 0x20(%r12), %r13b
movb 0x21(%r12), %al
movb %al, 0x37(%rsp)
movb 0x24(%r12), %al
movb %al, 0x36(%rsp)
movq %r14, %rdi
callq 0x14970e
movl %eax, %r14d
movq %rbp, %rdi
callq 0x120d4c
testq %rax, %rax
jne 0x146d14
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x12097f
movq %rbp, %rdi
movl $0x5f, %esi
callq 0x120ba5
movq %rbp, %rdi
movq 0x70(%rsp), %rsi
callq 0x120af4
testb %r13b, %r13b
je 0x146d28
movq %rbp, %rdi
leaq 0x23f6fa(%rip), %rsi    # 0x38641d
callq 0x12097f
cmpb $0x0, 0x37(%rsp)
movq 0x38(%rsp), %rbx
je 0x146d43
movq %rbp, %rdi
leaq 0x23f6e9(%rip), %rsi    # 0x386427
callq 0x12097f
testq %rbx, %rbx
je 0x146de8
movq %rbx, %rdi
callq 0x120d4c
testq %rax, %rax
je 0x146f33
movq %rbp, %rdi
leaq 0x23f6f9(%rip), %rsi    # 0x386460
callq 0x12097f
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x120a43
cmpb $0x0, 0x36(%rsp)
je 0x146ddb
movq %rbp, %rdi
leaq 0x22e6c4(%rip), %rsi    # 0x37544c
callq 0x12097f
movq %rbp, %rdi
movq 0x60(%rsp), %rsi
callq 0x120af4
movq %rbp, %rdi
leaq 0x28a72e(%rip), %rsi    # 0x3d14d2
callq 0x12097f
movq %rbp, %rdi
movq 0x68(%rsp), %rsi
callq 0x120af4
movq %rbp, %rdi
leaq 0x284a88(%rip), %rsi    # 0x3cb848
callq 0x12097f
movl %r14d, %eax
leaq 0x22feb5(%rip), %rcx    # 0x376c84
movsbl (%rax,%rcx), %esi
movq %rbp, %rdi
callq 0x120ba5
movq %rbp, %rdi
movl $0x5d, %esi
callq 0x120ba5
testq %r15, %r15
je 0x146e76
movq %r15, %rdi
callq 0x121e78
testq %rax, %rax
je 0x146e76
movq %rbp, %rdi
leaq 0x23f661(%rip), %rsi    # 0x386469
callq 0x12097f
movq %r15, %rdi
xorl %esi, %esi
callq 0x121cfa
movq %rbp, %rdi
movq %rax, %rsi
callq 0x12097f
movq %r15, %rdi
callq 0x121e78
cmpq $0x2, %rax
jb 0x146e69
movl $0x1, %r14d
movq %rbp, %rdi
movl $0x2c, %esi
callq 0x120ba5
movq %r15, %rdi
movq %r14, %rsi
callq 0x121cfa
movq %rbp, %rdi
movq %rax, %rsi
callq 0x12097f
incq %r14
movq %r15, %rdi
callq 0x121e78
cmpq %rax, %r14
jb 0x146e36
movq %rbp, %rdi
movl $0x5d, %esi
callq 0x120ba5
movq %rbp, %rdi
callq 0x120d23
movq %rax, %rbx
movq 0x48(%rsp), %r13
movq %r13, %rdi
callq 0x120d23
movq %rax, %r14
movq %r13, %rdi
callq 0x120d4c
movq 0x30(%r12), %rcx
movq 0x40(%r12), %r8
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x102ec0
movq %rbp, %rdi
callq 0x120db4
movq %r13, %rdi
callq 0x120db4
movq 0x50(%rsp), %rbx
movq 0x58(%rsp), %r13
cmpl $0x0, 0x40(%rsp)
jne 0x146ee6
movq %rbx, %rdi
callq 0x14b33e
movq %rax, %r14
testq %rax, %rax
jne 0x146ba5
xorl %eax, %eax
negl 0x40(%rsp)
sbbl %eax, %eax
movq %rax, 0x40(%rsp)
movq 0x48(%rsp), %rdi
callq 0x121b03
movq %rbp, %rdi
callq 0x121b03
movq 0x38(%rsp), %rdi
callq 0x121b03
movq %r15, %rdi
callq 0x121e8b
movq %rbx, %rdi
callq 0x14b3d0
movq 0x40(%rsp), %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x42336
callq 0x422fd
callq 0x4236d
callq 0x422c6