#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*/ putchar(char);
void maze_print(char maze[41][81]) {
  int cur_line = 0, cur_char = 0;
  while (cur_line < 41) {
    cur_char = 0;
    while (cur_char < 81) {
      putchar(maze[cur_line][cur_char]);
      cur_char++;
    }
    putchar('\n');
    cur_line++;
  }
}


x86 assembly (clang, -O0):
<maze_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x29,-0xc(%rbp)
jge    1187 <maze_print+0x77>
movl   $0x0,-0x10(%rbp)
cmpl   $0x51,-0x10(%rbp)
jge    116f <maze_print+0x5f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x51,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113b <maze_print+0x2b>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <maze_print+0x1a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<maze_print>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
xor    %r14d,%r14d
nopl   0x0(%rax,%rax,1)
mov    $0xffffffffffffffaf,%rbx
nopw   0x0(%rax,%rax,1)
movsbl 0x51(%r15,%rbx,1),%edi
call   1030 <putchar@plt>
inc    %rbx
jne    1130 <maze_print+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r14
add    $0x51,%r15
cmp    $0x29,%r14
jne    1120 <maze_print+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @maze_print([81 x i8]* %0) {
%2 = alloca [81 x i8]*
%3 = alloca i32
%4 = alloca i32
store [81 x i8]* %0, [81 x i8]** %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %24, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 41
br i1 %7, label %8, label %28
8: ; preds = %5
store i32 0, i32* %4
br label %9
9: ; preds = %12, %8
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 81
br i1 %11, label %12, label %24
12: ; preds = %9
%13 = load [81 x i8]*, [81 x i8]** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [81 x i8], [81 x i8]* %13, i64 %15
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [81 x i8], [81 x i8]* %16, i64 0, i64 %18
%20 = load i8, i8* %19
%21 = call i32 @putchar(i8 signext %20)
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %9
24: ; preds = %9
%25 = call i32 @putchar(i8 signext 10)
%26 = load i32, i32* %3
%27 = add nsw i32 %26, 1
store i32 %27, i32* %3
br label %5
28: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @maze_print([81 x i8]* nocapture %0) {
br label %2
2: ; preds = %1, %11
%3 = phi i64 [ 0, %1 ], [ %13, %11 ]
br label %4
4: ; preds = %2, %4
%5 = phi i64 [ 0, %2 ], [ %9, %4 ]
%6 = getelementptr inbounds [81 x i8], [81 x i8]* %0, i64 %3, i64 %5
%7 = load i8, i8* %6
%8 = tail call i32 @putchar(i8 signext %7)
%9 = add nuw nsw i64 %5, 1
%10 = icmp eq i64 %9, 81
br i1 %10, label %11, label %4
11: ; preds = %4
%12 = tail call i32 @putchar(i8 signext 10)
%13 = add nuw nsw i64 %3, 1
%14 = icmp eq i64 %13, 41
br i1 %14, label %15, label %2
15: ; preds = %11
ret void
}