char *mus_header_data_format2string(int format) {
  switch (format) {
  case -1:
    return ("unsupported");
    break;
  case 0:
    return ("no_snd");
    break;
  case 1:
    return ("16-bit big endian");
    break;
  case 2:
    return ("mulaw");
    break;
  case 3:
    return ("8-bit");
    break;
  case 4:
    return ("32-bit big endian float");
    break;
  case 5:
    return ("32-bit big endian");
    break;
  case 6:
    return ("alaw");
    break;
  case 7:
    return ("8-bit unsigned");
    break;
  case 8:
    return ("24-bit big endian");
    break;
  case 9:
    return ("64-bit big endian double");
    break;
  case 10:
    return ("16-bit little endian");
    break;
  case 11:
    return ("32-bit little endian");
    break;
  case 12:
    return ("32-bit little endian float");
    break;
  case 13:
    return ("64-bit little endian double");
    break;
  case 14:
    return ("16-bit big endian unsigned");
    break;
  case 15:
    return ("16-bit little endian unsigned");
    break;
  case 20:
    return ("12-bit big endian unsigned");
    break;
  case 21:
    return ("12-bit little endian unsigned");
    break;
  case 18:
    return ("12-bit big endian");
    break;
  case 19:
    return ("12-bit little endian");
    break;
  case 16:
    return ("24-bit little endian");
    break;
  case 17:
    return ("vax float");
    break;
  default:
    return ("unknown");
    break;
  }
}


x86 assembly (clang, -O0):
<mus_header_data_format2string>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x16,%eax
ja     12a0 <mus_header_data_format2string+0x1a0>
mov    -0x18(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf25(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf21(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf18(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf1a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf10(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf06(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf0e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf10(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf05(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf04(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf06(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf0f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf14(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf19(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf24(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf30(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf3b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf49(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf54(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf62(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf64(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf69(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf6e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12ab <mus_header_data_format2string+0x1ab>
lea    0xf68(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_header_data_format2string>:
add    $0x1,%edi
cmp    $0x16,%edi
ja     111a <mus_header_data_format2string+0x1a>
movslq %edi,%rax
lea    0x10aa(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0x1092(%rip),%rax
ret

LLVM IR (-O0):
@.str = [12 x i8] c"unsupported\00"
@.str.1 = [7 x i8] c"no_snd\00"
@.str.2 = [18 x i8] c"16-bit big endian\00"
@.str.3 = [6 x i8] c"mulaw\00"
@.str.4 = [6 x i8] c"8-bit\00"
@.str.5 = [24 x i8] c"32-bit big endian float\00"
@.str.6 = [18 x i8] c"32-bit big endian\00"
@.str.7 = [5 x i8] c"alaw\00"
@.str.8 = [15 x i8] c"8-bit unsigned\00"
@.str.9 = [18 x i8] c"24-bit big endian\00"
@.str.10 = [25 x i8] c"64-bit big endian double\00"
@.str.11 = [21 x i8] c"16-bit little endian\00"
@.str.12 = [21 x i8] c"32-bit little endian\00"
@.str.13 = [27 x i8] c"32-bit little endian float\00"
@.str.14 = [28 x i8] c"64-bit little endian double\00"
@.str.15 = [27 x i8] c"16-bit big endian unsigned\00"
@.str.16 = [30 x i8] c"16-bit little endian unsigned\00"
@.str.17 = [27 x i8] c"12-bit big endian unsigned\00"
@.str.18 = [30 x i8] c"12-bit little endian unsigned\00"
@.str.19 = [18 x i8] c"12-bit big endian\00"
@.str.20 = [21 x i8] c"12-bit little endian\00"
@.str.21 = [21 x i8] c"24-bit little endian\00"
@.str.22 = [10 x i8] c"vax float\00"
@.str.23 = [8 x i8] c"unknown\00"
define i8* @mus_header_data_format2string(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %28 [
i32 -1, label %5
i32 0, label %6
i32 1, label %7
i32 2, label %8
i32 3, label %9
i32 4, label %10
i32 5, label %11
i32 6, label %12
i32 7, label %13
i32 8, label %14
i32 9, label %15
i32 10, label %16
i32 11, label %17
i32 12, label %18
i32 13, label %19
i32 14, label %20
i32 15, label %21
i32 20, label %22
i32 21, label %23
i32 18, label %24
i32 19, label %25
i32 16, label %26
i32 17, label %27
]
5: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %2
br label %29
6: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %29
7: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %29
8: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %29
9: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %29
10: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %29
11: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %29
12: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %29
13: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %29
14: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %29
15: ; preds = %1
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %29
16: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %29
17: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %29
18: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %29
19: ; preds = %1
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %29
20: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %29
21: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %29
22: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %29
23: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %29
24: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %29
25: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0), i8** %2
br label %29
26: ; preds = %1
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.21, i64 0, i64 0), i8** %2
br label %29
27: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.22, i64 0, i64 0), i8** %2
br label %29
28: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.23, i64 0, i64 0), i8** %2
br label %29
29: ; preds = %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%30 = load i8*, i8** %2
ret i8* %30
}

LLVM IR (-O2):
@.str = [12 x i8] c"unsupported\00"
@.str.1 = [7 x i8] c"no_snd\00"
@.str.2 = [18 x i8] c"16-bit big endian\00"
@.str.3 = [6 x i8] c"mulaw\00"
@.str.4 = [6 x i8] c"8-bit\00"
@.str.5 = [24 x i8] c"32-bit big endian float\00"
@.str.6 = [18 x i8] c"32-bit big endian\00"
@.str.7 = [5 x i8] c"alaw\00"
@.str.8 = [15 x i8] c"8-bit unsigned\00"
@.str.9 = [18 x i8] c"24-bit big endian\00"
@.str.10 = [25 x i8] c"64-bit big endian double\00"
@.str.11 = [21 x i8] c"16-bit little endian\00"
@.str.12 = [21 x i8] c"32-bit little endian\00"
@.str.13 = [27 x i8] c"32-bit little endian float\00"
@.str.14 = [28 x i8] c"64-bit little endian double\00"
@.str.15 = [27 x i8] c"16-bit big endian unsigned\00"
@.str.16 = [30 x i8] c"16-bit little endian unsigned\00"
@.str.17 = [27 x i8] c"12-bit big endian unsigned\00"
@.str.18 = [30 x i8] c"12-bit little endian unsigned\00"
@.str.19 = [18 x i8] c"12-bit big endian\00"
@.str.20 = [21 x i8] c"12-bit little endian\00"
@.str.21 = [21 x i8] c"24-bit little endian\00"
@.str.22 = [10 x i8] c"vax float\00"
@.str.23 = [8 x i8] c"unknown\00"
@reltable.mus_header_data_format2string = [23 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.1 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([18 x i8]* @.str.2 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.3 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.4 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([24 x i8]* @.str.5 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([18 x i8]* @.str.6 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.7 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.8 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([18 x i8]* @.str.9 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([25 x i8]* @.str.10 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.11 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.12 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([27 x i8]* @.str.13 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([28 x i8]* @.str.14 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([27 x i8]* @.str.15 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([30 x i8]* @.str.16 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.21 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.22 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([18 x i8]* @.str.19 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([21 x i8]* @.str.20 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([27 x i8]* @.str.17 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([30 x i8]* @.str.18 to i64), i64 ptrtoint ([23 x i32]* @reltable.mus_header_data_format2string to i64)) to i32)]
define i8* @mus_header_data_format2string(i32 %0) {
%2 = add i32 %0, 1
%3 = icmp ult i32 %2, 23
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = shl i64 %5, 2
%7 = call i8* @llvm.load.relative.i64(i8* bitcast ([23 x i32]* @reltable.mus_header_data_format2string to i8*), i64 %6)
br label %8
8: ; preds = %1, %4
%9 = phi i8* [ %7, %4 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.23, i64 0, i64 0), %1 ]
ret i8* %9
}