char *bloops_fxcmd_name(int fxcmd) {
  char *fxname = "\0";
  switch (fxcmd) {
  case 0:
    fxname = "volume";
    break;
  case 1:
    fxname = "punch";
    break;
  case 2:
    fxname = "attack";
    break;
  case 3:
    fxname = "sustain";
    break;
  case 4:
    fxname = "decay";
    break;
  case 6:
    fxname = "square";
    break;
  case 5:
    fxname = "sweep";
    break;
  case 7:
    fxname = "vibe";
    break;
  case 8:
    fxname = "vspeed";
    break;
  case 9:
    fxname = "vdelay";
    break;
  case 10:
    fxname = "lpf";
    break;
  case 11:
    fxname = "lsweep";
    break;
  case 12:
    fxname = "resonance";
    break;
  case 13:
    fxname = "hpf";
    break;
  case 14:
    fxname = "hsweep";
    break;
  case 15:
    fxname = "arp";
    break;
  case 16:
    fxname = "aspeed";
    break;
  case 17:
    fxname = "phase";
    break;
  case 18:
    fxname = "psweep";
    break;
  case 19:
    fxname = "repeat";
    break;
  }
  return fxname;
}


x86 assembly (clang, -O0):
<bloops_fxcmd_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xf42(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x13,%rax
ja     1272 <bloops_fxcmd_name+0x172>
mov    -0x18(%rbp),%rax
lea    0xed2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf14(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xf0b(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xf01(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xef8(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xef0(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xee6(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xf0a(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xecd(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xec2(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xeb9(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xeb0(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xea4(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xe9b(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xe95(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xe89(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xe80(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xe74(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xe6b(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xe61(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1272 <bloops_fxcmd_name+0x172>
lea    0xe58(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bloops_fxcmd_name>:
cmp    $0x13,%edi
ja     1117 <bloops_fxcmd_name+0x17>
movslq %edi,%rax
lea    0xef5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0xee2(%rip),%rax
ret

LLVM IR (-O0):
@.str = [2 x i8] zeroinitializer
@.str.1 = [7 x i8] c"volume\00"
@.str.2 = [6 x i8] c"punch\00"
@.str.3 = [7 x i8] c"attack\00"
@.str.4 = [8 x i8] c"sustain\00"
@.str.5 = [6 x i8] c"decay\00"
@.str.6 = [7 x i8] c"square\00"
@.str.7 = [6 x i8] c"sweep\00"
@.str.8 = [5 x i8] c"vibe\00"
@.str.9 = [7 x i8] c"vspeed\00"
@.str.10 = [7 x i8] c"vdelay\00"
@.str.11 = [4 x i8] c"lpf\00"
@.str.12 = [7 x i8] c"lsweep\00"
@.str.13 = [10 x i8] c"resonance\00"
@.str.14 = [4 x i8] c"hpf\00"
@.str.15 = [7 x i8] c"hsweep\00"
@.str.16 = [4 x i8] c"arp\00"
@.str.17 = [7 x i8] c"aspeed\00"
@.str.18 = [6 x i8] c"phase\00"
@.str.19 = [7 x i8] c"psweep\00"
@.str.20 = [7 x i8] c"repeat\00"
define i8* @bloops_fxcmd_name(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %3
%4 = load i32, i32* %2
switch i32 %4, label %25 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
i32 6, label %10
i32 5, 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
]
5: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %25
6: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %3
br label %25
7: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8** %3
br label %25
8: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8** %3
br label %25
9: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8** %3
br label %25
10: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8** %3
br label %25
11: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8** %3
br label %25
12: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8** %3
br label %25
13: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8** %3
br label %25
14: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i8** %3
br label %25
15: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i8** %3
br label %25
16: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i8** %3
br label %25
17: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), i8** %3
br label %25
18: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8** %3
br label %25
19: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), i8** %3
br label %25
20: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i8** %3
br label %25
21: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i8** %3
br label %25
22: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.18, i64 0, i64 0), i8** %3
br label %25
23: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i64 0, i64 0), i8** %3
br label %25
24: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0), i8** %3
br label %25
25: ; preds = %1, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%26 = load i8*, i8** %3
ret i8* %26
}

LLVM IR (-O2):
@.str = [2 x i8] zeroinitializer
@.str.1 = [7 x i8] c"volume\00"
@.str.2 = [6 x i8] c"punch\00"
@.str.3 = [7 x i8] c"attack\00"
@.str.4 = [8 x i8] c"sustain\00"
@.str.5 = [6 x i8] c"decay\00"
@.str.6 = [7 x i8] c"square\00"
@.str.7 = [6 x i8] c"sweep\00"
@.str.8 = [5 x i8] c"vibe\00"
@.str.9 = [7 x i8] c"vspeed\00"
@.str.10 = [7 x i8] c"vdelay\00"
@.str.11 = [4 x i8] c"lpf\00"
@.str.12 = [7 x i8] c"lsweep\00"
@.str.13 = [10 x i8] c"resonance\00"
@.str.14 = [4 x i8] c"hpf\00"
@.str.15 = [7 x i8] c"hsweep\00"
@.str.16 = [4 x i8] c"arp\00"
@.str.17 = [7 x i8] c"aspeed\00"
@.str.18 = [6 x i8] c"phase\00"
@.str.19 = [7 x i8] c"psweep\00"
@.str.20 = [7 x i8] c"repeat\00"
@reltable.bloops_fxcmd_name = [20 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.1 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.2 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.3 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.4 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.5 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.7 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.6 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.8 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.9 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.10 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.11 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.12 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([10 x i8]* @.str.13 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.14 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.15 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.16 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.17 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.18 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.19 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.20 to i64), i64 ptrtoint ([20 x i32]* @reltable.bloops_fxcmd_name to i64)) to i32)]
define i8* @bloops_fxcmd_name(i32 %0) {
%2 = icmp ult i32 %0, 20
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([20 x i32]* @reltable.bloops_fxcmd_name to i8*), i64 %5)
br label %7
7: ; preds = %3, %1
%8 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %1 ], [ %6, %3 ]
ret i8* %8
}