#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_UNDERLINE;
int /*<<< orphan*/ COLOR_BLACK;
int /*<<< orphan*/ COLOR_BLUE;
int /*<<< orphan*/ COLOR_CYAN;
int /*<<< orphan*/ COLOR_GREEN;
int /*<<< orphan*/ COLOR_MAGENTA;
int COLOR_PAIR(int);
int /*<<< orphan*/ COLOR_RED;
int /*<<< orphan*/ COLOR_WHITE;
int /*<<< orphan*/ COLOR_YELLOW;
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ getch();
int /*<<< orphan*/ init_pair(int, int, int);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ move(int, int /*<<< orphan*/);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ start_color();
int /*<<< orphan*/ stdscr;
int /*<<< orphan*/ waddstr(int /*<<< orphan*/, char *);
int /*<<< orphan*/ wattroff(int /*<<< orphan*/, int);
int /*<<< orphan*/ wattron(int /*<<< orphan*/, int);
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/);
int main(int argc, char **argv) {
  int fg, bg;
  struct {
    char *name;
    int color;
  } NC[] = {{"Bk", COLOR_BLACK},  {"Rd", COLOR_RED},  {"Gr", COLOR_GREEN},
            {"Ye", COLOR_YELLOW}, {"Bl", COLOR_BLUE}, {"Mg", COLOR_MAGENTA},
            {"Cy", COLOR_CYAN},   {"Wh", COLOR_WHITE}};
  initscr();
  start_color();
  cbreak();
  noecho();
  keypad(stdscr, TRUE);
  for (bg = 0; bg < 16; bg++) {
    move(bg, 0);
    for (fg = 0; fg < 16; fg++) {
      int attr;
      int c = ((bg & 7) << 3) | (fg & 7);
      init_pair(c, NC[fg & 7].color, NC[bg & 7].color);
      attr = COLOR_PAIR(c);
      if (fg & 8)
        attr |= A_BOLD;
      if (bg & 8)
        attr |= A_UNDERLINE;
      wattron(stdscr, attr);
      waddstr(stdscr, NC[fg & 7].name);
      waddstr(stdscr, NC[bg & 7].name);
      wattroff(stdscr, attr);
    }
  }
  move(bg, 0);
  wrefresh(stdscr);
  getch();
  endwin();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe00(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0x2dca(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x98(%rbp)
lea    0xde6(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0x2d65(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x88(%rbp)
lea    0xdcc(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0x2d83(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x78(%rbp)
lea    0xdb8(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0x2d4c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x68(%rbp)
lea    0xda4(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0x2d2d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x58(%rbp)
lea    0xd90(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0x2d2e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x48(%rbp)
lea    0xd7c(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0x2d2f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
lea    0xd68(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cf8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    $0x0,%al
call   1080 <initscr@plt>
mov    $0x0,%al
call   1090 <start_color@plt>
mov    $0x0,%al
call   1040 <cbreak@plt>
mov    $0x0,%al
call   10d0 <noecho@plt>
mov    0x2d08(%rip),%rax
mov    (%rax),%edi
mov    0x2cf7(%rip),%rax
mov    (%rax),%esi
call   1070 <keypad@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x10,-0x18(%rbp)
jge    1464 <main+0x284>
mov    -0x18(%rbp),%edi
xor    %esi,%esi
call   1100 <move@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x10,-0x14(%rbp)
jge    1451 <main+0x271>
mov    -0x18(%rbp),%eax
and    $0x7,%eax
shl    $0x3,%eax
mov    -0x14(%rbp),%ecx
and    $0x7,%ecx
or     %ecx,%eax
mov    %eax,-0xa8(%rbp)
mov    -0xa8(%rbp),%edi
mov    -0x14(%rbp),%eax
and    $0x7,%eax
movslq %eax,%rcx
lea    -0xa0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    0x8(%rax),%esi
mov    -0x18(%rbp),%eax
and    $0x7,%eax
movslq %eax,%rcx
lea    -0xa0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    0x8(%rax),%edx
call   1050 <init_pair@plt>
mov    -0xa8(%rbp),%edi
call   10a0 <COLOR_PAIR@plt>
mov    %eax,-0xa4(%rbp)
mov    -0x14(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     13a7 <main+0x1c7>
mov    0x2bff(%rip),%rax
mov    (%rax),%eax
or     -0xa4(%rbp),%eax
mov    %eax,-0xa4(%rbp)
mov    -0x18(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     13cb <main+0x1eb>
mov    0x2bcb(%rip),%rax
mov    (%rax),%eax
or     -0xa4(%rbp),%eax
mov    %eax,-0xa4(%rbp)
mov    0x2c16(%rip),%rax
mov    (%rax),%edi
mov    -0xa4(%rbp),%esi
call   10f0 <wattron@plt>
mov    0x2c02(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%eax
and    $0x7,%eax
movslq %eax,%rcx
lea    -0xa0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rsi
call   1030 <waddstr@plt>
mov    0x2bda(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%eax
and    $0x7,%eax
movslq %eax,%rcx
lea    -0xa0(%rbp),%rax
shl    $0x4,%rcx
add    %rcx,%rax
mov    (%rax),%rsi
call   1030 <waddstr@plt>
mov    0x2bb2(%rip),%rax
mov    (%rax),%edi
mov    -0xa4(%rbp),%esi
call   10e0 <wattroff@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1312 <main+0x132>
jmp    1456 <main+0x276>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12f7 <main+0x117>
mov    -0x18(%rbp),%edi
xor    %esi,%esi
call   1100 <move@plt>
mov    0x2b73(%rip),%rax
mov    (%rax),%edi
call   1060 <wrefresh@plt>
mov    $0x0,%al
call   10b0 <getch@plt>
mov    $0x0,%al
call   10c0 <endwin@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
lea    0xe08(%rip),%rax
mov    %rax,0x20(%rsp)
mov    0x2dd4(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x28(%rsp)
lea    0xdf2(%rip),%rax
mov    %rax,0x30(%rsp)
mov    0x2d73(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x38(%rsp)
lea    0xddc(%rip),%rax
mov    %rax,0x40(%rsp)
mov    0x2d92(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x48(%rsp)
lea    0xdc6(%rip),%rax
mov    %rax,0x50(%rsp)
mov    0x2d59(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x58(%rsp)
lea    0xdb0(%rip),%rax
mov    %rax,0x60(%rsp)
mov    0x2d38(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x68(%rsp)
lea    0xd9a(%rip),%rax
mov    %rax,0x70(%rsp)
mov    0x2d37(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x78(%rsp)
lea    0xd84(%rip),%rax
mov    %rax,0x80(%rsp)
mov    0x2d33(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x88(%rsp)
lea    0xd68(%rip),%rax
mov    %rax,0x90(%rsp)
mov    0x2cf4(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x98(%rsp)
movl   $0x0,0xc(%rsp)
xor    %eax,%eax
call   1080 <initscr@plt>
xor    %eax,%eax
call   1090 <start_color@plt>
xor    %eax,%eax
call   1040 <cbreak@plt>
xor    %eax,%eax
call   10d0 <noecho@plt>
mov    0x2cf8(%rip),%rax
mov    (%rax),%edi
mov    0x2ce7(%rip),%rax
mov    (%rax),%esi
call   1070 <keypad@plt>
mov    0x2c91(%rip),%r15
mov    0x2c7a(%rip),%r12
xchg   %ax,%ax
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
xor    %esi,%esi
call   1100 <move@plt>
mov    %ebx,%eax
and    $0x7,%eax
lea    0x0(,%rax,8),%ecx
mov    %ecx,0x14(%rsp)
shl    $0x4,%rax
lea    (%rsp,%rax,1),%rcx
add    $0x20,%rcx
mov    %rcx,0x18(%rsp)
mov    0x28(%rsp,%rax,1),%eax
mov    %eax,0x10(%rsp)
xor    %r13d,%r13d
nopl   0x0(%rax)
mov    0xc(%rsp),%ebx
shl    $0x1c,%ebx
sar    $0x1f,%ebx
mov    %r13d,%r14d
and    $0x7,%r14d
mov    %r14d,%ebp
or     0x14(%rsp),%ebp
shl    $0x4,%r14
mov    0x28(%rsp,%r14,1),%esi
mov    %ebp,%edi
mov    0x10(%rsp),%edx
call   1050 <init_pair@plt>
mov    %ebp,%edi
mov    0x2c63(%rip),%rbp
call   10a0 <COLOR_PAIR@plt>
mov    %r13d,%ecx
shl    $0x1c,%ecx
sar    $0x1f,%ecx
and    (%r15),%ecx
or     %eax,%ecx
and    (%r12),%ebx
or     %ecx,%ebx
mov    0x0(%rbp),%edi
mov    %ebx,%esi
call   10f0 <wattron@plt>
mov    0x0(%rbp),%edi
mov    0x20(%rsp,%r14,1),%rsi
call   1030 <waddstr@plt>
mov    0x0(%rbp),%edi
mov    0x18(%rsp),%rax
mov    (%rax),%rsi
call   1030 <waddstr@plt>
mov    0x0(%rbp),%edi
mov    %ebx,%esi
call   10e0 <wattroff@plt>
add    $0x1,%r13d
cmp    $0x10,%r13d
jne    1350 <main+0x170>
mov    0xc(%rsp),%eax
add    $0x1,%eax
mov    %eax,0xc(%rsp)
cmp    $0x10,%eax
jne    1310 <main+0x130>
mov    $0x10,%edi
xor    %esi,%esi
call   1100 <move@plt>
mov    0x0(%rbp),%edi
call   1060 <wrefresh@plt>
xor    %eax,%eax
call   10b0 <getch@plt>
xor    %eax,%eax
call   10c0 <endwin@plt>
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.anon = type { i8*, i32 }
@.str = [3 x i8] c"Bk\00"
@COLOR_BLACK = global i32 0
@.str.1 = [3 x i8] c"Rd\00"
@COLOR_RED = global i32 0
@.str.2 = [3 x i8] c"Gr\00"
@COLOR_GREEN = global i32 0
@.str.3 = [3 x i8] c"Ye\00"
@COLOR_YELLOW = global i32 0
@.str.4 = [3 x i8] c"Bl\00"
@COLOR_BLUE = global i32 0
@.str.5 = [3 x i8] c"Mg\00"
@COLOR_MAGENTA = global i32 0
@.str.6 = [3 x i8] c"Cy\00"
@COLOR_CYAN = global i32 0
@.str.7 = [3 x i8] c"Wh\00"
@COLOR_WHITE = global i32 0
@stdscr = global i32 0
@TRUE = global i32 0
@A_BOLD = global i32 0
@A_UNDERLINE = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca [8 x %struct.anon]
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %8, i64 0, i64 0
%12 = getelementptr inbounds %struct.anon, %struct.anon* %11, i32 0, i32 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %12
%13 = getelementptr inbounds %struct.anon, %struct.anon* %11, i32 0, i32 1
%14 = load i32, i32* @COLOR_BLACK
store i32 %14, i32* %13
%15 = getelementptr inbounds %struct.anon, %struct.anon* %11, i64 1
%16 = getelementptr inbounds %struct.anon, %struct.anon* %15, i32 0, i32 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %16
%17 = getelementptr inbounds %struct.anon, %struct.anon* %15, i32 0, i32 1
%18 = load i32, i32* @COLOR_RED
store i32 %18, i32* %17
%19 = getelementptr inbounds %struct.anon, %struct.anon* %15, i64 1
%20 = getelementptr inbounds %struct.anon, %struct.anon* %19, i32 0, i32 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %20
%21 = getelementptr inbounds %struct.anon, %struct.anon* %19, i32 0, i32 1
%22 = load i32, i32* @COLOR_GREEN
store i32 %22, i32* %21
%23 = getelementptr inbounds %struct.anon, %struct.anon* %19, i64 1
%24 = getelementptr inbounds %struct.anon, %struct.anon* %23, i32 0, i32 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %24
%25 = getelementptr inbounds %struct.anon, %struct.anon* %23, i32 0, i32 1
%26 = load i32, i32* @COLOR_YELLOW
store i32 %26, i32* %25
%27 = getelementptr inbounds %struct.anon, %struct.anon* %23, i64 1
%28 = getelementptr inbounds %struct.anon, %struct.anon* %27, i32 0, i32 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8** %28
%29 = getelementptr inbounds %struct.anon, %struct.anon* %27, i32 0, i32 1
%30 = load i32, i32* @COLOR_BLUE
store i32 %30, i32* %29
%31 = getelementptr inbounds %struct.anon, %struct.anon* %27, i64 1
%32 = getelementptr inbounds %struct.anon, %struct.anon* %31, i32 0, i32 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8** %32
%33 = getelementptr inbounds %struct.anon, %struct.anon* %31, i32 0, i32 1
%34 = load i32, i32* @COLOR_MAGENTA
store i32 %34, i32* %33
%35 = getelementptr inbounds %struct.anon, %struct.anon* %31, i64 1
%36 = getelementptr inbounds %struct.anon, %struct.anon* %35, i32 0, i32 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8** %36
%37 = getelementptr inbounds %struct.anon, %struct.anon* %35, i32 0, i32 1
%38 = load i32, i32* @COLOR_CYAN
store i32 %38, i32* %37
%39 = getelementptr inbounds %struct.anon, %struct.anon* %35, i64 1
%40 = getelementptr inbounds %struct.anon, %struct.anon* %39, i32 0, i32 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8** %40
%41 = getelementptr inbounds %struct.anon, %struct.anon* %39, i32 0, i32 1
%42 = load i32, i32* @COLOR_WHITE
store i32 %42, i32* %41
%43 = call i32 (...) @initscr()
%44 = call i32 (...) @start_color()
%45 = call i32 (...) @cbreak()
%46 = call i32 (...) @noecho()
%47 = load i32, i32* @stdscr
%48 = load i32, i32* @TRUE
%49 = call i32 @keypad(i32 %47, i32 %48)
store i32 0, i32* %7
br label %50
50: ; preds = %124, %2
%51 = load i32, i32* %7
%52 = icmp slt i32 %51, 16
br i1 %52, label %53, label %127
53: ; preds = %50
%54 = load i32, i32* %7
%55 = call i32 @move(i32 %54, i32 0)
store i32 0, i32* %6
br label %56
56: ; preds = %120, %53
%57 = load i32, i32* %6
%58 = icmp slt i32 %57, 16
br i1 %58, label %59, label %123
59: ; preds = %56
%60 = load i32, i32* %7
%61 = and i32 %60, 7
%62 = shl i32 %61, 3
%63 = load i32, i32* %6
%64 = and i32 %63, 7
%65 = or i32 %62, %64
store i32 %65, i32* %10
%66 = load i32, i32* %10
%67 = load i32, i32* %6
%68 = and i32 %67, 7
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %8, i64 0, i64 %69
%71 = getelementptr inbounds %struct.anon, %struct.anon* %70, i32 0, i32 1
%72 = load i32, i32* %71
%73 = load i32, i32* %7
%74 = and i32 %73, 7
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %8, i64 0, i64 %75
%77 = getelementptr inbounds %struct.anon, %struct.anon* %76, i32 0, i32 1
%78 = load i32, i32* %77
%79 = call i32 @init_pair(i32 %66, i32 %72, i32 %78)
%80 = load i32, i32* %10
%81 = call i32 @COLOR_PAIR(i32 %80)
store i32 %81, i32* %9
%82 = load i32, i32* %6
%83 = and i32 %82, 8
%84 = icmp ne i32 %83, 0
br i1 %84, label %85, label %89
85: ; preds = %59
%86 = load i32, i32* @A_BOLD
%87 = load i32, i32* %9
%88 = or i32 %87, %86
store i32 %88, i32* %9
br label %89
89: ; preds = %85, %59
%90 = load i32, i32* %7
%91 = and i32 %90, 8
%92 = icmp ne i32 %91, 0
br i1 %92, label %93, label %97
93: ; preds = %89
%94 = load i32, i32* @A_UNDERLINE
%95 = load i32, i32* %9
%96 = or i32 %95, %94
store i32 %96, i32* %9
br label %97
97: ; preds = %93, %89
%98 = load i32, i32* @stdscr
%99 = load i32, i32* %9
%100 = call i32 @wattron(i32 %98, i32 %99)
%101 = load i32, i32* @stdscr
%102 = load i32, i32* %6
%103 = and i32 %102, 7
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %8, i64 0, i64 %104
%106 = getelementptr inbounds %struct.anon, %struct.anon* %105, i32 0, i32 0
%107 = load i8*, i8** %106
%108 = call i32 @waddstr(i32 %101, i8* %107)
%109 = load i32, i32* @stdscr
%110 = load i32, i32* %7
%111 = and i32 %110, 7
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %8, i64 0, i64 %112
%114 = getelementptr inbounds %struct.anon, %struct.anon* %113, i32 0, i32 0
%115 = load i8*, i8** %114
%116 = call i32 @waddstr(i32 %109, i8* %115)
%117 = load i32, i32* @stdscr
%118 = load i32, i32* %9
%119 = call i32 @wattroff(i32 %117, i32 %118)
br label %120
120: ; preds = %97
%121 = load i32, i32* %6
%122 = add nsw i32 %121, 1
store i32 %122, i32* %6
br label %56
123: ; preds = %56
br label %124
124: ; preds = %123
%125 = load i32, i32* %7
%126 = add nsw i32 %125, 1
store i32 %126, i32* %7
br label %50
127: ; preds = %50
%128 = load i32, i32* %7
%129 = call i32 @move(i32 %128, i32 0)
%130 = load i32, i32* @stdscr
%131 = call i32 @wrefresh(i32 %130)
%132 = call i32 (...) @getch()
%133 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
%struct.anon = type { i8*, i32 }
@.str = [3 x i8] c"Bk\00"
@COLOR_BLACK = global i32 0
@.str.1 = [3 x i8] c"Rd\00"
@COLOR_RED = global i32 0
@.str.2 = [3 x i8] c"Gr\00"
@COLOR_GREEN = global i32 0
@.str.3 = [3 x i8] c"Ye\00"
@COLOR_YELLOW = global i32 0
@.str.4 = [3 x i8] c"Bl\00"
@COLOR_BLUE = global i32 0
@.str.5 = [3 x i8] c"Mg\00"
@COLOR_MAGENTA = global i32 0
@.str.6 = [3 x i8] c"Cy\00"
@COLOR_CYAN = global i32 0
@.str.7 = [3 x i8] c"Wh\00"
@COLOR_WHITE = global i32 0
@stdscr = global i32 0
@TRUE = global i32 0
@A_BOLD = global i32 0
@A_UNDERLINE = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [8 x %struct.anon]
%4 = bitcast [8 x %struct.anon]* %3 to i8*
%5 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 0, i32 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 0, i32 1
%7 = load i32, i32* @COLOR_BLACK
store i32 %7, i32* %6
%8 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 1, i32 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %8
%9 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 1, i32 1
%10 = load i32, i32* @COLOR_RED
store i32 %10, i32* %9
%11 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 2, i32 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %11
%12 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 2, i32 1
%13 = load i32, i32* @COLOR_GREEN
store i32 %13, i32* %12
%14 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 3, i32 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %14
%15 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 3, i32 1
%16 = load i32, i32* @COLOR_YELLOW
store i32 %16, i32* %15
%17 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 4, i32 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8** %17
%18 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 4, i32 1
%19 = load i32, i32* @COLOR_BLUE
store i32 %19, i32* %18
%20 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 5, i32 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8** %20
%21 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 5, i32 1
%22 = load i32, i32* @COLOR_MAGENTA
store i32 %22, i32* %21
%23 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 6, i32 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8** %23
%24 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 6, i32 1
%25 = load i32, i32* @COLOR_CYAN
store i32 %25, i32* %24
%26 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 7, i32 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8** %26
%27 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 7, i32 1
%28 = load i32, i32* @COLOR_WHITE
store i32 %28, i32* %27
%29 = tail call i32 (...) @initscr()
%30 = tail call i32 (...) @start_color()
%31 = tail call i32 (...) @cbreak()
%32 = tail call i32 (...) @noecho()
%33 = load i32, i32* @stdscr
%34 = load i32, i32* @TRUE
%35 = tail call i32 @keypad(i32 %33, i32 %34)
br label %36
36: ; preds = %2, %77
%37 = phi i32 [ 0, %2 ], [ %78, %77 ]
%38 = tail call i32 @move(i32 %37, i32 0)
%39 = and i32 %37, 7
%40 = shl nuw nsw i32 %39, 3
%41 = zext i32 %39 to i64
%42 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 %41, i32 1
%43 = load i32, i32* %42
%44 = and i32 %37, 8
%45 = icmp eq i32 %44, 0
%46 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 %41, i32 0
br label %47
47: ; preds = %36, %47
%48 = phi i32 [ 0, %36 ], [ %75, %47 ]
%49 = and i32 %48, 7
%50 = or i32 %49, %40
%51 = zext i32 %49 to i64
%52 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 %51, i32 1
%53 = load i32, i32* %52
%54 = tail call i32 @init_pair(i32 %50, i32 %53, i32 %43)
%55 = tail call i32 @COLOR_PAIR(i32 %50)
%56 = and i32 %48, 8
%57 = icmp eq i32 %56, 0
%58 = load i32, i32* @A_BOLD
%59 = select i1 %57, i32 0, i32 %58
%60 = or i32 %59, %55
%61 = load i32, i32* @A_UNDERLINE
%62 = select i1 %45, i32 0, i32 %61
%63 = or i32 %60, %62
%64 = load i32, i32* @stdscr
%65 = tail call i32 @wattron(i32 %64, i32 %63)
%66 = load i32, i32* @stdscr
%67 = getelementptr inbounds [8 x %struct.anon], [8 x %struct.anon]* %3, i64 0, i64 %51, i32 0
%68 = load i8*, i8** %67
%69 = tail call i32 @waddstr(i32 %66, i8* %68)
%70 = load i32, i32* @stdscr
%71 = load i8*, i8** %46
%72 = tail call i32 @waddstr(i32 %70, i8* %71)
%73 = load i32, i32* @stdscr
%74 = tail call i32 @wattroff(i32 %73, i32 %63)
%75 = add nuw nsw i32 %48, 1
%76 = icmp eq i32 %75, 16
br i1 %76, label %77, label %47
77: ; preds = %47
%78 = add nuw nsw i32 %37, 1
%79 = icmp eq i32 %78, 16
br i1 %79, label %80, label %36
80: ; preds = %77
%81 = tail call i32 @move(i32 16, i32 0)
%82 = load i32, i32* @stdscr
%83 = tail call i32 @wrefresh(i32 %82)
%84 = tail call i32 (...) @getch()
%85 = tail call i32 (...) @endwin()
ret i32 0
}