#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*/ glViewport(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
int /*<<< orphan*/ gluLookAt(int, int, int /*<<< orphan*/, int, int,
                             int /*<<< orphan*/, int /*<<< orphan*/, int,
                             int /*<<< orphan*/);
void Reshape(int width, int height) {
  glViewport(0, 0, width, height);
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluLookAt(800 / 2, 600 / 2, 0, 800 / 2, 600 / 2, 0, 0, 1, 0);
}


x86 assembly (clang, -O0):
<Reshape>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %esi,%esi
mov    %esi,%edi
call   1060 <glViewport@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
mov    $0x0,%al
call   1050 <glLoadIdentity@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
mov    $0x0,%al
call   1050 <glLoadIdentity@plt>
mov    $0x190,%ecx
mov    $0x12c,%r8d
xor    %r9d,%r9d
mov    %ecx,%edi
mov    %r8d,%esi
mov    %r9d,%edx
movl   $0x0,(%rsp)
movl   $0x1,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1030 <gluLookAt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Reshape>:
push   %rax
mov    %esi,%ecx
mov    %edi,%edx
xor    %edi,%edi
xor    %esi,%esi
call   1060 <glViewport@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
xor    %eax,%eax
call   1050 <glLoadIdentity@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
xor    %eax,%eax
call   1050 <glLoadIdentity@plt>
sub    $0x8,%rsp
mov    $0x190,%edi
mov    $0x12c,%esi
xor    %edx,%edx
mov    $0x190,%ecx
mov    $0x12c,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x1
push   $0x0
call   1030 <gluLookAt@plt>
add    $0x20,%rsp
pop    %rax
ret

LLVM IR (-O0):
@GL_MODELVIEW = global i32 0
@GL_PROJECTION = 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_MODELVIEW
%9 = call i32 @glMatrixMode(i32 %8)
%10 = call i32 (...) @glLoadIdentity()
%11 = load i32, i32* @GL_PROJECTION
%12 = call i32 @glMatrixMode(i32 %11)
%13 = call i32 (...) @glLoadIdentity()
%14 = call i32 @gluLookAt(i32 400, i32 300, i32 0, i32 400, i32 300, i32 0, i32 0, i32 1, i32 0)
ret void
}

LLVM IR (-O2):
@GL_MODELVIEW = global i32 0
@GL_PROJECTION = 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_MODELVIEW
%5 = tail call i32 @glMatrixMode(i32 %4)
%6 = tail call i32 (...) @glLoadIdentity()
%7 = load i32, i32* @GL_PROJECTION
%8 = tail call i32 @glMatrixMode(i32 %7)
%9 = tail call i32 (...) @glLoadIdentity()
%10 = tail call i32 @gluLookAt(i32 400, i32 300, i32 0, i32 400, i32 300, i32 0, i32 0, i32 1, i32 0)
ret void
}