#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*/ error_out_of_index(int, char *);
char *Element(int n) {
  static char *name[] = {"H",  "HE", "LI", "BE", "B",  "C",  "N", "O",
                         "F",  "NE", "NA", "MG", "AL", "SI", "P", "S",
                         "CL", "AR", "K",  "CA", "SC", "TI", "V", "CR",
                         "MN", "FE", "CO", "NI", "CU", "ZN"};
  if ((n < 0) || (n >= 30)) {
    error_out_of_index(31510, "pdb2sax");
    return 0;
  } else
    return name[n];
}


x86 assembly (clang, -O0):
<Element>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     112f <Element+0x1f>
cmpl   $0x1e,-0xc(%rbp)
jl     114d <Element+0x3d>
mov    $0x7b16,%edi
lea    0xf0f(%rip),%rsi
call   1030 <error_out_of_index@plt>
movq   $0x0,-0x8(%rbp)
jmp    1160 <Element+0x50>
movslq -0xc(%rbp),%rcx
lea    0x2ed8(%rip),%rax
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Element>:
push   %rax
cmp    $0x1e,%edi
jb     112b <Element+0x1b>
lea    0xfa5(%rip),%rsi
mov    $0x7b16,%edi
call   1030 <error_out_of_index@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    %edi,%eax
lea    0xecc(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@Element.name = internal global [30 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.25, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.26, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.27, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.28, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.29, i32 0, i32 0)]
@.str = [2 x i8] c"H\00"
@.str.1 = [3 x i8] c"HE\00"
@.str.2 = [3 x i8] c"LI\00"
@.str.3 = [3 x i8] c"BE\00"
@.str.4 = [2 x i8] c"B\00"
@.str.5 = [2 x i8] c"C\00"
@.str.6 = [2 x i8] c"N\00"
@.str.7 = [2 x i8] c"O\00"
@.str.8 = [2 x i8] c"F\00"
@.str.9 = [3 x i8] c"NE\00"
@.str.10 = [3 x i8] c"NA\00"
@.str.11 = [3 x i8] c"MG\00"
@.str.12 = [3 x i8] c"AL\00"
@.str.13 = [3 x i8] c"SI\00"
@.str.14 = [2 x i8] c"P\00"
@.str.15 = [2 x i8] c"S\00"
@.str.16 = [3 x i8] c"CL\00"
@.str.17 = [3 x i8] c"AR\00"
@.str.18 = [2 x i8] c"K\00"
@.str.19 = [3 x i8] c"CA\00"
@.str.20 = [3 x i8] c"SC\00"
@.str.21 = [3 x i8] c"TI\00"
@.str.22 = [2 x i8] c"V\00"
@.str.23 = [3 x i8] c"CR\00"
@.str.24 = [3 x i8] c"MN\00"
@.str.25 = [3 x i8] c"FE\00"
@.str.26 = [3 x i8] c"CO\00"
@.str.27 = [3 x i8] c"NI\00"
@.str.28 = [3 x i8] c"CU\00"
@.str.29 = [3 x i8] c"ZN\00"
@.str.30 = [8 x i8] c"pdb2sax\00"
define i8* @Element(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sge i32 %7, 30
br i1 %8, label %9, label %11
9: ; preds = %6, %1
%10 = call i32 @error_out_of_index(i32 31510, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.30, i64 0, i64 0))
store i8* null, i8** %2
br label %16
11: ; preds = %6
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [30 x i8*], [30 x i8*]* @Element.name, i64 0, i64 %13
%15 = load i8*, i8** %14
store i8* %15, i8** %2
br label %16
16: ; preds = %11, %9
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
@reltable.Element = internal unnamed_addr constant [30 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.1 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.2 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.3 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.4 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.5 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.6 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.7 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.8 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.9 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.10 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.11 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.12 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.13 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.14 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.15 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.16 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.17 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.18 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.19 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.20 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.21 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([2 x i8]* @.str.22 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.23 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.24 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.25 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.26 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.27 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.28 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([3 x i8]* @.str.29 to i64), i64 ptrtoint ([30 x i32]* @reltable.Element to i64)) to i32)]
@.str = [2 x i8] c"H\00"
@.str.1 = [3 x i8] c"HE\00"
@.str.2 = [3 x i8] c"LI\00"
@.str.3 = [3 x i8] c"BE\00"
@.str.4 = [2 x i8] c"B\00"
@.str.5 = [2 x i8] c"C\00"
@.str.6 = [2 x i8] c"N\00"
@.str.7 = [2 x i8] c"O\00"
@.str.8 = [2 x i8] c"F\00"
@.str.9 = [3 x i8] c"NE\00"
@.str.10 = [3 x i8] c"NA\00"
@.str.11 = [3 x i8] c"MG\00"
@.str.12 = [3 x i8] c"AL\00"
@.str.13 = [3 x i8] c"SI\00"
@.str.14 = [2 x i8] c"P\00"
@.str.15 = [2 x i8] c"S\00"
@.str.16 = [3 x i8] c"CL\00"
@.str.17 = [3 x i8] c"AR\00"
@.str.18 = [2 x i8] c"K\00"
@.str.19 = [3 x i8] c"CA\00"
@.str.20 = [3 x i8] c"SC\00"
@.str.21 = [3 x i8] c"TI\00"
@.str.22 = [2 x i8] c"V\00"
@.str.23 = [3 x i8] c"CR\00"
@.str.24 = [3 x i8] c"MN\00"
@.str.25 = [3 x i8] c"FE\00"
@.str.26 = [3 x i8] c"CO\00"
@.str.27 = [3 x i8] c"NI\00"
@.str.28 = [3 x i8] c"CU\00"
@.str.29 = [3 x i8] c"ZN\00"
@.str.30 = [8 x i8] c"pdb2sax\00"
define i8* @Element(i32 %0) {
%2 = icmp ugt i32 %0, 29
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @error_out_of_index(i32 31510, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.30, i64 0, i64 0))
br label %9
5: ; preds = %1
%6 = zext i32 %0 to i64
%7 = shl i64 %6, 2
%8 = call i8* @llvm.load.relative.i64(i8* bitcast ([30 x i32]* @reltable.Element to i8*), i64 %7)
br label %9
9: ; preds = %5, %3
%10 = phi i8* [ null, %3 ], [ %8, %5 ]
ret i8* %10
}