#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_BACK;
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_FILL;
int /*<<< orphan*/ GL_FRONT;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_NORMALIZE;
int /*<<< orphan*/ GL_POSITION;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, double *);
int /*<<< orphan*/ glPolygonMode(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void render_init(void) {
  GLfloat fogColor[4] = {0.7, 0.7, 0.7, 1.0};
  GLfloat light_pos[4] = {0.0, 5.0, 0.0, 1.0};
  glClearColor(0.0, 0.0, 0.0, 0.0);
  glShadeModel(GL_SMOOTH);
  glPolygonMode(GL_FRONT, GL_FILL);
  glPolygonMode(GL_BACK, GL_FILL);
  glLightfv(GL_LIGHT0, GL_POSITION, light_pos);
  glEnable(GL_LIGHTING);
  glEnable(GL_LIGHT0);
  glEnable(GL_NORMALIZE);
  glEnable(GL_DEPTH_TEST);
}


x86 assembly (clang, -O0):
<render_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0xea1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe9e(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xe9b(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xe98(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xe95(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe92(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe8f(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe8c(%rip),%rax
mov    %rax,-0x28(%rbp)
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1050 <glClearColor@plt>
mov    0x2de8(%rip),%rax
mov    (%rax),%edi
call   1060 <glShadeModel@plt>
mov    0x2e12(%rip),%rax
mov    (%rax),%edi
mov    0x2dc1(%rip),%rax
mov    (%rax),%esi
call   1070 <glPolygonMode@plt>
mov    0x2dd3(%rip),%rax
mov    (%rax),%edi
mov    0x2daa(%rip),%rax
mov    (%rax),%esi
call   1070 <glPolygonMode@plt>
mov    0x2ddc(%rip),%rax
mov    (%rax),%edi
mov    0x2dc3(%rip),%rax
mov    (%rax),%esi
lea    -0x40(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d99(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2db3(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2d8d(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2d5f(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<render_init>:
push   %rbx
sub    $0x20,%rsp
movaps 0xeb4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe98(%rip),%xmm0
movaps %xmm0,(%rsp)
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1050 <glClearColor@plt>
mov    0x2e2c(%rip),%rax
mov    (%rax),%edi
call   1060 <glShadeModel@plt>
mov    0x2e56(%rip),%rax
mov    (%rax),%edi
mov    0x2e05(%rip),%rbx
mov    (%rbx),%esi
call   1070 <glPolygonMode@plt>
mov    0x2e17(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%esi
call   1070 <glPolygonMode@plt>
mov    0x2e27(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e0e(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <glLightfv@plt>
mov    0x2de5(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    (%rbx),%edi
call   1040 <glEnable@plt>
mov    0x2de0(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2db2(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.render_init.fogColor = [4 x double] [double 0x3FE6666666666666, double 0x3FE6666666666666, double 0x3FE6666666666666, double 1.000000e+00]
@__const.render_init.light_pos = [4 x double] [double 0.000000e+00, double 5.000000e+00, double 0.000000e+00, double 1.000000e+00]
@GL_SMOOTH = global i32 0
@GL_FRONT = global i32 0
@GL_FILL = global i32 0
@GL_BACK = global i32 0
@GL_LIGHT0 = global i32 0
@GL_POSITION = global i32 0
@GL_LIGHTING = global i32 0
@GL_NORMALIZE = global i32 0
@GL_DEPTH_TEST = global i32 0
define void @render_init() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = bitcast [4 x double]* %1 to i8*
%4 = bitcast [4 x double]* %2 to i8*
%5 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%6 = load i32, i32* @GL_SMOOTH
%7 = call i32 @glShadeModel(i32 %6)
%8 = load i32, i32* @GL_FRONT
%9 = load i32, i32* @GL_FILL
%10 = call i32 @glPolygonMode(i32 %8, i32 %9)
%11 = load i32, i32* @GL_BACK
%12 = load i32, i32* @GL_FILL
%13 = call i32 @glPolygonMode(i32 %11, i32 %12)
%14 = load i32, i32* @GL_LIGHT0
%15 = load i32, i32* @GL_POSITION
%16 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%17 = call i32 @glLightfv(i32 %14, i32 %15, double* %16)
%18 = load i32, i32* @GL_LIGHTING
%19 = call i32 @glEnable(i32 %18)
%20 = load i32, i32* @GL_LIGHT0
%21 = call i32 @glEnable(i32 %20)
%22 = load i32, i32* @GL_NORMALIZE
%23 = call i32 @glEnable(i32 %22)
%24 = load i32, i32* @GL_DEPTH_TEST
%25 = call i32 @glEnable(i32 %24)
ret void
}

LLVM IR (-O2):
@__const.render_init.light_pos = [4 x double] [double 0.000000e+00, double 5.000000e+00, double 0.000000e+00, double 1.000000e+00]
@GL_SMOOTH = global i32 0
@GL_FRONT = global i32 0
@GL_FILL = global i32 0
@GL_BACK = global i32 0
@GL_LIGHT0 = global i32 0
@GL_POSITION = global i32 0
@GL_LIGHTING = global i32 0
@GL_NORMALIZE = global i32 0
@GL_DEPTH_TEST = global i32 0
define void @render_init() {
%1 = alloca [4 x double]
%2 = bitcast [4 x double]* %1 to i8*
%3 = tail call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%4 = load i32, i32* @GL_SMOOTH
%5 = tail call i32 @glShadeModel(i32 %4)
%6 = load i32, i32* @GL_FRONT
%7 = load i32, i32* @GL_FILL
%8 = tail call i32 @glPolygonMode(i32 %6, i32 %7)
%9 = load i32, i32* @GL_BACK
%10 = load i32, i32* @GL_FILL
%11 = tail call i32 @glPolygonMode(i32 %9, i32 %10)
%12 = load i32, i32* @GL_LIGHT0
%13 = load i32, i32* @GL_POSITION
%14 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%15 = call i32 @glLightfv(i32 %12, i32 %13, double* %14)
%16 = load i32, i32* @GL_LIGHTING
%17 = call i32 @glEnable(i32 %16)
%18 = load i32, i32* @GL_LIGHT0
%19 = call i32 @glEnable(i32 %18)
%20 = load i32, i32* @GL_NORMALIZE
%21 = call i32 @glEnable(i32 %20)
%22 = load i32, i32* @GL_DEPTH_TEST
%23 = call i32 @glEnable(i32 %22)
ret void
}