// File: /workspace/github_c_makefile_star2_O1/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 0x155f61
movq %r14, %rdi
callq 0x101a9a
testb %al, %al
jne 0x1560ed
testq %r15, %r15
je 0x1560e8
testq %rbx, %rbx
je 0x1560e8
movq 0x20(%rbx), %rdi
callq 0xd4ad3
movq 0x28(%rbx), %rdi
callq 0xd4ad3
leaq 0x166(%rip), %rdx       # 0x1560f2
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x14aaf6
movl %eax, %ebp
movq 0x20(%rbx), %rdi
callq 0xd4a9a
testq %rax, %rax
je 0x156038
movq 0x20(%rbx), %rdi
callq 0xd49a9
movq %rax, %r14
movq 0x20(%rbx), %rdi
callq 0xd4a9a
leaq -0xa5e4(%rip), %rcx     # 0x14b9e6
movl $0x8, %edx
movq %r14, %rdi
movq %rax, %rsi
callq 0x17f60
incq 0x18(%rbx)
movq 0x20(%rbx), %rdi
callq 0xd4a9a
testq %rax, %rax
je 0x156038
leaq 0x2359c6(%rip), %r14    # 0x38b9b9
xorl %r15d, %r15d
movq 0x20(%rbx), %rdi
movq %r15, %rsi
callq 0xd47ba
movq (%rax), %rdi
movq 0x30(%rbx), %rsi
callq 0x3085dc
movq 0x30(%rbx), %rdi
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %r8
movq %r14, %rsi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x103d21
incq %r15
movq 0x20(%rbx), %rdi
callq 0xd4a9a
cmpq %rax, %r15
jb 0x155ff6
movq 0x28(%rbx), %rdi
callq 0xd4a9a
testq %rax, %rax
je 0x1560db
movq 0x28(%rbx), %rdi
callq 0xd49a9
movq %rax, %r14
movq 0x28(%rbx), %rdi
callq 0xd4a9a
leaq -0xa680(%rip), %rcx     # 0x14b9e6
movl $0x8, %edx
movq %r14, %rdi
movq %rax, %rsi
callq 0x17f60
movq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0xd47ba
movq 0x28(%rbx), %rdi
callq 0xd4a9a
testq %rax, %rax
je 0x1560db
leaq 0x235923(%rip), %r14    # 0x38b9b9
xorl %r15d, %r15d
movq 0x28(%rbx), %rdi
movq %r15, %rsi
callq 0xd47ba
movq (%rax), %rdi
movq 0x30(%rbx), %rsi
callq 0x3085dc
movq 0x30(%rbx), %rdi
movq 0x10(%rbx), %rcx
movq 0x18(%rbx), %r8
movq %r14, %rsi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x103d21
incq %r15
movq 0x28(%rbx), %rdi
callq 0xd4a9a
cmpq %rax, %r15
jb 0x156099
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x47d4c
callq 0x47d15