#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 */
typedef int /*<<< orphan*/ str;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int);
const char *mat4_marker_to_str(int marker) {
  static char str[32];
  switch (marker) {
  case (((0) | ((0) << 8) | ((0x04) << 16) | ((0x06) << 24))):
    return "big endian 16 bit PCM";
  case (((0x1E) | ((0) << 8) | ((0) << 16) | ((0) << 24))):
    return "little endian 16 bit PCM";
  case (((0) | ((0) << 8) | ((0x03) << 16) | ((0xFC) << 24))):
    return "big endian 32 bit PCM";
  case (((0x14) | ((0) << 8) | ((0) << 16) | ((0) << 24))):
    return "little endian 32 bit PCM";
  case (((0) | ((0) << 8) | ((0x03) << 16) | ((0xF2) << 24))):
    return "big endian float";
  case (((0x0A) | ((0) << 8) | ((0) << 16) | ((0) << 24))):
    return "big endian float";
  case (((0) | ((0) << 8) | ((0x03) << 16) | ((0xE8) << 24))):
    return "big endian double";
  case (((0) | ((0) << 8) | ((0) << 16) | ((0) << 24))):
    return "little endian double";
  };
  str[sizeof(str) - 1] = 0;
  snprintf(str, sizeof(str) - 1, "%08X", marker);
  return str;
}


x86 assembly (clang, -O0):
<mat4_marker_to_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0xe8030000,%eax
je     120d <mat4_marker_to_str+0xfd>
jmp    1131 <mat4_marker_to_str+0x21>
mov    -0x10(%rbp),%eax
sub    $0xf2030000,%eax
je     11ed <mat4_marker_to_str+0xdd>
jmp    1144 <mat4_marker_to_str+0x34>
mov    -0x10(%rbp),%eax
sub    $0xfc030000,%eax
je     11cd <mat4_marker_to_str+0xbd>
jmp    1157 <mat4_marker_to_str+0x47>
mov    -0x10(%rbp),%eax
test   %eax,%eax
je     121d <mat4_marker_to_str+0x10d>
jmp    1167 <mat4_marker_to_str+0x57>
mov    -0x10(%rbp),%eax
sub    $0xa,%eax
je     11fd <mat4_marker_to_str+0xed>
jmp    1178 <mat4_marker_to_str+0x68>
mov    -0x10(%rbp),%eax
sub    $0x14,%eax
je     11dd <mat4_marker_to_str+0xcd>
jmp    1189 <mat4_marker_to_str+0x79>
mov    -0x10(%rbp),%eax
sub    $0x1e,%eax
je     11bd <mat4_marker_to_str+0xad>
jmp    119a <mat4_marker_to_str+0x8a>
mov    -0x10(%rbp),%eax
sub    $0x6040000,%eax
jne    122d <mat4_marker_to_str+0x11d>
jmp    11ad <mat4_marker_to_str+0x9d>
lea    0xe4c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    125a <mat4_marker_to_str+0x14a>
lea    0xe52(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    125a <mat4_marker_to_str+0x14a>
lea    0xe5b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    125a <mat4_marker_to_str+0x14a>
lea    0xe61(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    125a <mat4_marker_to_str+0x14a>
lea    0xe6a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    125a <mat4_marker_to_str+0x14a>
lea    0xe5a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    125a <mat4_marker_to_str+0x14a>
lea    0xe5b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    125a <mat4_marker_to_str+0x14a>
lea    0xe5d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    125a <mat4_marker_to_str+0x14a>
movb   $0x0,0x2e2b(%rip)
mov    -0xc(%rbp),%ecx
lea    0x2e02(%rip),%rdi
mov    $0x1f,%esi
lea    0xe4c(%rip),%rdx
call   1030 <snprintf@plt>
lea    0x2dea(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mat4_marker_to_str>:
push   %rbx
mov    %edi,%ecx
test   %edi,%edi
js     1137 <mat4_marker_to_str+0x27>
cmp    $0x1e,%ecx
ja     1161 <mat4_marker_to_str+0x51>
mov    %ecx,%eax
lea    0xedb(%rip),%rdx
movslq (%rdx,%rax,4),%rax
add    %rdx,%rax
jmp    *%rax
lea    0xfc8(%rip),%rbx
jmp    11af <mat4_marker_to_str+0x9f>
cmp    $0xe8030000,%ecx
je     11a8 <mat4_marker_to_str+0x98>
cmp    $0xf2030000,%ecx
je     1158 <mat4_marker_to_str+0x48>
cmp    $0xfc030000,%ecx
jne    1172 <mat4_marker_to_str+0x62>
lea    0xf55(%rip),%rbx
jmp    11af <mat4_marker_to_str+0x9f>
lea    0xf7b(%rip),%rbx
jmp    11af <mat4_marker_to_str+0x9f>
cmp    $0x6040000,%ecx
jne    1172 <mat4_marker_to_str+0x62>
lea    0xf0c(%rip),%rbx
jmp    11af <mat4_marker_to_str+0x9f>
movb   $0x0,0x2ee6(%rip)
lea    0x2ec0(%rip),%rbx
lea    0xf8b(%rip),%rdx
mov    %rbx,%rdi
mov    $0x1f,%esi
call   1030 <snprintf@plt>
jmp    11af <mat4_marker_to_str+0x9f>
lea    0xf24(%rip),%rbx
jmp    11af <mat4_marker_to_str+0x9f>
lea    0xeec(%rip),%rbx
jmp    11af <mat4_marker_to_str+0x9f>
lea    0xf3c(%rip),%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@mat4_marker_to_str.str = internal global [32 x i8] zeroinitializer
@.str = [22 x i8] c"big endian 16 bit PCM\00"
@.str.1 = [25 x i8] c"little endian 16 bit PCM\00"
@.str.2 = [22 x i8] c"big endian 32 bit PCM\00"
@.str.3 = [25 x i8] c"little endian 32 bit PCM\00"
@.str.4 = [17 x i8] c"big endian float\00"
@.str.5 = [18 x i8] c"big endian double\00"
@.str.6 = [21 x i8] c"little endian double\00"
@.str.7 = [5 x i8] c"%08X\00"
define i8* @mat4_marker_to_str(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %13 [
i32 100925440, label %5
i32 30, label %6
i32 -66912256, label %7
i32 20, label %8
i32 -234684416, label %9
i32 10, label %10
i32 -402456576, label %11
i32 0, label %12
]
5: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8** %2
br label %16
6: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %16
7: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %16
8: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %16
9: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %16
10: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %16
11: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %16
12: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %16
13: ; preds = %1
store i8 0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @mat4_marker_to_str.str, i64 0, i64 31)
%14 = load i32, i32* %3
%15 = call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @mat4_marker_to_str.str, i64 0, i64 0), i32 31, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %14)
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @mat4_marker_to_str.str, i64 0, i64 0), i8** %2
br label %16
16: ; preds = %13, %12, %11, %10, %9, %8, %7, %6, %5
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
@mat4_marker_to_str.str = internal global [32 x i8] zeroinitializer
@.str = [22 x i8] c"big endian 16 bit PCM\00"
@.str.1 = [25 x i8] c"little endian 16 bit PCM\00"
@.str.2 = [22 x i8] c"big endian 32 bit PCM\00"
@.str.3 = [25 x i8] c"little endian 32 bit PCM\00"
@.str.4 = [17 x i8] c"big endian float\00"
@.str.5 = [18 x i8] c"big endian double\00"
@.str.6 = [21 x i8] c"little endian double\00"
@.str.7 = [5 x i8] c"%08X\00"
define i8* @mat4_marker_to_str(i32 %0) {
switch i32 %0, label %9 [
i32 100925440, label %11
i32 30, label %2
i32 -66912256, label %3
i32 20, label %4
i32 -234684416, label %5
i32 10, label %6
i32 -402456576, label %7
i32 0, label %8
]
2: ; preds = %1
br label %11
3: ; preds = %1
br label %11
4: ; preds = %1
br label %11
5: ; preds = %1
br label %11
6: ; preds = %1
br label %11
7: ; preds = %1
br label %11
8: ; preds = %1
br label %11
9: ; preds = %1
store i8 0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @mat4_marker_to_str.str, i64 0, i64 31)
%10 = tail call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @mat4_marker_to_str.str, i64 0, i64 0), i32 31, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 %0)
br label %11
11: ; preds = %1, %9, %8, %7, %6, %5, %4, %3, %2
%12 = phi i8* [ getelementptr inbounds ([32 x i8], [32 x i8]* @mat4_marker_to_str.str, i64 0, i64 0), %9 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), %8 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), %7 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), %6 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %12
}