#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
scalar_t__ strncmp(char *, char *, int);
char aa_3letter_to_1letter(char *resName) {
  if ((strncmp(resName, "SER", 3) == 0))
    return 'S';
  if ((strncmp(resName, "PHE", 3) == 0))
    return 'F';
  if ((strncmp(resName, "THR", 3) == 0))
    return 'T';
  if ((strncmp(resName, "ASN", 3) == 0))
    return 'N';
  if ((strncmp(resName, "LYS", 3) == 0))
    return 'K';
  if ((strncmp(resName, "GLU", 3) == 0))
    return 'E';
  if ((strncmp(resName, "TYR", 3) == 0))
    return 'Y';
  if ((strncmp(resName, "VAL", 3) == 0))
    return 'V';
  if ((strncmp(resName, "GLN", 3) == 0))
    return 'Q';
  if ((strncmp(resName, "MET", 3) == 0))
    return 'M';
  if ((strncmp(resName, "CYS", 3) == 0))
    return 'C';
  if ((strncmp(resName, "LEU", 3) == 0))
    return 'L';
  if ((strncmp(resName, "ALA", 3) == 0))
    return 'A';
  if ((strncmp(resName, "TRP", 3) == 0))
    return 'W';
  if ((strncmp(resName, "PRO", 3) == 0))
    return 'P';
  if ((strncmp(resName, "HIS", 3) == 0))
    return 'H';
  if ((strncmp(resName, "HSD", 3) == 0))
    return 'H';
  if ((strncmp(resName, "HSE", 3) == 0))
    return 'H';
  if ((strncmp(resName, "HSP", 3) == 0))
    return 'H';
  if ((strncmp(resName, "ASP", 3) == 0))
    return 'D';
  if ((strncmp(resName, "ARG", 3) == 0))
    return 'R';
  if ((strncmp(resName, "ILE", 3) == 0))
    return 'I';
  if ((strncmp(resName, "GLY", 3) == 0))
    return 'G';
  else {
    fprintf(stderr, "ERROR: Unknown residue:%s!\n", resName);
    exit(EXIT_FAILURE);
    return 'X';
  }
}


x86 assembly (clang, -O0):
<aa_3letter_to_1letter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb9(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1164 <aa_3letter_to_1letter+0x34>
movb   $0x53,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xe95(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    118c <aa_3letter_to_1letter+0x5c>
movb   $0x46,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xe71(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11b4 <aa_3letter_to_1letter+0x84>
movb   $0x54,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xe4d(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11dc <aa_3letter_to_1letter+0xac>
movb   $0x4e,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xe29(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1204 <aa_3letter_to_1letter+0xd4>
movb   $0x4b,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xe05(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    122c <aa_3letter_to_1letter+0xfc>
movb   $0x45,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xde1(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1254 <aa_3letter_to_1letter+0x124>
movb   $0x59,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xdbd(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    127c <aa_3letter_to_1letter+0x14c>
movb   $0x56,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xd99(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12a4 <aa_3letter_to_1letter+0x174>
movb   $0x51,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xd75(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12cc <aa_3letter_to_1letter+0x19c>
movb   $0x4d,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xd51(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12f4 <aa_3letter_to_1letter+0x1c4>
movb   $0x43,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xd2d(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    131c <aa_3letter_to_1letter+0x1ec>
movb   $0x4c,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xd09(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1344 <aa_3letter_to_1letter+0x214>
movb   $0x41,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xce5(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    136c <aa_3letter_to_1letter+0x23c>
movb   $0x57,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xcc1(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1394 <aa_3letter_to_1letter+0x264>
movb   $0x50,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xc9d(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    13bc <aa_3letter_to_1letter+0x28c>
movb   $0x48,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xc79(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    13e4 <aa_3letter_to_1letter+0x2b4>
movb   $0x48,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xc55(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    140c <aa_3letter_to_1letter+0x2dc>
movb   $0x48,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xc31(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1434 <aa_3letter_to_1letter+0x304>
movb   $0x48,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xc0d(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    145c <aa_3letter_to_1letter+0x32c>
movb   $0x44,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xbe9(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1484 <aa_3letter_to_1letter+0x354>
movb   $0x52,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xbc5(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    14ac <aa_3letter_to_1letter+0x37c>
movb   $0x49,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    -0x10(%rbp),%rdi
lea    0xba1(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    14d4 <aa_3letter_to_1letter+0x3a4>
movb   $0x47,-0x1(%rbp)
jmp    14fb <aa_3letter_to_1letter+0x3cb>
mov    0x2b05(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xb74(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2ae4(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_3letter_to_1letter>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xec2(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     13f5 <aa_3letter_to_1letter+0x2c5>
lea    0xeac(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     13f9 <aa_3letter_to_1letter+0x2c9>
lea    0xe93(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     13fd <aa_3letter_to_1letter+0x2cd>
lea    0xe7a(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1401 <aa_3letter_to_1letter+0x2d1>
lea    0xe61(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1405 <aa_3letter_to_1letter+0x2d5>
lea    0xe48(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1409 <aa_3letter_to_1letter+0x2d9>
lea    0xe2f(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     140d <aa_3letter_to_1letter+0x2dd>
lea    0xe16(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1411 <aa_3letter_to_1letter+0x2e1>
lea    0xdfd(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1415 <aa_3letter_to_1letter+0x2e5>
lea    0xde4(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1419 <aa_3letter_to_1letter+0x2e9>
lea    0xdcb(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     141d <aa_3letter_to_1letter+0x2ed>
lea    0xdb2(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1421 <aa_3letter_to_1letter+0x2f1>
lea    0xd99(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1425 <aa_3letter_to_1letter+0x2f5>
lea    0xd80(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1429 <aa_3letter_to_1letter+0x2f9>
lea    0xd67(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     142d <aa_3letter_to_1letter+0x2fd>
lea    0xd4e(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
mov    $0x48,%bl
test   %rax,%rax
je     142f <aa_3letter_to_1letter+0x2ff>
lea    0xd33(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     142f <aa_3letter_to_1letter+0x2ff>
lea    0xd1a(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     142f <aa_3letter_to_1letter+0x2ff>
lea    0xd01(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     142f <aa_3letter_to_1letter+0x2ff>
lea    0xce8(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1439 <aa_3letter_to_1letter+0x309>
lea    0xccf(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     143d <aa_3letter_to_1letter+0x30d>
lea    0xcb6(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1441 <aa_3letter_to_1letter+0x311>
lea    0xc9d(%rip),%rsi
mov    %r14,%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
mov    $0x47,%bl
test   %rax,%rax
je     142f <aa_3letter_to_1letter+0x2ff>
mov    0x2c0a(%rip),%rax
mov    (%rax),%edi
lea    0xc7d(%rip),%rsi
mov    %r14,%rdx
call   1040 <fprintf@plt>
mov    0x2bea(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    $0x53,%bl
jmp    142f <aa_3letter_to_1letter+0x2ff>
mov    $0x46,%bl
jmp    142f <aa_3letter_to_1letter+0x2ff>
mov    $0x54,%bl
jmp    142f <aa_3letter_to_1letter+0x2ff>
mov    $0x4e,%bl
jmp    142f <aa_3letter_to_1letter+0x2ff>
mov    $0x4b,%bl
jmp    142f <aa_3letter_to_1letter+0x2ff>
mov    $0x45,%bl
jmp    142f <aa_3letter_to_1letter+0x2ff>
mov    $0x59,%bl
jmp    142f <aa_3letter_to_1letter+0x2ff>
mov    $0x56,%bl
jmp    142f <aa_3letter_to_1letter+0x2ff>
mov    $0x51,%bl
jmp    142f <aa_3letter_to_1letter+0x2ff>
mov    $0x4d,%bl
jmp    142f <aa_3letter_to_1letter+0x2ff>
mov    $0x43,%bl
jmp    142f <aa_3letter_to_1letter+0x2ff>
mov    $0x4c,%bl
jmp    142f <aa_3letter_to_1letter+0x2ff>
mov    $0x41,%bl
jmp    142f <aa_3letter_to_1letter+0x2ff>
mov    $0x57,%bl
jmp    142f <aa_3letter_to_1letter+0x2ff>
mov    $0x50,%bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    $0x44,%bl
jmp    142f <aa_3letter_to_1letter+0x2ff>
mov    $0x52,%bl
jmp    142f <aa_3letter_to_1letter+0x2ff>
mov    $0x49,%bl
jmp    142f <aa_3letter_to_1letter+0x2ff>

LLVM IR (-O0):
@.str = [4 x i8] c"SER\00"
@.str.1 = [4 x i8] c"PHE\00"
@.str.2 = [4 x i8] c"THR\00"
@.str.3 = [4 x i8] c"ASN\00"
@.str.4 = [4 x i8] c"LYS\00"
@.str.5 = [4 x i8] c"GLU\00"
@.str.6 = [4 x i8] c"TYR\00"
@.str.7 = [4 x i8] c"VAL\00"
@.str.8 = [4 x i8] c"GLN\00"
@.str.9 = [4 x i8] c"MET\00"
@.str.10 = [4 x i8] c"CYS\00"
@.str.11 = [4 x i8] c"LEU\00"
@.str.12 = [4 x i8] c"ALA\00"
@.str.13 = [4 x i8] c"TRP\00"
@.str.14 = [4 x i8] c"PRO\00"
@.str.15 = [4 x i8] c"HIS\00"
@.str.16 = [4 x i8] c"HSD\00"
@.str.17 = [4 x i8] c"HSE\00"
@.str.18 = [4 x i8] c"HSP\00"
@.str.19 = [4 x i8] c"ASP\00"
@.str.20 = [4 x i8] c"ARG\00"
@.str.21 = [4 x i8] c"ILE\00"
@.str.22 = [4 x i8] c"GLY\00"
@stderr = global i32 0
@.str.23 = [28 x i8] c"ERROR: Unknown residue:%s!\0A\00"
@EXIT_FAILURE = global i32 0
define signext i8 @aa_3letter_to_1letter(i8* %0) {
%2 = alloca i8
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 83, i8* %2
br label %124
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @strncmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 70, i8* %2
br label %124
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = call i64 @strncmp(i8* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 3)
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13
store i8 84, i8* %2
br label %124
18: ; preds = %13
%19 = load i8*, i8** %3
%20 = call i64 @strncmp(i8* %19, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %18
store i8 78, i8* %2
br label %124
23: ; preds = %18
%24 = load i8*, i8** %3
%25 = call i64 @strncmp(i8* %24, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %28
27: ; preds = %23
store i8 75, i8* %2
br label %124
28: ; preds = %23
%29 = load i8*, i8** %3
%30 = call i64 @strncmp(i8* %29, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 3)
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %33
32: ; preds = %28
store i8 69, i8* %2
br label %124
33: ; preds = %28
%34 = load i8*, i8** %3
%35 = call i64 @strncmp(i8* %34, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 3)
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %38
37: ; preds = %33
store i8 89, i8* %2
br label %124
38: ; preds = %33
%39 = load i8*, i8** %3
%40 = call i64 @strncmp(i8* %39, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %43
42: ; preds = %38
store i8 86, i8* %2
br label %124
43: ; preds = %38
%44 = load i8*, i8** %3
%45 = call i64 @strncmp(i8* %44, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %48
47: ; preds = %43
store i8 81, i8* %2
br label %124
48: ; preds = %43
%49 = load i8*, i8** %3
%50 = call i64 @strncmp(i8* %49, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 3)
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %53
52: ; preds = %48
store i8 77, i8* %2
br label %124
53: ; preds = %48
%54 = load i8*, i8** %3
%55 = call i64 @strncmp(i8* %54, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 3)
%56 = icmp eq i64 %55, 0
br i1 %56, label %57, label %58
57: ; preds = %53
store i8 67, i8* %2
br label %124
58: ; preds = %53
%59 = load i8*, i8** %3
%60 = call i64 @strncmp(i8* %59, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 3)
%61 = icmp eq i64 %60, 0
br i1 %61, label %62, label %63
62: ; preds = %58
store i8 76, i8* %2
br label %124
63: ; preds = %58
%64 = load i8*, i8** %3
%65 = call i64 @strncmp(i8* %64, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i32 3)
%66 = icmp eq i64 %65, 0
br i1 %66, label %67, label %68
67: ; preds = %63
store i8 65, i8* %2
br label %124
68: ; preds = %63
%69 = load i8*, i8** %3
%70 = call i64 @strncmp(i8* %69, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i32 3)
%71 = icmp eq i64 %70, 0
br i1 %71, label %72, label %73
72: ; preds = %68
store i8 87, i8* %2
br label %124
73: ; preds = %68
%74 = load i8*, i8** %3
%75 = call i64 @strncmp(i8* %74, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 3)
%76 = icmp eq i64 %75, 0
br i1 %76, label %77, label %78
77: ; preds = %73
store i8 80, i8* %2
br label %124
78: ; preds = %73
%79 = load i8*, i8** %3
%80 = call i64 @strncmp(i8* %79, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i32 3)
%81 = icmp eq i64 %80, 0
br i1 %81, label %82, label %83
82: ; preds = %78
store i8 72, i8* %2
br label %124
83: ; preds = %78
%84 = load i8*, i8** %3
%85 = call i64 @strncmp(i8* %84, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 3)
%86 = icmp eq i64 %85, 0
br i1 %86, label %87, label %88
87: ; preds = %83
store i8 72, i8* %2
br label %124
88: ; preds = %83
%89 = load i8*, i8** %3
%90 = call i64 @strncmp(i8* %89, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0), i32 3)
%91 = icmp eq i64 %90, 0
br i1 %91, label %92, label %93
92: ; preds = %88
store i8 72, i8* %2
br label %124
93: ; preds = %88
%94 = load i8*, i8** %3
%95 = call i64 @strncmp(i8* %94, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0), i32 3)
%96 = icmp eq i64 %95, 0
br i1 %96, label %97, label %98
97: ; preds = %93
store i8 72, i8* %2
br label %124
98: ; preds = %93
%99 = load i8*, i8** %3
%100 = call i64 @strncmp(i8* %99, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i32 3)
%101 = icmp eq i64 %100, 0
br i1 %101, label %102, label %103
102: ; preds = %98
store i8 68, i8* %2
br label %124
103: ; preds = %98
%104 = load i8*, i8** %3
%105 = call i64 @strncmp(i8* %104, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0), i32 3)
%106 = icmp eq i64 %105, 0
br i1 %106, label %107, label %108
107: ; preds = %103
store i8 82, i8* %2
br label %124
108: ; preds = %103
%109 = load i8*, i8** %3
%110 = call i64 @strncmp(i8* %109, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 3)
%111 = icmp eq i64 %110, 0
br i1 %111, label %112, label %113
112: ; preds = %108
store i8 73, i8* %2
br label %124
113: ; preds = %108
%114 = load i8*, i8** %3
%115 = call i64 @strncmp(i8* %114, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i32 3)
%116 = icmp eq i64 %115, 0
br i1 %116, label %117, label %118
117: ; preds = %113
store i8 71, i8* %2
br label %124
118: ; preds = %113
%119 = load i32, i32* @stderr
%120 = load i8*, i8** %3
%121 = call i32 @fprintf(i32 %119, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.23, i64 0, i64 0), i8* %120)
%122 = load i32, i32* @EXIT_FAILURE
%123 = call i32 @exit(i32 %122)
unreachable
124: ; preds = %117, %112, %107, %102, %97, %92, %87, %82, %77, %72, %67, %62, %57, %52, %47, %42, %37, %32, %27, %22, %17, %12, %7
%125 = load i8, i8* %2
ret i8 %125
}

LLVM IR (-O2):
@.str = [4 x i8] c"SER\00"
@.str.1 = [4 x i8] c"PHE\00"
@.str.2 = [4 x i8] c"THR\00"
@.str.3 = [4 x i8] c"ASN\00"
@.str.4 = [4 x i8] c"LYS\00"
@.str.5 = [4 x i8] c"GLU\00"
@.str.6 = [4 x i8] c"TYR\00"
@.str.7 = [4 x i8] c"VAL\00"
@.str.8 = [4 x i8] c"GLN\00"
@.str.9 = [4 x i8] c"MET\00"
@.str.10 = [4 x i8] c"CYS\00"
@.str.11 = [4 x i8] c"LEU\00"
@.str.12 = [4 x i8] c"ALA\00"
@.str.13 = [4 x i8] c"TRP\00"
@.str.14 = [4 x i8] c"PRO\00"
@.str.15 = [4 x i8] c"HIS\00"
@.str.16 = [4 x i8] c"HSD\00"
@.str.17 = [4 x i8] c"HSE\00"
@.str.18 = [4 x i8] c"HSP\00"
@.str.19 = [4 x i8] c"ASP\00"
@.str.20 = [4 x i8] c"ARG\00"
@.str.21 = [4 x i8] c"ILE\00"
@.str.22 = [4 x i8] c"GLY\00"
@stderr = global i32 0
@.str.23 = [28 x i8] c"ERROR: Unknown residue:%s!\0A\00"
@EXIT_FAILURE = global i32 0
define signext i8 @aa_3letter_to_1letter(i8* %0) {
%2 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%3 = icmp eq i64 %2, 0
br i1 %3, label %75, label %4
4: ; preds = %1
%5 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %75, label %7
7: ; preds = %4
%8 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 3)
%9 = icmp eq i64 %8, 0
br i1 %9, label %75, label %10
10: ; preds = %7
%11 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 3)
%12 = icmp eq i64 %11, 0
br i1 %12, label %75, label %13
13: ; preds = %10
%14 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 3)
%15 = icmp eq i64 %14, 0
br i1 %15, label %75, label %16
16: ; preds = %13
%17 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i32 3)
%18 = icmp eq i64 %17, 0
br i1 %18, label %75, label %19
19: ; preds = %16
%20 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 3)
%21 = icmp eq i64 %20, 0
br i1 %21, label %75, label %22
22: ; preds = %19
%23 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32 3)
%24 = icmp eq i64 %23, 0
br i1 %24, label %75, label %25
25: ; preds = %22
%26 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i32 3)
%27 = icmp eq i64 %26, 0
br i1 %27, label %75, label %28
28: ; preds = %25
%29 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 3)
%30 = icmp eq i64 %29, 0
br i1 %30, label %75, label %31
31: ; preds = %28
%32 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i32 3)
%33 = icmp eq i64 %32, 0
br i1 %33, label %75, label %34
34: ; preds = %31
%35 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i32 3)
%36 = icmp eq i64 %35, 0
br i1 %36, label %75, label %37
37: ; preds = %34
%38 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i64 0, i64 0), i32 3)
%39 = icmp eq i64 %38, 0
br i1 %39, label %75, label %40
40: ; preds = %37
%41 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i64 0, i64 0), i32 3)
%42 = icmp eq i64 %41, 0
br i1 %42, label %75, label %43
43: ; preds = %40
%44 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i32 3)
%45 = icmp eq i64 %44, 0
br i1 %45, label %75, label %46
46: ; preds = %43
%47 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i64 0, i64 0), i32 3)
%48 = icmp eq i64 %47, 0
br i1 %48, label %75, label %49
49: ; preds = %46
%50 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i32 3)
%51 = icmp eq i64 %50, 0
br i1 %51, label %75, label %52
52: ; preds = %49
%53 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i64 0, i64 0), i32 3)
%54 = icmp eq i64 %53, 0
br i1 %54, label %75, label %55
55: ; preds = %52
%56 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i64 0, i64 0), i32 3)
%57 = icmp eq i64 %56, 0
br i1 %57, label %75, label %58
58: ; preds = %55
%59 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i64 0, i64 0), i32 3)
%60 = icmp eq i64 %59, 0
br i1 %60, label %75, label %61
61: ; preds = %58
%62 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0), i32 3)
%63 = icmp eq i64 %62, 0
br i1 %63, label %75, label %64
64: ; preds = %61
%65 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i64 0, i64 0), i32 3)
%66 = icmp eq i64 %65, 0
br i1 %66, label %75, label %67
67: ; preds = %64
%68 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i64 0, i64 0), i32 3)
%69 = icmp eq i64 %68, 0
br i1 %69, label %75, label %70
70: ; preds = %67
%71 = load i32, i32* @stderr
%72 = tail call i32 @fprintf(i32 %71, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.23, i64 0, i64 0), i8* %0)
%73 = load i32, i32* @EXIT_FAILURE
%74 = tail call i32 @exit(i32 %73)
unreachable
75: ; preds = %67, %64, %61, %58, %55, %52, %49, %46, %43, %40, %37, %34, %31, %28, %25, %22, %19, %16, %13, %10, %7, %4, %1
%76 = phi i8 [ 83, %1 ], [ 70, %4 ], [ 84, %7 ], [ 78, %10 ], [ 75, %13 ], [ 69, %16 ], [ 89, %19 ], [ 86, %22 ], [ 81, %25 ], [ 77, %28 ], [ 67, %31 ], [ 76, %34 ], [ 65, %37 ], [ 87, %40 ], [ 80, %43 ], [ 72, %46 ], [ 72, %49 ], [ 72, %52 ], [ 72, %55 ], [ 68, %58 ], [ 82, %61 ], [ 73, %64 ], [ 71, %67 ]
ret i8 %76
}