#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 *);
void print_walls(int h_walls[25 - 1][25], int v_walls[25][25 - 1]) {
  int i, j;
  for (i = 0; i < 25; i++) {
    for (j = 0; j < 25; j++) {
      if (h_walls[i][j] == 1) {
        printf("_");
      } else {
        printf(" ");
      }
      if (v_walls[i][j] == 1) {
        printf("|");
      } else {
        printf(" ");
      }
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<print_walls>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x19,-0x14(%rbp)
jge    11e3 <print_walls+0xd3>
movl   $0x0,-0x18(%rbp)
cmpl   $0x19,-0x18(%rbp)
jge    11c9 <print_walls+0xb9>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x64,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1170 <print_walls+0x60>
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
jmp    117c <print_walls+0x6c>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x60,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    11aa <print_walls+0x9a>
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
jmp    11b6 <print_walls+0xa6>
lea    0xe51(%rip),%rdi
call   1030 <printf@plt>
jmp    11bb <print_walls+0xab>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1138 <print_walls+0x28>
lea    0xe36(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <print_walls+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_walls>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
xor    %r15d,%r15d
jmp    114c <print_walls+0x3c>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r15
add    $0x60,%r14
add    $0x64,%r12
cmp    $0x19,%r15
je     1188 <print_walls+0x78>
xor    %ebx,%ebx
jmp    115f <print_walls+0x4f>
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    $0x19,%rbx
je     1130 <print_walls+0x20>
cmpl   $0x1,(%r12,%rbx,4)
mov    $0x5f,%edi
je     1170 <print_walls+0x60>
mov    $0x20,%edi
call   1030 <putchar@plt>
cmpl   $0x1,(%r14,%rbx,4)
mov    $0x7c,%edi
je     1150 <print_walls+0x40>
mov    $0x20,%edi
jmp    1150 <print_walls+0x40>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"_\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [2 x i8] c"|\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @print_walls([25 x i32]* %0, [24 x i32]* %1) {
%3 = alloca [25 x i32]*
%4 = alloca [24 x i32]*
%5 = alloca i32
%6 = alloca i32
store [25 x i32]* %0, [25 x i32]** %3
store [24 x i32]* %1, [24 x i32]** %4
store i32 0, i32* %5
br label %7
7: ; preds = %48, %2
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 25
br i1 %9, label %10, label %51
10: ; preds = %7
store i32 0, i32* %6
br label %11
11: ; preds = %43, %10
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 25
br i1 %13, label %14, label %46
14: ; preds = %11
%15 = load [25 x i32]*, [25 x i32]** %3
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [25 x i32], [25 x i32]* %15, i64 %17
%19 = load i32, i32* %6
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [25 x i32], [25 x i32]* %18, i64 0, i64 %20
%22 = load i32, i32* %21
%23 = icmp eq i32 %22, 1
br i1 %23, label %24, label %26
24: ; preds = %14
%25 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %28
26: ; preds = %14
%27 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %28
28: ; preds = %26, %24
%29 = load [24 x i32]*, [24 x i32]** %4
%30 = load i32, i32* %5
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [24 x i32], [24 x i32]* %29, i64 %31
%33 = load i32, i32* %6
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds [24 x i32], [24 x i32]* %32, i64 0, i64 %34
%36 = load i32, i32* %35
%37 = icmp eq i32 %36, 1
br i1 %37, label %38, label %40
38: ; preds = %28
%39 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %42
40: ; preds = %28
%41 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %42
42: ; preds = %40, %38
br label %43
43: ; preds = %42
%44 = load i32, i32* %6
%45 = add nsw i32 %44, 1
store i32 %45, i32* %6
br label %11
46: ; preds = %11
%47 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %48
48: ; preds = %46
%49 = load i32, i32* %5
%50 = add nsw i32 %49, 1
store i32 %50, i32* %5
br label %7
51: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @print_walls([25 x i32]* nocapture %0, [24 x i32]* nocapture %1) {
br label %3
3: ; preds = %2, %19
%4 = phi i64 [ 0, %2 ], [ %21, %19 ]
br label %5
5: ; preds = %3, %5
%6 = phi i64 [ 0, %3 ], [ %17, %5 ]
%7 = getelementptr inbounds [25 x i32], [25 x i32]* %0, i64 %4, i64 %6
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, 1
%10 = select i1 %9, i32 95, i32 32
%11 = tail call i32 @putchar(i32 %10)
%12 = getelementptr inbounds [24 x i32], [24 x i32]* %1, i64 %4, i64 %6
%13 = load i32, i32* %12
%14 = icmp eq i32 %13, 1
%15 = select i1 %14, i32 124, i32 32
%16 = tail call i32 @putchar(i32 %15)
%17 = add nuw nsw i64 %6, 1
%18 = icmp eq i64 %17, 25
br i1 %18, label %19, label %5
19: ; preds = %5
%20 = tail call i32 @putchar(i32 10)
%21 = add nuw nsw i64 %4, 1
%22 = icmp eq i64 %21, 25
br i1 %22, label %23, label %3
23: ; preds = %19
ret void
}