#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*/ A_NORMAL;
int /*<<< orphan*/ A_REVERSE;
int /*<<< orphan*/ attrset(int /*<<< orphan*/);
int /*<<< orphan*/ clrtobot();
int /*<<< orphan*/ final_stats();
int /*<<< orphan*/ getch();
int /*<<< orphan*/ move(int, int /*<<< orphan*/);
int /*<<< orphan*/ printw(char *);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ timeout(int);
void retire(void) {
  move(16, 0);
  clrtobot();
  printw("Comprador's Report\n\n");
  attrset(A_REVERSE);
  printw("                         \n");
  printw(" Y o u ' r e    a        \n");
  printw("                         \n");
  printw(" M I L L I O N A I R E ! \n");
  printw("                         \n");
  attrset(A_NORMAL);
  refresh();
  timeout(5000);
  getch();
  timeout(-1);
  final_stats();
}


x86 assembly (clang, -O0):
<retire>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10,%edi
xor    %esi,%esi
call   10a0 <move@plt>
mov    $0x0,%al
call   1030 <clrtobot@plt>
lea    0xe62(%rip),%rdi
call   1060 <printw@plt>
mov    0x2e2e(%rip),%rax
mov    (%rax),%edi
call   1090 <attrset@plt>
lea    0xe5d(%rip),%rdi
call   1060 <printw@plt>
lea    0xe6c(%rip),%rdi
call   1060 <printw@plt>
lea    0xe45(%rip),%rdi
call   1060 <printw@plt>
lea    0xe6f(%rip),%rdi
call   1060 <printw@plt>
lea    0xe2d(%rip),%rdi
call   1060 <printw@plt>
mov    0x2df4(%rip),%rax
mov    (%rax),%edi
call   1090 <attrset@plt>
mov    $0x0,%al
call   1070 <refresh@plt>
mov    $0x1388,%edi
call   1050 <timeout@plt>
mov    $0x0,%al
call   1080 <getch@plt>
mov    $0xffffffff,%edi
call   1050 <timeout@plt>
mov    $0x0,%al
call   1040 <final_stats@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<retire>:
push   %rbx
mov    $0x10,%edi
xor    %esi,%esi
call   10a0 <move@plt>
xor    %eax,%eax
call   1030 <clrtobot@plt>
lea    0xe65(%rip),%rdi
call   1060 <printw@plt>
mov    0x2e31(%rip),%rax
mov    (%rax),%edi
call   1090 <attrset@plt>
lea    0xe60(%rip),%rbx
mov    %rbx,%rdi
call   1060 <printw@plt>
lea    0xe6c(%rip),%rdi
call   1060 <printw@plt>
mov    %rbx,%rdi
call   1060 <printw@plt>
lea    0xe73(%rip),%rdi
call   1060 <printw@plt>
mov    %rbx,%rdi
call   1060 <printw@plt>
mov    0x2dfc(%rip),%rax
mov    (%rax),%edi
call   1090 <attrset@plt>
xor    %eax,%eax
call   1070 <refresh@plt>
mov    $0x1388,%edi
call   1050 <timeout@plt>
xor    %eax,%eax
call   1080 <getch@plt>
mov    $0xffffffff,%edi
call   1050 <timeout@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <final_stats@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Comprador's Report\0A\0A\00"
@A_REVERSE = global i32 0
@.str.1 = [27 x i8] c" \0A\00"
@.str.2 = [27 x i8] c" Y o u ' r e a \0A\00"
@.str.3 = [27 x i8] c" M I L L I O N A I R E ! \0A\00"
@A_NORMAL = global i32 0
define void @retire() {
%1 = call i32 @move(i32 16, i32 0)
%2 = call i32 (...) @clrtobot()
%3 = call i32 @printw(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @A_REVERSE
%5 = call i32 @attrset(i32 %4)
%6 = call i32 @printw(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printw(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @printw(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @printw(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @printw(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32, i32* @A_NORMAL
%12 = call i32 @attrset(i32 %11)
%13 = call i32 (...) @refresh()
%14 = call i32 @timeout(i32 5000)
%15 = call i32 (...) @getch()
%16 = call i32 @timeout(i32 -1)
%17 = call i32 (...) @final_stats()
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Comprador's Report\0A\0A\00"
@A_REVERSE = global i32 0
@.str.1 = [27 x i8] c" \0A\00"
@.str.2 = [27 x i8] c" Y o u ' r e a \0A\00"
@.str.3 = [27 x i8] c" M I L L I O N A I R E ! \0A\00"
@A_NORMAL = global i32 0
define void @retire() {
%1 = tail call i32 @move(i32 16, i32 0)
%2 = tail call i32 (...) @clrtobot()
%3 = tail call i32 @printw(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @A_REVERSE
%5 = tail call i32 @attrset(i32 %4)
%6 = tail call i32 @printw(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @printw(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @printw(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 @printw(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.3, i64 0, i64 0))
%10 = tail call i32 @printw(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32, i32* @A_NORMAL
%12 = tail call i32 @attrset(i32 %11)
%13 = tail call i32 (...) @refresh()
%14 = tail call i32 @timeout(i32 5000)
%15 = tail call i32 (...) @getch()
%16 = tail call i32 @timeout(i32 -1)
%17 = tail call i32 (...) @final_stats()
ret void
}