#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 int 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(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, int *);
int /*<<< orphan*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/, int *);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void init() {
  GLfloat mat_specular[] = {1, 1, 1, 1};
  GLfloat mat_shininess[] = {50};
  GLfloat light_position[] = {1, 1, 1, 1};
  glClearColor(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    $0x30,%rsp
mov    0xea1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xe9e(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xe9c(%rip),%eax
mov    %eax,-0x14(%rbp)
mov    0xe82(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe7f(%rip),%rax
mov    %rax,-0x28(%rbp)
xor    %ecx,%ecx
mov    %ecx,%edi
mov    %ecx,%esi
mov    %ecx,%edx
call   1050 <glClearColor@plt>
mov    0x2e0f(%rip),%rax
mov    (%rax),%edi
call   1060 <glShadeModel@plt>
mov    0x2e29(%rip),%rax
mov    (%rax),%edi
mov    0x2e30(%rip),%rax
mov    (%rax),%esi
lea    -0x10(%rbp),%rdx
call   1070 <glMaterialfv@plt>
mov    0x2e0e(%rip),%rax
mov    (%rax),%edi
mov    0x2e1d(%rip),%rax
mov    (%rax),%esi
lea    -0x14(%rbp),%rdx
call   1070 <glMaterialfv@plt>
mov    0x2deb(%rip),%rax
mov    (%rax),%edi
mov    0x2dd2(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2db8(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2dc2(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2d8c(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rbx
sub    $0x30,%rsp
movaps 0xea4(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movl   $0x32,0xc(%rsp)
movaps %xmm0,0x10(%rsp)
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1050 <glClearColor@plt>
mov    0x2e2e(%rip),%rax
mov    (%rax),%edi
call   1060 <glShadeModel@plt>
mov    0x2e48(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e4f(%rip),%rax
mov    (%rax),%esi
lea    0x20(%rsp),%rdx
call   1070 <glMaterialfv@plt>
mov    (%rbx),%edi
mov    0x2e42(%rip),%rax
mov    (%rax),%esi
lea    0xc(%rsp),%rdx
call   1070 <glMaterialfv@plt>
mov    0x2e0f(%rip),%rbx
mov    (%rbx),%edi
mov    0x2df6(%rip),%rax
mov    (%rax),%esi
lea    0x10(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    0x2ddb(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    (%rbx),%edi
call   1040 <glEnable@plt>
mov    0x2db6(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.init.mat_specular = [4 x i32] [i32 1, i32 1, i32 1, i32 1]
@__const.init.mat_shininess = [1 x i32] [i32 50]
@__const.init.light_position = [4 x i32] [i32 1, i32 1, i32 1, i32 1]
@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 i32]
%2 = alloca [1 x i32]
%3 = alloca [4 x i32]
%4 = bitcast [4 x i32]* %1 to i8*
%5 = bitcast [1 x i32]* %2 to i8*
%6 = bitcast [4 x i32]* %3 to i8*
%7 = call i32 @glClearColor(i32 0, i32 0, i32 0, i32 0)
%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 i32], [4 x i32]* %1, i64 0, i64 0
%13 = call i32 @glMaterialfv(i32 %10, i32 %11, i32* %12)
%14 = load i32, i32* @GL_FRONT
%15 = load i32, i32* @GL_SHININESS
%16 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
%17 = call i32 @glMaterialfv(i32 %14, i32 %15, i32* %16)
%18 = load i32, i32* @GL_LIGHT0
%19 = load i32, i32* @GL_POSITION
%20 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%21 = call i32 @glLightfv(i32 %18, i32 %19, i32* %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.light_position = [4 x i32] [i32 1, i32 1, i32 1, i32 1]
@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 i32]
%2 = alloca [1 x i32]
%3 = alloca [4 x i32]
%4 = bitcast [4 x i32]* %1 to i8*
%5 = bitcast [1 x i32]* %2 to i8*
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
store i32 50, i32* %6
%7 = bitcast [4 x i32]* %3 to i8*
%8 = tail call i32 @glClearColor(i32 0, i32 0, i32 0, i32 0)
%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 i32], [4 x i32]* %1, i64 0, i64 0
%14 = call i32 @glMaterialfv(i32 %11, i32 %12, i32* %13)
%15 = load i32, i32* @GL_FRONT
%16 = load i32, i32* @GL_SHININESS
%17 = call i32 @glMaterialfv(i32 %15, i32 %16, i32* %6)
%18 = load i32, i32* @GL_LIGHT0
%19 = load i32, i32* @GL_POSITION
%20 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%21 = call i32 @glLightfv(i32 %18, i32 %19, i32* %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
}