#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
bool cc_piece_is_symbol(char const c) {
  switch (c) {
  case 'P':
  case 'N':
  case 'B':
  case 'R':
  case 'Q':
  case 'K':
  case 'G':
  case 'A':
  case 'U':
  case 'W':
  case 'C':
  case 'S':
  case 'H':
  case 'I':
  case 'T':
  case 'M':
    return true;
  default:
    return false;
  }
}


x86 assembly (clang, -O0):
<cc_piece_is_symbol>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffffbf,%eax
sub    $0x3,%eax
jb     1180 <cc_piece_is_symbol+0x80>
jmp    1122 <cc_piece_is_symbol+0x22>
mov    -0xc(%rbp),%eax
add    $0xffffffb9,%eax
sub    $0x3,%eax
jb     1180 <cc_piece_is_symbol+0x80>
jmp    1136 <cc_piece_is_symbol+0x36>
mov    -0xc(%rbp),%eax
sub    $0x4b,%eax
je     1180 <cc_piece_is_symbol+0x80>
jmp    1147 <cc_piece_is_symbol+0x47>
mov    -0xc(%rbp),%eax
add    $0xffffffb3,%eax
sub    $0x2,%eax
jb     1180 <cc_piece_is_symbol+0x80>
jmp    115b <cc_piece_is_symbol+0x5b>
mov    -0xc(%rbp),%eax
add    $0xffffffb0,%eax
sub    $0x6,%eax
jb     1180 <cc_piece_is_symbol+0x80>
jmp    116f <cc_piece_is_symbol+0x6f>
mov    -0xc(%rbp),%eax
sub    $0x57,%eax
jne    118c <cc_piece_is_symbol+0x8c>
jmp    1180 <cc_piece_is_symbol+0x80>
movl   $0x1,-0x4(%rbp)
jmp    1193 <cc_piece_is_symbol+0x93>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cc_piece_is_symbol>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x16,%edi
ja     1117 <cc_piece_is_symbol+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @cc_piece_is_symbol(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 80, label %6
i32 78, label %6
i32 66, label %6
i32 82, label %6
i32 81, label %6
i32 75, label %6
i32 71, label %6
i32 65, label %6
i32 85, label %6
i32 87, label %6
i32 67, label %6
i32 83, label %6
i32 72, label %6
i32 73, label %6
i32 84, label %6
i32 77, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@switch.table.cc_piece_is_symbol = [23 x i32] [i32 1, i32 1, i32 1, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 0, i32 1, i32 0, i32 1, i32 1, i32 0, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 0, i32 1]
define i32 @cc_piece_is_symbol(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -65
%4 = icmp ult i32 %3, 23
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i32 %3 to i64
%7 = getelementptr inbounds [23 x i32], [23 x i32]* @switch.table.cc_piece_is_symbol, i64 0, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %1, %5
%10 = phi i32 [ %8, %5 ], [ 0, %1 ]
ret i32 %10
}