int main(int argc, char *argv[]) {
  char cards[13][3] = {"2", "3",  "4", "5", "6", "7", "8",
                       "9", "10", "J", "Q", "K", "A"};
  char types[4] = {'C', 'D', 'H', 'S'};
  int rows = 0;
  int cols = 0;
  for (rows = 0; rows < 13; rows++) {
    for (cols = 0; cols < sizeof(types); cols++) {
      printf("%s%c ", cards[rows], types[cols]);
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xebf(%rip),%rsi
mov    $0x27,%edx
call   1040 <memcpy@plt>
mov    0xed6(%rip),%eax
mov    %eax,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x48(%rbp)
cmpl   $0xd,-0x48(%rbp)
jge    11d8 <main+0xb8>
movl   $0x0,-0x4c(%rbp)
movslq -0x4c(%rbp),%rax
cmp    $0x4,%rax
jae    11bc <main+0x9c>
movslq -0x48(%rbp),%rax
lea    -0x40(%rbp),%rsi
imul   $0x3,%rax,%rax
add    %rax,%rsi
movslq -0x4c(%rbp),%rax
movsbl -0x44(%rbp,%rax,1),%edx
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    117a <main+0x5a>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1169 <main+0x49>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    0xeef(%rip),%rax
mov    %rax,0x1f(%rsp)
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb8(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xed4(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
lea    (%rsp,%rbx,1),%r15
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x43,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x44,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x48,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x53,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x3,%rbx
cmp    $0x27,%rbx
jne    1160 <main+0x40>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.cards = [13 x [3 x i8]] [[3 x i8] c"2\00\00", [3 x i8] c"3\00\00", [3 x i8] c"4\00\00", [3 x i8] c"5\00\00", [3 x i8] c"6\00\00", [3 x i8] c"7\00\00", [3 x i8] c"8\00\00", [3 x i8] c"9\00\00", [3 x i8] c"10\00", [3 x i8] c"J\00\00", [3 x i8] c"Q\00\00", [3 x i8] c"K\00\00", [3 x i8] c"A\00\00"]
@__const.main.types = [4 x i8] c"CDHS"
@.str = [6 x i8] c"%s%c \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [13 x [3 x i8]]
%7 = alloca [4 x i8]
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = bitcast [13 x [3 x i8]]* %6 to i8*
%11 = bitcast [4 x i8]* %7 to i8*
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %8
br label %12
12: ; preds = %36, %2
%13 = load i32, i32* %8
%14 = icmp slt i32 %13, 13
br i1 %14, label %15, label %39
15: ; preds = %12
store i32 0, i32* %9
br label %16
16: ; preds = %31, %15
%17 = load i32, i32* %9
%18 = sext i32 %17 to i64
%19 = icmp ult i64 %18, 4
br i1 %19, label %20, label %34
20: ; preds = %16
%21 = load i32, i32* %8
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [13 x [3 x i8]], [13 x [3 x i8]]* %6, i64 0, i64 %22
%24 = getelementptr inbounds [3 x i8], [3 x i8]* %23, i64 0, i64 0
%25 = load i32, i32* %9
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [4 x i8], [4 x i8]* %7, i64 0, i64 %26
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %24, i32 %29)
br label %31
31: ; preds = %20
%32 = load i32, i32* %9
%33 = add nsw i32 %32, 1
store i32 %33, i32* %9
br label %16
34: ; preds = %16
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %36
36: ; preds = %34
%37 = load i32, i32* %8
%38 = add nsw i32 %37, 1
store i32 %38, i32* %8
br label %12
39: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
@__const.main.cards = [13 x [3 x i8]] [[3 x i8] c"2\00\00", [3 x i8] c"3\00\00", [3 x i8] c"4\00\00", [3 x i8] c"5\00\00", [3 x i8] c"6\00\00", [3 x i8] c"7\00\00", [3 x i8] c"8\00\00", [3 x i8] c"9\00\00", [3 x i8] c"10\00", [3 x i8] c"J\00\00", [3 x i8] c"Q\00\00", [3 x i8] c"K\00\00", [3 x i8] c"A\00\00"]
@.str = [6 x i8] c"%s%c \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [13 x [3 x i8]]
%4 = getelementptr inbounds [13 x [3 x i8]], [13 x [3 x i8]]* %3, i64 0, i64 0, i64 0
br label %5
5: ; preds = %2, %5
%6 = phi i64 [ 0, %2 ], [ %13, %5 ]
%7 = getelementptr inbounds [13 x [3 x i8]], [13 x [3 x i8]]* %3, i64 0, i64 %6, i64 0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %7, i32 67)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %7, i32 68)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %7, i32 72)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %7, i32 83)
%12 = call i32 @putchar(i32 10)
%13 = add nuw nsw i64 %6, 1
%14 = icmp eq i64 %13, 13
br i1 %14, label %15, label %5
15: ; preds = %5
ret i32 0
}