// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/core/trans_table.c
// Function: codon2amino
static inline char codon2amino(const char *aminos, bool forward,
                               unsigned char c0, unsigned char c1,
                               unsigned char c2,
                               unsigned int *coderet,
                               GtError *err)
{
  unsigned int code = 0;
  char aa;

  switch (c0)
  {
    case 'a':
    case 'A':
      if (forward)
      {
        code = ((unsigned int) GT_A_CODE << 4);
      } else
      {
        code = 0;
      }
      break;
    case 'c':
    case 'C':
      if (forward)
      {
        code = ((unsigned int) GT_C_CODE << 4);
      } else
      {
        code = ((unsigned int) GT_G_CODE << 4);
      }
      break;
    case 'g':
    case 'G':
      if (forward)
      {
        code = ((unsigned int) GT_G_CODE << 4);
      } else
      {
        code = ((unsigned int) GT_C_CODE << 4);
      }
      break;
    case 't':
    case 'T':
    case 'u':
    case 'U':
      if (forward)
      {
        code = 0;
      } else
      {
        code = ((unsigned int) GT_A_CODE << 4);
      }
      break;
    GT_CASEWILDCARD:
      /* code = (smallestbase(wbitsvector[(int) c0]) << 4);
        break; */
      return 'X';
    default:
      GT_ILLEGALCHAR(c0);
  }
  switch (c1)
  {
    case 'a':
    case 'A':
      if (forward)
      {
        code += (GT_A_CODE << 2);
      }
      break;
    case 'c':
    case 'C':
      if (forward)
      {
        code += (GT_C_CODE << 2);
      } else
      {
        code += (GT_G_CODE << 2);
      }
      break;
    case 'g':
    case 'G':
      if (forward)
      {
        code += (GT_G_CODE << 2);
      } else
      {
        code += (GT_C_CODE << 2);
      }
      break;
    case 't':
    case 'T':
    case 'u':
    case 'U':
      if (!forward)
      {
        code += (GT_A_CODE << 2);
      }
      break;
    GT_CASEWILDCARD:
      /* code += (smallestbase(wbitsvector[(int) c1]) << 2);
         break; */
      return 'X';
    default:
      GT_ILLEGALCHAR(c1);
  }
  switch (c2)
  {
    case 'a':
    case 'A':
      if (forward)
      {
        code += GT_A_CODE;
      }
      break;
    case 'c':
    case 'C':
      if (forward)
      {
        code += GT_C_CODE;
      } else
      {
        code += GT_G_CODE;
      }
      break;
    case 'g':
    case 'G':
      if (forward)
      {
        code += GT_G_CODE;
      } else
      {
        code += GT_C_CODE;
      }
      break;
    case 't':
    case 'T':
    case 'u':
    case 'U':
      if (!forward)
      {
        code += GT_A_CODE;
      }
      break;
    GT_CASEWILDCARD:
      aa = equivalentbits(aminos,code,c2);
      if (aa == GT_AMINOACIDFAIL)
      {
        /* no unique aminoacid */
        return 'X';
      } else
      {
        if (coderet != NULL)
        {
          *coderet = code;
        }
        return aa;
      }
    default:
      GT_ILLEGALCHAR(c2);
  }
  if (coderet != NULL)
    *coderet = code;
  return aminos[code];
}

// Assembly:
subq $0x48, %rsp
movb %r8b, %al
movq 0x50(%rsp), %r8
movq %rdi, 0x38(%rsp)
andb $0x1, %sil
movb %sil, 0x37(%rsp)
movb %dl, 0x36(%rsp)
movb %cl, 0x35(%rsp)
movb %al, 0x34(%rsp)
movq %r9, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movzbl 0x36(%rsp), %eax
addl $-0x41, %eax
movl %eax, %ecx
movq %rcx, 0x18(%rsp)
subl $0x38, %eax
ja 0x14c759
movq 0x18(%rsp), %rax
leaq 0x40a21(%rip), %rcx     # 0x18d0f8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testb $0x1, 0x37(%rsp)
je 0x14c6f1
movl $0x20, 0x24(%rsp)
jmp 0x14c6f9
movl $0x0, 0x24(%rsp)
jmp 0x14c78a
testb $0x1, 0x37(%rsp)
je 0x14c70f
movl $0x10, 0x24(%rsp)
jmp 0x14c717
movl $0x30, 0x24(%rsp)
jmp 0x14c78a
testb $0x1, 0x37(%rsp)
je 0x14c72a
movl $0x30, 0x24(%rsp)
jmp 0x14c732
movl $0x10, 0x24(%rsp)
jmp 0x14c78a
testb $0x1, 0x37(%rsp)
je 0x14c745
movl $0x0, 0x24(%rsp)
jmp 0x14c74d
movl $0x20, 0x24(%rsp)
jmp 0x14c78a
movb $0x58, 0x47(%rsp)
jmp 0x14c995
movq 0x50(%rsp), %rdi
movzbl 0x36(%rsp), %ecx
movzbl 0x36(%rsp), %eax
movl %eax, %r8d
leaq 0x417f7(%rip), %rsi     # 0x18df69
leaq 0x4180a(%rip), %rdx     # 0x18df83
movb $0x0, %al
callq 0xc0d0
movb $0x0, 0x47(%rsp)
jmp 0x14c995
movzbl 0x35(%rsp), %eax
addl $-0x41, %eax
movl %eax, %ecx
movq %rcx, 0x10(%rsp)
subl $0x38, %eax
ja 0x14c82e
movq 0x10(%rsp), %rax
leaq 0x40a2e(%rip), %rcx     # 0x18d1dc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testb $0x1, 0x37(%rsp)
je 0x14c7c9
movl 0x24(%rsp), %eax
addl $0x8, %eax
movl %eax, 0x24(%rsp)
jmp 0x14c85f
testb $0x1, 0x37(%rsp)
je 0x14c7e2
movl 0x24(%rsp), %eax
addl $0x4, %eax
movl %eax, 0x24(%rsp)
jmp 0x14c7ed
movl 0x24(%rsp), %eax
addl $0xc, %eax
movl %eax, 0x24(%rsp)
jmp 0x14c85f
testb $0x1, 0x37(%rsp)
je 0x14c803
movl 0x24(%rsp), %eax
addl $0xc, %eax
movl %eax, 0x24(%rsp)
jmp 0x14c80e
movl 0x24(%rsp), %eax
addl $0x4, %eax
movl %eax, 0x24(%rsp)
jmp 0x14c85f
testb $0x1, 0x37(%rsp)
jne 0x14c822
movl 0x24(%rsp), %eax
addl $0x8, %eax
movl %eax, 0x24(%rsp)
jmp 0x14c85f
movb $0x58, 0x47(%rsp)
jmp 0x14c995
movq 0x50(%rsp), %rdi
movzbl 0x35(%rsp), %ecx
movzbl 0x35(%rsp), %eax
movl %eax, %r8d
leaq 0x41722(%rip), %rsi     # 0x18df69
leaq 0x41738(%rip), %rdx     # 0x18df86
movb $0x0, %al
callq 0xc0d0
movb $0x0, 0x47(%rsp)
jmp 0x14c995
movzbl 0x34(%rsp), %eax
addl $-0x41, %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x38, %eax
ja 0x14c944
movq 0x8(%rsp), %rax
leaq 0x40a3d(%rip), %rcx     # 0x18d2c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
testb $0x1, 0x37(%rsp)
je 0x14c89e
movl 0x24(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x24(%rsp)
jmp 0x14c972
testb $0x1, 0x37(%rsp)
je 0x14c8b7
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x14c8c2
movl 0x24(%rsp), %eax
addl $0x3, %eax
movl %eax, 0x24(%rsp)
jmp 0x14c972
testb $0x1, 0x37(%rsp)
je 0x14c8db
movl 0x24(%rsp), %eax
addl $0x3, %eax
movl %eax, 0x24(%rsp)
jmp 0x14c8e6
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x14c972
testb $0x1, 0x37(%rsp)
jne 0x14c8fd
movl 0x24(%rsp), %eax
addl $0x2, %eax
movl %eax, 0x24(%rsp)
jmp 0x14c972
movq 0x38(%rsp), %rdi
movl 0x24(%rsp), %esi
movzbl 0x34(%rsp), %edx
callq 0x14d080
movb %al, 0x23(%rsp)
movsbl 0x23(%rsp), %eax
cmpl $0x0, %eax
jne 0x14c927
movb $0x58, 0x47(%rsp)
jmp 0x14c995
cmpq $0x0, 0x28(%rsp)
je 0x14c93a
movl 0x24(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, (%rax)
movb 0x23(%rsp), %al
movb %al, 0x47(%rsp)
jmp 0x14c995
movq 0x50(%rsp), %rdi
movzbl 0x34(%rsp), %ecx
movzbl 0x34(%rsp), %eax
movl %eax, %r8d
leaq 0x4160c(%rip), %rsi     # 0x18df69
leaq 0x27e9a(%rip), %rdx     # 0x1747fe
movb $0x0, %al
callq 0xc0d0
movb $0x0, 0x47(%rsp)
jmp 0x14c995
cmpq $0x0, 0x28(%rsp)
je 0x14c985
movl 0x24(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, (%rax)
movq 0x38(%rsp), %rax
movl 0x24(%rsp), %ecx
movb (%rax,%rcx), %al
movb %al, 0x47(%rsp)
movb 0x47(%rsp), %al
addq $0x48, %rsp
retq
nop