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

/* Variables and functions */
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_FLAT;
int /*<<< orphan*/ GL_FOG;
int /*<<< orphan*/ GL_FOG_COLOR;
int /*<<< orphan*/ GL_FOG_END;
int /*<<< orphan*/ GL_FOG_HINT;
int /*<<< orphan*/ GL_FOG_MODE;
int /*<<< orphan*/ GL_FOG_START;
int /*<<< orphan*/ GL_LESS;
int /*<<< orphan*/ GL_LINEAR;
int /*<<< orphan*/ GL_NICEST;
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glDepthFunc(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glFogf(int /*<<< orphan*/, double);
int /*<<< orphan*/ glFogfv(int /*<<< orphan*/, double *);
int /*<<< orphan*/ glFogi(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glHint(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void myinit(void) {
  GLfloat fogColor[4] = {0.0, 0.0, 0.0, 1.0};
  glEnable(GL_FOG);
  glFogi(GL_FOG_MODE, GL_LINEAR);
  glHint(GL_FOG_HINT, GL_NICEST);
  glFogf(GL_FOG_START, 3.0);
  glFogf(GL_FOG_END, 5.0);
  glFogfv(GL_FOG_COLOR, fogColor);
  glClearColor(0.0, 0.0, 0.0, 1.0);
  glDepthFunc(GL_LESS);
  glEnable(GL_DEPTH_TEST);
  glShadeModel(GL_FLAT);
}


x86 assembly (clang, -O0):
<myinit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xe91(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe8e(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xe8b(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xe88(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0x2ded(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2de7(%rip),%rax
mov    (%rax),%edi
mov    0x2e06(%rip),%rax
mov    (%rax),%esi
call   1090 <glFogi@plt>
mov    0x2dd8(%rip),%rax
mov    (%rax),%edi
mov    0x2db7(%rip),%rax
mov    (%rax),%esi
call   1080 <glHint@plt>
mov    0x2de9(%rip),%rax
mov    (%rax),%edi
movsd  0xe0f(%rip),%xmm0
call   1040 <glFogf@plt>
mov    0x2de3(%rip),%rax
mov    (%rax),%edi
movsd  0xdf1(%rip),%xmm0
call   1040 <glFogf@plt>
mov    0x2da5(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rsi
call   1030 <glFogfv@plt>
xorps  %xmm2,%xmm2
movsd  0xdc7(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1070 <glClearColor@plt>
mov    0x2d3d(%rip),%rax
mov    (%rax),%edi
call   1060 <glDepthFunc@plt>
mov    0x2d3f(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d69(%rip),%rax
mov    (%rax),%edi
call   10a0 <glShadeModel@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myinit>:
sub    $0x28,%rsp
movaps 0xea5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe89(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2e06(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2e00(%rip),%rax
mov    (%rax),%edi
mov    0x2e1f(%rip),%rax
mov    (%rax),%esi
call   1090 <glFogi@plt>
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
mov    0x2dd0(%rip),%rax
mov    (%rax),%esi
call   1080 <glHint@plt>
mov    0x2e02(%rip),%rax
mov    (%rax),%edi
movsd  0xe18(%rip),%xmm0
call   1040 <glFogf@plt>
mov    0x2dfc(%rip),%rax
mov    (%rax),%edi
movsd  0xe0a(%rip),%xmm0
call   1040 <glFogf@plt>
mov    0x2dbe(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <glFogfv@plt>
movsd  0xdf4(%rip),%xmm3
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1070 <glClearColor@plt>
mov    0x2d57(%rip),%rax
mov    (%rax),%edi
call   1060 <glDepthFunc@plt>
mov    0x2d59(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d83(%rip),%rax
mov    (%rax),%edi
call   10a0 <glShadeModel@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.myinit.fogColor = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@GL_FOG = global i32 0
@GL_FOG_MODE = global i32 0
@GL_LINEAR = global i32 0
@GL_FOG_HINT = global i32 0
@GL_NICEST = global i32 0
@GL_FOG_START = global i32 0
@GL_FOG_END = global i32 0
@GL_FOG_COLOR = global i32 0
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_FLAT = global i32 0
define void @myinit() {
%1 = alloca [4 x double]
%2 = bitcast [4 x double]* %1 to i8*
%3 = load i32, i32* @GL_FOG
%4 = call i32 @glEnable(i32 %3)
%5 = load i32, i32* @GL_FOG_MODE
%6 = load i32, i32* @GL_LINEAR
%7 = call i32 @glFogi(i32 %5, i32 %6)
%8 = load i32, i32* @GL_FOG_HINT
%9 = load i32, i32* @GL_NICEST
%10 = call i32 @glHint(i32 %8, i32 %9)
%11 = load i32, i32* @GL_FOG_START
%12 = call i32 @glFogf(i32 %11, double 3.000000e+00)
%13 = load i32, i32* @GL_FOG_END
%14 = call i32 @glFogf(i32 %13, double 5.000000e+00)
%15 = load i32, i32* @GL_FOG_COLOR
%16 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%17 = call i32 @glFogfv(i32 %15, double* %16)
%18 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%19 = load i32, i32* @GL_LESS
%20 = call i32 @glDepthFunc(i32 %19)
%21 = load i32, i32* @GL_DEPTH_TEST
%22 = call i32 @glEnable(i32 %21)
%23 = load i32, i32* @GL_FLAT
%24 = call i32 @glShadeModel(i32 %23)
ret void
}

LLVM IR (-O2):
@__const.myinit.fogColor = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@GL_FOG = global i32 0
@GL_FOG_MODE = global i32 0
@GL_LINEAR = global i32 0
@GL_FOG_HINT = global i32 0
@GL_NICEST = global i32 0
@GL_FOG_START = global i32 0
@GL_FOG_END = global i32 0
@GL_FOG_COLOR = global i32 0
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_FLAT = global i32 0
define void @myinit() {
%1 = alloca [4 x double]
%2 = bitcast [4 x double]* %1 to i8*
%3 = load i32, i32* @GL_FOG
%4 = tail call i32 @glEnable(i32 %3)
%5 = load i32, i32* @GL_FOG_MODE
%6 = load i32, i32* @GL_LINEAR
%7 = tail call i32 @glFogi(i32 %5, i32 %6)
%8 = load i32, i32* @GL_FOG_HINT
%9 = load i32, i32* @GL_NICEST
%10 = tail call i32 @glHint(i32 %8, i32 %9)
%11 = load i32, i32* @GL_FOG_START
%12 = tail call i32 @glFogf(i32 %11, double 3.000000e+00)
%13 = load i32, i32* @GL_FOG_END
%14 = tail call i32 @glFogf(i32 %13, double 5.000000e+00)
%15 = load i32, i32* @GL_FOG_COLOR
%16 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%17 = call i32 @glFogfv(i32 %15, double* %16)
%18 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%19 = load i32, i32* @GL_LESS
%20 = call i32 @glDepthFunc(i32 %19)
%21 = load i32, i32* @GL_DEPTH_TEST
%22 = call i32 @glEnable(i32 %21)
%23 = load i32, i32* @GL_FLAT
%24 = call i32 @glShadeModel(i32 %23)
ret void
}