#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*/ sprintf(char *, char *, int);
const char *datatypestr(int datatype) {
  static char str[20];
  str[0] = 0;
  sprintf(str, "%d bit packed", datatype);
  if (datatype == 0)
    return ("P0");
  else if (datatype > 0 && datatype <= 32)
    return (str);
  else if (datatype == 64)
    return ("C32");
  else if (datatype == 128)
    return ("C64");
  else if (datatype == 132)
    return ("32 bit floats");
  else if (datatype == 164)
    return ("64 bit floats");
  else if (datatype == 208)
    return ("I8");
  else if (datatype == 216)
    return ("I16");
  else if (datatype == 232)
    return ("I32");
  else if (datatype == 308)
    return ("U8");
  else if (datatype == 316)
    return ("U16");
  else if (datatype == 332)
    return ("U32");
  else
    return ("");
}


x86 assembly (clang, -O0):
<datatypestr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
movb   $0x0,0x2f1e(%rip)
mov    -0xc(%rbp),%edx
lea    0x2f14(%rip),%rdi
lea    0xecd(%rip),%rsi
call   1030 <sprintf@plt>
cmpl   $0x0,-0xc(%rbp)
jne    1152 <datatypestr+0x42>
lea    0xec5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12a0 <datatypestr+0x190>
cmpl   $0x0,-0xc(%rbp)
jle    1176 <datatypestr+0x66>
cmpl   $0x20,-0xc(%rbp)
jg     1176 <datatypestr+0x66>
lea    0x2ed3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12a0 <datatypestr+0x190>
cmpl   $0x40,-0xc(%rbp)
jne    1190 <datatypestr+0x80>
lea    0xe8a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12a0 <datatypestr+0x190>
cmpl   $0x80,-0xc(%rbp)
jne    11ad <datatypestr+0x9d>
lea    0xe71(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12a0 <datatypestr+0x190>
cmpl   $0x84,-0xc(%rbp)
jne    11ca <datatypestr+0xba>
lea    0xe58(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12a0 <datatypestr+0x190>
cmpl   $0xa4,-0xc(%rbp)
jne    11e7 <datatypestr+0xd7>
lea    0xe49(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12a0 <datatypestr+0x190>
cmpl   $0xd0,-0xc(%rbp)
jne    1204 <datatypestr+0xf4>
lea    0xe3a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12a0 <datatypestr+0x190>
cmpl   $0xd8,-0xc(%rbp)
jne    1221 <datatypestr+0x111>
lea    0xe20(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12a0 <datatypestr+0x190>
cmpl   $0xe8,-0xc(%rbp)
jne    123e <datatypestr+0x12e>
lea    0xe07(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12a0 <datatypestr+0x190>
cmpl   $0x134,-0xc(%rbp)
jne    125b <datatypestr+0x14b>
lea    0xdee(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12a0 <datatypestr+0x190>
cmpl   $0x13c,-0xc(%rbp)
jne    1278 <datatypestr+0x168>
lea    0xdd4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12a0 <datatypestr+0x190>
cmpl   $0x14c,-0xc(%rbp)
jne    1295 <datatypestr+0x185>
lea    0xdbb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12a0 <datatypestr+0x190>
lea    0xd74(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<datatypestr>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
movb   $0x0,0x2f23(%rip)
lea    0x2f1c(%rip),%r14
lea    0xed5(%rip),%rsi
mov    %r14,%rdi
mov    %ebx,%edx
call   1030 <sprintf@plt>
test   %ebx,%ebx
je     117e <datatypestr+0x6e>
lea    -0x1(%rbx),%eax
cmp    $0x20,%eax
jb     1185 <datatypestr+0x75>
cmp    $0xd7,%ebx
jg     1190 <datatypestr+0x80>
cmp    $0x83,%ebx
jle    11b9 <datatypestr+0xa9>
cmp    $0x84,%ebx
je     11e8 <datatypestr+0xd8>
cmp    $0xa4,%ebx
je     11f1 <datatypestr+0xe1>
cmp    $0xd0,%ebx
jne    1227 <datatypestr+0x117>
lea    0xeb9(%rip),%r14
jmp    1185 <datatypestr+0x75>
lea    0xe89(%rip),%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
cmp    $0x133,%ebx
jle    11cf <datatypestr+0xbf>
cmp    $0x134,%ebx
je     11fa <datatypestr+0xea>
cmp    $0x13c,%ebx
je     1203 <datatypestr+0xf3>
cmp    $0x14c,%ebx
jne    1227 <datatypestr+0x117>
lea    0xe90(%rip),%r14
jmp    1185 <datatypestr+0x75>
cmp    $0x40,%ebx
je     120f <datatypestr+0xff>
cmp    $0x80,%ebx
jne    1227 <datatypestr+0x117>
lea    0xe48(%rip),%r14
jmp    1185 <datatypestr+0x75>
cmp    $0xd8,%ebx
je     121b <datatypestr+0x10b>
cmp    $0xe8,%ebx
jne    1227 <datatypestr+0x117>
lea    0xe56(%rip),%r14
jmp    1185 <datatypestr+0x75>
lea    0xe2a(%rip),%r14
jmp    1185 <datatypestr+0x75>
lea    0xe2f(%rip),%r14
jmp    1185 <datatypestr+0x75>
lea    0xe3f(%rip),%r14
jmp    1185 <datatypestr+0x75>
lea    0xe39(%rip),%r14
jmp    1185 <datatypestr+0x75>
lea    0xdfb(%rip),%r14
jmp    1185 <datatypestr+0x75>
lea    0xe16(%rip),%r14
jmp    1185 <datatypestr+0x75>
lea    0xde2(%rip),%r14
jmp    1185 <datatypestr+0x75>

LLVM IR (-O0):
@datatypestr.str = internal global [20 x i8] zeroinitializer
@.str = [14 x i8] c"%d bit packed\00"
@.str.1 = [3 x i8] c"P0\00"
@.str.2 = [4 x i8] c"C32\00"
@.str.3 = [4 x i8] c"C64\00"
@.str.4 = [14 x i8] c"32 bit floats\00"
@.str.5 = [14 x i8] c"64 bit floats\00"
@.str.6 = [3 x i8] c"I8\00"
@.str.7 = [4 x i8] c"I16\00"
@.str.8 = [4 x i8] c"I32\00"
@.str.9 = [3 x i8] c"U8\00"
@.str.10 = [4 x i8] c"U16\00"
@.str.11 = [4 x i8] c"U32\00"
@.str.12 = [1 x i8] zeroinitializer
define i8* @datatypestr(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
store i8 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @datatypestr.str, i64 0, i64 0)
%4 = load i32, i32* %3
%5 = call i32 @sprintf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @datatypestr.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %57
9: ; preds = %1
%10 = load i32, i32* %3
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp sle i32 %13, 32
br i1 %14, label %15, label %16
15: ; preds = %12
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @datatypestr.str, i64 0, i64 0), i8** %2
br label %57
16: ; preds = %12, %9
%17 = load i32, i32* %3
%18 = icmp eq i32 %17, 64
br i1 %18, label %19, label %20
19: ; preds = %16
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %57
20: ; preds = %16
%21 = load i32, i32* %3
%22 = icmp eq i32 %21, 128
br i1 %22, label %23, label %24
23: ; preds = %20
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %57
24: ; preds = %20
%25 = load i32, i32* %3
%26 = icmp eq i32 %25, 132
br i1 %26, label %27, label %28
27: ; preds = %24
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %57
28: ; preds = %24
%29 = load i32, i32* %3
%30 = icmp eq i32 %29, 164
br i1 %30, label %31, label %32
31: ; preds = %28
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %57
32: ; preds = %28
%33 = load i32, i32* %3
%34 = icmp eq i32 %33, 208
br i1 %34, label %35, label %36
35: ; preds = %32
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %57
36: ; preds = %32
%37 = load i32, i32* %3
%38 = icmp eq i32 %37, 216
br i1 %38, label %39, label %40
39: ; preds = %36
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %57
40: ; preds = %36
%41 = load i32, i32* %3
%42 = icmp eq i32 %41, 232
br i1 %42, label %43, label %44
43: ; preds = %40
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %57
44: ; preds = %40
%45 = load i32, i32* %3
%46 = icmp eq i32 %45, 308
br i1 %46, label %47, label %48
47: ; preds = %44
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %57
48: ; preds = %44
%49 = load i32, i32* %3
%50 = icmp eq i32 %49, 316
br i1 %50, label %51, label %52
51: ; preds = %48
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %57
52: ; preds = %48
%53 = load i32, i32* %3
%54 = icmp eq i32 %53, 332
br i1 %54, label %55, label %56
55: ; preds = %52
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %57
56: ; preds = %52
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %57
57: ; preds = %56, %55, %51, %47, %43, %39, %35, %31, %27, %23, %19, %15, %8
%58 = load i8*, i8** %2
ret i8* %58
}

LLVM IR (-O2):
@datatypestr.str = internal global [20 x i8] zeroinitializer
@.str = [14 x i8] c"%d bit packed\00"
@.str.1 = [3 x i8] c"P0\00"
@.str.2 = [4 x i8] c"C32\00"
@.str.3 = [4 x i8] c"C64\00"
@.str.4 = [14 x i8] c"32 bit floats\00"
@.str.5 = [14 x i8] c"64 bit floats\00"
@.str.6 = [3 x i8] c"I8\00"
@.str.7 = [4 x i8] c"I16\00"
@.str.8 = [4 x i8] c"I32\00"
@.str.9 = [3 x i8] c"U8\00"
@.str.10 = [4 x i8] c"U16\00"
@.str.11 = [4 x i8] c"U32\00"
@.str.12 = [1 x i8] zeroinitializer
define i8* @datatypestr(i32 %0) {
store i8 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @datatypestr.str, i64 0, i64 0)
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @datatypestr.str, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp eq i32 %0, 0
br i1 %3, label %18, label %4
4: ; preds = %1
%5 = add i32 %0, -1
%6 = icmp ult i32 %5, 32
br i1 %6, label %18, label %7
7: ; preds = %4
switch i32 %0, label %17 [
i32 64, label %18
i32 128, label %8
i32 132, label %9
i32 164, label %10
i32 208, label %11
i32 216, label %12
i32 232, label %13
i32 308, label %14
i32 316, label %15
i32 332, label %16
]
8: ; preds = %7
br label %18
9: ; preds = %7
br label %18
10: ; preds = %7
br label %18
11: ; preds = %7
br label %18
12: ; preds = %7
br label %18
13: ; preds = %7
br label %18
14: ; preds = %7
br label %18
15: ; preds = %7
br label %18
16: ; preds = %7
br label %18
17: ; preds = %7
br label %18
18: ; preds = %7, %4, %1, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8
%19 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), %8 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), %9 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), %10 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), %11 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), %12 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), %13 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), %14 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), %15 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), %16 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.12, i64 0, i64 0), %17 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %1 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @datatypestr.str, i64 0, i64 0), %4 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), %7 ]
ret i8* %19
}