#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*/ strcpy(char *, char *);
void hdf_type_info(int type, char *msg) {
  switch (type) {
  case 5:
    strcpy(msg, "FLOAT32");
    break;
  case 6:
    strcpy(msg, "FLOAT64");
    break;
  case 7:
    strcpy(msg, "FLOAT128");
    break;
  case 20:
    strcpy(msg, "INT8");
    break;
  case 21:
    strcpy(msg, "UINT8");
    break;
  case 22:
    strcpy(msg, "INT16");
    break;
  case 23:
    strcpy(msg, "UINT16");
    break;
  case 24:
    strcpy(msg, "INT32");
    break;
  case 25:
    strcpy(msg, "UINT32");
    break;
  case 26:
    strcpy(msg, "INT64");
    break;
  case 27:
    strcpy(msg, "UINT64");
    break;
  case 28:
    strcpy(msg, "INT128");
    break;
  case 29:
    strcpy(msg, "UINT128");
    break;
  case 3:
    strcpy(msg, "UCHAR8");
    break;
  case 42:
    strcpy(msg, "CHAR16");
    break;
  case 43:
    strcpy(msg, "UCHAR16");
    break;
  default:
    strcpy(msg, "unknown");
    break;
  }
}


x86 assembly (clang, -O0):
<hdf_type_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0xfffffffd,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x28,%eax
ja     1298 <hdf_type_info+0x188>
mov    -0x18(%rbp),%rax
lea    0xec1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%rdi
lea    0xf51(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12a8 <hdf_type_info+0x198>
mov    -0x10(%rbp),%rdi
lea    0xf44(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12a8 <hdf_type_info+0x198>
mov    -0x10(%rbp),%rdi
lea    0xf37(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12a8 <hdf_type_info+0x198>
mov    -0x10(%rbp),%rdi
lea    0xf2c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12a8 <hdf_type_info+0x198>
mov    -0x10(%rbp),%rdi
lea    0xf16(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12a8 <hdf_type_info+0x198>
mov    -0x10(%rbp),%rdi
lea    0xf08(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12a8 <hdf_type_info+0x198>
mov    -0x10(%rbp),%rdi
lea    0xef2(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12a8 <hdf_type_info+0x198>
mov    -0x10(%rbp),%rdi
lea    0xee5(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12a8 <hdf_type_info+0x198>
mov    -0x10(%rbp),%rdi
lea    0xecf(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12a8 <hdf_type_info+0x198>
mov    -0x10(%rbp),%rdi
lea    0xec2(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12a8 <hdf_type_info+0x198>
mov    -0x10(%rbp),%rdi
lea    0xeac(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12a8 <hdf_type_info+0x198>
mov    -0x10(%rbp),%rdi
lea    0xe9f(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12a8 <hdf_type_info+0x198>
mov    -0x10(%rbp),%rdi
lea    0xe89(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12a8 <hdf_type_info+0x198>
mov    -0x10(%rbp),%rdi
lea    0xe7c(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12a8 <hdf_type_info+0x198>
mov    -0x10(%rbp),%rdi
lea    0xe6f(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12a8 <hdf_type_info+0x198>
mov    -0x10(%rbp),%rdi
lea    0xe59(%rip),%rsi
call   1030 <strcpy@plt>
jmp    12a8 <hdf_type_info+0x198>
mov    -0x10(%rbp),%rdi
lea    0xe4c(%rip),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hdf_type_info>:
mov    %rsi,%rax
add    $0xfffffffd,%edi
cmp    $0x28,%edi
ja     1217 <hdf_type_info+0x107>
lea    0xf7e(%rip),%rsi
lea    0xed3(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
lea    0xfa3(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>
lea    0xf60(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>
lea    0xf59(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>
lea    0xf54(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>
lea    0xf44(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>
lea    0xf3c(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>
lea    0xf2c(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>
lea    0xf25(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>
lea    0xf15(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>
lea    0xf0e(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>
lea    0xefe(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>
lea    0xef7(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>
lea    0xee7(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>
lea    0xee8(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>
lea    0xed8(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>
lea    0xed1(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"FLOAT32\00"
@.str.1 = [8 x i8] c"FLOAT64\00"
@.str.2 = [9 x i8] c"FLOAT128\00"
@.str.3 = [5 x i8] c"INT8\00"
@.str.4 = [6 x i8] c"UINT8\00"
@.str.5 = [6 x i8] c"INT16\00"
@.str.6 = [7 x i8] c"UINT16\00"
@.str.7 = [6 x i8] c"INT32\00"
@.str.8 = [7 x i8] c"UINT32\00"
@.str.9 = [6 x i8] c"INT64\00"
@.str.10 = [7 x i8] c"UINT64\00"
@.str.11 = [7 x i8] c"INT128\00"
@.str.12 = [8 x i8] c"UINT128\00"
@.str.13 = [7 x i8] c"UCHAR8\00"
@.str.14 = [7 x i8] c"CHAR16\00"
@.str.15 = [8 x i8] c"UCHAR16\00"
@.str.16 = [8 x i8] c"unknown\00"
define void @hdf_type_info(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
switch i32 %5, label %54 [
i32 5, label %6
i32 6, label %9
i32 7, label %12
i32 20, label %15
i32 21, label %18
i32 22, label %21
i32 23, label %24
i32 24, label %27
i32 25, label %30
i32 26, label %33
i32 27, label %36
i32 28, label %39
i32 29, label %42
i32 3, label %45
i32 42, label %48
i32 43, label %51
]
6: ; preds = %2
%7 = load i8*, i8** %4
%8 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %57
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = call i32 @strcpy(i8* %10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %57
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = call i32 @strcpy(i8* %13, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %57
15: ; preds = %2
%16 = load i8*, i8** %4
%17 = call i32 @strcpy(i8* %16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
br label %57
18: ; preds = %2
%19 = load i8*, i8** %4
%20 = call i32 @strcpy(i8* %19, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %57
21: ; preds = %2
%22 = load i8*, i8** %4
%23 = call i32 @strcpy(i8* %22, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %57
24: ; preds = %2
%25 = load i8*, i8** %4
%26 = call i32 @strcpy(i8* %25, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
br label %57
27: ; preds = %2
%28 = load i8*, i8** %4
%29 = call i32 @strcpy(i8* %28, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %57
30: ; preds = %2
%31 = load i8*, i8** %4
%32 = call i32 @strcpy(i8* %31, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %57
33: ; preds = %2
%34 = load i8*, i8** %4
%35 = call i32 @strcpy(i8* %34, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
br label %57
36: ; preds = %2
%37 = load i8*, i8** %4
%38 = call i32 @strcpy(i8* %37, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
br label %57
39: ; preds = %2
%40 = load i8*, i8** %4
%41 = call i32 @strcpy(i8* %40, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
br label %57
42: ; preds = %2
%43 = load i8*, i8** %4
%44 = call i32 @strcpy(i8* %43, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
br label %57
45: ; preds = %2
%46 = load i8*, i8** %4
%47 = call i32 @strcpy(i8* %46, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0))
br label %57
48: ; preds = %2
%49 = load i8*, i8** %4
%50 = call i32 @strcpy(i8* %49, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0))
br label %57
51: ; preds = %2
%52 = load i8*, i8** %4
%53 = call i32 @strcpy(i8* %52, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0))
br label %57
54: ; preds = %2
%55 = load i8*, i8** %4
%56 = call i32 @strcpy(i8* %55, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0))
br label %57
57: ; preds = %54, %51, %48, %45, %42, %39, %36, %33, %30, %27, %24, %21, %18, %15, %12, %9, %6
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"FLOAT32\00"
@.str.1 = [8 x i8] c"FLOAT64\00"
@.str.2 = [9 x i8] c"FLOAT128\00"
@.str.3 = [5 x i8] c"INT8\00"
@.str.4 = [6 x i8] c"UINT8\00"
@.str.5 = [6 x i8] c"INT16\00"
@.str.6 = [7 x i8] c"UINT16\00"
@.str.7 = [6 x i8] c"INT32\00"
@.str.8 = [7 x i8] c"UINT32\00"
@.str.9 = [6 x i8] c"INT64\00"
@.str.10 = [7 x i8] c"UINT64\00"
@.str.11 = [7 x i8] c"INT128\00"
@.str.12 = [8 x i8] c"UINT128\00"
@.str.13 = [7 x i8] c"UCHAR8\00"
@.str.14 = [7 x i8] c"CHAR16\00"
@.str.15 = [8 x i8] c"UCHAR16\00"
@.str.16 = [8 x i8] c"unknown\00"
define void @hdf_type_info(i32 %0, i8* %1) {
switch i32 %0, label %18 [
i32 5, label %19
i32 6, label %3
i32 7, label %4
i32 20, label %5
i32 21, label %6
i32 22, label %7
i32 23, label %8
i32 24, label %9
i32 25, label %10
i32 26, label %11
i32 27, label %12
i32 28, label %13
i32 29, label %14
i32 3, label %15
i32 42, label %16
i32 43, label %17
]
3: ; preds = %2
br label %19
4: ; preds = %2
br label %19
5: ; preds = %2
br label %19
6: ; preds = %2
br label %19
7: ; preds = %2
br label %19
8: ; preds = %2
br label %19
9: ; preds = %2
br label %19
10: ; preds = %2
br label %19
11: ; preds = %2
br label %19
12: ; preds = %2
br label %19
13: ; preds = %2
br label %19
14: ; preds = %2
br label %19
15: ; preds = %2
br label %19
16: ; preds = %2
br label %19
17: ; preds = %2
br label %19
18: ; preds = %2
br label %19
19: ; preds = %2, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3
%20 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0), %18 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), %17 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), %16 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), %15 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0), %14 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), %13 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), %12 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), %11 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), %10 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), %9 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), %8 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), %7 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), %6 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), %5 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %3 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %2 ]
%21 = tail call i32 @strcpy(i8* %1, i8* %20)
ret void
}