#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*/ deal(int **, char const **, char const **);
int /*<<< orphan*/ shuffle(int **);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
int main(void) {
  const char *suit[4] = {"Hearts", "Diamonds", "Clubs", "Spades"};
  const char *face[13] = {"Ace",  "Deuce", "Three", "Four", "Five",
                          "Six",  "Seven", "Eight", "Nine", "Ten",
                          "Jack", "Queen", "King"};
  int deck[4][13] = {0};
  int row, column, card = 1;
  for (row = 0; row < 4; row++) {
    for (column = 0; column < 13; column++) {
      deck[row][column] = card;
      card++;
    }
  }
  srand(time(0));
  shuffle(deck);
  deal(deck, face, suit);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2c17(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2c14(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2c11(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2c0e(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0x2c04(%rip),%rsi
mov    $0x68,%edx
call   1070 <memcpy@plt>
lea    -0x170(%rbp),%rdi
xor    %esi,%esi
mov    $0xd0,%edx
call   1040 <memset@plt>
movl   $0x1,-0x17c(%rbp)
movl   $0x0,-0x174(%rbp)
cmpl   $0x4,-0x174(%rbp)
jge    1262 <main+0x102>
movl   $0x0,-0x178(%rbp)
cmpl   $0xd,-0x178(%rbp)
jge    1249 <main+0xe9>
mov    -0x17c(%rbp),%edx
movslq -0x174(%rbp),%rcx
lea    -0x170(%rbp),%rax
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movslq -0x178(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x17c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x17c(%rbp)
mov    -0x178(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x178(%rbp)
jmp    11f4 <main+0x94>
jmp    124e <main+0xee>
mov    -0x174(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x174(%rbp)
jmp    11dd <main+0x7d>
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
lea    -0x170(%rbp),%rdi
call   1030 <shuffle@plt>
lea    -0x170(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1060 <deal@plt>
xor    %eax,%eax
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x160,%rsp
movaps 0x2c51(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2c35(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2caa(%rip),%rax
mov    %rax,0x80(%rsp)
movaps 0x2c8b(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0x2c6f(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0x2c53(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0x2c37(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0x2c1b(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0x2bff(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe43(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xe44(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xe45(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xe46(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xe47(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xe48(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xe49(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xe4a(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0xe4b(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xe4c(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
movaps 0xe4d(%rip),%xmm0
movaps %xmm0,0x130(%rsp)
movaps 0xe4e(%rip),%xmm0
movaps %xmm0,0x140(%rsp)
movaps 0xe4f(%rip),%xmm0
movaps %xmm0,0x150(%rsp)
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
lea    0x90(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <shuffle@plt>
lea    0x20(%rsp),%rsi
mov    %rsp,%rdx
mov    %rbx,%rdi
call   1050 <deal@plt>
xor    %eax,%eax
add    $0x160,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Hearts\00"
@.str.1 = [9 x i8] c"Diamonds\00"
@.str.2 = [6 x i8] c"Clubs\00"
@.str.3 = [7 x i8] c"Spades\00"
@__const.main.suit = [4 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [4 x i8] c"Ace\00"
@.str.5 = [6 x i8] c"Deuce\00"
@.str.6 = [6 x i8] c"Three\00"
@.str.7 = [5 x i8] c"Four\00"
@.str.8 = [5 x i8] c"Five\00"
@.str.9 = [4 x i8] c"Six\00"
@.str.10 = [6 x i8] c"Seven\00"
@.str.11 = [6 x i8] c"Eight\00"
@.str.12 = [5 x i8] c"Nine\00"
@.str.13 = [4 x i8] c"Ten\00"
@.str.14 = [5 x i8] c"Jack\00"
@.str.15 = [6 x i8] c"Queen\00"
@.str.16 = [5 x i8] c"King\00"
@__const.main.face = [13 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i32 0, i32 0)]
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8*]
%3 = alloca [13 x i8*]
%4 = alloca [4 x [13 x i32]]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = bitcast [4 x i8*]* %2 to i8*
%9 = bitcast [13 x i8*]* %3 to i8*
%10 = bitcast [4 x [13 x i32]]* %4 to i8*
store i32 1, i32* %7
store i32 0, i32* %5
br label %11
11: ; preds = %32, %0
%12 = load i32, i32* %5
%13 = icmp slt i32 %12, 4
br i1 %13, label %14, label %35
14: ; preds = %11
store i32 0, i32* %6
br label %15
15: ; preds = %28, %14
%16 = load i32, i32* %6
%17 = icmp slt i32 %16, 13
br i1 %17, label %18, label %31
18: ; preds = %15
%19 = load i32, i32* %7
%20 = load i32, i32* %5
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %4, i64 0, i64 %21
%23 = load i32, i32* %6
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [13 x i32], [13 x i32]* %22, i64 0, i64 %24
store i32 %19, i32* %25
%26 = load i32, i32* %7
%27 = add nsw i32 %26, 1
store i32 %27, i32* %7
br label %28
28: ; preds = %18
%29 = load i32, i32* %6
%30 = add nsw i32 %29, 1
store i32 %30, i32* %6
br label %15
31: ; preds = %15
br label %32
32: ; preds = %31
%33 = load i32, i32* %5
%34 = add nsw i32 %33, 1
store i32 %34, i32* %5
br label %11
35: ; preds = %11
%36 = call i32 @time(i32 0)
%37 = call i32 @srand(i32 %36)
%38 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %4, i64 0, i64 0
%39 = bitcast [13 x i32]* %38 to i32**
%40 = call i32 @shuffle(i32** %39)
%41 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %4, i64 0, i64 0
%42 = bitcast [13 x i32]* %41 to i32**
%43 = getelementptr inbounds [13 x i8*], [13 x i8*]* %3, i64 0, i64 0
%44 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 0
%45 = call i32 @deal(i32** %42, i8** %43, i8** %44)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"Hearts\00"
@.str.1 = [9 x i8] c"Diamonds\00"
@.str.2 = [6 x i8] c"Clubs\00"
@.str.3 = [7 x i8] c"Spades\00"
@__const.main.suit = [4 x i8*] [i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [4 x i8] c"Ace\00"
@.str.5 = [6 x i8] c"Deuce\00"
@.str.6 = [6 x i8] c"Three\00"
@.str.7 = [5 x i8] c"Four\00"
@.str.8 = [5 x i8] c"Five\00"
@.str.9 = [4 x i8] c"Six\00"
@.str.10 = [6 x i8] c"Seven\00"
@.str.11 = [6 x i8] c"Eight\00"
@.str.12 = [5 x i8] c"Nine\00"
@.str.13 = [4 x i8] c"Ten\00"
@.str.14 = [5 x i8] c"Jack\00"
@.str.15 = [6 x i8] c"Queen\00"
@.str.16 = [5 x i8] c"King\00"
@__const.main.face = [13 x i8*] [i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.16, i32 0, i32 0)]
define i32 @main() {
%1 = alloca [4 x i8*]
%2 = alloca [13 x i8*]
%3 = alloca [4 x [13 x i32]]
%4 = bitcast [4 x i8*]* %1 to i8*
%5 = bitcast [13 x i8*]* %2 to i8*
%6 = bitcast [4 x [13 x i32]]* %3 to i8*
%7 = bitcast [4 x [13 x i32]]* %3 to <4 x i32>*
store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, <4 x i32>* %7
%8 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %3, i64 0, i64 0, i64 4
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> <i32 5, i32 6, i32 7, i32 8>, <4 x i32>* %9
%10 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %3, i64 0, i64 0, i64 8
%11 = bitcast i32* %10 to <4 x i32>*
store <4 x i32> <i32 9, i32 10, i32 11, i32 12>, <4 x i32>* %11
%12 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %3, i64 0, i64 0, i64 12
%13 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> <i32 13, i32 14, i32 15, i32 16>, <4 x i32>* %13
%14 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %3, i64 0, i64 1, i64 3
%15 = bitcast i32* %14 to <4 x i32>*
store <4 x i32> <i32 17, i32 18, i32 19, i32 20>, <4 x i32>* %15
%16 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %3, i64 0, i64 1, i64 7
%17 = bitcast i32* %16 to <4 x i32>*
store <4 x i32> <i32 21, i32 22, i32 23, i32 24>, <4 x i32>* %17
%18 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %3, i64 0, i64 1, i64 11
%19 = bitcast i32* %18 to <4 x i32>*
store <4 x i32> <i32 25, i32 26, i32 27, i32 28>, <4 x i32>* %19
%20 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %3, i64 0, i64 2, i64 2
%21 = bitcast i32* %20 to <4 x i32>*
store <4 x i32> <i32 29, i32 30, i32 31, i32 32>, <4 x i32>* %21
%22 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %3, i64 0, i64 2, i64 6
%23 = bitcast i32* %22 to <4 x i32>*
store <4 x i32> <i32 33, i32 34, i32 35, i32 36>, <4 x i32>* %23
%24 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %3, i64 0, i64 2, i64 10
%25 = bitcast i32* %24 to <4 x i32>*
store <4 x i32> <i32 37, i32 38, i32 39, i32 40>, <4 x i32>* %25
%26 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %3, i64 0, i64 3, i64 1
%27 = bitcast i32* %26 to <4 x i32>*
store <4 x i32> <i32 41, i32 42, i32 43, i32 44>, <4 x i32>* %27
%28 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %3, i64 0, i64 3, i64 5
%29 = bitcast i32* %28 to <4 x i32>*
store <4 x i32> <i32 45, i32 46, i32 47, i32 48>, <4 x i32>* %29
%30 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %3, i64 0, i64 3, i64 9
%31 = bitcast i32* %30 to <4 x i32>*
store <4 x i32> <i32 49, i32 50, i32 51, i32 52>, <4 x i32>* %31
%32 = tail call i32 @time(i32 0)
%33 = tail call i32 @srand(i32 %32)
%34 = bitcast [4 x [13 x i32]]* %3 to i32**
%35 = call i32 @shuffle(i32** %34)
%36 = getelementptr inbounds [13 x i8*], [13 x i8*]* %2, i64 0, i64 0
%37 = getelementptr inbounds [4 x i8*], [4 x i8*]* %1, i64 0, i64 0
%38 = call i32 @deal(i32** %34, i8** %36, i8** %37)
ret i32 0
}