// File: /workspace/github_c_makefile_star2_O3/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 0x13f8a5
movq %r13, %rdi
callq 0xfcc32
testb %al, %al
jne 0x13fcff
callq 0x13f804
movq %rax, %rdi
movq %r14, %rsi
callq 0x1630b1
cmpq $0x0, 0x38(%rax)
je 0x13fcfa
movq %rax, %r12
movq %rbx, %rdi
callq 0x143f54
movq %rax, %rbx
cmpb $0x1, 0x23(%r12)
jne 0x13f8e0
callq 0x11be10
movq %rax, %r15
jmp 0x13f8e3
xorl %r15d, %r15d
cmpb $0x1, 0x22(%r12)
jne 0x13f900
movq $0x0, 0x38(%rsp)
callq 0x11ac6c
movq %rax, 0x40(%rsp)
jmp 0x13f912
movq $0x0, 0x38(%rsp)
movq $0x0, 0x40(%rsp)
callq 0x11ac6c
movq %rax, %rbp
callq 0x11ac6c
movq %rax, %r14
movq %rbx, %rdi
callq 0x1440ea
movq %r14, %rsi
testq %rax, %rax
je 0x13fcb2
movq %rax, %r14
movq %rsi, 0x48(%rsp)
movq %r12, 0x38(%rsp)
movq %r13, 0x58(%rsp)
movq %rbx, 0x50(%rsp)
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x13f961
callq 0x11b132
movq 0x48(%rsp), %rsi
testq %r15, %r15
je 0x13f973
movq %r15, %rdi
callq 0x11c11f
movq 0x48(%rsp), %rsi
movq 0x10(%r12), %rdx
movb 0x20(%r12), %al
movq 0x38(%r12), %r9
cmpb $0x1, 0x21(%r12)
jne 0x13f9c5
movq 0x18(%r12), %rcx
movq %r13, %r12
movq %r13, 0x20(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rcx, (%rsp)
movzbl %al, %eax
movq %r14, %rdi
movq %rsi, %r13
movq %rdx, %rsi
movl %eax, %edx
movq 0x40(%rsp), %rcx
movq %r15, %r8
callq 0x2fde79
jmp 0x13f9ea
movq %r13, %r12
movq %r13, 0x8(%rsp)
movq %r9, (%rsp)
movzbl %al, %ecx
movq %rsi, %rdi
movq %rsi, %r13
movq %r14, %rsi
movq 0x40(%rsp), %r8
movq %r15, %r9
callq 0x2fda60
testl %eax, %eax
jne 0x13fca5
movq %r13, %rdi
callq 0x11b0ca
testq %rax, %rax
je 0x13fc79
movq 0x38(%rsp), %rax
incq 0x28(%rax)
cmpb $0x1, 0x25(%rax)
jne 0x13fa51
movq %r14, %rdi
leaq 0x29abfb(%rip), %rsi    # 0x3da617
callq 0x141f50
testq %rax, %rax
je 0x13fa51
movq %rbp, %rdi
callq 0x11b0ca
testq %rax, %rax
jne 0x13fcf5
movq %r14, %rdi
leaq 0x29abd6(%rip), %rsi    # 0x3da617
callq 0x141f50
movq %rbp, %rdi
movq %rax, %rsi
callq 0x11acf3
movq %r14, %rdi
callq 0x144679
movq %rax, 0x60(%rsp)
movq %rdx, 0x68(%rsp)
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rbx
movq 0x28(%rax), %rcx
movq %rcx, 0x70(%rsp)
movb 0x20(%rax), %r13b
movb 0x21(%rax), %r12b
movb 0x24(%rax), %al
movb %al, 0x37(%rsp)
movq %r14, %rdi
callq 0x1424d6
movl %eax, %r14d
movq %rbp, %rdi
callq 0x11b0ca
testq %rax, %rax
jne 0x13fac1
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x11acf3
movq %rbp, %rdi
movl $0x5f, %esi
callq 0x11af23
movq %rbp, %rdi
movq 0x70(%rsp), %rsi
callq 0x11ae72
testb %r13b, %r13b
je 0x13fad5
movq %rbp, %rdi
leaq 0x23d5dd(%rip), %rsi    # 0x37d0ad
callq 0x11acf3
testb %r12b, %r12b
movq 0x58(%rsp), %r12
movq 0x40(%rsp), %rbx
je 0x13faf3
movq %rbp, %rdi
leaq 0x23d5c9(%rip), %rsi    # 0x37d0b7
callq 0x11acf3
testq %rbx, %rbx
je 0x13fb98
movq %rbx, %rdi
callq 0x11b0ca
testq %rax, %rax
je 0x13fcf0
movq %rbp, %rdi
leaq 0x23d5d9(%rip), %rsi    # 0x37d0f0
callq 0x11acf3
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x11adc1
cmpb $0x0, 0x37(%rsp)
je 0x13fb8b
movq %rbp, %rdi
leaq 0x22c6c4(%rip), %rsi    # 0x36c1fc
callq 0x11acf3
movq %rbp, %rdi
movq 0x60(%rsp), %rsi
callq 0x11ae72
movq %rbp, %rdi
leaq 0x288256(%rip), %rsi    # 0x3c7daa
callq 0x11acf3
movq %rbp, %rdi
movq 0x68(%rsp), %rsi
callq 0x11ae72
movq %rbp, %rdi
leaq 0x2825b0(%rip), %rsi    # 0x3c2120
callq 0x11acf3
movl %r14d, %eax
leaq 0x22deb5(%rip), %rcx    # 0x36da34
movsbl (%rax,%rcx), %esi
movq %rbp, %rdi
callq 0x11af23
movq %rbp, %rdi
movl $0x5d, %esi
callq 0x11af23
testq %r15, %r15
je 0x13fc26
movq %r15, %rdi
callq 0x11c131
testq %rax, %rax
je 0x13fc26
movq %rbp, %rdi
leaq 0x23d541(%rip), %rsi    # 0x37d0f9
callq 0x11acf3
movq %r15, %rdi
xorl %esi, %esi
callq 0x11bfb3
movq %rbp, %rdi
movq %rax, %rsi
callq 0x11acf3
movq %r15, %rdi
callq 0x11c131
cmpq $0x2, %rax
jb 0x13fc19
movl $0x1, %r14d
movq %rbp, %rdi
movl $0x2c, %esi
callq 0x11af23
movq %r15, %rdi
movq %r14, %rsi
callq 0x11bfb3
movq %rbp, %rdi
movq %rax, %rsi
callq 0x11acf3
incq %r14
movq %r15, %rdi
callq 0x11c131
cmpq %rax, %r14
jb 0x13fbe6
movq %rbp, %rdi
movl $0x5d, %esi
callq 0x11af23
movq %rbp, %rdi
callq 0x11b0a1
movq %rax, %rbx
movq 0x48(%rsp), %r13
movq %r13, %rdi
callq 0x11b0a1
movq %rax, %r14
movq %r13, %rdi
callq 0x11b0ca
movq 0x38(%rsp), %rdx
movq 0x30(%rdx), %rcx
movq 0x40(%rdx), %r8
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0xfe000
movq %rbp, %rdi
callq 0x11b132
movq %r13, %rdi
callq 0x11b132
movq 0x50(%rsp), %rbx
movq %rbx, %rdi
callq 0x1440ea
movq %rax, %r14
testq %rax, %rax
movq 0x48(%rsp), %rsi
movq %r12, %r13
movq 0x38(%rsp), %r12
jne 0x13f94d
movq $0x0, 0x38(%rsp)
jmp 0x13fcb2
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x38(%rsp)
movq %r13, %rsi
movq %rsi, %rdi
callq 0x11bdbf
movq %rbp, %rdi
callq 0x11bdbf
movq 0x40(%rsp), %rdi
callq 0x11bdbf
movq %r15, %rdi
callq 0x11c144
movq %rbx, %rdi
callq 0x14417c
movq 0x38(%rsp), %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x416be
callq 0x41685
callq 0x416f5
callq 0x4164e