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

/* Variables and functions */
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_LESS;
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ GL_TEXTURE_2D;
int /*<<< orphan*/ LoadGLTextures();
int /*<<< orphan*/ glClearColor(float, float, float, float);
int /*<<< orphan*/ glClearDepth(double);
int /*<<< orphan*/ glDepthFunc(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
int /*<<< orphan*/ gluPerspective(float, int, float, float);
void InitGL(int Width, int Height) {
  LoadGLTextures();
  glEnable(GL_TEXTURE_2D);
  glClearColor(0.0f, 0.0f, 1.0f, 0.0f);
  glClearDepth(1.0);
  glDepthFunc(GL_LESS);
  glEnable(GL_DEPTH_TEST);
  glShadeModel(GL_SMOOTH);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluPerspective(45.0f, (GLfloat)Width / (GLfloat)Height, 0.1f, 100.0f);
  glMatrixMode(GL_MODELVIEW);
}


x86 assembly (clang, -O0):
<InitGL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1060 <LoadGLTextures@plt>
mov    0x2e2c(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
xorps  %xmm3,%xmm3
movss  0xe4e(%rip),%xmm2
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
call   1080 <glClearColor@plt>
movsd  0xe3f(%rip),%xmm0
call   10a0 <glClearDepth@plt>
mov    0x2dd3(%rip),%rax
mov    (%rax),%edi
call   1070 <glDepthFunc@plt>
mov    0x2dd5(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2dcf(%rip),%rax
mov    (%rax),%edi
call   10b0 <glShadeModel@plt>
mov    0x2dc9(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1090 <glLoadIdentity@plt>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%edi
movss  0xdda(%rip),%xmm0
movss  0xdd6(%rip),%xmm1
movss  0xdd2(%rip),%xmm2
call   1050 <gluPerspective@plt>
mov    0x2da6(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitGL>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1060 <LoadGLTextures@plt>
mov    0x2e33(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
movss  0xe4c(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm3,%xmm3
call   1080 <glClearColor@plt>
movsd  0xe46(%rip),%xmm0
call   10a0 <glClearDepth@plt>
mov    0x2dda(%rip),%rax
mov    (%rax),%edi
call   1070 <glDepthFunc@plt>
mov    0x2ddc(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2dd6(%rip),%rax
mov    (%rax),%edi
call   10b0 <glShadeModel@plt>
mov    0x2dd0(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1090 <glLoadIdentity@plt>
mov    %ebp,%eax
cltd
idiv   %ebx
movss  0xde9(%rip),%xmm0
movss  0xde5(%rip),%xmm1
movss  0xde1(%rip),%xmm2
mov    %eax,%edi
call   1050 <gluPerspective@plt>
mov    0x2daf(%rip),%rax
mov    (%rax),%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <glMatrixMode@plt>

LLVM IR (-O0):
@GL_TEXTURE_2D = global i32 0
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_SMOOTH = global i32 0
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @InitGL(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @LoadGLTextures()
%6 = load i32, i32* @GL_TEXTURE_2D
%7 = call i32 @glEnable(i32 %6)
%8 = call i32 @glClearColor(float 0.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00)
%9 = call i32 @glClearDepth(double 1.000000e+00)
%10 = load i32, i32* @GL_LESS
%11 = call i32 @glDepthFunc(i32 %10)
%12 = load i32, i32* @GL_DEPTH_TEST
%13 = call i32 @glEnable(i32 %12)
%14 = load i32, i32* @GL_SMOOTH
%15 = call i32 @glShadeModel(i32 %14)
%16 = load i32, i32* @GL_PROJECTION
%17 = call i32 @glMatrixMode(i32 %16)
%18 = call i32 (...) @glLoadIdentity()
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = sdiv i32 %19, %20
%22 = call i32 @gluPerspective(float 4.500000e+01, i32 %21, float 0x3FB99999A0000000, float 1.000000e+02)
%23 = load i32, i32* @GL_MODELVIEW
%24 = call i32 @glMatrixMode(i32 %23)
ret void
}

LLVM IR (-O2):
@GL_TEXTURE_2D = global i32 0
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_SMOOTH = global i32 0
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @InitGL(i32 %0, i32 %1) {
%3 = tail call i32 (...) @LoadGLTextures()
%4 = load i32, i32* @GL_TEXTURE_2D
%5 = tail call i32 @glEnable(i32 %4)
%6 = tail call i32 @glClearColor(float 0.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00)
%7 = tail call i32 @glClearDepth(double 1.000000e+00)
%8 = load i32, i32* @GL_LESS
%9 = tail call i32 @glDepthFunc(i32 %8)
%10 = load i32, i32* @GL_DEPTH_TEST
%11 = tail call i32 @glEnable(i32 %10)
%12 = load i32, i32* @GL_SMOOTH
%13 = tail call i32 @glShadeModel(i32 %12)
%14 = load i32, i32* @GL_PROJECTION
%15 = tail call i32 @glMatrixMode(i32 %14)
%16 = tail call i32 (...) @glLoadIdentity()
%17 = sdiv i32 %0, %1
%18 = tail call i32 @gluPerspective(float 4.500000e+01, i32 %17, float 0x3FB99999A0000000, float 1.000000e+02)
%19 = load i32, i32* @GL_MODELVIEW
%20 = tail call i32 @glMatrixMode(i32 %19)
ret void
}