#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);
char const *print_mmc_profile(int profile) {
  static char scrap[100];
  switch (profile) {
  case 0x00:
    return "Unknown[0] profile";
  case 0x01:
    return "Non removeable disc";
  case 0x02:
    return "Removable disc";
  case 0x03:
    return "Magneto Optical with sector erase";
  case 0x04:
    return "Magneto Optical write once";
  case 0x05:
    return "Advance Storage Magneto Optical";
  case 0x08:
    return "CD-ROM";
  case 0x09:
    return "CD-R recordable";
  case 0x0a:
    return "CD-RW rewritable";
  case 0x10:
    return "DVD-ROM";
  case 0x11:
    return "DVD-R sequential";
  case 0x12:
    return "DVD-RAM rewritable";
  case 0x13:
    return "DVD-RW restricted overwrite";
  case 0x14:
    return "DVD-RW sequential";
  case 0x1a:
    return "DVD+RW rewritable";
  case 0x1b:
    return "DVD+R recordable";
  case 0x20:
    return "DDCD readonly";
  case 0x21:
    return "DDCD-R recordable";
  case 0x22:
    return "DDCD-RW rewritable";
  case 0x2b:
    return "DVD+R double layer";
  case 0x40:
    return "BD-ROM";
  case 0x41:
    return "BD-R Sequential Recording (SRM)";
  case 0x42:
    return "BD-R Random Recording (RRM)";
  case 0x43:
    return "BD-RE rewritable";
  }
  sprintf(scrap, "Reserved profile 0x%02x", profile);
  return scrap;
}


x86 assembly (clang, -O0):
<print_mmc_profile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x43,%rax
ja     12c0 <print_mmc_profile+0x1b0>
mov    -0x18(%rbp),%rax
lea    0xec9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xfc9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfcc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfd0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfcf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfe1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfec(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xffc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0x1080(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0x1082(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfd3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfcb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfcc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfcf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfdb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfdd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfdf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfe0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfde(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfe0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfe3(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfe6(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfdd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xfed(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
lea    0xff9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12e1 <print_mmc_profile+0x1d1>
mov    -0xc(%rbp),%edx
lea    0x2d76(%rip),%rdi
lea    0xff0(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2d63(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_mmc_profile>:
push   %rbx
mov    %edi,%edx
cmp    $0x43,%edi
ja     116d <print_mmc_profile+0x5d>
lea    0xff1(%rip),%rbx
mov    %edx,%eax
lea    0xed8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xfeb(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0xff3(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0xff6(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0x100c(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0x101b(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0x2ecc(%rip),%rbx
lea    0x1146(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
jmp    1231 <print_mmc_profile+0x121>
lea    0x1014(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0x109c(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0x10a2(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0xff7(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0xff6(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0xffe(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0x1008(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0x101b(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0x1024(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0x102d(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0x1035(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0x103a(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0x1043(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0x104d(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0x1057(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0x1055(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0x106c(%rip),%rbx
jmp    1231 <print_mmc_profile+0x121>
lea    0x107f(%rip),%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@print_mmc_profile.scrap = internal global [100 x i8] zeroinitializer
@.str = [19 x i8] c"Unknown[0] profile\00"
@.str.1 = [20 x i8] c"Non removeable disc\00"
@.str.2 = [15 x i8] c"Removable disc\00"
@.str.3 = [34 x i8] c"Magneto Optical with sector erase\00"
@.str.4 = [27 x i8] c"Magneto Optical write once\00"
@.str.5 = [32 x i8] c"Advance Storage Magneto Optical\00"
@.str.6 = [7 x i8] c"CD-ROM\00"
@.str.7 = [16 x i8] c"CD-R recordable\00"
@.str.8 = [17 x i8] c"CD-RW rewritable\00"
@.str.9 = [8 x i8] c"DVD-ROM\00"
@.str.10 = [17 x i8] c"DVD-R sequential\00"
@.str.11 = [19 x i8] c"DVD-RAM rewritable\00"
@.str.12 = [28 x i8] c"DVD-RW restricted overwrite\00"
@.str.13 = [18 x i8] c"DVD-RW sequential\00"
@.str.14 = [18 x i8] c"DVD+RW rewritable\00"
@.str.15 = [17 x i8] c"DVD+R recordable\00"
@.str.16 = [14 x i8] c"DDCD\00"
@.str.17 = [18 x i8] c"DDCD-R recordable\00"
@.str.18 = [19 x i8] c"DDCD-RW rewritable\00"
@.str.19 = [19 x i8] c"DVD+R double layer\00"
@.str.20 = [7 x i8] c"BD-ROM\00"
@.str.21 = [32 x i8] c"BD-R Sequential Recording (SRM)\00"
@.str.22 = [28 x i8] c"BD-R Random Recording (RRM)\00"
@.str.23 = [17 x i8] c"BD-RE rewritable\00"
@.str.24 = [24 x i8] c"Reserved profile 0x%02x\00"
define i8* @print_mmc_profile(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %29 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
i32 5, label %10
i32 8, label %11
i32 9, label %12
i32 10, label %13
i32 16, label %14
i32 17, label %15
i32 18, label %16
i32 19, label %17
i32 20, label %18
i32 26, label %19
i32 27, label %20
i32 32, label %21
i32 33, label %22
i32 34, label %23
i32 43, label %24
i32 64, label %25
i32 65, label %26
i32 66, label %27
i32 67, label %28
]
5: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8** %2
br label %32
6: ; preds = %1
store i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %32
7: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %32
8: ; preds = %1
store i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %32
9: ; preds = %1
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %32
10: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %32
11: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %32
12: ; preds = %1
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %32
13: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %32
14: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %32
15: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %32
16: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %32
17: ; preds = %1
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %32
18: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %32
19: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %32
20: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %32
21: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %32
22: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %32
23: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %32
24: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %32
25: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0), i8** %2
br label %32
26: ; preds = %1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.21, i64 0, i64 0), i8** %2
br label %32
27: ; preds = %1
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.22, i64 0, i64 0), i8** %2
br label %32
28: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.23, i64 0, i64 0), i8** %2
br label %32
29: ; preds = %1
%30 = load i32, i32* %3
%31 = call i32 @sprintf(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @print_mmc_profile.scrap, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.24, i64 0, i64 0), i32 %30)
store i8* getelementptr inbounds ([100 x i8], [100 x i8]* @print_mmc_profile.scrap, i64 0, i64 0), i8** %2
br label %32
32: ; preds = %29, %28, %27, %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%33 = load i8*, i8** %2
ret i8* %33
}

LLVM IR (-O2):
@print_mmc_profile.scrap = internal global [100 x i8] zeroinitializer
@.str = [19 x i8] c"Unknown[0] profile\00"
@.str.1 = [20 x i8] c"Non removeable disc\00"
@.str.2 = [15 x i8] c"Removable disc\00"
@.str.3 = [34 x i8] c"Magneto Optical with sector erase\00"
@.str.4 = [27 x i8] c"Magneto Optical write once\00"
@.str.5 = [32 x i8] c"Advance Storage Magneto Optical\00"
@.str.6 = [7 x i8] c"CD-ROM\00"
@.str.7 = [16 x i8] c"CD-R recordable\00"
@.str.8 = [17 x i8] c"CD-RW rewritable\00"
@.str.9 = [8 x i8] c"DVD-ROM\00"
@.str.10 = [17 x i8] c"DVD-R sequential\00"
@.str.11 = [19 x i8] c"DVD-RAM rewritable\00"
@.str.12 = [28 x i8] c"DVD-RW restricted overwrite\00"
@.str.13 = [18 x i8] c"DVD-RW sequential\00"
@.str.14 = [18 x i8] c"DVD+RW rewritable\00"
@.str.15 = [17 x i8] c"DVD+R recordable\00"
@.str.16 = [14 x i8] c"DDCD\00"
@.str.17 = [18 x i8] c"DDCD-R recordable\00"
@.str.18 = [19 x i8] c"DDCD-RW rewritable\00"
@.str.19 = [19 x i8] c"DVD+R double layer\00"
@.str.20 = [7 x i8] c"BD-ROM\00"
@.str.21 = [32 x i8] c"BD-R Sequential Recording (SRM)\00"
@.str.22 = [28 x i8] c"BD-R Random Recording (RRM)\00"
@.str.23 = [17 x i8] c"BD-RE rewritable\00"
@.str.24 = [24 x i8] c"Reserved profile 0x%02x\00"
define i8* @print_mmc_profile(i32 %0) {
switch i32 %0, label %25 [
i32 0, label %27
i32 1, label %2
i32 2, label %3
i32 3, label %4
i32 4, label %5
i32 5, label %6
i32 8, label %7
i32 9, label %8
i32 10, label %9
i32 16, label %10
i32 17, label %11
i32 18, label %12
i32 19, label %13
i32 20, label %14
i32 26, label %15
i32 27, label %16
i32 32, label %17
i32 33, label %18
i32 34, label %19
i32 43, label %20
i32 64, label %21
i32 65, label %22
i32 66, label %23
i32 67, label %24
]
2: ; preds = %1
br label %27
3: ; preds = %1
br label %27
4: ; preds = %1
br label %27
5: ; preds = %1
br label %27
6: ; preds = %1
br label %27
7: ; preds = %1
br label %27
8: ; preds = %1
br label %27
9: ; preds = %1
br label %27
10: ; preds = %1
br label %27
11: ; preds = %1
br label %27
12: ; preds = %1
br label %27
13: ; preds = %1
br label %27
14: ; preds = %1
br label %27
15: ; preds = %1
br label %27
16: ; preds = %1
br label %27
17: ; preds = %1
br label %27
18: ; preds = %1
br label %27
19: ; preds = %1
br label %27
20: ; preds = %1
br label %27
21: ; preds = %1
br label %27
22: ; preds = %1
br label %27
23: ; preds = %1
br label %27
24: ; preds = %1
br label %27
25: ; preds = %1
%26 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([100 x i8], [100 x i8]* @print_mmc_profile.scrap, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.24, i64 0, i64 0), i32 %0)
br label %27
27: ; preds = %1, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5, %4, %3, %2
%28 = phi i8* [ getelementptr inbounds ([100 x i8], [100 x i8]* @print_mmc_profile.scrap, i64 0, i64 0), %25 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.23, i64 0, i64 0), %24 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.22, i64 0, i64 0), %23 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.21, i64 0, i64 0), %22 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0), %21 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.19, i64 0, i64 0), %20 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0), %19 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0), %18 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.16, i64 0, i64 0), %17 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0), %16 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([28 x i8], [28 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([7 x i8], [7 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 ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %28
}