#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':
    return 'H';
  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     1193 <__Pyx_BufFmt_TypeCharToGroup+0x83>
mov    -0x10(%rbp),%rax
lea    0xebe(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x48,-0x1(%rbp)
jmp    11a0 <__Pyx_BufFmt_TypeCharToGroup+0x90>
movb   $0x49,-0x1(%rbp)
jmp    11a0 <__Pyx_BufFmt_TypeCharToGroup+0x90>
movb   $0x55,-0x1(%rbp)
jmp    11a0 <__Pyx_BufFmt_TypeCharToGroup+0x90>
mov    -0x8(%rbp),%edx
mov    $0x52,%eax
mov    $0x43,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,-0x1(%rbp)
jmp    11a0 <__Pyx_BufFmt_TypeCharToGroup+0x90>
movb   $0x4f,-0x1(%rbp)
jmp    11a0 <__Pyx_BufFmt_TypeCharToGroup+0x90>
movb   $0x50,-0x1(%rbp)
jmp    11a0 <__Pyx_BufFmt_TypeCharToGroup+0x90>
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     1144 <__Pyx_BufFmt_TypeCharToGroup+0x34>
mov    $0x48,%al
lea    0xede(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    $0x49,%al
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 %19 [
i32 99, label %8
i32 98, label %9
i32 104, label %9
i32 105, label %9
i32 108, label %9
i32 113, label %9
i32 115, label %9
i32 112, label %9
i32 66, label %10
i32 72, label %10
i32 73, label %10
i32 76, label %10
i32 81, label %10
i32 102, label %11
i32 100, label %11
i32 103, label %11
i32 79, label %17
i32 80, label %18
]
8: ; preds = %2
store i8 72, i8* %3
br label %22
9: ; preds = %2, %2, %2, %2, %2, %2, %2
store i8 73, i8* %3
br label %22
10: ; preds = %2, %2, %2, %2, %2
store i8 85, i8* %3
br label %22
11: ; preds = %2, %2, %2
%12 = load i32, i32* %5
%13 = icmp ne i32 %12, 0
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 67, i32 82
%16 = trunc i32 %15 to i8
store i8 %16, i8* %3
br label %22
17: ; preds = %2
store i8 79, i8* %3
br label %22
18: ; preds = %2
store i8 80, i8* %3
br label %22
19: ; preds = %2
%20 = load i8, i8* %4
%21 = call i32 @__Pyx_BufFmt_RaiseUnexpectedChar(i8 signext %20)
store i8 0, i8* %3
br label %22
22: ; preds = %19, %18, %17, %11, %10, %9, %8
%23 = load i8, i8* %3
ret i8 %23
}

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