#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 */
int /*<<< orphan*/ __Pyx_BufFmt_RaiseUnexpectedChar(char);
char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) {
  switch (ch) {
  case 'c':
  case 'b':
  case 'h':
  case 'i':
  case 'l':
  case 'q':
  case 's':
  case 'p':
    return 'I';
  case 'B':
  case 'H':
  case 'I':
  case 'L':
  case 'Q':
    return 'U';
  case 'f':
  case 'd':
  case 'g':
    return (is_complex ? 'C' : 'R');
  case 'O':
    return 'O';
  case 'P':
    return 'P';
  default: {
    __Pyx_BufFmt_RaiseUnexpectedChar(ch);
    return 0;
  }
  }
}


x86 assembly (clang, -O0):
<__Pyx_BufFmt_TypeCharToGroup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
movsbl -0x2(%rbp),%eax
add    $0xffffffbe,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x31,%eax
ja     118a <__Pyx_BufFmt_TypeCharToGroup+0x7a>
mov    -0x10(%rbp),%rax
lea    0xebe(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x49,-0x1(%rbp)
jmp    1197 <__Pyx_BufFmt_TypeCharToGroup+0x87>
movb   $0x55,-0x1(%rbp)
jmp    1197 <__Pyx_BufFmt_TypeCharToGroup+0x87>
mov    -0x8(%rbp),%edx
mov    $0x52,%eax
mov    $0x43,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,-0x1(%rbp)
jmp    1197 <__Pyx_BufFmt_TypeCharToGroup+0x87>
movb   $0x4f,-0x1(%rbp)
jmp    1197 <__Pyx_BufFmt_TypeCharToGroup+0x87>
movb   $0x50,-0x1(%rbp)
jmp    1197 <__Pyx_BufFmt_TypeCharToGroup+0x87>
movsbl -0x2(%rbp),%edi
call   1030 <__Pyx_BufFmt_RaiseUnexpectedChar@plt>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__Pyx_BufFmt_TypeCharToGroup>:
push   %rax
lea    -0x42(%rdi),%ecx
cmp    $0x31,%ecx
ja     1142 <__Pyx_BufFmt_TypeCharToGroup+0x32>
mov    $0x49,%al
lea    0xede(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
pop    %rcx
ret
mov    $0x55,%al
pop    %rcx
ret
test   %esi,%esi
mov    $0x52,%ecx
mov    $0x43,%eax
cmove  %ecx,%eax
pop    %rcx
ret
movsbl %dil,%edi
call   1030 <__Pyx_BufFmt_RaiseUnexpectedChar@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x4f,%al
pop    %rcx
ret
mov    $0x50,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @__Pyx_BufFmt_TypeCharToGroup(i8 signext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
%6 = load i8, i8* %4
%7 = sext i8 %6 to i32
switch i32 %7, label %18 [
i32 99, label %8
i32 98, label %8
i32 104, label %8
i32 105, label %8
i32 108, label %8
i32 113, label %8
i32 115, label %8
i32 112, label %8
i32 66, label %9
i32 72, label %9
i32 73, label %9
i32 76, label %9
i32 81, label %9
i32 102, label %10
i32 100, label %10
i32 103, label %10
i32 79, label %16
i32 80, label %17
]
8: ; preds = %2, %2, %2, %2, %2, %2, %2, %2
store i8 73, i8* %3
br label %21
9: ; preds = %2, %2, %2, %2, %2
store i8 85, i8* %3
br label %21
10: ; preds = %2, %2, %2
%11 = load i32, i32* %5
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 67, i32 82
%15 = trunc i32 %14 to i8
store i8 %15, i8* %3
br label %21
16: ; preds = %2
store i8 79, i8* %3
br label %21
17: ; preds = %2
store i8 80, i8* %3
br label %21
18: ; preds = %2
%19 = load i8, i8* %4
%20 = call i32 @__Pyx_BufFmt_RaiseUnexpectedChar(i8 signext %19)
store i8 0, i8* %3
br label %21
21: ; preds = %18, %17, %16, %10, %9, %8
%22 = load i8, i8* %3
ret i8 %22
}

LLVM IR (-O2):
define signext i8 @__Pyx_BufFmt_TypeCharToGroup(i8 signext %0, i32 %1) {
%3 = sext i8 %0 to i32
switch i32 %3, label %10 [
i32 99, label %12
i32 98, label %12
i32 104, label %12
i32 105, label %12
i32 108, label %12
i32 113, label %12
i32 115, label %12
i32 112, label %12
i32 66, label %4
i32 72, label %4
i32 73, label %4
i32 76, label %4
i32 81, label %4
i32 102, label %5
i32 100, label %5
i32 103, label %5
i32 79, label %8
i32 80, label %9
]
4: ; preds = %2, %2, %2, %2, %2
br label %12
5: ; preds = %2, %2, %2
%6 = icmp eq i32 %1, 0
%7 = select i1 %6, i8 82, i8 67
br label %12
8: ; preds = %2
br label %12
9: ; preds = %2
br label %12
10: ; preds = %2
%11 = tail call i32 @__Pyx_BufFmt_RaiseUnexpectedChar(i8 signext %0)
br label %12
12: ; preds = %2, %2, %2, %2, %2, %2, %2, %2, %10, %9, %8, %5, %4
%13 = phi i8 [ 0, %10 ], [ 80, %9 ], [ 79, %8 ], [ %7, %5 ], [ 85, %4 ], [ 73, %2 ], [ 73, %2 ], [ 73, %2 ], [ 73, %2 ], [ 73, %2 ], [ 73, %2 ], [ 73, %2 ], [ 73, %2 ]
ret i8 %13
}