#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 /*<<< orphan*/ GL_AMBIENT_AND_DIFFUSE;
int /*<<< orphan*/ GL_COLOR_MATERIAL;
int /*<<< orphan*/ GL_CULL_FACE;
int /*<<< orphan*/ GL_CW;
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_DITHER;
int /*<<< orphan*/ GL_FILL;
int /*<<< orphan*/ GL_FRONT_AND_BACK;
int /*<<< orphan*/ GL_LINE_SMOOTH;
int /*<<< orphan*/ GL_POINT_SMOOTH;
int /*<<< orphan*/ GL_POLYGON_SMOOTH;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ GL_UNPACK_ALIGNMENT;
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glColorMaterial(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glDisable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glFrontFace(int /*<<< orphan*/);
int /*<<< orphan*/ glLineWidth(double);
int /*<<< orphan*/ glPixelStorei(int /*<<< orphan*/, int);
int /*<<< orphan*/ glPointSize(double);
int /*<<< orphan*/ glPolygonMode(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void CreateEnvironment(void) {
  glEnable(GL_DEPTH_TEST);
  glDisable(GL_LINE_SMOOTH);
  glDisable(GL_POINT_SMOOTH);
  glEnable(GL_POLYGON_SMOOTH);
  glShadeModel(GL_SMOOTH);
  glDisable(GL_DITHER);
  glDisable(GL_CULL_FACE);
  glLineWidth(1.0);
  glPointSize(1.0);
  glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
  glFrontFace(GL_CW);
  glClearColor(0.0, 0.0, 0.0, 0.0);
  glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
  glEnable(GL_COLOR_MATERIAL);
  glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
}


x86 assembly (clang, -O0):
<CreateEnvironment>:
push   %rbp
mov    %rsp,%rbp
mov    0x2de5(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2de7(%rip),%rax
mov    (%rax),%edi
call   10c0 <glDisable@plt>
mov    0x2e11(%rip),%rax
mov    (%rax),%edi
call   10c0 <glDisable@plt>
mov    0x2de3(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2db5(%rip),%rax
mov    (%rax),%edi
call   10a0 <glShadeModel@plt>
mov    0x2dd7(%rip),%rax
mov    (%rax),%edi
call   10c0 <glDisable@plt>
mov    0x2da9(%rip),%rax
mov    (%rax),%edi
call   10c0 <glDisable@plt>
movsd  0xdf2(%rip),%xmm0
call   1030 <glLineWidth@plt>
movsd  0xde5(%rip),%xmm0
call   1080 <glPointSize@plt>
mov    0x2dc1(%rip),%rax
mov    (%rax),%edi
mov    0x2d58(%rip),%rax
mov    (%rax),%esi
call   10b0 <glPolygonMode@plt>
mov    0x2d3a(%rip),%rax
mov    (%rax),%edi
call   1090 <glFrontFace@plt>
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1070 <glClearColor@plt>
mov    0x2d8b(%rip),%rax
mov    (%rax),%edi
mov    0x2d4a(%rip),%rax
mov    (%rax),%esi
call   1040 <glColorMaterial@plt>
mov    0x2d5c(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d5e(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
call   1060 <glPixelStorei@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CreateEnvironment>:
push   %rbx
mov    0x2de8(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2dea(%rip),%rax
mov    (%rax),%edi
call   10c0 <glDisable@plt>
mov    0x2e14(%rip),%rax
mov    (%rax),%edi
call   10c0 <glDisable@plt>
mov    0x2de6(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2db8(%rip),%rax
mov    (%rax),%edi
call   10a0 <glShadeModel@plt>
mov    0x2dda(%rip),%rax
mov    (%rax),%edi
call   10c0 <glDisable@plt>
mov    0x2dac(%rip),%rax
mov    (%rax),%edi
call   10c0 <glDisable@plt>
movsd  0xdf5(%rip),%xmm0
call   1030 <glLineWidth@plt>
movsd  0xde8(%rip),%xmm0
call   1080 <glPointSize@plt>
mov    0x2dc4(%rip),%rbx
mov    (%rbx),%edi
mov    0x2d5b(%rip),%rax
mov    (%rax),%esi
call   10b0 <glPolygonMode@plt>
mov    0x2d3d(%rip),%rax
mov    (%rax),%edi
call   1090 <glFrontFace@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1070 <glClearColor@plt>
mov    (%rbx),%edi
mov    0x2d54(%rip),%rax
mov    (%rax),%esi
call   1040 <glColorMaterial@plt>
mov    0x2d66(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d68(%rip),%rax
mov    (%rax),%edi
mov    $0x1,%esi
pop    %rbx
jmp    1060 <glPixelStorei@plt>

LLVM IR (-O0):
@GL_DEPTH_TEST = global i32 0
@GL_LINE_SMOOTH = global i32 0
@GL_POINT_SMOOTH = global i32 0
@GL_POLYGON_SMOOTH = global i32 0
@GL_SMOOTH = global i32 0
@GL_DITHER = global i32 0
@GL_CULL_FACE = global i32 0
@GL_FRONT_AND_BACK = global i32 0
@GL_FILL = global i32 0
@GL_CW = global i32 0
@GL_AMBIENT_AND_DIFFUSE = global i32 0
@GL_COLOR_MATERIAL = global i32 0
@GL_UNPACK_ALIGNMENT = global i32 0
define void @CreateEnvironment() {
%1 = load i32, i32* @GL_DEPTH_TEST
%2 = call i32 @glEnable(i32 %1)
%3 = load i32, i32* @GL_LINE_SMOOTH
%4 = call i32 @glDisable(i32 %3)
%5 = load i32, i32* @GL_POINT_SMOOTH
%6 = call i32 @glDisable(i32 %5)
%7 = load i32, i32* @GL_POLYGON_SMOOTH
%8 = call i32 @glEnable(i32 %7)
%9 = load i32, i32* @GL_SMOOTH
%10 = call i32 @glShadeModel(i32 %9)
%11 = load i32, i32* @GL_DITHER
%12 = call i32 @glDisable(i32 %11)
%13 = load i32, i32* @GL_CULL_FACE
%14 = call i32 @glDisable(i32 %13)
%15 = call i32 @glLineWidth(double 1.000000e+00)
%16 = call i32 @glPointSize(double 1.000000e+00)
%17 = load i32, i32* @GL_FRONT_AND_BACK
%18 = load i32, i32* @GL_FILL
%19 = call i32 @glPolygonMode(i32 %17, i32 %18)
%20 = load i32, i32* @GL_CW
%21 = call i32 @glFrontFace(i32 %20)
%22 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%23 = load i32, i32* @GL_FRONT_AND_BACK
%24 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%25 = call i32 @glColorMaterial(i32 %23, i32 %24)
%26 = load i32, i32* @GL_COLOR_MATERIAL
%27 = call i32 @glEnable(i32 %26)
%28 = load i32, i32* @GL_UNPACK_ALIGNMENT
%29 = call i32 @glPixelStorei(i32 %28, i32 1)
ret void
}

LLVM IR (-O2):
@GL_DEPTH_TEST = global i32 0
@GL_LINE_SMOOTH = global i32 0
@GL_POINT_SMOOTH = global i32 0
@GL_POLYGON_SMOOTH = global i32 0
@GL_SMOOTH = global i32 0
@GL_DITHER = global i32 0
@GL_CULL_FACE = global i32 0
@GL_FRONT_AND_BACK = global i32 0
@GL_FILL = global i32 0
@GL_CW = global i32 0
@GL_AMBIENT_AND_DIFFUSE = global i32 0
@GL_COLOR_MATERIAL = global i32 0
@GL_UNPACK_ALIGNMENT = global i32 0
define void @CreateEnvironment() {
%1 = load i32, i32* @GL_DEPTH_TEST
%2 = tail call i32 @glEnable(i32 %1)
%3 = load i32, i32* @GL_LINE_SMOOTH
%4 = tail call i32 @glDisable(i32 %3)
%5 = load i32, i32* @GL_POINT_SMOOTH
%6 = tail call i32 @glDisable(i32 %5)
%7 = load i32, i32* @GL_POLYGON_SMOOTH
%8 = tail call i32 @glEnable(i32 %7)
%9 = load i32, i32* @GL_SMOOTH
%10 = tail call i32 @glShadeModel(i32 %9)
%11 = load i32, i32* @GL_DITHER
%12 = tail call i32 @glDisable(i32 %11)
%13 = load i32, i32* @GL_CULL_FACE
%14 = tail call i32 @glDisable(i32 %13)
%15 = tail call i32 @glLineWidth(double 1.000000e+00)
%16 = tail call i32 @glPointSize(double 1.000000e+00)
%17 = load i32, i32* @GL_FRONT_AND_BACK
%18 = load i32, i32* @GL_FILL
%19 = tail call i32 @glPolygonMode(i32 %17, i32 %18)
%20 = load i32, i32* @GL_CW
%21 = tail call i32 @glFrontFace(i32 %20)
%22 = tail call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%23 = load i32, i32* @GL_FRONT_AND_BACK
%24 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%25 = tail call i32 @glColorMaterial(i32 %23, i32 %24)
%26 = load i32, i32* @GL_COLOR_MATERIAL
%27 = tail call i32 @glEnable(i32 %26)
%28 = load i32, i32* @GL_UNPACK_ALIGNMENT
%29 = tail call i32 @glPixelStorei(i32 %28, i32 1)
ret void
}