#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 GL_COLOR_BUFFER_BIT;
int GL_DEPTH_BUFFER_BIT;
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ glClear(int);
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
int /*<<< orphan*/ gluOrtho2D(double, double, double, double);
void init_test06(void) {
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluOrtho2D(-0.5, 639.5, -0.5, 479.5);
  glMatrixMode(GL_MODELVIEW);
  glShadeModel(GL_SMOOTH);
  glEnable(GL_DEPTH_TEST);
  glClearColor(0.0, 0.1, 1.0, 0.0);
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}


x86 assembly (clang, -O0):
<init_test06>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e55(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
mov    $0x0,%al
call   1070 <glLoadIdentity@plt>
movsd  0xe7f(%rip),%xmm2
movsd  0xe7f(%rip),%xmm1
movsd  0xe7f(%rip),%xmm3
movaps %xmm2,%xmm0
call   1080 <gluOrtho2D@plt>
mov    0x2e30(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
mov    0x2e02(%rip),%rax
mov    (%rax),%edi
call   1090 <glShadeModel@plt>
mov    0x2dec(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
xorps  %xmm3,%xmm3
movsd  0xe22(%rip),%xmm1
movsd  0xe22(%rip),%xmm2
movaps %xmm3,%xmm0
call   1060 <glClearColor@plt>
mov    0x2dd3(%rip),%rax
mov    (%rax),%edi
mov    0x2dea(%rip),%rax
or     (%rax),%edi
call   1030 <glClear@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_test06>:
push   %rax
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
xor    %eax,%eax
call   1070 <glLoadIdentity@plt>
movsd  0xe72(%rip),%xmm1
movsd  0xe72(%rip),%xmm0
movsd  0xe72(%rip),%xmm3
movaps %xmm0,%xmm2
call   1080 <gluOrtho2D@plt>
mov    0x2e33(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
mov    0x2e05(%rip),%rax
mov    (%rax),%edi
call   1090 <glShadeModel@plt>
mov    0x2def(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
movsd  0xe40(%rip),%xmm1
movsd  0xe40(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm3,%xmm3
call   1060 <glClearColor@plt>
mov    0x2dd6(%rip),%rax
mov    0x2def(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
pop    %rax
jmp    1030 <glClear@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
@GL_SMOOTH = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @init_test06() {
%1 = load i32, i32* @GL_PROJECTION
%2 = call i32 @glMatrixMode(i32 %1)
%3 = call i32 (...) @glLoadIdentity()
%4 = call i32 @gluOrtho2D(double -5.000000e-01, double 6.395000e+02, double -5.000000e-01, double 4.795000e+02)
%5 = load i32, i32* @GL_MODELVIEW
%6 = call i32 @glMatrixMode(i32 %5)
%7 = load i32, i32* @GL_SMOOTH
%8 = call i32 @glShadeModel(i32 %7)
%9 = load i32, i32* @GL_DEPTH_TEST
%10 = call i32 @glEnable(i32 %9)
%11 = call i32 @glClearColor(double 0.000000e+00, double 1.000000e-01, double 1.000000e+00, double 0.000000e+00)
%12 = load i32, i32* @GL_COLOR_BUFFER_BIT
%13 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%14 = or i32 %12, %13
%15 = call i32 @glClear(i32 %14)
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
@GL_SMOOTH = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @init_test06() {
%1 = load i32, i32* @GL_PROJECTION
%2 = tail call i32 @glMatrixMode(i32 %1)
%3 = tail call i32 (...) @glLoadIdentity()
%4 = tail call i32 @gluOrtho2D(double -5.000000e-01, double 6.395000e+02, double -5.000000e-01, double 4.795000e+02)
%5 = load i32, i32* @GL_MODELVIEW
%6 = tail call i32 @glMatrixMode(i32 %5)
%7 = load i32, i32* @GL_SMOOTH
%8 = tail call i32 @glShadeModel(i32 %7)
%9 = load i32, i32* @GL_DEPTH_TEST
%10 = tail call i32 @glEnable(i32 %9)
%11 = tail call i32 @glClearColor(double 0.000000e+00, double 1.000000e-01, double 1.000000e+00, double 0.000000e+00)
%12 = load i32, i32* @GL_COLOR_BUFFER_BIT
%13 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%14 = or i32 %13, %12
%15 = tail call i32 @glClear(i32 %14)
ret void
}