char *get_ratestr(int txRate) {
  char *pStr;
  switch (txRate) {
  case 0:
    pStr = "1";
    break;
  case 1:
    pStr = "2";
    break;
  case 2:
    pStr = "5.5";
    break;
  case 3:
    pStr = "11";
    break;
  case 4:
    pStr = "6";
    break;
  case 5:
    pStr = "9";
    break;
  case 6:
    pStr = "12";
    break;
  case 7:
    pStr = "18";
    break;
  case 8:
    pStr = "24";
    break;
  case 9:
    pStr = "36";
    break;
  case 10:
    pStr = "48";
    break;
  case 11:
    pStr = "54";
    break;
  case 12:
    pStr = "MCS0";
    break;
  case 13:
    pStr = "MCS1";
    break;
  case 14:
    pStr = "MCS2";
    break;
  case 15:
    pStr = "MCS3";
    break;
  case 16:
    pStr = "MCS4";
    break;
  case 17:
    pStr = "MCS5";
    break;
  case 18:
    pStr = "MCS6";
    break;
  case 19:
    pStr = "MCS7";
    break;
  case 140:
    pStr = "MCS0";
    break;
  case 141:
    pStr = "MCS1";
    break;
  case 142:
    pStr = "MCS2";
    break;
  case 143:
    pStr = "MCS3";
    break;
  case 144:
    pStr = "MCS4";
    break;
  case 145:
    pStr = "MCS5";
    break;
  case 146:
    pStr = "MCS6";
    break;
  case 147:
    pStr = "MCS7";
    break;
  default:
    pStr = "Unkn";
    break;
  }
  return pStr;
}


x86 assembly (clang, -O0):
<get_ratestr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x93,%rax
ja     12ee <get_ratestr+0x1ee>
mov    -0x18(%rbp),%rax
lea    0xedb(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x1120(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x1115(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x10fb(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x10ef(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x10ee(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x10d2(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x10c4(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x10b7(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x10aa(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x109d(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x1090(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x1083(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x1076(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x106b(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x1060(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x1055(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x104a(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x103f(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x1034(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0x1029(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0xff6(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0xfeb(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0xfe0(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0xfd5(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0xfca(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0xfbf(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0xfb4(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0xfa9(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    12f9 <get_ratestr+0x1f9>
lea    0xf9e(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ratestr>:
cmp    $0x93,%edi
ja     11bd <get_ratestr+0xbd>
lea    0x1142(%rip),%rax
mov    %edi,%ecx
lea    0xee4(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0x113f(%rip),%rax
ret
lea    0x113c(%rip),%rax
ret
lea    0x1139(%rip),%rax
ret
lea    0x1136(%rip),%rax
ret
lea    0x1133(%rip),%rax
ret
lea    0x1130(%rip),%rax
ret
lea    0x112d(%rip),%rax
ret
lea    0x112a(%rip),%rax
ret
lea    0x10ee(%rip),%rax
ret
lea    0x10dc(%rip),%rax
ret
lea    0x10d8(%rip),%rax
ret
lea    0x10df(%rip),%rax
ret
lea    0x10cb(%rip),%rax
ret
lea    0x10c5(%rip),%rax
ret
lea    0x10c0(%rip),%rax
ret
lea    0x10bb(%rip),%rax
ret
lea    0x10b6(%rip),%rax
ret
lea    0x10b1(%rip),%rax
ret
lea    0x10ac(%rip),%rax
ret
lea    0x10cf(%rip),%rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c"1\00"
@.str.1 = [2 x i8] c"2\00"
@.str.2 = [4 x i8] c"5.5\00"
@.str.3 = [3 x i8] c"11\00"
@.str.4 = [2 x i8] c"6\00"
@.str.5 = [2 x i8] c"9\00"
@.str.6 = [3 x i8] c"12\00"
@.str.7 = [3 x i8] c"18\00"
@.str.8 = [3 x i8] c"24\00"
@.str.9 = [3 x i8] c"36\00"
@.str.10 = [3 x i8] c"48\00"
@.str.11 = [3 x i8] c"54\00"
@.str.12 = [5 x i8] c"MCS0\00"
@.str.13 = [5 x i8] c"MCS1\00"
@.str.14 = [5 x i8] c"MCS2\00"
@.str.15 = [5 x i8] c"MCS3\00"
@.str.16 = [5 x i8] c"MCS4\00"
@.str.17 = [5 x i8] c"MCS5\00"
@.str.18 = [5 x i8] c"MCS6\00"
@.str.19 = [5 x i8] c"MCS7\00"
@.str.20 = [5 x i8] c"Unkn\00"
define i8* @get_ratestr(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %33 [
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 6, label %11
i32 7, label %12
i32 8, label %13
i32 9, label %14
i32 10, label %15
i32 11, label %16
i32 12, label %17
i32 13, label %18
i32 14, label %19
i32 15, label %20
i32 16, label %21
i32 17, label %22
i32 18, label %23
i32 19, label %24
i32 140, label %25
i32 141, label %26
i32 142, label %27
i32 143, label %28
i32 144, label %29
i32 145, label %30
i32 146, label %31
i32 147, label %32
]
5: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %3
br label %34
6: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %34
7: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %34
8: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %34
9: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %34
10: ; preds = %1
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %34
11: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8** %3
br label %34
12: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8** %3
br label %34
13: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8** %3
br label %34
14: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8** %3
br label %34
15: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8** %3
br label %34
16: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8** %3
br label %34
17: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8** %3
br label %34
18: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8** %3
br label %34
19: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i8** %3
br label %34
20: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8** %3
br label %34
21: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i8** %3
br label %34
22: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8** %3
br label %34
23: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8** %3
br label %34
24: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0), i8** %3
br label %34
25: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8** %3
br label %34
26: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8** %3
br label %34
27: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), i8** %3
br label %34
28: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8** %3
br label %34
29: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), i8** %3
br label %34
30: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8** %3
br label %34
31: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8** %3
br label %34
32: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0), i8** %3
br label %34
33: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), i8** %3
br label %34
34: ; preds = %33, %32, %31, %30, %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
%35 = load i8*, i8** %3
ret i8* %35
}

LLVM IR (-O2):
@.str = [2 x i8] c"1\00"
@.str.1 = [2 x i8] c"2\00"
@.str.2 = [4 x i8] c"5.5\00"
@.str.3 = [3 x i8] c"11\00"
@.str.4 = [2 x i8] c"6\00"
@.str.5 = [2 x i8] c"9\00"
@.str.6 = [3 x i8] c"12\00"
@.str.7 = [3 x i8] c"18\00"
@.str.8 = [3 x i8] c"24\00"
@.str.9 = [3 x i8] c"36\00"
@.str.10 = [3 x i8] c"48\00"
@.str.11 = [3 x i8] c"54\00"
@.str.12 = [5 x i8] c"MCS0\00"
@.str.13 = [5 x i8] c"MCS1\00"
@.str.14 = [5 x i8] c"MCS2\00"
@.str.15 = [5 x i8] c"MCS3\00"
@.str.16 = [5 x i8] c"MCS4\00"
@.str.17 = [5 x i8] c"MCS5\00"
@.str.18 = [5 x i8] c"MCS6\00"
@.str.19 = [5 x i8] c"MCS7\00"
@.str.20 = [5 x i8] c"Unkn\00"
define i8* @get_ratestr(i32 %0) {
switch i32 %0, label %29 [
i32 0, label %30
i32 1, label %2
i32 2, label %3
i32 3, label %4
i32 4, label %5
i32 5, label %6
i32 6, label %7
i32 7, label %8
i32 8, label %9
i32 9, label %10
i32 10, label %11
i32 11, label %12
i32 12, label %13
i32 13, label %14
i32 14, label %15
i32 15, label %16
i32 16, label %17
i32 17, label %18
i32 18, label %19
i32 19, label %20
i32 140, label %21
i32 141, label %22
i32 142, label %23
i32 143, label %24
i32 144, label %25
i32 145, label %26
i32 146, label %27
i32 147, label %28
]
2: ; preds = %1
br label %30
3: ; preds = %1
br label %30
4: ; preds = %1
br label %30
5: ; preds = %1
br label %30
6: ; preds = %1
br label %30
7: ; preds = %1
br label %30
8: ; preds = %1
br label %30
9: ; preds = %1
br label %30
10: ; preds = %1
br label %30
11: ; preds = %1
br label %30
12: ; preds = %1
br label %30
13: ; preds = %1
br label %30
14: ; preds = %1
br label %30
15: ; preds = %1
br label %30
16: ; preds = %1
br label %30
17: ; preds = %1
br label %30
18: ; preds = %1
br label %30
19: ; preds = %1
br label %30
20: ; preds = %1
br label %30
21: ; preds = %1
br label %30
22: ; preds = %1
br label %30
23: ; preds = %1
br label %30
24: ; preds = %1
br label %30
25: ; preds = %1
br label %30
26: ; preds = %1
br label %30
27: ; preds = %1
br label %30
28: ; preds = %1
br label %30
29: ; preds = %1
br label %30
30: ; preds = %1, %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, %4, %3, %2
%31 = phi i8* [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.20, i64 0, i64 0), %29 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0), %28 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), %27 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), %26 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), %25 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), %24 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), %23 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), %22 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), %21 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.19, i64 0, i64 0), %20 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), %19 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), %18 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i64 0, i64 0), %17 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), %16 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %31
}