#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*/ ACS_HLINE;
int /*<<< orphan*/ ACS_LLCORNER;
int /*<<< orphan*/ ACS_LRCORNER;
int /*<<< orphan*/ ACS_ULCORNER;
int /*<<< orphan*/ ACS_URCORNER;
int /*<<< orphan*/ ACS_VLINE;
int /*<<< orphan*/ COLOR_PAIR(int);
int /*<<< orphan*/ attroff(int /*<<< orphan*/);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
int /*<<< orphan*/ get_board_score(int);
int /*<<< orphan*/ mvaddch(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ mvprintw(int, int, char *, ...);
int /*<<< orphan*/ refresh();
void print_hud() {
  for (size_t i = 1; i <= 30; ++i) {
    mvaddch((3 + 1), ((8 + 2) * 4 + 2) + i, ACS_HLINE);
    mvaddch((3 + 1) + 10, ((8 + 2) * 4 + 2) + i, ACS_HLINE);
  }
  for (size_t i = 1; i <= 10; ++i) {
    mvaddch((3 + 1) + i, ((8 + 2) * 4 + 2), ACS_VLINE);
    mvaddch((3 + 1) + i, ((8 + 2) * 4 + 2) + 30, ACS_VLINE);
  }
  mvaddch((3 + 1), ((8 + 2) * 4 + 2), ACS_ULCORNER);
  mvaddch((3 + 1), ((8 + 2) * 4 + 2) + 30, ACS_URCORNER);
  mvaddch((3 + 1) + 10, ((8 + 2) * 4 + 2), ACS_LLCORNER);
  mvaddch((3 + 1) + 10, ((8 + 2) * 4 + 2) + 30, ACS_LRCORNER);
  attron(COLOR_PAIR(5));
  mvprintw((3 + 1) + 1, ((8 + 2) * 4 + 2) + 1, "            SCORE            ");
  attroff(COLOR_PAIR(5));
  mvprintw((3 + 1) + 3, ((8 + 2) * 4 + 2) + 8, "Player   :%3d",
           get_board_score(1));
  mvprintw((3 + 1) + 4, ((8 + 2) * 4 + 2) + 8, "Computer :%3d",
           get_board_score(2));
  refresh();
  attron(COLOR_PAIR(5));
  mvprintw((3 + 1) + 6, ((8 + 2) * 4 + 2) + 1, "           MESSAGES          ");
  attroff(COLOR_PAIR(5));
}


x86 assembly (clang, -O0):
<print_hud>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x1,-0x8(%rbp)
cmpq   $0x1e,-0x8(%rbp)
ja     11d6 <print_hud+0x66>
mov    -0x8(%rbp),%rax
add    $0x2a,%rax
mov    %eax,%esi
mov    0x2e2c(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%edi
call   1080 <mvaddch@plt>
mov    -0x8(%rbp),%rax
add    $0x2a,%rax
mov    %eax,%esi
mov    0x2e0f(%rip),%rax
mov    (%rax),%edx
mov    $0xe,%edi
call   1080 <mvaddch@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1180 <print_hud+0x10>
movq   $0x1,-0x10(%rbp)
cmpq   $0xa,-0x10(%rbp)
ja     1234 <print_hud+0xc4>
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %eax,%edi
mov    0x2dc6(%rip),%rax
mov    (%rax),%edx
mov    $0x2a,%esi
call   1080 <mvaddch@plt>
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %eax,%edi
mov    0x2da9(%rip),%rax
mov    (%rax),%edx
mov    $0x48,%esi
call   1080 <mvaddch@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    11de <print_hud+0x6e>
mov    0x2dad(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%edi
mov    $0x2a,%esi
call   1080 <mvaddch@plt>
mov    0x2d7d(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%edi
mov    $0x48,%esi
call   1080 <mvaddch@plt>
mov    0x2d45(%rip),%rax
mov    (%rax),%edx
mov    $0xe,%edi
mov    $0x2a,%esi
call   1080 <mvaddch@plt>
mov    0x2d5d(%rip),%rax
mov    (%rax),%edx
mov    $0xe,%edi
mov    $0x48,%esi
call   1080 <mvaddch@plt>
mov    $0x5,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1050 <attron@plt>
mov    $0x5,%edi
mov    $0x2b,%esi
lea    0xd4a(%rip),%rdx
mov    $0x0,%al
call   1090 <mvprintw@plt>
mov    $0x5,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    $0x1,%edi
call   1040 <get_board_score@plt>
mov    %eax,%ecx
mov    $0x7,%edi
mov    $0x32,%esi
lea    0xd33(%rip),%rdx
mov    $0x0,%al
call   1090 <mvprintw@plt>
mov    $0x2,%edi
call   1040 <get_board_score@plt>
mov    %eax,%ecx
mov    $0x8,%edi
mov    $0x32,%esi
lea    0xd1d(%rip),%rdx
mov    $0x0,%al
call   1090 <mvprintw@plt>
mov    $0x0,%al
call   1070 <refresh@plt>
mov    $0x5,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1050 <attron@plt>
mov    $0xa,%edi
mov    $0x2b,%esi
lea    0xcfb(%rip),%rdx
mov    $0x0,%al
call   1090 <mvprintw@plt>
mov    $0x5,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hud>:
push   %rbp
push   %r14
push   %rbx
mov    $0xffffffffffffffe2,%rbx
mov    0x2e46(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x49(%rbx),%ebp
mov    (%r14),%edx
mov    $0x4,%edi
mov    %ebp,%esi
call   1080 <mvaddch@plt>
mov    (%r14),%edx
mov    $0xe,%edi
mov    %ebp,%esi
call   1080 <mvaddch@plt>
inc    %rbx
jne    1190 <print_hud+0x20>
mov    0x2e03(%rip),%rbx
mov    (%rbx),%edx
mov    $0x5,%edi
mov    $0x2a,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0x5,%edi
mov    $0x48,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0x6,%edi
mov    $0x2a,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0x6,%edi
mov    $0x48,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0x7,%edi
mov    $0x2a,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0x7,%edi
mov    $0x48,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0x8,%edi
mov    $0x2a,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0x8,%edi
mov    $0x48,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0x9,%edi
mov    $0x2a,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0x9,%edi
mov    $0x48,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0xa,%edi
mov    $0x2a,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0xa,%edi
mov    $0x48,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0xb,%edi
mov    $0x2a,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0xb,%edi
mov    $0x48,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0xc,%edi
mov    $0x2a,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0xc,%edi
mov    $0x48,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0xd,%edi
mov    $0x2a,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0xd,%edi
mov    $0x48,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0xe,%edi
mov    $0x2a,%esi
call   1080 <mvaddch@plt>
mov    (%rbx),%edx
mov    $0xe,%edi
mov    $0x48,%esi
call   1080 <mvaddch@plt>
mov    0x2cd0(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%edi
mov    $0x2a,%esi
call   1080 <mvaddch@plt>
mov    0x2ca0(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%edi
mov    $0x48,%esi
call   1080 <mvaddch@plt>
mov    0x2c68(%rip),%rax
mov    (%rax),%edx
mov    $0xe,%edi
mov    $0x2a,%esi
call   1080 <mvaddch@plt>
mov    0x2c80(%rip),%rax
mov    (%rax),%edx
mov    $0xe,%edi
mov    $0x48,%esi
call   1080 <mvaddch@plt>
mov    $0x5,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1050 <attron@plt>
lea    0xc77(%rip),%rdx
mov    $0x5,%edi
mov    $0x2b,%esi
xor    %eax,%eax
call   1090 <mvprintw@plt>
mov    $0x5,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1030 <attroff@plt>
mov    $0x1,%edi
call   1040 <get_board_score@plt>
lea    0xc62(%rip),%rdx
mov    $0x7,%edi
mov    $0x32,%esi
mov    %eax,%ecx
xor    %eax,%eax
call   1090 <mvprintw@plt>
mov    $0x2,%edi
call   1040 <get_board_score@plt>
lea    0xc4c(%rip),%rdx
mov    $0x8,%edi
mov    $0x32,%esi
mov    %eax,%ecx
xor    %eax,%eax
call   1090 <mvprintw@plt>
xor    %eax,%eax
call   1070 <refresh@plt>
mov    $0x5,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
call   1050 <attron@plt>
lea    0xc28(%rip),%rdx
mov    $0xa,%edi
mov    $0x2b,%esi
xor    %eax,%eax
call   1090 <mvprintw@plt>
mov    $0x5,%edi
call   1060 <COLOR_PAIR@plt>
mov    %eax,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <attroff@plt>

LLVM IR (-O0):
@ACS_HLINE = global i32 0
@ACS_VLINE = global i32 0
@ACS_ULCORNER = global i32 0
@ACS_URCORNER = global i32 0
@ACS_LLCORNER = global i32 0
@ACS_LRCORNER = global i32 0
@.str = [30 x i8] c" SCORE \00"
@.str.1 = [14 x i8] c"Player :%3d\00"
@.str.2 = [14 x i8] c"Computer :%3d\00"
@.str.3 = [30 x i8] c" MESSAGES \00"
define void @print_hud() {
%1 = alloca i64
%2 = alloca i64
store i64 1, i64* %1
br label %3
3: ; preds = %17, %0
%4 = load i64, i64* %1
%5 = icmp ule i64 %4, 30
br i1 %5, label %6, label %20
6: ; preds = %3
%7 = load i64, i64* %1
%8 = add i64 42, %7
%9 = trunc i64 %8 to i32
%10 = load i32, i32* @ACS_HLINE
%11 = call i32 @mvaddch(i32 4, i32 %9, i32 %10)
%12 = load i64, i64* %1
%13 = add i64 42, %12
%14 = trunc i64 %13 to i32
%15 = load i32, i32* @ACS_HLINE
%16 = call i32 @mvaddch(i32 14, i32 %14, i32 %15)
br label %17
17: ; preds = %6
%18 = load i64, i64* %1
%19 = add i64 %18, 1
store i64 %19, i64* %1
br label %3
20: ; preds = %3
store i64 1, i64* %2
br label %21
21: ; preds = %35, %20
%22 = load i64, i64* %2
%23 = icmp ule i64 %22, 10
br i1 %23, label %24, label %38
24: ; preds = %21
%25 = load i64, i64* %2
%26 = add i64 4, %25
%27 = trunc i64 %26 to i32
%28 = load i32, i32* @ACS_VLINE
%29 = call i32 @mvaddch(i32 %27, i32 42, i32 %28)
%30 = load i64, i64* %2
%31 = add i64 4, %30
%32 = trunc i64 %31 to i32
%33 = load i32, i32* @ACS_VLINE
%34 = call i32 @mvaddch(i32 %32, i32 72, i32 %33)
br label %35
35: ; preds = %24
%36 = load i64, i64* %2
%37 = add i64 %36, 1
store i64 %37, i64* %2
br label %21
38: ; preds = %21
%39 = load i32, i32* @ACS_ULCORNER
%40 = call i32 @mvaddch(i32 4, i32 42, i32 %39)
%41 = load i32, i32* @ACS_URCORNER
%42 = call i32 @mvaddch(i32 4, i32 72, i32 %41)
%43 = load i32, i32* @ACS_LLCORNER
%44 = call i32 @mvaddch(i32 14, i32 42, i32 %43)
%45 = load i32, i32* @ACS_LRCORNER
%46 = call i32 @mvaddch(i32 14, i32 72, i32 %45)
%47 = call i32 @COLOR_PAIR(i32 5)
%48 = call i32 @attron(i32 %47)
%49 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 5, i32 43, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%50 = call i32 @COLOR_PAIR(i32 5)
%51 = call i32 @attroff(i32 %50)
%52 = call i32 @get_board_score(i32 1)
%53 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 7, i32 50, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %52)
%54 = call i32 @get_board_score(i32 2)
%55 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 8, i32 50, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %54)
%56 = call i32 (...) @refresh()
%57 = call i32 @COLOR_PAIR(i32 5)
%58 = call i32 @attron(i32 %57)
%59 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 10, i32 43, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%60 = call i32 @COLOR_PAIR(i32 5)
%61 = call i32 @attroff(i32 %60)
ret void
}

LLVM IR (-O2):
@ACS_HLINE = global i32 0
@ACS_VLINE = global i32 0
@ACS_ULCORNER = global i32 0
@ACS_URCORNER = global i32 0
@ACS_LLCORNER = global i32 0
@ACS_LRCORNER = global i32 0
@.str = [30 x i8] c" SCORE \00"
@.str.1 = [14 x i8] c"Player :%3d\00"
@.str.2 = [14 x i8] c"Computer :%3d\00"
@.str.3 = [30 x i8] c" MESSAGES \00"
define void @print_hud() {
br label %1
1: ; preds = %0, %1
%2 = phi i64 [ 1, %0 ], [ %9, %1 ]
%3 = trunc i64 %2 to i32
%4 = add nuw nsw i32 %3, 42
%5 = load i32, i32* @ACS_HLINE
%6 = tail call i32 @mvaddch(i32 4, i32 %4, i32 %5)
%7 = load i32, i32* @ACS_HLINE
%8 = tail call i32 @mvaddch(i32 14, i32 %4, i32 %7)
%9 = add nuw nsw i64 %2, 1
%10 = icmp eq i64 %9, 31
br i1 %10, label %11, label %1
11: ; preds = %1
%12 = load i32, i32* @ACS_VLINE
%13 = tail call i32 @mvaddch(i32 5, i32 42, i32 %12)
%14 = load i32, i32* @ACS_VLINE
%15 = tail call i32 @mvaddch(i32 5, i32 72, i32 %14)
%16 = load i32, i32* @ACS_VLINE
%17 = tail call i32 @mvaddch(i32 6, i32 42, i32 %16)
%18 = load i32, i32* @ACS_VLINE
%19 = tail call i32 @mvaddch(i32 6, i32 72, i32 %18)
%20 = load i32, i32* @ACS_VLINE
%21 = tail call i32 @mvaddch(i32 7, i32 42, i32 %20)
%22 = load i32, i32* @ACS_VLINE
%23 = tail call i32 @mvaddch(i32 7, i32 72, i32 %22)
%24 = load i32, i32* @ACS_VLINE
%25 = tail call i32 @mvaddch(i32 8, i32 42, i32 %24)
%26 = load i32, i32* @ACS_VLINE
%27 = tail call i32 @mvaddch(i32 8, i32 72, i32 %26)
%28 = load i32, i32* @ACS_VLINE
%29 = tail call i32 @mvaddch(i32 9, i32 42, i32 %28)
%30 = load i32, i32* @ACS_VLINE
%31 = tail call i32 @mvaddch(i32 9, i32 72, i32 %30)
%32 = load i32, i32* @ACS_VLINE
%33 = tail call i32 @mvaddch(i32 10, i32 42, i32 %32)
%34 = load i32, i32* @ACS_VLINE
%35 = tail call i32 @mvaddch(i32 10, i32 72, i32 %34)
%36 = load i32, i32* @ACS_VLINE
%37 = tail call i32 @mvaddch(i32 11, i32 42, i32 %36)
%38 = load i32, i32* @ACS_VLINE
%39 = tail call i32 @mvaddch(i32 11, i32 72, i32 %38)
%40 = load i32, i32* @ACS_VLINE
%41 = tail call i32 @mvaddch(i32 12, i32 42, i32 %40)
%42 = load i32, i32* @ACS_VLINE
%43 = tail call i32 @mvaddch(i32 12, i32 72, i32 %42)
%44 = load i32, i32* @ACS_VLINE
%45 = tail call i32 @mvaddch(i32 13, i32 42, i32 %44)
%46 = load i32, i32* @ACS_VLINE
%47 = tail call i32 @mvaddch(i32 13, i32 72, i32 %46)
%48 = load i32, i32* @ACS_VLINE
%49 = tail call i32 @mvaddch(i32 14, i32 42, i32 %48)
%50 = load i32, i32* @ACS_VLINE
%51 = tail call i32 @mvaddch(i32 14, i32 72, i32 %50)
%52 = load i32, i32* @ACS_ULCORNER
%53 = tail call i32 @mvaddch(i32 4, i32 42, i32 %52)
%54 = load i32, i32* @ACS_URCORNER
%55 = tail call i32 @mvaddch(i32 4, i32 72, i32 %54)
%56 = load i32, i32* @ACS_LLCORNER
%57 = tail call i32 @mvaddch(i32 14, i32 42, i32 %56)
%58 = load i32, i32* @ACS_LRCORNER
%59 = tail call i32 @mvaddch(i32 14, i32 72, i32 %58)
%60 = tail call i32 @COLOR_PAIR(i32 5)
%61 = tail call i32 @attron(i32 %60)
%62 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 5, i32 43, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%63 = tail call i32 @COLOR_PAIR(i32 5)
%64 = tail call i32 @attroff(i32 %63)
%65 = tail call i32 @get_board_score(i32 1)
%66 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 7, i32 50, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %65)
%67 = tail call i32 @get_board_score(i32 2)
%68 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 8, i32 50, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 %67)
%69 = tail call i32 (...) @refresh()
%70 = tail call i32 @COLOR_PAIR(i32 5)
%71 = tail call i32 @attron(i32 %70)
%72 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 10, i32 43, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%73 = tail call i32 @COLOR_PAIR(i32 5)
%74 = tail call i32 @attroff(i32 %73)
ret void
}