#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*/ putchar(char);
void char2Poker(char in) {
  switch (in) {
  case '1':
  case 'a':
  case 'A': {
    putchar('A');
    break;
  }
  case '2':
  case '3':
  case '4':
  case '5':
  case '6':
  case '7':
  case '8':
  case '9': {
    putchar(in);
    break;
  }
  case '0': {
    putchar('1');
    putchar('0');
    break;
  }
  case 'j':
  case 'J': {
    putchar('J');
    break;
  }
  case 'q':
  case 'Q': {
    putchar('Q');
    break;
  }
  case 'k':
  case 'K': {
    putchar('K');
    break;
  }
  }
}


x86 assembly (clang, -O0):
<char2Poker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0xffffffd0,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x41,%eax
ja     11a6 <char2Poker+0x96>
mov    -0x10(%rbp),%rax
lea    0xec1(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x41,%edi
call   1030 <putchar@plt>
jmp    11a6 <char2Poker+0x96>
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
jmp    11a6 <char2Poker+0x96>
mov    $0x31,%edi
call   1030 <putchar@plt>
mov    $0x30,%edi
call   1030 <putchar@plt>
jmp    11a6 <char2Poker+0x96>
mov    $0x4a,%edi
call   1030 <putchar@plt>
jmp    11a6 <char2Poker+0x96>
mov    $0x51,%edi
call   1030 <putchar@plt>
jmp    11a6 <char2Poker+0x96>
mov    $0x4b,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<char2Poker>:
push   %rax
lea    -0x30(%rdi),%ecx
cmp    $0x41,%ecx
ja     1150 <char2Poker+0x40>
mov    $0x41,%al
lea    0xede(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
mov    %edi,%eax
jmp    1147 <char2Poker+0x37>
mov    $0x4a,%al
jmp    1147 <char2Poker+0x37>
mov    $0x4b,%al
jmp    1147 <char2Poker+0x37>
mov    $0x51,%al
jmp    1147 <char2Poker+0x37>
mov    $0x31,%edi
call   1030 <putchar@plt>
mov    $0x30,%al
movsbl %al,%edi
pop    %rax
jmp    1030 <putchar@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @char2Poker(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
switch i32 %4, label %19 [
i32 49, label %5
i32 97, label %5
i32 65, label %5
i32 50, label %7
i32 51, label %7
i32 52, label %7
i32 53, label %7
i32 54, label %7
i32 55, label %7
i32 56, label %7
i32 57, label %7
i32 48, label %10
i32 106, label %13
i32 74, label %13
i32 113, label %15
i32 81, label %15
i32 107, label %17
i32 75, label %17
]
5: ; preds = %1, %1, %1
%6 = call i32 @putchar(i8 signext 65)
br label %19
7: ; preds = %1, %1, %1, %1, %1, %1, %1, %1
%8 = load i8, i8* %2
%9 = call i32 @putchar(i8 signext %8)
br label %19
10: ; preds = %1
%11 = call i32 @putchar(i8 signext 49)
%12 = call i32 @putchar(i8 signext 48)
br label %19
13: ; preds = %1, %1
%14 = call i32 @putchar(i8 signext 74)
br label %19
15: ; preds = %1, %1
%16 = call i32 @putchar(i8 signext 81)
br label %19
17: ; preds = %1, %1
%18 = call i32 @putchar(i8 signext 75)
br label %19
19: ; preds = %1, %17, %15, %13, %10, %7, %5
ret void
}

LLVM IR (-O2):
define void @char2Poker(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %12 [
i32 49, label %9
i32 97, label %9
i32 65, label %9
i32 50, label %3
i32 51, label %3
i32 52, label %3
i32 53, label %3
i32 54, label %3
i32 55, label %3
i32 56, label %3
i32 57, label %3
i32 48, label %4
i32 106, label %6
i32 74, label %6
i32 113, label %7
i32 81, label %7
i32 107, label %8
i32 75, label %8
]
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1
br label %9
4: ; preds = %1
%5 = tail call i32 @putchar(i8 signext 49)
br label %9
6: ; preds = %1, %1
br label %9
7: ; preds = %1, %1
br label %9
8: ; preds = %1, %1
br label %9
9: ; preds = %1, %1, %1, %3, %4, %6, %7, %8
%10 = phi i8 [ 75, %8 ], [ 81, %7 ], [ 74, %6 ], [ 48, %4 ], [ %0, %3 ], [ 65, %1 ], [ 65, %1 ], [ 65, %1 ]
%11 = tail call i32 @putchar(i8 signext %10)
br label %12
12: ; preds = %9, %1
ret void
}