#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 int2Poker(int in) {
  switch (in) {
  case 1: {
    putchar('A');
    break;
  }
  case 2:
  case 3:
  case 4:
  case 5:
  case 6:
  case 7:
  case 8:
  case 9: {
    putchar(in + '0');
    break;
  }
  case 10:
  case 0: {
    putchar('1');
    putchar('0');
    break;
  }
  case 11: {
    putchar('J');
    break;
  }
  case 12: {
    putchar('Q');
    break;
  }
  case 13: {
    putchar('K');
    break;
  }
  }
}


x86 assembly (clang, -O0):
<int2Poker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0xd,%rax
ja     11a3 <int2Poker+0x93>
mov    -0x10(%rbp),%rax
lea    0xec9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x41,%edi
call   1030 <putchar@plt>
jmp    11a3 <int2Poker+0x93>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    11a3 <int2Poker+0x93>
mov    $0x31,%edi
call   1030 <putchar@plt>
mov    $0x30,%edi
call   1030 <putchar@plt>
jmp    11a3 <int2Poker+0x93>
mov    $0x4a,%edi
call   1030 <putchar@plt>
jmp    11a3 <int2Poker+0x93>
mov    $0x51,%edi
call   1030 <putchar@plt>
jmp    11a3 <int2Poker+0x93>
mov    $0x4b,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int2Poker>:
cmp    $0xd,%edi
ja     1140 <int2Poker+0x30>
push   %rax
mov    $0x41,%al
mov    %edi,%ecx
lea    0xedf(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
add    $0x30,%dil
mov    %edi,%eax
jmp    114b <int2Poker+0x3b>
mov    $0x31,%edi
call   1030 <putchar@plt>
mov    $0x30,%al
jmp    114b <int2Poker+0x3b>
ret
mov    $0x4a,%al
jmp    114b <int2Poker+0x3b>
mov    $0x51,%al
jmp    114b <int2Poker+0x3b>
mov    $0x4b,%al
movsbl %al,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @int2Poker(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %20 [
i32 1, label %4
i32 2, label %6
i32 3, label %6
i32 4, label %6
i32 5, label %6
i32 6, label %6
i32 7, label %6
i32 8, label %6
i32 9, label %6
i32 10, label %11
i32 0, label %11
i32 11, label %14
i32 12, label %16
i32 13, label %18
]
4: ; preds = %1
%5 = call i32 @putchar(i8 signext 65)
br label %20
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 48
%9 = trunc i32 %8 to i8
%10 = call i32 @putchar(i8 signext %9)
br label %20
11: ; preds = %1, %1
%12 = call i32 @putchar(i8 signext 49)
%13 = call i32 @putchar(i8 signext 48)
br label %20
14: ; preds = %1
%15 = call i32 @putchar(i8 signext 74)
br label %20
16: ; preds = %1
%17 = call i32 @putchar(i8 signext 81)
br label %20
18: ; preds = %1
%19 = call i32 @putchar(i8 signext 75)
br label %20
20: ; preds = %1, %18, %16, %14, %11, %6, %4
ret void
}

LLVM IR (-O2):
define void @int2Poker(i32 %0) {
switch i32 %0, label %13 [
i32 1, label %10
i32 2, label %2
i32 3, label %2
i32 4, label %2
i32 5, label %2
i32 6, label %2
i32 7, label %2
i32 8, label %2
i32 9, label %2
i32 10, label %5
i32 0, label %5
i32 11, label %7
i32 12, label %8
i32 13, label %9
]
2: ; preds = %1, %1, %1, %1, %1, %1, %1, %1
%3 = trunc i32 %0 to i8
%4 = add nuw nsw i8 %3, 48
br label %10
5: ; preds = %1, %1
%6 = tail call i32 @putchar(i8 signext 49)
br label %10
7: ; preds = %1
br label %10
8: ; preds = %1
br label %10
9: ; preds = %1
br label %10
10: ; preds = %1, %2, %5, %7, %8, %9
%11 = phi i8 [ 75, %9 ], [ 81, %8 ], [ 74, %7 ], [ 48, %5 ], [ %4, %2 ], [ 65, %1 ]
%12 = tail call i32 @putchar(i8 signext %11)
br label %13
13: ; preds = %10, %1
ret void
}