char *UstatetypeName(int ustatetype) {
  switch (ustatetype) {
  case (1 << 0):
    return "uDEL_ST";
  case (1 << 1):
    return "uMATP_ST";
  case (1 << 2):
    return "uMATL_ST";
  case (1 << 3):
    return "uMATR_ST";
  case (1 << 4):
    return "uINSL_ST";
  case (1 << 5):
    return "uINSR_ST";
  case (1 << 6):
    return "uBEGIN_ST";
  case (1 << 7):
    return "uEND_ST";
  case (1 << 8):
    return "uBIFURC_ST";
  default:
    return "Unknown state type";
  }
}


x86 assembly (clang, -O0):
<UstatetypeName>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x1,%eax
je     11a7 <UstatetypeName+0xa7>
jmp    111b <UstatetypeName+0x1b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     11b7 <UstatetypeName+0xb7>
jmp    112c <UstatetypeName+0x2c>
mov    -0x10(%rbp),%eax
sub    $0x4,%eax
je     11c7 <UstatetypeName+0xc7>
jmp    113d <UstatetypeName+0x3d>
mov    -0x10(%rbp),%eax
sub    $0x8,%eax
je     11d7 <UstatetypeName+0xd7>
jmp    114e <UstatetypeName+0x4e>
mov    -0x10(%rbp),%eax
sub    $0x10,%eax
je     11e7 <UstatetypeName+0xe7>
jmp    115f <UstatetypeName+0x5f>
mov    -0x10(%rbp),%eax
sub    $0x20,%eax
je     11f7 <UstatetypeName+0xf7>
jmp    1170 <UstatetypeName+0x70>
mov    -0x10(%rbp),%eax
sub    $0x40,%eax
je     1207 <UstatetypeName+0x107>
jmp    1181 <UstatetypeName+0x81>
mov    -0x10(%rbp),%eax
sub    $0x80,%eax
je     1217 <UstatetypeName+0x117>
jmp    1194 <UstatetypeName+0x94>
mov    -0x10(%rbp),%eax
sub    $0x100,%eax
je     1227 <UstatetypeName+0x127>
jmp    1237 <UstatetypeName+0x137>
lea    0xe52(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1242 <UstatetypeName+0x142>
lea    0xe4a(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1242 <UstatetypeName+0x142>
lea    0xe43(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1242 <UstatetypeName+0x142>
lea    0xe3c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1242 <UstatetypeName+0x142>
lea    0xe35(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1242 <UstatetypeName+0x142>
lea    0xe2e(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1242 <UstatetypeName+0x142>
lea    0xe27(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1242 <UstatetypeName+0x142>
lea    0xe21(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1242 <UstatetypeName+0x142>
lea    0xe19(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1242 <UstatetypeName+0x142>
lea    0xe14(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UstatetypeName>:
lea    -0x1(%rdi),%ecx
cmp    $0x3f,%ecx
ja     1127 <UstatetypeName+0x27>
lea    0xff1(%rip),%rax
lea    0xeea(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
lea    0xfe2(%rip),%rax
ret
cmp    $0x80,%edi
je     116f <UstatetypeName+0x6f>
cmp    $0x100,%edi
jne    113f <UstatetypeName+0x3f>
lea    0x1009(%rip),%rax
ret
lea    0x100c(%rip),%rax
ret
lea    0xfc3(%rip),%rax
ret
lea    0xfc4(%rip),%rax
ret
lea    0xfc5(%rip),%rax
ret
lea    0xfc6(%rip),%rax
ret
lea    0xfc7(%rip),%rax
ret
lea    0xfc9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [8 x i8] c"uDEL_ST\00"
@.str.1 = [9 x i8] c"uMATP_ST\00"
@.str.2 = [9 x i8] c"uMATL_ST\00"
@.str.3 = [9 x i8] c"uMATR_ST\00"
@.str.4 = [9 x i8] c"uINSL_ST\00"
@.str.5 = [9 x i8] c"uINSR_ST\00"
@.str.6 = [10 x i8] c"uBEGIN_ST\00"
@.str.7 = [8 x i8] c"uEND_ST\00"
@.str.8 = [11 x i8] c"uBIFURC_ST\00"
@.str.9 = [19 x i8] c"Unknown state type\00"
define i8* @UstatetypeName(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %14 [
i32 1, label %5
i32 2, label %6
i32 4, label %7
i32 8, label %8
i32 16, label %9
i32 32, label %10
i32 64, label %11
i32 128, label %12
i32 256, label %13
]
5: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
br label %15
6: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %15
7: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %15
8: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %15
9: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %15
10: ; preds = %1
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %15
11: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8** %2
br label %15
12: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8** %2
br label %15
13: ; preds = %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %15
14: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i8** %2
br label %15
15: ; preds = %14, %13, %12, %11, %10, %9, %8, %7, %6, %5
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
@.str = [8 x i8] c"uDEL_ST\00"
@.str.1 = [9 x i8] c"uMATP_ST\00"
@.str.2 = [9 x i8] c"uMATL_ST\00"
@.str.3 = [9 x i8] c"uMATR_ST\00"
@.str.4 = [9 x i8] c"uINSL_ST\00"
@.str.5 = [9 x i8] c"uINSR_ST\00"
@.str.6 = [10 x i8] c"uBEGIN_ST\00"
@.str.7 = [8 x i8] c"uEND_ST\00"
@.str.8 = [11 x i8] c"uBIFURC_ST\00"
@.str.9 = [19 x i8] c"Unknown state type\00"
define i8* @UstatetypeName(i32 %0) {
switch i32 %0, label %10 [
i32 1, label %11
i32 2, label %2
i32 4, label %3
i32 8, label %4
i32 16, label %5
i32 32, label %6
i32 64, label %7
i32 128, label %8
i32 256, label %9
]
2: ; preds = %1
br label %11
3: ; preds = %1
br label %11
4: ; preds = %1
br label %11
5: ; preds = %1
br label %11
6: ; preds = %1
br label %11
7: ; preds = %1
br label %11
8: ; preds = %1
br label %11
9: ; preds = %1
br label %11
10: ; preds = %1
br label %11
11: ; preds = %1, %10, %9, %8, %7, %6, %5, %4, %3, %2
%12 = phi i8* [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), %10 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0), %9 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), %8 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), %7 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), %6 ], [ getelementptr inbounds ([9 x i8], [9 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 ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([9 x i8], [9 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* %12
}