char *get_interaction_type_desc(int interaction_type) {
  switch (interaction_type) {
  case 11:
    return "none";
    break;
  case 22:
    return "r2";
    break;
  case 33:
    return "constant r_ell";
    break;
  case 44:
    return "Vzw lower";
    break;
  case 55:
    return "Vzw upper";
    break;
  default:
    return "(undefined interaction type)";
    break;
  }
}


x86 assembly (clang, -O0):
<get_interaction_type_desc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xfffffff5,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x2c,%eax
ja     1180 <get_interaction_type_desc+0x80>
mov    -0x18(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf7d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    118b <get_interaction_type_desc+0x8b>
lea    0xf72(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    118b <get_interaction_type_desc+0x8b>
lea    0xf65(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    118b <get_interaction_type_desc+0x8b>
lea    0xf64(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    118b <get_interaction_type_desc+0x8b>
lea    0xf5e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    118b <get_interaction_type_desc+0x8b>
lea    0xf58(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_interaction_type_desc>:
add    $0xfffffff5,%edi
cmp    $0x2c,%edi
ja     1127 <get_interaction_type_desc+0x27>
lea    0xfa5(%rip),%rax
lea    0xeea(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
lea    0xf93(%rip),%rax
ret
lea    0xfb1(%rip),%rax
ret
lea    0xf86(%rip),%rax
ret
lea    0xf8d(%rip),%rax
ret
lea    0xf8f(%rip),%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"none\00"
@.str.1 = [3 x i8] c"r2\00"
@.str.2 = [15 x i8] c"constant r_ell\00"
@.str.3 = [10 x i8] c"Vzw lower\00"
@.str.4 = [10 x i8] c"Vzw upper\00"
@.str.5 = [29 x i8] c"(undefined interaction type)\00"
define i8* @get_interaction_type_desc(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %10 [
i32 11, label %5
i32 22, label %6
i32 33, label %7
i32 44, label %8
i32 55, label %9
]
5: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
br label %11
6: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %11
7: ; preds = %1
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %11
8: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %11
9: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %11
10: ; preds = %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %11
11: ; preds = %10, %9, %8, %7, %6, %5
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@.str = [5 x i8] c"none\00"
@.str.1 = [3 x i8] c"r2\00"
@.str.2 = [15 x i8] c"constant r_ell\00"
@.str.3 = [10 x i8] c"Vzw lower\00"
@.str.4 = [10 x i8] c"Vzw upper\00"
@.str.5 = [29 x i8] c"(undefined interaction type)\00"
define i8* @get_interaction_type_desc(i32 %0) {
switch i32 %0, label %6 [
i32 11, label %7
i32 22, label %2
i32 33, label %3
i32 44, label %4
i32 55, label %5
]
2: ; preds = %1
br label %7
3: ; preds = %1
br label %7
4: ; preds = %1
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %6, %5, %4, %3, %2
%8 = phi i8* [ getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([10 x i8], [10 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 ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %8
}