#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_BLEND;
int /*<<< orphan*/ GL_COLOR_MATERIAL;
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_DIFFUSE;
int /*<<< orphan*/ GL_DITHER;
int /*<<< orphan*/ GL_FRONT;
int /*<<< orphan*/ GL_FRONT_AND_BACK;
int /*<<< orphan*/ GL_LEQUAL;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_LIGHT1;
int /*<<< orphan*/ GL_LIGHT2;
int /*<<< orphan*/ GL_LIGHT3;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_LINE_SMOOTH;
int /*<<< orphan*/ GL_NORMALIZE;
int /*<<< orphan*/ GL_POSITION;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ GL_SHININESS;
int /*<<< orphan*/ GL_SPECULAR;
int /*<<< orphan*/ GL_TEXTURE_RECTANGLE_ARB;
int /*<<< orphan*/ glClearColor(int, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ glDepthFunc(int /*<<< orphan*/);
int /*<<< orphan*/ glDepthRange(int /*<<< orphan*/, double);
int /*<<< orphan*/ glDisable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, float *);
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMaterialiv(int /*<<< orphan*/, int /*<<< orphan*/, int *);
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ gluPerspective(double, float, double, double);
void initOpenGL(int iWidth, int iHeight) {
  glClearColor(1, 1, 1, 0);
  glDisable(GL_DITHER);
  glDisable(GL_NORMALIZE);
  glEnable(GL_COLOR_MATERIAL);
  glDisable(GL_TEXTURE_RECTANGLE_ARB);
  glEnable(GL_LIGHTING);
  glEnable(GL_LIGHT3);
  glEnable(GL_DEPTH_TEST);
  glDepthFunc(GL_LEQUAL);
  glDepthRange(0, 0.2);
  glDisable(GL_BLEND);
  glDisable(GL_LINE_SMOOTH);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluPerspective(45.0, ((float)iWidth) / ((float)iHeight), 1.0, 400.0);
  float light_intensity[] = {1, 1, 1, 0};
  float light_position0[] = {5, 10, 5, 0};
  glLightfv(GL_LIGHT0, GL_POSITION, light_position0);
  glLightfv(GL_LIGHT0, GL_DIFFUSE, light_intensity);
  float light_position1[] = {-5, 10, 5, 0};
  glLightfv(GL_LIGHT1, GL_POSITION, light_position1);
  glLightfv(GL_LIGHT1, GL_DIFFUSE, light_intensity);
  float light_position2[] = {-5, 10, -5, 0};
  glLightfv(GL_LIGHT2, GL_POSITION, light_position2);
  glLightfv(GL_LIGHT2, GL_DIFFUSE, light_intensity);
  float light_position3[] = {0, 0, 10, 0};
  glLightfv(GL_LIGHT3, GL_POSITION, light_position3);
  glLightfv(GL_LIGHT3, GL_DIFFUSE, light_intensity);
  int mat_ambient[] = {1, 1, 1, 1};
  int mat_specular[] = {1, 1, 1, 1};
  int mat_shininess[] = {90};
  glMaterialiv(GL_FRONT_AND_BACK, GL_AMBIENT, mat_ambient);
  glMaterialiv(GL_FRONT, GL_SPECULAR, mat_specular);
  glMaterialiv(GL_FRONT, GL_SHININESS, mat_shininess);
}


x86 assembly (clang, -O0):
<initOpenGL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %edx,%edi
mov    %edx,%esi
call   1080 <glClearColor@plt>
mov    0x2dd0(%rip),%rax
mov    (%rax),%edi
call   10b0 <glDisable@plt>
mov    0x2daa(%rip),%rax
mov    (%rax),%edi
call   10b0 <glDisable@plt>
mov    0x2dbc(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2dc6(%rip),%rax
mov    (%rax),%edi
call   10b0 <glDisable@plt>
mov    0x2d68(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d32(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d34(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d4e(%rip),%rax
mov    (%rax),%edi
call   1070 <glDepthFunc@plt>
xor    %edi,%edi
movsd  0xddd(%rip),%xmm0
call   10c0 <glDepthRange@plt>
mov    0x2d81(%rip),%rax
mov    (%rax),%edi
call   10b0 <glDisable@plt>
mov    0x2d0b(%rip),%rax
mov    (%rax),%edi
call   10b0 <glDisable@plt>
mov    0x2d0d(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
mov    $0x0,%al
call   1090 <glLoadIdentity@plt>
cvtsi2ssl -0x4(%rbp),%xmm1
cvtsi2ssl -0x8(%rbp),%xmm0
divss  %xmm0,%xmm1
movsd  0xd79(%rip),%xmm0
movsd  0xd79(%rip),%xmm2
movsd  0xd79(%rip),%xmm3
call   1060 <gluPerspective@plt>
mov    0xd7d(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xd7a(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xd77(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xd74(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2ce1(%rip),%rax
mov    (%rax),%edi
mov    0x2cb0(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2cc6(%rip),%rax
mov    (%rax),%edi
mov    0x2c65(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0xd3b(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xd38(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0x2c2d(%rip),%rax
mov    (%rax),%edi
mov    0x2c64(%rip),%rax
mov    (%rax),%esi
lea    -0x40(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2c12(%rip),%rax
mov    (%rax),%edi
mov    0x2c19(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0xcff(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xcfc(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0x2c41(%rip),%rax
mov    (%rax),%edi
mov    0x2c18(%rip),%rax
mov    (%rax),%esi
lea    -0x50(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2c26(%rip),%rax
mov    (%rax),%edi
mov    0x2bcd(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0xcc3(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xcc0(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0x2b8d(%rip),%rax
mov    (%rax),%edi
mov    0x2bcc(%rip),%rax
mov    (%rax),%esi
lea    -0x60(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2b72(%rip),%rax
mov    (%rax),%edi
mov    0x2b81(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0xc87(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xc84(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xc71(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xc6e(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xc6c(%rip),%eax
mov    %eax,-0x84(%rbp)
mov    0x2b9f(%rip),%rax
mov    (%rax),%edi
mov    0x2bc6(%rip),%rax
mov    (%rax),%esi
lea    -0x70(%rbp),%rdx
call   10a0 <glMaterialiv@plt>
mov    0x2b94(%rip),%rax
mov    (%rax),%edi
mov    0x2b9b(%rip),%rax
mov    (%rax),%esi
lea    -0x80(%rbp),%rdx
call   10a0 <glMaterialiv@plt>
mov    0x2b79(%rip),%rax
mov    (%rax),%edi
mov    0x2b88(%rip),%rax
mov    (%rax),%esi
lea    -0x84(%rbp),%rdx
call   10a0 <glMaterialiv@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initOpenGL>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x80,%rsp
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1080 <glClearColor@plt>
mov    0x2dc8(%rip),%rax
mov    (%rax),%edi
call   10b0 <glDisable@plt>
mov    0x2da2(%rip),%rax
mov    (%rax),%edi
call   10b0 <glDisable@plt>
mov    0x2db4(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2dbe(%rip),%rax
mov    (%rax),%edi
call   10b0 <glDisable@plt>
mov    0x2d60(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d2a(%rip),%r14
mov    (%r14),%edi
call   1050 <glEnable@plt>
mov    0x2d2b(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d45(%rip),%rax
mov    (%rax),%edi
call   1070 <glDepthFunc@plt>
movsd  0xdbe(%rip),%xmm0
xor    %edi,%edi
call   10c0 <glDepthRange@plt>
mov    0x2d78(%rip),%rax
mov    (%rax),%edi
call   10b0 <glDisable@plt>
mov    0x2d02(%rip),%rax
mov    (%rax),%edi
call   10b0 <glDisable@plt>
mov    0x2d04(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
xor    %eax,%eax
call   1090 <glLoadIdentity@plt>
cvtsi2ss %ebp,%xmm1
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
divss  %xmm0,%xmm1
movsd  0xd77(%rip),%xmm0
movsd  0xd77(%rip),%xmm2
movsd  0xd77(%rip),%xmm3
call   1060 <gluPerspective@plt>
movaps 0xd73(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xd77(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
mov    0x2ceb(%rip),%rbx
mov    (%rbx),%edi
mov    0x2cba(%rip),%r15
mov    (%r15),%esi
lea    0x60(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x2c74(%rip),%rbp
mov    0x0(%rbp),%esi
lea    0x70(%rsp),%r12
mov    %r12,%rdx
call   1030 <glLightfv@plt>
movaps 0xd45(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
mov    0x2c41(%rip),%rbx
mov    (%rbx),%edi
mov    (%r15),%esi
lea    0x50(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x0(%rbp),%esi
mov    %r12,%rdx
call   1030 <glLightfv@plt>
movaps 0xd26(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
mov    0x2c72(%rip),%rbx
mov    (%rbx),%edi
mov    (%r15),%esi
lea    0x40(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x0(%rbp),%esi
mov    %r12,%rdx
call   1030 <glLightfv@plt>
movaps 0xd07(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
mov    (%r14),%edi
mov    (%r15),%esi
lea    0x30(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    (%r14),%edi
mov    0x0(%rbp),%esi
mov    %r12,%rdx
call   1030 <glLightfv@plt>
movaps 0xced(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movl   $0x5a,0xc(%rsp)
mov    0x2c24(%rip),%rax
mov    (%rax),%edi
mov    0x2c4b(%rip),%rax
mov    (%rax),%esi
lea    0x20(%rsp),%rdx
call   10a0 <glMaterialiv@plt>
mov    0x2c18(%rip),%rbx
mov    (%rbx),%edi
mov    0x2c1f(%rip),%rax
mov    (%rax),%esi
lea    0x10(%rsp),%rdx
call   10a0 <glMaterialiv@plt>
mov    (%rbx),%edi
mov    0x2c12(%rip),%rax
mov    (%rax),%esi
lea    0xc(%rsp),%rdx
call   10a0 <glMaterialiv@plt>
add    $0x80,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@GL_DITHER = global i32 0
@GL_NORMALIZE = global i32 0
@GL_COLOR_MATERIAL = global i32 0
@GL_TEXTURE_RECTANGLE_ARB = global i32 0
@GL_LIGHTING = global i32 0
@GL_LIGHT3 = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_LEQUAL = global i32 0
@GL_BLEND = global i32 0
@GL_LINE_SMOOTH = global i32 0
@GL_PROJECTION = global i32 0
@__const.initOpenGL.light_intensity = [4 x float] [float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00]
@__const.initOpenGL.light_position0 = [4 x float] [float 5.000000e+00, float 1.000000e+01, float 5.000000e+00, float 0.000000e+00]
@GL_LIGHT0 = global i32 0
@GL_POSITION = global i32 0
@GL_DIFFUSE = global i32 0
@__const.initOpenGL.light_position1 = [4 x float] [float -5.000000e+00, float 1.000000e+01, float 5.000000e+00, float 0.000000e+00]
@GL_LIGHT1 = global i32 0
@__const.initOpenGL.light_position2 = [4 x float] [float -5.000000e+00, float 1.000000e+01, float -5.000000e+00, float 0.000000e+00]
@GL_LIGHT2 = global i32 0
@__const.initOpenGL.light_position3 = [4 x float] [float 0.000000e+00, float 0.000000e+00, float 1.000000e+01, float 0.000000e+00]
@__const.initOpenGL.mat_ambient = [4 x i32] [i32 1, i32 1, i32 1, i32 1]
@__const.initOpenGL.mat_specular = [4 x i32] [i32 1, i32 1, i32 1, i32 1]
@__const.initOpenGL.mat_shininess = [1 x i32] [i32 90]
@GL_FRONT_AND_BACK = global i32 0
@GL_AMBIENT = global i32 0
@GL_FRONT = global i32 0
@GL_SPECULAR = global i32 0
@GL_SHININESS = global i32 0
define void @initOpenGL(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [4 x float]
%6 = alloca [4 x float]
%7 = alloca [4 x float]
%8 = alloca [4 x float]
%9 = alloca [4 x float]
%10 = alloca [4 x i32]
%11 = alloca [4 x i32]
%12 = alloca [1 x i32]
store i32 %0, i32* %3
store i32 %1, i32* %4
%13 = call i32 @glClearColor(i32 1, i32 1, i32 1, i32 0)
%14 = load i32, i32* @GL_DITHER
%15 = call i32 @glDisable(i32 %14)
%16 = load i32, i32* @GL_NORMALIZE
%17 = call i32 @glDisable(i32 %16)
%18 = load i32, i32* @GL_COLOR_MATERIAL
%19 = call i32 @glEnable(i32 %18)
%20 = load i32, i32* @GL_TEXTURE_RECTANGLE_ARB
%21 = call i32 @glDisable(i32 %20)
%22 = load i32, i32* @GL_LIGHTING
%23 = call i32 @glEnable(i32 %22)
%24 = load i32, i32* @GL_LIGHT3
%25 = call i32 @glEnable(i32 %24)
%26 = load i32, i32* @GL_DEPTH_TEST
%27 = call i32 @glEnable(i32 %26)
%28 = load i32, i32* @GL_LEQUAL
%29 = call i32 @glDepthFunc(i32 %28)
%30 = call i32 @glDepthRange(i32 0, double 2.000000e-01)
%31 = load i32, i32* @GL_BLEND
%32 = call i32 @glDisable(i32 %31)
%33 = load i32, i32* @GL_LINE_SMOOTH
%34 = call i32 @glDisable(i32 %33)
%35 = load i32, i32* @GL_PROJECTION
%36 = call i32 @glMatrixMode(i32 %35)
%37 = call i32 (...) @glLoadIdentity()
%38 = load i32, i32* %3
%39 = sitofp i32 %38 to float
%40 = load i32, i32* %4
%41 = sitofp i32 %40 to float
%42 = fdiv float %39, %41
%43 = call i32 @gluPerspective(double 4.500000e+01, float %42, double 1.000000e+00, double 4.000000e+02)
%44 = bitcast [4 x float]* %5 to i8*
%45 = bitcast [4 x float]* %6 to i8*
%46 = load i32, i32* @GL_LIGHT0
%47 = load i32, i32* @GL_POSITION
%48 = getelementptr inbounds [4 x float], [4 x float]* %6, i64 0, i64 0
%49 = call i32 @glLightfv(i32 %46, i32 %47, float* %48)
%50 = load i32, i32* @GL_LIGHT0
%51 = load i32, i32* @GL_DIFFUSE
%52 = getelementptr inbounds [4 x float], [4 x float]* %5, i64 0, i64 0
%53 = call i32 @glLightfv(i32 %50, i32 %51, float* %52)
%54 = bitcast [4 x float]* %7 to i8*
%55 = load i32, i32* @GL_LIGHT1
%56 = load i32, i32* @GL_POSITION
%57 = getelementptr inbounds [4 x float], [4 x float]* %7, i64 0, i64 0
%58 = call i32 @glLightfv(i32 %55, i32 %56, float* %57)
%59 = load i32, i32* @GL_LIGHT1
%60 = load i32, i32* @GL_DIFFUSE
%61 = getelementptr inbounds [4 x float], [4 x float]* %5, i64 0, i64 0
%62 = call i32 @glLightfv(i32 %59, i32 %60, float* %61)
%63 = bitcast [4 x float]* %8 to i8*
%64 = load i32, i32* @GL_LIGHT2
%65 = load i32, i32* @GL_POSITION
%66 = getelementptr inbounds [4 x float], [4 x float]* %8, i64 0, i64 0
%67 = call i32 @glLightfv(i32 %64, i32 %65, float* %66)
%68 = load i32, i32* @GL_LIGHT2
%69 = load i32, i32* @GL_DIFFUSE
%70 = getelementptr inbounds [4 x float], [4 x float]* %5, i64 0, i64 0
%71 = call i32 @glLightfv(i32 %68, i32 %69, float* %70)
%72 = bitcast [4 x float]* %9 to i8*
%73 = load i32, i32* @GL_LIGHT3
%74 = load i32, i32* @GL_POSITION
%75 = getelementptr inbounds [4 x float], [4 x float]* %9, i64 0, i64 0
%76 = call i32 @glLightfv(i32 %73, i32 %74, float* %75)
%77 = load i32, i32* @GL_LIGHT3
%78 = load i32, i32* @GL_DIFFUSE
%79 = getelementptr inbounds [4 x float], [4 x float]* %5, i64 0, i64 0
%80 = call i32 @glLightfv(i32 %77, i32 %78, float* %79)
%81 = bitcast [4 x i32]* %10 to i8*
%82 = bitcast [4 x i32]* %11 to i8*
%83 = bitcast [1 x i32]* %12 to i8*
%84 = load i32, i32* @GL_FRONT_AND_BACK
%85 = load i32, i32* @GL_AMBIENT
%86 = getelementptr inbounds [4 x i32], [4 x i32]* %10, i64 0, i64 0
%87 = call i32 @glMaterialiv(i32 %84, i32 %85, i32* %86)
%88 = load i32, i32* @GL_FRONT
%89 = load i32, i32* @GL_SPECULAR
%90 = getelementptr inbounds [4 x i32], [4 x i32]* %11, i64 0, i64 0
%91 = call i32 @glMaterialiv(i32 %88, i32 %89, i32* %90)
%92 = load i32, i32* @GL_FRONT
%93 = load i32, i32* @GL_SHININESS
%94 = getelementptr inbounds [1 x i32], [1 x i32]* %12, i64 0, i64 0
%95 = call i32 @glMaterialiv(i32 %92, i32 %93, i32* %94)
ret void
}

LLVM IR (-O2):
@GL_DITHER = global i32 0
@GL_NORMALIZE = global i32 0
@GL_COLOR_MATERIAL = global i32 0
@GL_TEXTURE_RECTANGLE_ARB = global i32 0
@GL_LIGHTING = global i32 0
@GL_LIGHT3 = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_LEQUAL = global i32 0
@GL_BLEND = global i32 0
@GL_LINE_SMOOTH = global i32 0
@GL_PROJECTION = global i32 0
@__const.initOpenGL.light_intensity = [4 x float] [float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00]
@__const.initOpenGL.light_position0 = [4 x float] [float 5.000000e+00, float 1.000000e+01, float 5.000000e+00, float 0.000000e+00]
@GL_LIGHT0 = global i32 0
@GL_POSITION = global i32 0
@GL_DIFFUSE = global i32 0
@__const.initOpenGL.light_position1 = [4 x float] [float -5.000000e+00, float 1.000000e+01, float 5.000000e+00, float 0.000000e+00]
@GL_LIGHT1 = global i32 0
@__const.initOpenGL.light_position2 = [4 x float] [float -5.000000e+00, float 1.000000e+01, float -5.000000e+00, float 0.000000e+00]
@GL_LIGHT2 = global i32 0
@__const.initOpenGL.light_position3 = [4 x float] [float 0.000000e+00, float 0.000000e+00, float 1.000000e+01, float 0.000000e+00]
@__const.initOpenGL.mat_specular = [4 x i32] [i32 1, i32 1, i32 1, i32 1]
@GL_FRONT_AND_BACK = global i32 0
@GL_AMBIENT = global i32 0
@GL_FRONT = global i32 0
@GL_SPECULAR = global i32 0
@GL_SHININESS = global i32 0
define void @initOpenGL(i32 %0, i32 %1) {
%3 = alloca [4 x float]
%4 = alloca [4 x float]
%5 = alloca [4 x float]
%6 = alloca [4 x float]
%7 = alloca [4 x float]
%8 = alloca [4 x i32]
%9 = alloca [4 x i32]
%10 = alloca [1 x i32]
%11 = tail call i32 @glClearColor(i32 1, i32 1, i32 1, i32 0)
%12 = load i32, i32* @GL_DITHER
%13 = tail call i32 @glDisable(i32 %12)
%14 = load i32, i32* @GL_NORMALIZE
%15 = tail call i32 @glDisable(i32 %14)
%16 = load i32, i32* @GL_COLOR_MATERIAL
%17 = tail call i32 @glEnable(i32 %16)
%18 = load i32, i32* @GL_TEXTURE_RECTANGLE_ARB
%19 = tail call i32 @glDisable(i32 %18)
%20 = load i32, i32* @GL_LIGHTING
%21 = tail call i32 @glEnable(i32 %20)
%22 = load i32, i32* @GL_LIGHT3
%23 = tail call i32 @glEnable(i32 %22)
%24 = load i32, i32* @GL_DEPTH_TEST
%25 = tail call i32 @glEnable(i32 %24)
%26 = load i32, i32* @GL_LEQUAL
%27 = tail call i32 @glDepthFunc(i32 %26)
%28 = tail call i32 @glDepthRange(i32 0, double 2.000000e-01)
%29 = load i32, i32* @GL_BLEND
%30 = tail call i32 @glDisable(i32 %29)
%31 = load i32, i32* @GL_LINE_SMOOTH
%32 = tail call i32 @glDisable(i32 %31)
%33 = load i32, i32* @GL_PROJECTION
%34 = tail call i32 @glMatrixMode(i32 %33)
%35 = tail call i32 (...) @glLoadIdentity()
%36 = sitofp i32 %0 to float
%37 = sitofp i32 %1 to float
%38 = fdiv float %36, %37
%39 = tail call i32 @gluPerspective(double 4.500000e+01, float %38, double 1.000000e+00, double 4.000000e+02)
%40 = bitcast [4 x float]* %3 to i8*
%41 = bitcast [4 x float]* %4 to i8*
%42 = load i32, i32* @GL_LIGHT0
%43 = load i32, i32* @GL_POSITION
%44 = getelementptr inbounds [4 x float], [4 x float]* %4, i64 0, i64 0
%45 = call i32 @glLightfv(i32 %42, i32 %43, float* %44)
%46 = load i32, i32* @GL_LIGHT0
%47 = load i32, i32* @GL_DIFFUSE
%48 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 0
%49 = call i32 @glLightfv(i32 %46, i32 %47, float* %48)
%50 = bitcast [4 x float]* %5 to i8*
%51 = load i32, i32* @GL_LIGHT1
%52 = load i32, i32* @GL_POSITION
%53 = getelementptr inbounds [4 x float], [4 x float]* %5, i64 0, i64 0
%54 = call i32 @glLightfv(i32 %51, i32 %52, float* %53)
%55 = load i32, i32* @GL_LIGHT1
%56 = load i32, i32* @GL_DIFFUSE
%57 = call i32 @glLightfv(i32 %55, i32 %56, float* %48)
%58 = bitcast [4 x float]* %6 to i8*
%59 = load i32, i32* @GL_LIGHT2
%60 = load i32, i32* @GL_POSITION
%61 = getelementptr inbounds [4 x float], [4 x float]* %6, i64 0, i64 0
%62 = call i32 @glLightfv(i32 %59, i32 %60, float* %61)
%63 = load i32, i32* @GL_LIGHT2
%64 = load i32, i32* @GL_DIFFUSE
%65 = call i32 @glLightfv(i32 %63, i32 %64, float* %48)
%66 = bitcast [4 x float]* %7 to i8*
%67 = load i32, i32* @GL_LIGHT3
%68 = load i32, i32* @GL_POSITION
%69 = getelementptr inbounds [4 x float], [4 x float]* %7, i64 0, i64 0
%70 = call i32 @glLightfv(i32 %67, i32 %68, float* %69)
%71 = load i32, i32* @GL_LIGHT3
%72 = load i32, i32* @GL_DIFFUSE
%73 = call i32 @glLightfv(i32 %71, i32 %72, float* %48)
%74 = bitcast [4 x i32]* %8 to i8*
%75 = bitcast [4 x i32]* %9 to i8*
%76 = bitcast [1 x i32]* %10 to i8*
%77 = getelementptr inbounds [1 x i32], [1 x i32]* %10, i64 0, i64 0
store i32 90, i32* %77
%78 = load i32, i32* @GL_FRONT_AND_BACK
%79 = load i32, i32* @GL_AMBIENT
%80 = getelementptr inbounds [4 x i32], [4 x i32]* %8, i64 0, i64 0
%81 = call i32 @glMaterialiv(i32 %78, i32 %79, i32* %80)
%82 = load i32, i32* @GL_FRONT
%83 = load i32, i32* @GL_SPECULAR
%84 = getelementptr inbounds [4 x i32], [4 x i32]* %9, i64 0, i64 0
%85 = call i32 @glMaterialiv(i32 %82, i32 %83, i32* %84)
%86 = load i32, i32* @GL_FRONT
%87 = load i32, i32* @GL_SHININESS
%88 = call i32 @glMaterialiv(i32 %86, i32 %87, i32* %77)
ret void
}