#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_AMBIENT;
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_DIFFUSE;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_LIGHT_MODEL_AMBIENT;
int /*<<< orphan*/ GL_LIGHT_MODEL_LOCAL_VIEWER;
int /*<<< orphan*/ GL_POSITION;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glLightModelfv(int /*<<< orphan*/, double *);
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, double *);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void init(void) {
  GLfloat ambient[] = {0.0, 0.0, 0.0, 1.0};
  GLfloat diffuse[] = {1.0, 1.0, 1.0, 1.0};
  GLfloat specular[] = {1.0, 1.0, 1.0, 1.0};
  GLfloat position[] = {0.0, 3.0, 2.0, 0.0};
  GLfloat lmodel_ambient[] = {0.4, 0.4, 0.4, 1.0};
  GLfloat local_view[] = {0.0};
  glClearColor(0.0, 0.1, 0.1, 0.0);
  glEnable(GL_DEPTH_TEST);
  glShadeModel(GL_SMOOTH);
  glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
  glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse);
  glLightfv(GL_LIGHT0, GL_POSITION, position);
  glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
  glLightModelfv(GL_LIGHT_MODEL_LOCAL_VIEWER, local_view);
  glEnable(GL_LIGHTING);
  glEnable(GL_LIGHT0);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    0xe9e(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe9b(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xe98(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xe95(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xe92(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe8f(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe8c(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe89(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe66(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe63(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xe60(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xe5d(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xe5a(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xe57(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xe54(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xe51(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xe4e(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xe48(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    0xe42(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xe3c(%rip),%rax
mov    %rax,-0x88(%rbp)
lea    -0xa8(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1060 <memset@plt>
xorps  %xmm3,%xmm3
movsd  0xd8f(%rip),%xmm2
movaps %xmm3,%xmm0
movaps %xmm2,%xmm1
call   1070 <glClearColor@plt>
mov    0x2d1d(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d17(%rip),%rax
mov    (%rax),%edi
call   1080 <glShadeModel@plt>
mov    0x2d39(%rip),%rax
mov    (%rax),%edi
mov    0x2d48(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d1e(%rip),%rax
mov    (%rax),%edi
mov    0x2ced(%rip),%rax
mov    (%rax),%esi
lea    -0x40(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d03(%rip),%rax
mov    (%rax),%edi
mov    0x2cea(%rip),%rax
mov    (%rax),%esi
lea    -0x80(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2cf0(%rip),%rax
mov    (%rax),%edi
lea    -0xa0(%rbp),%rsi
call   1040 <glLightModelfv@plt>
mov    0x2cbb(%rip),%rax
mov    (%rax),%edi
lea    -0xa8(%rbp),%rsi
call   1040 <glLightModelfv@plt>
mov    0x2c9e(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2cb0(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rbx
sub    $0x90,%rsp
movaps 0xec1(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xea2(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xeaa(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xece(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeb2(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed6(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeba(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
movsd  0xe34(%rip),%xmm1
xorps  %xmm0,%xmm0
xorps  %xmm3,%xmm3
movaps %xmm1,%xmm2
call   1060 <glClearColor@plt>
mov    0x2dbf(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2db9(%rip),%rax
mov    (%rax),%edi
call   1070 <glShadeModel@plt>
mov    0x2ddb(%rip),%rbx
mov    (%rbx),%edi
mov    0x2dea(%rip),%rax
mov    (%rax),%esi
lea    0x70(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x2d95(%rip),%rax
mov    (%rax),%esi
lea    0x50(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x2d98(%rip),%rax
mov    (%rax),%esi
lea    0x30(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d9d(%rip),%rax
mov    (%rax),%edi
lea    0x10(%rsp),%rsi
call   1040 <glLightModelfv@plt>
mov    0x2d6a(%rip),%rax
mov    (%rax),%edi
lea    0x8(%rsp),%rsi
call   1040 <glLightModelfv@plt>
mov    0x2d4f(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    (%rbx),%edi
call   1050 <glEnable@plt>
add    $0x90,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.init.ambient = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@__const.init.diffuse = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.init.specular = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.init.position = [4 x double] [double 0.000000e+00, double 3.000000e+00, double 2.000000e+00, double 0.000000e+00]
@__const.init.lmodel_ambient = [4 x double] [double 4.000000e-01, double 4.000000e-01, double 4.000000e-01, double 1.000000e+00]
@GL_DEPTH_TEST = global i32 0
@GL_SMOOTH = global i32 0
@GL_LIGHT0 = global i32 0
@GL_AMBIENT = global i32 0
@GL_DIFFUSE = global i32 0
@GL_POSITION = global i32 0
@GL_LIGHT_MODEL_AMBIENT = global i32 0
@GL_LIGHT_MODEL_LOCAL_VIEWER = global i32 0
@GL_LIGHTING = global i32 0
define void @init() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = alloca [4 x double]
%5 = alloca [4 x double]
%6 = alloca [1 x double]
%7 = bitcast [4 x double]* %1 to i8*
%8 = bitcast [4 x double]* %2 to i8*
%9 = bitcast [4 x double]* %3 to i8*
%10 = bitcast [4 x double]* %4 to i8*
%11 = bitcast [4 x double]* %5 to i8*
%12 = bitcast [1 x double]* %6 to i8*
%13 = call i32 @glClearColor(double 0.000000e+00, double 1.000000e-01, double 1.000000e-01, double 0.000000e+00)
%14 = load i32, i32* @GL_DEPTH_TEST
%15 = call i32 @glEnable(i32 %14)
%16 = load i32, i32* @GL_SMOOTH
%17 = call i32 @glShadeModel(i32 %16)
%18 = load i32, i32* @GL_LIGHT0
%19 = load i32, i32* @GL_AMBIENT
%20 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%21 = call i32 @glLightfv(i32 %18, i32 %19, double* %20)
%22 = load i32, i32* @GL_LIGHT0
%23 = load i32, i32* @GL_DIFFUSE
%24 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%25 = call i32 @glLightfv(i32 %22, i32 %23, double* %24)
%26 = load i32, i32* @GL_LIGHT0
%27 = load i32, i32* @GL_POSITION
%28 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%29 = call i32 @glLightfv(i32 %26, i32 %27, double* %28)
%30 = load i32, i32* @GL_LIGHT_MODEL_AMBIENT
%31 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%32 = call i32 @glLightModelfv(i32 %30, double* %31)
%33 = load i32, i32* @GL_LIGHT_MODEL_LOCAL_VIEWER
%34 = getelementptr inbounds [1 x double], [1 x double]* %6, i64 0, i64 0
%35 = call i32 @glLightModelfv(i32 %33, double* %34)
%36 = load i32, i32* @GL_LIGHTING
%37 = call i32 @glEnable(i32 %36)
%38 = load i32, i32* @GL_LIGHT0
%39 = call i32 @glEnable(i32 %38)
ret void
}

LLVM IR (-O2):
@__const.init.ambient = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@__const.init.diffuse = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.init.position = [4 x double] [double 0.000000e+00, double 3.000000e+00, double 2.000000e+00, double 0.000000e+00]
@__const.init.lmodel_ambient = [4 x double] [double 4.000000e-01, double 4.000000e-01, double 4.000000e-01, double 1.000000e+00]
@GL_DEPTH_TEST = global i32 0
@GL_SMOOTH = global i32 0
@GL_LIGHT0 = global i32 0
@GL_AMBIENT = global i32 0
@GL_DIFFUSE = global i32 0
@GL_POSITION = global i32 0
@GL_LIGHT_MODEL_AMBIENT = global i32 0
@GL_LIGHT_MODEL_LOCAL_VIEWER = global i32 0
@GL_LIGHTING = global i32 0
define void @init() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = alloca [4 x double]
%5 = alloca [1 x double]
%6 = bitcast [4 x double]* %1 to i8*
%7 = bitcast [4 x double]* %2 to i8*
%8 = bitcast [4 x double]* %3 to i8*
%9 = bitcast [4 x double]* %4 to i8*
%10 = bitcast [1 x double]* %5 to i8*
%11 = bitcast [1 x double]* %5 to i64*
store i64 0, i64* %11
%12 = tail call i32 @glClearColor(double 0.000000e+00, double 1.000000e-01, double 1.000000e-01, double 0.000000e+00)
%13 = load i32, i32* @GL_DEPTH_TEST
%14 = tail call i32 @glEnable(i32 %13)
%15 = load i32, i32* @GL_SMOOTH
%16 = tail call i32 @glShadeModel(i32 %15)
%17 = load i32, i32* @GL_LIGHT0
%18 = load i32, i32* @GL_AMBIENT
%19 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%20 = call i32 @glLightfv(i32 %17, i32 %18, double* %19)
%21 = load i32, i32* @GL_LIGHT0
%22 = load i32, i32* @GL_DIFFUSE
%23 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%24 = call i32 @glLightfv(i32 %21, i32 %22, double* %23)
%25 = load i32, i32* @GL_LIGHT0
%26 = load i32, i32* @GL_POSITION
%27 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%28 = call i32 @glLightfv(i32 %25, i32 %26, double* %27)
%29 = load i32, i32* @GL_LIGHT_MODEL_AMBIENT
%30 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%31 = call i32 @glLightModelfv(i32 %29, double* %30)
%32 = load i32, i32* @GL_LIGHT_MODEL_LOCAL_VIEWER
%33 = getelementptr inbounds [1 x double], [1 x double]* %5, i64 0, i64 0
%34 = call i32 @glLightModelfv(i32 %32, double* %33)
%35 = load i32, i32* @GL_LIGHTING
%36 = call i32 @glEnable(i32 %35)
%37 = load i32, i32* @GL_LIGHT0
%38 = call i32 @glEnable(i32 %37)
ret void
}