#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 COLS;
int LINES;
int /*<<< orphan*/ clear();
int /*<<< orphan*/ move(int, int);
int /*<<< orphan*/ printw(char *, char *);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ sleep(int);
void printMessage(char *message, int time) {
  clear();
  move(LINES / 3, COLS / 3);
  printw("%s", message);
  refresh();
  sleep(time);
  clear();
  refresh();
}


x86 assembly (clang, -O0):
<printMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1050 <clear@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    0x2e60(%rip),%rax
mov    (%rax),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
call   1070 <move@plt>
mov    -0x8(%rbp),%rsi
lea    0xe64(%rip),%rdi
call   1030 <printw@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
mov    -0xc(%rbp),%edi
call   1060 <sleep@plt>
mov    $0x0,%al
call   1050 <clear@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printMessage>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <clear@plt>
mov    0x2e82(%rip),%rax
movslq (%rax),%rax
imul   $0x55555556,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
shr    $0x20,%rdi
add    %eax,%edi
mov    0x2e5c(%rip),%rax
movslq (%rax),%rax
imul   $0x55555556,%rax,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
shr    $0x20,%rsi
add    %eax,%esi
call   1070 <move@plt>
lea    0xe59(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printw@plt>
xor    %eax,%eax
call   1040 <refresh@plt>
mov    %ebp,%edi
call   1060 <sleep@plt>
xor    %eax,%eax
call   1050 <clear@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <refresh@plt>

LLVM IR (-O0):
@LINES = global i32 0
@COLS = global i32 0
@.str = [3 x i8] c"%s\00"
define void @printMessage(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 (...) @clear()
%6 = load i32, i32* @LINES
%7 = sdiv i32 %6, 3
%8 = load i32, i32* @COLS
%9 = sdiv i32 %8, 3
%10 = call i32 @move(i32 %7, i32 %9)
%11 = load i8*, i8** %3
%12 = call i32 @printw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = call i32 (...) @refresh()
%14 = load i32, i32* %4
%15 = call i32 @sleep(i32 %14)
%16 = call i32 (...) @clear()
%17 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@LINES = global i32 0
@COLS = global i32 0
@.str = [3 x i8] c"%s\00"
define void @printMessage(i8* %0, i32 %1) {
%3 = tail call i32 (...) @clear()
%4 = load i32, i32* @LINES
%5 = sdiv i32 %4, 3
%6 = load i32, i32* @COLS
%7 = sdiv i32 %6, 3
%8 = tail call i32 @move(i32 %5, i32 %7)
%9 = tail call i32 @printw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%10 = tail call i32 (...) @refresh()
%11 = tail call i32 @sleep(i32 %1)
%12 = tail call i32 (...) @clear()
%13 = tail call i32 (...) @refresh()
ret void
}