#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_NORMAL;
int COLOR_PAIR(int);
int /*<<< orphan*/ attroff(int);
int /*<<< orphan*/ attron(int);
int /*<<< orphan*/ getmaxyx(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ move(int, int);
int /*<<< orphan*/ printw(char *, int);
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ stdscr;
void iWar_Update_Right(int type, int value) {
  int right_row = 0;
  int row, col;
  getmaxyx(stdscr, row, col);
  if (type == 11)
    right_row = 1;
  if (type == 10)
    right_row = 2;
  if (type == 12)
    right_row = 3;
  if (type == 13)
    right_row = 4;
  if (type == 14)
    right_row = 5;
  if (type == 15)
    right_row = 6;
  if (type == 99)
    right_row = 7;
  attron(COLOR_PAIR(1) | A_NORMAL);
  move(right_row, col - 8);
  printw("%d ", value);
  attroff(COLOR_PAIR(1) | A_NORMAL);
  refresh();
}


x86 assembly (clang, -O0):
<iWar_Update_Right>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    0x2e54(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1050 <getmaxyx@plt>
cmpl   $0xb,-0x4(%rbp)
jne    11aa <iWar_Update_Right+0x3a>
movl   $0x1,-0xc(%rbp)
cmpl   $0xa,-0x4(%rbp)
jne    11bb <iWar_Update_Right+0x4b>
movl   $0x2,-0xc(%rbp)
cmpl   $0xc,-0x4(%rbp)
jne    11cc <iWar_Update_Right+0x5c>
movl   $0x3,-0xc(%rbp)
cmpl   $0xd,-0x4(%rbp)
jne    11dd <iWar_Update_Right+0x6d>
movl   $0x4,-0xc(%rbp)
cmpl   $0xe,-0x4(%rbp)
jne    11ee <iWar_Update_Right+0x7e>
movl   $0x5,-0xc(%rbp)
cmpl   $0xf,-0x4(%rbp)
jne    11ff <iWar_Update_Right+0x8f>
movl   $0x6,-0xc(%rbp)
cmpl   $0x63,-0x4(%rbp)
jne    1210 <iWar_Update_Right+0xa0>
movl   $0x7,-0xc(%rbp)
mov    $0x1,%edi
call   1070 <COLOR_PAIR@plt>
mov    %eax,%edi
mov    0x2dc5(%rip),%rax
or     (%rax),%edi
call   1040 <attron@plt>
mov    -0xc(%rbp),%edi
mov    -0x14(%rbp),%esi
sub    $0x8,%esi
call   1090 <move@plt>
mov    -0x8(%rbp),%esi
lea    0xdbe(%rip),%rdi
call   1060 <printw@plt>
mov    $0x1,%edi
call   1070 <COLOR_PAIR@plt>
mov    %eax,%edi
mov    0x2d8e(%rip),%rax
or     (%rax),%edi
call   1030 <attroff@plt>
mov    $0x0,%al
call   1080 <refresh@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iWar_Update_Right>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
mov    0x2e60(%rip),%rax
mov    (%rax),%edi
call   1050 <getmaxyx@plt>
xor    %eax,%eax
cmp    $0xb,%ebp
sete   %al
cmp    $0xa,%ebp
mov    $0x2,%ecx
cmovne %eax,%ecx
cmp    $0xc,%ebp
mov    $0x3,%eax
cmovne %ecx,%eax
cmp    $0xd,%ebp
mov    $0x4,%ecx
cmovne %eax,%ecx
cmp    $0xe,%ebp
mov    $0x5,%eax
cmovne %ecx,%eax
cmp    $0xf,%ebp
mov    $0x6,%ecx
cmovne %eax,%ecx
cmp    $0x63,%ebp
mov    $0x7,%ebp
cmovne %ecx,%ebp
mov    $0x1,%edi
call   1070 <COLOR_PAIR@plt>
mov    0x2e06(%rip),%rbx
or     (%rbx),%eax
mov    %eax,%edi
call   1040 <attron@plt>
mov    %ebp,%edi
call   1090 <move@plt>
lea    0xe07(%rip),%rdi
mov    %r14d,%esi
call   1060 <printw@plt>
mov    $0x1,%edi
call   1070 <COLOR_PAIR@plt>
or     (%rbx),%eax
mov    %eax,%edi
call   1030 <attroff@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1080 <refresh@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@A_NORMAL = global i32 0
@.str = [4 x i8] c"%d \00"
define void @iWar_Update_Right(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
%8 = load i32, i32* @stdscr
%9 = load i32, i32* %6
%10 = load i32, i32* %7
%11 = call i32 @getmaxyx(i32 %8, i32 %9, i32 %10)
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 11
br i1 %13, label %14, label %15
14: ; preds = %2
store i32 1, i32* %5
br label %15
15: ; preds = %14, %2
%16 = load i32, i32* %3
%17 = icmp eq i32 %16, 10
br i1 %17, label %18, label %19
18: ; preds = %15
store i32 2, i32* %5
br label %19
19: ; preds = %18, %15
%20 = load i32, i32* %3
%21 = icmp eq i32 %20, 12
br i1 %21, label %22, label %23
22: ; preds = %19
store i32 3, i32* %5
br label %23
23: ; preds = %22, %19
%24 = load i32, i32* %3
%25 = icmp eq i32 %24, 13
br i1 %25, label %26, label %27
26: ; preds = %23
store i32 4, i32* %5
br label %27
27: ; preds = %26, %23
%28 = load i32, i32* %3
%29 = icmp eq i32 %28, 14
br i1 %29, label %30, label %31
30: ; preds = %27
store i32 5, i32* %5
br label %31
31: ; preds = %30, %27
%32 = load i32, i32* %3
%33 = icmp eq i32 %32, 15
br i1 %33, label %34, label %35
34: ; preds = %31
store i32 6, i32* %5
br label %35
35: ; preds = %34, %31
%36 = load i32, i32* %3
%37 = icmp eq i32 %36, 99
br i1 %37, label %38, label %39
38: ; preds = %35
store i32 7, i32* %5
br label %39
39: ; preds = %38, %35
%40 = call i32 @COLOR_PAIR(i32 1)
%41 = load i32, i32* @A_NORMAL
%42 = or i32 %40, %41
%43 = call i32 @attron(i32 %42)
%44 = load i32, i32* %5
%45 = load i32, i32* %7
%46 = sub nsw i32 %45, 8
%47 = call i32 @move(i32 %44, i32 %46)
%48 = load i32, i32* %4
%49 = call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %48)
%50 = call i32 @COLOR_PAIR(i32 1)
%51 = load i32, i32* @A_NORMAL
%52 = or i32 %50, %51
%53 = call i32 @attroff(i32 %52)
%54 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@A_NORMAL = global i32 0
@.str = [4 x i8] c"%d \00"
define void @iWar_Update_Right(i32 %0, i32 %1) {
%3 = load i32, i32* @stdscr
%4 = tail call i32 @getmaxyx(i32 %3, i32 undef, i32 undef)
%5 = icmp eq i32 %0, 11
%6 = zext i1 %5 to i32
%7 = icmp eq i32 %0, 10
%8 = select i1 %7, i32 2, i32 %6
%9 = icmp eq i32 %0, 12
%10 = select i1 %9, i32 3, i32 %8
%11 = icmp eq i32 %0, 13
%12 = select i1 %11, i32 4, i32 %10
%13 = icmp eq i32 %0, 14
%14 = select i1 %13, i32 5, i32 %12
%15 = icmp eq i32 %0, 15
%16 = select i1 %15, i32 6, i32 %14
%17 = icmp eq i32 %0, 99
%18 = select i1 %17, i32 7, i32 %16
%19 = tail call i32 @COLOR_PAIR(i32 1)
%20 = load i32, i32* @A_NORMAL
%21 = or i32 %20, %19
%22 = tail call i32 @attron(i32 %21)
%23 = tail call i32 @move(i32 %18, i32 undef)
%24 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%25 = tail call i32 @COLOR_PAIR(i32 1)
%26 = load i32, i32* @A_NORMAL
%27 = or i32 %26, %25
%28 = tail call i32 @attroff(i32 %27)
%29 = tail call i32 (...) @refresh()
ret void
}