#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;
scalar_t__ LINES;
int /*<<< orphan*/ clrtoeol();
int /*<<< orphan*/ move(scalar_t__, int /*<<< orphan*/);
int /*<<< orphan*/ mvprintw(scalar_t__, int, char *, char *);
int /*<<< orphan*/ refresh();
int strlen(char *);
void nc_message(char *cpMess) {
  move(LINES - 1, 0);
  clrtoeol();
  mvprintw(LINES - 1, ((COLS - strlen(cpMess)) / 2), "%s", cpMess);
  refresh();
}


x86 assembly (clang, -O0):
<nc_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e85(%rip),%rax
mov    (%rax),%rdi
sub    $0x1,%rdi
xor    %esi,%esi
call   1070 <move@plt>
mov    $0x0,%al
call   1050 <clrtoeol@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%rax
sub    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    0x2e4f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    -0x8(%rbp),%rcx
lea    0xe41(%rip),%rdx
call   1060 <mvprintw@plt>
mov    $0x0,%al
call   1040 <refresh@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nc_message>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
mov    0x2e8a(%rip),%rbx
mov    (%rbx),%rdi
add    $0xffffffffffffffff,%rdi
xor    %esi,%esi
call   1070 <move@plt>
xor    %eax,%eax
call   1050 <clrtoeol@plt>
mov    (%rbx),%rbx
add    $0xffffffffffffffff,%rbx
mov    0x2e5f(%rip),%rax
mov    (%rax),%ebp
mov    %r14,%rdi
call   1030 <strlen@plt>
sub    %eax,%ebp
mov    %ebp,%esi
shr    $0x1f,%esi
add    %ebp,%esi
sar    %esi
lea    0xe63(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rcx
call   1060 <mvprintw@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <refresh@plt>

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

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