const char *CG_GetBlockCvarForTimer(int timer) {
  switch (timer) {
  case 274:
    return "ui_assaultblocked1";
  case 295:
    return "ui_assaultblocked2";
  case 296:
    return "ui_assaultblocked3";
  case 297:
    return "ui_assaultblocked4";
  default:
    return "wrong";
  }
}


x86 assembly (clang, -O0):
<CG_GetBlockCvarForTimer>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xfffffeee,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x17,%eax
ja     1172 <CG_GetBlockCvarForTimer+0x72>
mov    -0x18(%rbp),%rax
lea    0xed7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf27(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    117d <CG_GetBlockCvarForTimer+0x7d>
lea    0xf2a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    117d <CG_GetBlockCvarForTimer+0x7d>
lea    0xf2d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    117d <CG_GetBlockCvarForTimer+0x7d>
lea    0xf30(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    117d <CG_GetBlockCvarForTimer+0x7d>
lea    0xf33(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_GetBlockCvarForTimer>:
add    $0xfffffeee,%edi
cmp    $0x17,%edi
ja     112a <CG_GetBlockCvarForTimer+0x2a>
lea    0xf4e(%rip),%rax
lea    0xee7(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
lea    0xf4a(%rip),%rax
ret
lea    0xf7b(%rip),%rax
ret
lea    0xf4d(%rip),%rax
ret
lea    0xf58(%rip),%rax
ret

LLVM IR (-O0):
@.str = [19 x i8] c"ui_assaultblocked1\00"
@.str.1 = [19 x i8] c"ui_assaultblocked2\00"
@.str.2 = [19 x i8] c"ui_assaultblocked3\00"
@.str.3 = [19 x i8] c"ui_assaultblocked4\00"
@.str.4 = [6 x i8] c"wrong\00"
define i8* @CG_GetBlockCvarForTimer(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 274, label %5
i32 295, label %6
i32 296, label %7
i32 297, label %8
]
5: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
6: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %10
7: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %10
8: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %10
9: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %10
10: ; preds = %9, %8, %7, %6, %5
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [19 x i8] c"ui_assaultblocked1\00"
@.str.1 = [19 x i8] c"ui_assaultblocked2\00"
@.str.2 = [19 x i8] c"ui_assaultblocked3\00"
@.str.3 = [19 x i8] c"ui_assaultblocked4\00"
@.str.4 = [6 x i8] c"wrong\00"
define i8* @CG_GetBlockCvarForTimer(i32 %0) {
switch i32 %0, label %5 [
i32 274, label %6
i32 295, label %2
i32 296, label %3
i32 297, label %4
]
2: ; preds = %1
br label %6
3: ; preds = %1
br label %6
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %5, %4, %3, %2
%7 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([19 x i8], [19 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* %7
}