#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_COLOR_BUFFER_BIT;
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glOrtho(double, int, double, int, double, double);
int /*<<< orphan*/ glViewport(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
void reshape(int width, int height) {
  glClear(GL_COLOR_BUFFER_BIT);
  glViewport(0, 0, width, height);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glOrtho(0.0, 20, 0.0, 20, -1.0, 1.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    0x2e6b(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
xor    %esi,%esi
mov    %esi,%edi
call   1070 <glViewport@plt>
mov    0x2e56(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
mov    $0x0,%al
call   1060 <glLoadIdentity@plt>
xorps  %xmm1,%xmm1
mov    $0x14,%esi
movsd  0xe60(%rip),%xmm2
movsd  0xe60(%rip),%xmm3
movaps %xmm1,%xmm0
mov    %esi,%edi
call   1050 <glOrtho@plt>
mov    0x2e2f(%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
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
call   1030 <glClear@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1070 <glViewport@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
xor    %eax,%eax
call   1060 <glLoadIdentity@plt>
movsd  0xe71(%rip),%xmm2
movsd  0xe71(%rip),%xmm3
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
mov    $0x14,%edi
mov    $0x14,%esi
call   1050 <glOrtho@plt>
mov    0x2e35(%rip),%rax
mov    (%rax),%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <glMatrixMode@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@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* @GL_COLOR_BUFFER_BIT
%6 = call i32 @glClear(i32 %5)
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @glViewport(i32 0, i32 0, i32 %7, i32 %8)
%10 = load i32, i32* @GL_PROJECTION
%11 = call i32 @glMatrixMode(i32 %10)
%12 = call i32 (...) @glLoadIdentity()
%13 = call i32 @glOrtho(double 0.000000e+00, i32 20, double 0.000000e+00, i32 20, double -1.000000e+00, double 1.000000e+00)
%14 = load i32, i32* @GL_MODELVIEW
%15 = call i32 @glMatrixMode(i32 %14)
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @reshape(i32 %0, i32 %1) {
%3 = load i32, i32* @GL_COLOR_BUFFER_BIT
%4 = tail call i32 @glClear(i32 %3)
%5 = tail call i32 @glViewport(i32 0, i32 0, i32 %0, i32 %1)
%6 = load i32, i32* @GL_PROJECTION
%7 = tail call i32 @glMatrixMode(i32 %6)
%8 = tail call i32 (...) @glLoadIdentity()
%9 = tail call i32 @glOrtho(double 0.000000e+00, i32 20, double 0.000000e+00, i32 20, double -1.000000e+00, double 1.000000e+00)
%10 = load i32, i32* @GL_MODELVIEW
%11 = tail call i32 @glMatrixMode(i32 %10)
ret void
}