#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 */
typedef scalar_t__ GLint;
typedef int GLfloat;

/* Variables and functions */
int /*<<< orphan*/ GL_DONT_CARE;
int /*<<< orphan*/ GL_LINE_SMOOTH;
int /*<<< orphan*/ GL_LINE_SMOOTH_HINT;
int /*<<< orphan*/ glClearIndex(int);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glHint(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glLineWidth(double);
int /*<<< orphan*/ glutSetColor(scalar_t__, int, int, int);
void aaindex_init(void) {
  int i;
  for (i = 0; i < 16; ++i) {
    GLfloat shade;
    shade = (GLfloat)i / (GLfloat)16;
    glutSetColor(32 + (GLint)i, 0., shade, 0.);
    glutSetColor(48 + (GLint)i, 0., 0., shade);
  }
  glEnable(GL_LINE_SMOOTH);
  glHint(GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
  glLineWidth(1.5);
  glClearIndex((GLfloat)32);
}


x86 assembly (clang, -O0):
<aaindex_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    11ad <aaindex_init+0x5d>
mov    -0x4(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
movslq -0x4(%rbp),%rdi
add    $0x20,%rdi
mov    -0x8(%rbp),%edx
xor    %ecx,%ecx
mov    %ecx,%esi
call   1070 <glutSetColor@plt>
movslq -0x4(%rbp),%rdi
add    $0x30,%rdi
mov    -0x8(%rbp),%ecx
xor    %edx,%edx
mov    %edx,%esi
call   1070 <glutSetColor@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    115f <aaindex_init+0xf>
mov    0x2e1c(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2e1e(%rip),%rax
mov    (%rax),%edi
mov    0x2e25(%rip),%rax
mov    (%rax),%esi
call   1060 <glHint@plt>
movsd  0xe26(%rip),%xmm0
call   1030 <glLineWidth@plt>
mov    $0x20,%edi
call   1040 <glClearIndex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aaindex_init>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%ebp
shr    $0x4,%ebp
lea    0x20(%rbx),%rdi
xor    %esi,%esi
mov    %ebp,%edx
xor    %ecx,%ecx
call   1070 <glutSetColor@plt>
lea    0x30(%rbx),%rdi
xor    %esi,%esi
xor    %edx,%edx
mov    %ebp,%ecx
call   1070 <glutSetColor@plt>
add    $0x1,%rbx
cmp    $0x10,%rbx
jne    1160 <aaindex_init+0x10>
mov    0x2e3c(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
mov    0x2e45(%rip),%rax
mov    (%rax),%esi
call   1060 <glHint@plt>
movsd  0xe46(%rip),%xmm0
call   1030 <glLineWidth@plt>
mov    $0x20,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <glClearIndex@plt>

LLVM IR (-O0):
@GL_LINE_SMOOTH = global i32 0
@GL_LINE_SMOOTH_HINT = global i32 0
@GL_DONT_CARE = global i32 0
define void @aaindex_init() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %19, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 16
br i1 %5, label %6, label %22
6: ; preds = %3
%7 = load i32, i32* %1
%8 = sdiv i32 %7, 16
store i32 %8, i32* %2
%9 = load i32, i32* %1
%10 = sext i32 %9 to i64
%11 = add nsw i64 32, %10
%12 = load i32, i32* %2
%13 = call i32 @glutSetColor(i64 %11, i32 0, i32 %12, i32 0)
%14 = load i32, i32* %1
%15 = sext i32 %14 to i64
%16 = add nsw i64 48, %15
%17 = load i32, i32* %2
%18 = call i32 @glutSetColor(i64 %16, i32 0, i32 0, i32 %17)
br label %19
19: ; preds = %6
%20 = load i32, i32* %1
%21 = add nsw i32 %20, 1
store i32 %21, i32* %1
br label %3
22: ; preds = %3
%23 = load i32, i32* @GL_LINE_SMOOTH
%24 = call i32 @glEnable(i32 %23)
%25 = load i32, i32* @GL_LINE_SMOOTH_HINT
%26 = load i32, i32* @GL_DONT_CARE
%27 = call i32 @glHint(i32 %25, i32 %26)
%28 = call i32 @glLineWidth(double 1.500000e+00)
%29 = call i32 @glClearIndex(i32 32)
ret void
}

LLVM IR (-O2):
@GL_LINE_SMOOTH = global i32 0
@GL_LINE_SMOOTH_HINT = global i32 0
@GL_DONT_CARE = global i32 0
define void @aaindex_init() {
br label %1
1: ; preds = %0, %1
%2 = phi i64 [ 0, %0 ], [ %9, %1 ]
%3 = trunc i64 %2 to i32
%4 = lshr i32 %3, 4
%5 = add nuw nsw i64 %2, 32
%6 = tail call i32 @glutSetColor(i64 %5, i32 0, i32 %4, i32 0)
%7 = add nuw nsw i64 %2, 48
%8 = tail call i32 @glutSetColor(i64 %7, i32 0, i32 0, i32 %4)
%9 = add nuw nsw i64 %2, 1
%10 = icmp eq i64 %9, 16
br i1 %10, label %11, label %1
11: ; preds = %1
%12 = load i32, i32* @GL_LINE_SMOOTH
%13 = tail call i32 @glEnable(i32 %12)
%14 = load i32, i32* @GL_LINE_SMOOTH_HINT
%15 = load i32, i32* @GL_DONT_CARE
%16 = tail call i32 @glHint(i32 %14, i32 %15)
%17 = tail call i32 @glLineWidth(double 1.500000e+00)
%18 = tail call i32 @glClearIndex(i32 32)
ret void
}