#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*/ Window;

/* Variables and functions */
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glOrtho(float, float, float, float, double, double);
int /*<<< orphan*/ glViewport(int /*<<< orphan*/, int /*<<< orphan*/,
                              unsigned int, unsigned int);
void Resize(Window win, unsigned int width, unsigned int height) {
  float sz = 1.5;
  glViewport(0, 0, width, height);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glOrtho(-sz, sz, -sz, sz, -1.0, 1.0);
  glMatrixMode(GL_MODELVIEW);
}


x86 assembly (clang, -O0):
<Resize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movss  0xeb7(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
xor    %esi,%esi
mov    %esi,%edi
call   1060 <glViewport@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
mov    $0x0,%al
call   1050 <glLoadIdentity@plt>
movss  -0x10(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
movd   %xmm2,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm2
movss  -0x10(%rbp),%xmm3
movsd  0xe48(%rip),%xmm4
movsd  0xe48(%rip),%xmm5
call   1040 <glOrtho@plt>
mov    0x2e1c(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Resize>:
push   %rax
mov    %edx,%ecx
mov    %esi,%edx
xor    %edi,%edi
xor    %esi,%esi
call   1060 <glViewport@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
xor    %eax,%eax
call   1050 <glLoadIdentity@plt>
movss  0xe95(%rip),%xmm0
movss  0xe91(%rip),%xmm1
movsd  0xe8d(%rip),%xmm4
movsd  0xe8d(%rip),%xmm5
movaps %xmm0,%xmm2
movaps %xmm1,%xmm3
call   1040 <glOrtho@plt>
mov    0x2e53(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1030 <glMatrixMode@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @Resize(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca float
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store float 1.500000e+00, float* %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @glViewport(i32 0, i32 0, i32 %8, i32 %9)
%11 = load i32, i32* @GL_PROJECTION
%12 = call i32 @glMatrixMode(i32 %11)
%13 = call i32 (...) @glLoadIdentity()
%14 = load float, float* %7
%15 = fneg float %14
%16 = load float, float* %7
%17 = load float, float* %7
%18 = fneg float %17
%19 = load float, float* %7
%20 = call i32 @glOrtho(float %15, float %16, float %18, float %19, double -1.000000e+00, double 1.000000e+00)
%21 = load i32, i32* @GL_MODELVIEW
%22 = call i32 @glMatrixMode(i32 %21)
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @Resize(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @glViewport(i32 0, i32 0, i32 %1, i32 %2)
%5 = load i32, i32* @GL_PROJECTION
%6 = tail call i32 @glMatrixMode(i32 %5)
%7 = tail call i32 (...) @glLoadIdentity()
%8 = tail call i32 @glOrtho(float -1.500000e+00, float 1.500000e+00, float -1.500000e+00, float 1.500000e+00, double -1.000000e+00, double 1.000000e+00)
%9 = load i32, i32* @GL_MODELVIEW
%10 = tail call i32 @glMatrixMode(i32 %9)
ret void
}