#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_COLOR_MATERIAL;
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_FRONT;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_NORMALIZE;
int /*<<< orphan*/ GL_POSITION;
int /*<<< orphan*/ GL_SHININESS;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ GL_SPECULAR;
int /*<<< orphan*/ glClearColor(int, int, int, int);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, int *);
int /*<<< orphan*/ glLoadIdentity();
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.0};
  GLfloat light_pos[] = {1., 1., 1., 0.};
  glClearColor(1., 1., 1., 1.);
  glShadeModel(GL_SMOOTH);
  glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
  glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
  glLightfv(GL_LIGHT0, GL_POSITION, light_pos);
  glEnable(GL_LIGHTING);
  glEnable(GL_LIGHT0);
  glEnable(GL_DEPTH_TEST);
  glEnable(GL_COLOR_MATERIAL);
  glEnable(GL_NORMALIZE);
  glLoadIdentity();
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xe91(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xe8e(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xe8c(%rip),%eax
mov    %eax,-0x14(%rbp)
mov    0xe92(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe8f(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    $0x1,%ecx
mov    %ecx,%edi
mov    %ecx,%esi
mov    %ecx,%edx
call   1050 <glClearColor@plt>
mov    0x2dec(%rip),%rax
mov    (%rax),%edi
call   1070 <glShadeModel@plt>
mov    0x2e16(%rip),%rax
mov    (%rax),%edi
mov    0x2e1d(%rip),%rax
mov    (%rax),%esi
lea    -0x10(%rbp),%rdx
call   1080 <glMaterialfv@plt>
mov    0x2dfb(%rip),%rax
mov    (%rax),%edi
mov    0x2e0a(%rip),%rax
mov    (%rax),%esi
lea    -0x14(%rbp),%rdx
call   1080 <glMaterialfv@plt>
mov    0x2dd8(%rip),%rax
mov    (%rax),%edi
mov    0x2db7(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d95(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2daf(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2d69(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2d8b(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2d65(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    $0x0,%al
call   1060 <glLoadIdentity@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rbx
sub    $0x30,%rsp
movaps 0xe94(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movl   $0x32,0xc(%rsp)
movaps 0xe90(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
call   1050 <glClearColor@plt>
mov    0x2dfb(%rip),%rax
mov    (%rax),%edi
call   1070 <glShadeModel@plt>
mov    0x2e25(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e2c(%rip),%rax
mov    (%rax),%esi
lea    0x20(%rsp),%rdx
call   1080 <glMaterialfv@plt>
mov    (%rbx),%edi
mov    0x2e1f(%rip),%rax
mov    (%rax),%esi
lea    0xc(%rsp),%rdx
call   1080 <glMaterialfv@plt>
mov    0x2dec(%rip),%rbx
mov    (%rbx),%edi
mov    0x2dcb(%rip),%rax
mov    (%rax),%esi
lea    0x10(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    0x2da8(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    (%rbx),%edi
call   1040 <glEnable@plt>
mov    0x2d83(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2da5(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2d7f(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
xor    %eax,%eax
call   1060 <glLoadIdentity@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_pos = [4 x i32] [i32 1, i32 1, i32 1, i32 0]
@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
@GL_COLOR_MATERIAL = global i32 0
@GL_NORMALIZE = 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 1, i32 1, i32 1, i32 1)
%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)
%28 = load i32, i32* @GL_COLOR_MATERIAL
%29 = call i32 @glEnable(i32 %28)
%30 = load i32, i32* @GL_NORMALIZE
%31 = call i32 @glEnable(i32 %30)
%32 = call i32 (...) @glLoadIdentity()
ret void
}

LLVM IR (-O2):
@__const.init.mat_specular = [4 x i32] [i32 1, i32 1, i32 1, i32 1]
@__const.init.light_pos = [4 x i32] [i32 1, i32 1, i32 1, i32 0]
@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
@GL_COLOR_MATERIAL = global i32 0
@GL_NORMALIZE = 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 1, i32 1, i32 1, i32 1)
%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)
%28 = load i32, i32* @GL_COLOR_MATERIAL
%29 = call i32 @glEnable(i32 %28)
%30 = load i32, i32* @GL_NORMALIZE
%31 = call i32 @glEnable(i32 %30)
%32 = call i32 (...) @glLoadIdentity()
ret void
}