#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*/ printf(char *, ...);
void pic(int num) {
  int cardNum;
  cardNum = num % 100;
  switch (cardNum) {
  case 1: {
    printf("******\n");
    printf("*    *\n");
    printf("*  A *\n");
    printf("*    *\n");
    printf("******\n");
    break;
  }
  case 2:
  case 3:
  case 4:
  case 5:
  case 6:
  case 7:
  case 8:
  case 9:
  case 10: {
    printf("******\n");
    printf("*    *\n");
    printf("* %2d *\n", cardNum);
    printf("*    *\n");
    printf("******\n");
    break;
  }
  case 11: {
    printf("******\n");
    printf("*    *\n");
    printf("*  J *\n");
    printf("*    *\n");
    printf("******\n");
    break;
  }
  case 12: {
    printf("******\n");
    printf("*    *\n");
    printf("*  Q *\n");
    printf("*    *\n");
    printf("******\n");
    break;
  }
  case 13: {
    printf("******\n");
    printf("*    *\n");
    printf("*  K *\n");
    printf("*    *\n");
    printf("******\n");
    break;
  }
  }
}


x86 assembly (clang, -O0):
<pic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
mov    %ecx,%eax
imul   $0x51eb851f,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0xc,%eax
ja     12db <pic+0x1cb>
mov    -0x10(%rbp),%rax
lea    0xea3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12db <pic+0x1cb>
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe41(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12db <pic+0x1cb>
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe33(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12db <pic+0x1cb>
lea    0xde3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xddd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdc1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12db <pic+0x1cb>
lea    0xd98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdad(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd76(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic>:
push   %rbx
mov    %edi,%ebx
movslq %edi,%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
imul   $0x64,%eax,%eax
mov    %eax,%ecx
neg    %ecx
add    %ebx,%ecx
add    $0xffffffff,%ecx
cmp    $0xc,%ecx
ja     118a <pic+0x6a>
lea    0xeae(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
sub    %eax,%ebx
lea    0xefc(%rip),%rdi
call   1030 <puts@plt>
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1213 <pic+0xf3>
pop    %rbx
ret
lea    0xecd(%rip),%rdi
call   1030 <puts@plt>
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
lea    0xea7(%rip),%rdi
jmp    120e <pic+0xee>
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
lea    0xe99(%rip),%rdi
call   1030 <puts@plt>
lea    0xe7f(%rip),%rdi
jmp    120e <pic+0xee>
lea    0xe8b(%rip),%rdi
call   1030 <puts@plt>
lea    0xe78(%rip),%rdi
call   1030 <puts@plt>
lea    0xe57(%rip),%rdi
jmp    120e <pic+0xee>
lea    0xe6a(%rip),%rdi
call   1030 <puts@plt>
lea    0xe57(%rip),%rdi
call   1030 <puts@plt>
lea    0xe2f(%rip),%rdi
call   1030 <puts@plt>
lea    0xe3f(%rip),%rdi
call   1030 <puts@plt>
lea    0xe3a(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"******\0A\00"
@.str.1 = [8 x i8] c"* *\0A\00"
@.str.2 = [8 x i8] c"* A *\0A\00"
@.str.3 = [9 x i8] c"* %2d *\0A\00"
@.str.4 = [8 x i8] c"* J *\0A\00"
@.str.5 = [8 x i8] c"* Q *\0A\00"
@.str.6 = [8 x i8] c"* K *\0A\00"
define void @pic(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = srem i32 %4, 100
store i32 %5, i32* %3
%6 = load i32, i32* %3
switch i32 %6, label %38 [
i32 1, label %7
i32 2, label %13
i32 3, label %13
i32 4, label %13
i32 5, label %13
i32 6, label %13
i32 7, label %13
i32 8, label %13
i32 9, label %13
i32 10, label %13
i32 11, label %20
i32 12, label %26
i32 13, label %32
]
7: ; preds = %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %38
13: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%16 = load i32, i32* %3
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %38
20: ; preds = %1
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %38
26: ; preds = %1
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %38
32: ; preds = %1
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %38
38: ; preds = %1, %32, %26, %20, %13, %7
ret void
}

LLVM IR (-O2):
@.str.3 = [9 x i8] c"* %2d *\0A\00"
@str.8 = [7 x i8] c"* K *\00"
@str.13 = [7 x i8] c"* Q *\00"
@str.18 = [7 x i8] c"* J *\00"
@str.27 = [7 x i8] c"* A *\00"
@str.28 = [7 x i8] c"* *\00"
@str.29 = [7 x i8] c"******\00"
define void @pic(i32 %0) {
%2 = srem i32 %0, 100
switch i32 %2, label %28 [
i32 1, label %3
i32 2, label %7
i32 3, label %7
i32 4, label %7
i32 5, label %7
i32 6, label %7
i32 7, label %7
i32 8, label %7
i32 9, label %7
i32 10, label %7
i32 11, label %11
i32 12, label %15
i32 13, label %19
]
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.29, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.28, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.27, i64 0, i64 0))
br label %23
7: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.29, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.28, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 %2)
br label %23
11: ; preds = %1
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.29, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.28, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.18, i64 0, i64 0))
br label %23
15: ; preds = %1
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.29, i64 0, i64 0))
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.28, i64 0, i64 0))
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.13, i64 0, i64 0))
br label %23
19: ; preds = %1
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.29, i64 0, i64 0))
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.28, i64 0, i64 0))
%22 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.8, i64 0, i64 0))
br label %23
23: ; preds = %3, %7, %11, %15, %19
%24 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.28, i64 0, i64 0), %19 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.28, i64 0, i64 0), %15 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.28, i64 0, i64 0), %11 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.28, i64 0, i64 0), %7 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.28, i64 0, i64 0), %3 ]
%25 = phi i8* [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.29, i64 0, i64 0), %19 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.29, i64 0, i64 0), %15 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.29, i64 0, i64 0), %11 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.29, i64 0, i64 0), %7 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.29, i64 0, i64 0), %3 ]
%26 = tail call i32 @puts(i8* dereferenceable(1) %24)
%27 = tail call i32 @puts(i8* dereferenceable(1) %25)
br label %28
28: ; preds = %23, %1
ret void
}