#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 */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ waddch(int /*<<< orphan*/ *, char);
int /*<<< orphan*/ wmove(int /*<<< orphan*/ *, int, int);
void wblank(WINDOW *win, int win_width, int win_height) {
  int x;
  for (x = 0; x < win_width; x++) {
    int y;
    for (y = 0; y < win_height; y++) {
      wmove(win, y, x);
      waddch(win, ' ');
    }
  }
  wmove(win, 0, 0);
}


x86 assembly (clang, -O0):
<wblank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1196 <wblank+0x76>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1183 <wblank+0x63>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1040 <wmove@plt>
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
call   1030 <waddch@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    114c <wblank+0x2c>
jmp    1188 <wblank+0x68>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1139 <wblank+0x19>
mov    -0x8(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <wmove@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wblank>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdi,%rbx
test   %esi,%esi
jle    1174 <wblank+0x54>
mov    %edx,%r15d
mov    %esi,%r14d
xor    %r12d,%r12d
jmp    1149 <wblank+0x29>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r12d
cmp    %r14d,%r12d
je     1174 <wblank+0x54>
test   %r15d,%r15d
jle    1140 <wblank+0x20>
xor    %ebp,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r12d,%edx
call   1040 <wmove@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <waddch@plt>
add    $0x1,%ebp
cmp    %ebp,%r15d
jne    1150 <wblank+0x30>
jmp    1140 <wblank+0x20>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <wmove@plt>

LLVM IR (-O0):
define void @wblank(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %9
9: ; preds = %29, %3
%10 = load i32, i32* %7
%11 = load i32, i32* %5
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %32
13: ; preds = %9
store i32 0, i32* %8
br label %14
14: ; preds = %25, %13
%15 = load i32, i32* %8
%16 = load i32, i32* %6
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %28
18: ; preds = %14
%19 = load i32*, i32** %4
%20 = load i32, i32* %8
%21 = load i32, i32* %7
%22 = call i32 @wmove(i32* %19, i32 %20, i32 %21)
%23 = load i32*, i32** %4
%24 = call i32 @waddch(i32* %23, i8 signext 32)
br label %25
25: ; preds = %18
%26 = load i32, i32* %8
%27 = add nsw i32 %26, 1
store i32 %27, i32* %8
br label %14
28: ; preds = %14
br label %29
29: ; preds = %28
%30 = load i32, i32* %7
%31 = add nsw i32 %30, 1
store i32 %31, i32* %7
br label %9
32: ; preds = %9
%33 = load i32*, i32** %4
%34 = call i32 @wmove(i32* %33, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @wblank(i32* %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = icmp sgt i32 %2, 0
br label %7
7: ; preds = %5, %15
%8 = phi i32 [ 0, %5 ], [ %16, %15 ]
br i1 %6, label %9, label %15
9: ; preds = %7, %9
%10 = phi i32 [ %13, %9 ], [ 0, %7 ]
%11 = tail call i32 @wmove(i32* %0, i32 %10, i32 %8)
%12 = tail call i32 @waddch(i32* %0, i8 signext 32)
%13 = add nuw nsw i32 %10, 1
%14 = icmp eq i32 %13, %2
br i1 %14, label %15, label %9
15: ; preds = %9, %7
%16 = add nuw nsw i32 %8, 1
%17 = icmp eq i32 %16, %1
br i1 %17, label %18, label %7
18: ; preds = %15, %3
%19 = tail call i32 @wmove(i32* %0, i32 0, i32 0)
ret void
}