#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_AMBIENT;
int /*<<< orphan*/ GL_CULL_FACE;
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_DIFFUSE;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_LIGHT_MODEL_AMBIENT;
int /*<<< orphan*/ GL_NORMALIZE;
int /*<<< orphan*/ GL_SPECULAR;
int /*<<< orphan*/ glClearColor(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, double);
int /*<<< orphan*/ glDisable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glLightModelfv(int /*<<< orphan*/, double *);
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, double *);
void initializeGL(void) {
  glEnable(GL_DEPTH_TEST);
  glClearColor(0, 0, 0, 1.0);
  GLfloat ambientLight[] = {0.0, 0.0, 0.0, 1.0};
  GLfloat diffuseLight[] = {1.0, 1.0, 1.0, 1.0};
  GLfloat specularLight[] = {1.0, 1.0, 1.0, 1.0};
  GLfloat globalAmbientLight[] = {0.4, 0.4, 0.4, 1.0};
  glLightModelfv(GL_LIGHT_MODEL_AMBIENT, globalAmbientLight);
  glLightfv(GL_LIGHT0, GL_AMBIENT, ambientLight);
  glLightfv(GL_LIGHT0, GL_SPECULAR, specularLight);
  glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuseLight);
  glEnable(GL_LIGHTING);
  glEnable(GL_LIGHT0);
  glEnable(GL_NORMALIZE);
  glDisable(GL_CULL_FACE);
}


x86 assembly (clang, -O0):
<initializeGL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
xor    %edx,%edx
movsd  0xe8d(%rip),%xmm0
mov    %edx,%edi
mov    %edx,%esi
call   1060 <glClearColor@plt>
mov    0xe8d(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe8a(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xe87(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xe84(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xe81(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe7e(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe7b(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe78(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe55(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe52(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xe4f(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xe4c(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xe49(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xe46(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xe43(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xe40(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0x2da5(%rip),%rax
mov    (%rax),%edi
lea    -0x80(%rbp),%rsi
call   1040 <glLightModelfv@plt>
mov    0x2d8b(%rip),%rax
mov    (%rax),%edi
mov    0x2da2(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d70(%rip),%rax
mov    (%rax),%edi
mov    0x2d7f(%rip),%rax
mov    (%rax),%esi
lea    -0x60(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d55(%rip),%rax
mov    (%rax),%edi
mov    0x2d24(%rip),%rax
mov    (%rax),%esi
lea    -0x40(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d22(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d2c(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d0e(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2cf0(%rip),%rax
mov    (%rax),%edi
call   1070 <glDisable@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initializeGL>:
push   %rbx
sub    $0x80,%rsp
mov    0x2e41(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
movsd  0xe92(%rip),%xmm0
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1060 <glClearColor@plt>
movaps 0xea0(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xe84(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xea8(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xe8c(%rip),%xmm1
movaps %xmm1,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm1,0x20(%rsp)
movaps 0xea6(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe8a(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2e07(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1040 <glLightModelfv@plt>
mov    0x2dee(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e05(%rip),%rax
mov    (%rax),%esi
lea    0x60(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x2de8(%rip),%rax
mov    (%rax),%esi
lea    0x20(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x2d93(%rip),%rax
mov    (%rax),%esi
lea    0x40(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d90(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    (%rbx),%edi
call   1050 <glEnable@plt>
mov    0x2d83(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d65(%rip),%rax
mov    (%rax),%edi
call   1070 <glDisable@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@GL_DEPTH_TEST = global i32 0
@__const.initializeGL.ambientLight = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@__const.initializeGL.diffuseLight = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.initializeGL.specularLight = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.initializeGL.globalAmbientLight = [4 x double] [double 4.000000e-01, double 4.000000e-01, double 4.000000e-01, double 1.000000e+00]
@GL_LIGHT_MODEL_AMBIENT = global i32 0
@GL_LIGHT0 = global i32 0
@GL_AMBIENT = global i32 0
@GL_SPECULAR = global i32 0
@GL_DIFFUSE = global i32 0
@GL_LIGHTING = global i32 0
@GL_NORMALIZE = global i32 0
@GL_CULL_FACE = global i32 0
define void @initializeGL() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = alloca [4 x double]
%5 = load i32, i32* @GL_DEPTH_TEST
%6 = call i32 @glEnable(i32 %5)
%7 = call i32 @glClearColor(i32 0, i32 0, i32 0, double 1.000000e+00)
%8 = bitcast [4 x double]* %1 to i8*
%9 = bitcast [4 x double]* %2 to i8*
%10 = bitcast [4 x double]* %3 to i8*
%11 = bitcast [4 x double]* %4 to i8*
%12 = load i32, i32* @GL_LIGHT_MODEL_AMBIENT
%13 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%14 = call i32 @glLightModelfv(i32 %12, double* %13)
%15 = load i32, i32* @GL_LIGHT0
%16 = load i32, i32* @GL_AMBIENT
%17 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%18 = call i32 @glLightfv(i32 %15, i32 %16, double* %17)
%19 = load i32, i32* @GL_LIGHT0
%20 = load i32, i32* @GL_SPECULAR
%21 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%22 = call i32 @glLightfv(i32 %19, i32 %20, double* %21)
%23 = load i32, i32* @GL_LIGHT0
%24 = load i32, i32* @GL_DIFFUSE
%25 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%26 = call i32 @glLightfv(i32 %23, i32 %24, double* %25)
%27 = load i32, i32* @GL_LIGHTING
%28 = call i32 @glEnable(i32 %27)
%29 = load i32, i32* @GL_LIGHT0
%30 = call i32 @glEnable(i32 %29)
%31 = load i32, i32* @GL_NORMALIZE
%32 = call i32 @glEnable(i32 %31)
%33 = load i32, i32* @GL_CULL_FACE
%34 = call i32 @glDisable(i32 %33)
ret void
}

LLVM IR (-O2):
@GL_DEPTH_TEST = global i32 0
@__const.initializeGL.ambientLight = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@__const.initializeGL.specularLight = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.initializeGL.globalAmbientLight = [4 x double] [double 4.000000e-01, double 4.000000e-01, double 4.000000e-01, double 1.000000e+00]
@GL_LIGHT_MODEL_AMBIENT = global i32 0
@GL_LIGHT0 = global i32 0
@GL_AMBIENT = global i32 0
@GL_SPECULAR = global i32 0
@GL_DIFFUSE = global i32 0
@GL_LIGHTING = global i32 0
@GL_NORMALIZE = global i32 0
@GL_CULL_FACE = global i32 0
define void @initializeGL() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = alloca [4 x double]
%5 = load i32, i32* @GL_DEPTH_TEST
%6 = tail call i32 @glEnable(i32 %5)
%7 = tail call i32 @glClearColor(i32 0, i32 0, i32 0, double 1.000000e+00)
%8 = bitcast [4 x double]* %1 to i8*
%9 = bitcast [4 x double]* %2 to i8*
%10 = bitcast [4 x double]* %3 to i8*
%11 = bitcast [4 x double]* %4 to i8*
%12 = load i32, i32* @GL_LIGHT_MODEL_AMBIENT
%13 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%14 = call i32 @glLightModelfv(i32 %12, double* %13)
%15 = load i32, i32* @GL_LIGHT0
%16 = load i32, i32* @GL_AMBIENT
%17 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%18 = call i32 @glLightfv(i32 %15, i32 %16, double* %17)
%19 = load i32, i32* @GL_LIGHT0
%20 = load i32, i32* @GL_SPECULAR
%21 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%22 = call i32 @glLightfv(i32 %19, i32 %20, double* %21)
%23 = load i32, i32* @GL_LIGHT0
%24 = load i32, i32* @GL_DIFFUSE
%25 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%26 = call i32 @glLightfv(i32 %23, i32 %24, double* %25)
%27 = load i32, i32* @GL_LIGHTING
%28 = call i32 @glEnable(i32 %27)
%29 = load i32, i32* @GL_LIGHT0
%30 = call i32 @glEnable(i32 %29)
%31 = load i32, i32* @GL_NORMALIZE
%32 = call i32 @glEnable(i32 %31)
%33 = load i32, i32* @GL_CULL_FACE
%34 = call i32 @glDisable(i32 %33)
ret void
}