// File: /workspace/github_c_makefile_star2_O2/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 $0x68, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0xd676d
movq %r15, %rdi
callq 0x89eb7
testb %al, %al
jne 0xd6bd5
movq %r15, 0x38(%rsp)
callq 0xd66a0
movq %rax, %rdi
movq %r14, %rsi
callq 0x102dfe
cmpq $0x0, 0x38(%rax)
je 0xd6bab
movq %rax, %r12
movq %rbx, %rdi
callq 0xdc6f0
movq %rax, 0x40(%rsp)
cmpb $0x1, 0x23(%r12)
jne 0xd67af
callq 0xae154
movq %rax, %r15
jmp 0xd67b2
xorl %r15d, %r15d
cmpb $0x1, 0x22(%r12)
jne 0xd67c4
callq 0xacb84
movq %rax, %r14
jmp 0xd67c7
xorl %r14d, %r14d
callq 0xacb84
movq %rax, %rbp
callq 0xacb84
movq %rax, 0x30(%rsp)
movq %r14, 0x48(%rsp)
movq 0x40(%rsp), %rdi
callq 0xdc92e
testq %rax, %rax
je 0xd6afb
movq %rax, %r13
testq %r14, %r14
je 0xd6801
movq %r14, %rdi
callq 0xad357
testq %r15, %r15
je 0xd680e
movq %r15, %rdi
callq 0xae5d9
movq 0x10(%r12), %rdx
movq 0x38(%r12), %r9
cmpb $0x1, 0x21(%r12)
movzbl 0x20(%r12), %ecx
jne 0xd6860
movq 0x18(%r12), %rax
movq 0x38(%rsp), %rsi
movq %rsi, 0x20(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movq 0x30(%rsp), %rbx
movq %rbx, 0x8(%rsp)
movq %rax, (%rsp)
movq %r13, %rdi
movq %rdx, %rsi
movl %ecx, %edx
movq %r14, %rcx
movq %r15, %r8
callq 0x29ae10
jmp 0xd6884
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %r9, (%rsp)
movq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %r8
movq %r15, %r9
callq 0x29a8d0
testl %eax, %eax
jne 0xd6b05
movq %rbx, %rdi
callq 0xad289
testq %rax, %rax
je 0xd67de
incq 0x28(%r12)
cmpb $0x1, 0x25(%r12)
jne 0xd68e9
movq %r13, %rdi
leaq 0x2a4183(%rip), %rsi    # 0x37aa37
callq 0xd9628
testq %rax, %rax
je 0xd68e9
movq %rbp, %rdi
callq 0xad289
testq %rax, %rax
jne 0xd6b73
movq %r13, %rdi
leaq 0x2a415e(%rip), %rsi    # 0x37aa37
callq 0xd9628
movq %rbp, %rdi
movq %rax, %rsi
callq 0xacbfb
movq %r13, %rdi
callq 0xdd1f4
movq %rax, 0x50(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x10(%r12), %r14
movq 0x28(%r12), %rax
movq %rax, 0x60(%rsp)
movb 0x20(%r12), %bl
movb 0x21(%r12), %al
movb %al, 0x2f(%rsp)
movb 0x24(%r12), %al
movb %al, 0x2e(%rsp)
movq %r13, %rdi
callq 0xd9d99
movl %eax, %r13d
movq %rbp, %rdi
callq 0xad289
testq %rax, %rax
jne 0xd695c
movq %rbp, %rdi
movq %r14, %rsi
callq 0xacbfb
movq %rbp, %rdi
pushq $0x5f
popq %rsi
callq 0xaced9
movq %rbp, %rdi
movq 0x60(%rsp), %rsi
callq 0xace26
testb %bl, %bl
je 0xd696f
movq %rbp, %rdi
leaq 0x246b4b(%rip), %rsi    # 0x31d4b5
callq 0xacbfb
cmpb $0x0, 0x2f(%rsp)
movq 0x48(%rsp), %rbx
pushq $0x2c
popq %r14
je 0xd698e
movq %rbp, %rdi
leaq 0x246b36(%rip), %rsi    # 0x31d4bf
callq 0xacbfb
testq %rbx, %rbx
je 0xd6a31
movq %rbx, %rdi
callq 0xad289
testq %rax, %rax
je 0xd6b47
movq %rbp, %rdi
leaq 0x246b46(%rip), %rsi    # 0x31d4f8
callq 0xacbfb
movq %rbp, %rdi
movq %rbx, %rsi
callq 0xacd13
cmpb $0x0, 0x2e(%rsp)
je 0xd6a26
movq %rbp, %rdi
leaq 0x235b09(%rip), %rsi    # 0x30c4dc
callq 0xacbfb
movq %rbp, %rdi
movq 0x50(%rsp), %rsi
callq 0xace26
movq %rbp, %rdi
leaq 0x2917bb(%rip), %rsi    # 0x3681aa
callq 0xacbfb
movq %rbp, %rdi
movq 0x58(%rsp), %rsi
callq 0xace26
movq %rbp, %rdi
leaq 0x28bb25(%rip), %rsi    # 0x362530
callq 0xacbfb
movl %r13d, %eax
leaq 0x23733a(%rip), %rcx    # 0x30dd54
movsbl (%rax,%rcx), %esi
movq %rbp, %rdi
callq 0xaced9
movq %rbp, %rdi
pushq $0x5d
popq %rsi
callq 0xaced9
testq %r15, %r15
je 0xd6aa6
movq %r15, %rdi
callq 0xae61c
testq %rax, %rax
je 0xd6aa6
movq %rbp, %rdi
leaq 0x246ab4(%rip), %rsi    # 0x31d501
callq 0xacbfb
movq %r15, %rdi
xorl %esi, %esi
callq 0xae386
movq %rbp, %rdi
movq %rax, %rsi
callq 0xacbfb
pushq $0x1
popq %r13
movq %r15, %rdi
callq 0xae61c
movq %rbp, %rdi
cmpq %rax, %r13
jae 0xd6a9e
movl %r14d, %esi
callq 0xaced9
movq %r15, %rdi
movq %r13, %rsi
callq 0xae386
movq %rbp, %rdi
movq %rax, %rsi
callq 0xacbfb
incq %r13
jmp 0xd6a6b
pushq $0x5d
popq %rsi
callq 0xaced9
movq %rbp, %rdi
callq 0xad1fa
movq %rax, %rbx
movq 0x30(%rsp), %r13
movq %r13, %rdi
callq 0xad1fa
movq %rax, %r14
movq %r13, %rdi
callq 0xad289
movq 0x30(%r12), %rcx
movq 0x40(%r12), %r8
movq %rbx, %rdi
movq %r14, %rsi
movq 0x48(%rsp), %r14
movq %rax, %rdx
callq 0x8c0bc
movq %rbp, %rdi
callq 0xad357
movq %r13, %rdi
callq 0xad357
jmp 0xd67de
xorl %r12d, %r12d
movq 0x30(%rsp), %rdi
jmp 0xd6b0e
pushq $-0x1
popq %rax
movl %eax, %r12d
movq %rbx, %rdi
callq 0xae103
movq %rbp, %rdi
callq 0xae103
movq %r14, %rdi
callq 0xae103
movq %r15, %rdi
callq 0xae662
movq 0x40(%rsp), %rdi
callq 0xdc9f1
movl %r12d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x36141a(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x20e4bb(%rip), %rsi    # 0x2e5013
leaq 0x24696e(%rip), %rdx    # 0x31d4cd
leaq 0x24697c(%rip), %rcx    # 0x31d4e2
leaq 0x24681c(%rip), %r8     # 0x31d389
pushq $0x47
popq %r9
jmp 0xd6b9f
movq 0x3613ee(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x20e48f(%rip), %rsi    # 0x2e5013
leaq 0x24690e(%rip), %rdx    # 0x31d499
leaq 0x2468ce(%rip), %rcx    # 0x31d460
leaq 0x2467f0(%rip), %r8     # 0x31d389
movl $0x90, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x3613b6(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x20e457(%rip), %rsi    # 0x2e5013
leaq 0x2468c2(%rip), %rdx    # 0x31d485
leaq 0x246896(%rip), %rcx    # 0x31d460
leaq 0x2467b8(%rip), %r8     # 0x31d389
pushq $0x6d
jmp 0xd6b6f
movq 0x36138c(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x20e42d(%rip), %rsi    # 0x2e5013
leaq 0x20e5d2(%rip), %rdx    # 0x2e51bf
leaq 0x24686c(%rip), %rcx    # 0x31d460
leaq 0x24678e(%rip), %r8     # 0x31d389
pushq $0x6b
jmp 0xd6b6f