#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*/ clear();
int /*<<< orphan*/ getch();
int /*<<< orphan*/ printRealIntxy(int, int, int);
void mapDebugRenderFill(int fillData[80][20]) {
  int x, y;
  clear();
  for (x = 0; x < 80; x++) {
    for (y = 0; y < 20; y++) {
      printRealIntxy(x, y, fillData[x][y]);
    }
  }
  getch();
}


x86 assembly (clang, -O0):
<mapDebugRenderFill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <clear@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x50,-0xc(%rbp)
jge    11a7 <mapDebugRenderFill+0x77>
movl   $0x0,-0x10(%rbp)
cmpl   $0x14,-0x10(%rbp)
jge    1194 <mapDebugRenderFill+0x64>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
call   1030 <printRealIntxy@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    115b <mapDebugRenderFill+0x2b>
jmp    1199 <mapDebugRenderFill+0x69>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114a <mapDebugRenderFill+0x1a>
mov    $0x0,%al
call   1040 <getch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapDebugRenderFill>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <clear@plt>
add    $0x4c,%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    -0x4c(%r14),%edx
mov    %ebx,%edi
xor    %esi,%esi
call   1030 <printRealIntxy@plt>
mov    -0x48(%r14),%edx
mov    %ebx,%edi
mov    $0x1,%esi
call   1030 <printRealIntxy@plt>
mov    -0x44(%r14),%edx
mov    %ebx,%edi
mov    $0x2,%esi
call   1030 <printRealIntxy@plt>
mov    -0x40(%r14),%edx
mov    %ebx,%edi
mov    $0x3,%esi
call   1030 <printRealIntxy@plt>
mov    -0x3c(%r14),%edx
mov    %ebx,%edi
mov    $0x4,%esi
call   1030 <printRealIntxy@plt>
mov    -0x38(%r14),%edx
mov    %ebx,%edi
mov    $0x5,%esi
call   1030 <printRealIntxy@plt>
mov    -0x34(%r14),%edx
mov    %ebx,%edi
mov    $0x6,%esi
call   1030 <printRealIntxy@plt>
mov    -0x30(%r14),%edx
mov    %ebx,%edi
mov    $0x7,%esi
call   1030 <printRealIntxy@plt>
mov    -0x2c(%r14),%edx
mov    %ebx,%edi
mov    $0x8,%esi
call   1030 <printRealIntxy@plt>
mov    -0x28(%r14),%edx
mov    %ebx,%edi
mov    $0x9,%esi
call   1030 <printRealIntxy@plt>
mov    -0x24(%r14),%edx
mov    %ebx,%edi
mov    $0xa,%esi
call   1030 <printRealIntxy@plt>
mov    -0x20(%r14),%edx
mov    %ebx,%edi
mov    $0xb,%esi
call   1030 <printRealIntxy@plt>
mov    -0x1c(%r14),%edx
mov    %ebx,%edi
mov    $0xc,%esi
call   1030 <printRealIntxy@plt>
mov    -0x18(%r14),%edx
mov    %ebx,%edi
mov    $0xd,%esi
call   1030 <printRealIntxy@plt>
mov    -0x14(%r14),%edx
mov    %ebx,%edi
mov    $0xe,%esi
call   1030 <printRealIntxy@plt>
mov    -0x10(%r14),%edx
mov    %ebx,%edi
mov    $0xf,%esi
call   1030 <printRealIntxy@plt>
mov    -0xc(%r14),%edx
mov    %ebx,%edi
mov    $0x10,%esi
call   1030 <printRealIntxy@plt>
mov    -0x8(%r14),%edx
mov    %ebx,%edi
mov    $0x11,%esi
call   1030 <printRealIntxy@plt>
mov    -0x4(%r14),%edx
mov    %ebx,%edi
mov    $0x12,%esi
call   1030 <printRealIntxy@plt>
mov    (%r14),%edx
mov    %ebx,%edi
mov    $0x13,%esi
call   1030 <printRealIntxy@plt>
add    $0x1,%rbx
add    $0x50,%r14
cmp    $0x50,%rbx
jne    1150 <mapDebugRenderFill+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <getch@plt>

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

LLVM IR (-O2):
define void @mapDebugRenderFill([20 x i32]* nocapture %0) {
%2 = tail call i32 (...) @clear()
br label %3
3: ; preds = %1, %3
%4 = phi i64 [ 0, %1 ], [ %66, %3 ]
%5 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 0
%6 = load i32, i32* %5
%7 = trunc i64 %4 to i32
%8 = tail call i32 @printRealIntxy(i32 %7, i32 0, i32 %6)
%9 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 1
%10 = load i32, i32* %9
%11 = tail call i32 @printRealIntxy(i32 %7, i32 1, i32 %10)
%12 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 2
%13 = load i32, i32* %12
%14 = tail call i32 @printRealIntxy(i32 %7, i32 2, i32 %13)
%15 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 3
%16 = load i32, i32* %15
%17 = tail call i32 @printRealIntxy(i32 %7, i32 3, i32 %16)
%18 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 4
%19 = load i32, i32* %18
%20 = tail call i32 @printRealIntxy(i32 %7, i32 4, i32 %19)
%21 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 5
%22 = load i32, i32* %21
%23 = tail call i32 @printRealIntxy(i32 %7, i32 5, i32 %22)
%24 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 6
%25 = load i32, i32* %24
%26 = tail call i32 @printRealIntxy(i32 %7, i32 6, i32 %25)
%27 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 7
%28 = load i32, i32* %27
%29 = tail call i32 @printRealIntxy(i32 %7, i32 7, i32 %28)
%30 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 8
%31 = load i32, i32* %30
%32 = tail call i32 @printRealIntxy(i32 %7, i32 8, i32 %31)
%33 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 9
%34 = load i32, i32* %33
%35 = tail call i32 @printRealIntxy(i32 %7, i32 9, i32 %34)
%36 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 10
%37 = load i32, i32* %36
%38 = tail call i32 @printRealIntxy(i32 %7, i32 10, i32 %37)
%39 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 11
%40 = load i32, i32* %39
%41 = tail call i32 @printRealIntxy(i32 %7, i32 11, i32 %40)
%42 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 12
%43 = load i32, i32* %42
%44 = tail call i32 @printRealIntxy(i32 %7, i32 12, i32 %43)
%45 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 13
%46 = load i32, i32* %45
%47 = tail call i32 @printRealIntxy(i32 %7, i32 13, i32 %46)
%48 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 14
%49 = load i32, i32* %48
%50 = tail call i32 @printRealIntxy(i32 %7, i32 14, i32 %49)
%51 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 15
%52 = load i32, i32* %51
%53 = tail call i32 @printRealIntxy(i32 %7, i32 15, i32 %52)
%54 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 16
%55 = load i32, i32* %54
%56 = tail call i32 @printRealIntxy(i32 %7, i32 16, i32 %55)
%57 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 17
%58 = load i32, i32* %57
%59 = tail call i32 @printRealIntxy(i32 %7, i32 17, i32 %58)
%60 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 18
%61 = load i32, i32* %60
%62 = tail call i32 @printRealIntxy(i32 %7, i32 18, i32 %61)
%63 = getelementptr inbounds [20 x i32], [20 x i32]* %0, i64 %4, i64 19
%64 = load i32, i32* %63
%65 = tail call i32 @printRealIntxy(i32 %7, i32 19, i32 %64)
%66 = add nuw nsw i64 %4, 1
%67 = icmp eq i64 %66, 80
br i1 %67, label %68, label %3
68: ; preds = %3
%69 = tail call i32 (...) @getch()
ret void
}