#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*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  int a[n][n];
  for (int a_i = 0; a_i < n; a_i++) {
    for (int a_j = 0; a_j < n; a_j++) {
      scanf("%d", &a[a_i][a_j]);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
mov    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    %rsp,%rdx
mov    %rdx,-0x10(%rbp)
mov    %rcx,%rdx
imul   %rdx,%rdx
lea    0xf(,%rdx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x30(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x18(%rbp)
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11df <main+0xcf>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11cc <main+0xbc>
mov    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%rcx
movslq -0x24(%rbp),%rax
imul   %rcx,%rax
shl    $0x2,%rax
add    %rax,%rsi
movslq -0x28(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe47(%rip),%rdi
call   1030 <scanf@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1184 <main+0x74>
jmp    11d1 <main+0xc1>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1171 <main+0x61>
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xed8(%rip),%rdi
lea    -0x2c(%rbp),%rsi
call   1030 <scanf@plt>
mov    %rsp,-0x40(%rbp)
mov    -0x2c(%rbp),%eax
mov    %rax,-0x38(%rbp)
imul   %rax,%rax
mov    %rsp,%r13
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
mov    -0x2c(%rbp),%eax
test   %eax,%eax
jle    11ae <main+0x9e>
shlq   $0x2,-0x38(%rbp)
xor    %r15d,%r15d
lea    0xe95(%rip),%r14
jmp    1180 <main+0x70>
nopl   (%rax)
movslq %eax,%rcx
add    $0x1,%r15
add    -0x38(%rbp),%r13
cmp    %rcx,%r15
jge    11ae <main+0x9e>
test   %eax,%eax
jle    1170 <main+0x60>
mov    %r13,%rbx
xor    %r12d,%r12d
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
add    $0x1,%r12
movslq -0x2c(%rbp),%rax
add    $0x4,%rbx
cmp    %rax,%r12
jl     1190 <main+0x80>
jmp    1170 <main+0x60>
mov    -0x40(%rbp),%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = call i8* @llvm.stacksave()
store i8* %13, i8** %3
%14 = mul nuw i64 %10, %12
%15 = alloca i32, i64 %14
store i64 %10, i64* %4
store i64 %12, i64* %5
store i32 0, i32* %6
br label %16
16: ; preds = %38, %0
%17 = load i32, i32* %6
%18 = load i32, i32* %2
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %41
20: ; preds = %16
store i32 0, i32* %7
br label %21
21: ; preds = %34, %20
%22 = load i32, i32* %7
%23 = load i32, i32* %2
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %37
25: ; preds = %21
%26 = load i32, i32* %6
%27 = sext i32 %26 to i64
%28 = mul nsw i64 %27, %12
%29 = getelementptr inbounds i32, i32* %15, i64 %28
%30 = load i32, i32* %7
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i32, i32* %29, i64 %31
%33 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %32)
br label %34
34: ; preds = %25
%35 = load i32, i32* %7
%36 = add nsw i32 %35, 1
store i32 %36, i32* %7
br label %21
37: ; preds = %21
br label %38
38: ; preds = %37
%39 = load i32, i32* %6
%40 = add nsw i32 %39, 1
store i32 %40, i32* %6
br label %16
41: ; preds = %16
store i32 0, i32* %1
%42 = load i8*, i8** %3
%43 = load i32, i32* %1
ret i32 %43
}

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