// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/extended/gtf_visitor.c
// Function: gtf_show_transcript
static int gtf_show_transcript(GtFeatureNode *feature_node,
                               GtGTFVisitor *gtf_visitor, GtError *err)
{
  GtFeatureNode *fn;
  GtUword i;
  int had_err;
  gt_error_check(err);
  gt_assert(feature_node && gtf_visitor);
  gt_array_reset(gtf_visitor->exon_features);
  gt_array_reset(gtf_visitor->CDS_features);
  had_err = gt_feature_node_traverse_direct_children(feature_node, gtf_visitor,
                                                     save_exon_node, err);
  if (gt_array_size(gtf_visitor->exon_features)) {
    /* sort exon features */
    qsort(gt_array_get_space(gtf_visitor->exon_features),
          gt_array_size(gtf_visitor->exon_features), sizeof (GtGenomeNode*),
          (GtCompare) gt_genome_node_compare);
    /* show exon features */
    gtf_visitor->transcript_id++;
    for (i = 0; i < gt_array_size(gtf_visitor->exon_features); i++) {
      fn = *(GtFeatureNode**) gt_array_get(gtf_visitor->exon_features, i);
      gt_gff3_output_leading(fn, gtf_visitor->outfp);
      gt_file_xprintf(gtf_visitor->outfp, "gene_id \""GT_WU"\"; transcript_id "
                      "\""GT_WU"."GT_WU"\";\n", gtf_visitor->gene_id,
                      gtf_visitor->gene_id, gtf_visitor->transcript_id);
    }
  }
  if (gt_array_size(gtf_visitor->CDS_features)) {
    /* sort CDS features */
    qsort(gt_array_get_space(gtf_visitor->CDS_features),
          gt_array_size(gtf_visitor->CDS_features), sizeof (GtGenomeNode*),
          (GtCompare) gt_genome_node_compare);
    /* show start_codon feature */
    /* fn = *(GtFeatureNode**) */ (void) gt_array_get(gtf_visitor->CDS_features,
                                                      0);
    /* XXX: to be done */

    /* show CDS features */
    for (i = 0; i < gt_array_size(gtf_visitor->CDS_features); i++) {
      fn = *(GtFeatureNode**) gt_array_get(gtf_visitor->CDS_features, i);
      gt_gff3_output_leading(fn, gtf_visitor->outfp);
      gt_file_xprintf(gtf_visitor->outfp, "gene_id \""GT_WU"\"; transcript_id "
                      "\""GT_WU"."GT_WU"\";\n", gtf_visitor->gene_id,
                      gtf_visitor->gene_id, gtf_visitor->transcript_id);
    }
    /* XXX: show stop_codon feature and shorten last CDS feature */
  }
  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
testq %rdx, %rdx
je 0x14e6c5
movq %r14, %rdi
callq 0xfcc32
testb %al, %al
jne 0x14e851
testq %r15, %r15
je 0x14e84c
testq %rbx, %rbx
je 0x14e84c
movq 0x20(%rbx), %rdi
callq 0xd2519
movq 0x28(%rbx), %rdi
callq 0xd2519
leaq 0x166(%rip), %rdx       # 0x14e856
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x1438a5
movl %eax, %ebp
movq 0x20(%rbx), %rdi
callq 0xd24e0
testq %rax, %rax
je 0x14e79c
movq 0x20(%rbx), %rdi
callq 0xd23eb
movq %rax, %r14
movq 0x20(%rbx), %rdi
callq 0xd24e0
leaq -0x9fae(%rip), %rcx     # 0x144780
movl $0x8, %edx
movq %r14, %rdi
movq %rax, %rsi
callq 0x17f60
incq 0x18(%rbx)
movq 0x20(%rbx), %rdi
callq 0xd24e0
testq %rax, %rax
je 0x14e79c
leaq 0x233e9f(%rip), %r14    # 0x3825f6
xorl %r15d, %r15d
movq 0x20(%rbx), %rdi
movq %r15, %rsi
callq 0xd2207
movq (%rax), %rdi
movq 0x30(%rbx), %rsi
callq 0x2fe82c
movq 0x30(%rbx), %rdi
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %r8
movq %r14, %rsi
movq %rcx, %rdx
xorl %eax, %eax
callq 0xfee51
incq %r15
movq 0x20(%rbx), %rdi
callq 0xd24e0
cmpq %rax, %r15
jb 0x14e75a
movq 0x28(%rbx), %rdi
callq 0xd24e0
testq %rax, %rax
je 0x14e83f
movq 0x28(%rbx), %rdi
callq 0xd23eb
movq %rax, %r14
movq 0x28(%rbx), %rdi
callq 0xd24e0
leaq -0xa04a(%rip), %rcx     # 0x144780
movl $0x8, %edx
movq %r14, %rdi
movq %rax, %rsi
callq 0x17f60
movq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0xd2207
movq 0x28(%rbx), %rdi
callq 0xd24e0
testq %rax, %rax
je 0x14e83f
leaq 0x233dfc(%rip), %r14    # 0x3825f6
xorl %r15d, %r15d
movq 0x28(%rbx), %rdi
movq %r15, %rsi
callq 0xd2207
movq (%rax), %rdi
movq 0x30(%rbx), %rsi
callq 0x2fe82c
movq 0x30(%rbx), %rdi
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %r8
movq %r14, %rsi
movq %rcx, %rdx
xorl %eax, %eax
callq 0xfee51
incq %r15
movq 0x28(%rbx), %rdi
callq 0xd24e0
cmpq %rax, %r15
jb 0x14e7fd
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x46f11
callq 0x46eda