#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 */
scalar_t__ COLS;
scalar_t__ LINES;
int /*<<< orphan*/ clrtoeol();
int /*<<< orphan*/ move(scalar_t__, scalar_t__);
int /*<<< orphan*/ printw(char *);
int /*<<< orphan*/ refresh();
scalar_t__ strlen(char *);
void status_right(char *message) {
  move(LINES - 3, COLS - strlen(message) - 6);
  clrtoeol();
  move(LINES - 3, COLS - strlen(message) - 1);
  printw(message);
  clrtoeol();
  refresh();
}


x86 assembly (clang, -O0):
<status_right>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e85(%rip),%rax
mov    (%rax),%rax
sub    $0x3,%rax
mov    %rax,-0x20(%rbp)
mov    0x2e6b(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdi
sub    %rax,%rsi
sub    $0x6,%rsi
call   1070 <move@plt>
mov    $0x0,%al
call   1060 <clrtoeol@plt>
mov    0x2e41(%rip),%rax
mov    (%rax),%rax
sub    $0x3,%rax
mov    %rax,-0x10(%rbp)
mov    0x2e27(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdi
sub    %rax,%rsi
sub    $0x1,%rsi
call   1070 <move@plt>
mov    -0x8(%rbp),%rdi
call   1040 <printw@plt>
mov    $0x0,%al
call   1060 <clrtoeol@plt>
mov    $0x0,%al
call   1050 <refresh@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<status_right>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rdi,%r14
mov    0x2e85(%rip),%r12
mov    (%r12),%r15
add    $0xfffffffffffffffd,%r15
mov    0x2e6e(%rip),%r13
mov    0x0(%r13),%rbx
call   1030 <strlen@plt>
sub    %rax,%rbx
add    $0xfffffffffffffffa,%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1070 <move@plt>
xor    %eax,%eax
call   1060 <clrtoeol@plt>
mov    (%r12),%r15
add    $0xfffffffffffffffd,%r15
mov    0x0(%r13),%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
not    %rax
add    %rax,%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1070 <move@plt>
mov    %r14,%rdi
call   1040 <printw@plt>
xor    %eax,%eax
call   1060 <clrtoeol@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1050 <refresh@plt>

LLVM IR (-O0):
@LINES = global i64 0
@COLS = global i64 0
define void @status_right(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i64, i64* @LINES
%4 = sub nsw i64 %3, 3
%5 = load i64, i64* @COLS
%6 = load i8*, i8** %2
%7 = call i64 @strlen(i8* %6)
%8 = sub nsw i64 %5, %7
%9 = sub nsw i64 %8, 6
%10 = call i32 @move(i64 %4, i64 %9)
%11 = call i32 (...) @clrtoeol()
%12 = load i64, i64* @LINES
%13 = sub nsw i64 %12, 3
%14 = load i64, i64* @COLS
%15 = load i8*, i8** %2
%16 = call i64 @strlen(i8* %15)
%17 = sub nsw i64 %14, %16
%18 = sub nsw i64 %17, 1
%19 = call i32 @move(i64 %13, i64 %18)
%20 = load i8*, i8** %2
%21 = call i32 @printw(i8* %20)
%22 = call i32 (...) @clrtoeol()
%23 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@LINES = global i64 0
@COLS = global i64 0
define void @status_right(i8* %0) {
%2 = load i64, i64* @LINES
%3 = add nsw i64 %2, -3
%4 = load i64, i64* @COLS
%5 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%6 = add i64 %4, -6
%7 = sub i64 %6, %5
%8 = tail call i32 @move(i64 %3, i64 %7)
%9 = tail call i32 (...) @clrtoeol()
%10 = load i64, i64* @LINES
%11 = add nsw i64 %10, -3
%12 = load i64, i64* @COLS
%13 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%14 = xor i64 %13, -1
%15 = add i64 %12, %14
%16 = tail call i32 @move(i64 %11, i64 %15)
%17 = tail call i32 @printw(i8* %0)
%18 = tail call i32 (...) @clrtoeol()
%19 = tail call i32 (...) @refresh()
ret void
}