#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_AND_BACK;
int /*<<< orphan*/ GL_LESS;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_SHININESS;
int /*<<< orphan*/ GL_SPECULAR;
int /*<<< orphan*/ genmodel();
int /*<<< orphan*/ glDepthFunc(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glMaterialf(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/, int *);
void init(void) {
  GLfloat specular[4] = {1., 1., 1., 1.};
  glEnable(GL_LIGHTING);
  glEnable(GL_LIGHT0);
  genmodel();
  glDepthFunc(GL_LESS);
  glEnable(GL_DEPTH_TEST);
  glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, specular);
  glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 30);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xea1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xe9e(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0x2e4b(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2e4d(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    $0x0,%al
call   1060 <genmodel@plt>
mov    0x2e10(%rip),%rax
mov    (%rax),%edi
call   1050 <glDepthFunc@plt>
mov    0x2e12(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2e24(%rip),%rax
mov    (%rax),%edi
mov    0x2e2b(%rip),%rax
mov    (%rax),%esi
lea    -0x10(%rbp),%rdx
call   1070 <glMaterialfv@plt>
mov    0x2e09(%rip),%rax
mov    (%rax),%edi
mov    0x2e18(%rip),%rax
mov    (%rax),%esi
mov    $0x1e,%edx
call   1030 <glMaterialf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rbx
sub    $0x10,%rsp
movaps 0xea4(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2e59(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
xor    %eax,%eax
call   1060 <genmodel@plt>
mov    0x2e1e(%rip),%rax
mov    (%rax),%edi
call   1050 <glDepthFunc@plt>
mov    0x2e20(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2e32(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e39(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1070 <glMaterialfv@plt>
mov    (%rbx),%edi
mov    0x2e2e(%rip),%rax
mov    (%rax),%esi
mov    $0x1e,%edx
call   1030 <glMaterialf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.init.specular = [4 x i32] [i32 1, i32 1, i32 1, i32 1]
@GL_LIGHTING = global i32 0
@GL_LIGHT0 = global i32 0
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_FRONT_AND_BACK = global i32 0
@GL_SPECULAR = global i32 0
@GL_SHININESS = global i32 0
define void @init() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = load i32, i32* @GL_LIGHTING
%4 = call i32 @glEnable(i32 %3)
%5 = load i32, i32* @GL_LIGHT0
%6 = call i32 @glEnable(i32 %5)
%7 = call i32 (...) @genmodel()
%8 = load i32, i32* @GL_LESS
%9 = call i32 @glDepthFunc(i32 %8)
%10 = load i32, i32* @GL_DEPTH_TEST
%11 = call i32 @glEnable(i32 %10)
%12 = load i32, i32* @GL_FRONT_AND_BACK
%13 = load i32, i32* @GL_SPECULAR
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%15 = call i32 @glMaterialfv(i32 %12, i32 %13, i32* %14)
%16 = load i32, i32* @GL_FRONT_AND_BACK
%17 = load i32, i32* @GL_SHININESS
%18 = call i32 @glMaterialf(i32 %16, i32 %17, i32 30)
ret void
}

LLVM IR (-O2):
@__const.init.specular = [4 x i32] [i32 1, i32 1, i32 1, i32 1]
@GL_LIGHTING = global i32 0
@GL_LIGHT0 = global i32 0
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_FRONT_AND_BACK = global i32 0
@GL_SPECULAR = global i32 0
@GL_SHININESS = global i32 0
define void @init() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = load i32, i32* @GL_LIGHTING
%4 = tail call i32 @glEnable(i32 %3)
%5 = load i32, i32* @GL_LIGHT0
%6 = tail call i32 @glEnable(i32 %5)
%7 = tail call i32 (...) @genmodel()
%8 = load i32, i32* @GL_LESS
%9 = tail call i32 @glDepthFunc(i32 %8)
%10 = load i32, i32* @GL_DEPTH_TEST
%11 = tail call i32 @glEnable(i32 %10)
%12 = load i32, i32* @GL_FRONT_AND_BACK
%13 = load i32, i32* @GL_SPECULAR
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%15 = call i32 @glMaterialfv(i32 %12, i32 %13, i32* %14)
%16 = load i32, i32* @GL_FRONT_AND_BACK
%17 = load i32, i32* @GL_SHININESS
%18 = call i32 @glMaterialf(i32 %16, i32 %17, i32 30)
ret void
}