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

/* Variables and functions */
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_DIFFUSE;
int /*<<< orphan*/ GL_FRONT;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_LIGHT_MODEL_AMBIENT;
int /*<<< orphan*/ GL_POSITION;
int /*<<< orphan*/ GL_SHININESS;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ GL_SPECULAR;
int /*<<< orphan*/ glClearColor(float, float, float, float);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glLightModelfv(int /*<<< orphan*/, float *);
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, float *);
int /*<<< orphan*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/,
                                float *);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void init(void) {
  GLfloat mat_specular[] = {1.0f, 1.0f, 1.0f, 1.0f};
  GLfloat mat_shininess[] = {50.0f};
  GLfloat light_position[] = {1.0f, 1.0f, 1.0f, 0.0f};
  GLfloat white_light[] = {1.0f, 1.0f, 1.0f, 1.0f};
  GLfloat lmodel_ambient[] = {0.1f, 0.1f, 0.1f, 1.0f};
  glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
  glShadeModel(GL_SMOOTH);
  glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
  glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
  glLightfv(GL_LIGHT0, GL_POSITION, light_position);
  glLightfv(GL_LIGHT0, GL_DIFFUSE, white_light);
  glLightfv(GL_LIGHT0, GL_SPECULAR, white_light);
  glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
  glEnable(GL_LIGHTING);
  glEnable(GL_LIGHT0);
  glEnable(GL_DEPTH_TEST);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0xe91(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xe8e(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xeac(%rip),%eax
mov    %eax,-0x14(%rbp)
mov    0xe82(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe7f(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe5c(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe59(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe66(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xe63(%rip),%rax
mov    %rax,-0x48(%rbp)
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1060 <glClearColor@plt>
mov    0x2dbf(%rip),%rax
mov    (%rax),%edi
call   1070 <glShadeModel@plt>
mov    0x2de9(%rip),%rax
mov    (%rax),%edi
mov    0x2df0(%rip),%rax
mov    (%rax),%esi
lea    -0x10(%rbp),%rdx
call   1080 <glMaterialfv@plt>
mov    0x2dce(%rip),%rax
mov    (%rax),%edi
mov    0x2ddd(%rip),%rax
mov    (%rax),%esi
lea    -0x14(%rbp),%rdx
call   1080 <glMaterialfv@plt>
mov    0x2da3(%rip),%rax
mov    (%rax),%edi
mov    0x2d8a(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d88(%rip),%rax
mov    (%rax),%edi
mov    0x2d5f(%rip),%rax
mov    (%rax),%esi
lea    -0x40(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d6d(%rip),%rax
mov    (%rax),%edi
mov    0x2d84(%rip),%rax
mov    (%rax),%esi
lea    -0x40(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d5a(%rip),%rax
mov    (%rax),%edi
lea    -0x50(%rbp),%rsi
call   1040 <glLightModelfv@plt>
mov    0x2d28(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d32(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2cf4(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %r15
push   %r14
push   %rbx
sub    $0x50,%rsp
movaps 0xea0(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movl   $0x42480000,0xc(%rsp)
42
movaps 0xe7c(%rip),%xmm1
movaps %xmm1,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps 0xe8b(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1060 <glClearColor@plt>
mov    0x2dee(%rip),%rax
mov    (%rax),%edi
call   1070 <glShadeModel@plt>
mov    0x2e18(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e1f(%rip),%r15
mov    (%r15),%esi
lea    0x40(%rsp),%rdx
call   1080 <glMaterialfv@plt>
mov    (%rbx),%edi
mov    0x2e11(%rip),%rax
mov    (%rax),%esi
lea    0xc(%rsp),%rdx
call   1080 <glMaterialfv@plt>
mov    0x2dd6(%rip),%r14
mov    (%r14),%edi
mov    0x2dbc(%rip),%rax
mov    (%rax),%esi
lea    0x30(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    (%r14),%edi
mov    0x2d96(%rip),%rax
mov    (%rax),%esi
lea    0x20(%rsp),%rbx
mov    %rbx,%rdx
call   1030 <glLightfv@plt>
mov    (%r14),%edi
mov    (%r15),%esi
mov    %rbx,%rdx
call   1030 <glLightfv@plt>
mov    0x2d9a(%rip),%rax
mov    (%rax),%edi
lea    0x10(%rsp),%rsi
call   1040 <glLightModelfv@plt>
mov    0x2d67(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    (%r14),%edi
call   1050 <glEnable@plt>
mov    0x2d39(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
add    $0x50,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.init.mat_specular = [4 x float] [float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00]
@__const.init.mat_shininess = [1 x float] [float 5.000000e+01]
@__const.init.light_position = [4 x float] [float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00]
@__const.init.white_light = [4 x float] [float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00]
@__const.init.lmodel_ambient = [4 x float] [float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 0x3FB99999A0000000, float 1.000000e+00]
@GL_SMOOTH = global i32 0
@GL_FRONT = global i32 0
@GL_SPECULAR = global i32 0
@GL_SHININESS = global i32 0
@GL_LIGHT0 = global i32 0
@GL_POSITION = global i32 0
@GL_DIFFUSE = global i32 0
@GL_LIGHT_MODEL_AMBIENT = global i32 0
@GL_LIGHTING = global i32 0
@GL_DEPTH_TEST = global i32 0
define void @init() {
%1 = alloca [4 x float]
%2 = alloca [1 x float]
%3 = alloca [4 x float]
%4 = alloca [4 x float]
%5 = alloca [4 x float]
%6 = bitcast [4 x float]* %1 to i8*
%7 = bitcast [1 x float]* %2 to i8*
%8 = bitcast [4 x float]* %3 to i8*
%9 = bitcast [4 x float]* %4 to i8*
%10 = bitcast [4 x float]* %5 to i8*
%11 = call i32 @glClearColor(float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 0.000000e+00)
%12 = load i32, i32* @GL_SMOOTH
%13 = call i32 @glShadeModel(i32 %12)
%14 = load i32, i32* @GL_FRONT
%15 = load i32, i32* @GL_SPECULAR
%16 = getelementptr inbounds [4 x float], [4 x float]* %1, i64 0, i64 0
%17 = call i32 @glMaterialfv(i32 %14, i32 %15, float* %16)
%18 = load i32, i32* @GL_FRONT
%19 = load i32, i32* @GL_SHININESS
%20 = getelementptr inbounds [1 x float], [1 x float]* %2, i64 0, i64 0
%21 = call i32 @glMaterialfv(i32 %18, i32 %19, float* %20)
%22 = load i32, i32* @GL_LIGHT0
%23 = load i32, i32* @GL_POSITION
%24 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 0
%25 = call i32 @glLightfv(i32 %22, i32 %23, float* %24)
%26 = load i32, i32* @GL_LIGHT0
%27 = load i32, i32* @GL_DIFFUSE
%28 = getelementptr inbounds [4 x float], [4 x float]* %4, i64 0, i64 0
%29 = call i32 @glLightfv(i32 %26, i32 %27, float* %28)
%30 = load i32, i32* @GL_LIGHT0
%31 = load i32, i32* @GL_SPECULAR
%32 = getelementptr inbounds [4 x float], [4 x float]* %4, i64 0, i64 0
%33 = call i32 @glLightfv(i32 %30, i32 %31, float* %32)
%34 = load i32, i32* @GL_LIGHT_MODEL_AMBIENT
%35 = getelementptr inbounds [4 x float], [4 x float]* %5, i64 0, i64 0
%36 = call i32 @glLightModelfv(i32 %34, float* %35)
%37 = load i32, i32* @GL_LIGHTING
%38 = call i32 @glEnable(i32 %37)
%39 = load i32, i32* @GL_LIGHT0
%40 = call i32 @glEnable(i32 %39)
%41 = load i32, i32* @GL_DEPTH_TEST
%42 = call i32 @glEnable(i32 %41)
ret void
}

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