#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*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
char *CTypeToResultType(int type) {
  switch (type) {
  case 101:
    return ("dps_tBoolean");
  case 112:
  case 106:
    return ("dps_tInt");
  case 108:
    return ("dps_tLong");
  case 109:
    return ("dps_tShort");
  case 107:
    return ("dps_tUInt");
  case 110:
    return ("dps_tULong");
  case 111:
    return ("dps_tUShort");
  case 102:
    return ("dps_tFloat");
  case 103:
    return ("dps_tDouble");
  case 104:
    return ("dps_tChar");
  case 105:
    return ("dps_tUChar");
  case 113:
    return ("dps_tInt");
  case 114:
    return ("dps_tFloat");
  case 115:
    return ("dps_tLong");
  case 116:
    return ("dps_tShort");
  default: {
    fprintf(stderr, "CantHappen");
    abort();
  };
  }
}


x86 assembly (clang, -O0):
<CTypeToResultType>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffff9b,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0xf,%eax
ja     1244 <CTypeToResultType+0x124>
mov    -0x18(%rbp),%rax
lea    0xeb5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xee5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1260 <CTypeToResultType+0x140>
lea    0xee2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1260 <CTypeToResultType+0x140>
lea    0xedb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1260 <CTypeToResultType+0x140>
lea    0xed5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1260 <CTypeToResultType+0x140>
lea    0xed0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1260 <CTypeToResultType+0x140>
lea    0xeca(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1260 <CTypeToResultType+0x140>
lea    0xec5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1260 <CTypeToResultType+0x140>
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1260 <CTypeToResultType+0x140>
lea    0xebc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1260 <CTypeToResultType+0x140>
lea    0xeb8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1260 <CTypeToResultType+0x140>
lea    0xeb2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1260 <CTypeToResultType+0x140>
lea    0xe42(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1260 <CTypeToResultType+0x140>
lea    0xe71(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1260 <CTypeToResultType+0x140>
lea    0xe2b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1260 <CTypeToResultType+0x140>
lea    0xe25(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1260 <CTypeToResultType+0x140>
mov    0x2d95(%rip),%rax
mov    (%rax),%edi
lea    0xe64(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CTypeToResultType>:
push   %rax
add    $0xffffff9b,%edi
cmp    $0x10,%edi
jae    113c <CTypeToResultType+0x1c>
movslq %edi,%rax
lea    0xf51(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
pop    %rcx
ret
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    0xf2c(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"dps_tBoolean\00"
@.str.1 = [9 x i8] c"dps_tInt\00"
@.str.2 = [10 x i8] c"dps_tLong\00"
@.str.3 = [11 x i8] c"dps_tShort\00"
@.str.4 = [10 x i8] c"dps_tUInt\00"
@.str.5 = [11 x i8] c"dps_tULong\00"
@.str.6 = [12 x i8] c"dps_tUShort\00"
@.str.7 = [11 x i8] c"dps_tFloat\00"
@.str.8 = [12 x i8] c"dps_tDouble\00"
@.str.9 = [10 x i8] c"dps_tChar\00"
@.str.10 = [11 x i8] c"dps_tUChar\00"
@stderr = global i32 0
@.str.11 = [11 x i8] c"CantHappen\00"
define i8* @CTypeToResultType(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %20 [
i32 101, label %5
i32 112, label %6
i32 106, label %6
i32 108, label %7
i32 109, label %8
i32 107, label %9
i32 110, label %10
i32 111, label %11
i32 102, label %12
i32 103, label %13
i32 104, label %14
i32 105, label %15
i32 113, label %16
i32 114, label %17
i32 115, label %18
i32 116, label %19
]
5: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %2
br label %24
6: ; preds = %1, %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %24
7: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %24
8: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %24
9: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %24
10: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %24
11: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %24
12: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %24
13: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %24
14: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %24
15: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %24
16: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %24
17: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %24
18: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %24
19: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %24
20: ; preds = %1
%21 = load i32, i32* @stderr
%22 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%23 = call i32 (...) @abort()
unreachable
24: ; preds = %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%25 = load i8*, i8** %2
ret i8* %25
}

LLVM IR (-O2):
@.str = [13 x i8] c"dps_tBoolean\00"
@.str.1 = [9 x i8] c"dps_tInt\00"
@.str.2 = [10 x i8] c"dps_tLong\00"
@.str.3 = [11 x i8] c"dps_tShort\00"
@.str.4 = [10 x i8] c"dps_tUInt\00"
@.str.5 = [11 x i8] c"dps_tULong\00"
@.str.6 = [12 x i8] c"dps_tUShort\00"
@.str.7 = [11 x i8] c"dps_tFloat\00"
@.str.8 = [12 x i8] c"dps_tDouble\00"
@.str.9 = [10 x i8] c"dps_tChar\00"
@.str.10 = [11 x i8] c"dps_tUChar\00"
@stderr = global i32 0
@.str.11 = [11 x i8] c"CantHappen\00"
@reltable.CTypeToResultType = [16 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str to i64), i64 ptrtoint ([16 x i32]* @reltable.CTypeToResultType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.7 to i64), i64 ptrtoint ([16 x i32]* @reltable.CTypeToResultType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.8 to i64), i64 ptrtoint ([16 x i32]* @reltable.CTypeToResultType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.9 to i64), i64 ptrtoint ([16 x i32]* @reltable.CTypeToResultType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.10 to i64), i64 ptrtoint ([16 x i32]* @reltable.CTypeToResultType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.1 to i64), i64 ptrtoint ([16 x i32]* @reltable.CTypeToResultType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.4 to i64), i64 ptrtoint ([16 x i32]* @reltable.CTypeToResultType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.2 to i64), i64 ptrtoint ([16 x i32]* @reltable.CTypeToResultType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.3 to i64), i64 ptrtoint ([16 x i32]* @reltable.CTypeToResultType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.5 to i64), i64 ptrtoint ([16 x i32]* @reltable.CTypeToResultType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.6 to i64), i64 ptrtoint ([16 x i32]* @reltable.CTypeToResultType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.1 to i64), i64 ptrtoint ([16 x i32]* @reltable.CTypeToResultType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([9 x i8]* @.str.1 to i64), i64 ptrtoint ([16 x i32]* @reltable.CTypeToResultType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.7 to i64), i64 ptrtoint ([16 x i32]* @reltable.CTypeToResultType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.2 to i64), i64 ptrtoint ([16 x i32]* @reltable.CTypeToResultType to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.3 to i64), i64 ptrtoint ([16 x i32]* @reltable.CTypeToResultType to i64)) to i32)]
define i8* @CTypeToResultType(i32 %0) {
%2 = add i32 %0, -101
%3 = icmp ult i32 %2, 16
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %1
%9 = sext i32 %2 to i64
%10 = shl i64 %9, 2
%11 = call i8* @llvm.load.relative.i64(i8* bitcast ([16 x i32]* @reltable.CTypeToResultType to i8*), i64 %10)
ret i8* %11
}