#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 */
char *chunk_type(unsigned char *guid) {
  switch (*((unsigned int *)guid)) {
  case 0xF8699E40:
    return "guid_audio_stream";
  case 0xBC19EFC0:
    return "guid_video_stream";
  case 0x49f1a440:
    return "guid_audio_conceal_none";
  case 0xbfc3cd50:
    return "guid_audio_conceal_interleave";
  case 0x75B22630:
    return "guid_header";
  case 0x75b22636:
    return "guid_data_chunk";
  case 0x33000890:
    return "guid_index_chunk";
  case 0xB7DC0791:
    return "guid_stream_header";
  case 0xD6E229D1:
    return "guid_header_2_0";
  case 0x8CABDCA1:
    return "guid_file_header";
  }
  return NULL;
}


x86 assembly (clang, -O0):
<chunk_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
sub    $0x8cabdca1,%eax
je     125c <chunk_type+0x15c>
jmp    1121 <chunk_type+0x21>
mov    -0x14(%rbp),%eax
sub    $0xb7dc0791,%eax
je     123c <chunk_type+0x13c>
jmp    1134 <chunk_type+0x34>
mov    -0x14(%rbp),%eax
sub    $0xbc19efc0,%eax
je     11dc <chunk_type+0xdc>
jmp    1147 <chunk_type+0x47>
mov    -0x14(%rbp),%eax
sub    $0xbfc3cd50,%eax
je     11fc <chunk_type+0xfc>
jmp    115a <chunk_type+0x5a>
mov    -0x14(%rbp),%eax
sub    $0xd6e229d1,%eax
je     124c <chunk_type+0x14c>
jmp    116d <chunk_type+0x6d>
mov    -0x14(%rbp),%eax
sub    $0xf8699e40,%eax
je     11cc <chunk_type+0xcc>
jmp    1180 <chunk_type+0x80>
mov    -0x14(%rbp),%eax
sub    $0x33000890,%eax
je     122c <chunk_type+0x12c>
jmp    1193 <chunk_type+0x93>
mov    -0x14(%rbp),%eax
sub    $0x49f1a440,%eax
je     11ec <chunk_type+0xec>
jmp    11a6 <chunk_type+0xa6>
mov    -0x14(%rbp),%eax
sub    $0x75b22630,%eax
je     120c <chunk_type+0x10c>
jmp    11b9 <chunk_type+0xb9>
mov    -0x14(%rbp),%eax
sub    $0x75b22636,%eax
je     121c <chunk_type+0x11c>
jmp    126c <chunk_type+0x16c>
lea    0xe2d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1274 <chunk_type+0x174>
lea    0xe2f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1274 <chunk_type+0x174>
lea    0xe31(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1274 <chunk_type+0x174>
lea    0xe39(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1274 <chunk_type+0x174>
lea    0xe47(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1274 <chunk_type+0x174>
lea    0xe43(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1274 <chunk_type+0x174>
lea    0xe43(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1274 <chunk_type+0x174>
lea    0xe44(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1274 <chunk_type+0x174>
lea    0xe47(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1274 <chunk_type+0x174>
lea    0xe47(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1274 <chunk_type+0x174>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chunk_type>:
mov    (%rdi),%eax
cmp    $0xf8699e3f,%eax
jg     1131 <chunk_type+0x31>
cmp    $0xbc19efbf,%eax
jle    1155 <chunk_type+0x55>
cmp    $0xbc19efc0,%eax
je     1181 <chunk_type+0x81>
cmp    $0xbfc3cd50,%eax
je     1189 <chunk_type+0x89>
cmp    $0xd6e229d1,%eax
jne    11b1 <chunk_type+0xb1>
lea    0xf6a(%rip),%rax
ret
cmp    $0x49f1a43f,%eax
jle    116b <chunk_type+0x6b>
cmp    $0x49f1a440,%eax
je     1191 <chunk_type+0x91>
cmp    $0x75b22630,%eax
je     1199 <chunk_type+0x99>
cmp    $0x75b22636,%eax
jne    11b1 <chunk_type+0xb1>
lea    0xf12(%rip),%rax
ret
cmp    $0x8cabdca1,%eax
je     11a1 <chunk_type+0xa1>
cmp    $0xb7dc0791,%eax
jne    11b1 <chunk_type+0xb1>
lea    0xf1d(%rip),%rax
ret
cmp    $0xf8699e40,%eax
je     11a9 <chunk_type+0xa9>
cmp    $0x33000890,%eax
jne    11b1 <chunk_type+0xb1>
lea    0xef6(%rip),%rax
ret
lea    0xe8a(%rip),%rax
ret
lea    0xeac(%rip),%rax
ret
lea    0xe8c(%rip),%rax
ret
lea    0xeba(%rip),%rax
ret
lea    0xf02(%rip),%rax
ret
lea    0xe50(%rip),%rax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [18 x i8] c"guid_audio_stream\00"
@.str.1 = [18 x i8] c"guid_video_stream\00"
@.str.2 = [24 x i8] c"guid_audio_conceal_none\00"
@.str.3 = [30 x i8] c"guid_audio_conceal_interleave\00"
@.str.4 = [12 x i8] c"guid_header\00"
@.str.5 = [16 x i8] c"guid_data_chunk\00"
@.str.6 = [17 x i8] c"guid_index_chunk\00"
@.str.7 = [19 x i8] c"guid_stream_header\00"
@.str.8 = [16 x i8] c"guid_header_2_0\00"
@.str.9 = [17 x i8] c"guid_file_header\00"
define i8* @chunk_type(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
switch i32 %6, label %17 [
i32 -127295936, label %7
i32 -1139150912, label %8
i32 1240572992, label %9
i32 -1077686960, label %10
i32 1974609456, label %11
i32 1974609462, label %12
i32 855640208, label %13
i32 -1210316911, label %14
i32 -689821231, label %15
i32 -1934893919, label %16
]
7: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8** %2
br label %18
8: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %18
9: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %18
10: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %18
11: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %18
12: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %18
13: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %18
14: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %18
15: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %18
16: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %18
17: ; preds = %1
store i8* null, i8** %2
br label %18
18: ; preds = %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
@.str = [18 x i8] c"guid_audio_stream\00"
@.str.1 = [18 x i8] c"guid_video_stream\00"
@.str.2 = [24 x i8] c"guid_audio_conceal_none\00"
@.str.3 = [30 x i8] c"guid_audio_conceal_interleave\00"
@.str.4 = [12 x i8] c"guid_header\00"
@.str.5 = [16 x i8] c"guid_data_chunk\00"
@.str.6 = [17 x i8] c"guid_index_chunk\00"
@.str.7 = [19 x i8] c"guid_stream_header\00"
@.str.8 = [16 x i8] c"guid_header_2_0\00"
@.str.9 = [17 x i8] c"guid_file_header\00"
define i8* @chunk_type(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
switch i32 %3, label %13 [
i32 -127295936, label %14
i32 -1139150912, label %4
i32 1240572992, label %5
i32 -1077686960, label %6
i32 1974609456, label %7
i32 1974609462, label %8
i32 855640208, label %9
i32 -1210316911, label %10
i32 -689821231, label %11
i32 -1934893919, label %12
]
4: ; preds = %1
br label %14
5: ; preds = %1
br label %14
6: ; preds = %1
br label %14
7: ; preds = %1
br label %14
8: ; preds = %1
br label %14
9: ; preds = %1
br label %14
10: ; preds = %1
br label %14
11: ; preds = %1
br label %14
12: ; preds = %1
br label %14
13: ; preds = %1
br label %14
14: ; preds = %1, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4
%15 = phi i8* [ null, %13 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), %12 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), %11 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), %10 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), %9 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), %8 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), %7 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0), %6 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), %5 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), %4 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %15
}