#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*/ assemble_maze(int **, int **, int **);
int /*<<< orphan*/ initialize_h_walls(int **);
int /*<<< orphan*/ initialize_maze(int **);
int /*<<< orphan*/ initialize_v_walls(int **);
int /*<<< orphan*/ print_maze(int **);
int /*<<< orphan*/ print_walls(int **, int **);
int main() {
  int maze[25][25];
  int v_walls[25][25 - 1];
  int h_walls[25 - 1][25];
  initialize_maze(maze);
  initialize_v_walls(v_walls);
  initialize_h_walls(h_walls);
  print_maze(maze);
  assemble_maze(maze, v_walls, h_walls);
  print_walls(h_walls, v_walls);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c90,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x9d0(%rbp),%rdi
call   1060 <initialize_maze@plt>
lea    -0x1330(%rbp),%rdi
call   1040 <initialize_v_walls@plt>
lea    -0x1c90(%rbp),%rdi
call   1050 <initialize_h_walls@plt>
lea    -0x9d0(%rbp),%rdi
call   1080 <print_maze@plt>
lea    -0x9d0(%rbp),%rdi
lea    -0x1330(%rbp),%rsi
lea    -0x1c90(%rbp),%rdx
call   1030 <assemble_maze@plt>
lea    -0x1c90(%rbp),%rdi
lea    -0x1330(%rbp),%rsi
call   1070 <print_walls@plt>
xor    %eax,%eax
add    $0x1c90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x1c90,%rsp
lea    0x12c0(%rsp),%r15
mov    %r15,%rdi
call   1060 <initialize_maze@plt>
lea    0x960(%rsp),%r14
mov    %r14,%rdi
call   1040 <initialize_v_walls@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <initialize_h_walls@plt>
mov    %r15,%rdi
call   1080 <print_maze@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1030 <assemble_maze@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <print_walls@plt>
xor    %eax,%eax
add    $0x1c90,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [25 x [25 x i32]]
%3 = alloca [25 x [24 x i32]]
%4 = alloca [24 x [25 x i32]]
store i32 0, i32* %1
%5 = getelementptr inbounds [25 x [25 x i32]], [25 x [25 x i32]]* %2, i64 0, i64 0
%6 = bitcast [25 x i32]* %5 to i32**
%7 = call i32 @initialize_maze(i32** %6)
%8 = getelementptr inbounds [25 x [24 x i32]], [25 x [24 x i32]]* %3, i64 0, i64 0
%9 = bitcast [24 x i32]* %8 to i32**
%10 = call i32 @initialize_v_walls(i32** %9)
%11 = getelementptr inbounds [24 x [25 x i32]], [24 x [25 x i32]]* %4, i64 0, i64 0
%12 = bitcast [25 x i32]* %11 to i32**
%13 = call i32 @initialize_h_walls(i32** %12)
%14 = getelementptr inbounds [25 x [25 x i32]], [25 x [25 x i32]]* %2, i64 0, i64 0
%15 = bitcast [25 x i32]* %14 to i32**
%16 = call i32 @print_maze(i32** %15)
%17 = getelementptr inbounds [25 x [25 x i32]], [25 x [25 x i32]]* %2, i64 0, i64 0
%18 = bitcast [25 x i32]* %17 to i32**
%19 = getelementptr inbounds [25 x [24 x i32]], [25 x [24 x i32]]* %3, i64 0, i64 0
%20 = bitcast [24 x i32]* %19 to i32**
%21 = getelementptr inbounds [24 x [25 x i32]], [24 x [25 x i32]]* %4, i64 0, i64 0
%22 = bitcast [25 x i32]* %21 to i32**
%23 = call i32 @assemble_maze(i32** %18, i32** %20, i32** %22)
%24 = getelementptr inbounds [24 x [25 x i32]], [24 x [25 x i32]]* %4, i64 0, i64 0
%25 = bitcast [25 x i32]* %24 to i32**
%26 = getelementptr inbounds [25 x [24 x i32]], [25 x [24 x i32]]* %3, i64 0, i64 0
%27 = bitcast [24 x i32]* %26 to i32**
%28 = call i32 @print_walls(i32** %25, i32** %27)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [25 x [25 x i32]]
%2 = alloca [25 x [24 x i32]]
%3 = alloca [24 x [25 x i32]]
%4 = bitcast [25 x [25 x i32]]* %1 to i8*
%5 = bitcast [25 x [24 x i32]]* %2 to i8*
%6 = bitcast [24 x [25 x i32]]* %3 to i8*
%7 = bitcast [25 x [25 x i32]]* %1 to i32**
%8 = call i32 @initialize_maze(i32** %7)
%9 = bitcast [25 x [24 x i32]]* %2 to i32**
%10 = call i32 @initialize_v_walls(i32** %9)
%11 = bitcast [24 x [25 x i32]]* %3 to i32**
%12 = call i32 @initialize_h_walls(i32** %11)
%13 = call i32 @print_maze(i32** %7)
%14 = call i32 @assemble_maze(i32** %7, i32** %9, i32** %11)
%15 = call i32 @print_walls(i32** %11, i32** %9)
ret i32 0
}