#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*/ glOrtho(double, double, double, double, double, double);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void init_test03(void) {
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glOrtho(-0.5, 639.5, -0.5, 479.5, 1.0, -1000.0 * 480.0);
  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_test03>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e55(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
mov    $0x0,%al
call   1080 <glLoadIdentity@plt>
movsd  0xe7f(%rip),%xmm2
movsd  0xe7f(%rip),%xmm1
movsd  0xe7f(%rip),%xmm3
movsd  0xe5f(%rip),%xmm4
movsd  0xe77(%rip),%xmm5
movaps %xmm2,%xmm0
call   1060 <glOrtho@plt>
mov    0x2e20(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
mov    0x2df2(%rip),%rax
mov    (%rax),%edi
call   1090 <glShadeModel@plt>
mov    0x2ddc(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
xorps  %xmm3,%xmm3
movsd  0xe12(%rip),%xmm1
movsd  0xe12(%rip),%xmm2
movaps %xmm3,%xmm0
call   1070 <glClearColor@plt>
mov    0x2dc3(%rip),%rax
mov    (%rax),%edi
mov    0x2dda(%rip),%rax
or     (%rax),%edi
call   1030 <glClear@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_test03>:
push   %rax
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
xor    %eax,%eax
call   1080 <glLoadIdentity@plt>
movsd  0xe72(%rip),%xmm1
movsd  0xe72(%rip),%xmm0
movsd  0xe72(%rip),%xmm3
movsd  0xe72(%rip),%xmm4
movsd  0xe72(%rip),%xmm5
movaps %xmm0,%xmm2
call   1060 <glOrtho@plt>
mov    0x2e23(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
mov    0x2df5(%rip),%rax
mov    (%rax),%edi
call   1090 <glShadeModel@plt>
mov    0x2ddf(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
movsd  0xe40(%rip),%xmm1
xorps  %xmm0,%xmm0
xorps  %xmm3,%xmm3
movsd  0xe22(%rip),%xmm2
call   1070 <glClearColor@plt>
mov    0x2dc6(%rip),%rax
mov    0x2ddf(%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_test03() {
%1 = load i32, i32* @GL_PROJECTION
%2 = call i32 @glMatrixMode(i32 %1)
%3 = call i32 (...) @glLoadIdentity()
%4 = call i32 @glOrtho(double -5.000000e-01, double 6.395000e+02, double -5.000000e-01, double 4.795000e+02, double 1.000000e+00, double -4.800000e+05)
%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_test03() {
%1 = load i32, i32* @GL_PROJECTION
%2 = tail call i32 @glMatrixMode(i32 %1)
%3 = tail call i32 (...) @glLoadIdentity()
%4 = tail call i32 @glOrtho(double -5.000000e-01, double 6.395000e+02, double -5.000000e-01, double 4.795000e+02, double 1.000000e+00, double -4.800000e+05)
%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
}