#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*/ mvprintw(int, int, char *);
int /*<<< orphan*/ printw(char *);
void io_printblankline(int x, int y, int width) {
  int i;
  mvprintw(y, x, "#");
  for (i = 0; i < width - 1; i++)
    printw(" ");
  printw("#");
}


x86 assembly (clang, -O0):
<io_printblankline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
lea    0xec2(%rip),%rdx
call   1040 <mvprintw@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1175 <io_printblankline+0x55>
lea    0xea0(%rip),%rdi
call   1030 <printw@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    114a <io_printblankline+0x2a>
lea    0xe84(%rip),%rdi
call   1030 <printw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_printblankline>:
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %edi,%eax
lea    0xed1(%rip),%rdx
mov    %esi,%edi
mov    %eax,%esi
call   1040 <mvprintw@plt>
cmp    $0x2,%ebx
jl     115d <io_printblankline+0x3d>
add    $0xffffffff,%ebx
lea    0xebb(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printw@plt>
add    $0xffffffff,%ebx
jne    1150 <io_printblankline+0x30>
lea    0xe9c(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printw@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"#\00"
@.str.1 = [2 x i8] c" \00"
define void @io_printblankline(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = call i32 @mvprintw(i32 %8, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %7
br label %11
11: ; preds = %18, %3
%12 = load i32, i32* %7
%13 = load i32, i32* %6
%14 = sub nsw i32 %13, 1
%15 = icmp slt i32 %12, %14
br i1 %15, label %16, label %21
16: ; preds = %11
%17 = call i32 @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %18
18: ; preds = %16
%19 = load i32, i32* %7
%20 = add nsw i32 %19, 1
store i32 %20, i32* %7
br label %11
21: ; preds = %11
%22 = call i32 @printw(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

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