#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printStringOnBoardXY(char const *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void printMatrixOnBoardXY(char const **matrix, int x, int y) {
  char const **mp;
  for (mp = matrix; *mp != NULL; mp++) {
    printStringOnBoardXY(*mp, x, y++);
  }
  fflush(stdout);
}


x86 assembly (clang, -O0):
<printMatrixOnBoardXY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     1173 <printMatrixOnBoardXY+0x53>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    %edx,%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
call   1040 <printStringOnBoardXY@plt>
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
jmp    113a <printMatrixOnBoardXY+0x1a>
mov    0x2e66(%rip),%rax
mov    (%rax),%edi
call   1030 <fflush@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printMatrixOnBoardXY>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1159 <printMatrixOnBoardXY+0x39>
mov    %esi,%r14d
add    $0x8,%rbx
cs nopw 0x0(%rax,%rax,1)
lea    0x1(%rdx),%ebp
mov    %r14d,%esi
call   1040 <printStringOnBoardXY@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
mov    %ebp,%edx
test   %rdi,%rdi
jne    1140 <printMatrixOnBoardXY+0x20>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fflush@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @printMatrixOnBoardXY(i8** %0, i32 %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8**
store i8** %0, i8*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i8**, i8*** %4
store i8** %8, i8*** %7
br label %9
9: ; preds = %20, %3
%10 = load i8**, i8*** %7
%11 = load i8*, i8** %10
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %23
13: ; preds = %9
%14 = load i8**, i8*** %7
%15 = load i8*, i8** %14
%16 = load i32, i32* %5
%17 = load i32, i32* %6
%18 = add nsw i32 %17, 1
store i32 %18, i32* %6
%19 = call i32 @printStringOnBoardXY(i8* %15, i32 %16, i32 %17)
br label %20
20: ; preds = %13
%21 = load i8**, i8*** %7
%22 = getelementptr inbounds i8*, i8** %21, i32 1
store i8** %22, i8*** %7
br label %9
23: ; preds = %9
%24 = load i32, i32* @stdout
%25 = call i32 @fflush(i32 %24)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @printMatrixOnBoardXY(i8** nocapture %0, i32 %1, i32 %2) {
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %15, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %13, %6 ], [ %4, %3 ]
%8 = phi i8** [ %12, %6 ], [ %0, %3 ]
%9 = phi i32 [ %10, %6 ], [ %2, %3 ]
%10 = add nsw i32 %9, 1
%11 = tail call i32 @printStringOnBoardXY(i8* %7, i32 %1, i32 %9)
%12 = getelementptr inbounds i8*, i8** %8, i64 1
%13 = load i8*, i8** %12
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %6
15: ; preds = %6, %3
%16 = load i32, i32* @stdout
%17 = tail call i32 @fflush(i32 %16)
ret void
}