#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*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  void shuffleAndDeal(unsigned int wDeck[][13], const char *wFace[],
                      const char *wSuit[]);
  size_t row;
  size_t column;
  unsigned int i = 1;
  const char *suit[4] = {"Cuori", "Quadri", "Fiori", "Picche"};
  const char *face[13] = {"Asso", "Due",    "Tre",  "Quattro", "Cinque",
                          "Sei",  "Sette",  "Otto", "Nove",    "Dieci",
                          "Jack", "Regina", "Re"};
  unsigned int deck[4][13] = {{0}, {0}};
  row = 0;
  do {
    column = 0;
    do {
      deck[row][column] = i;
      i++;
      column++;
    } while (column < 13);
    row++;
  } while (row < 4);
  srand(time(NULL));
  shuffleAndDeal(deck, face, suit);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    0x2c20(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0x2c1d(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0x2c1a(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2c17(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    -0xb0(%rbp),%rdi
lea    0x2c0d(%rip),%rsi
mov    $0x68,%edx
call   1060 <memcpy@plt>
lea    -0x180(%rbp),%rdi
xor    %esi,%esi
mov    $0xd0,%edx
call   1030 <memset@plt>
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x1c(%rbp),%edx
lea    -0x180(%rbp),%rax
imul   $0x34,-0x10(%rbp),%rcx
add    %rcx,%rax
mov    -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
cmpq   $0xd,-0x18(%rbp)
jb     11d0 <main+0x80>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x4,-0x10(%rbp)
jb     11c8 <main+0x78>
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
lea    -0x180(%rbp),%rdi
lea    -0xb0(%rbp),%rsi
lea    -0x40(%rbp),%rdx
call   1050 <shuffleAndDeal@plt>
xor    %eax,%eax
add    $0x180,%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)
movaps 0xe54(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xe55(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xe56(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xe57(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xe58(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xe59(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xe5a(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xe5b(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0xe5c(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xe5d(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
movaps 0xe5e(%rip),%xmm0
movaps %xmm0,0x130(%rsp)
movaps 0xe5f(%rip),%xmm0
movaps %xmm0,0x140(%rsp)
movaps 0xe60(%rip),%xmm0
movaps %xmm0,0x150(%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 = [6 x i8] c"Cuori\00"
@.str.1 = [7 x i8] c"Quadri\00"
@.str.2 = [6 x i8] c"Fiori\00"
@.str.3 = [7 x i8] c"Picche\00"
@__const.main.suit = [4 x i8*] [i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 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 = [5 x i8] c"Asso\00"
@.str.5 = [4 x i8] c"Due\00"
@.str.6 = [4 x i8] c"Tre\00"
@.str.7 = [8 x i8] c"Quattro\00"
@.str.8 = [7 x i8] c"Cinque\00"
@.str.9 = [4 x i8] c"Sei\00"
@.str.10 = [6 x i8] c"Sette\00"
@.str.11 = [5 x i8] c"Otto\00"
@.str.12 = [5 x i8] c"Nove\00"
@.str.13 = [6 x i8] c"Dieci\00"
@.str.14 = [5 x i8] c"Jack\00"
@.str.15 = [7 x i8] c"Regina\00"
@.str.16 = [3 x i8] c"Re\00"
@__const.main.face = [13 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 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 ([5 x i8], [5 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 ([6 x i8], [6 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 ([7 x i8], [7 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i32 0, i32 0)]
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i32
%5 = alloca [4 x i8*]
%6 = alloca [13 x i8*]
%7 = alloca [4 x [13 x i32]]
store i32 0, i32* %1
store i32 1, i32* %4
%8 = bitcast [4 x i8*]* %5 to i8*
%9 = bitcast [13 x i8*]* %6 to i8*
%10 = bitcast [4 x [13 x i32]]* %7 to i8*
store i64 0, i64* %2
br label %11
11: ; preds = %28, %0
store i64 0, i64* %3
br label %12
12: ; preds = %22, %11
%13 = load i32, i32* %4
%14 = load i64, i64* %2
%15 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %7, i64 0, i64 %14
%16 = load i64, i64* %3
%17 = getelementptr inbounds [13 x i32], [13 x i32]* %15, i64 0, i64 %16
store i32 %13, i32* %17
%18 = load i32, i32* %4
%19 = add i32 %18, 1
store i32 %19, i32* %4
%20 = load i64, i64* %3
%21 = add i64 %20, 1
store i64 %21, i64* %3
br label %22
22: ; preds = %12
%23 = load i64, i64* %3
%24 = icmp ult i64 %23, 13
br i1 %24, label %12, label %25
25: ; preds = %22
%26 = load i64, i64* %2
%27 = add i64 %26, 1
store i64 %27, i64* %2
br label %28
28: ; preds = %25
%29 = load i64, i64* %2
%30 = icmp ult i64 %29, 4
br i1 %30, label %11, label %31
31: ; preds = %28
%32 = call i32 @time(i32* null)
%33 = call i32 @srand(i32 %32)
%34 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %7, i64 0, i64 0
%35 = getelementptr inbounds [13 x i8*], [13 x i8*]* %6, i64 0, i64 0
%36 = getelementptr inbounds [4 x i8*], [4 x i8*]* %5, i64 0, i64 0
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"Cuori\00"
@.str.1 = [7 x i8] c"Quadri\00"
@.str.2 = [6 x i8] c"Fiori\00"
@.str.3 = [7 x i8] c"Picche\00"
@__const.main.suit = [4 x i8*] [i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 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 = [5 x i8] c"Asso\00"
@.str.5 = [4 x i8] c"Due\00"
@.str.6 = [4 x i8] c"Tre\00"
@.str.7 = [8 x i8] c"Quattro\00"
@.str.8 = [7 x i8] c"Cinque\00"
@.str.9 = [4 x i8] c"Sei\00"
@.str.10 = [6 x i8] c"Sette\00"
@.str.11 = [5 x i8] c"Otto\00"
@.str.12 = [5 x i8] c"Nove\00"
@.str.13 = [6 x i8] c"Dieci\00"
@.str.14 = [5 x i8] c"Jack\00"
@.str.15 = [7 x i8] c"Regina\00"
@.str.16 = [3 x i8] c"Re\00"
@__const.main.face = [13 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 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 ([5 x i8], [5 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 ([6 x i8], [6 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 ([7 x i8], [7 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 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* null)
%33 = tail call i32 @srand(i32 %32)
%34 = getelementptr inbounds [4 x [13 x i32]], [4 x [13 x i32]]* %3, i64 0, i64 0
%35 = getelementptr inbounds [13 x i8*], [13 x i8*]* %2, i64 0, i64 0
%36 = getelementptr inbounds [4 x i8*], [4 x i8*]* %1, i64 0, i64 0
ret i32 0
}