#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*/ printArrayBoxes(int **);
int main(int argc, char **argv) {
  int lol[3][10];
  for (int i = 0; i < 3; i++) {
    for (int j = 0; j < 10; j++) {
      lol[i][j] = i;
    }
  }
  printArrayBoxes(lol);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x94(%rbp)
cmpl   $0x3,-0x94(%rbp)
jge    11a9 <main+0x99>
movl   $0x0,-0x98(%rbp)
cmpl   $0xa,-0x98(%rbp)
jge    1190 <main+0x80>
mov    -0x94(%rbp),%edx
movslq -0x94(%rbp),%rcx
lea    -0x90(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x98(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x98(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x98(%rbp)
jmp    114a <main+0x3a>
jmp    1195 <main+0x85>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    1133 <main+0x23>
lea    -0x90(%rbp),%rdi
call   1030 <printArrayBoxes@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x78,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movq   $0x0,0x20(%rsp)
movaps 0xed0(%rip),%xmm0
movups %xmm0,0x28(%rsp)
movups %xmm0,0x38(%rsp)
movaps 0xecf(%rip),%xmm0
movups %xmm0,0x48(%rsp)
movaps 0xed3(%rip),%xmm0
movups %xmm0,0x58(%rsp)
movups %xmm0,0x68(%rsp)
mov    %rsp,%rdi
call   1030 <printArrayBoxes@plt>
xor    %eax,%eax
add    $0x78,%rsp
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [3 x [10 x i32]]
%4 = bitcast [3 x [10 x i32]]* %3 to i8*
%5 = getelementptr inbounds [3 x [10 x i32]], [3 x [10 x i32]]* %3, i64 0, i64 1, i64 0
%6 = bitcast [3 x [10 x i32]]* %3 to i8*
%7 = bitcast i32* %5 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32>* %7
%8 = getelementptr inbounds [3 x [10 x i32]], [3 x [10 x i32]]* %3, i64 0, i64 1, i64 4
%9 = bitcast i32* %8 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32>* %9
%10 = getelementptr inbounds [3 x [10 x i32]], [3 x [10 x i32]]* %3, i64 0, i64 1, i64 8
%11 = bitcast i32* %10 to <4 x i32>*
store <4 x i32> <i32 1, i32 1, i32 2, i32 2>, <4 x i32>* %11
%12 = getelementptr inbounds [3 x [10 x i32]], [3 x [10 x i32]]* %3, i64 0, i64 2, i64 2
%13 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %13
%14 = getelementptr inbounds [3 x [10 x i32]], [3 x [10 x i32]]* %3, i64 0, i64 2, i64 6
%15 = bitcast i32* %14 to <4 x i32>*
store <4 x i32> <i32 2, i32 2, i32 2, i32 2>, <4 x i32>* %15
%16 = bitcast [3 x [10 x i32]]* %3 to i32**
%17 = call i32 @printArrayBoxes(i32** %16)
ret i32 0
}