#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*/ init_pair(int, int, int);
void curutil_colorpair_init() {
  int f, b, cp;
  for (f = 0; f < 8; f++)
    for (b = 0; b < 8; b++) {
      cp = b * 8 + 7 - f;
      if (cp)
        init_pair(cp, f, b);
    }
}


x86 assembly (clang, -O0):
<curutil_colorpair_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x8,-0x4(%rbp)
jge    1187 <curutil_colorpair_init+0x77>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    1174 <curutil_colorpair_init+0x64>
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
add    $0x7,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1161 <curutil_colorpair_init+0x51>
mov    -0xc(%rbp),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <init_pair@plt>
jmp    1166 <curutil_colorpair_init+0x56>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1130 <curutil_colorpair_init+0x20>
jmp    1179 <curutil_colorpair_init+0x69>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <curutil_colorpair_init+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curutil_colorpair_init>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
mov    $0x3f,%ebx
jmp    1193 <curutil_colorpair_init+0x83>
nopl   0x0(%rax)
lea    -0x30(%rbx),%edi
mov    %ebp,%esi
mov    $0x1,%edx
call   1030 <init_pair@plt>
lea    -0x28(%rbx),%edi
mov    %ebp,%esi
mov    $0x2,%edx
call   1030 <init_pair@plt>
lea    -0x20(%rbx),%edi
mov    %ebp,%esi
mov    $0x3,%edx
call   1030 <init_pair@plt>
lea    -0x18(%rbx),%edi
mov    %ebp,%esi
mov    $0x4,%edx
call   1030 <init_pair@plt>
lea    -0x10(%rbx),%edi
mov    %ebp,%esi
mov    $0x5,%edx
call   1030 <init_pair@plt>
lea    -0x8(%rbx),%edi
mov    %ebp,%esi
mov    $0x6,%edx
call   1030 <init_pair@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    $0x7,%edx
call   1030 <init_pair@plt>
add    $0x1,%ebp
add    $0xffffffff,%ebx
cmp    $0x37,%ebx
je     11a9 <curutil_colorpair_init+0x99>
cmp    $0x38,%ebx
je     1120 <curutil_colorpair_init+0x10>
lea    -0x38(%rbx),%edi
mov    %ebp,%esi
xor    %edx,%edx
call   1030 <init_pair@plt>
jmp    1120 <curutil_colorpair_init+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @curutil_colorpair_init() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
br label %4
4: ; preds = %29, %0
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 8
br i1 %6, label %7, label %32
7: ; preds = %4
store i32 0, i32* %2
br label %8
8: ; preds = %25, %7
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 8
br i1 %10, label %11, label %28
11: ; preds = %8
%12 = load i32, i32* %2
%13 = mul nsw i32 %12, 8
%14 = add nsw i32 %13, 7
%15 = load i32, i32* %1
%16 = sub nsw i32 %14, %15
store i32 %16, i32* %3
%17 = load i32, i32* %3
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %24
19: ; preds = %11
%20 = load i32, i32* %3
%21 = load i32, i32* %1
%22 = load i32, i32* %2
%23 = call i32 @init_pair(i32 %20, i32 %21, i32 %22)
br label %24
24: ; preds = %19, %11
br label %25
25: ; preds = %24
%26 = load i32, i32* %2
%27 = add nsw i32 %26, 1
store i32 %27, i32* %2
br label %8
28: ; preds = %8
br label %29
29: ; preds = %28
%30 = load i32, i32* %1
%31 = add nsw i32 %30, 1
store i32 %31, i32* %1
br label %4
32: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @curutil_colorpair_init() {
br label %1
1: ; preds = %0, %7
%2 = phi i32 [ 0, %0 ], [ %22, %7 ]
%3 = icmp eq i32 %2, 7
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = sub nuw nsw i32 7, %2
%6 = tail call i32 @init_pair(i32 %5, i32 %2, i32 0)
br label %7
7: ; preds = %1, %4
%8 = sub nsw i32 15, %2
%9 = tail call i32 @init_pair(i32 %8, i32 %2, i32 1)
%10 = sub nsw i32 23, %2
%11 = tail call i32 @init_pair(i32 %10, i32 %2, i32 2)
%12 = sub nsw i32 31, %2
%13 = tail call i32 @init_pair(i32 %12, i32 %2, i32 3)
%14 = sub nsw i32 39, %2
%15 = tail call i32 @init_pair(i32 %14, i32 %2, i32 4)
%16 = sub nsw i32 47, %2
%17 = tail call i32 @init_pair(i32 %16, i32 %2, i32 5)
%18 = sub nsw i32 55, %2
%19 = tail call i32 @init_pair(i32 %18, i32 %2, i32 6)
%20 = sub nsw i32 63, %2
%21 = tail call i32 @init_pair(i32 %20, i32 %2, i32 7)
%22 = add nuw nsw i32 %2, 1
%23 = icmp eq i32 %22, 8
br i1 %23, label %24, label %1
24: ; preds = %7
ret void
}