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

/* Variables and functions */
int /*<<< orphan*/ GL_AMBIENT_AND_DIFFUSE;
int /*<<< orphan*/ GL_BACK;
int /*<<< orphan*/ GL_COLOR_MATERIAL;
int /*<<< orphan*/ GL_CULL_FACE;
int /*<<< orphan*/ GL_FRONT_AND_BACK;
int /*<<< orphan*/ GL_LIGHT1;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_LIGHT_MODEL_AMBIENT;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ glColorMaterial(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glCullFace(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glLightModelfv(int /*<<< orphan*/, float *);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
int /*<<< orphan*/ initLight0();
int /*<<< orphan*/ initLight1();
void initLights() {
  GLfloat ambient[] = {0.1f, 0.1f, 0.1f, 1.0};
  glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient);
  glEnable(GL_COLOR_MATERIAL);
  glEnable(GL_LIGHTING);
  glEnable(GL_CULL_FACE);
  glCullFace(GL_BACK);
  initLight0();
  initLight1();
  glEnable(GL_LIGHT1);
  glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
  glShadeModel(GL_SMOOTH);
}


x86 assembly (clang, -O0):
<initLights>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xe81(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xe7e(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0x2e53(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1040 <glLightModelfv@plt>
mov    0x2e31(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2e03(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2ded(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2df7(%rip),%rax
mov    (%rax),%edi
call   1090 <glCullFace@plt>
mov    $0x0,%al
call   1070 <initLight0@plt>
mov    $0x0,%al
call   1060 <initLight1@plt>
mov    0x2db3(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2de5(%rip),%rax
mov    (%rax),%edi
mov    0x2dbc(%rip),%rax
mov    (%rax),%esi
call   1030 <glColorMaterial@plt>
mov    0x2d96(%rip),%rax
mov    (%rax),%edi
call   1080 <glShadeModel@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initLights>:
sub    $0x18,%rsp
movaps 0xe85(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2e62(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1040 <glLightModelfv@plt>
mov    0x2e41(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2e13(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2dfd(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2e07(%rip),%rax
mov    (%rax),%edi
call   1090 <glCullFace@plt>
xor    %eax,%eax
call   1070 <initLight0@plt>
xor    %eax,%eax
call   1060 <initLight1@plt>
mov    0x2dc3(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2df5(%rip),%rax
mov    (%rax),%edi
mov    0x2dcc(%rip),%rax
mov    (%rax),%esi
call   1030 <glColorMaterial@plt>
mov    0x2da6(%rip),%rax
mov    (%rax),%edi
call   1080 <glShadeModel@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.initLights.ambient = [4 x float] [float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 1.000000e+00]
@GL_LIGHT_MODEL_AMBIENT = global i32 0
@GL_COLOR_MATERIAL = global i32 0
@GL_LIGHTING = global i32 0
@GL_CULL_FACE = global i32 0
@GL_BACK = global i32 0
@GL_LIGHT1 = global i32 0
@GL_FRONT_AND_BACK = global i32 0
@GL_AMBIENT_AND_DIFFUSE = global i32 0
@GL_SMOOTH = global i32 0
define void @initLights() {
%1 = alloca [4 x float]
%2 = bitcast [4 x float]* %1 to i8*
%3 = load i32, i32* @GL_LIGHT_MODEL_AMBIENT
%4 = getelementptr inbounds [4 x float], [4 x float]* %1, i64 0, i64 0
%5 = call i32 @glLightModelfv(i32 %3, float* %4)
%6 = load i32, i32* @GL_COLOR_MATERIAL
%7 = call i32 @glEnable(i32 %6)
%8 = load i32, i32* @GL_LIGHTING
%9 = call i32 @glEnable(i32 %8)
%10 = load i32, i32* @GL_CULL_FACE
%11 = call i32 @glEnable(i32 %10)
%12 = load i32, i32* @GL_BACK
%13 = call i32 @glCullFace(i32 %12)
%14 = call i32 (...) @initLight0()
%15 = call i32 (...) @initLight1()
%16 = load i32, i32* @GL_LIGHT1
%17 = call i32 @glEnable(i32 %16)
%18 = load i32, i32* @GL_FRONT_AND_BACK
%19 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%20 = call i32 @glColorMaterial(i32 %18, i32 %19)
%21 = load i32, i32* @GL_SMOOTH
%22 = call i32 @glShadeModel(i32 %21)
ret void
}

LLVM IR (-O2):
@__const.initLights.ambient = [4 x float] [float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 1.000000e+00]
@GL_LIGHT_MODEL_AMBIENT = global i32 0
@GL_COLOR_MATERIAL = global i32 0
@GL_LIGHTING = global i32 0
@GL_CULL_FACE = global i32 0
@GL_BACK = global i32 0
@GL_LIGHT1 = global i32 0
@GL_FRONT_AND_BACK = global i32 0
@GL_AMBIENT_AND_DIFFUSE = global i32 0
@GL_SMOOTH = global i32 0
define void @initLights() {
%1 = alloca [4 x float]
%2 = bitcast [4 x float]* %1 to i8*
%3 = load i32, i32* @GL_LIGHT_MODEL_AMBIENT
%4 = getelementptr inbounds [4 x float], [4 x float]* %1, i64 0, i64 0
%5 = call i32 @glLightModelfv(i32 %3, float* %4)
%6 = load i32, i32* @GL_COLOR_MATERIAL
%7 = call i32 @glEnable(i32 %6)
%8 = load i32, i32* @GL_LIGHTING
%9 = call i32 @glEnable(i32 %8)
%10 = load i32, i32* @GL_CULL_FACE
%11 = call i32 @glEnable(i32 %10)
%12 = load i32, i32* @GL_BACK
%13 = call i32 @glCullFace(i32 %12)
%14 = call i32 (...) @initLight0()
%15 = call i32 (...) @initLight1()
%16 = load i32, i32* @GL_LIGHT1
%17 = call i32 @glEnable(i32 %16)
%18 = load i32, i32* @GL_FRONT_AND_BACK
%19 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%20 = call i32 @glColorMaterial(i32 %18, i32 %19)
%21 = load i32, i32* @GL_SMOOTH
%22 = call i32 @glShadeModel(i32 %21)
ret void
}