#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*/ strcmp(char *, char *);
int CheckRes(char *Res) {
  register int ResTypeCnt;
  int ResTypeNumber = 45;
  static char *Rsd[50] = {
      "ACE", "ALA", "ARG", "ASN", "ASP", "ASX", "CYS", "GLN", "GLU",
      "GLX", "GLY", "HIS", "ILE", "LEU", "LYS", "MET", "PRO", "PHE",
      "SER", "THR", "TRP", "TYR", "VAL", "FOR", "UNK", "HOH", "SEC",
      "ALM", "MSU", "CLT", "PCA", "STA", "EXC", "ABU", "HYP", "HMS",
      "ASS", "OCT", "CYH", "MN",  "INI", "PO3", "SUL", "WAT", "FMN"};
  for (ResTypeCnt = 0; ResTypeCnt < ResTypeNumber; ResTypeCnt++)
    if (!strcmp(Res, Rsd[ResTypeCnt]))
      return (1);
  return (0);
}


x86 assembly (clang, -O0):
<CheckRes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x2d,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1176 <CheckRes+0x66>
mov    -0x10(%rbp),%rdi
movslq -0x14(%rbp),%rcx
lea    0x2eeb(%rip),%rax
mov    (%rax,%rcx,8),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1163 <CheckRes+0x53>
movl   $0x1,-0x4(%rbp)
jmp    117d <CheckRes+0x6d>
jmp    1168 <CheckRes+0x58>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112a <CheckRes+0x1a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CheckRes>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
xor    %ebx,%ebx
lea    0x2b6f(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%rbx,%r15,1),%rsi
mov    %r14,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1151 <CheckRes+0x41>
add    $0x8,%rbx
cmp    $0x168,%rbx
jne    1130 <CheckRes+0x20>
xor    %eax,%eax
jmp    1156 <CheckRes+0x46>
mov    $0x1,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@CheckRes.Rsd = internal global [50 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.25, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.26, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.27, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.29, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.30, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.31, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.32, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.33, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.34, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.35, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.36, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.37, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.38, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.39, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.40, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.41, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.42, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.43, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.44, i32 0, i32 0), i8* null, i8* null, i8* null, i8* null, i8* null]
@.str = [4 x i8] c"ACE\00"
@.str.1 = [4 x i8] c"ALA\00"
@.str.2 = [4 x i8] c"ARG\00"
@.str.3 = [4 x i8] c"ASN\00"
@.str.4 = [4 x i8] c"ASP\00"
@.str.5 = [4 x i8] c"ASX\00"
@.str.6 = [4 x i8] c"CYS\00"
@.str.7 = [4 x i8] c"GLN\00"
@.str.8 = [4 x i8] c"GLU\00"
@.str.9 = [4 x i8] c"GLX\00"
@.str.10 = [4 x i8] c"GLY\00"
@.str.11 = [4 x i8] c"HIS\00"
@.str.12 = [4 x i8] c"ILE\00"
@.str.13 = [4 x i8] c"LEU\00"
@.str.14 = [4 x i8] c"LYS\00"
@.str.15 = [4 x i8] c"MET\00"
@.str.16 = [4 x i8] c"PRO\00"
@.str.17 = [4 x i8] c"PHE\00"
@.str.18 = [4 x i8] c"SER\00"
@.str.19 = [4 x i8] c"THR\00"
@.str.20 = [4 x i8] c"TRP\00"
@.str.21 = [4 x i8] c"TYR\00"
@.str.22 = [4 x i8] c"VAL\00"
@.str.23 = [4 x i8] c"FOR\00"
@.str.24 = [4 x i8] c"UNK\00"
@.str.25 = [4 x i8] c"HOH\00"
@.str.26 = [4 x i8] c"SEC\00"
@.str.27 = [4 x i8] c"ALM\00"
@.str.28 = [4 x i8] c"MSU\00"
@.str.29 = [4 x i8] c"CLT\00"
@.str.30 = [4 x i8] c"PCA\00"
@.str.31 = [4 x i8] c"STA\00"
@.str.32 = [4 x i8] c"EXC\00"
@.str.33 = [4 x i8] c"ABU\00"
@.str.34 = [4 x i8] c"HYP\00"
@.str.35 = [4 x i8] c"HMS\00"
@.str.36 = [4 x i8] c"ASS\00"
@.str.37 = [4 x i8] c"OCT\00"
@.str.38 = [4 x i8] c"CYH\00"
@.str.39 = [3 x i8] c"MN\00"
@.str.40 = [4 x i8] c"INI\00"
@.str.41 = [4 x i8] c"PO3\00"
@.str.42 = [4 x i8] c"SUL\00"
@.str.43 = [4 x i8] c"WAT\00"
@.str.44 = [4 x i8] c"FMN\00"
define i32 @CheckRes(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 45, i32* %5
store i32 0, i32* %4
br label %6
6: ; preds = %20, %1
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %23
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [50 x i8*], [50 x i8*]* @CheckRes.Rsd, i64 0, i64 %13
%15 = load i8*, i8** %14
%16 = call i32 @strcmp(i8* %11, i8* %15)
%17 = icmp ne i32 %16, 0
br i1 %17, label %19, label %18
18: ; preds = %10
store i32 1, i32* %2
br label %24
19: ; preds = %10
br label %20
20: ; preds = %19
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
br label %6
23: ; preds = %6
store i32 0, i32* %2
br label %24
24: ; preds = %23, %18
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
@CheckRes.Rsd = internal unnamed_addr constant [50 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.25, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.26, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.27, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.28, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.29, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.30, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.31, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.32, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.33, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.34, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.35, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.36, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.37, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.38, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.39, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.40, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.41, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.42, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.43, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.44, i32 0, i32 0), i8* null, i8* null, i8* null, i8* null, i8* null]
@.str = [4 x i8] c"ACE\00"
@.str.1 = [4 x i8] c"ALA\00"
@.str.2 = [4 x i8] c"ARG\00"
@.str.3 = [4 x i8] c"ASN\00"
@.str.4 = [4 x i8] c"ASP\00"
@.str.5 = [4 x i8] c"ASX\00"
@.str.6 = [4 x i8] c"CYS\00"
@.str.7 = [4 x i8] c"GLN\00"
@.str.8 = [4 x i8] c"GLU\00"
@.str.9 = [4 x i8] c"GLX\00"
@.str.10 = [4 x i8] c"GLY\00"
@.str.11 = [4 x i8] c"HIS\00"
@.str.12 = [4 x i8] c"ILE\00"
@.str.13 = [4 x i8] c"LEU\00"
@.str.14 = [4 x i8] c"LYS\00"
@.str.15 = [4 x i8] c"MET\00"
@.str.16 = [4 x i8] c"PRO\00"
@.str.17 = [4 x i8] c"PHE\00"
@.str.18 = [4 x i8] c"SER\00"
@.str.19 = [4 x i8] c"THR\00"
@.str.20 = [4 x i8] c"TRP\00"
@.str.21 = [4 x i8] c"TYR\00"
@.str.22 = [4 x i8] c"VAL\00"
@.str.23 = [4 x i8] c"FOR\00"
@.str.24 = [4 x i8] c"UNK\00"
@.str.25 = [4 x i8] c"HOH\00"
@.str.26 = [4 x i8] c"SEC\00"
@.str.27 = [4 x i8] c"ALM\00"
@.str.28 = [4 x i8] c"MSU\00"
@.str.29 = [4 x i8] c"CLT\00"
@.str.30 = [4 x i8] c"PCA\00"
@.str.31 = [4 x i8] c"STA\00"
@.str.32 = [4 x i8] c"EXC\00"
@.str.33 = [4 x i8] c"ABU\00"
@.str.34 = [4 x i8] c"HYP\00"
@.str.35 = [4 x i8] c"HMS\00"
@.str.36 = [4 x i8] c"ASS\00"
@.str.37 = [4 x i8] c"OCT\00"
@.str.38 = [4 x i8] c"CYH\00"
@.str.39 = [3 x i8] c"MN\00"
@.str.40 = [4 x i8] c"INI\00"
@.str.41 = [4 x i8] c"PO3\00"
@.str.42 = [4 x i8] c"SUL\00"
@.str.43 = [4 x i8] c"WAT\00"
@.str.44 = [4 x i8] c"FMN\00"
define i32 @CheckRes(i8* nocapture %0) {
br label %5
2: ; preds = %5
%3 = add nuw nsw i64 %6, 1
%4 = icmp eq i64 %3, 45
br i1 %4, label %11, label %5
5: ; preds = %1, %2
%6 = phi i64 [ 0, %1 ], [ %3, %2 ]
%7 = getelementptr inbounds [50 x i8*], [50 x i8*]* @CheckRes.Rsd, i64 0, i64 %6
%8 = load i8*, i8** %7
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %8)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %2
11: ; preds = %2, %5
%12 = phi i32 [ 1, %5 ], [ 0, %2 ]
ret i32 %12
}