#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_DEPTH_TEST;
int /*<<< orphan*/ GL_LESS;
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ GL_SMOOTH;
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, float, float, float);
void InitGL(int Width, int Height) {
  glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
  glClearDepth(1.0);
  glDepthFunc(GL_LESS);
  glEnable(GL_DEPTH_TEST);
  glShadeModel(GL_SMOOTH);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluPerspective(45.0f, (float)Width / (float)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)
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1070 <glClearColor@plt>
movsd  0xe69(%rip),%xmm0
call   1090 <glClearDepth@plt>
mov    0x2e05(%rip),%rax
mov    (%rax),%edi
call   1060 <glDepthFunc@plt>
mov    0x2e07(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2e01(%rip),%rax
mov    (%rax),%edi
call   10a0 <glShadeModel@plt>
mov    0x2dfb(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1080 <glLoadIdentity@plt>
cvtsi2ssl -0x4(%rbp),%xmm1
cvtsi2ssl -0x8(%rbp),%xmm0
divss  %xmm0,%xmm1
movss  0xdff(%rip),%xmm0
movss  0xdfb(%rip),%xmm2
movss  0xdf7(%rip),%xmm3
call   1050 <gluPerspective@plt>
mov    0x2dcb(%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
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1070 <glClearColor@plt>
movsd  0xe60(%rip),%xmm0
call   1090 <glClearDepth@plt>
mov    0x2e0c(%rip),%rax
mov    (%rax),%edi
call   1060 <glDepthFunc@plt>
mov    0x2e0e(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%edi
call   10a0 <glShadeModel@plt>
mov    0x2e02(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1080 <glLoadIdentity@plt>
xorps  %xmm1,%xmm1
cvtsi2ss %ebp,%xmm1
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
divss  %xmm0,%xmm1
movss  0xe0a(%rip),%xmm0
movss  0xe06(%rip),%xmm2
movss  0xe02(%rip),%xmm3
call   1050 <gluPerspective@plt>
mov    0x2dce(%rip),%rax
mov    (%rax),%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <glMatrixMode@plt>

LLVM IR (-O0):
@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 @glClearColor(float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00)
%6 = call i32 @glClearDepth(double 1.000000e+00)
%7 = load i32, i32* @GL_LESS
%8 = call i32 @glDepthFunc(i32 %7)
%9 = load i32, i32* @GL_DEPTH_TEST
%10 = call i32 @glEnable(i32 %9)
%11 = load i32, i32* @GL_SMOOTH
%12 = call i32 @glShadeModel(i32 %11)
%13 = load i32, i32* @GL_PROJECTION
%14 = call i32 @glMatrixMode(i32 %13)
%15 = call i32 (...) @glLoadIdentity()
%16 = load i32, i32* %3
%17 = sitofp i32 %16 to float
%18 = load i32, i32* %4
%19 = sitofp i32 %18 to float
%20 = fdiv float %17, %19
%21 = call i32 @gluPerspective(float 4.500000e+01, float %20, float 0x3FB99999A0000000, float 1.000000e+02)
%22 = load i32, i32* @GL_MODELVIEW
%23 = call i32 @glMatrixMode(i32 %22)
ret void
}

LLVM IR (-O2):
@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 @glClearColor(float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00)
%4 = tail call i32 @glClearDepth(double 1.000000e+00)
%5 = load i32, i32* @GL_LESS
%6 = tail call i32 @glDepthFunc(i32 %5)
%7 = load i32, i32* @GL_DEPTH_TEST
%8 = tail call i32 @glEnable(i32 %7)
%9 = load i32, i32* @GL_SMOOTH
%10 = tail call i32 @glShadeModel(i32 %9)
%11 = load i32, i32* @GL_PROJECTION
%12 = tail call i32 @glMatrixMode(i32 %11)
%13 = tail call i32 (...) @glLoadIdentity()
%14 = sitofp i32 %0 to float
%15 = sitofp i32 %1 to float
%16 = fdiv float %14, %15
%17 = tail call i32 @gluPerspective(float 4.500000e+01, float %16, float 0x3FB99999A0000000, float 1.000000e+02)
%18 = load i32, i32* @GL_MODELVIEW
%19 = tail call i32 @glMatrixMode(i32 %18)
ret void
}