#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*/ printDeck(int **);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ reinitialiseDeck(int **);
int /*<<< orphan*/ shuffle(int **);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
int main() {
  srand(time(0));
  int deck[4][13] = {{0}};
  reinitialiseDeck(deck);
  printf("\n\n -- Before Shuffling ----\n\n");
  printDeck(deck);
  shuffle(deck);
  printf("\n\n -- After Shuffling ----\n\n");
  printDeck(deck);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
lea    -0xe0(%rbp),%rdi
xor    %esi,%esi
mov    $0xd0,%edx
call   1060 <memset@plt>
lea    -0xe0(%rbp),%rdi
call   1090 <reinitialiseDeck@plt>
lea    0xe4a(%rip),%rdi
call   1050 <printf@plt>
lea    -0xe0(%rbp),%rdi
call   1030 <printDeck@plt>
lea    -0xe0(%rbp),%rdi
call   1040 <shuffle@plt>
lea    0xe44(%rip),%rdi
call   1050 <printf@plt>
lea    -0xe0(%rbp),%rdi
call   1030 <printDeck@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xd0,%rsp
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1060 <srand@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1080 <reinitialiseDeck@plt>
lea    0xe26(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1030 <printDeck@plt>
mov    %rbx,%rdi
call   1050 <shuffle@plt>
lea    0xe27(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1030 <printDeck@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"\0A\0A -- Before Shuffling ----\0A\0A\00"
@.str.1 = [29 x i8] c"\0A\0A -- After Shuffling ----\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x [13 x i32]]
store i32 0, i32* %1
%3 = call i32 @time(i32 0)
%4 = call i32 @srand(i32 %3)
%5 = bitcast [4 x [13 x i32]]* %2 to i8*
%6 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %2, i64 0, i64 0
%7 = bitcast [13 x i32]* %6 to i32**
%8 = call i32 @reinitialiseDeck(i32** %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%10 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %2, i64 0, i64 0
%11 = bitcast [13 x i32]* %10 to i32**
%12 = call i32 @printDeck(i32** %11)
%13 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %2, i64 0, i64 0
%14 = bitcast [13 x i32]* %13 to i32**
%15 = call i32 @shuffle(i32** %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%17 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %2, i64 0, i64 0
%18 = bitcast [13 x i32]* %17 to i32**
%19 = call i32 @printDeck(i32** %18)
ret i32 0
}

LLVM IR (-O2):
@str = [29 x i8] c"\0A\0A -- Before Shuffling ----\0A\00"
@str.2 = [28 x i8] c"\0A\0A -- After Shuffling ----\0A\00"
define i32 @main() {
%1 = alloca [4 x [13 x i32]]
%2 = tail call i32 @time(i32 0)
%3 = tail call i32 @srand(i32 %2)
%4 = bitcast [4 x [13 x i32]]* %1 to i8*
%5 = bitcast [4 x [13 x i32]]* %1 to i32**
%6 = call i32 @reinitialiseDeck(i32** %5)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%8 = call i32 @printDeck(i32** %5)
%9 = call i32 @shuffle(i32** %5)
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.2, i64 0, i64 0))
%11 = call i32 @printDeck(i32** %5)
ret i32 0
}