#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*/ printMaze(int, int **);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
void getMaze(int size, int maze[size][size]) {
  int i, j;
  for (i = 0; i < size; ++i) {
    printf("Enter the row #%d :: ", i + 1);
    for (j = 0; j < size; ++j)
      scanf("%d", &maze[i][j]);
  }
  printf("The maze is :: \n");
  printMaze(size, maze);
}


x86 assembly (clang, -O0):
<getMaze>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11cf <getMaze+0x9f>
mov    -0x14(%rbp),%esi
add    $0x1,%esi
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11bc <getMaze+0x8c>
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rax
imul   %rcx,%rax
shl    $0x2,%rax
add    %rax,%rsi
movslq -0x18(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe6d(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1174 <getMaze+0x44>
jmp    11c1 <getMaze+0x91>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114d <getMaze+0x1d>
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <printMaze@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getMaze>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rsi,0x8(%rsp)
mov    %edi,0x4(%rsp)
test   %edi,%edi
jle    11bf <getMaze+0x7f>
mov    0x4(%rsp),%r15d
lea    0x0(,%r15,4),%rax
mov    %rax,0x10(%rsp)
lea    0xea2(%rip),%rbp
mov    0x8(%rsp),%r12
xor    %r13d,%r13d
nopl   0x0(%rax)
add    $0x1,%r13
lea    0xe75(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%r14
mov    %r12,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
add    $0x4,%rbx
add    $0xffffffffffffffff,%r14
jne    11a0 <getMaze+0x60>
add    0x10(%rsp),%r12
cmp    %r15,%r13
jne    1180 <getMaze+0x40>
lea    0xe53(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%edi
mov    0x8(%rsp),%rsi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <printMaze@plt>

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

LLVM IR (-O2):
@.str = [22 x i8] c"Enter the row #%d :: \00"
@.str.1 = [3 x i8] c"%d\00"
@str = [16 x i8] c"The maze is :: \00"
define void @getMaze(i32 %0, i32* %1) {
%3 = zext i32 %0 to i64
%4 = icmp sgt i32 %0, 0
br i1 %4, label %7, label %20
5: ; preds = %14
%6 = icmp eq i64 %9, %3
br i1 %6, label %20, label %7
7: ; preds = %2, %5
%8 = phi i64 [ %9, %5 ], [ 0, %2 ]
%9 = add nuw nsw i64 %8, 1
%10 = trunc i64 %9 to i32
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = mul nuw nsw i64 %8, %3
%13 = getelementptr inbounds i32, i32* %1, i64 %12
br label %14
14: ; preds = %7, %14
%15 = phi i64 [ 0, %7 ], [ %18, %14 ]
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %16)
%18 = add nuw nsw i64 %15, 1
%19 = icmp eq i64 %18, %3
br i1 %19, label %5, label %14
20: ; preds = %5, %2
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%22 = bitcast i32* %1 to i32**
%23 = tail call i32 @printMaze(i32 %0, i32** %22)
ret void
}