#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 GLfloat;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ GL_BLEND;
int /*<<< orphan*/ GL_EXP2;
int /*<<< orphan*/ GL_FOG;
int /*<<< orphan*/ GL_FOG_COLOR;
int /*<<< orphan*/ GL_FOG_DENSITY;
int /*<<< orphan*/ GL_FOG_MODE;
int /*<<< orphan*/ GL_LINEAR;
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ GL_REPEAT;
int /*<<< orphan*/ GL_RGBA;
int /*<<< orphan*/ GL_TEXTURE_2D;
int /*<<< orphan*/ GL_TEXTURE_ENV;
int /*<<< orphan*/ GL_TEXTURE_ENV_COLOR;
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 /*<<< orphan*/);
scalar_t__ exp(double);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ glClearColor(int, int, int, float);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glFogf(int /*<<< orphan*/, int);
int /*<<< orphan*/ glFogfv(int /*<<< orphan*/, int *);
int /*<<< orphan*/ glFogi(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glPixelStorei(int /*<<< orphan*/, int);
int /*<<< orphan*/ glTexEnvf(int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/);
int /*<<< orphan*/ glTexEnvfv(int /*<<< orphan*/, int /*<<< orphan*/, int *);
int /*<<< orphan*/ glTexImage2D(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                int, int, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/,
                                unsigned int *);
int /*<<< orphan*/ glTexParameteri(int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/);
int /*<<< orphan*/ glTranslatef(int, int, double);
int /*<<< orphan*/ gluPerspective(int, int, double, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
unsigned int *read_texture(char *, int *, int *, int *);
int /*<<< orphan*/ stderr;
void init(char *filename) {
  GLfloat cloud_color[4] = {
      1.,
      1.,
      1.,
      0.,
  };
  GLfloat fog_color[4], fog_density = 0.05, density, far_cull;
  unsigned *image;
  int width, height, components;
  if (filename) {
    image = read_texture(filename, &width, &height, &components);
    if (image == NULL) {
      fprintf(stderr, "Error: Can't load image file \"%s\".\n", filename);
      exit(EXIT_FAILURE);
    } else {
      printf("%d x %d image loaded\n", width, height);
    }
    if (components != 1) {
      printf("must be a bw image\n");
      exit(EXIT_FAILURE);
    }
  } else {
    int i, j;
    unsigned char *img;
    components = 4;
    width = height = 512;
    image = (unsigned *)malloc(width * height * sizeof(unsigned));
    img = (unsigned char *)image;
    for (j = 0; j < height; j++)
      for (i = 0; i < width; i++) {
        int w2 = width / 2, h2 = height / 2;
        if (i & 32)
          img[4 * (i + j * width) + 0] = 0xff;
        else
          img[4 * (i + j * width) + 1] = 0xff;
        if (j & 32)
          img[4 * (i + j * width) + 2] = 0xff;
        if ((i - w2) * (i - w2) + (j - h2) * (j - h2) > 64 * 64 &&
            (i - w2) * (i - w2) + (j - h2) * (j - h2) < 300 * 300)
          img[4 * (i + j * width) + 3] = 0xff;
      }
  }
  glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
  glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND);
  glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, cloud_color);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
  glTexImage2D(GL_TEXTURE_2D, 0, components, width, height, 0, GL_RGBA,
               GL_UNSIGNED_BYTE, image);
  glEnable(GL_TEXTURE_2D);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluPerspective(50., 1., .1, far_cull = 10.);
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();
  glTranslatef(0., 0., -5.5);
  density =
      1. -
      ((float)exp((-5.5 * fog_density * fog_density * far_cull * far_cull)));
  density = ((((density) < (1.) ? (density) : (1.))) > (0.)
                 ? (((density) < (1.) ? (density) : (1.)))
                 : (0.));
  fog_color[0] = .23 + density * .57;
  fog_color[1] = .35 + density * .45;
  fog_color[2] = .78 + density * .22;
  glClearColor(fog_color[0], fog_color[1], fog_color[2], 1.f);
  glFogi(GL_FOG_MODE, GL_EXP2);
  glFogf(GL_FOG_DENSITY, fog_density);
  glFogfv(GL_FOG_COLOR, fog_color);
  if (fog_density > 0)
    glEnable(GL_FOG);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    0xdfa(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xdf7(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x34(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1301 <init+0xc1>
mov    -0x8(%rbp),%rdi
lea    -0x4c(%rbp),%rsi
lea    -0x50(%rbp),%rdx
lea    -0x54(%rbp),%rcx
call   1120 <read_texture@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    12c2 <init+0x82>
mov    0x2cce(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xdb1(%rip),%rsi
call   10e0 <fprintf@plt>
mov    0x2c95(%rip),%rax
mov    (%rax),%edi
call   1160 <exit@plt>
mov    -0x4c(%rbp),%esi
mov    -0x50(%rbp),%edx
lea    0xdb5(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
cmpl   $0x1,-0x54(%rbp)
je     12fc <init+0xbc>
lea    0xdb3(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0x2c5b(%rip),%rax
mov    (%rax),%edi
call   1160 <exit@plt>
jmp    1490 <init+0x250>
movl   $0x4,-0x54(%rbp)
movl   $0x200,-0x50(%rbp)
movl   $0x200,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
imul   -0x50(%rbp),%eax
cltq
shl    $0x2,%rax
mov    %eax,%edi
call   1100 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x68(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x50(%rbp),%eax
jge    148b <init+0x24b>
movl   $0x0,-0x58(%rbp)
mov    -0x58(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jge    1478 <init+0x238>
mov    -0x4c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x6c(%rbp)
mov    -0x50(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x70(%rbp)
mov    -0x58(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     13a9 <init+0x169>
mov    -0x68(%rbp),%rax
mov    -0x58(%rbp),%ecx
mov    -0x5c(%rbp),%edx
imul   -0x4c(%rbp),%edx
add    %edx,%ecx
shl    $0x2,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movb   $0xff,(%rax,%rcx,1)
jmp    13c6 <init+0x186>
mov    -0x68(%rbp),%rax
mov    -0x58(%rbp),%ecx
mov    -0x5c(%rbp),%edx
imul   -0x4c(%rbp),%edx
add    %edx,%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movb   $0xff,(%rax,%rcx,1)
mov    -0x5c(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     13f2 <init+0x1b2>
mov    -0x68(%rbp),%rax
mov    -0x58(%rbp),%ecx
mov    -0x5c(%rbp),%edx
imul   -0x4c(%rbp),%edx
add    %edx,%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movb   $0xff,(%rax,%rcx,1)
mov    -0x58(%rbp),%eax
sub    -0x6c(%rbp),%eax
mov    -0x58(%rbp),%ecx
sub    -0x6c(%rbp),%ecx
imul   %ecx,%eax
mov    -0x5c(%rbp),%ecx
sub    -0x70(%rbp),%ecx
mov    -0x5c(%rbp),%edx
sub    -0x70(%rbp),%edx
imul   %edx,%ecx
add    %ecx,%eax
cmp    $0x1000,%eax
jle    1465 <init+0x225>
mov    -0x58(%rbp),%eax
sub    -0x6c(%rbp),%eax
mov    -0x58(%rbp),%ecx
sub    -0x6c(%rbp),%ecx
imul   %ecx,%eax
mov    -0x5c(%rbp),%ecx
sub    -0x70(%rbp),%ecx
mov    -0x5c(%rbp),%edx
sub    -0x70(%rbp),%edx
imul   %edx,%ecx
add    %ecx,%eax
cmp    $0x15f90,%eax
jge    1465 <init+0x225>
mov    -0x68(%rbp),%rax
mov    -0x58(%rbp),%ecx
mov    -0x5c(%rbp),%edx
imul   -0x4c(%rbp),%edx
add    %edx,%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movb   $0xff,(%rax,%rcx,1)
jmp    146a <init+0x22a>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1350 <init+0x110>
jmp    147d <init+0x23d>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    133d <init+0xfd>
jmp    1490 <init+0x250>
mov    0x2b31(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   10a0 <glPixelStorei@plt>
mov    0x2b0e(%rip),%rax
mov    (%rax),%edi
mov    0x2af5(%rip),%rax
mov    (%rax),%esi
mov    0x2b1c(%rip),%rax
mov    (%rax),%edx
call   10c0 <glTexEnvf@plt>
mov    0x2aee(%rip),%rax
mov    (%rax),%edi
mov    0x2a8d(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1130 <glTexEnvfv@plt>
mov    0x2a9b(%rip),%rax
mov    (%rax),%edi
mov    0x2af2(%rip),%rax
mov    (%rax),%esi
mov    0x2ad9(%rip),%rax
mov    (%rax),%edx
call   1060 <glTexParameteri@plt>
mov    0x2a7b(%rip),%rax
mov    (%rax),%edi
mov    0x2a2a(%rip),%rax
mov    (%rax),%esi
mov    0x2ab9(%rip),%rax
mov    (%rax),%edx
call   1060 <glTexParameteri@plt>
mov    0x2a5b(%rip),%rax
mov    (%rax),%edi
mov    0x2a6a(%rip),%rax
mov    (%rax),%esi
mov    0x2a11(%rip),%rax
mov    (%rax),%edx
call   1060 <glTexParameteri@plt>
mov    0x2a3b(%rip),%rax
mov    (%rax),%edi
mov    0x29da(%rip),%rax
mov    (%rax),%esi
mov    0x29f1(%rip),%rax
mov    (%rax),%edx
call   1060 <glTexParameteri@plt>
mov    0x2a1b(%rip),%rax
mov    (%rax),%edi
mov    -0x54(%rbp),%edx
mov    -0x4c(%rbp),%ecx
mov    -0x50(%rbp),%r8d
mov    0x2a78(%rip),%rax
mov    (%rax),%r11d
mov    0x29be(%rip),%rax
mov    (%rax),%r10d
mov    -0x48(%rbp),%rax
xor    %r9d,%r9d
mov    %r9d,%esi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1080 <glTexImage2D@plt>
mov    0x29d7(%rip),%rax
mov    (%rax),%edi
call   1090 <glEnable@plt>
mov    0x29a1(%rip),%rax
mov    (%rax),%edi
call   1050 <glMatrixMode@plt>
mov    $0x0,%al
call   10f0 <glLoadIdentity@plt>
movl   $0xa,-0x3c(%rbp)
mov    $0x32,%edi
mov    $0x1,%esi
movsd  0xa32(%rip),%xmm0
mov    $0xa,%edx
call   10b0 <gluPerspective@plt>
mov    0x29b1(%rip),%rax
mov    (%rax),%edi
call   1050 <glMatrixMode@plt>
mov    $0x0,%al
call   10f0 <glLoadIdentity@plt>
xor    %esi,%esi
movsd  0xa01(%rip),%xmm0
mov    %esi,%edi
call   1150 <glTranslatef@plt>
cvtsi2sdl -0x34(%rbp),%xmm1
movsd  0x9ed(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x34(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x3c(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x3c(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1110 <exp@plt>
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0x9b0(%rip),%xmm0
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x38(%rbp)
cvtsi2sdl -0x38(%rbp),%xmm1
movsd  0x998(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1681 <init+0x441>
cvtsi2sdl -0x38(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    1693 <init+0x453>
movsd  0x977(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
jmp    1693 <init+0x453>
movsd  -0x78(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    16ef <init+0x4af>
cvtsi2sdl -0x38(%rbp),%xmm1
movsd  0x94e(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    16cb <init+0x48b>
cvtsi2sdl -0x38(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
jmp    16dd <init+0x49d>
movsd  0x92d(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
jmp    16dd <init+0x49d>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    16ff <init+0x4bf>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    16ff <init+0x4bf>
movsd  -0x88(%rbp),%xmm0
ff
cvttsd2si %xmm0,%eax
mov    %eax,-0x38(%rbp)
cvtsi2sdl -0x38(%rbp),%xmm0
movsd  0x91d(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x919(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x30(%rbp)
cvtsi2sdl -0x38(%rbp),%xmm0
movsd  0x8e9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x8e5(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x2c(%rbp)
cvtsi2sdl -0x38(%rbp),%xmm0
movsd  0x8b5(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x8b1(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x28(%rbp)
mov    -0x30(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    -0x28(%rbp),%edx
movss  0x8bd(%rip),%xmm0
call   10d0 <glClearColor@plt>
mov    0x27e1(%rip),%rax
mov    (%rax),%edi
mov    0x2820(%rip),%rax
mov    (%rax),%esi
call   1140 <glFogi@plt>
mov    0x27e2(%rip),%rax
mov    (%rax),%edi
mov    -0x34(%rbp),%esi
call   1040 <glFogf@plt>
mov    0x27f1(%rip),%rax
mov    (%rax),%edi
lea    -0x30(%rbp),%rsi
call   1030 <glFogfv@plt>
cmpl   $0x0,-0x34(%rbp)
jle    17e2 <init+0x5a2>
mov    0x278d(%rip),%rax
mov    (%rax),%edi
call   1090 <glEnable@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
movaps 0xe00(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
test   %rdi,%rdi
je     14dd <init+0x28d>
mov    %rdi,%r14
lea    0x4(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1130 <read_texture@plt>
test   %rax,%rax
je     15bf <init+0x36f>
mov    %rax,%r15
mov    0x4(%rsp),%esi
mov    0x8(%rsp),%edx
lea    0xdf4(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
cmpl   $0x1,0xc(%rsp)
jne    15d9 <init+0x389>
mov    0x2d0f(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   10b0 <glPixelStorei@plt>
mov    0x2cec(%rip),%rbx
mov    (%rbx),%edi
mov    0x2cd3(%rip),%rax
mov    (%rax),%esi
mov    0x2cfa(%rip),%rax
mov    (%rax),%edx
call   10d0 <glTexEnvf@plt>
mov    (%rbx),%edi
mov    0x2c7a(%rip),%rax
mov    (%rax),%esi
lea    0x20(%rsp),%rdx
call   1140 <glTexEnvfv@plt>
mov    0x2c7f(%rip),%r14
mov    (%r14),%edi
mov    0x2cd5(%rip),%rax
mov    (%rax),%esi
mov    0x2cbc(%rip),%rbx
mov    (%rbx),%edx
call   1070 <glTexParameteri@plt>
mov    (%r14),%edi
mov    0x2c1b(%rip),%rax
mov    (%rax),%esi
mov    (%rbx),%edx
call   1070 <glTexParameteri@plt>
mov    (%r14),%edi
mov    0x2c60(%rip),%rax
mov    (%rax),%esi
mov    0x2c0f(%rip),%rbx
mov    (%rbx),%edx
call   1070 <glTexParameteri@plt>
mov    (%r14),%edi
mov    0x2bde(%rip),%rax
mov    (%rax),%esi
mov    (%rbx),%edx
call   1070 <glTexParameteri@plt>
mov    (%r14),%edi
mov    0xc(%rsp),%edx
mov    0x4(%rsp),%ecx
mov    0x8(%rsp),%r8d
mov    0x2c7e(%rip),%rax
mov    (%rax),%eax
mov    0x2bcd(%rip),%rsi
mov    (%rsi),%ebx
sub    $0x8,%rsp
xor    %esi,%esi
xor    %r9d,%r9d
push   %r15
push   %rbx
push   %rax
call   1090 <glTexImage2D@plt>
add    $0x20,%rsp
mov    (%r14),%edi
call   10a0 <glEnable@plt>
mov    0x2bbe(%rip),%rax
mov    (%rax),%edi
call   1060 <glMatrixMode@plt>
xor    %eax,%eax
call   1100 <glLoadIdentity@plt>
movsd  0xc48(%rip),%xmm0
mov    $0x32,%edi
mov    $0x1,%esi
mov    $0xa,%edx
call   10c0 <gluPerspective@plt>
mov    0x2bcd(%rip),%rax
mov    (%rax),%edi
call   1060 <glMatrixMode@plt>
xor    %eax,%eax
call   1100 <glLoadIdentity@plt>
movsd  0xc1f(%rip),%xmm0
xor    %edi,%edi
xor    %esi,%esi
call   1160 <glTranslatef@plt>
movsd  0xc16(%rip),%xmm0
call   1120 <exp@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc05(%rip),%xmm1
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
cvttpd2dq %xmm2,%xmm0
cvtdq2pd %xmm0,%xmm0
minsd  %xmm1,%xmm0
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
andpd  %xmm1,%xmm2
movsd  0xbdc(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xbd8(%rip),%xmm0
cvttsd2si %xmm0,%edi
mov    %edi,0x10(%rsp)
movsd  0xbd0(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xbcc(%rip),%xmm0
cvttsd2si %xmm0,%esi
mulsd  0xbc8(%rip),%xmm2
addsd  0xbc8(%rip),%xmm2
mov    %esi,0x14(%rsp)
cvttsd2si %xmm2,%edx
mov    %edx,0x18(%rsp)
movss  0xbbc(%rip),%xmm0
call   10e0 <glClearColor@plt>
mov    0x2ad8(%rip),%rax
mov    (%rax),%edi
mov    0x2b17(%rip),%rax
mov    (%rax),%esi
call   1150 <glFogi@plt>
mov    0x2ad9(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1050 <glFogf@plt>
mov    0x2ae9(%rip),%rax
mov    (%rax),%edi
lea    0x10(%rsp),%rsi
call   1030 <glFogfv@plt>
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
movl   $0x4,0xc(%rsp)
movl   $0x200,0x8(%rsp)
movl   $0x200,0x4(%rsp)
mov    $0x100000,%edi
call   1110 <malloc@plt>
mov    %rax,%r15
xor    %eax,%eax
mov    $0x200,%edi
mov    $0x200,%edx
jmp    151b <init+0x2cb>
add    $0x1,%eax
cmp    %edi,%eax
jge    12b2 <init+0x62>
test   %edx,%edx
jle    1510 <init+0x2c0>
xor    %ecx,%ecx
jmp    153f <init+0x2ef>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%ecx
mov    0x4(%rsp),%edx
mov    0x8(%rsp),%edi
cmp    %edx,%ecx
jge    1510 <init+0x2c0>
mov    %edx,%esi
shr    $0x1f,%esi
add    %edx,%esi
sar    %esi
neg    %esi
mov    %edi,%ebx
shr    $0x1f,%ebx
add    %edi,%ebx
sar    %ebx
neg    %ebx
imul   %eax,%edx
add    %ecx,%edx
mov    %ecx,%edi
shr    $0x5,%edi
and    $0x1,%edi
lea    (%rdi,%rdx,4),%edx
movslq %edx,%rdx
xor    $0x1,%rdx
movb   $0xff,(%r15,%rdx,1)
test   $0x20,%al
je     158a <init+0x33a>
mov    0x4(%rsp),%edx
imul   %eax,%edx
add    %ecx,%edx
shl    $0x2,%edx
movslq %edx,%rdx
movb   $0xff,0x2(%r15,%rdx,1)
add    %ecx,%esi
imul   %esi,%esi
add    %eax,%ebx
imul   %ebx,%ebx
lea    (%rsi,%rbx,1),%edx
add    $0xffffefff,%edx
cmp    $0x14f8e,%edx
ja     1530 <init+0x2e0>
mov    0x4(%rsp),%edx
imul   %eax,%edx
add    %ecx,%edx
shl    $0x2,%edx
movslq %edx,%rdx
movb   $0xff,0x3(%r15,%rdx,1)
jmp    1530 <init+0x2e0>
mov    0x29aa(%rip),%rax
mov    (%rax),%edi
lea    0xaa1(%rip),%rsi
mov    %r14,%rdx
call   10f0 <fprintf@plt>
jmp    15e5 <init+0x395>
lea    0xaca(%rip),%rdi
call   1040 <puts@plt>
mov    0x296c(%rip),%rax
mov    (%rax),%edi
call   1170 <exit@plt>

LLVM IR (-O0):
@__const.init.cloud_color = [4 x i32] [i32 1, i32 1, i32 1, i32 0]
@stderr = global i32 0
@.str = [36 x i8] c"Error: Can't load image file \22%s\22.\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [22 x i8] c"%d x %d image loaded\0A\00"
@.str.2 = [20 x i8] c"must be a bw image\0A\00"
@GL_UNPACK_ALIGNMENT = global i32 0
@GL_TEXTURE_ENV = global i32 0
@GL_TEXTURE_ENV_MODE = global i32 0
@GL_BLEND = global i32 0
@GL_TEXTURE_ENV_COLOR = global i32 0
@GL_TEXTURE_2D = global i32 0
@GL_TEXTURE_MIN_FILTER = global i32 0
@GL_LINEAR = global i32 0
@GL_TEXTURE_MAG_FILTER = global i32 0
@GL_TEXTURE_WRAP_S = global i32 0
@GL_REPEAT = global i32 0
@GL_TEXTURE_WRAP_T = global i32 0
@GL_RGBA = global i32 0
@GL_UNSIGNED_BYTE = global i32 0
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
@GL_FOG_MODE = global i32 0
@GL_EXP2 = global i32 0
@GL_FOG_DENSITY = global i32 0
@GL_FOG_COLOR = global i32 0
@GL_FOG = global i32 0
define void @init(i8* %0) {
%2 = alloca i8*
%3 = alloca [4 x i32]
%4 = alloca [4 x i32]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i32
%16 = alloca i32
store i8* %0, i8** %2
%17 = bitcast [4 x i32]* %3 to i8*
store i32 0, i32* %5
%18 = load i8*, i8** %2
%19 = icmp ne i8* %18, null
br i1 %19, label %20, label %43
20: ; preds = %1
%21 = load i8*, i8** %2
%22 = call i32* @read_texture(i8* %21, i32* %9, i32* %10, i32* %11)
store i32* %22, i32** %8
%23 = load i32*, i32** %8
%24 = icmp eq i32* %23, null
br i1 %24, label %25, label %31
25: ; preds = %20
%26 = load i32, i32* @stderr
%27 = load i8*, i8** %2
%28 = call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %27)
%29 = load i32, i32* @EXIT_FAILURE
%30 = call i32 @exit(i32 %29)
unreachable
31: ; preds = %20
%32 = load i32, i32* %9
%33 = load i32, i32* %10
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %32, i32 %33)
br label %35
35: ; preds = %31
%36 = load i32, i32* %11
%37 = icmp ne i32 %36, 1
br i1 %37, label %38, label %42
38: ; preds = %35
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%40 = load i32, i32* @EXIT_FAILURE
%41 = call i32 @exit(i32 %40)
unreachable
42: ; preds = %35
br label %162
43: ; preds = %1
store i32 4, i32* %11
store i32 512, i32* %10
store i32 512, i32* %9
%44 = load i32, i32* %9
%45 = load i32, i32* %10
%46 = mul nsw i32 %44, %45
%47 = sext i32 %46 to i64
%48 = mul i64 %47, 4
%49 = trunc i64 %48 to i32
%50 = call i64 @malloc(i32 %49)
%51 = inttoptr i64 %50 to i32*
store i32* %51, i32** %8
%52 = load i32*, i32** %8
%53 = bitcast i32* %52 to i8*
store i8* %53, i8** %14
store i32 0, i32* %13
br label %54
54: ; preds = %158, %43
%55 = load i32, i32* %13
%56 = load i32, i32* %10
%57 = icmp slt i32 %55, %56
br i1 %57, label %58, label %161
58: ; preds = %54
store i32 0, i32* %12
br label %59
59: ; preds = %154, %58
%60 = load i32, i32* %12
%61 = load i32, i32* %9
%62 = icmp slt i32 %60, %61
br i1 %62, label %63, label %157
63: ; preds = %59
%64 = load i32, i32* %9
%65 = sdiv i32 %64, 2
store i32 %65, i32* %15
%66 = load i32, i32* %10
%67 = sdiv i32 %66, 2
store i32 %67, i32* %16
%68 = load i32, i32* %12
%69 = and i32 %68, 32
%70 = icmp ne i32 %69, 0
br i1 %70, label %71, label %82
71: ; preds = %63
%72 = load i8*, i8** %14
%73 = load i32, i32* %12
%74 = load i32, i32* %13
%75 = load i32, i32* %9
%76 = mul nsw i32 %74, %75
%77 = add nsw i32 %73, %76
%78 = mul nsw i32 4, %77
%79 = add nsw i32 %78, 0
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i8, i8* %72, i64 %80
store i8 -1, i8* %81
br label %93
82: ; preds = %63
%83 = load i8*, i8** %14
%84 = load i32, i32* %12
%85 = load i32, i32* %13
%86 = load i32, i32* %9
%87 = mul nsw i32 %85, %86
%88 = add nsw i32 %84, %87
%89 = mul nsw i32 4, %88
%90 = add nsw i32 %89, 1
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds i8, i8* %83, i64 %91
store i8 -1, i8* %92
br label %93
93: ; preds = %82, %71
%94 = load i32, i32* %13
%95 = and i32 %94, 32
%96 = icmp ne i32 %95, 0
br i1 %96, label %97, label %108
97: ; preds = %93
%98 = load i8*, i8** %14
%99 = load i32, i32* %12
%100 = load i32, i32* %13
%101 = load i32, i32* %9
%102 = mul nsw i32 %100, %101
%103 = add nsw i32 %99, %102
%104 = mul nsw i32 4, %103
%105 = add nsw i32 %104, 2
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds i8, i8* %98, i64 %106
store i8 -1, i8* %107
br label %108
108: ; preds = %97, %93
%109 = load i32, i32* %12
%110 = load i32, i32* %15
%111 = sub nsw i32 %109, %110
%112 = load i32, i32* %12
%113 = load i32, i32* %15
%114 = sub nsw i32 %112, %113
%115 = mul nsw i32 %111, %114
%116 = load i32, i32* %13
%117 = load i32, i32* %16
%118 = sub nsw i32 %116, %117
%119 = load i32, i32* %13
%120 = load i32, i32* %16
%121 = sub nsw i32 %119, %120
%122 = mul nsw i32 %118, %121
%123 = add nsw i32 %115, %122
%124 = icmp sgt i32 %123, 4096
br i1 %124, label %125, label %153
125: ; preds = %108
%126 = load i32, i32* %12
%127 = load i32, i32* %15
%128 = sub nsw i32 %126, %127
%129 = load i32, i32* %12
%130 = load i32, i32* %15
%131 = sub nsw i32 %129, %130
%132 = mul nsw i32 %128, %131
%133 = load i32, i32* %13
%134 = load i32, i32* %16
%135 = sub nsw i32 %133, %134
%136 = load i32, i32* %13
%137 = load i32, i32* %16
%138 = sub nsw i32 %136, %137
%139 = mul nsw i32 %135, %138
%140 = add nsw i32 %132, %139
%141 = icmp slt i32 %140, 90000
br i1 %141, label %142, label %153
142: ; preds = %125
%143 = load i8*, i8** %14
%144 = load i32, i32* %12
%145 = load i32, i32* %13
%146 = load i32, i32* %9
%147 = mul nsw i32 %145, %146
%148 = add nsw i32 %144, %147
%149 = mul nsw i32 4, %148
%150 = add nsw i32 %149, 3
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds i8, i8* %143, i64 %151
store i8 -1, i8* %152
br label %153
153: ; preds = %142, %125, %108
br label %154
154: ; preds = %153
%155 = load i32, i32* %12
%156 = add nsw i32 %155, 1
store i32 %156, i32* %12
br label %59
157: ; preds = %59
br label %158
158: ; preds = %157
%159 = load i32, i32* %13
%160 = add nsw i32 %159, 1
store i32 %160, i32* %13
br label %54
161: ; preds = %54
br label %162
162: ; preds = %161, %42
%163 = load i32, i32* @GL_UNPACK_ALIGNMENT
%164 = call i32 @glPixelStorei(i32 %163, i32 1)
%165 = load i32, i32* @GL_TEXTURE_ENV
%166 = load i32, i32* @GL_TEXTURE_ENV_MODE
%167 = load i32, i32* @GL_BLEND
%168 = call i32 @glTexEnvf(i32 %165, i32 %166, i32 %167)
%169 = load i32, i32* @GL_TEXTURE_ENV
%170 = load i32, i32* @GL_TEXTURE_ENV_COLOR
%171 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%172 = call i32 @glTexEnvfv(i32 %169, i32 %170, i32* %171)
%173 = load i32, i32* @GL_TEXTURE_2D
%174 = load i32, i32* @GL_TEXTURE_MIN_FILTER
%175 = load i32, i32* @GL_LINEAR
%176 = call i32 @glTexParameteri(i32 %173, i32 %174, i32 %175)
%177 = load i32, i32* @GL_TEXTURE_2D
%178 = load i32, i32* @GL_TEXTURE_MAG_FILTER
%179 = load i32, i32* @GL_LINEAR
%180 = call i32 @glTexParameteri(i32 %177, i32 %178, i32 %179)
%181 = load i32, i32* @GL_TEXTURE_2D
%182 = load i32, i32* @GL_TEXTURE_WRAP_S
%183 = load i32, i32* @GL_REPEAT
%184 = call i32 @glTexParameteri(i32 %181, i32 %182, i32 %183)
%185 = load i32, i32* @GL_TEXTURE_2D
%186 = load i32, i32* @GL_TEXTURE_WRAP_T
%187 = load i32, i32* @GL_REPEAT
%188 = call i32 @glTexParameteri(i32 %185, i32 %186, i32 %187)
%189 = load i32, i32* @GL_TEXTURE_2D
%190 = load i32, i32* %11
%191 = load i32, i32* %9
%192 = load i32, i32* %10
%193 = load i32, i32* @GL_RGBA
%194 = load i32, i32* @GL_UNSIGNED_BYTE
%195 = load i32*, i32** %8
%196 = call i32 @glTexImage2D(i32 %189, i32 0, i32 %190, i32 %191, i32 %192, i32 0, i32 %193, i32 %194, i32* %195)
%197 = load i32, i32* @GL_TEXTURE_2D
%198 = call i32 @glEnable(i32 %197)
%199 = load i32, i32* @GL_PROJECTION
%200 = call i32 @glMatrixMode(i32 %199)
%201 = call i32 (...) @glLoadIdentity()
store i32 10, i32* %7
%202 = call i32 @gluPerspective(i32 50, i32 1, double 1.000000e-01, i32 10)
%203 = load i32, i32* @GL_MODELVIEW
%204 = call i32 @glMatrixMode(i32 %203)
%205 = call i32 (...) @glLoadIdentity()
%206 = call i32 @glTranslatef(i32 0, i32 0, double -5.500000e+00)
%207 = load i32, i32* %5
%208 = sitofp i32 %207 to double
%209 = fmul double -5.500000e+00, %208
%210 = load i32, i32* %5
%211 = sitofp i32 %210 to double
%212 = fmul double %209, %211
%213 = load i32, i32* %7
%214 = sitofp i32 %213 to double
%215 = fmul double %212, %214
%216 = load i32, i32* %7
%217 = sitofp i32 %216 to double
%218 = fmul double %215, %217
%219 = call i64 @exp(double %218)
%220 = sitofp i64 %219 to float
%221 = fpext float %220 to double
%222 = fsub double 1.000000e+00, %221
%223 = fptosi double %222 to i32
store i32 %223, i32* %6
%224 = load i32, i32* %6
%225 = sitofp i32 %224 to double
%226 = fcmp olt double %225, 1.000000e+00
br i1 %226, label %227, label %230
227: ; preds = %162
%228 = load i32, i32* %6
%229 = sitofp i32 %228 to double
br label %231
230: ; preds = %162
br label %231
231: ; preds = %230, %227
%232 = phi double [ %229, %227 ], [ 1.000000e+00, %230 ]
%233 = fcmp ogt double %232, 0.000000e+00
br i1 %233, label %234, label %244
234: ; preds = %231
%235 = load i32, i32* %6
%236 = sitofp i32 %235 to double
%237 = fcmp olt double %236, 1.000000e+00
br i1 %237, label %238, label %241
238: ; preds = %234
%239 = load i32, i32* %6
%240 = sitofp i32 %239 to double
br label %242
241: ; preds = %234
br label %242
242: ; preds = %241, %238
%243 = phi double [ %240, %238 ], [ 1.000000e+00, %241 ]
br label %245
244: ; preds = %231
br label %245
245: ; preds = %244, %242
%246 = phi double [ %243, %242 ], [ 0.000000e+00, %244 ]
%247 = fptosi double %246 to i32
store i32 %247, i32* %6
%248 = load i32, i32* %6
%249 = sitofp i32 %248 to double
%250 = call double @llvm.fmuladd.f64(double %249, double 5.700000e-01, double 2.300000e-01)
%251 = fptosi double %250 to i32
%252 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 0
store i32 %251, i32* %252
%253 = load i32, i32* %6
%254 = sitofp i32 %253 to double
%255 = call double @llvm.fmuladd.f64(double %254, double 4.500000e-01, double 3.500000e-01)
%256 = fptosi double %255 to i32
%257 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 1
store i32 %256, i32* %257
%258 = load i32, i32* %6
%259 = sitofp i32 %258 to double
%260 = call double @llvm.fmuladd.f64(double %259, double 2.200000e-01, double 7.800000e-01)
%261 = fptosi double %260 to i32
%262 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 2
store i32 %261, i32* %262
%263 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 0
%264 = load i32, i32* %263
%265 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 1
%266 = load i32, i32* %265
%267 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 2
%268 = load i32, i32* %267
%269 = call i32 @glClearColor(i32 %264, i32 %266, i32 %268, float 1.000000e+00)
%270 = load i32, i32* @GL_FOG_MODE
%271 = load i32, i32* @GL_EXP2
%272 = call i32 @glFogi(i32 %270, i32 %271)
%273 = load i32, i32* @GL_FOG_DENSITY
%274 = load i32, i32* %5
%275 = call i32 @glFogf(i32 %273, i32 %274)
%276 = load i32, i32* @GL_FOG_COLOR
%277 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 0
%278 = call i32 @glFogfv(i32 %276, i32* %277)
%279 = load i32, i32* %5
%280 = icmp sgt i32 %279, 0
br i1 %280, label %281, label %284
281: ; preds = %245
%282 = load i32, i32* @GL_FOG
%283 = call i32 @glEnable(i32 %282)
br label %284
284: ; preds = %281, %245
ret void
}

LLVM IR (-O2):
@__const.init.cloud_color = [4 x i32] [i32 1, i32 1, i32 1, i32 0]
@stderr = global i32 0
@.str = [36 x i8] c"Error: Can't load image file \22%s\22.\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [22 x i8] c"%d x %d image loaded\0A\00"
@GL_UNPACK_ALIGNMENT = global i32 0
@GL_TEXTURE_ENV = global i32 0
@GL_TEXTURE_ENV_MODE = global i32 0
@GL_BLEND = global i32 0
@GL_TEXTURE_ENV_COLOR = global i32 0
@GL_TEXTURE_2D = global i32 0
@GL_TEXTURE_MIN_FILTER = global i32 0
@GL_LINEAR = global i32 0
@GL_TEXTURE_MAG_FILTER = global i32 0
@GL_TEXTURE_WRAP_S = global i32 0
@GL_REPEAT = global i32 0
@GL_TEXTURE_WRAP_T = global i32 0
@GL_RGBA = global i32 0
@GL_UNSIGNED_BYTE = global i32 0
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
@GL_FOG_MODE = global i32 0
@GL_EXP2 = global i32 0
@GL_FOG_DENSITY = global i32 0
@GL_FOG_COLOR = global i32 0
@GL_FOG = global i32 0
@str = [19 x i8] c"must be a bw image\00"
define void @init(i8* %0) {
%2 = alloca [4 x i32]
%3 = alloca [4 x i32]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = bitcast [4 x i32]* %2 to i8*
%8 = bitcast [4 x i32]* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = bitcast i32* %6 to i8*
%12 = icmp eq i8* %0, null
br i1 %12, label %31, label %13
13: ; preds = %1
%14 = call i32* @read_texture(i8* %0, i32* %4, i32* %5, i32* %6)
%15 = icmp eq i32* %14, null
br i1 %15, label %16, label %21
16: ; preds = %13
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %0)
%19 = load i32, i32* @EXIT_FAILURE
%20 = call i32 @exit(i32 %19)
unreachable
21: ; preds = %13
%22 = load i32, i32* %4
%23 = load i32, i32* %5
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %22, i32 %23)
%25 = load i32, i32* %6
%26 = icmp eq i32 %25, 1
br i1 %26, label %92, label %27
27: ; preds = %21
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%29 = load i32, i32* @EXIT_FAILURE
%30 = call i32 @exit(i32 %29)
unreachable
31: ; preds = %1
store i32 4, i32* %6
store i32 512, i32* %5
store i32 512, i32* %4
%32 = tail call i64 @malloc(i32 1048576)
%33 = inttoptr i64 %32 to i32*
%34 = inttoptr i64 %32 to i8*
br label %35
35: ; preds = %31, %87
%36 = phi i32 [ %88, %87 ], [ 512, %31 ]
%37 = phi i32 [ %89, %87 ], [ 512, %31 ]
%38 = phi i32 [ %90, %87 ], [ 0, %31 ]
%39 = icmp sgt i32 %37, 0
br i1 %39, label %40, label %87
40: ; preds = %35
%41 = and i32 %38, 32
%42 = icmp eq i32 %41, 0
br label %43
43: ; preds = %82, %40
%44 = phi i32 [ %36, %40 ], [ %86, %82 ]
%45 = phi i32 [ %37, %40 ], [ %84, %82 ]
%46 = phi i32 [ 0, %40 ], [ %83, %82 ]
%47 = sdiv i32 %45, -2
%48 = sdiv i32 %44, -2
%49 = mul nsw i32 %45, %38
%50 = add nsw i32 %49, %46
%51 = shl nsw i32 %50, 2
%52 = lshr i32 %46, 5
%53 = and i32 %52, 1
%54 = or i32 %53, %51
%55 = xor i32 %54, 1
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds i8, i8* %34, i64 %56
store i8 -1, i8* %57
br i1 %42, label %66, label %58
58: ; preds = %43
%59 = load i32, i32* %4
%60 = mul nsw i32 %59, %38
%61 = add nsw i32 %60, %46
%62 = shl nsw i32 %61, 2
%63 = or i32 %62, 2
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i8, i8* %34, i64 %64
store i8 -1, i8* %65
br label %66
66: ; preds = %58, %43
%67 = add i32 %47, %46
%68 = mul nsw i32 %67, %67
%69 = add i32 %48, %38
%70 = mul nsw i32 %69, %69
%71 = add nsw i32 %68, -4097
%72 = add i32 %71, %70
%73 = icmp ult i32 %72, 85903
br i1 %73, label %74, label %82
74: ; preds = %66
%75 = load i32, i32* %4
%76 = mul nsw i32 %75, %38
%77 = add nsw i32 %76, %46
%78 = shl nsw i32 %77, 2
%79 = or i32 %78, 3
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i8, i8* %34, i64 %80
store i8 -1, i8* %81
br label %82
82: ; preds = %74, %66
%83 = add nuw nsw i32 %46, 1
%84 = load i32, i32* %4
%85 = icmp slt i32 %83, %84
%86 = load i32, i32* %5
br i1 %85, label %43, label %87
87: ; preds = %82, %35
%88 = phi i32 [ %36, %35 ], [ %86, %82 ]
%89 = phi i32 [ %37, %35 ], [ %84, %82 ]
%90 = add nuw nsw i32 %38, 1
%91 = icmp slt i32 %90, %88
br i1 %91, label %35, label %92
92: ; preds = %87, %21
%93 = phi i32* [ %14, %21 ], [ %33, %87 ]
%94 = load i32, i32* @GL_UNPACK_ALIGNMENT
%95 = call i32 @glPixelStorei(i32 %94, i32 1)
%96 = load i32, i32* @GL_TEXTURE_ENV
%97 = load i32, i32* @GL_TEXTURE_ENV_MODE
%98 = load i32, i32* @GL_BLEND
%99 = call i32 @glTexEnvf(i32 %96, i32 %97, i32 %98)
%100 = load i32, i32* @GL_TEXTURE_ENV
%101 = load i32, i32* @GL_TEXTURE_ENV_COLOR
%102 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%103 = call i32 @glTexEnvfv(i32 %100, i32 %101, i32* %102)
%104 = load i32, i32* @GL_TEXTURE_2D
%105 = load i32, i32* @GL_TEXTURE_MIN_FILTER
%106 = load i32, i32* @GL_LINEAR
%107 = call i32 @glTexParameteri(i32 %104, i32 %105, i32 %106)
%108 = load i32, i32* @GL_TEXTURE_2D
%109 = load i32, i32* @GL_TEXTURE_MAG_FILTER
%110 = load i32, i32* @GL_LINEAR
%111 = call i32 @glTexParameteri(i32 %108, i32 %109, i32 %110)
%112 = load i32, i32* @GL_TEXTURE_2D
%113 = load i32, i32* @GL_TEXTURE_WRAP_S
%114 = load i32, i32* @GL_REPEAT
%115 = call i32 @glTexParameteri(i32 %112, i32 %113, i32 %114)
%116 = load i32, i32* @GL_TEXTURE_2D
%117 = load i32, i32* @GL_TEXTURE_WRAP_T
%118 = load i32, i32* @GL_REPEAT
%119 = call i32 @glTexParameteri(i32 %116, i32 %117, i32 %118)
%120 = load i32, i32* @GL_TEXTURE_2D
%121 = load i32, i32* %6
%122 = load i32, i32* %4
%123 = load i32, i32* %5
%124 = load i32, i32* @GL_RGBA
%125 = load i32, i32* @GL_UNSIGNED_BYTE
%126 = call i32 @glTexImage2D(i32 %120, i32 0, i32 %121, i32 %122, i32 %123, i32 0, i32 %124, i32 %125, i32* %93)
%127 = load i32, i32* @GL_TEXTURE_2D
%128 = call i32 @glEnable(i32 %127)
%129 = load i32, i32* @GL_PROJECTION
%130 = call i32 @glMatrixMode(i32 %129)
%131 = call i32 (...) @glLoadIdentity()
%132 = call i32 @gluPerspective(i32 50, i32 1, double 1.000000e-01, i32 10)
%133 = load i32, i32* @GL_MODELVIEW
%134 = call i32 @glMatrixMode(i32 %133)
%135 = call i32 (...) @glLoadIdentity()
%136 = call i32 @glTranslatef(i32 0, i32 0, double -5.500000e+00)
%137 = call i64 @exp(double -0.000000e+00)
%138 = sitofp i64 %137 to float
%139 = fpext float %138 to double
%140 = fsub double 1.000000e+00, %139
%141 = fptosi double %140 to i32
%142 = sitofp i32 %141 to double
%143 = fcmp olt double %142, 1.000000e+00
%144 = select i1 %143, double %142, double 1.000000e+00
%145 = fcmp ogt double %144, 0.000000e+00
%146 = fptosi double %144 to i32
%147 = sitofp i32 %146 to double
%148 = select i1 %145, double %147, double 0.000000e+00
%149 = call double @llvm.fmuladd.f64(double %148, double 5.700000e-01, double 2.300000e-01)
%150 = fptosi double %149 to i32
%151 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
store i32 %150, i32* %151
%152 = call double @llvm.fmuladd.f64(double %148, double 4.500000e-01, double 3.500000e-01)
%153 = fptosi double %152 to i32
%154 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 1
store i32 %153, i32* %154
%155 = call double @llvm.fmuladd.f64(double %148, double 2.200000e-01, double 7.800000e-01)
%156 = fptosi double %155 to i32
%157 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 2
store i32 %156, i32* %157
%158 = call i32 @glClearColor(i32 %150, i32 %153, i32 %156, float 1.000000e+00)
%159 = load i32, i32* @GL_FOG_MODE
%160 = load i32, i32* @GL_EXP2
%161 = call i32 @glFogi(i32 %159, i32 %160)
%162 = load i32, i32* @GL_FOG_DENSITY
%163 = call i32 @glFogf(i32 %162, i32 0)
%164 = load i32, i32* @GL_FOG_COLOR
%165 = call i32 @glFogfv(i32 %164, i32* %151)
ret void
}