#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_FOG;
int /*<<< orphan*/ GL_FOG_COLOR;
int /*<<< orphan*/ GL_FOG_END;
int /*<<< orphan*/ GL_FOG_MODE;
int /*<<< orphan*/ GL_FOG_START;
int /*<<< orphan*/ GL_LINEAR;
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glFogf(int /*<<< orphan*/, double);
int /*<<< orphan*/ glFogfv(int /*<<< orphan*/, double *);
int /*<<< orphan*/ glFogi(int /*<<< orphan*/, int /*<<< orphan*/);
void pripremiMaglu() {
  GLfloat sivaMagla[4] = {0.5, 0.5, 0.5, 1.0};
  glEnable(GL_FOG);
  glFogi(GL_FOG_MODE, GL_LINEAR);
  glFogfv(GL_FOG_COLOR, sivaMagla);
  glFogf(GL_FOG_START, 0.0);
  glFogf(GL_FOG_END, 30.0);
  glClearColor(0.5, 0.5, 0.5, 1.0);
}


x86 assembly (clang, -O0):
<pripremiMaglu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeb8(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2e27(%rip),%rax
mov    (%rax),%edi
mov    0x2e36(%rip),%rax
mov    (%rax),%esi
call   1070 <glFogi@plt>
mov    0x2e20(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rsi
call   1030 <glFogfv@plt>
mov    0x2e1e(%rip),%rax
mov    (%rax),%edi
xorps  %xmm0,%xmm0
call   1040 <glFogf@plt>
mov    0x2e1d(%rip),%rax
mov    (%rax),%edi
movsd  0xe33(%rip),%xmm0
call   1040 <glFogf@plt>
movsd  0xe16(%rip),%xmm2
movsd  0xe16(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1060 <glClearColor@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pripremiMaglu>:
sub    $0x28,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2e40(%rip),%rax
mov    (%rax),%edi
mov    0x2e4f(%rip),%rax
mov    (%rax),%esi
call   1070 <glFogi@plt>
mov    0x2e39(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <glFogfv@plt>
mov    0x2e38(%rip),%rax
mov    (%rax),%edi
xorps  %xmm0,%xmm0
call   1040 <glFogf@plt>
mov    0x2e37(%rip),%rax
mov    (%rax),%edi
movsd  0xe3d(%rip),%xmm0
call   1040 <glFogf@plt>
movsd  0xe38(%rip),%xmm0
movsd  0xe38(%rip),%xmm3
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1060 <glClearColor@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.pripremiMaglu.sivaMagla = [4 x double] [double 5.000000e-01, double 5.000000e-01, double 5.000000e-01, double 1.000000e+00]
@GL_FOG = global i32 0
@GL_FOG_MODE = global i32 0
@GL_LINEAR = global i32 0
@GL_FOG_COLOR = global i32 0
@GL_FOG_START = global i32 0
@GL_FOG_END = global i32 0
define void @pripremiMaglu() {
%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_COLOR
%9 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%10 = call i32 @glFogfv(i32 %8, double* %9)
%11 = load i32, i32* @GL_FOG_START
%12 = call i32 @glFogf(i32 %11, double 0.000000e+00)
%13 = load i32, i32* @GL_FOG_END
%14 = call i32 @glFogf(i32 %13, double 3.000000e+01)
%15 = call i32 @glClearColor(double 5.000000e-01, double 5.000000e-01, double 5.000000e-01, double 1.000000e+00)
ret void
}

LLVM IR (-O2):
@__const.pripremiMaglu.sivaMagla = [4 x double] [double 5.000000e-01, double 5.000000e-01, double 5.000000e-01, double 1.000000e+00]
@GL_FOG = global i32 0
@GL_FOG_MODE = global i32 0
@GL_LINEAR = global i32 0
@GL_FOG_COLOR = global i32 0
@GL_FOG_START = global i32 0
@GL_FOG_END = global i32 0
define void @pripremiMaglu() {
%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_COLOR
%9 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%10 = call i32 @glFogfv(i32 %8, double* %9)
%11 = load i32, i32* @GL_FOG_START
%12 = call i32 @glFogf(i32 %11, double 0.000000e+00)
%13 = load i32, i32* @GL_FOG_END
%14 = call i32 @glFogf(i32 %13, double 3.000000e+01)
%15 = call i32 @glClearColor(double 5.000000e-01, double 5.000000e-01, double 5.000000e-01, double 1.000000e+00)
ret void
}