// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/cds_visitor.c
// Function: determine_ORFs_for_all_three_frames
static GtArray* determine_ORFs_for_all_three_frames(Splicedseq *ss,
                                                    bool start_codon,
                                                    bool final_stop_codon,
                                                    bool generic_start_codons)
{
  GtTranslatorStatus status;
  GtStr *pr[3], *start_codons[3];
  GtArray *orfs = NULL;
  GtTranslator *tr;
  char translated;
  int had_err = 0;
  unsigned int frame;
  GtCodonIterator *ci;
  bool start;
  gt_assert(ss);
  ci = gt_codon_iterator_simple_new(gt_splicedseq_get(ss),
                                    gt_splicedseq_length(ss),
                                    NULL);

  pr[0] = gt_str_new();
  pr[1] = gt_str_new();
  pr[2] = gt_str_new();
  start_codons[0] = generic_start_codons ? gt_str_new() : NULL;
  start_codons[1] = generic_start_codons ? gt_str_new() : NULL;
  start_codons[2] = generic_start_codons ? gt_str_new() : NULL;

  gt_assert(ci);
  tr = gt_translator_new(ci);
  status = gt_translator_next_with_start(tr, &translated, &frame, &start, NULL);
  while (status == GT_TRANSLATOR_OK) {
    gt_str_append_char(pr[frame], translated);
    if (generic_start_codons)
      gt_str_append_char(start_codons[frame], start ? GT_START_AMINO : '-');
    status = gt_translator_next_with_start(tr, &translated, &frame, &start,
                                           NULL);
  }
  if (status == GT_TRANSLATOR_ERROR)
    had_err = -1;

  if (!had_err) {
    orfs = gt_array_new(sizeof (GtRange));
    gt_determine_ORFs(save_orf, orfs, 0, gt_str_get(pr[0]),
                      gt_str_length(pr[0]), start_codon, final_stop_codon,
                      false, generic_start_codons ? gt_str_get(start_codons[0])
                                                  : NULL);
    gt_determine_ORFs(save_orf, orfs, 1, gt_str_get(pr[1]),
                      gt_str_length(pr[1]), start_codon, final_stop_codon,
                      false, generic_start_codons ? gt_str_get(start_codons[1])
                                                  : NULL);
    gt_determine_ORFs(save_orf, orfs, 2, gt_str_get(pr[2]),
                      gt_str_length(pr[2]), start_codon, final_stop_codon,
                      false, generic_start_codons ? gt_str_get(start_codons[2])
                                                  : NULL);
  }

  gt_str_delete(start_codons[2]);
  gt_str_delete(start_codons[1]);
  gt_str_delete(start_codons[0]);
  gt_str_delete(pr[2]);
  gt_str_delete(pr[1]);
  gt_str_delete(pr[0]);
  gt_translator_delete(tr);
  gt_codon_iterator_delete(ci);

  return orfs;
}

// Assembly:
subq $0x128, %rsp            # imm = 0x128
movb %cl, %al
movb %dl, %cl
movb %sil, %dl
movq %rdi, 0x120(%rsp)
andb $0x1, %dl
movb %dl, 0x11f(%rsp)
andb $0x1, %cl
movb %cl, 0x11e(%rsp)
andb $0x1, %al
movb %al, 0x11d(%rsp)
movq $0x0, 0xd8(%rsp)
movl $0x0, 0xc8(%rsp)
cmpq $0x0, 0x120(%rsp)
jne 0x14d8dd
movq 0x6672c(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x107b0(%rip), %rsi     # 0x15e066
leaq 0x168aa(%rip), %rdx     # 0x164167
leaq 0x407d1(%rip), %rcx     # 0x18e095
leaq 0x406fe(%rip), %r8      # 0x18dfc9
movl $0x77, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x14d8df
movq 0x120(%rsp), %rdi
callq 0x151e40
movq %rax, 0xa8(%rsp)
movq 0x120(%rsp), %rdi
callq 0x152130
movq 0xa8(%rsp), %rdi
movq %rax, %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0xe0180
movq %rax, 0xb8(%rsp)
callq 0x18f00
movq %rax, 0x100(%rsp)
callq 0x18f00
movq %rax, 0x108(%rsp)
callq 0x18f00
movq %rax, 0x110(%rsp)
testb $0x1, 0x11d(%rsp)
je 0x14d95d
callq 0x18f00
movq %rax, 0xa0(%rsp)
jmp 0x14d969
xorl %eax, %eax
movq %rax, 0xa0(%rsp)
jmp 0x14d969
movq 0xa0(%rsp), %rax
movq %rax, 0xe0(%rsp)
testb $0x1, 0x11d(%rsp)
je 0x14d992
callq 0x18f00
movq %rax, 0x98(%rsp)
jmp 0x14d99e
xorl %eax, %eax
movq %rax, 0x98(%rsp)
jmp 0x14d99e
movq 0x98(%rsp), %rax
movq %rax, 0xe8(%rsp)
testb $0x1, 0x11d(%rsp)
je 0x14d9c7
callq 0x18f00
movq %rax, 0x90(%rsp)
jmp 0x14d9d3
xorl %eax, %eax
movq %rax, 0x90(%rsp)
jmp 0x14d9d3
movq 0x90(%rsp), %rax
movq %rax, 0xf0(%rsp)
cmpq $0x0, 0xb8(%rsp)
jne 0x14da26
movq 0x665e3(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x10667(%rip), %rsi     # 0x15e066
leaq 0x2bb7f(%rip), %rdx     # 0x179585
leaq 0x40688(%rip), %rcx     # 0x18e095
leaq 0x405b5(%rip), %r8      # 0x18dfc9
movl $0x83, %r9d
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x14da28
movq 0xb8(%rsp), %rdi
callq 0xe59b0
movq %rax, 0xd0(%rsp)
movq 0xd0(%rsp), %rdi
leaq 0xcf(%rsp), %rsi
leaq 0xc4(%rsp), %rdx
leaq 0xb7(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0xe6120
movl %eax, 0x118(%rsp)
cmpl $0x0, 0x118(%rsp)
jne 0x14db06
movl 0xc4(%rsp), %eax
movq 0x100(%rsp,%rax,8), %rdi
movsbl 0xcf(%rsp), %esi
callq 0x194d0
testb $0x1, 0x11d(%rsp)
je 0x14dad0
movl 0xc4(%rsp), %eax
movq 0xe0(%rsp,%rax,8), %rdi
movb 0xb7(%rsp), %dl
movl $0x2d, %eax
movl $0x4d, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movsbl %al, %esi
callq 0x194d0
movq 0xd0(%rsp), %rdi
leaq 0xcf(%rsp), %rsi
leaq 0xc4(%rsp), %rdx
leaq 0xb7(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0xe6120
movl %eax, 0x118(%rsp)
jmp 0x14da6e
cmpl $-0x2, 0x118(%rsp)
jne 0x14db1b
movl $0xffffffff, 0xc8(%rsp) # imm = 0xFFFFFFFF
cmpl $0x0, 0xc8(%rsp)
jne 0x14dd7d
movl $0x10, %edi
callq 0x75ab0
movq %rax, 0xd8(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x100(%rsp), %rdi
callq 0x19940
movq %rax, 0x78(%rsp)
movq 0x100(%rsp), %rdi
callq 0x19a00
movq %rax, 0x80(%rsp)
movb 0x11f(%rsp), %al
movb %al, 0x8e(%rsp)
movb 0x11e(%rsp), %al
movb %al, 0x8f(%rsp)
testb $0x1, 0x11d(%rsp)
je 0x14dba9
movq 0xe0(%rsp), %rdi
callq 0x19940
movq %rax, 0x68(%rsp)
jmp 0x14dbb2
xorl %eax, %eax
movq %rax, 0x68(%rsp)
jmp 0x14dbb2
movq 0x80(%rsp), %r8
movq 0x78(%rsp), %rcx
movq 0x70(%rsp), %rsi
movb 0x8e(%rsp), %al
movb 0x8f(%rsp), %dil
movq 0x68(%rsp), %r9
xorl %edx, %edx
movq %rsp, %rdx
movq %r9, 0x10(%rdx)
movzbl %dil, %edi
andl $0x1, %edi
movl %edi, (%rdx)
movl $0x0, 0x8(%rdx)
movzbl %al, %r9d
andl $0x1, %r9d
leaq 0x4c0(%rip), %rdi       # 0x14e0c0
xorl %edx, %edx
callq 0x159d10
movq 0xd8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x108(%rsp), %rdi
callq 0x19940
movq %rax, 0x50(%rsp)
movq 0x108(%rsp), %rdi
callq 0x19a00
movq %rax, 0x58(%rsp)
movb 0x11f(%rsp), %al
movb %al, 0x66(%rsp)
movb 0x11e(%rsp), %al
movb %al, 0x67(%rsp)
testb $0x1, 0x11d(%rsp)
je 0x14dc6c
movq 0xe8(%rsp), %rdi
callq 0x19940
movq %rax, 0x40(%rsp)
jmp 0x14dc75
xorl %eax, %eax
movq %rax, 0x40(%rsp)
jmp 0x14dc75
movq 0x58(%rsp), %r8
movq 0x50(%rsp), %rcx
movq 0x48(%rsp), %rsi
movb 0x66(%rsp), %al
movb 0x67(%rsp), %dil
movq 0x40(%rsp), %r9
movq %rsp, %rdx
movq %r9, 0x10(%rdx)
movzbl %dil, %edi
andl $0x1, %edi
movl %edi, (%rdx)
movl $0x0, 0x8(%rdx)
movzbl %al, %r9d
andl $0x1, %r9d
leaq 0x408(%rip), %rdi       # 0x14e0c0
movl $0x1, %edx
callq 0x159d10
movq 0xd8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x110(%rsp), %rdi
callq 0x19940
movq %rax, 0x28(%rsp)
movq 0x110(%rsp), %rdi
callq 0x19a00
movq %rax, 0x30(%rsp)
movb 0x11f(%rsp), %al
movb %al, 0x3e(%rsp)
movb 0x11e(%rsp), %al
movb %al, 0x3f(%rsp)
testb $0x1, 0x11d(%rsp)
je 0x14dd27
movq 0xf0(%rsp), %rdi
callq 0x19940
movq %rax, 0x18(%rsp)
jmp 0x14dd30
xorl %eax, %eax
movq %rax, 0x18(%rsp)
jmp 0x14dd30
movq 0x30(%rsp), %r8
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %rsi
movb 0x3e(%rsp), %al
movb 0x3f(%rsp), %dil
movq 0x18(%rsp), %r9
movq %rsp, %rdx
movq %r9, 0x10(%rdx)
movzbl %dil, %edi
andl $0x1, %edi
movl %edi, (%rdx)
movl $0x0, 0x8(%rdx)
movzbl %al, %r9d
andl $0x1, %r9d
leaq 0x34d(%rip), %rdi       # 0x14e0c0
movl $0x2, %edx
callq 0x159d10
movq 0xf0(%rsp), %rdi
callq 0x1afc0
movq 0xe8(%rsp), %rdi
callq 0x1afc0
movq 0xe0(%rsp), %rdi
callq 0x1afc0
movq 0x110(%rsp), %rdi
callq 0x1afc0
movq 0x108(%rsp), %rdi
callq 0x1afc0
movq 0x100(%rsp), %rdi
callq 0x1afc0
movq 0xd0(%rsp), %rdi
callq 0xe6310
movq 0xb8(%rsp), %rdi
callq 0xdfde0
movq 0xd8(%rsp), %rax
addq $0x128, %rsp            # imm = 0x128
retq
nopw %cs:(%rax,%rax)