// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/cds_visitor.c
// Function: create_CDS_features_for_ORF
static void create_CDS_features_for_ORF(GtRange orf, GtCDSVisitor *v,
                                        GtFeatureNode *fn)
{
  GtFeatureNode *representative, *cds_feature;
  GtArray *cds_features;
  GtUword i;
  GtRange cds;
  GtStrand strand = gt_feature_node_get_strand(fn);

  gt_assert(gt_range_length(&orf) >= 3);
  /* the first CDS feature */
  cds.start = gt_splicedseq_map(v->splicedseq,strand == GT_STRAND_FORWARD
                                ? orf.start : orf.end) + v->offset;
  cds.end = gt_splicedseq_map(v->splicedseq, strand == GT_STRAND_FORWARD
                              ? orf.end : orf.start) + v->offset;
  cds_features = gt_array_new(sizeof (GtFeatureNode*));
  cds_feature = (GtFeatureNode*)
                gt_feature_node_new(gt_genome_node_get_seqid((GtGenomeNode*)
                                                             fn),
                                    gt_ft_CDS, cds.start, cds.end,
                                    gt_feature_node_get_strand(fn));
  gt_feature_node_set_source(cds_feature, v->source);
  gt_feature_node_set_phase(cds_feature, GT_PHASE_ZERO);
  gt_feature_node_make_multi_representative(cds_feature);
  representative = cds_feature;
  /* all CDS features in between */
  for (i = strand == GT_STRAND_FORWARD ? orf.start : orf.end;
       strand == GT_STRAND_FORWARD ? i < orf.end : i > orf.start;
       strand == GT_STRAND_FORWARD ? i++ : i--) {
    GT_UNUSED GtUword prev_length;
    if (gt_splicedseq_pos_is_border(v->splicedseq, i)) {
      gt_feature_node_set_end(cds_feature,
                              gt_splicedseq_map(v->splicedseq, i) + v->offset);
      prev_length = gt_genome_node_get_length((GtGenomeNode*) cds_feature);
      gt_feature_node_add_child(fn, cds_feature);
      gt_array_add(cds_features, cds_feature);
      if (strand == GT_STRAND_FORWARD)
        orf.start = i + 1;
      else
        orf.end = i - 1;
      cds.start = gt_splicedseq_map(v->splicedseq, strand == GT_STRAND_FORWARD
                                    ? orf.start : orf.end) + v->offset;
      cds.end = gt_splicedseq_map(v->splicedseq, strand == GT_STRAND_FORWARD
                                  ? orf.end : orf.start) + v->offset;
      cds_feature = (GtFeatureNode*)
                    gt_feature_node_new(gt_genome_node_get_seqid((GtGenomeNode*)
                                                                 fn),
                                        gt_ft_CDS, cds.start, cds.end,
                                        gt_feature_node_get_strand(fn));
      gt_feature_node_set_source(cds_feature, v->source);
      gt_feature_node_set_multi_representative(cds_feature, representative);
    }
  }
  /* set the end of the last CDS feature and store it */
  gt_feature_node_set_end((GtFeatureNode*) cds_feature,
                          gt_splicedseq_map(v->splicedseq,
                                            strand == GT_STRAND_FORWARD
                                            ? orf.end : orf.start) + v->offset);
  gt_feature_node_add_child(fn, cds_feature);
  gt_array_add(cds_features, cds_feature);
  if (strand == GT_STRAND_REVERSE)
    gt_array_reverse(cds_features);
  set_phases(cds_features);
  gt_array_delete(cds_features);
}

// Assembly:
subq $0x108, %rsp            # imm = 0x108
movq %rdi, 0xf8(%rsp)
movq %rsi, 0x100(%rsp)
movq %rdx, 0xf0(%rsp)
movq %rcx, 0xe8(%rsp)
movq 0xe8(%rsp), %rdi
callq 0x20a10
movl %eax, 0xb4(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x93bd0
cmpq $0x3, %rax
jae 0x14e1d6
movq 0x65e33(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0xfeb7(%rip), %rsi      # 0x15e066
leaq 0x3ff1a(%rip), %rdx     # 0x18e0d0
leaq 0x3ff2e(%rip), %rcx     # 0x18e0eb
leaq 0x3fe05(%rip), %r8      # 0x18dfc9
movl $0xc4, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x14e1d8
movq 0xf0(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0xa0(%rsp)
cmpl $0x0, 0xb4(%rsp)
jne 0x14e208
movq 0xf8(%rsp), %rax
movq %rax, 0x98(%rsp)
jmp 0x14e218
movq 0x100(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x98(%rsp), %rsi
callq 0x152030
movq 0xf0(%rsp), %rcx
addq 0x30(%rcx), %rax
movq %rax, 0xb8(%rsp)
movq 0xf0(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x90(%rsp)
cmpl $0x0, 0xb4(%rsp)
jne 0x14e271
movq 0x100(%rsp), %rax
movq %rax, 0x88(%rsp)
jmp 0x14e281
movq 0xf8(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x90(%rsp), %rdi
movq 0x88(%rsp), %rsi
callq 0x152030
movq 0xf0(%rsp), %rcx
addq 0x30(%rcx), %rax
movq %rax, 0xc0(%rsp)
movl $0x8, %edi
callq 0x75ab0
movq %rax, 0xd0(%rsp)
movq 0xe8(%rsp), %rdi
callq 0x258a0
movq %rax, 0x70(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0xe8(%rsp), %rdi
callq 0x20a10
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rdx
movq 0x80(%rsp), %rcx
movl %eax, %r8d
leaq 0x13f27(%rip), %rsi     # 0x16223b
callq 0x20580
movq %rax, 0xd8(%rsp)
movq 0xd8(%rsp), %rdi
movq 0xf0(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0x1ff10
movq 0xd8(%rsp), %rdi
xorl %esi, %esi
callq 0x1fff0
movq 0xd8(%rsp), %rdi
callq 0x21950
movq 0xd8(%rsp), %rax
movq %rax, 0xe0(%rsp)
cmpl $0x0, 0xb4(%rsp)
jne 0x14e37f
movq 0xf8(%rsp), %rax
movq %rax, 0x68(%rsp)
jmp 0x14e38c
movq 0x100(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0xc8(%rsp)
cmpl $0x0, 0xb4(%rsp)
jne 0x14e3c1
movq 0xc8(%rsp), %rax
cmpq 0x100(%rsp), %rax
setb %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x64(%rsp)
jmp 0x14e3dd
movq 0xc8(%rsp), %rax
cmpq 0xf8(%rsp), %rax
seta %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
cmpl $0x0, %eax
je 0x14e63f
movq 0xf0(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0xc8(%rsp), %rsi
callq 0x151e60
testb $0x1, %al
jne 0x14e40c
jmp 0x14e604
movq 0xd8(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xf0(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0xc8(%rsp), %rsi
callq 0x152030
movq 0x58(%rsp), %rdi
movq %rax, %rsi
movq 0xf0(%rsp), %rax
addq 0x30(%rax), %rsi
callq 0x228f0
movq 0xd8(%rsp), %rdi
callq 0x25ab0
movq %rax, 0xa8(%rsp)
movq 0xe8(%rsp), %rdi
movq 0xd8(%rsp), %rsi
callq 0x20db0
movq 0xd0(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
movl $0x8, %edx
callq 0x76220
cmpl $0x0, 0xb4(%rsp)
jne 0x14e4af
movq 0xc8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xf8(%rsp)
jmp 0x14e4c3
movq 0xc8(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x100(%rsp)
movq 0xf0(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x50(%rsp)
cmpl $0x0, 0xb4(%rsp)
jne 0x14e4ed
movq 0xf8(%rsp), %rax
movq %rax, 0x48(%rsp)
jmp 0x14e4fa
movq 0x100(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x152030
movq 0xf0(%rsp), %rcx
addq 0x30(%rcx), %rax
movq %rax, 0xb8(%rsp)
movq 0xf0(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x40(%rsp)
cmpl $0x0, 0xb4(%rsp)
jne 0x14e547
movq 0x100(%rsp), %rax
movq %rax, 0x38(%rsp)
jmp 0x14e554
movq 0xf8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x152030
movq 0xf0(%rsp), %rcx
addq 0x30(%rcx), %rax
movq %rax, 0xc0(%rsp)
movq 0xe8(%rsp), %rdi
callq 0x258a0
movq %rax, 0x20(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xe8(%rsp), %rdi
callq 0x20a10
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rcx
movl %eax, %r8d
leaq 0x13c72(%rip), %rsi     # 0x16223b
callq 0x20580
movq %rax, 0xd8(%rsp)
movq 0xd8(%rsp), %rdi
movq 0xf0(%rsp), %rax
movq 0x18(%rax), %rsi
callq 0x1ff10
movq 0xd8(%rsp), %rdi
movq 0xe0(%rsp), %rsi
callq 0x21a90
jmp 0x14e606
cmpl $0x0, 0xb4(%rsp)
jne 0x14e626
movq 0xc8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xc8(%rsp)
jmp 0x14e63a
movq 0xc8(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0xc8(%rsp)
jmp 0x14e399
movq 0xd8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0xf0(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x18(%rsp)
cmpl $0x0, 0xb4(%rsp)
jne 0x14e676
movq 0x100(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x14e683
movq 0xf8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x152030
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq 0xf0(%rsp), %rax
addq 0x30(%rax), %rsi
callq 0x228f0
movq 0xe8(%rsp), %rdi
movq 0xd8(%rsp), %rsi
callq 0x20db0
movq 0xd0(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
movl $0x8, %edx
callq 0x76220
cmpl $0x1, 0xb4(%rsp)
jne 0x14e6f1
movq 0xd0(%rsp), %rdi
callq 0x76060
movq 0xd0(%rsp), %rdi
callq 0x14e720
movq 0xd0(%rsp), %rdi
callq 0x770a0
addq $0x108, %rsp            # imm = 0x108
retq
nopw %cs:(%rax,%rax)