#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 A_BOLD;
int A_REVERSE;
int /*<<< orphan*/ attroff(int);
int /*<<< orphan*/ attron(int);
int /*<<< orphan*/ move(int, int);
int /*<<< orphan*/ printw(char *, ...);
int /*<<< orphan*/ refresh();
void print_status(int score) {
  move(23, 0);
  attron(A_REVERSE | A_BOLD);
  printw("\r%80s", " ");
  printw("\r%70d", score);
  printw("\r%60s", "YOUR SCORE: ");
  printw("\r%s", "-- THE 2048 GAME --");
  move(23, 79);
  attroff(A_REVERSE | A_BOLD);
  refresh();
}


x86 assembly (clang, -O0):
<print_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x17,%edi
xor    %esi,%esi
call   1070 <move@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
mov    0x2e61(%rip),%rax
or     (%rax),%edi
call   1040 <attron@plt>
lea    0xe7b(%rip),%rdi
lea    0xe91(%rip),%rsi
mov    $0x0,%al
call   1050 <printw@plt>
mov    -0x4(%rbp),%esi
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1050 <printw@plt>
lea    0xe61(%rip),%rdi
lea    0xe60(%rip),%rsi
mov    $0x0,%al
call   1050 <printw@plt>
lea    0xe5f(%rip),%rdi
lea    0xe5c(%rip),%rsi
mov    $0x0,%al
call   1050 <printw@plt>
mov    $0x17,%edi
mov    $0x4f,%esi
call   1070 <move@plt>
mov    0x2dfc(%rip),%rax
mov    (%rax),%edi
mov    0x2deb(%rip),%rax
or     (%rax),%edi
call   1030 <attroff@plt>
mov    $0x0,%al
call   1060 <refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_status>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%ebx
mov    $0x17,%edi
xor    %esi,%esi
call   1070 <move@plt>
mov    0x2e76(%rip),%r14
mov    0x2e67(%rip),%r15
mov    (%r15),%edi
or     (%r14),%edi
call   1040 <attron@plt>
lea    0xe7d(%rip),%rdi
lea    0xe93(%rip),%rsi
xor    %eax,%eax
call   1050 <printw@plt>
lea    0xe6e(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printw@plt>
lea    0xe64(%rip),%rdi
lea    0xe63(%rip),%rsi
xor    %eax,%eax
call   1050 <printw@plt>
lea    0xe62(%rip),%rdi
lea    0xe5f(%rip),%rsi
xor    %eax,%eax
call   1050 <printw@plt>
mov    $0x17,%edi
mov    $0x4f,%esi
call   1070 <move@plt>
mov    (%r15),%edi
or     (%r14),%edi
call   1030 <attroff@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1060 <refresh@plt>

LLVM IR (-O0):
@A_REVERSE = global i32 0
@A_BOLD = global i32 0
@.str = [6 x i8] c"\0D%80s\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [6 x i8] c"\0D%70d\00"
@.str.3 = [6 x i8] c"\0D%60s\00"
@.str.4 = [13 x i8] c"YOUR SCORE: \00"
@.str.5 = [4 x i8] c"\0D%s\00"
@.str.6 = [20 x i8] c"-- THE 2048 GAME --\00"
define void @print_status(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @move(i32 23, i32 0)
%4 = load i32, i32* @A_REVERSE
%5 = load i32, i32* @A_BOLD
%6 = or i32 %4, %5
%7 = call i32 @attron(i32 %6)
%8 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* %2
%10 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%11 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%13 = call i32 @move(i32 23, i32 79)
%14 = load i32, i32* @A_REVERSE
%15 = load i32, i32* @A_BOLD
%16 = or i32 %14, %15
%17 = call i32 @attroff(i32 %16)
%18 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@A_REVERSE = global i32 0
@A_BOLD = global i32 0
@.str = [6 x i8] c"\0D%80s\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [6 x i8] c"\0D%70d\00"
@.str.3 = [6 x i8] c"\0D%60s\00"
@.str.4 = [13 x i8] c"YOUR SCORE: \00"
@.str.5 = [4 x i8] c"\0D%s\00"
@.str.6 = [20 x i8] c"-- THE 2048 GAME --\00"
define void @print_status(i32 %0) {
%2 = tail call i32 @move(i32 23, i32 0)
%3 = load i32, i32* @A_REVERSE
%4 = load i32, i32* @A_BOLD
%5 = or i32 %4, %3
%6 = tail call i32 @attron(i32 %5)
%7 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %0)
%9 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%11 = tail call i32 @move(i32 23, i32 79)
%12 = load i32, i32* @A_REVERSE
%13 = load i32, i32* @A_BOLD
%14 = or i32 %13, %12
%15 = tail call i32 @attroff(i32 %14)
%16 = tail call i32 (...) @refresh()
ret void
}