#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 main() {
  int matrix[10][10] = {0};
  matrix[2][3] = 1;
  for (int row = 0; row < 10; row++) {
    for (int col = 0; col < 10; col++) {
      printf("%i ", matrix[row][col]);
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x190,%edx
call   1040 <memset@plt>
movl   $0x1,-0x144(%rbp)
movl   $0x0,-0x1a4(%rbp)
cmpl   $0xa,-0x1a4(%rbp)
jge    11e0 <main+0xc0>
movl   $0x0,-0x1a8(%rbp)
cmpl   $0xa,-0x1a8(%rbp)
jge    11be <main+0x9e>
movslq -0x1a4(%rbp),%rcx
lea    -0x1a0(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x1a8(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1a8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a8(%rbp)
jmp    1170 <main+0x50>
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1a4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1a4(%rbp)
jmp    1159 <main+0x39>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x198,%rsp
mov    %rsp,%rdi
mov    $0x190,%edx
xor    %esi,%esi
call   1050 <memset@plt>
movl   $0x1,0x5c(%rsp)
mov    $0x24,%ebx
lea    0xea3(%rip),%r14
nopl   (%rax)
mov    -0x24(%rsp,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x20(%rsp,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x1c(%rsp,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x18(%rsp,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x14(%rsp,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x10(%rsp,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0xc(%rsp,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x8(%rsp,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    -0x4(%rsp,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rsp,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x28,%rbx
cmp    $0x1b4,%rbx
jne    1160 <main+0x30>
xor    %eax,%eax
add    $0x198,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i \00"
define i32 @main() {
%1 = alloca [10 x [10 x i32]]
%2 = bitcast [10 x [10 x i32]]* %1 to i8*
%3 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %1, i64 0, i64 2, i64 3
store i32 1, i32* %3
br label %4
4: ; preds = %0, %4
%5 = phi i64 [ 0, %0 ], [ %37, %4 ]
%6 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %1, i64 0, i64 %5, i64 0
%7 = load i32, i32* %6
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %1, i64 0, i64 %5, i64 1
%10 = load i32, i32* %9
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %1, i64 0, i64 %5, i64 2
%13 = load i32, i32* %12
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %1, i64 0, i64 %5, i64 3
%16 = load i32, i32* %15
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %1, i64 0, i64 %5, i64 4
%19 = load i32, i32* %18
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %19)
%21 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %1, i64 0, i64 %5, i64 5
%22 = load i32, i32* %21
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %22)
%24 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %1, i64 0, i64 %5, i64 6
%25 = load i32, i32* %24
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %25)
%27 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %1, i64 0, i64 %5, i64 7
%28 = load i32, i32* %27
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %28)
%30 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %1, i64 0, i64 %5, i64 8
%31 = load i32, i32* %30
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %31)
%33 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %1, i64 0, i64 %5, i64 9
%34 = load i32, i32* %33
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %34)
%36 = tail call i32 @putchar(i32 10)
%37 = add nuw nsw i64 %5, 1
%38 = icmp eq i64 %37, 10
br i1 %38, label %39, label %4
39: ; preds = %4
ret i32 0
}