#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_ALPHA_TEST;
int /*<<< orphan*/ GL_BLEND;
int /*<<< orphan*/ GL_COLOR_BUFFER_BIT;
int /*<<< orphan*/ GL_CULL_FACE;
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_NICEST;
int /*<<< orphan*/ GL_ONE_MINUS_SRC_ALPHA;
int /*<<< orphan*/ GL_PERSPECTIVE_CORRECTION_HINT;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ GL_SRC_ALPHA;
int /*<<< orphan*/ GL_TEXTURE_2D;
int /*<<< orphan*/ glBlendFunc(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glClear(int /*<<< orphan*/);
int /*<<< orphan*/ glClearColor(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int);
int /*<<< orphan*/ glColor4f(int, int, int, int);
int /*<<< orphan*/ glDisable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glHint(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glOrtho(int /*<<< orphan*/, int, int /*<<< orphan*/, int,
                           double, double);
int /*<<< orphan*/ glScalef(int, int, int);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
int /*<<< orphan*/ glTranslated(int /*<<< orphan*/, int, int /*<<< orphan*/);
void gl_setup() {
  glShadeModel(GL_SMOOTH);
  glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
  glDisable(GL_DEPTH_TEST);
  glDisable(GL_LIGHTING);
  glDisable(GL_ALPHA_TEST);
  glEnable(GL_CULL_FACE);
  glEnable(GL_TEXTURE_2D);
  glEnable(GL_BLEND);
  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  glClearColor(0, 0, 0, 1);
  glColor4f(1, 1, 1, 1);
  glClear(GL_COLOR_BUFFER_BIT);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glOrtho(0, 1, 0, 1, -1.0, 1.0);
  glScalef(1, -1, 1);
  glTranslated(0, -1, 0);
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();
}


x86 assembly (clang, -O0):
<gl_setup>:
push   %rbp
mov    %rsp,%rbp
mov    0x2dad(%rip),%rax
mov    (%rax),%edi
call   10e0 <glShadeModel@plt>
mov    0x2d87(%rip),%rax
mov    (%rax),%edi
mov    0x2dc6(%rip),%rax
mov    (%rax),%esi
call   10c0 <glHint@plt>
mov    0x2d80(%rip),%rax
mov    (%rax),%edi
call   10f0 <glDisable@plt>
mov    0x2d9a(%rip),%rax
mov    (%rax),%edi
call   10f0 <glDisable@plt>
mov    0x2dbc(%rip),%rax
mov    (%rax),%edi
call   10f0 <glDisable@plt>
mov    0x2d6e(%rip),%rax
mov    (%rax),%edi
call   1070 <glEnable@plt>
mov    0x2d88(%rip),%rax
mov    (%rax),%edi
call   1070 <glEnable@plt>
mov    0x2d9a(%rip),%rax
mov    (%rax),%edi
call   1070 <glEnable@plt>
mov    0x2d4c(%rip),%rax
mov    (%rax),%edi
mov    0x2d8b(%rip),%rax
mov    (%rax),%esi
call   1030 <glBlendFunc@plt>
xor    %edx,%edx
mov    $0x1,%ecx
mov    %edx,%edi
mov    %edx,%esi
call   1090 <glClearColor@plt>
mov    $0x1,%ecx
mov    %ecx,%edi
mov    %ecx,%esi
mov    %ecx,%edx
call   1040 <glColor4f@plt>
mov    0x2d05(%rip),%rax
mov    (%rax),%edi
call   1050 <glClear@plt>
mov    0x2d17(%rip),%rax
mov    (%rax),%edi
call   1060 <glMatrixMode@plt>
mov    $0x0,%al
call   10a0 <glLoadIdentity@plt>
xor    %edx,%edx
mov    $0x1,%ecx
movsd  0xd4a(%rip),%xmm0
movsd  0xd4a(%rip),%xmm1
mov    %edx,%edi
mov    %ecx,%esi
call   1080 <glOrtho@plt>
mov    $0x1,%edx
mov    $0xffffffff,%esi
mov    %edx,%edi
call   10b0 <glScalef@plt>
xor    %edx,%edx
mov    $0xffffffff,%esi
mov    %edx,%edi
call   10d0 <glTranslated@plt>
mov    0x2ce3(%rip),%rax
mov    (%rax),%edi
call   1060 <glMatrixMode@plt>
mov    $0x0,%al
call   10a0 <glLoadIdentity@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gl_setup>:
push   %rax
mov    0x2db0(%rip),%rax
mov    (%rax),%edi
call   10e0 <glShadeModel@plt>
mov    0x2d8a(%rip),%rax
mov    (%rax),%edi
mov    0x2dc9(%rip),%rax
mov    (%rax),%esi
call   10c0 <glHint@plt>
mov    0x2d83(%rip),%rax
mov    (%rax),%edi
call   10f0 <glDisable@plt>
mov    0x2d9d(%rip),%rax
mov    (%rax),%edi
call   10f0 <glDisable@plt>
mov    0x2dbf(%rip),%rax
mov    (%rax),%edi
call   10f0 <glDisable@plt>
mov    0x2d71(%rip),%rax
mov    (%rax),%edi
call   1070 <glEnable@plt>
mov    0x2d8b(%rip),%rax
mov    (%rax),%edi
call   1070 <glEnable@plt>
mov    0x2d9d(%rip),%rax
mov    (%rax),%edi
call   1070 <glEnable@plt>
mov    0x2d4f(%rip),%rax
mov    (%rax),%edi
mov    0x2d8e(%rip),%rax
mov    (%rax),%esi
call   1030 <glBlendFunc@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%ecx
call   1090 <glClearColor@plt>
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1040 <glColor4f@plt>
mov    0x2cff(%rip),%rax
mov    (%rax),%edi
call   1050 <glClear@plt>
mov    0x2d11(%rip),%rax
mov    (%rax),%edi
call   1060 <glMatrixMode@plt>
xor    %eax,%eax
call   10a0 <glLoadIdentity@plt>
movsd  0xd4b(%rip),%xmm0
movsd  0xd4b(%rip),%xmm1
xor    %edi,%edi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x1,%ecx
call   1080 <glOrtho@plt>
mov    $0x1,%edi
mov    $0xffffffff,%esi
mov    $0x1,%edx
call   10b0 <glScalef@plt>
xor    %edi,%edi
mov    $0xffffffff,%esi
xor    %edx,%edx
call   10d0 <glTranslated@plt>
mov    0x2cd7(%rip),%rax
mov    (%rax),%edi
call   1060 <glMatrixMode@plt>
xor    %eax,%eax
pop    %rcx
jmp    10a0 <glLoadIdentity@plt>

LLVM IR (-O0):
@GL_SMOOTH = global i32 0
@GL_PERSPECTIVE_CORRECTION_HINT = global i32 0
@GL_NICEST = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_LIGHTING = global i32 0
@GL_ALPHA_TEST = global i32 0
@GL_CULL_FACE = global i32 0
@GL_TEXTURE_2D = global i32 0
@GL_BLEND = global i32 0
@GL_SRC_ALPHA = global i32 0
@GL_ONE_MINUS_SRC_ALPHA = global i32 0
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @gl_setup() {
%1 = load i32, i32* @GL_SMOOTH
%2 = call i32 @glShadeModel(i32 %1)
%3 = load i32, i32* @GL_PERSPECTIVE_CORRECTION_HINT
%4 = load i32, i32* @GL_NICEST
%5 = call i32 @glHint(i32 %3, i32 %4)
%6 = load i32, i32* @GL_DEPTH_TEST
%7 = call i32 @glDisable(i32 %6)
%8 = load i32, i32* @GL_LIGHTING
%9 = call i32 @glDisable(i32 %8)
%10 = load i32, i32* @GL_ALPHA_TEST
%11 = call i32 @glDisable(i32 %10)
%12 = load i32, i32* @GL_CULL_FACE
%13 = call i32 @glEnable(i32 %12)
%14 = load i32, i32* @GL_TEXTURE_2D
%15 = call i32 @glEnable(i32 %14)
%16 = load i32, i32* @GL_BLEND
%17 = call i32 @glEnable(i32 %16)
%18 = load i32, i32* @GL_SRC_ALPHA
%19 = load i32, i32* @GL_ONE_MINUS_SRC_ALPHA
%20 = call i32 @glBlendFunc(i32 %18, i32 %19)
%21 = call i32 @glClearColor(i32 0, i32 0, i32 0, i32 1)
%22 = call i32 @glColor4f(i32 1, i32 1, i32 1, i32 1)
%23 = load i32, i32* @GL_COLOR_BUFFER_BIT
%24 = call i32 @glClear(i32 %23)
%25 = load i32, i32* @GL_PROJECTION
%26 = call i32 @glMatrixMode(i32 %25)
%27 = call i32 (...) @glLoadIdentity()
%28 = call i32 @glOrtho(i32 0, i32 1, i32 0, i32 1, double -1.000000e+00, double 1.000000e+00)
%29 = call i32 @glScalef(i32 1, i32 -1, i32 1)
%30 = call i32 @glTranslated(i32 0, i32 -1, i32 0)
%31 = load i32, i32* @GL_MODELVIEW
%32 = call i32 @glMatrixMode(i32 %31)
%33 = call i32 (...) @glLoadIdentity()
ret void
}

LLVM IR (-O2):
@GL_SMOOTH = global i32 0
@GL_PERSPECTIVE_CORRECTION_HINT = global i32 0
@GL_NICEST = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_LIGHTING = global i32 0
@GL_ALPHA_TEST = global i32 0
@GL_CULL_FACE = global i32 0
@GL_TEXTURE_2D = global i32 0
@GL_BLEND = global i32 0
@GL_SRC_ALPHA = global i32 0
@GL_ONE_MINUS_SRC_ALPHA = global i32 0
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @gl_setup() {
%1 = load i32, i32* @GL_SMOOTH
%2 = tail call i32 @glShadeModel(i32 %1)
%3 = load i32, i32* @GL_PERSPECTIVE_CORRECTION_HINT
%4 = load i32, i32* @GL_NICEST
%5 = tail call i32 @glHint(i32 %3, i32 %4)
%6 = load i32, i32* @GL_DEPTH_TEST
%7 = tail call i32 @glDisable(i32 %6)
%8 = load i32, i32* @GL_LIGHTING
%9 = tail call i32 @glDisable(i32 %8)
%10 = load i32, i32* @GL_ALPHA_TEST
%11 = tail call i32 @glDisable(i32 %10)
%12 = load i32, i32* @GL_CULL_FACE
%13 = tail call i32 @glEnable(i32 %12)
%14 = load i32, i32* @GL_TEXTURE_2D
%15 = tail call i32 @glEnable(i32 %14)
%16 = load i32, i32* @GL_BLEND
%17 = tail call i32 @glEnable(i32 %16)
%18 = load i32, i32* @GL_SRC_ALPHA
%19 = load i32, i32* @GL_ONE_MINUS_SRC_ALPHA
%20 = tail call i32 @glBlendFunc(i32 %18, i32 %19)
%21 = tail call i32 @glClearColor(i32 0, i32 0, i32 0, i32 1)
%22 = tail call i32 @glColor4f(i32 1, i32 1, i32 1, i32 1)
%23 = load i32, i32* @GL_COLOR_BUFFER_BIT
%24 = tail call i32 @glClear(i32 %23)
%25 = load i32, i32* @GL_PROJECTION
%26 = tail call i32 @glMatrixMode(i32 %25)
%27 = tail call i32 (...) @glLoadIdentity()
%28 = tail call i32 @glOrtho(i32 0, i32 1, i32 0, i32 1, double -1.000000e+00, double 1.000000e+00)
%29 = tail call i32 @glScalef(i32 1, i32 -1, i32 1)
%30 = tail call i32 @glTranslated(i32 0, i32 -1, i32 0)
%31 = load i32, i32* @GL_MODELVIEW
%32 = tail call i32 @glMatrixMode(i32 %31)
%33 = tail call i32 (...) @glLoadIdentity()
ret void
}