#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*/ TRUE;
int /*<<< orphan*/ init_pair(size_t, size_t, size_t);
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ nodelay(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ raw();
int /*<<< orphan*/ start_color();
int /*<<< orphan*/ stdscr;
void lnxcdispInit() {
  size_t i, j;
  initscr();
  raw();
  nodelay(stdscr, TRUE);
  keypad(stdscr, TRUE);
  noecho();
  start_color();
  for (i = 0; i < 8; ++i) {
    for (j = 0; j < 8; ++j) {
      init_pair(i * 8 + j, i, j);
    }
  }
}


x86 assembly (clang, -O0):
<lnxcdispInit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1060 <raw@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
mov    0x2e4a(%rip),%rax
mov    (%rax),%esi
call   1080 <nodelay@plt>
mov    0x2e44(%rip),%rax
mov    (%rax),%edi
mov    0x2e33(%rip),%rax
mov    (%rax),%esi
call   1040 <keypad@plt>
mov    $0x0,%al
call   1090 <noecho@plt>
mov    $0x0,%al
call   1070 <start_color@plt>
movq   $0x0,-0x8(%rbp)
cmpq   $0x8,-0x8(%rbp)
jae    1228 <lnxcdispInit+0xb8>
movq   $0x0,-0x10(%rbp)
cmpq   $0x8,-0x10(%rbp)
jae    1212 <lnxcdispInit+0xa2>
mov    -0x8(%rbp),%rdi
shl    $0x3,%rdi
add    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <init_pair@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    11dd <lnxcdispInit+0x6d>
jmp    1217 <lnxcdispInit+0xa7>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    11ca <lnxcdispInit+0x5a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lnxcdispInit>:
push   %r15
push   %r14
push   %rbx
xor    %r14d,%r14d
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1060 <raw@plt>
mov    0x2e5b(%rip),%r15
mov    (%r15),%edi
mov    0x2e49(%rip),%rbx
mov    (%rbx),%esi
call   1080 <nodelay@plt>
mov    (%r15),%edi
mov    (%rbx),%esi
call   1040 <keypad@plt>
xor    %eax,%eax
call   1090 <noecho@plt>
xor    %eax,%eax
call   1070 <start_color@plt>
mov    $0x7,%ebx
nopl   0x0(%rax,%rax,1)
lea    -0x7(%rbx),%rdi
mov    %r14,%rsi
xor    %edx,%edx
call   1030 <init_pair@plt>
lea    -0x6(%rbx),%rdi
mov    $0x1,%edx
mov    %r14,%rsi
call   1030 <init_pair@plt>
lea    -0x5(%rbx),%rdi
mov    $0x2,%edx
mov    %r14,%rsi
call   1030 <init_pair@plt>
lea    -0x4(%rbx),%rdi
mov    $0x3,%edx
mov    %r14,%rsi
call   1030 <init_pair@plt>
lea    -0x3(%rbx),%rdi
mov    $0x4,%edx
mov    %r14,%rsi
call   1030 <init_pair@plt>
lea    -0x2(%rbx),%rdi
mov    $0x5,%edx
mov    %r14,%rsi
call   1030 <init_pair@plt>
lea    -0x1(%rbx),%rdi
mov    $0x6,%edx
mov    %r14,%rsi
call   1030 <init_pair@plt>
mov    $0x7,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <init_pair@plt>
add    $0x1,%r14
add    $0x8,%rbx
cmp    $0x47,%rbx
jne    11c0 <lnxcdispInit+0x50>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdscr = global i32 0
@TRUE = global i32 0
define void @lnxcdispInit() {
%1 = alloca i64
%2 = alloca i64
%3 = call i32 (...) @initscr()
%4 = call i32 (...) @raw()
%5 = load i32, i32* @stdscr
%6 = load i32, i32* @TRUE
%7 = call i32 @nodelay(i32 %5, i32 %6)
%8 = load i32, i32* @stdscr
%9 = load i32, i32* @TRUE
%10 = call i32 @keypad(i32 %8, i32 %9)
%11 = call i32 (...) @noecho()
%12 = call i32 (...) @start_color()
store i64 0, i64* %1
br label %13
13: ; preds = %32, %0
%14 = load i64, i64* %1
%15 = icmp ult i64 %14, 8
br i1 %15, label %16, label %35
16: ; preds = %13
store i64 0, i64* %2
br label %17
17: ; preds = %28, %16
%18 = load i64, i64* %2
%19 = icmp ult i64 %18, 8
br i1 %19, label %20, label %31
20: ; preds = %17
%21 = load i64, i64* %1
%22 = mul i64 %21, 8
%23 = load i64, i64* %2
%24 = add i64 %22, %23
%25 = load i64, i64* %1
%26 = load i64, i64* %2
%27 = call i32 @init_pair(i64 %24, i64 %25, i64 %26)
br label %28
28: ; preds = %20
%29 = load i64, i64* %2
%30 = add i64 %29, 1
store i64 %30, i64* %2
br label %17
31: ; preds = %17
br label %32
32: ; preds = %31
%33 = load i64, i64* %1
%34 = add i64 %33, 1
store i64 %34, i64* %1
br label %13
35: ; preds = %13
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@TRUE = global i32 0
define void @lnxcdispInit() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @raw()
%3 = load i32, i32* @stdscr
%4 = load i32, i32* @TRUE
%5 = tail call i32 @nodelay(i32 %3, i32 %4)
%6 = load i32, i32* @stdscr
%7 = load i32, i32* @TRUE
%8 = tail call i32 @keypad(i32 %6, i32 %7)
%9 = tail call i32 (...) @noecho()
%10 = tail call i32 (...) @start_color()
br label %11
11: ; preds = %0, %11
%12 = phi i64 [ 0, %0 ], [ %29, %11 ]
%13 = shl i64 %12, 3
%14 = tail call i32 @init_pair(i64 %13, i64 %12, i64 0)
%15 = or i64 %13, 1
%16 = tail call i32 @init_pair(i64 %15, i64 %12, i64 1)
%17 = or i64 %13, 2
%18 = tail call i32 @init_pair(i64 %17, i64 %12, i64 2)
%19 = or i64 %13, 3
%20 = tail call i32 @init_pair(i64 %19, i64 %12, i64 3)
%21 = or i64 %13, 4
%22 = tail call i32 @init_pair(i64 %21, i64 %12, i64 4)
%23 = or i64 %13, 5
%24 = tail call i32 @init_pair(i64 %23, i64 %12, i64 5)
%25 = or i64 %13, 6
%26 = tail call i32 @init_pair(i64 %25, i64 %12, i64 6)
%27 = or i64 %13, 7
%28 = tail call i32 @init_pair(i64 %27, i64 %12, i64 7)
%29 = add nuw nsw i64 %12, 1
%30 = icmp eq i64 %29, 8
br i1 %30, label %31, label %11
31: ; preds = %11
ret void
}