#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*/ COLOR_PAIR(int);
int /*<<< orphan*/ attroff(int /*<<< orphan*/);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
int /*<<< orphan*/ clear();
int /*<<< orphan*/ mvprintw(int, int, char *);
void clear_view(void) {
  int i;
  int j;
  clear();
  attron(COLOR_PAIR((6)));
  for (i = 0; i < (24); i++)
    for (j = 0; j < (80); j++)
      mvprintw(i, j, " ");
  attroff(COLOR_PAIR((6)));
}


x86 assembly (clang, -O0):
<clear_view>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <clear@plt>
mov    $0x6,%edi
call   1050 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x18,-0x4(%rbp)
jge    11c5 <clear_view+0x75>
movl   $0x0,-0x8(%rbp)
cmpl   $0x50,-0x8(%rbp)
jge    11b2 <clear_view+0x62>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    0xe61(%rip),%rdx
call   1070 <mvprintw@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1188 <clear_view+0x38>
jmp    11b7 <clear_view+0x67>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1177 <clear_view+0x27>
mov    $0x6,%edi
call   1050 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_view>:
push   %rbp
push   %r14
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <clear@plt>
mov    $0x6,%edi
call   1050 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1040 <attron@plt>
lea    0xe8b(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14,%rdx
call   1070 <mvprintw@plt>
add    $0x1,%ebp
cmp    $0x50,%ebp
jne    1190 <clear_view+0x40>
add    $0x1,%ebx
cmp    $0x18,%ebx
jne    1180 <clear_view+0x30>
mov    $0x6,%edi
call   1050 <COLOR_PAIR@plt>
mov    %eax,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <attroff@plt>

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

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