#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*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glTranslatef(double, double, double);
int /*<<< orphan*/ glViewport(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
int /*<<< orphan*/ gluPerspective(double, float, double, double);
int /*<<< orphan*/ gluiReshape(int, int);
int /*<<< orphan*/ tbReshape(int, int);
void reshape(int width, int height) {
  glViewport(0, 0, width, height);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluPerspective(60.0, (float)width / height, 3.3 - 2.0, 3.3 + 2.0);
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();
  glTranslatef(0.0, 0.25, -3.3);
  tbReshape(width, height);
  gluiReshape(width, height);
}


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   1090 <glViewport@plt>
mov    0x2e44(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
mov    $0x0,%al
call   1060 <glLoadIdentity@plt>
cvtsi2ssl -0x4(%rbp),%xmm1
cvtsi2ssl -0x8(%rbp),%xmm0
divss  %xmm0,%xmm1
movsd  0xe58(%rip),%xmm0
movsd  0xe58(%rip),%xmm2
movsd  0xe58(%rip),%xmm3
call   1050 <gluPerspective@plt>
mov    0x2e14(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
mov    $0x0,%al
call   1060 <glLoadIdentity@plt>
xorps  %xmm0,%xmm0
movsd  0xe13(%rip),%xmm1
movsd  0xe13(%rip),%xmm2
call   1080 <glTranslatef@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1070 <tbReshape@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <gluiReshape@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   1090 <glViewport@plt>
mov    0x2e4d(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
xor    %eax,%eax
call   1060 <glLoadIdentity@plt>
cvtsi2ss %ebp,%xmm1
cvtsi2ss %ebx,%xmm0
divss  %xmm0,%xmm1
movsd  0xe53(%rip),%xmm0
movsd  0xe53(%rip),%xmm2
movsd  0xe53(%rip),%xmm3
call   1050 <gluPerspective@plt>
mov    0x2e1f(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
xor    %eax,%eax
call   1060 <glLoadIdentity@plt>
movsd  0xe39(%rip),%xmm1
movsd  0xe39(%rip),%xmm2
xorps  %xmm0,%xmm0
call   1080 <glTranslatef@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1070 <tbReshape@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <gluiReshape@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
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @glViewport(i32 0, i32 0, i32 %5, i32 %6)
%8 = load i32, i32* @GL_PROJECTION
%9 = call i32 @glMatrixMode(i32 %8)
%10 = call i32 (...) @glLoadIdentity()
%11 = load i32, i32* %3
%12 = sitofp i32 %11 to float
%13 = load i32, i32* %4
%14 = sitofp i32 %13 to float
%15 = fdiv float %12, %14
%16 = call i32 @gluPerspective(double 6.000000e+01, float %15, double 0x3FF4CCCCCCCCCCCC, double 5.300000e+00)
%17 = load i32, i32* @GL_MODELVIEW
%18 = call i32 @glMatrixMode(i32 %17)
%19 = call i32 (...) @glLoadIdentity()
%20 = call i32 @glTranslatef(double 0.000000e+00, double 2.500000e-01, double -3.300000e+00)
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = call i32 @tbReshape(i32 %21, i32 %22)
%24 = load i32, i32* %3
%25 = load i32, i32* %4
%26 = call i32 @gluiReshape(i32 %24, i32 %25)
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 = tail call i32 @gluPerspective(double 6.000000e+01, float %9, double 0x3FF4CCCCCCCCCCCC, double 5.300000e+00)
%11 = load i32, i32* @GL_MODELVIEW
%12 = tail call i32 @glMatrixMode(i32 %11)
%13 = tail call i32 (...) @glLoadIdentity()
%14 = tail call i32 @glTranslatef(double 0.000000e+00, double 2.500000e-01, double -3.300000e+00)
%15 = tail call i32 @tbReshape(i32 %0, i32 %1)
%16 = tail call i32 @gluiReshape(i32 %0, i32 %1)
ret void
}