#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*/ GL_AMBIENT;
int /*<<< orphan*/ GL_DIFFUSE;
#define GL_FALSE 128
int /*<<< orphan*/ GL_FRONT_AND_BACK;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_LIGHT1;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_LIGHT_MODEL_AMBIENT;
int /*<<< orphan*/ GL_LIGHT_MODEL_TWO_SIDE;
int /*<<< orphan*/ GL_POSITION;
int /*<<< orphan*/ GL_SHININESS;
int /*<<< orphan*/ GL_SPECULAR;
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glLightModelfv(int /*<<< orphan*/, float *);
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, float *);
int /*<<< orphan*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/,
                                float *);
void InitMaterials(void) {
  static float ambient[] = {0.1, 0.1, 0.1, 1.0};
  static float diffuse[] = {0.5, 1.0, 1.0, 1.0};
  static float position0[] = {0.0, 0.0, 20.0, 0.0};
  static float position1[] = {0.0, 0.0, -20.0, 0.0};
  static float front_mat_shininess[] = {60.0};
  static float front_mat_specular[] = {0.2, 0.2, 0.2, 1.0};
  static float front_mat_diffuse[] = {0.5, 0.28, 0.38, 1.0};
  static float lmodel_ambient[] = {1.0, 1.0, 1.0, 1.0};
  static float lmodel_twoside[] = {GL_FALSE};
  glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
  glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse);
  glLightfv(GL_LIGHT0, GL_POSITION, position0);
  glEnable(GL_LIGHT0);
  glLightfv(GL_LIGHT1, GL_AMBIENT, ambient);
  glLightfv(GL_LIGHT1, GL_DIFFUSE, diffuse);
  glLightfv(GL_LIGHT1, GL_POSITION, position1);
  glEnable(GL_LIGHT1);
  glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
  glLightModelfv(GL_LIGHT_MODEL_TWO_SIDE, lmodel_twoside);
  glEnable(GL_LIGHTING);
  glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, front_mat_shininess);
  glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_mat_specular);
  glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, front_mat_diffuse);
}


x86 assembly (clang, -O0):
<InitMaterials>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e75(%rip),%rax
mov    (%rax),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%esi
lea    0x2ef3(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x2e57(%rip),%rax
mov    (%rax),%edi
mov    0x2e26(%rip),%rax
mov    (%rax),%esi
lea    0x2ee5(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x2e39(%rip),%rax
mov    (%rax),%edi
mov    0x2e20(%rip),%rax
mov    (%rax),%esi
lea    0x2ed7(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x2e1b(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2ddd(%rip),%rax
mov    (%rax),%edi
mov    0x2e34(%rip),%rax
mov    (%rax),%esi
lea    0x2e8b(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x2dbf(%rip),%rax
mov    (%rax),%edi
mov    0x2dbe(%rip),%rax
mov    (%rax),%esi
lea    0x2e7d(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x2da1(%rip),%rax
mov    (%rax),%edi
mov    0x2db8(%rip),%rax
mov    (%rax),%esi
lea    0x2e7f(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x2d83(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2db5(%rip),%rax
mov    (%rax),%edi
lea    0x2e9c(%rip),%rsi
call   1040 <glLightModelfv@plt>
mov    0x2d70(%rip),%rax
mov    (%rax),%edi
lea    0x2e97(%rip),%rsi
call   1040 <glLightModelfv@plt>
mov    0x2d63(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d75(%rip),%rax
mov    (%rax),%edi
mov    0x2d8c(%rip),%rax
mov    (%rax),%esi
lea    0x2e2b(%rip),%rdx
call   1060 <glMaterialfv@plt>
mov    0x2d57(%rip),%rax
mov    (%rax),%edi
mov    0x2d66(%rip),%rax
mov    (%rax),%esi
lea    0x2e1d(%rip),%rdx
call   1060 <glMaterialfv@plt>
mov    0x2d39(%rip),%rax
mov    (%rax),%edi
mov    0x2d00(%rip),%rax
mov    (%rax),%esi
lea    0x2e0f(%rip),%rdx
call   1060 <glMaterialfv@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitMaterials>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2e6e(%rip),%rbp
mov    0x0(%rbp),%edi
mov    0x2e94(%rip),%r12
mov    (%r12),%esi
lea    0x2ee9(%rip),%r14
mov    %r14,%rdx
call   1030 <glLightfv@plt>
mov    0x0(%rbp),%edi
mov    0x2e1f(%rip),%r15
mov    (%r15),%esi
lea    0x2edd(%rip),%r13
mov    %r13,%rdx
call   1030 <glLightfv@plt>
mov    0x0(%rbp),%edi
mov    0x2e1b(%rip),%rbx
mov    (%rbx),%esi
lea    0x2ed2(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x0(%rbp),%edi
call   1050 <glEnable@plt>
mov    0x2dde(%rip),%rbp
mov    0x0(%rbp),%edi
mov    (%r12),%esi
mov    %r14,%rdx
call   1030 <glLightfv@plt>
mov    0x0(%rbp),%edi
mov    (%r15),%esi
mov    %r13,%rdx
call   1030 <glLightfv@plt>
mov    0x0(%rbp),%edi
mov    (%rbx),%esi
lea    0x2ea5(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x0(%rbp),%edi
call   1050 <glEnable@plt>
mov    0x2de1(%rip),%rax
mov    (%rax),%edi
lea    0x2ec8(%rip),%rsi
call   1040 <glLightModelfv@plt>
mov    0x2d9c(%rip),%rax
mov    (%rax),%edi
lea    0x2ec3(%rip),%rsi
call   1040 <glLightModelfv@plt>
mov    0x2d8f(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2da1(%rip),%rbx
mov    (%rbx),%edi
mov    0x2db8(%rip),%rax
mov    (%rax),%esi
lea    0x2e57(%rip),%rdx
call   1060 <glMaterialfv@plt>
mov    (%rbx),%edi
mov    0x2d99(%rip),%rax
mov    (%rax),%esi
lea    0x2e50(%rip),%rdx
call   1060 <glMaterialfv@plt>
mov    (%rbx),%edi
mov    (%r15),%esi
lea    0x2e4f(%rip),%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <glMaterialfv@plt>

LLVM IR (-O0):
@InitMaterials.ambient = internal global [4 x float] [float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 1.000000e+00]
@InitMaterials.diffuse = internal global [4 x float] [float 5.000000e-01, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00]
@InitMaterials.position0 = internal global [4 x float] [float 0.000000e+00, float 0.000000e+00, float 2.000000e+01, float 0.000000e+00]
@InitMaterials.position1 = internal global [4 x float] [float 0.000000e+00, float 0.000000e+00, float -2.000000e+01, float 0.000000e+00]
@InitMaterials.front_mat_shininess = internal global [1 x float] [float 6.000000e+01]
@InitMaterials.front_mat_specular = internal global [4 x float] [float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 1.000000e+00]
@InitMaterials.front_mat_diffuse = internal global [4 x float] [float 5.000000e-01, float 0x3FD1EB8520000000, float 0x3FD851EB80000000, float 1.000000e+00]
@InitMaterials.lmodel_ambient = internal global [4 x float] [float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00]
@InitMaterials.lmodel_twoside = internal global [1 x float] [float 1.280000e+02]
@GL_LIGHT0 = global i32 0
@GL_AMBIENT = global i32 0
@GL_DIFFUSE = global i32 0
@GL_POSITION = global i32 0
@GL_LIGHT1 = global i32 0
@GL_LIGHT_MODEL_AMBIENT = global i32 0
@GL_LIGHT_MODEL_TWO_SIDE = global i32 0
@GL_LIGHTING = global i32 0
@GL_FRONT_AND_BACK = global i32 0
@GL_SHININESS = global i32 0
@GL_SPECULAR = global i32 0
define void @InitMaterials() {
%1 = load i32, i32* @GL_LIGHT0
%2 = load i32, i32* @GL_AMBIENT
%3 = call i32 @glLightfv(i32 %1, i32 %2, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.ambient, i64 0, i64 0))
%4 = load i32, i32* @GL_LIGHT0
%5 = load i32, i32* @GL_DIFFUSE
%6 = call i32 @glLightfv(i32 %4, i32 %5, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.diffuse, i64 0, i64 0))
%7 = load i32, i32* @GL_LIGHT0
%8 = load i32, i32* @GL_POSITION
%9 = call i32 @glLightfv(i32 %7, i32 %8, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.position0, i64 0, i64 0))
%10 = load i32, i32* @GL_LIGHT0
%11 = call i32 @glEnable(i32 %10)
%12 = load i32, i32* @GL_LIGHT1
%13 = load i32, i32* @GL_AMBIENT
%14 = call i32 @glLightfv(i32 %12, i32 %13, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.ambient, i64 0, i64 0))
%15 = load i32, i32* @GL_LIGHT1
%16 = load i32, i32* @GL_DIFFUSE
%17 = call i32 @glLightfv(i32 %15, i32 %16, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.diffuse, i64 0, i64 0))
%18 = load i32, i32* @GL_LIGHT1
%19 = load i32, i32* @GL_POSITION
%20 = call i32 @glLightfv(i32 %18, i32 %19, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.position1, i64 0, i64 0))
%21 = load i32, i32* @GL_LIGHT1
%22 = call i32 @glEnable(i32 %21)
%23 = load i32, i32* @GL_LIGHT_MODEL_AMBIENT
%24 = call i32 @glLightModelfv(i32 %23, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.lmodel_ambient, i64 0, i64 0))
%25 = load i32, i32* @GL_LIGHT_MODEL_TWO_SIDE
%26 = call i32 @glLightModelfv(i32 %25, float* getelementptr inbounds ([1 x float], [1 x float]* @InitMaterials.lmodel_twoside, i64 0, i64 0))
%27 = load i32, i32* @GL_LIGHTING
%28 = call i32 @glEnable(i32 %27)
%29 = load i32, i32* @GL_FRONT_AND_BACK
%30 = load i32, i32* @GL_SHININESS
%31 = call i32 @glMaterialfv(i32 %29, i32 %30, float* getelementptr inbounds ([1 x float], [1 x float]* @InitMaterials.front_mat_shininess, i64 0, i64 0))
%32 = load i32, i32* @GL_FRONT_AND_BACK
%33 = load i32, i32* @GL_SPECULAR
%34 = call i32 @glMaterialfv(i32 %32, i32 %33, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.front_mat_specular, i64 0, i64 0))
%35 = load i32, i32* @GL_FRONT_AND_BACK
%36 = load i32, i32* @GL_DIFFUSE
%37 = call i32 @glMaterialfv(i32 %35, i32 %36, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.front_mat_diffuse, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@InitMaterials.ambient = internal global [4 x float] [float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 1.000000e+00]
@InitMaterials.diffuse = internal global [4 x float] [float 5.000000e-01, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00]
@InitMaterials.position0 = internal global [4 x float] [float 0.000000e+00, float 0.000000e+00, float 2.000000e+01, float 0.000000e+00]
@InitMaterials.position1 = internal global [4 x float] [float 0.000000e+00, float 0.000000e+00, float -2.000000e+01, float 0.000000e+00]
@InitMaterials.front_mat_shininess = internal global [1 x float] [float 6.000000e+01]
@InitMaterials.front_mat_specular = internal global [4 x float] [float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 0x3FC99999A0000000, float 1.000000e+00]
@InitMaterials.front_mat_diffuse = internal global [4 x float] [float 5.000000e-01, float 0x3FD1EB8520000000, float 0x3FD851EB80000000, float 1.000000e+00]
@InitMaterials.lmodel_ambient = internal global [4 x float] [float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00]
@InitMaterials.lmodel_twoside = internal global [1 x float] [float 1.280000e+02]
@GL_LIGHT0 = global i32 0
@GL_AMBIENT = global i32 0
@GL_DIFFUSE = global i32 0
@GL_POSITION = global i32 0
@GL_LIGHT1 = global i32 0
@GL_LIGHT_MODEL_AMBIENT = global i32 0
@GL_LIGHT_MODEL_TWO_SIDE = global i32 0
@GL_LIGHTING = global i32 0
@GL_FRONT_AND_BACK = global i32 0
@GL_SHININESS = global i32 0
@GL_SPECULAR = global i32 0
define void @InitMaterials() {
%1 = load i32, i32* @GL_LIGHT0
%2 = load i32, i32* @GL_AMBIENT
%3 = tail call i32 @glLightfv(i32 %1, i32 %2, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.ambient, i64 0, i64 0))
%4 = load i32, i32* @GL_LIGHT0
%5 = load i32, i32* @GL_DIFFUSE
%6 = tail call i32 @glLightfv(i32 %4, i32 %5, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.diffuse, i64 0, i64 0))
%7 = load i32, i32* @GL_LIGHT0
%8 = load i32, i32* @GL_POSITION
%9 = tail call i32 @glLightfv(i32 %7, i32 %8, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.position0, i64 0, i64 0))
%10 = load i32, i32* @GL_LIGHT0
%11 = tail call i32 @glEnable(i32 %10)
%12 = load i32, i32* @GL_LIGHT1
%13 = load i32, i32* @GL_AMBIENT
%14 = tail call i32 @glLightfv(i32 %12, i32 %13, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.ambient, i64 0, i64 0))
%15 = load i32, i32* @GL_LIGHT1
%16 = load i32, i32* @GL_DIFFUSE
%17 = tail call i32 @glLightfv(i32 %15, i32 %16, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.diffuse, i64 0, i64 0))
%18 = load i32, i32* @GL_LIGHT1
%19 = load i32, i32* @GL_POSITION
%20 = tail call i32 @glLightfv(i32 %18, i32 %19, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.position1, i64 0, i64 0))
%21 = load i32, i32* @GL_LIGHT1
%22 = tail call i32 @glEnable(i32 %21)
%23 = load i32, i32* @GL_LIGHT_MODEL_AMBIENT
%24 = tail call i32 @glLightModelfv(i32 %23, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.lmodel_ambient, i64 0, i64 0))
%25 = load i32, i32* @GL_LIGHT_MODEL_TWO_SIDE
%26 = tail call i32 @glLightModelfv(i32 %25, float* getelementptr inbounds ([1 x float], [1 x float]* @InitMaterials.lmodel_twoside, i64 0, i64 0))
%27 = load i32, i32* @GL_LIGHTING
%28 = tail call i32 @glEnable(i32 %27)
%29 = load i32, i32* @GL_FRONT_AND_BACK
%30 = load i32, i32* @GL_SHININESS
%31 = tail call i32 @glMaterialfv(i32 %29, i32 %30, float* getelementptr inbounds ([1 x float], [1 x float]* @InitMaterials.front_mat_shininess, i64 0, i64 0))
%32 = load i32, i32* @GL_FRONT_AND_BACK
%33 = load i32, i32* @GL_SPECULAR
%34 = tail call i32 @glMaterialfv(i32 %32, i32 %33, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.front_mat_specular, i64 0, i64 0))
%35 = load i32, i32* @GL_FRONT_AND_BACK
%36 = load i32, i32* @GL_DIFFUSE
%37 = tail call i32 @glMaterialfv(i32 %35, i32 %36, float* getelementptr inbounds ([4 x float], [4 x float]* @InitMaterials.front_mat_diffuse, i64 0, i64 0))
ret void
}