#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*/ curs_move(long, int /*<<< orphan*/);
int /*<<< orphan*/ curs_printw(char *, int /*<<< orphan*/, char *);
int /*<<< orphan*/ curs_refresh();
int /*<<< orphan*/ get_map_col();
long get_map_row();
void wipe_map(void) {
  long i;
  for (i = 0; i < get_map_row(); i++) {
    curs_move(i, 0);
    curs_printw("%*s", get_map_col(), " ");
  }
  curs_refresh();
}


x86 assembly (clang, -O0):
<wipe_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <get_map_row@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
jge    11b7 <wipe_map+0x67>
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <curs_move@plt>
mov    $0x0,%al
call   1040 <get_map_col@plt>
mov    %eax,%esi
lea    0xe66(%rip),%rdi
lea    0xe63(%rip),%rdx
call   1070 <curs_printw@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1160 <wipe_map+0x10>
mov    $0x0,%al
call   1060 <curs_refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wipe_map>:
push   %r15
push   %r14
push   %rbx
xor    %eax,%eax
call   1050 <get_map_row@plt>
test   %rax,%rax
jle    11ae <wipe_map+0x5e>
lea    0xe98(%rip),%r14
lea    0xe95(%rip),%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <curs_move@plt>
xor    %eax,%eax
call   1040 <get_map_col@plt>
mov    %r14,%rdi
mov    %eax,%esi
mov    %r15,%rdx
call   1070 <curs_printw@plt>
add    $0x1,%rbx
xor    %eax,%eax
call   1050 <get_map_row@plt>
cmp    %rax,%rbx
jl     1180 <wipe_map+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1060 <curs_refresh@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%*s\00"
@.str.1 = [2 x i8] c" \00"
define void @wipe_map() {
%1 = alloca i64
store i64 0, i64* %1
br label %2
2: ; preds = %11, %0
%3 = load i64, i64* %1
%4 = call i64 (...) @get_map_row()
%5 = icmp slt i64 %3, %4
br i1 %5, label %6, label %14
6: ; preds = %2
%7 = load i64, i64* %1
%8 = call i32 @curs_move(i64 %7, i32 0)
%9 = call i32 (...) @get_map_col()
%10 = call i32 @curs_printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %6
%12 = load i64, i64* %1
%13 = add nsw i64 %12, 1
store i64 %13, i64* %1
br label %2
14: ; preds = %2
%15 = call i32 (...) @curs_refresh()
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%*s\00"
@.str.1 = [2 x i8] c" \00"
define void @wipe_map() {
%1 = tail call i64 (...) @get_map_row()
%2 = icmp sgt i64 %1, 0
br i1 %2, label %3, label %11
3: ; preds = %0, %3
%4 = phi i64 [ %8, %3 ], [ 0, %0 ]
%5 = tail call i32 @curs_move(i64 %4, i32 0)
%6 = tail call i32 (...) @get_map_col()
%7 = tail call i32 @curs_printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = add nuw nsw i64 %4, 1
%9 = tail call i64 (...) @get_map_row()
%10 = icmp slt i64 %8, %9
br i1 %10, label %3, label %11
11: ; preds = %3, %0
%12 = tail call i32 (...) @curs_refresh()
ret void
}