#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*/ shuffleAndDeal(int **, char const **, char const **);
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};
  srand(time(0));
  shuffleAndDeal(deck, face, suit);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x170,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2c27(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2c24(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2c21(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2c1e(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0x2c14(%rip),%rsi
mov    $0x68,%edx
call   1060 <memcpy@plt>
lea    -0x170(%rbp),%rdi
xor    %esi,%esi
mov    $0xd0,%edx
call   1030 <memset@plt>
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
lea    -0x170(%rbp),%rdi
lea    -0xa0(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1050 <shuffleAndDeal@plt>
xor    %eax,%eax
add    $0x170,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x168,%rsp
movaps 0x2c62(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0x2c46(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2cbb(%rip),%rax
mov    %rax,0x80(%rsp)
movaps 0x2c9c(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0x2c80(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0x2c64(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0x2c48(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0x2c2c(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0x2c10(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x150(%rsp)
movaps %xmm0,0x140(%rsp)
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
lea    0x90(%rsp),%rdi
lea    0x20(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <shuffleAndDeal@plt>
xor    %eax,%eax
add    $0x168,%rsp
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]]
store i32 0, i32* %1
%5 = bitcast [4 x i8*]* %2 to i8*
%6 = bitcast [13 x i8*]* %3 to i8*
%7 = bitcast [4 x [13 x i32]]* %4 to i8*
%8 = call i32 @time(i32 0)
%9 = call i32 @srand(i32 %8)
%10 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %4, i64 0, i64 0
%11 = bitcast [13 x i32]* %10 to i32**
%12 = getelementptr inbounds [13 x i8*], [13 x i8*]* %3, i64 0, i64 0
%13 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 0
%14 = call i32 @shuffleAndDeal(i32** %11, i8** %12, i8** %13)
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 = tail call i32 @time(i32 0)
%8 = tail call i32 @srand(i32 %7)
%9 = bitcast [4 x [13 x i32]]* %3 to i32**
%10 = getelementptr inbounds [13 x i8*], [13 x i8*]* %2, i64 0, i64 0
%11 = getelementptr inbounds [4 x i8*], [4 x i8*]* %1, i64 0, i64 0
%12 = call i32 @shuffleAndDeal(i32** %9, i8** %10, i8** %11)
ret i32 0
}