const char *GetArgumentTypeName(int theRestriction) {
  switch ((char)theRestriction) {
  case 'a':
    return ("external address");
  case 'e':
    return ("instance address, instance name, or symbol");
  case 'd':
  case 'f':
    return ("float");
  case 'g':
    return ("integer, float, or symbol");
  case 'h':
    return (
        "instance address, instance name, fact address, integer, or symbol");
  case 'j':
    return ("symbol, string, or instance name");
  case 'k':
    return ("symbol or string");
  case 'i':
  case 'l':
    return ("integer");
  case 'm':
    return ("multifield");
  case 'n':
    return ("integer or float");
  case 'o':
    return ("instance name");
  case 'p':
    return ("instance name or symbol");
  case 'q':
    return ("multifield, symbol, or string");
  case 's':
    return ("string");
  case 'w':
    return ("symbol");
  case 'x':
    return ("instance address");
  case 'y':
    return ("fact-address");
  case 'z':
    return ("fact-address, integer, or symbol");
  case 'u':
    return ("non-void return value");
  }
  return ("unknown argument type");
}


x86 assembly (clang, -O0):
<GetArgumentTypeName>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
movsbl -0xc(%rbp),%eax
add    $0xffffff9f,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x19,%eax
ja     1261 <GetArgumentTypeName+0x161>
mov    -0x18(%rbp),%rax
lea    0xed8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf30(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xf31(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xff8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xf3c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xf46(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xf78(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xf89(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xf8a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xf82(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xf7d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xf3b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xf6e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xf76(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xf7d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xe85(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xf64(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xf65(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xf62(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xf73(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    126c <GetArgumentTypeName+0x16c>
lea    0xf79(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetArgumentTypeName>:
movsbl %dil,%eax
add    $0xffffff9f,%eax
cmp    $0x19,%eax
ja     111d <GetArgumentTypeName+0x1d>
cltq
lea    0x107b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0x1055(%rip),%rax
ret

LLVM IR (-O0):
@.str = [17 x i8] c"external address\00"
@.str.1 = [43 x i8] c"instance address, instance name, or symbol\00"
@.str.2 = [6 x i8] c"float\00"
@.str.3 = [26 x i8] c"integer, float, or symbol\00"
@.str.4 = [66 x i8] c"instance address, instance name, fact address, integer, or symbol\00"
@.str.5 = [33 x i8] c"symbol, string, or instance name\00"
@.str.6 = [17 x i8] c"symbol or string\00"
@.str.7 = [8 x i8] c"integer\00"
@.str.8 = [11 x i8] c"multifield\00"
@.str.9 = [17 x i8] c"integer or float\00"
@.str.10 = [14 x i8] c"instance name\00"
@.str.11 = [24 x i8] c"instance name or symbol\00"
@.str.12 = [30 x i8] c"multifield, symbol, or string\00"
@.str.13 = [7 x i8] c"string\00"
@.str.14 = [7 x i8] c"symbol\00"
@.str.15 = [17 x i8] c"instance address\00"
@.str.16 = [13 x i8] c"fact-address\00"
@.str.17 = [33 x i8] c"fact-address, integer, or symbol\00"
@.str.18 = [22 x i8] c"non-void return value\00"
@.str.19 = [22 x i8] c"unknown argument type\00"
define i8* @GetArgumentTypeName(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = trunc i32 %4 to i8
%6 = sext i8 %5 to i32
switch i32 %6, label %26 [
i32 97, label %7
i32 101, label %8
i32 100, label %9
i32 102, label %9
i32 103, label %10
i32 104, label %11
i32 106, label %12
i32 107, label %13
i32 105, label %14
i32 108, label %14
i32 109, label %15
i32 110, label %16
i32 111, label %17
i32 112, label %18
i32 113, label %19
i32 115, label %20
i32 119, label %21
i32 120, label %22
i32 121, label %23
i32 122, label %24
i32 117, label %25
]
7: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8** %2
br label %27
8: ; preds = %1
store i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %27
9: ; preds = %1, %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %27
10: ; preds = %1
store i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %27
11: ; preds = %1
store i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %27
12: ; preds = %1
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %27
13: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %27
14: ; preds = %1, %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %27
15: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %27
16: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %27
17: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0), i8** %2
br label %27
18: ; preds = %1
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %27
19: ; preds = %1
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i8** %2
br label %27
20: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %27
21: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i8** %2
br label %27
22: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.15, i64 0, i64 0), i8** %2
br label %27
23: ; preds = %1
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.16, i64 0, i64 0), i8** %2
br label %27
24: ; preds = %1
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.17, i64 0, i64 0), i8** %2
br label %27
25: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.18, i64 0, i64 0), i8** %2
br label %27
26: ; preds = %1
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.19, i64 0, i64 0), i8** %2
br label %27
27: ; preds = %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %7
%28 = load i8*, i8** %2
ret i8* %28
}

LLVM IR (-O2):
@.str = [17 x i8] c"external address\00"
@.str.1 = [43 x i8] c"instance address, instance name, or symbol\00"
@.str.2 = [6 x i8] c"float\00"
@.str.3 = [26 x i8] c"integer, float, or symbol\00"
@.str.4 = [66 x i8] c"instance address, instance name, fact address, integer, or symbol\00"
@.str.5 = [33 x i8] c"symbol, string, or instance name\00"
@.str.6 = [17 x i8] c"symbol or string\00"
@.str.7 = [8 x i8] c"integer\00"
@.str.8 = [11 x i8] c"multifield\00"
@.str.9 = [17 x i8] c"integer or float\00"
@.str.10 = [14 x i8] c"instance name\00"
@.str.11 = [24 x i8] c"instance name or symbol\00"
@.str.12 = [30 x i8] c"multifield, symbol, or string\00"
@.str.13 = [7 x i8] c"string\00"
@.str.14 = [7 x i8] c"symbol\00"
@.str.15 = [17 x i8] c"instance address\00"
@.str.16 = [13 x i8] c"fact-address\00"
@.str.17 = [33 x i8] c"fact-address, integer, or symbol\00"
@.str.18 = [22 x i8] c"non-void return value\00"
@.str.19 = [22 x i8] c"unknown argument type\00"
@reltable.GetArgumentTypeName = [26 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.19 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.19 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.2 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([43 x i8]* @.str.1 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.2 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([26 x i8]* @.str.3 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([66 x i8]* @.str.4 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.7 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([33 x i8]* @.str.5 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.6 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([8 x i8]* @.str.7 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.8 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.9 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.10 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([24 x i8]* @.str.11 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([30 x i8]* @.str.12 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.19 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.13 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.19 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.18 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.19 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.14 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.15 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.16 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([33 x i8]* @.str.17 to i64), i64 ptrtoint ([26 x i32]* @reltable.GetArgumentTypeName to i64)) to i32)]
define i8* @GetArgumentTypeName(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = add nsw i32 %3, -97
%5 = icmp ult i32 %4, 26
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = sext i32 %4 to i64
%8 = shl i64 %7, 2
%9 = call i8* @llvm.load.relative.i64(i8* bitcast ([26 x i32]* @reltable.GetArgumentTypeName to i8*), i64 %8)
br label %10
10: ; preds = %1, %6
%11 = phi i8* [ %9, %6 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.19, i64 0, i64 0), %1 ]
ret i8* %11
}