char *get_oem_sensor_type_string(unsigned char sensor_type) {
  switch (sensor_type) {
  case 0xC0:
    return ("OEM I2C Bus");
  case 0xDD:
    return ("OEM Power Consumption");
  case 0xDE:
    return ("OEM Memory Status");
  case 0xDF:
    return ("OEM Memory Config");
  case 0xE1:
    return ("OEM Memory");
  case 0xE6:
    return ("OEM Fan Status");
  case 0xE8:
    return ("OEM PSU Status");
  case 0xE9:
    return ("OEM PSU Redundancy");
  case 0xEA:
    return ("OEM Communication");
  case 0xEC:
    return ("OEM Flash");
  case 0xEE:
    return ("OEM Event");
  case 0xEF:
    return ("OEM Config Backup");
  default:
    break;
  }
  return ("");
}


x86 assembly (clang, -O0):
<get_oem_sensor_type_string>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
add    $0xffffff40,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x2f,%eax
ja     11f6 <get_oem_sensor_type_string+0xf6>
mov    -0x18(%rbp),%rax
lea    0xed3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf83(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1206 <get_oem_sensor_type_string+0x106>
lea    0xf7f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1206 <get_oem_sensor_type_string+0x106>
lea    0xf85(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1206 <get_oem_sensor_type_string+0x106>
lea    0xf87(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1206 <get_oem_sensor_type_string+0x106>
lea    0xf89(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1206 <get_oem_sensor_type_string+0x106>
lea    0xf84(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1206 <get_oem_sensor_type_string+0x106>
lea    0xf83(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1206 <get_oem_sensor_type_string+0x106>
lea    0xf82(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1206 <get_oem_sensor_type_string+0x106>
lea    0xf85(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1206 <get_oem_sensor_type_string+0x106>
lea    0xf87(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1206 <get_oem_sensor_type_string+0x106>
lea    0xf81(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1206 <get_oem_sensor_type_string+0x106>
lea    0xf7b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1206 <get_oem_sensor_type_string+0x106>
jmp    11fb <get_oem_sensor_type_string+0xfb>
lea    0xf03(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_oem_sensor_type_string>:
add    $0x40,%dil
cmp    $0x2f,%dil
ja     112d <get_oem_sensor_type_string+0x2d>
lea    0xfaf(%rip),%rax
movzbl %dil,%ecx
lea    0xee4(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0xfa0(%rip),%rax
ret
lea    0xfd1(%rip),%rax
ret
lea    0xfa6(%rip),%rax
ret
lea    0xfb0(%rip),%rax
ret
lea    0xfba(%rip),%rax
ret
lea    0xfbd(%rip),%rax
ret
lea    0xfc4(%rip),%rax
ret
lea    0xfcb(%rip),%rax
ret
lea    0xfd6(%rip),%rax
ret
lea    0xfe0(%rip),%rax
ret
lea    0xfe2(%rip),%rax
ret
lea    0xfe4(%rip),%rax
ret

LLVM IR (-O0):
@.str = [12 x i8] c"OEM I2C Bus\00"
@.str.1 = [22 x i8] c"OEM Power Consumption\00"
@.str.2 = [18 x i8] c"OEM Memory Status\00"
@.str.3 = [18 x i8] c"OEM Memory Config\00"
@.str.4 = [11 x i8] c"OEM Memory\00"
@.str.5 = [15 x i8] c"OEM Fan Status\00"
@.str.6 = [15 x i8] c"OEM PSU Status\00"
@.str.7 = [19 x i8] c"OEM PSU Redundancy\00"
@.str.8 = [18 x i8] c"OEM Communication\00"
@.str.9 = [10 x i8] c"OEM Flash\00"
@.str.10 = [10 x i8] c"OEM Event\00"
@.str.11 = [18 x i8] c"OEM Config Backup\00"
@.str.12 = [1 x i8] zeroinitializer
define i8* @get_oem_sensor_type_string(i8 zeroext %0) {
%2 = alloca i8*
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
switch i32 %5, label %18 [
i32 192, label %6
i32 221, label %7
i32 222, label %8
i32 223, label %9
i32 225, label %10
i32 230, label %11
i32 232, label %12
i32 233, label %13
i32 234, label %14
i32 236, label %15
i32 238, label %16
i32 239, label %17
]
6: ; preds = %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %2
br label %20
7: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %20
8: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %20
9: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %20
10: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %20
11: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %20
12: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %20
13: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %20
14: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %20
15: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %20
16: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %20
17: ; preds = %1
store i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %20
18: ; preds = %1
br label %19
19: ; preds = %18
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %20
20: ; preds = %19, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
@.str = [12 x i8] c"OEM I2C Bus\00"
@.str.1 = [22 x i8] c"OEM Power Consumption\00"
@.str.2 = [18 x i8] c"OEM Memory Status\00"
@.str.3 = [18 x i8] c"OEM Memory Config\00"
@.str.4 = [11 x i8] c"OEM Memory\00"
@.str.5 = [15 x i8] c"OEM Fan Status\00"
@.str.6 = [15 x i8] c"OEM PSU Status\00"
@.str.7 = [19 x i8] c"OEM PSU Redundancy\00"
@.str.8 = [18 x i8] c"OEM Communication\00"
@.str.9 = [10 x i8] c"OEM Flash\00"
@.str.10 = [10 x i8] c"OEM Event\00"
@.str.11 = [18 x i8] c"OEM Config Backup\00"
@.str.12 = [1 x i8] zeroinitializer
define i8* @get_oem_sensor_type_string(i8 zeroext %0) {
switch i8 %0, label %13 [
i8 -64, label %14
i8 -35, label %2
i8 -34, label %3
i8 -33, label %4
i8 -31, label %5
i8 -26, label %6
i8 -24, label %7
i8 -23, label %8
i8 -22, label %9
i8 -20, label %10
i8 -18, label %11
i8 -17, label %12
]
2: ; preds = %1
br label %14
3: ; preds = %1
br label %14
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, %3, %2
%15 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %15
}