#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 */
const char *hash_error_string(int error) {
  switch (error) {
  case 0:
    return "Success";
  case (-2000 + 1):
    return "Bad key type";
  case (-2000 + 2):
    return "Bad value type";
  case (-2000 + 3):
    return "No memory";
  case (-2000 + 4):
    return "Key not found";
  case (-2000 + 5):
    return "Bad table";
  }
  return NULL;
}


x86 assembly (clang, -O0):
<hash_error_string>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0xfffff831,%eax
je     1189 <hash_error_string+0x89>
jmp    111d <hash_error_string+0x1d>
mov    -0x10(%rbp),%eax
sub    $0xfffff832,%eax
je     1199 <hash_error_string+0x99>
jmp    1130 <hash_error_string+0x30>
mov    -0x10(%rbp),%eax
sub    $0xfffff833,%eax
je     11a9 <hash_error_string+0xa9>
jmp    1143 <hash_error_string+0x43>
mov    -0x10(%rbp),%eax
sub    $0xfffff834,%eax
je     11b9 <hash_error_string+0xb9>
jmp    1156 <hash_error_string+0x56>
mov    -0x10(%rbp),%eax
sub    $0xfffff835,%eax
je     11c9 <hash_error_string+0xc9>
jmp    1169 <hash_error_string+0x69>
mov    -0x10(%rbp),%eax
test   %eax,%eax
jne    11d9 <hash_error_string+0xd9>
jmp    1179 <hash_error_string+0x79>
lea    0xe80(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e1 <hash_error_string+0xe1>
lea    0xe78(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e1 <hash_error_string+0xe1>
lea    0xe75(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e1 <hash_error_string+0xe1>
lea    0xe74(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e1 <hash_error_string+0xe1>
lea    0xe6e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e1 <hash_error_string+0xe1>
lea    0xe6c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e1 <hash_error_string+0xe1>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_error_string>:
lea    0x7cf(%rdi),%eax
cmp    $0x4,%eax
ja     1123 <hash_error_string+0x23>
lea    0xeee(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xefa(%rip),%rax
ret
test   %edi,%edi
jne    114f <hash_error_string+0x4f>
lea    0xee6(%rip),%rax
ret
lea    0xef3(%rip),%rax
ret
lea    0xefa(%rip),%rax
ret
lea    0xefc(%rip),%rax
ret
lea    0xf02(%rip),%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Success\00"
@.str.1 = [13 x i8] c"Bad key type\00"
@.str.2 = [15 x i8] c"Bad value type\00"
@.str.3 = [10 x i8] c"No memory\00"
@.str.4 = [14 x i8] c"Key not found\00"
@.str.5 = [10 x i8] c"Bad table\00"
define i8* @hash_error_string(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %11 [
i32 0, label %5
i32 -1999, label %6
i32 -1998, label %7
i32 -1997, label %8
i32 -1996, label %9
i32 -1995, label %10
]
5: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
br label %12
6: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %12
7: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %12
8: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %12
9: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %12
10: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %12
11: ; preds = %1
store i8* null, i8** %2
br label %12
12: ; preds = %11, %10, %9, %8, %7, %6, %5
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
@.str = [8 x i8] c"Success\00"
@.str.1 = [13 x i8] c"Bad key type\00"
@.str.2 = [15 x i8] c"Bad value type\00"
@.str.3 = [10 x i8] c"No memory\00"
@.str.4 = [14 x i8] c"Key not found\00"
@.str.5 = [10 x i8] c"Bad table\00"
define i8* @hash_error_string(i32 %0) {
switch i32 %0, label %7 [
i32 0, label %8
i32 -1999, label %2
i32 -1998, label %3
i32 -1997, label %4
i32 -1996, label %5
i32 -1995, label %6
]
2: ; preds = %1
br label %8
3: ; preds = %1
br label %8
4: ; preds = %1
br label %8
5: ; preds = %1
br label %8
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %1, %7, %6, %5, %4, %3, %2
%9 = phi i8* [ null, %7 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %9
}