// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_seqtranslate.c
// Function: gt_seqtranslate_do_translation
static int gt_seqtranslate_do_translation(GtTranslateArguments *arguments,
                                       const char *sequence,
                                       GtUword length,
                                       const char *desc,
                                       GtStr **translations,
                                       bool rev,
                                       GtError *err)
{
  GtTranslator *tr;
  GT_UNUSED GtTranslatorStatus trst;
  GtCodonIterator *ci;
  char translated;
  int had_err = 0;
  GtStr *str;
  unsigned int frame,
               i;

  ci = gt_codon_iterator_simple_new(sequence, length, err);
  tr = gt_translator_new(ci);
  trst = gt_translator_next(tr, &translated, &frame, err);
  while (trst == GT_TRANSLATOR_OK) {
    gt_str_append_char(translations[frame], translated);
    trst = gt_translator_next(tr, &translated, &frame, err);
  }
  gt_codon_iterator_delete(ci);
  gt_translator_delete(tr);
  if (trst == GT_TRANSLATOR_ERROR)
    return -1;
  str = gt_str_new();
  for (i = 0; i < 3; i++) {
    if (gt_str_length(translations[i]) > 0) {
      gt_str_append_cstr(str, desc);
      gt_str_append_cstr(str, " (");
      gt_str_append_uword(str, i+1);
      gt_str_append_cstr(str, rev ? "-" : "+");
      gt_str_append_cstr(str, ")");
      gt_fasta_show_entry(gt_str_get(str), gt_str_get(translations[i]),
                          gt_str_length(translations[i]),
                          arguments->fasta_width, arguments->outfp);
      gt_str_reset(translations[i]);
      gt_str_reset(str);
    }
  }
  gt_str_delete(str);
  return had_err;
}

// Assembly:
subq $0x78, %rsp
movb %r9b, %al
movq 0x80(%rsp), %r9
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
movq %rcx, 0x50(%rsp)
movq %r8, 0x48(%rsp)
andb $0x1, %al
movb %al, 0x47(%rsp)
movl $0x0, 0x20(%rsp)
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x80(%rsp), %rdx
callq 0xa07e0
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0x124e10
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
movq 0x80(%rsp), %rcx
leaq 0x27(%rsp), %rsi
leaq 0x14(%rsp), %rdx
callq 0x125540
movl %eax, 0x34(%rsp)
cmpl $0x0, 0x34(%rsp)
jne 0x68411
movq 0x48(%rsp), %rax
movl 0x14(%rsp), %ecx
movq (%rax,%rcx,8), %rdi
movsbl 0x27(%rsp), %esi
callq 0x11da70
movq 0x38(%rsp), %rdi
movq 0x80(%rsp), %rcx
leaq 0x27(%rsp), %rsi
leaq 0x14(%rsp), %rdx
callq 0x125540
movl %eax, 0x34(%rsp)
jmp 0x683d1
movq 0x28(%rsp), %rdi
callq 0x9f800
movq 0x38(%rsp), %rdi
callq 0x125770
cmpl $-0x2, 0x34(%rsp)
jne 0x68439
movl $0xffffffff, 0x74(%rsp) # imm = 0xFFFFFFFF
jmp 0x68575
callq 0x11d4a0
movq %rax, 0x18(%rsp)
movl $0x0, 0x10(%rsp)
cmpl $0x3, 0x10(%rsp)
jae 0x68563
movq 0x48(%rsp), %rax
movl 0x10(%rsp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jbe 0x68551
movq 0x18(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x11d550
movq 0x18(%rsp), %rdi
leaq 0x52a9d0(%rip), %rsi    # 0x592e5d
callq 0x11d550
movq 0x18(%rsp), %rdi
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x11d930
movq 0x18(%rsp), %rdi
movb 0x47(%rsp), %cl
leaq 0x52acc1(%rip), %rsi    # 0x593178
leaq 0x532e69(%rip), %rax    # 0x59b327
testb $0x1, %cl
cmovneq %rax, %rsi
callq 0x11d550
movq 0x18(%rsp), %rdi
leaq 0x5450a4(%rip), %rsi    # 0x5ad57a
callq 0x11d550
movq 0x18(%rsp), %rdi
callq 0x11dee0
movq %rax, (%rsp)
movq 0x48(%rsp), %rax
movl 0x10(%rsp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x11dee0
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rax
movl 0x10(%rsp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x11dfa0
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
movq 0x68(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x68(%rsp), %rax
movq 0x8(%rax), %r8
callq 0xdbd10
movq 0x48(%rsp), %rax
movl 0x10(%rsp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x11e110
movq 0x18(%rsp), %rdi
callq 0x11e110
jmp 0x68553
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x6844b
movq 0x18(%rsp), %rdi
callq 0x11f560
movl 0x20(%rsp), %eax
movl %eax, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nop