#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 double GLfloat;

/* Variables and functions */
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_FLAT;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_NORMALIZE;
int /*<<< orphan*/ GL_POSITION;
int /*<<< orphan*/ LoadRGBMipmaps(char *, int);
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, double *);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void Init(void) {
  GLfloat lightPos[4] = {1.0, 10.0, 10.0, 0.0};
  glClearColor(0.5, 0.8, 0.99, 1.0);
  glEnable(GL_DEPTH_TEST);
  glEnable(GL_NORMALIZE);
  glEnable(GL_LIGHTING);
  glEnable(GL_LIGHT0);
  glLightfv(GL_LIGHT0, GL_POSITION, lightPos);
  glShadeModel(GL_FLAT);
  LoadRGBMipmaps("logo.bw", 1);
}


x86 assembly (clang, -O0):
<Init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeb8(%rip),%rax
mov    %rax,-0x8(%rbp)
movsd  0xe74(%rip),%xmm0
movsd  0xe74(%rip),%xmm1
movsd  0xe74(%rip),%xmm2
movsd  0xe74(%rip),%xmm3
call   1060 <glClearColor@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2e0a(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2df4(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2e06(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2df8(%rip),%rax
mov    (%rax),%edi
mov    0x2ddf(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2de5(%rip),%rax
mov    (%rax),%edi
call   1070 <glShadeModel@plt>
lea    0xe2f(%rip),%rdi
mov    $0x1,%esi
call   1040 <LoadRGBMipmaps@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Init>:
push   %rbx
sub    $0x20,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb8(%rip),%xmm0
movaps %xmm0,(%rsp)
movsd  0xe8c(%rip),%xmm0
movsd  0xe8c(%rip),%xmm1
movsd  0xe8c(%rip),%xmm2
movsd  0xe8c(%rip),%xmm3
call   1060 <glClearColor@plt>
mov    0x2e20(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2e22(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2e0c(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2e1e(%rip),%rbx
mov    (%rbx),%edi
call   1050 <glEnable@plt>
mov    (%rbx),%edi
mov    0x2dfe(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <glLightfv@plt>
mov    0x2e05(%rip),%rax
mov    (%rax),%edi
call   1070 <glShadeModel@plt>
lea    0xe4f(%rip),%rdi
mov    $0x1,%esi
call   1040 <LoadRGBMipmaps@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.Init.lightPos = [4 x double] [double 1.000000e+00, double 1.000000e+01, double 1.000000e+01, double 0.000000e+00]
@GL_DEPTH_TEST = global i32 0
@GL_NORMALIZE = global i32 0
@GL_LIGHTING = global i32 0
@GL_LIGHT0 = global i32 0
@GL_POSITION = global i32 0
@GL_FLAT = global i32 0
@.str = [8 x i8] c"logo.bw\00"
define void @Init() {
%1 = alloca [4 x double]
%2 = bitcast [4 x double]* %1 to i8*
%3 = call i32 @glClearColor(double 5.000000e-01, double 8.000000e-01, double 0x3FEFAE147AE147AE, double 1.000000e+00)
%4 = load i32, i32* @GL_DEPTH_TEST
%5 = call i32 @glEnable(i32 %4)
%6 = load i32, i32* @GL_NORMALIZE
%7 = call i32 @glEnable(i32 %6)
%8 = load i32, i32* @GL_LIGHTING
%9 = call i32 @glEnable(i32 %8)
%10 = load i32, i32* @GL_LIGHT0
%11 = call i32 @glEnable(i32 %10)
%12 = load i32, i32* @GL_LIGHT0
%13 = load i32, i32* @GL_POSITION
%14 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%15 = call i32 @glLightfv(i32 %12, i32 %13, double* %14)
%16 = load i32, i32* @GL_FLAT
%17 = call i32 @glShadeModel(i32 %16)
%18 = call i32 @LoadRGBMipmaps(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@__const.Init.lightPos = [4 x double] [double 1.000000e+00, double 1.000000e+01, double 1.000000e+01, double 0.000000e+00]
@GL_DEPTH_TEST = global i32 0
@GL_NORMALIZE = global i32 0
@GL_LIGHTING = global i32 0
@GL_LIGHT0 = global i32 0
@GL_POSITION = global i32 0
@GL_FLAT = global i32 0
@.str = [8 x i8] c"logo.bw\00"
define void @Init() {
%1 = alloca [4 x double]
%2 = bitcast [4 x double]* %1 to i8*
%3 = tail call i32 @glClearColor(double 5.000000e-01, double 8.000000e-01, double 0x3FEFAE147AE147AE, double 1.000000e+00)
%4 = load i32, i32* @GL_DEPTH_TEST
%5 = tail call i32 @glEnable(i32 %4)
%6 = load i32, i32* @GL_NORMALIZE
%7 = tail call i32 @glEnable(i32 %6)
%8 = load i32, i32* @GL_LIGHTING
%9 = tail call i32 @glEnable(i32 %8)
%10 = load i32, i32* @GL_LIGHT0
%11 = tail call i32 @glEnable(i32 %10)
%12 = load i32, i32* @GL_LIGHT0
%13 = load i32, i32* @GL_POSITION
%14 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%15 = call i32 @glLightfv(i32 %12, i32 %13, double* %14)
%16 = load i32, i32* @GL_FLAT
%17 = call i32 @glShadeModel(i32 %16)
%18 = call i32 @LoadRGBMipmaps(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}