char *audio_out_format_name(int format) {
  switch (format) {
  case 0x00000001:
    return ("Mu-Law");
  case 0x00000002:
    return ("A-Law");
  case 0x00000004:
    return ("Ima-ADPCM");
  case 0x00000040:
    return ("Signed 8-bit");
  case 0x00000008:
    return ("Unsigned 8-bit");
  case 0x00000080:
    return ("Unsigned 16-bit (Little-Endian)");
  case 0x00000100:
    return ("Unsigned 16-bit (Big-Endian)");
  case 0x00000010:
    return ("Signed 16-bit (Little-Endian)");
  case 0x00000020:
    return ("Signed 16-bit (Big-Endian)");
  case 0x00000200:
    return ("MPEG (2) audio");
  case 0x00000400:
    return ("AC3");
  case 0x00020000:
    return ("Unsigned 32-bit (Little-Endian)");
  case 0x00040000:
    return ("Unsigned 32-bit (Big-Endian)");
  case 0x00008000:
    return ("Signed 32-bit (Little-Endian)");
  case 0x00010000:
    return ("Signed 32-bit (Big-Endian)");
  case 0x00002000:
    return ("Unsigned 24-bit (Little-Endian)");
  case 0x00004000:
    return ("Unsigned 24-bit (Big-Endian)");
  case 0x00000800:
    return ("Signed 24-bit (Little-Endian)");
  case 0x00001000:
    return ("Signed 24-bit (Big-Endian)");
  case 0x00100000:
    return ("Floating Point");
  }
  return ("Unknown");
}


x86 assembly (clang, -O0):
<audio_out_format_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     1278 <audio_out_format_name+0x178>
jmp    111b <audio_out_format_name+0x1b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     1288 <audio_out_format_name+0x188>
jmp    112c <audio_out_format_name+0x2c>
mov    -0x10(%rbp),%eax
sub    $0x4,%eax
je     1298 <audio_out_format_name+0x198>
jmp    113d <audio_out_format_name+0x3d>
mov    -0x10(%rbp),%eax
sub    $0x8,%eax
je     12b8 <audio_out_format_name+0x1b8>
jmp    114e <audio_out_format_name+0x4e>
mov    -0x10(%rbp),%eax
sub    $0x10,%eax
je     12e8 <audio_out_format_name+0x1e8>
jmp    115f <audio_out_format_name+0x5f>
mov    -0x10(%rbp),%eax
sub    $0x20,%eax
je     12f8 <audio_out_format_name+0x1f8>
jmp    1170 <audio_out_format_name+0x70>
mov    -0x10(%rbp),%eax
sub    $0x40,%eax
je     12a8 <audio_out_format_name+0x1a8>
jmp    1181 <audio_out_format_name+0x81>
mov    -0x10(%rbp),%eax
sub    $0x80,%eax
je     12c8 <audio_out_format_name+0x1c8>
jmp    1194 <audio_out_format_name+0x94>
mov    -0x10(%rbp),%eax
sub    $0x100,%eax
je     12d8 <audio_out_format_name+0x1d8>
jmp    11a7 <audio_out_format_name+0xa7>
mov    -0x10(%rbp),%eax
sub    $0x200,%eax
je     1308 <audio_out_format_name+0x208>
jmp    11ba <audio_out_format_name+0xba>
mov    -0x10(%rbp),%eax
sub    $0x400,%eax
je     1318 <audio_out_format_name+0x218>
jmp    11cd <audio_out_format_name+0xcd>
mov    -0x10(%rbp),%eax
sub    $0x800,%eax
je     1388 <audio_out_format_name+0x288>
jmp    11e0 <audio_out_format_name+0xe0>
mov    -0x10(%rbp),%eax
sub    $0x1000,%eax
je     1398 <audio_out_format_name+0x298>
jmp    11f3 <audio_out_format_name+0xf3>
mov    -0x10(%rbp),%eax
sub    $0x2000,%eax
je     1368 <audio_out_format_name+0x268>
jmp    1206 <audio_out_format_name+0x106>
mov    -0x10(%rbp),%eax
sub    $0x4000,%eax
je     1378 <audio_out_format_name+0x278>
jmp    1219 <audio_out_format_name+0x119>
mov    -0x10(%rbp),%eax
sub    $0x8000,%eax
je     1348 <audio_out_format_name+0x248>
jmp    122c <audio_out_format_name+0x12c>
mov    -0x10(%rbp),%eax
sub    $0x10000,%eax
je     1358 <audio_out_format_name+0x258>
jmp    123f <audio_out_format_name+0x13f>
mov    -0x10(%rbp),%eax
sub    $0x20000,%eax
je     1328 <audio_out_format_name+0x228>
jmp    1252 <audio_out_format_name+0x152>
mov    -0x10(%rbp),%eax
sub    $0x40000,%eax
je     1338 <audio_out_format_name+0x238>
jmp    1265 <audio_out_format_name+0x165>
mov    -0x10(%rbp),%eax
sub    $0x100000,%eax
je     13a8 <audio_out_format_name+0x2a8>
jmp    13b8 <audio_out_format_name+0x2b8>
lea    0xd81(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xd78(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xd6e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xd68(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xd65(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xd64(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xd74(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xd81(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xd8f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xd9a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xd99(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xd8d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xd9d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xdaa(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xdb8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xdc3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xdd3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xde0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xdee(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xdf9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    13c3 <audio_out_format_name+0x2c3>
lea    0xdf8(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<audio_out_format_name>:
cmp    $0x3ff,%edi
jg     113c <audio_out_format_name+0x3c>
cmp    $0x7f,%edi
jg     11b0 <audio_out_format_name+0xb0>
add    $0xffffffff,%edi
cmp    $0x3f,%edi
ja     127c <audio_out_format_name+0x17c>
lea    0xfdc(%rip),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
lea    0xfcc(%rip),%rax
ret
cmp    $0x7fff,%edi
jg     117c <audio_out_format_name+0x7c>
cmp    $0xfff,%edi
jle    11dc <audio_out_format_name+0xdc>
cmp    $0x1000,%edi
je     123c <audio_out_format_name+0x13c>
cmp    $0x2000,%edi
je     1244 <audio_out_format_name+0x144>
cmp    $0x4000,%edi
jne    127c <audio_out_format_name+0x17c>
lea    0x10d7(%rip),%rax
ret
cmp    $0x1ffff,%edi
jle    11fc <audio_out_format_name+0xfc>
cmp    $0x20000,%edi
je     124c <audio_out_format_name+0x14c>
cmp    $0x40000,%edi
je     1254 <audio_out_format_name+0x154>
cmp    $0x100000,%edi
jne    127c <audio_out_format_name+0x17c>
lea    0x10f9(%rip),%rax
ret
cmp    $0x80,%edi
je     125c <audio_out_format_name+0x15c>
cmp    $0x100,%edi
je     1264 <audio_out_format_name+0x164>
cmp    $0x200,%edi
jne    127c <audio_out_format_name+0x17c>
lea    0xfce(%rip),%rax
ret
cmp    $0x400,%edi
je     126c <audio_out_format_name+0x16c>
cmp    $0x800,%edi
jne    127c <audio_out_format_name+0x17c>
lea    0x1074(%rip),%rax
ret
cmp    $0x8000,%edi
je     1274 <audio_out_format_name+0x174>
cmp    $0x10000,%edi
jne    127c <audio_out_format_name+0x17c>
lea    0x1004(%rip),%rax
ret
lea    0xef2(%rip),%rax
ret
lea    0xf01(%rip),%rax
ret
lea    0xf45(%rip),%rax
ret
lea    0xf5b(%rip),%rax
ret
lea    0xedc(%rip),%rax
ret
lea    0x104a(%rip),%rax
ret
lea    0xfe7(%rip),%rax
ret
lea    0xf69(%rip),%rax
ret
lea    0xf81(%rip),%rax
ret
lea    0xed0(%rip),%rax
ret
lea    0xee8(%rip),%rax
ret
lea    0xf45(%rip),%rax
ret
lea    0xf7e(%rip),%rax
ret
lea    0x1034(%rip),%rax
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Mu-Law\00"
@.str.1 = [6 x i8] c"A-Law\00"
@.str.2 = [10 x i8] c"Ima-ADPCM\00"
@.str.3 = [13 x i8] c"Signed 8-bit\00"
@.str.4 = [15 x i8] c"Unsigned 8-bit\00"
@.str.5 = [32 x i8] c"Unsigned 16-bit (Little-Endian)\00"
@.str.6 = [29 x i8] c"Unsigned 16-bit (Big-Endian)\00"
@.str.7 = [30 x i8] c"Signed 16-bit (Little-Endian)\00"
@.str.8 = [27 x i8] c"Signed 16-bit (Big-Endian)\00"
@.str.9 = [15 x i8] c"MPEG (2) audio\00"
@.str.10 = [4 x i8] c"AC3\00"
@.str.11 = [32 x i8] c"Unsigned 32-bit (Little-Endian)\00"
@.str.12 = [29 x i8] c"Unsigned 32-bit (Big-Endian)\00"
@.str.13 = [30 x i8] c"Signed 32-bit (Little-Endian)\00"
@.str.14 = [27 x i8] c"Signed 32-bit (Big-Endian)\00"
@.str.15 = [32 x i8] c"Unsigned 24-bit (Little-Endian)\00"
@.str.16 = [29 x i8] c"Unsigned 24-bit (Big-Endian)\00"
@.str.17 = [30 x i8] c"Signed 24-bit (Little-Endian)\00"
@.str.18 = [27 x i8] c"Signed 24-bit (Big-Endian)\00"
@.str.19 = [15 x i8] c"Floating Point\00"
@.str.20 = [8 x i8] c"Unknown\00"
define i8* @audio_out_format_name(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %25 [
i32 1, label %5
i32 2, label %6
i32 4, label %7
i32 64, label %8
i32 8, label %9
i32 128, label %10
i32 256, label %11
i32 16, label %12
i32 32, label %13
i32 512, label %14
i32 1024, label %15
i32 131072, label %16
i32 262144, label %17
i32 32768, label %18
i32 65536, label %19
i32 8192, label %20
i32 16384, label %21
i32 2048, label %22
i32 4096, label %23
i32 1048576, label %24
]
5: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %2
br label %26
6: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %26
7: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %26
8: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %26
9: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %26
10: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %26
11: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %26
12: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %26
13: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %26
14: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %26
15: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %26
16: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %26
17: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %26
18: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %26
19: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %26
20: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %26
21: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %26
22: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %26
23: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %26
24: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %26
25: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0), i8** %2
br label %26
26: ; preds = %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%27 = load i8*, i8** %2
ret i8* %27
}

LLVM IR (-O2):
@.str = [7 x i8] c"Mu-Law\00"
@.str.1 = [6 x i8] c"A-Law\00"
@.str.2 = [10 x i8] c"Ima-ADPCM\00"
@.str.3 = [13 x i8] c"Signed 8-bit\00"
@.str.4 = [15 x i8] c"Unsigned 8-bit\00"
@.str.5 = [32 x i8] c"Unsigned 16-bit (Little-Endian)\00"
@.str.6 = [29 x i8] c"Unsigned 16-bit (Big-Endian)\00"
@.str.7 = [30 x i8] c"Signed 16-bit (Little-Endian)\00"
@.str.8 = [27 x i8] c"Signed 16-bit (Big-Endian)\00"
@.str.9 = [15 x i8] c"MPEG (2) audio\00"
@.str.10 = [4 x i8] c"AC3\00"
@.str.11 = [32 x i8] c"Unsigned 32-bit (Little-Endian)\00"
@.str.12 = [29 x i8] c"Unsigned 32-bit (Big-Endian)\00"
@.str.13 = [30 x i8] c"Signed 32-bit (Little-Endian)\00"
@.str.14 = [27 x i8] c"Signed 32-bit (Big-Endian)\00"
@.str.15 = [32 x i8] c"Unsigned 24-bit (Little-Endian)\00"
@.str.16 = [29 x i8] c"Unsigned 24-bit (Big-Endian)\00"
@.str.17 = [30 x i8] c"Signed 24-bit (Little-Endian)\00"
@.str.18 = [27 x i8] c"Signed 24-bit (Big-Endian)\00"
@.str.19 = [15 x i8] c"Floating Point\00"
@.str.20 = [8 x i8] c"Unknown\00"
define i8* @audio_out_format_name(i32 %0) {
switch i32 %0, label %21 [
i32 1, label %22
i32 2, label %2
i32 4, label %3
i32 64, label %4
i32 8, label %5
i32 128, label %6
i32 256, label %7
i32 16, label %8
i32 32, label %9
i32 512, label %10
i32 1024, label %11
i32 131072, label %12
i32 262144, label %13
i32 32768, label %14
i32 65536, label %15
i32 8192, label %16
i32 16384, label %17
i32 2048, label %18
i32 4096, label %19
i32 1048576, label %20
]
2: ; preds = %1
br label %22
3: ; preds = %1
br label %22
4: ; preds = %1
br label %22
5: ; preds = %1
br label %22
6: ; preds = %1
br label %22
7: ; preds = %1
br label %22
8: ; preds = %1
br label %22
9: ; preds = %1
br label %22
10: ; preds = %1
br label %22
11: ; preds = %1
br label %22
12: ; preds = %1
br label %22
13: ; preds = %1
br label %22
14: ; preds = %1
br label %22
15: ; preds = %1
br label %22
16: ; preds = %1
br label %22
17: ; preds = %1
br label %22
18: ; preds = %1
br label %22
19: ; preds = %1
br label %22
20: ; preds = %1
br label %22
21: ; preds = %1
br label %22
22: ; preds = %1, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%23 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0), %21 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.19, i64 0, i64 0), %20 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.18, i64 0, i64 0), %19 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.17, i64 0, i64 0), %18 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.16, i64 0, i64 0), %17 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), %16 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %23
}