#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main() {
  int face;
  for (face = 0; face <= 12; face++) {
    int suit;
    for (suit = 0; suit <= 3; suit++) {
      switch (face) {
      case 0:
        printf("2");
        break;
      case 1:
        printf("3");
        break;
      case 2:
        printf("4");
        break;
      case 3:
        printf("5");
        break;
      case 4:
        printf("6");
        break;
      case 5:
        printf("7");
        break;
      case 6:
        printf("8");
        break;
      case 7:
        printf("9");
        break;
      case 8:
        printf("10");
        break;
      case 9:
        printf("J");
        break;
      case 10:
        printf("Q");
        break;
      case 11:
        printf("K");
        break;
      case 12:
        printf("A");
      default:
        break;
      }
      switch (suit) {
      case 0:
        printf("C ");
        break;
      case 1:
        printf("D ");
        break;
      case 2:
        printf("H ");
        break;
      case 3:
        printf("S ");
        break;
      default:
        break;
      }
    }
    printf("\n");
  }
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xc,-0x8(%rbp)
jg     12de <main+0x1ce>
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jg     12c4 <main+0x1b4>
mov    -0x8(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0xc,%rax
ja     123e <main+0x12e>
mov    -0x18(%rbp),%rax
lea    0xea3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
jmp    1243 <main+0x133>
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
jmp    1243 <main+0x133>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    1243 <main+0x133>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
jmp    1243 <main+0x133>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
jmp    1243 <main+0x133>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
jmp    1243 <main+0x133>
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
jmp    1243 <main+0x133>
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
jmp    1243 <main+0x133>
lea    0xe5f(%rip),%rdi
call   1030 <printf@plt>
jmp    1243 <main+0x133>
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
jmp    1243 <main+0x133>
lea    0xe42(%rip),%rdi
call   1030 <printf@plt>
jmp    1243 <main+0x133>
lea    0xe33(%rip),%rdi
call   1030 <printf@plt>
jmp    1243 <main+0x133>
lea    0xe24(%rip),%rdi
call   1030 <printf@plt>
jmp    1243 <main+0x133>
mov    -0xc(%rbp),%eax
mov    %rax,-0x20(%rbp)
sub    $0x3,%rax
ja     12ac <main+0x19c>
mov    -0x20(%rbp),%rax
lea    0xdd5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xdf0(%rip),%rdi
call   1030 <printf@plt>
jmp    12b1 <main+0x1a1>
lea    0xde2(%rip),%rdi
call   1030 <printf@plt>
jmp    12b1 <main+0x1a1>
lea    0xdd4(%rip),%rdi
call   1030 <printf@plt>
jmp    12b1 <main+0x1a1>
lea    0xdc6(%rip),%rdi
call   1030 <printf@plt>
jmp    12b1 <main+0x1a1>
jmp    12b1 <main+0x1a1>
jmp    12b6 <main+0x1a6>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
lea    0xda0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    0x2cfb(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %ebp,%ebp
lea    0xf13(%rip),%r12
lea    0xef9(%rip),%rbx
lea    0xf0b(%rip),%r14
lea    0xeb7(%rip),%r15
jmp    1172 <main+0x52>
nopl   0x0(%rax,%rax,1)
lea    0xef9(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    $0xd,%ebp
je     122a <main+0x10a>
xor    %r13d,%r13d
jmp    118c <main+0x6c>
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%r13d
cmp    $0xc,%ebp
ja     1205 <main+0xe5>
mov    %ebp,%eax
movslq (%r15,%rax,4),%rax
add    %r15,%rax
jmp    *%rax
mov    $0x32,%edi
jmp    1200 <main+0xe0>
mov    $0x33,%edi
jmp    1200 <main+0xe0>
mov    $0x34,%edi
jmp    1200 <main+0xe0>
mov    $0x35,%edi
jmp    1200 <main+0xe0>
mov    $0x36,%edi
jmp    1200 <main+0xe0>
mov    $0x37,%edi
jmp    1200 <main+0xe0>
mov    $0x38,%edi
jmp    1200 <main+0xe0>
mov    $0x39,%edi
jmp    1200 <main+0xe0>
lea    0xe69(%rip),%rdi
call   1040 <printf@plt>
jmp    1205 <main+0xe5>
mov    $0x4a,%edi
jmp    1200 <main+0xe0>
mov    $0x51,%edi
jmp    1200 <main+0xe0>
mov    $0x4b,%edi
jmp    1200 <main+0xe0>
mov    $0x41,%edi
nopl   0x0(%rax)
call   1030 <putchar@plt>
cmp    $0x3,%r13d
ja     1188 <main+0x68>
mov    %r13d,%eax
movslq (%rbx,%rax,4),%rax
add    %rbx,%rax
mov    %r12,%rdi
jmp    *%rax
lea    0xe25(%rip),%rdi
jmp    1183 <main+0x63>
mov    0x2daf(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"2\00"
@.str.1 = [2 x i8] c"3\00"
@.str.2 = [2 x i8] c"4\00"
@.str.3 = [2 x i8] c"5\00"
@.str.4 = [2 x i8] c"6\00"
@.str.5 = [2 x i8] c"7\00"
@.str.6 = [2 x i8] c"8\00"
@.str.7 = [2 x i8] c"9\00"
@.str.8 = [3 x i8] c"10\00"
@.str.9 = [2 x i8] c"J\00"
@.str.10 = [2 x i8] c"Q\00"
@.str.11 = [2 x i8] c"K\00"
@.str.12 = [2 x i8] c"A\00"
@.str.13 = [3 x i8] c"C \00"
@.str.14 = [3 x i8] c"D \00"
@.str.15 = [3 x i8] c"H \00"
@.str.16 = [3 x i8] c"S \00"
@.str.17 = [2 x i8] c"\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %4
4: ; preds = %57, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 12
br i1 %6, label %7, label %60
7: ; preds = %4
store i32 0, i32* %3
br label %8
8: ; preds = %52, %7
%9 = load i32, i32* %3
%10 = icmp sle i32 %9, 3
br i1 %10, label %11, label %55
11: ; preds = %8
%12 = load i32, i32* %2
switch i32 %12, label %39 [
i32 0, label %13
i32 1, label %15
i32 2, label %17
i32 3, label %19
i32 4, label %21
i32 5, label %23
i32 6, label %25
i32 7, label %27
i32 8, label %29
i32 9, label %31
i32 10, label %33
i32 11, label %35
i32 12, label %37
]
13: ; preds = %11
%14 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %40
15: ; preds = %11
%16 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %40
17: ; preds = %11
%18 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %40
19: ; preds = %11
%20 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %40
21: ; preds = %11
%22 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %40
23: ; preds = %11
%24 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %40
25: ; preds = %11
%26 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %40
27: ; preds = %11
%28 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %40
29: ; preds = %11
%30 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
br label %40
31: ; preds = %11
%32 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
br label %40
33: ; preds = %11
%34 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
br label %40
35: ; preds = %11
%36 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
br label %40
37: ; preds = %11
%38 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i64 0, i64 0))
br label %39
39: ; preds = %11, %37
br label %40
40: ; preds = %39, %35, %33, %31, %29, %27, %25, %23, %21, %19, %17, %15, %13
%41 = load i32, i32* %3
switch i32 %41, label %50 [
i32 0, label %42
i32 1, label %44
i32 2, label %46
i32 3, label %48
]
42: ; preds = %40
%43 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0))
br label %51
44: ; preds = %40
%45 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0))
br label %51
46: ; preds = %40
%47 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0))
br label %51
48: ; preds = %40
%49 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0))
br label %51
50: ; preds = %40
br label %51
51: ; preds = %50, %48, %46, %44, %42
br label %52
52: ; preds = %51
%53 = load i32, i32* %3
%54 = add nsw i32 %53, 1
store i32 %54, i32* %3
br label %8
55: ; preds = %8
%56 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
br label %57
57: ; preds = %55
%58 = load i32, i32* %2
%59 = add nsw i32 %58, 1
store i32 %59, i32* %2
br label %4
60: ; preds = %4
%61 = load i32, i32* @EXIT_SUCCESS
ret i32 %61
}

LLVM IR (-O2):
@.str.8 = [3 x i8] c"10\00"
@.str.13 = [3 x i8] c"C \00"
@.str.14 = [3 x i8] c"D \00"
@.str.15 = [3 x i8] c"H \00"
@.str.16 = [3 x i8] c"S \00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
br label %1
1: ; preds = %0, %39
%2 = phi i32 [ 0, %0 ], [ %42, %39 ]
br label %3
3: ; preds = %37, %1
%4 = phi i32 [ 0, %1 ], [ %38, %37 ]
switch i32 %2, label %31 [
i32 0, label %5
i32 1, label %7
i32 2, label %9
i32 3, label %11
i32 4, label %13
i32 5, label %15
i32 6, label %17
i32 7, label %19
i32 8, label %21
i32 9, label %23
i32 10, label %25
i32 11, label %27
i32 12, label %29
]
5: ; preds = %3
%6 = tail call i32 @putchar(i32 50)
br label %31
7: ; preds = %3
%8 = tail call i32 @putchar(i32 51)
br label %31
9: ; preds = %3
%10 = tail call i32 @putchar(i32 52)
br label %31
11: ; preds = %3
%12 = tail call i32 @putchar(i32 53)
br label %31
13: ; preds = %3
%14 = tail call i32 @putchar(i32 54)
br label %31
15: ; preds = %3
%16 = tail call i32 @putchar(i32 55)
br label %31
17: ; preds = %3
%18 = tail call i32 @putchar(i32 56)
br label %31
19: ; preds = %3
%20 = tail call i32 @putchar(i32 57)
br label %31
21: ; preds = %3
%22 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
br label %31
23: ; preds = %3
%24 = tail call i32 @putchar(i32 74)
br label %31
25: ; preds = %3
%26 = tail call i32 @putchar(i32 81)
br label %31
27: ; preds = %3
%28 = tail call i32 @putchar(i32 75)
br label %31
29: ; preds = %3
%30 = tail call i32 @putchar(i32 65)
br label %31
31: ; preds = %29, %3, %27, %25, %23, %21, %19, %17, %15, %13, %11, %9, %7, %5
switch i32 %4, label %37 [
i32 0, label %34
i32 1, label %32
i32 2, label %33
i32 3, label %39
]
32: ; preds = %31
br label %34
33: ; preds = %31
br label %34
34: ; preds = %31, %33, %32
%35 = phi i8* [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), %32 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0), %33 ], [ getelementptr inbounds ([3 x i8], [3 x i8]* @.str.13, i64 0, i64 0), %31 ]
%36 = tail call i32 @printf(i8* dereferenceable(1) %35)
br label %37
37: ; preds = %34, %31
%38 = add nuw nsw i32 %4, 1
br label %3
39: ; preds = %31
%40 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0))
%41 = tail call i32 @putchar(i32 10)
%42 = add nuw nsw i32 %2, 1
%43 = icmp eq i32 %42, 13
br i1 %43, label %44, label %1
44: ; preds = %39
%45 = load i32, i32* @EXIT_SUCCESS
ret i32 %45
}