char *mlr_dsl_ast_node_describe_type(int type) {
  switch (type) {
  case 0xaaaa:
    return "literal";
    break;
  case 0xbbbb:
    return "field_name";
    break;
  case 0xcccc:
    return "function_name";
    break;
  case 0xdddd:
    return "operator";
    break;
  case 0xeeee:
    return "context_variable";
    break;
  case 0xffff:
    return "stripped_away";
    break;
  default:
    return "???";
  }
}


x86 assembly (clang, -O0):
<mlr_dsl_ast_node_describe_type>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0xaaaa,%eax
je     117c <mlr_dsl_ast_node_describe_type+0x7c>
jmp    111d <mlr_dsl_ast_node_describe_type+0x1d>
mov    -0x10(%rbp),%eax
sub    $0xbbbb,%eax
je     118c <mlr_dsl_ast_node_describe_type+0x8c>
jmp    1130 <mlr_dsl_ast_node_describe_type+0x30>
mov    -0x10(%rbp),%eax
sub    $0xcccc,%eax
je     119c <mlr_dsl_ast_node_describe_type+0x9c>
jmp    1143 <mlr_dsl_ast_node_describe_type+0x43>
mov    -0x10(%rbp),%eax
sub    $0xdddd,%eax
je     11ac <mlr_dsl_ast_node_describe_type+0xac>
jmp    1156 <mlr_dsl_ast_node_describe_type+0x56>
mov    -0x10(%rbp),%eax
sub    $0xeeee,%eax
je     11bc <mlr_dsl_ast_node_describe_type+0xbc>
jmp    1169 <mlr_dsl_ast_node_describe_type+0x69>
mov    -0x10(%rbp),%eax
sub    $0xffff,%eax
je     11cc <mlr_dsl_ast_node_describe_type+0xcc>
jmp    11dc <mlr_dsl_ast_node_describe_type+0xdc>
lea    0xe7d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e7 <mlr_dsl_ast_node_describe_type+0xe7>
lea    0xe75(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e7 <mlr_dsl_ast_node_describe_type+0xe7>
lea    0xe70(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e7 <mlr_dsl_ast_node_describe_type+0xe7>
lea    0xe6e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e7 <mlr_dsl_ast_node_describe_type+0xe7>
lea    0xe67(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e7 <mlr_dsl_ast_node_describe_type+0xe7>
lea    0xe68(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    11e7 <mlr_dsl_ast_node_describe_type+0xe7>
lea    0xe66(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlr_dsl_ast_node_describe_type>:
cmp    $0xdddc,%edi
jg     1128 <mlr_dsl_ast_node_describe_type+0x28>
cmp    $0xaaaa,%edi
je     1148 <mlr_dsl_ast_node_describe_type+0x48>
cmp    $0xbbbb,%edi
je     1150 <mlr_dsl_ast_node_describe_type+0x50>
cmp    $0xcccc,%edi
jne    1168 <mlr_dsl_ast_node_describe_type+0x68>
lea    0xeec(%rip),%rax
ret
cmp    $0xdddd,%edi
je     1158 <mlr_dsl_ast_node_describe_type+0x58>
cmp    $0xeeee,%edi
je     1160 <mlr_dsl_ast_node_describe_type+0x60>
cmp    $0xffff,%edi
jne    1168 <mlr_dsl_ast_node_describe_type+0x68>
lea    0xef4(%rip),%rax
ret
lea    0xeb1(%rip),%rax
ret
lea    0xeb1(%rip),%rax
ret
lea    0xec2(%rip),%rax
ret
lea    0xec3(%rip),%rax
ret
lea    0xeda(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"literal\00"
@.str.1 = [11 x i8] c"field_name\00"
@.str.2 = [14 x i8] c"function_name\00"
@.str.3 = [9 x i8] c"operator\00"
@.str.4 = [17 x i8] c"context_variable\00"
@.str.5 = [14 x i8] c"stripped_away\00"
@.str.6 = [4 x i8] c"???\00"
define i8* @mlr_dsl_ast_node_describe_type(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %11 [
i32 43690, label %5
i32 48059, label %6
i32 52428, label %7
i32 56797, label %8
i32 61166, label %9
i32 65535, label %10
]
5: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
br label %12
6: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %12
7: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %12
8: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %12
9: ; preds = %1
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %12
10: ; preds = %1
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %12
11: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %12
12: ; preds = %11, %10, %9, %8, %7, %6, %5
%13 = load i8*, i8** %2
ret i8* %13
}

LLVM IR (-O2):
@.str = [8 x i8] c"literal\00"
@.str.1 = [11 x i8] c"field_name\00"
@.str.2 = [14 x i8] c"function_name\00"
@.str.3 = [9 x i8] c"operator\00"
@.str.4 = [17 x i8] c"context_variable\00"
@.str.5 = [14 x i8] c"stripped_away\00"
@.str.6 = [4 x i8] c"???\00"
define i8* @mlr_dsl_ast_node_describe_type(i32 %0) {
switch i32 %0, label %7 [
i32 43690, label %8
i32 48059, label %2
i32 52428, label %3
i32 56797, label %4
i32 61166, label %5
i32 65535, label %6
]
2: ; preds = %1
br label %8
3: ; preds = %1
br label %8
4: ; preds = %1
br label %8
5: ; preds = %1
br label %8
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %1, %7, %6, %5, %4, %3, %2
%9 = phi i8* [ getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), %5 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %9
}