char ftypelet(unsigned int bits) {
  if ((((bits)&00170000) == 0060000))
    return 'b';
  if ((((bits)&00170000) == 0020000))
    return 'c';
  if ((((bits)&00170000) == 0040000))
    return 'd';
  if ((((bits)&00170000) == 0100000))
    return '-';
  if ((((bits)&00170000) == 0010000))
    return 'p';
  if ((((bits)&00170000) == 0120000))
    return 'l';
  if ((((bits)&00170000) == 0140000))
    return 's';
  return '?';
}


x86 assembly (clang, -O0):
<ftypelet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf000,%eax
cmp    $0x6000,%eax
jne    1123 <ftypelet+0x23>
movb   $0x62,-0x1(%rbp)
jmp    11cf <ftypelet+0xcf>
mov    -0x8(%rbp),%eax
and    $0xf000,%eax
cmp    $0x2000,%eax
jne    113f <ftypelet+0x3f>
movb   $0x63,-0x1(%rbp)
jmp    11cf <ftypelet+0xcf>
mov    -0x8(%rbp),%eax
and    $0xf000,%eax
cmp    $0x4000,%eax
jne    115b <ftypelet+0x5b>
movb   $0x64,-0x1(%rbp)
jmp    11cf <ftypelet+0xcf>
mov    -0x8(%rbp),%eax
and    $0xf000,%eax
cmp    $0x8000,%eax
jne    1177 <ftypelet+0x77>
movb   $0x2d,-0x1(%rbp)
jmp    11cf <ftypelet+0xcf>
mov    -0x8(%rbp),%eax
and    $0xf000,%eax
cmp    $0x1000,%eax
jne    1193 <ftypelet+0x93>
movb   $0x70,-0x1(%rbp)
jmp    11cf <ftypelet+0xcf>
mov    -0x8(%rbp),%eax
and    $0xf000,%eax
cmp    $0xa000,%eax
jne    11af <ftypelet+0xaf>
movb   $0x6c,-0x1(%rbp)
jmp    11cf <ftypelet+0xcf>
mov    -0x8(%rbp),%eax
and    $0xf000,%eax
cmp    $0xc000,%eax
jne    11cb <ftypelet+0xcb>
movb   $0x73,-0x1(%rbp)
jmp    11cf <ftypelet+0xcf>
movb   $0x3f,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftypelet>:
and    $0xf000,%edi
add    $0xfffff000,%edi
mov    $0x3f,%al
cmp    $0xbfff,%edi
ja     1126 <ftypelet+0x26>
mov    %edi,%eax
shr    $0xc,%rax
lea    0xedd(%rip),%rcx
mov    (%rax,%rcx,1),%al
ret

LLVM IR (-O0):
define signext i8 @ftypelet(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = and i32 %4, 61440
%6 = icmp eq i32 %5, 24576
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 98, i8* %2
br label %39
8: ; preds = %1
%9 = load i32, i32* %3
%10 = and i32 %9, 61440
%11 = icmp eq i32 %10, 8192
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 99, i8* %2
br label %39
13: ; preds = %8
%14 = load i32, i32* %3
%15 = and i32 %14, 61440
%16 = icmp eq i32 %15, 16384
br i1 %16, label %17, label %18
17: ; preds = %13
store i8 100, i8* %2
br label %39
18: ; preds = %13
%19 = load i32, i32* %3
%20 = and i32 %19, 61440
%21 = icmp eq i32 %20, 32768
br i1 %21, label %22, label %23
22: ; preds = %18
store i8 45, i8* %2
br label %39
23: ; preds = %18
%24 = load i32, i32* %3
%25 = and i32 %24, 61440
%26 = icmp eq i32 %25, 4096
br i1 %26, label %27, label %28
27: ; preds = %23
store i8 112, i8* %2
br label %39
28: ; preds = %23
%29 = load i32, i32* %3
%30 = and i32 %29, 61440
%31 = icmp eq i32 %30, 40960
br i1 %31, label %32, label %33
32: ; preds = %28
store i8 108, i8* %2
br label %39
33: ; preds = %28
%34 = load i32, i32* %3
%35 = and i32 %34, 61440
%36 = icmp eq i32 %35, 49152
br i1 %36, label %37, label %38
37: ; preds = %33
store i8 115, i8* %2
br label %39
38: ; preds = %33
store i8 63, i8* %2
br label %39
39: ; preds = %38, %37, %32, %27, %22, %17, %12, %7
%40 = load i8, i8* %2
ret i8 %40
}

LLVM IR (-O2):
@switch.table.ftypelet = [12 x i8] c"pc?d?b?-?l?s"
define signext i8 @ftypelet(i32 %0) {
%2 = and i32 %0, 61440
%3 = add nsw i32 %2, -4096
%4 = icmp ult i32 %3, 49152
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = lshr exact i32 %3, 12
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds [12 x i8], [12 x i8]* @switch.table.ftypelet, i64 0, i64 %7
%9 = load i8, i8* %8
br label %10
10: ; preds = %1, %5
%11 = phi i8 [ %9, %5 ], [ 63, %1 ]
ret i8 %11
}