#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 /*<<< orphan*/ GLsizei;
typedef int GLdouble;

/* Variables and functions */
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glRotatef(double, double, double, double);
int /*<<< orphan*/ glViewport(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ gluLookAt(double, double, double, double, double, double,
                             double, double, double);
int /*<<< orphan*/ gluPerspective(int, int, double, int);
void reshape(int w, int h) {
  glViewport(0, 0, (GLsizei)w, (GLsizei)h);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluPerspective(60, (GLdouble)w / (GLdouble)h, 1.5, 100);
  gluLookAt(10.0, 11.0, 12.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
  glRotatef(90.0, 0.0, 1.0, 0.0);
  glMatrixMode(GL_MODELVIEW);
}


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   1080 <glViewport@plt>
mov    0x2e54(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
mov    $0x0,%al
call   1060 <glLoadIdentity@plt>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%esi
mov    $0x3c,%edi
movsd  0xe80(%rip),%xmm0
mov    $0x64,%edx
call   1050 <gluPerspective@plt>
movsd  0xe56(%rip),%xmm0
movsd  0xe56(%rip),%xmm1
movsd  0xe56(%rip),%xmm2
xorps  %xmm8,%xmm8
movsd  0xe32(%rip),%xmm7
movaps %xmm8,%xmm3
movaps %xmm8,%xmm4
movaps %xmm8,%xmm5
movaps %xmm8,%xmm6
movsd  %xmm8,(%rsp)
call   1030 <gluLookAt@plt>
movsd  0xe07(%rip),%xmm0
xorps  %xmm3,%xmm3
movsd  0xe04(%rip),%xmm2
movaps %xmm3,%xmm1
call   1070 <glRotatef@plt>
mov    0x2dd5(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@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   1080 <glViewport@plt>
mov    0x2e5d(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
xor    %eax,%eax
call   1060 <glLoadIdentity@plt>
mov    %ebp,%eax
cltd
idiv   %ebx
movsd  0xe6a(%rip),%xmm0
mov    $0x3c,%edi
mov    %eax,%esi
mov    $0x64,%edx
call   1050 <gluPerspective@plt>
movq   $0x0,(%rsp)
movsd  0xe51(%rip),%xmm0
movsd  0xe51(%rip),%xmm1
movsd  0xe51(%rip),%xmm2
movsd  0xe51(%rip),%xmm7
xorps  %xmm3,%xmm3
xorps  %xmm4,%xmm4
xorps  %xmm5,%xmm5
xorps  %xmm6,%xmm6
call   1030 <gluLookAt@plt>
movsd  0xe40(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm3,%xmm3
movsd  0xe2a(%rip),%xmm2
call   1070 <glRotatef@plt>
mov    0x2de6(%rip),%rax
mov    (%rax),%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <glMatrixMode@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 = load i32, i32* %4
%13 = sdiv i32 %11, %12
%14 = call i32 @gluPerspective(i32 60, i32 %13, double 1.500000e+00, i32 100)
%15 = call i32 @gluLookAt(double 1.000000e+01, double 1.100000e+01, double 1.200000e+01, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%16 = call i32 @glRotatef(double 9.000000e+01, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%17 = load i32, i32* @GL_MODELVIEW
%18 = call i32 @glMatrixMode(i32 %17)
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 = sdiv i32 %0, %1
%8 = tail call i32 @gluPerspective(i32 60, i32 %7, double 1.500000e+00, i32 100)
%9 = tail call i32 @gluLookAt(double 1.000000e+01, double 1.100000e+01, double 1.200000e+01, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%10 = tail call i32 @glRotatef(double 9.000000e+01, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%11 = load i32, i32* @GL_MODELVIEW
%12 = tail call i32 @glMatrixMode(i32 %11)
ret void
}