#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*/ GLvoid;
typedef int GLubyte;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ GL_ALWAYS;
int /*<<< orphan*/ GL_BLEND;
int GL_COLOR_BUFFER_BIT;
int GL_DEPTH_BUFFER_BIT;
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_LINEAR;
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_MODULATE;
int /*<<< orphan*/ GL_NEAREST_MIPMAP_LINEAR;
int /*<<< orphan*/ GL_ONE_MINUS_SRC_ALPHA;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ GL_REPEAT;
int /*<<< orphan*/ GL_RGB;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ GL_SRC_ALPHA;
int /*<<< orphan*/ GL_TEXTURE_2D;
int /*<<< orphan*/ GL_TEXTURE_ENV;
int /*<<< orphan*/ GL_TEXTURE_ENV_MODE;
int /*<<< orphan*/ GL_TEXTURE_MAG_FILTER;
int /*<<< orphan*/ GL_TEXTURE_MIN_FILTER;
int /*<<< orphan*/ GL_TEXTURE_WRAP_S;
int /*<<< orphan*/ GL_TEXTURE_WRAP_T;
int /*<<< orphan*/ GL_UNPACK_ALIGNMENT;
int /*<<< orphan*/ GL_UNSIGNED_BYTE;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ glBlendFunc(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glClear(int);
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glDepthFunc(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glOrtho(double, double, double, double, double, double);
int /*<<< orphan*/ glPixelStorei(int /*<<< orphan*/, int);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
int /*<<< orphan*/ glTexEnvf(int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/);
int /*<<< orphan*/ glTexParameterf(int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/);
int /*<<< orphan*/ gluBuild2DMipmaps(int /*<<< orphan*/, int, int, int,
                                     int /*<<< orphan*/, int /*<<< orphan*/,
                                     int /*<<< orphan*/ *);
char *gluErrorString(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void init_test05(void) {
  int x, y;
  GLubyte tex[128 * 128 * 3];
  GLenum gluerr;
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glOrtho(-0.5, 639.5, -0.5, 479.5, -1.0, 1.0);
  glMatrixMode(GL_MODELVIEW);
  glShadeModel(GL_SMOOTH);
  glEnable(GL_DEPTH_TEST);
  glEnable(GL_BLEND);
  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  for (y = 0; y < 128; y++)
    for (x = 0; x < 128; x++) {
      tex[(x + y * 128) * 3 + 0] = ((x % (128 / 4)) < (128 / 8)) ? 255 : 0;
      tex[(x + y * 128) * 3 + 1] = ((y % (128 / 4)) < (128 / 8)) ? 255 : 0;
      tex[(x + y * 128) * 3 + 2] = x;
    }
  glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
  if ((gluerr = gluBuild2DMipmaps(GL_TEXTURE_2D, 3, 128, 128, GL_RGB,
                                  GL_UNSIGNED_BYTE, (GLvoid *)(&tex[0])))) {
    fprintf(stderr, "GLULib%s\n", gluErrorString(gluerr));
    exit(-1);
  }
  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
                  GL_NEAREST_MIPMAP_LINEAR);
  glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
  glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
  glEnable(GL_TEXTURE_2D);
  glDepthFunc(GL_ALWAYS);
  glClearColor(0.0, 0.1, 1.0, 0.0);
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
}


x86 assembly (clang, -O0):
<init_test05>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30020,%rsp
mov    0x2d4e(%rip),%rax
mov    (%rax),%edi
call   1050 <glMatrixMode@plt>
mov    $0x0,%al
call   10d0 <glLoadIdentity@plt>
movsd  0xdd8(%rip),%xmm2
movsd  0xdd8(%rip),%xmm1
movsd  0xdd8(%rip),%xmm3
movsd  0xdd8(%rip),%xmm4
movsd  0xdd8(%rip),%xmm5
movaps %xmm2,%xmm0
call   1070 <glOrtho@plt>
mov    0x2d49(%rip),%rax
mov    (%rax),%edi
call   1050 <glMatrixMode@plt>
mov    0x2cd3(%rip),%rax
mov    (%rax),%edi
call   1100 <glShadeModel@plt>
mov    0x2cbd(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2d4f(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2cc1(%rip),%rax
mov    (%rax),%edi
mov    0x2d40(%rip),%rax
mov    (%rax),%esi
call   1030 <glBlendFunc@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x80,-0x8(%rbp)
jge    1369 <init_test05+0x169>
movl   $0x0,-0x4(%rbp)
cmpl   $0x80,-0x4(%rbp)
jge    1356 <init_test05+0x156>
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
xor    %ecx,%ecx
mov    $0xff,%eax
cmp    $0x10,%edx
cmovl  %eax,%ecx
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
shl    $0x7,%edx
add    %edx,%eax
imul   $0x3,%eax,%eax
add    $0x0,%eax
cltq
mov    %ecx,-0x30010(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
xor    %ecx,%ecx
mov    $0xff,%eax
cmp    $0x10,%edx
cmovl  %eax,%ecx
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
shl    $0x7,%edx
add    %edx,%eax
imul   $0x3,%eax,%eax
add    $0x1,%eax
cltq
mov    %ecx,-0x30010(%rbp,%rax,4)
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%edx
shl    $0x7,%edx
add    %edx,%eax
imul   $0x3,%eax,%eax
add    $0x2,%eax
cltq
mov    %ecx,-0x30010(%rbp,%rax,4)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    12ba <init_test05+0xba>
jmp    135b <init_test05+0x15b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12a6 <init_test05+0xa6>
mov    0x2c50(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1080 <glPixelStorei@plt>
mov    0x2bfd(%rip),%rax
mov    (%rax),%edi
mov    0x2c64(%rip),%rax
mov    (%rax),%r8d
mov    0x2bb2(%rip),%rax
mov    (%rax),%r9d
lea    -0x30010(%rbp),%rax
mov    $0x3,%esi
mov    $0x80,%ecx
mov    %ecx,%edx
mov    %rax,(%rsp)
call   1120 <gluBuild2DMipmaps@plt>
mov    %eax,-0x30014(%rbp)
cmp    $0x0,%eax
je     13fd <init_test05+0x1fd>
mov    0x2bad(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x30018(%rbp)
mov    -0x30014(%rbp),%edi
call   10f0 <gluErrorString@plt>
mov    -0x30018(%rbp),%edi
mov    %rax,%rdx
lea    0xc42(%rip),%rsi
call   10c0 <fprintf@plt>
mov    $0xffffffff,%edi
call   1110 <exit@plt>
mov    0x2b7c(%rip),%rax
mov    (%rax),%edi
mov    0x2b8b(%rip),%rax
mov    (%rax),%esi
mov    0x2b42(%rip),%rax
mov    (%rax),%edx
call   10e0 <glTexParameterf@plt>
mov    0x2b5c(%rip),%rax
mov    (%rax),%edi
mov    0x2aeb(%rip),%rax
mov    (%rax),%esi
mov    0x2b22(%rip),%rax
mov    (%rax),%edx
call   10e0 <glTexParameterf@plt>
mov    0x2b3c(%rip),%rax
mov    (%rax),%edi
mov    0x2b93(%rip),%rax
mov    (%rax),%esi
mov    0x2b1a(%rip),%rax
mov    (%rax),%edx
call   10e0 <glTexParameterf@plt>
mov    0x2b1c(%rip),%rax
mov    (%rax),%edi
mov    0x2abb(%rip),%rax
mov    (%rax),%esi
mov    0x2b52(%rip),%rax
mov    (%rax),%edx
call   10e0 <glTexParameterf@plt>
mov    0x2b2c(%rip),%rax
mov    (%rax),%edi
mov    0x2b1b(%rip),%rax
mov    (%rax),%esi
mov    0x2afa(%rip),%rax
mov    (%rax),%edx
call   1090 <glTexEnvf@plt>
mov    0x2adc(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2ab6(%rip),%rax
mov    (%rax),%edi
call   10a0 <glDepthFunc@plt>
xorps  %xmm3,%xmm3
movsd  0xb64(%rip),%xmm1
movsd  0xb54(%rip),%xmm2
movaps %xmm3,%xmm0
call   10b0 <glClearColor@plt>
mov    0x2a65(%rip),%rax
mov    (%rax),%edi
mov    0x2ad4(%rip),%rax
or     (%rax),%edi
call   1040 <glClear@plt>
add    $0x30020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_test05>:
push   %r14
push   %rbx
sub    $0x30018,%rsp
mov    0x2d4f(%rip),%rax
mov    (%rax),%edi
call   1050 <glMatrixMode@plt>
xor    %r14d,%r14d
xor    %eax,%eax
call   10d0 <glLoadIdentity@plt>
movsd  0xdd6(%rip),%xmm1
movsd  0xdd6(%rip),%xmm0
movsd  0xdd6(%rip),%xmm3
movsd  0xdd6(%rip),%xmm4
movsd  0xdd6(%rip),%xmm5
movaps %xmm0,%xmm2
call   1070 <glOrtho@plt>
mov    0x2d47(%rip),%rax
mov    (%rax),%edi
call   1050 <glMatrixMode@plt>
mov    0x2cd1(%rip),%rax
mov    (%rax),%edi
call   1100 <glShadeModel@plt>
mov    0x2cbb(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2d4d(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2cbf(%rip),%rax
mov    (%rax),%edi
mov    0x2d3e(%rip),%rax
mov    (%rax),%esi
call   1030 <glBlendFunc@plt>
lea    0x18(%rsp),%rax
mov    $0xff,%ecx
nopl   0x0(%rax,%rax,1)
test   $0x10,%r14b
mov    $0x0,%edx
cmove  %ecx,%edx
mov    %rax,%rsi
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
test   $0x10,%dil
mov    $0x0,%ebx
cmove  %ecx,%ebx
mov    %ebx,-0x8(%rsi)
mov    %edx,-0x4(%rsi)
mov    %edi,(%rsi)
add    $0x1,%rdi
add    $0xc,%rsi
cmp    $0x80,%rdi
jne    12d0 <init_test05+0xd0>
add    $0x1,%r14
add    $0x600,%rax
cmp    $0x80,%r14
jne    12b0 <init_test05+0xb0>
mov    0x2cb1(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1080 <glPixelStorei@plt>
mov    0x2c5e(%rip),%r14
mov    (%r14),%edi
mov    0x2cc4(%rip),%rax
mov    (%rax),%r8d
mov    0x2c12(%rip),%rax
mov    (%rax),%r9d
lea    0x10(%rsp),%rax
mov    %rax,(%rsp)
mov    $0x3,%esi
mov    $0x80,%edx
mov    $0x80,%ecx
call   1120 <gluBuild2DMipmaps@plt>
test   %eax,%eax
jne    1432 <init_test05+0x232>
mov    (%r14),%edi
mov    0x2c30(%rip),%rax
mov    (%rax),%esi
mov    0x2be7(%rip),%rbx
mov    (%rbx),%edx
call   10e0 <glTexParameterf@plt>
mov    (%r14),%edi
mov    0x2b96(%rip),%rax
mov    (%rax),%esi
mov    (%rbx),%edx
call   10e0 <glTexParameterf@plt>
mov    (%r14),%edi
mov    0x2c4b(%rip),%rax
mov    (%rax),%esi
mov    0x2bd2(%rip),%rax
mov    (%rax),%edx
call   10e0 <glTexParameterf@plt>
mov    (%r14),%edi
mov    0x2b79(%rip),%rax
mov    (%rax),%esi
mov    0x2c10(%rip),%rax
mov    (%rax),%edx
call   10e0 <glTexParameterf@plt>
mov    0x2bea(%rip),%rax
mov    (%rax),%edi
mov    0x2bd9(%rip),%rax
mov    (%rax),%esi
mov    0x2bb8(%rip),%rax
mov    (%rax),%edx
call   1090 <glTexEnvf@plt>
mov    (%r14),%edi
call   1060 <glEnable@plt>
mov    0x2b7a(%rip),%rax
mov    (%rax),%edi
call   10a0 <glDepthFunc@plt>
movsd  0xc2b(%rip),%xmm1
movsd  0xc1b(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm3,%xmm3
call   10b0 <glClearColor@plt>
mov    0x2b29(%rip),%rax
mov    0x2b9a(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1040 <glClear@plt>
add    $0x30018,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2b3f(%rip),%rcx
mov    (%rcx),%ebx
mov    %eax,%edi
call   10f0 <gluErrorString@plt>
lea    0xbe7(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   10c0 <fprintf@plt>
mov    $0xffffffff,%edi
call   1110 <exit@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_BLEND = global i32 0
@GL_SRC_ALPHA = global i32 0
@GL_ONE_MINUS_SRC_ALPHA = global i32 0
@GL_UNPACK_ALIGNMENT = global i32 0
@GL_TEXTURE_2D = global i32 0
@GL_RGB = global i32 0
@GL_UNSIGNED_BYTE = global i32 0
@stderr = global i32 0
@.str = [10 x i8] c"GLULib%s\0A\00"
@GL_TEXTURE_WRAP_S = global i32 0
@GL_REPEAT = global i32 0
@GL_TEXTURE_WRAP_T = global i32 0
@GL_TEXTURE_MIN_FILTER = global i32 0
@GL_NEAREST_MIPMAP_LINEAR = global i32 0
@GL_TEXTURE_MAG_FILTER = global i32 0
@GL_LINEAR = global i32 0
@GL_TEXTURE_ENV = global i32 0
@GL_TEXTURE_ENV_MODE = global i32 0
@GL_MODULATE = global i32 0
@GL_ALWAYS = global i32 0
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @init_test05() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [49152 x i32]
%4 = alloca i32
%5 = load i32, i32* @GL_PROJECTION
%6 = call i32 @glMatrixMode(i32 %5)
%7 = call i32 (...) @glLoadIdentity()
%8 = call i32 @glOrtho(double -5.000000e-01, double 6.395000e+02, double -5.000000e-01, double 4.795000e+02, double -1.000000e+00, double 1.000000e+00)
%9 = load i32, i32* @GL_MODELVIEW
%10 = call i32 @glMatrixMode(i32 %9)
%11 = load i32, i32* @GL_SMOOTH
%12 = call i32 @glShadeModel(i32 %11)
%13 = load i32, i32* @GL_DEPTH_TEST
%14 = call i32 @glEnable(i32 %13)
%15 = load i32, i32* @GL_BLEND
%16 = call i32 @glEnable(i32 %15)
%17 = load i32, i32* @GL_SRC_ALPHA
%18 = load i32, i32* @GL_ONE_MINUS_SRC_ALPHA
%19 = call i32 @glBlendFunc(i32 %17, i32 %18)
store i32 0, i32* %2
br label %20
20: ; preds = %67, %0
%21 = load i32, i32* %2
%22 = icmp slt i32 %21, 128
br i1 %22, label %23, label %70
23: ; preds = %20
store i32 0, i32* %1
br label %24
24: ; preds = %63, %23
%25 = load i32, i32* %1
%26 = icmp slt i32 %25, 128
br i1 %26, label %27, label %66
27: ; preds = %24
%28 = load i32, i32* %1
%29 = srem i32 %28, 32
%30 = icmp slt i32 %29, 16
%31 = zext i1 %30 to i64
%32 = select i1 %30, i32 255, i32 0
%33 = load i32, i32* %1
%34 = load i32, i32* %2
%35 = mul nsw i32 %34, 128
%36 = add nsw i32 %33, %35
%37 = mul nsw i32 %36, 3
%38 = add nsw i32 %37, 0
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [49152 x i32], [49152 x i32]* %3, i64 0, i64 %39
store i32 %32, i32* %40
%41 = load i32, i32* %2
%42 = srem i32 %41, 32
%43 = icmp slt i32 %42, 16
%44 = zext i1 %43 to i64
%45 = select i1 %43, i32 255, i32 0
%46 = load i32, i32* %1
%47 = load i32, i32* %2
%48 = mul nsw i32 %47, 128
%49 = add nsw i32 %46, %48
%50 = mul nsw i32 %49, 3
%51 = add nsw i32 %50, 1
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [49152 x i32], [49152 x i32]* %3, i64 0, i64 %52
store i32 %45, i32* %53
%54 = load i32, i32* %1
%55 = load i32, i32* %1
%56 = load i32, i32* %2
%57 = mul nsw i32 %56, 128
%58 = add nsw i32 %55, %57
%59 = mul nsw i32 %58, 3
%60 = add nsw i32 %59, 2
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [49152 x i32], [49152 x i32]* %3, i64 0, i64 %61
store i32 %54, i32* %62
br label %63
63: ; preds = %27
%64 = load i32, i32* %1
%65 = add nsw i32 %64, 1
store i32 %65, i32* %1
br label %24
66: ; preds = %24
br label %67
67: ; preds = %66
%68 = load i32, i32* %2
%69 = add nsw i32 %68, 1
store i32 %69, i32* %2
br label %20
70: ; preds = %20
%71 = load i32, i32* @GL_UNPACK_ALIGNMENT
%72 = call i32 @glPixelStorei(i32 %71, i32 1)
%73 = load i32, i32* @GL_TEXTURE_2D
%74 = load i32, i32* @GL_RGB
%75 = load i32, i32* @GL_UNSIGNED_BYTE
%76 = getelementptr inbounds [49152 x i32], [49152 x i32]* %3, i64 0, i64 0
%77 = call i32 @gluBuild2DMipmaps(i32 %73, i32 3, i32 128, i32 128, i32 %74, i32 %75, i32* %76)
store i32 %77, i32* %4
%78 = icmp ne i32 %77, 0
br i1 %78, label %79, label %85
79: ; preds = %70
%80 = load i32, i32* @stderr
%81 = load i32, i32* %4
%82 = call i8* @gluErrorString(i32 %81)
%83 = call i32 @fprintf(i32 %80, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %82)
%84 = call i32 @exit(i32 -1)
unreachable
85: ; preds = %70
%86 = load i32, i32* @GL_TEXTURE_2D
%87 = load i32, i32* @GL_TEXTURE_WRAP_S
%88 = load i32, i32* @GL_REPEAT
%89 = call i32 @glTexParameterf(i32 %86, i32 %87, i32 %88)
%90 = load i32, i32* @GL_TEXTURE_2D
%91 = load i32, i32* @GL_TEXTURE_WRAP_T
%92 = load i32, i32* @GL_REPEAT
%93 = call i32 @glTexParameterf(i32 %90, i32 %91, i32 %92)
%94 = load i32, i32* @GL_TEXTURE_2D
%95 = load i32, i32* @GL_TEXTURE_MIN_FILTER
%96 = load i32, i32* @GL_NEAREST_MIPMAP_LINEAR
%97 = call i32 @glTexParameterf(i32 %94, i32 %95, i32 %96)
%98 = load i32, i32* @GL_TEXTURE_2D
%99 = load i32, i32* @GL_TEXTURE_MAG_FILTER
%100 = load i32, i32* @GL_LINEAR
%101 = call i32 @glTexParameterf(i32 %98, i32 %99, i32 %100)
%102 = load i32, i32* @GL_TEXTURE_ENV
%103 = load i32, i32* @GL_TEXTURE_ENV_MODE
%104 = load i32, i32* @GL_MODULATE
%105 = call i32 @glTexEnvf(i32 %102, i32 %103, i32 %104)
%106 = load i32, i32* @GL_TEXTURE_2D
%107 = call i32 @glEnable(i32 %106)
%108 = load i32, i32* @GL_ALWAYS
%109 = call i32 @glDepthFunc(i32 %108)
%110 = call i32 @glClearColor(double 0.000000e+00, double 1.000000e-01, double 1.000000e+00, double 0.000000e+00)
%111 = load i32, i32* @GL_COLOR_BUFFER_BIT
%112 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%113 = or i32 %111, %112
%114 = call i32 @glClear(i32 %113)
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_BLEND = global i32 0
@GL_SRC_ALPHA = global i32 0
@GL_ONE_MINUS_SRC_ALPHA = global i32 0
@GL_UNPACK_ALIGNMENT = global i32 0
@GL_TEXTURE_2D = global i32 0
@GL_RGB = global i32 0
@GL_UNSIGNED_BYTE = global i32 0
@stderr = global i32 0
@.str = [10 x i8] c"GLULib%s\0A\00"
@GL_TEXTURE_WRAP_S = global i32 0
@GL_REPEAT = global i32 0
@GL_TEXTURE_WRAP_T = global i32 0
@GL_TEXTURE_MIN_FILTER = global i32 0
@GL_NEAREST_MIPMAP_LINEAR = global i32 0
@GL_TEXTURE_MAG_FILTER = global i32 0
@GL_LINEAR = global i32 0
@GL_TEXTURE_ENV = global i32 0
@GL_TEXTURE_ENV_MODE = global i32 0
@GL_MODULATE = global i32 0
@GL_ALWAYS = global i32 0
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @init_test05() {
%1 = alloca [49152 x i32]
%2 = bitcast [49152 x i32]* %1 to i8*
%3 = load i32, i32* @GL_PROJECTION
%4 = tail call i32 @glMatrixMode(i32 %3)
%5 = tail call i32 (...) @glLoadIdentity()
%6 = 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 1.000000e+00)
%7 = load i32, i32* @GL_MODELVIEW
%8 = tail call i32 @glMatrixMode(i32 %7)
%9 = load i32, i32* @GL_SMOOTH
%10 = tail call i32 @glShadeModel(i32 %9)
%11 = load i32, i32* @GL_DEPTH_TEST
%12 = tail call i32 @glEnable(i32 %11)
%13 = load i32, i32* @GL_BLEND
%14 = tail call i32 @glEnable(i32 %13)
%15 = load i32, i32* @GL_SRC_ALPHA
%16 = load i32, i32* @GL_ONE_MINUS_SRC_ALPHA
%17 = tail call i32 @glBlendFunc(i32 %15, i32 %16)
br label %18
18: ; preds = %0, %39
%19 = phi i64 [ 0, %0 ], [ %40, %39 ]
%20 = shl nsw i64 %19, 7
%21 = and i64 %19, 16
%22 = icmp eq i64 %21, 0
%23 = select i1 %22, i32 255, i32 0
br label %24
24: ; preds = %18, %24
%25 = phi i64 [ 0, %18 ], [ %37, %24 ]
%26 = trunc i64 %25 to i32
%27 = and i32 %26, 16
%28 = icmp eq i32 %27, 0
%29 = select i1 %28, i32 255, i32 0
%30 = add nuw nsw i64 %25, %20
%31 = mul nuw nsw i64 %30, 3
%32 = getelementptr inbounds [49152 x i32], [49152 x i32]* %1, i64 0, i64 %31
store i32 %29, i32* %32
%33 = add nuw nsw i64 %31, 1
%34 = getelementptr inbounds [49152 x i32], [49152 x i32]* %1, i64 0, i64 %33
store i32 %23, i32* %34
%35 = add nuw nsw i64 %31, 2
%36 = getelementptr inbounds [49152 x i32], [49152 x i32]* %1, i64 0, i64 %35
store i32 %26, i32* %36
%37 = add nuw nsw i64 %25, 1
%38 = icmp eq i64 %37, 128
br i1 %38, label %39, label %24
39: ; preds = %24
%40 = add nuw nsw i64 %19, 1
%41 = icmp eq i64 %40, 128
br i1 %41, label %42, label %18
42: ; preds = %39
%43 = load i32, i32* @GL_UNPACK_ALIGNMENT
%44 = tail call i32 @glPixelStorei(i32 %43, i32 1)
%45 = load i32, i32* @GL_TEXTURE_2D
%46 = load i32, i32* @GL_RGB
%47 = load i32, i32* @GL_UNSIGNED_BYTE
%48 = getelementptr inbounds [49152 x i32], [49152 x i32]* %1, i64 0, i64 0
%49 = call i32 @gluBuild2DMipmaps(i32 %45, i32 3, i32 128, i32 128, i32 %46, i32 %47, i32* %48)
%50 = icmp eq i32 %49, 0
br i1 %50, label %56, label %51
51: ; preds = %42
%52 = load i32, i32* @stderr
%53 = call i8* @gluErrorString(i32 %49)
%54 = call i32 @fprintf(i32 %52, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %53)
%55 = call i32 @exit(i32 -1)
unreachable
56: ; preds = %42
%57 = load i32, i32* @GL_TEXTURE_2D
%58 = load i32, i32* @GL_TEXTURE_WRAP_S
%59 = load i32, i32* @GL_REPEAT
%60 = call i32 @glTexParameterf(i32 %57, i32 %58, i32 %59)
%61 = load i32, i32* @GL_TEXTURE_2D
%62 = load i32, i32* @GL_TEXTURE_WRAP_T
%63 = load i32, i32* @GL_REPEAT
%64 = call i32 @glTexParameterf(i32 %61, i32 %62, i32 %63)
%65 = load i32, i32* @GL_TEXTURE_2D
%66 = load i32, i32* @GL_TEXTURE_MIN_FILTER
%67 = load i32, i32* @GL_NEAREST_MIPMAP_LINEAR
%68 = call i32 @glTexParameterf(i32 %65, i32 %66, i32 %67)
%69 = load i32, i32* @GL_TEXTURE_2D
%70 = load i32, i32* @GL_TEXTURE_MAG_FILTER
%71 = load i32, i32* @GL_LINEAR
%72 = call i32 @glTexParameterf(i32 %69, i32 %70, i32 %71)
%73 = load i32, i32* @GL_TEXTURE_ENV
%74 = load i32, i32* @GL_TEXTURE_ENV_MODE
%75 = load i32, i32* @GL_MODULATE
%76 = call i32 @glTexEnvf(i32 %73, i32 %74, i32 %75)
%77 = load i32, i32* @GL_TEXTURE_2D
%78 = call i32 @glEnable(i32 %77)
%79 = load i32, i32* @GL_ALWAYS
%80 = call i32 @glDepthFunc(i32 %79)
%81 = call i32 @glClearColor(double 0.000000e+00, double 1.000000e-01, double 1.000000e+00, double 0.000000e+00)
%82 = load i32, i32* @GL_COLOR_BUFFER_BIT
%83 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%84 = or i32 %83, %82
%85 = call i32 @glClear(i32 %84)
ret void
}