// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/cds_visitor.c
// Function: extract_cds_if_necessary
static int extract_cds_if_necessary(GtFeatureNode *fn, void *data,
                                    GtError *err)
{
  GtCDSVisitor *v = (GtCDSVisitor*) data;
  GtRange range;
  char *outsequence;
  int had_err = 0;

  gt_error_check(err);
  gt_assert(fn);

  if (gt_feature_node_has_type(fn, gt_ft_exon) &&
      (gt_feature_node_get_strand(fn) == GT_STRAND_FORWARD ||
       gt_feature_node_get_strand(fn) == GT_STRAND_REVERSE)) {
    range = gt_genome_node_get_range((GtGenomeNode*) fn);
    gt_assert(v->region_mapping);
    had_err = gt_region_mapping_get_sequence(v->region_mapping, &outsequence,
                                   gt_genome_node_get_seqid((GtGenomeNode*) fn),
                                   range.start, range.end, err);
    if (!had_err) {
      gt_assert(range.start && range.end); /* 1-based coordinates */
      gt_splicedseq_add(v->splicedseq, range.start, range.end, outsequence);
      gt_free(outsequence);
    }
  }
  return had_err;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
movl $0x0, 0x1c(%rsp)
cmpq $0x0, 0x40(%rsp)
je 0x14def5
movq 0x40(%rsp), %rdi
callq 0xc270
testb $0x1, %al
jne 0x14debd
jmp 0x14def5
movq 0x66114(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x10198(%rip), %rsi     # 0x15e066
leaq 0x10773(%rip), %rdx     # 0x15e648
leaq 0x40175(%rip), %rcx     # 0x18e051
leaq 0x400e6(%rip), %r8      # 0x18dfc9
movl $0x40, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x14def7
jmp 0x14def9
cmpq $0x0, 0x50(%rsp)
jne 0x14df39
movq 0x660d0(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x10154(%rip), %rsi     # 0x15e066
leaq 0x24668(%rip), %rdx     # 0x172581
leaq 0x40131(%rip), %rcx     # 0x18e051
leaq 0x400a2(%rip), %r8      # 0x18dfc9
movl $0x41, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x14df3b
movq 0x50(%rsp), %rdi
leaq 0x2ce6f(%rip), %rsi     # 0x17adb6
callq 0x21700
testb $0x1, %al
jne 0x14df55
jmp 0x14e0a8
movq 0x50(%rsp), %rdi
callq 0x20a10
cmpl $0x0, %eax
je 0x14df77
movq 0x50(%rsp), %rdi
callq 0x20a10
cmpl $0x1, %eax
jne 0x14e0a8
movq 0x50(%rsp), %rdi
callq 0x259f0
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x14dfe3
movq 0x66026(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x100aa(%rip), %rsi     # 0x15e066
leaq 0x400a7(%rip), %rdx     # 0x18e06a
leaq 0x40087(%rip), %rcx     # 0x18e051
leaq 0x3fff8(%rip), %r8      # 0x18dfc9
movl $0x47, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x14dfe5
movq 0x38(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, (%rsp)
movq 0x50(%rsp), %rdi
callq 0x258a0
movq (%rsp), %rdi
movq %rax, %rdx
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movq 0x40(%rsp), %r9
leaq 0x20(%rsp), %rsi
callq 0xe8c60
movl %eax, 0x1c(%rsp)
cmpl $0x0, 0x1c(%rsp)
jne 0x14e0a6
jmp 0x14e029
cmpq $0x0, 0x28(%rsp)
je 0x14e039
cmpq $0x0, 0x30(%rsp)
jne 0x14e071
movq 0x65f98(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x1001c(%rip), %rsi     # 0x15e066
leaq 0x4002b(%rip), %rdx     # 0x18e07c
leaq 0x3fff9(%rip), %rcx     # 0x18e051
leaq 0x3ff6a(%rip), %r8      # 0x18dfc9
movl $0x4c, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x14e073
movq 0x38(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x20(%rsp), %rcx
callq 0x151cf0
movq 0x20(%rsp), %rdi
leaq 0x3ff2d(%rip), %rsi     # 0x18dfc9
movl $0x4e, %edx
callq 0xdab0
jmp 0x14e0a8
movl 0x1c(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)