void reinitialiseDeck(int wDeck[][13]) {
  int row, column;
  int startValue = 1;
  for (row = 0; row < 4; row++) {
    for (column = 0; column < 13; column++)
      wDeck[row][column] = startValue++;
  }
}


x86 assembly (clang, -O0):
<reinitialiseDeck>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    1173 <reinitialiseDeck+0x73>
movl   $0x0,-0x10(%rbp)
cmpl   $0xd,-0x10(%rbp)
jge    1160 <reinitialiseDeck+0x60>
mov    -0x14(%rbp),%edx
mov    %edx,%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x34,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1127 <reinitialiseDeck+0x27>
jmp    1165 <reinitialiseDeck+0x65>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <reinitialiseDeck+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reinitialiseDeck>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movaps 0xeff(%rip),%xmm0
movups %xmm0,0x10(%rdi)
movaps 0xf04(%rip),%xmm0
movups %xmm0,0x20(%rdi)
movaps 0xf09(%rip),%xmm0
movups %xmm0,0x30(%rdi)
movaps 0xf0e(%rip),%xmm0
movups %xmm0,0x40(%rdi)
movaps 0xf13(%rip),%xmm0
movups %xmm0,0x50(%rdi)
movaps 0xf18(%rip),%xmm0
movups %xmm0,0x60(%rdi)
movaps 0xf1d(%rip),%xmm0
movups %xmm0,0x70(%rdi)
movaps 0xf22(%rip),%xmm0
movups %xmm0,0x80(%rdi)
movaps 0xf24(%rip),%xmm0
movups %xmm0,0x90(%rdi)
movaps 0xf26(%rip),%xmm0
movups %xmm0,0xa0(%rdi)
movaps 0xf28(%rip),%xmm0
movups %xmm0,0xb0(%rdi)
movaps 0xf2a(%rip),%xmm0
movups %xmm0,0xc0(%rdi)
ret

LLVM IR (-O0):
define void @reinitialiseDeck([13 x i32]* %0) {
%2 = alloca [13 x i32]*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store [13 x i32]* %0, [13 x i32]** %2
store i32 1, i32* %5
store i32 0, i32* %3
br label %6
6: ; preds = %27, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 4
br i1 %8, label %9, label %30
9: ; preds = %6
store i32 0, i32* %4
br label %10
10: ; preds = %23, %9
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 13
br i1 %12, label %13, label %26
13: ; preds = %10
%14 = load i32, i32* %5
%15 = add nsw i32 %14, 1
store i32 %15, i32* %5
%16 = load [13 x i32]*, [13 x i32]** %2
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [13 x i32], [13 x i32]* %16, i64 %18
%20 = load i32, i32* %4
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [13 x i32], [13 x i32]* %19, i64 0, i64 %21
store i32 %14, i32* %22
br label %23
23: ; preds = %13
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
br label %10
26: ; preds = %10
br label %27
27: ; preds = %26
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
br label %6
30: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @reinitialiseDeck([13 x i32]* nocapture writeonly %0) {
%2 = bitcast [13 x i32]* %0 to <4 x i32>*
store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, <4 x i32>* %2
%3 = getelementptr inbounds [13 x i32], [13 x i32]* %0, i64 0, i64 4
%4 = bitcast i32* %3 to <4 x i32>*
store <4 x i32> <i32 5, i32 6, i32 7, i32 8>, <4 x i32>* %4
%5 = getelementptr inbounds [13 x i32], [13 x i32]* %0, i64 0, i64 8
%6 = bitcast i32* %5 to <4 x i32>*
store <4 x i32> <i32 9, i32 10, i32 11, i32 12>, <4 x i32>* %6
%7 = getelementptr inbounds [13 x i32], [13 x i32]* %0, i64 0, i64 12
%8 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> <i32 13, i32 14, i32 15, i32 16>, <4 x i32>* %8
%9 = getelementptr inbounds [13 x i32], [13 x i32]* %0, i64 1, i64 3
%10 = bitcast i32* %9 to <4 x i32>*
store <4 x i32> <i32 17, i32 18, i32 19, i32 20>, <4 x i32>* %10
%11 = getelementptr inbounds [13 x i32], [13 x i32]* %0, i64 1, i64 7
%12 = bitcast i32* %11 to <4 x i32>*
store <4 x i32> <i32 21, i32 22, i32 23, i32 24>, <4 x i32>* %12
%13 = getelementptr inbounds [13 x i32], [13 x i32]* %0, i64 1, i64 11
%14 = bitcast i32* %13 to <4 x i32>*
store <4 x i32> <i32 25, i32 26, i32 27, i32 28>, <4 x i32>* %14
%15 = getelementptr inbounds [13 x i32], [13 x i32]* %0, i64 2, i64 2
%16 = bitcast i32* %15 to <4 x i32>*
store <4 x i32> <i32 29, i32 30, i32 31, i32 32>, <4 x i32>* %16
%17 = getelementptr inbounds [13 x i32], [13 x i32]* %0, i64 2, i64 6
%18 = bitcast i32* %17 to <4 x i32>*
store <4 x i32> <i32 33, i32 34, i32 35, i32 36>, <4 x i32>* %18
%19 = getelementptr inbounds [13 x i32], [13 x i32]* %0, i64 2, i64 10
%20 = bitcast i32* %19 to <4 x i32>*
store <4 x i32> <i32 37, i32 38, i32 39, i32 40>, <4 x i32>* %20
%21 = getelementptr inbounds [13 x i32], [13 x i32]* %0, i64 3, i64 1
%22 = bitcast i32* %21 to <4 x i32>*
store <4 x i32> <i32 41, i32 42, i32 43, i32 44>, <4 x i32>* %22
%23 = getelementptr inbounds [13 x i32], [13 x i32]* %0, i64 3, i64 5
%24 = bitcast i32* %23 to <4 x i32>*
store <4 x i32> <i32 45, i32 46, i32 47, i32 48>, <4 x i32>* %24
%25 = getelementptr inbounds [13 x i32], [13 x i32]* %0, i64 3, i64 9
%26 = bitcast i32* %25 to <4 x i32>*
store <4 x i32> <i32 49, i32 50, i32 51, i32 52>, <4 x i32>* %26
ret void
}