#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_MODELVIEW;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glFrustum(float, float, double, double, double, double);
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glTranslatef(double, double, double);
int /*<<< orphan*/ glViewport(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
void Reshape(int width, int height) {
  float ar;
  glViewport(0, 0, width, height);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  ar = (float)width / (float)height;
  glFrustum(-ar, ar, -1.0, 1.0, 2.0, 100.0);
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();
  glTranslatef(0.0, 0.0, -23.0 / 2.5);
}


x86 assembly (clang, -O0):
<Reshape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %esi,%esi
mov    %esi,%edi
call   1070 <glViewport@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1040 <glLoadIdentity@plt>
cvtsi2ssl -0x4(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0xc(%rbp),%xmm1
movsd  0xe54(%rip),%xmm2
movsd  0xe54(%rip),%xmm3
movsd  0xe54(%rip),%xmm4
movsd  0xe54(%rip),%xmm5
call   1050 <glFrustum@plt>
mov    0x2e10(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1040 <glLoadIdentity@plt>
xorps  %xmm1,%xmm1
movsd  0xe0f(%rip),%xmm2
movaps %xmm1,%xmm0
call   1060 <glTranslatef@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Reshape>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1070 <glViewport@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1040 <glLoadIdentity@plt>
cvtsi2ss %ebp,%xmm1
cvtsi2ss %ebx,%xmm0
divss  %xmm0,%xmm1
movaps 0xe74(%rip),%xmm0
xorps  %xmm1,%xmm0
movsd  0xe79(%rip),%xmm2
movsd  0xe79(%rip),%xmm3
movsd  0xe79(%rip),%xmm4
movsd  0xe79(%rip),%xmm5
call   1050 <glFrustum@plt>
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1040 <glLoadIdentity@plt>
movsd  0xe5f(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <glTranslatef@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @Reshape(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @glViewport(i32 0, i32 0, i32 %6, i32 %7)
%9 = load i32, i32* @GL_PROJECTION
%10 = call i32 @glMatrixMode(i32 %9)
%11 = call i32 (...) @glLoadIdentity()
%12 = load i32, i32* %3
%13 = sitofp i32 %12 to float
%14 = load i32, i32* %4
%15 = sitofp i32 %14 to float
%16 = fdiv float %13, %15
store float %16, float* %5
%17 = load float, float* %5
%18 = fneg float %17
%19 = load float, float* %5
%20 = call i32 @glFrustum(float %18, float %19, double -1.000000e+00, double 1.000000e+00, double 2.000000e+00, double 1.000000e+02)
%21 = load i32, i32* @GL_MODELVIEW
%22 = call i32 @glMatrixMode(i32 %21)
%23 = call i32 (...) @glLoadIdentity()
%24 = call i32 @glTranslatef(double 0.000000e+00, double 0.000000e+00, double 0xC022666666666666)
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @Reshape(i32 %0, i32 %1) {
%3 = tail call i32 @glViewport(i32 0, i32 0, i32 %0, i32 %1)
%4 = load i32, i32* @GL_PROJECTION
%5 = tail call i32 @glMatrixMode(i32 %4)
%6 = tail call i32 (...) @glLoadIdentity()
%7 = sitofp i32 %0 to float
%8 = sitofp i32 %1 to float
%9 = fdiv float %7, %8
%10 = fneg float %9
%11 = tail call i32 @glFrustum(float %10, float %9, double -1.000000e+00, double 1.000000e+00, double 2.000000e+00, double 1.000000e+02)
%12 = load i32, i32* @GL_MODELVIEW
%13 = tail call i32 @glMatrixMode(i32 %12)
%14 = tail call i32 (...) @glLoadIdentity()
%15 = tail call i32 @glTranslatef(double 0.000000e+00, double 0.000000e+00, double 0xC022666666666666)
ret void
}