#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_DEPTH_TEST;
int /*<<< orphan*/ GL_FRONT;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_POSITION;
int /*<<< orphan*/ GL_SHININESS;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ GL_SPECULAR;
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, double *);
int /*<<< orphan*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/,
                                double *);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void init(void) {
  GLfloat mat_specular[] = {1.0, 1.0, 1.0, 1.0};
  GLfloat mat_shininess[] = {50.0};
  GLfloat light_position[] = {1.0, 1.0, 1.0, 0.0};
  glClearColor(0.0, 0.0, 0.0, 0.0);
  glShadeModel(GL_SMOOTH);
  glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
  glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
  glLightfv(GL_LIGHT0, GL_POSITION, light_position);
  glEnable(GL_LIGHTING);
  glEnable(GL_LIGHT0);
  glEnable(GL_DEPTH_TEST);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%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    0xeb5(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe8a(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xe87(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xe84(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe81(%rip),%rax
mov    %rax,-0x38(%rbp)
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm0
movaps %xmm3,%xmm1
movaps %xmm3,%xmm2
call   1050 <glClearColor@plt>
mov    0x2ddd(%rip),%rax
mov    (%rax),%edi
call   1060 <glShadeModel@plt>
mov    0x2df7(%rip),%rax
mov    (%rax),%edi
mov    0x2dfe(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1070 <glMaterialfv@plt>
mov    0x2ddc(%rip),%rax
mov    (%rax),%edi
mov    0x2deb(%rip),%rax
mov    (%rax),%esi
lea    -0x28(%rbp),%rdx
call   1070 <glMaterialfv@plt>
mov    0x2db9(%rip),%rax
mov    (%rax),%edi
mov    0x2da0(%rip),%rax
mov    (%rax),%esi
lea    -0x50(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d86(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2d90(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2d5a(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rbx
sub    $0x50,%rsp
movaps 0xeb4(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xe98(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movabs $0x4049000000000000,%rax
mov    %rax,0x8(%rsp)
movaps 0xead(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe91(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   1050 <glClearColor@plt>
mov    0x2e04(%rip),%rax
mov    (%rax),%edi
call   1060 <glShadeModel@plt>
mov    0x2e1e(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e25(%rip),%rax
mov    (%rax),%esi
lea    0x30(%rsp),%rdx
call   1070 <glMaterialfv@plt>
mov    (%rbx),%edi
mov    0x2e18(%rip),%rax
mov    (%rax),%esi
lea    0x8(%rsp),%rdx
call   1070 <glMaterialfv@plt>
mov    0x2de5(%rip),%rbx
mov    (%rbx),%edi
mov    0x2dcc(%rip),%rax
mov    (%rax),%esi
lea    0x10(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    0x2db1(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    (%rbx),%edi
call   1040 <glEnable@plt>
mov    0x2d8c(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.init.mat_specular = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.init.mat_shininess = [1 x double] [double 5.000000e+01]
@__const.init.light_position = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 0.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_LIGHTING = global i32 0
@GL_DEPTH_TEST = global i32 0
define void @init() {
%1 = alloca [4 x double]
%2 = alloca [1 x double]
%3 = alloca [4 x double]
%4 = bitcast [4 x double]* %1 to i8*
%5 = bitcast [1 x double]* %2 to i8*
%6 = bitcast [4 x double]* %3 to i8*
%7 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%8 = load i32, i32* @GL_SMOOTH
%9 = call i32 @glShadeModel(i32 %8)
%10 = load i32, i32* @GL_FRONT
%11 = load i32, i32* @GL_SPECULAR
%12 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%13 = call i32 @glMaterialfv(i32 %10, i32 %11, double* %12)
%14 = load i32, i32* @GL_FRONT
%15 = load i32, i32* @GL_SHININESS
%16 = getelementptr inbounds [1 x double], [1 x double]* %2, i64 0, i64 0
%17 = call i32 @glMaterialfv(i32 %14, i32 %15, double* %16)
%18 = load i32, i32* @GL_LIGHT0
%19 = load i32, i32* @GL_POSITION
%20 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%21 = call i32 @glLightfv(i32 %18, i32 %19, double* %20)
%22 = load i32, i32* @GL_LIGHTING
%23 = call i32 @glEnable(i32 %22)
%24 = load i32, i32* @GL_LIGHT0
%25 = call i32 @glEnable(i32 %24)
%26 = load i32, i32* @GL_DEPTH_TEST
%27 = call i32 @glEnable(i32 %26)
ret void
}

LLVM IR (-O2):
@__const.init.mat_specular = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.init.light_position = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 0.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_LIGHTING = global i32 0
@GL_DEPTH_TEST = global i32 0
define void @init() {
%1 = alloca [4 x double]
%2 = alloca [1 x double]
%3 = alloca [4 x double]
%4 = bitcast [4 x double]* %1 to i8*
%5 = bitcast [1 x double]* %2 to i8*
%6 = bitcast [1 x double]* %2 to i64*
store i64 4632233691727265792, i64* %6
%7 = bitcast [4 x double]* %3 to i8*
%8 = tail call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00)
%9 = load i32, i32* @GL_SMOOTH
%10 = tail call i32 @glShadeModel(i32 %9)
%11 = load i32, i32* @GL_FRONT
%12 = load i32, i32* @GL_SPECULAR
%13 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%14 = call i32 @glMaterialfv(i32 %11, i32 %12, double* %13)
%15 = load i32, i32* @GL_FRONT
%16 = load i32, i32* @GL_SHININESS
%17 = getelementptr inbounds [1 x double], [1 x double]* %2, i64 0, i64 0
%18 = call i32 @glMaterialfv(i32 %15, i32 %16, double* %17)
%19 = load i32, i32* @GL_LIGHT0
%20 = load i32, i32* @GL_POSITION
%21 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%22 = call i32 @glLightfv(i32 %19, i32 %20, double* %21)
%23 = load i32, i32* @GL_LIGHTING
%24 = call i32 @glEnable(i32 %23)
%25 = load i32, i32* @GL_LIGHT0
%26 = call i32 @glEnable(i32 %25)
%27 = load i32, i32* @GL_DEPTH_TEST
%28 = call i32 @glEnable(i32 %27)
ret void
}