#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*/ printf(char *, int);
int main() {
  int i, j;
  int a[100][100];
  for (i = 0; i < 100; ++i) {
    for (j = 0; j < 100; ++j) {
      printf("%d ", a[i][j]);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9c50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    118d <main+0x7d>
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    117a <main+0x6a>
movslq -0x8(%rbp),%rcx
lea    -0x9c50(%rbp),%rax
imul   $0x190,%rcx,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <main+0x2a>
jmp    117f <main+0x6f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
mov    -0x4(%rbp),%eax
add    $0x9c50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x9c48,%rsp
mov    %rsp,%r12
xor    %r15d,%r15d
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r12,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0x64,%rbx
jne    1140 <main+0x30>
add    $0x1,%r15
add    $0x190,%r12
cmp    $0x64,%r15
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x9c48,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca [100 x [100 x i32]]
%2 = bitcast [100 x [100 x i32]]* %1 to i8*
br label %3
3: ; preds = %0, %12
%4 = phi i64 [ 0, %0 ], [ %13, %12 ]
br label %5
5: ; preds = %3, %5
%6 = phi i64 [ 0, %3 ], [ %10, %5 ]
%7 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %1, i64 0, i64 %4, i64 %6
%8 = load i32, i32* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = add nuw nsw i64 %6, 1
%11 = icmp eq i64 %10, 100
br i1 %11, label %12, label %5
12: ; preds = %5
%13 = add nuw nsw i64 %4, 1
%14 = icmp eq i64 %13, 100
br i1 %14, label %15, label %3
15: ; preds = %12
ret i32 0
}