#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_LESS;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_POSITION;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ GL_SHININESS;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ GL_SPECULAR;
int /*<<< orphan*/ GL_TEXTURE_2D;
int /*<<< orphan*/ LoadTexture();
int /*<<< orphan*/ glClearColor(float, float, float, float);
int /*<<< orphan*/ glClearDepth(double);
int /*<<< orphan*/ glDepthFunc(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, double *);
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/,
                                double *);
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
int /*<<< orphan*/ gluPerspective(float, double, float, float);
int /*<<< orphan*/ glutIgnoreKeyRepeat(int);
void init() {
  LoadTexture();
  glEnable(GL_TEXTURE_2D);
  glClearColor(0.752941f, 0.752941f, 0.752941f, 0.0f);
  glClearDepth(1.0);
  glDepthFunc(GL_LESS);
  glEnable(GL_DEPTH_TEST);
  glShadeModel(GL_SMOOTH);
  GLfloat mat_specular[] = {1.0, 1.0, 1.0, 1.0};
  GLfloat mat_shininess[] = {50.0};
  GLfloat light_position[] = {10.0, -1.0, 3.0, 1.0};
  glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
  glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
  glLightfv(GL_LIGHT0, GL_POSITION, light_position);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  gluPerspective(45.0f, (GLfloat)1000 / (GLfloat)600, 0.1f, 100.0f);
  glutIgnoreKeyRepeat(1);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    $0x0,%al
call   10b0 <LoadTexture@plt>
mov    0x2dea(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
movss  0xe27(%rip),%xmm2
xorps  %xmm3,%xmm3
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1080 <glClearColor@plt>
movsd  0xe1d(%rip),%xmm0
call   10c0 <glClearDepth@plt>
mov    0x2d89(%rip),%rax
mov    (%rax),%edi
call   1070 <glDepthFunc@plt>
mov    0x2d8b(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d85(%rip),%rax
mov    (%rax),%edi
call   10d0 <glShadeModel@plt>
mov    0xdff(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xdfc(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xdf9(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xdf6(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xdc3(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xde8(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xde5(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xde2(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xddf(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0x2d44(%rip),%rax
mov    (%rax),%edi
mov    0x2d4b(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   10e0 <glMaterialfv@plt>
mov    0x2d29(%rip),%rax
mov    (%rax),%edi
mov    0x2d38(%rip),%rax
mov    (%rax),%esi
lea    -0x28(%rbp),%rdx
call   10e0 <glMaterialfv@plt>
mov    0x2d06(%rip),%rax
mov    (%rax),%edi
mov    0x2ce5(%rip),%rax
mov    (%rax),%esi
lea    -0x50(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2ccb(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
mov    $0x0,%al
call   1090 <glLoadIdentity@plt>
movss  0xd05(%rip),%xmm0
movsd  0xd0d(%rip),%xmm1
movss  0xcf9(%rip),%xmm2
movss  0xcf5(%rip),%xmm3
call   1060 <gluPerspective@plt>
mov    $0x1,%edi
call   10a0 <glutIgnoreKeyRepeat@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rbx
sub    $0x50,%rsp
xor    %eax,%eax
call   10b0 <LoadTexture@plt>
mov    0x2ded(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
movss  0xe1e(%rip),%xmm0
xorps  %xmm3,%xmm3
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1080 <glClearColor@plt>
movsd  0xe18(%rip),%xmm0
call   10c0 <glClearDepth@plt>
mov    0x2d8c(%rip),%rax
mov    (%rax),%edi
call   1070 <glDepthFunc@plt>
mov    0x2d8e(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d88(%rip),%rax
mov    (%rax),%edi
call   10d0 <glShadeModel@plt>
movaps 0xe02(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xde6(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movabs $0x4049000000000000,%rax
mov    %rax,0x8(%rsp)
movaps 0xdfb(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xddf(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
mov    0x2d6b(%rip),%rbx
mov    (%rbx),%edi
mov    0x2d72(%rip),%rax
mov    (%rax),%esi
lea    0x30(%rsp),%rdx
call   10e0 <glMaterialfv@plt>
mov    (%rbx),%edi
mov    0x2d65(%rip),%rax
mov    (%rax),%esi
lea    0x8(%rsp),%rdx
call   10e0 <glMaterialfv@plt>
mov    0x2d32(%rip),%rax
mov    (%rax),%edi
mov    0x2d11(%rip),%rax
mov    (%rax),%esi
lea    0x10(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    0x2cf6(%rip),%rax
mov    (%rax),%edi
call   1040 <glMatrixMode@plt>
xor    %eax,%eax
call   1090 <glLoadIdentity@plt>
movss  0xd34(%rip),%xmm0
movsd  0xd40(%rip),%xmm1
movss  0xd28(%rip),%xmm2
movss  0xd24(%rip),%xmm3
call   1060 <gluPerspective@plt>
mov    $0x1,%edi
call   10a0 <glutIgnoreKeyRepeat@plt>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@GL_TEXTURE_2D = global i32 0
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_SMOOTH = global i32 0
@__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+01, double -1.000000e+00, double 3.000000e+00, double 1.000000e+00]
@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_PROJECTION = global i32 0
define void @init() {
%1 = alloca [4 x double]
%2 = alloca [1 x double]
%3 = alloca [4 x double]
%4 = call i32 (...) @LoadTexture()
%5 = load i32, i32* @GL_TEXTURE_2D
%6 = call i32 @glEnable(i32 %5)
%7 = call i32 @glClearColor(float 0x3FE81817C0000000, float 0x3FE81817C0000000, float 0x3FE81817C0000000, float 0.000000e+00)
%8 = call i32 @glClearDepth(double 1.000000e+00)
%9 = load i32, i32* @GL_LESS
%10 = call i32 @glDepthFunc(i32 %9)
%11 = load i32, i32* @GL_DEPTH_TEST
%12 = call i32 @glEnable(i32 %11)
%13 = load i32, i32* @GL_SMOOTH
%14 = call i32 @glShadeModel(i32 %13)
%15 = bitcast [4 x double]* %1 to i8*
%16 = bitcast [1 x double]* %2 to i8*
%17 = bitcast [4 x double]* %3 to i8*
%18 = load i32, i32* @GL_FRONT
%19 = load i32, i32* @GL_SPECULAR
%20 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%21 = call i32 @glMaterialfv(i32 %18, i32 %19, double* %20)
%22 = load i32, i32* @GL_FRONT
%23 = load i32, i32* @GL_SHININESS
%24 = getelementptr inbounds [1 x double], [1 x double]* %2, i64 0, i64 0
%25 = call i32 @glMaterialfv(i32 %22, i32 %23, double* %24)
%26 = load i32, i32* @GL_LIGHT0
%27 = load i32, i32* @GL_POSITION
%28 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%29 = call i32 @glLightfv(i32 %26, i32 %27, double* %28)
%30 = load i32, i32* @GL_PROJECTION
%31 = call i32 @glMatrixMode(i32 %30)
%32 = call i32 (...) @glLoadIdentity()
%33 = call i32 @gluPerspective(float 4.500000e+01, double 0x3FFAAAAAAAAAAAAB, float 0x3FB99999A0000000, float 1.000000e+02)
%34 = call i32 @glutIgnoreKeyRepeat(i32 1)
ret void
}

LLVM IR (-O2):
@GL_TEXTURE_2D = global i32 0
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_SMOOTH = global i32 0
@__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+01, double -1.000000e+00, double 3.000000e+00, double 1.000000e+00]
@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_PROJECTION = global i32 0
define void @init() {
%1 = alloca [4 x double]
%2 = alloca [1 x double]
%3 = alloca [4 x double]
%4 = tail call i32 (...) @LoadTexture()
%5 = load i32, i32* @GL_TEXTURE_2D
%6 = tail call i32 @glEnable(i32 %5)
%7 = tail call i32 @glClearColor(float 0x3FE81817C0000000, float 0x3FE81817C0000000, float 0x3FE81817C0000000, float 0.000000e+00)
%8 = tail call i32 @glClearDepth(double 1.000000e+00)
%9 = load i32, i32* @GL_LESS
%10 = tail call i32 @glDepthFunc(i32 %9)
%11 = load i32, i32* @GL_DEPTH_TEST
%12 = tail call i32 @glEnable(i32 %11)
%13 = load i32, i32* @GL_SMOOTH
%14 = tail call i32 @glShadeModel(i32 %13)
%15 = bitcast [4 x double]* %1 to i8*
%16 = bitcast [1 x double]* %2 to i8*
%17 = bitcast [1 x double]* %2 to i64*
store i64 4632233691727265792, i64* %17
%18 = bitcast [4 x double]* %3 to i8*
%19 = load i32, i32* @GL_FRONT
%20 = load i32, i32* @GL_SPECULAR
%21 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%22 = call i32 @glMaterialfv(i32 %19, i32 %20, double* %21)
%23 = load i32, i32* @GL_FRONT
%24 = load i32, i32* @GL_SHININESS
%25 = getelementptr inbounds [1 x double], [1 x double]* %2, i64 0, i64 0
%26 = call i32 @glMaterialfv(i32 %23, i32 %24, double* %25)
%27 = load i32, i32* @GL_LIGHT0
%28 = load i32, i32* @GL_POSITION
%29 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%30 = call i32 @glLightfv(i32 %27, i32 %28, double* %29)
%31 = load i32, i32* @GL_PROJECTION
%32 = call i32 @glMatrixMode(i32 %31)
%33 = call i32 (...) @glLoadIdentity()
%34 = call i32 @gluPerspective(float 4.500000e+01, double 0x3FFAAAAAAAAAAAAB, float 0x3FB99999A0000000, float 1.000000e+02)
%35 = call i32 @glutIgnoreKeyRepeat(i32 1)
ret void
}