const char *ttcmdidtostr(int id) {
  switch (id) {
  case 0x10:
    return "put";
  case 0x11:
    return "putkeep";
  case 0x12:
    return "putcat";
  case 0x13:
    return "putshl";
  case 0x18:
    return "putnr";
  case 0x20:
    return "out";
  case 0x30:
    return "get";
  case 0x31:
    return "mget";
  case 0x38:
    return "vsiz";
  case 0x50:
    return "iterinit";
  case 0x51:
    return "iternext";
  case 0x58:
    return "fwmkeys";
  case 0x60:
    return "addint";
  case 0x61:
    return "adddouble";
  case 0x68:
    return "ext";
  case 0x70:
    return "sync";
  case 0x71:
    return "optimize";
  case 0x72:
    return "vanish";
  case 0x73:
    return "copy";
  case 0x74:
    return "restore";
  case 0x78:
    return "setmst";
  case 0x80:
    return "rnum";
  case 0x81:
    return "size";
  case 0x88:
    return "stat";
  case 0x90:
    return "misc";
  case 0xa0:
    return "repl";
  }
  return "(unknown)";
}


x86 assembly (clang, -O0):
<ttcmdidtostr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xfffffff0,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x90,%eax
ja     12d2 <ttcmdidtostr+0x1d2>
mov    -0x18(%rbp),%rax
lea    0xed7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0x110b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x10ff(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x10f7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x10ee(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x10e5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x10db(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x10d0(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x10bf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x10b4(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x10a9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x10a2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x109b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x1093(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x108a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x1067(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x1074(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x1069(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x1062(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x1059(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x104e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x1046(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x103d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x1032(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x1027(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x101c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x1011(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12dd <ttcmdidtostr+0x1dd>
lea    0x1006(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ttcmdidtostr>:
add    $0xfffffff0,%edi
cmp    $0x90,%edi
ja     113a <ttcmdidtostr+0x3a>
lea    0x1132(%rip),%rax
lea    0xee7(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
lea    0x111f(%rip),%rax
ret
lea    0x111f(%rip),%rax
ret
lea    0x111e(%rip),%rax
ret
lea    0x119e(%rip),%rax
ret
lea    0x1115(%rip),%rax
ret
lea    0x1113(%rip),%rax
ret
lea    0x1110(%rip),%rax
ret
lea    0x1107(%rip),%rax
ret
lea    0x1104(%rip),%rax
ret
lea    0x1101(%rip),%rax
ret
lea    0x1102(%rip),%rax
ret
lea    0x1103(%rip),%rax
ret
lea    0x1103(%rip),%rax
ret
lea    0x1102(%rip),%rax
ret
lea    0x10e7(%rip),%rax
ret
lea    0x10fc(%rip),%rax
ret
lea    0x10f9(%rip),%rax
ret
lea    0x10fa(%rip),%rax
ret
lea    0x10f9(%rip),%rax
ret
lea    0x10f6(%rip),%rax
ret
lea    0x10f6(%rip),%rax
ret
lea    0x10f5(%rip),%rax
ret
lea    0x10f2(%rip),%rax
ret
lea    0x10ef(%rip),%rax
ret
lea    0x10ec(%rip),%rax
ret
lea    0x10e9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"put\00"
@.str.1 = [8 x i8] c"putkeep\00"
@.str.2 = [7 x i8] c"putcat\00"
@.str.3 = [7 x i8] c"putshl\00"
@.str.4 = [6 x i8] c"putnr\00"
@.str.5 = [4 x i8] c"out\00"
@.str.6 = [4 x i8] c"get\00"
@.str.7 = [5 x i8] c"mget\00"
@.str.8 = [5 x i8] c"vsiz\00"
@.str.9 = [9 x i8] c"iterinit\00"
@.str.10 = [9 x i8] c"iternext\00"
@.str.11 = [8 x i8] c"fwmkeys\00"
@.str.12 = [7 x i8] c"addint\00"
@.str.13 = [10 x i8] c"adddouble\00"
@.str.14 = [4 x i8] c"ext\00"
@.str.15 = [5 x i8] c"sync\00"
@.str.16 = [9 x i8] c"optimize\00"
@.str.17 = [7 x i8] c"vanish\00"
@.str.18 = [5 x i8] c"copy\00"
@.str.19 = [8 x i8] c"restore\00"
@.str.20 = [7 x i8] c"setmst\00"
@.str.21 = [5 x i8] c"rnum\00"
@.str.22 = [5 x i8] c"size\00"
@.str.23 = [5 x i8] c"stat\00"
@.str.24 = [5 x i8] c"misc\00"
@.str.25 = [5 x i8] c"repl\00"
@.str.26 = [10 x i8] c"(unknown)\00"
define i8* @ttcmdidtostr(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %31 [
i32 16, label %5
i32 17, label %6
i32 18, label %7
i32 19, label %8
i32 24, label %9
i32 32, label %10
i32 48, label %11
i32 49, label %12
i32 56, label %13
i32 80, label %14
i32 81, label %15
i32 88, label %16
i32 96, label %17
i32 97, label %18
i32 104, label %19
i32 112, label %20
i32 113, label %21
i32 114, label %22
i32 115, label %23
i32 116, label %24
i32 120, label %25
i32 128, label %26
i32 129, label %27
i32 136, label %28
i32 144, label %29
i32 160, label %30
]
5: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %2
br label %32
6: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %32
7: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %32
8: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %32
9: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %32
10: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %32
11: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %32
12: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %32
13: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %32
14: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %32
15: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %32
16: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %32
17: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %32
18: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %32
19: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %32
20: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %32
21: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %32
22: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %32
23: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %32
24: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %32
25: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0), i8** %2
br label %32
26: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), i8** %2
br label %32
27: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.22, i64 0, i64 0), i8** %2
br label %32
28: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.23, i64 0, i64 0), i8** %2
br label %32
29: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), i8** %2
br label %32
30: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.25, i64 0, i64 0), i8** %2
br label %32
31: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.26, i64 0, i64 0), i8** %2
br label %32
32: ; preds = %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
%33 = load i8*, i8** %2
ret i8* %33
}

LLVM IR (-O2):
@.str = [4 x i8] c"put\00"
@.str.1 = [8 x i8] c"putkeep\00"
@.str.2 = [7 x i8] c"putcat\00"
@.str.3 = [7 x i8] c"putshl\00"
@.str.4 = [6 x i8] c"putnr\00"
@.str.5 = [4 x i8] c"out\00"
@.str.6 = [4 x i8] c"get\00"
@.str.7 = [5 x i8] c"mget\00"
@.str.8 = [5 x i8] c"vsiz\00"
@.str.9 = [9 x i8] c"iterinit\00"
@.str.10 = [9 x i8] c"iternext\00"
@.str.11 = [8 x i8] c"fwmkeys\00"
@.str.12 = [7 x i8] c"addint\00"
@.str.13 = [10 x i8] c"adddouble\00"
@.str.14 = [4 x i8] c"ext\00"
@.str.15 = [5 x i8] c"sync\00"
@.str.16 = [9 x i8] c"optimize\00"
@.str.17 = [7 x i8] c"vanish\00"
@.str.18 = [5 x i8] c"copy\00"
@.str.19 = [8 x i8] c"restore\00"
@.str.20 = [7 x i8] c"setmst\00"
@.str.21 = [5 x i8] c"rnum\00"
@.str.22 = [5 x i8] c"size\00"
@.str.23 = [5 x i8] c"stat\00"
@.str.24 = [5 x i8] c"misc\00"
@.str.25 = [5 x i8] c"repl\00"
@.str.26 = [10 x i8] c"(unknown)\00"
define i8* @ttcmdidtostr(i32 %0) {
switch i32 %0, label %27 [
i32 16, label %28
i32 17, label %2
i32 18, label %3
i32 19, label %4
i32 24, label %5
i32 32, label %6
i32 48, label %7
i32 49, label %8
i32 56, label %9
i32 80, label %10
i32 81, label %11
i32 88, label %12
i32 96, label %13
i32 97, label %14
i32 104, label %15
i32 112, label %16
i32 113, label %17
i32 114, label %18
i32 115, label %19
i32 116, label %20
i32 120, label %21
i32 128, label %22
i32 129, label %23
i32 136, label %24
i32 144, label %25
i32 160, label %26
]
2: ; preds = %1
br label %28
3: ; preds = %1
br label %28
4: ; preds = %1
br label %28
5: ; preds = %1
br label %28
6: ; preds = %1
br label %28
7: ; preds = %1
br label %28
8: ; preds = %1
br label %28
9: ; preds = %1
br label %28
10: ; preds = %1
br label %28
11: ; preds = %1
br label %28
12: ; preds = %1
br label %28
13: ; preds = %1
br label %28
14: ; preds = %1
br label %28
15: ; preds = %1
br label %28
16: ; preds = %1
br label %28
17: ; preds = %1
br label %28
18: ; preds = %1
br label %28
19: ; preds = %1
br label %28
20: ; preds = %1
br label %28
21: ; preds = %1
br label %28
22: ; preds = %1
br label %28
23: ; preds = %1
br label %28
24: ; preds = %1
br label %28
25: ; preds = %1
br label %28
26: ; preds = %1
br label %28
27: ; preds = %1
br label %28
28: ; preds = %1, %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
%29 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.26, i64 0, i64 0), %27 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.25, i64 0, i64 0), %26 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0), %25 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.23, i64 0, i64 0), %24 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.22, i64 0, i64 0), %23 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.21, i64 0, i64 0), %22 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.20, i64 0, i64 0), %21 ], [ getelementptr inbounds ([8 x i8], [8 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 ([7 x i8], [7 x i8]* @.str.17, i64 0, i64 0), %18 ], [ getelementptr inbounds ([9 x i8], [9 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 ([4 x i8], [4 x i8]* @.str.14, i64 0, i64 0), %15 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), %14 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), %13 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), %12 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %29
}