#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_AMBIENT_AND_DIFFUSE;
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_FRONT;
int /*<<< orphan*/ GL_LESS;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_NORMALIZE;
int /*<<< orphan*/ GL_POSITION;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ GL_SHININESS;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ GL_SPECULAR;
int /*<<< orphan*/ glDepthFunc(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, double *);
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glMaterialf(int /*<<< orphan*/, int /*<<< orphan*/, double);
int /*<<< orphan*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/,
                                double *);
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
void myGLInit(void) {
  GLfloat mat_ambuse[] = {0.6, 0.0, 0.0, 1.0};
  GLfloat mat_specular[] = {0.4, 0.4, 0.4, 1.0};
  GLfloat light0_position[] = {0.6, 0.4, 0.3, 0.0};
  glLightfv(GL_LIGHT0, GL_POSITION, light0_position);
  glEnable(GL_LIGHTING);
  glEnable(GL_LIGHT0);
  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, mat_ambuse);
  glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
  glMaterialf(GL_FRONT, GL_SHININESS, 25.0);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();
  glEnable(GL_NORMALIZE);
  glDepthFunc(GL_LESS);
  glEnable(GL_DEPTH_TEST);
  glShadeModel(GL_SMOOTH);
  glFlush();
}


x86 assembly (clang, -O0):
<myGLInit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0xe71(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe6e(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xe6b(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xe68(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xe65(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe62(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe5f(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe5c(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe59(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe56(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xe53(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xe50(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0x2dad(%rip),%rax
mov    (%rax),%edi
mov    0x2d8c(%rip),%rax
mov    (%rax),%esi
lea    -0x60(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d5a(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2d84(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2d7e(%rip),%rax
mov    (%rax),%edi
mov    0x2d45(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   10b0 <glMaterialfv@plt>
mov    0x2d63(%rip),%rax
mov    (%rax),%edi
mov    0x2d6a(%rip),%rax
mov    (%rax),%esi
lea    -0x40(%rbp),%rdx
call   10b0 <glMaterialfv@plt>
mov    0x2d48(%rip),%rax
mov    (%rax),%edi
mov    0x2d57(%rip),%rax
mov    (%rax),%esi
movsd  0xd5d(%rip),%xmm0
call   1040 <glMaterialf@plt>
mov    0x2cf1(%rip),%rax
mov    (%rax),%edi
call   1050 <glMatrixMode@plt>
mov    $0x0,%al
call   1080 <glLoadIdentity@plt>
mov    0x2d04(%rip),%rax
mov    (%rax),%edi
call   1050 <glMatrixMode@plt>
mov    $0x0,%al
call   1080 <glLoadIdentity@plt>
mov    0x2cd7(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2c91(%rip),%rax
mov    (%rax),%edi
call   1070 <glDepthFunc@plt>
mov    0x2c93(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2c8d(%rip),%rax
mov    (%rax),%edi
call   10a0 <glShadeModel@plt>
mov    $0x0,%al
call   1090 <glFlush@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myGLInit>:
push   %rbx
sub    $0x60,%rsp
movaps 0xe84(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xe68(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xe8c(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe70(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe94(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe78(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2ded(%rip),%rbx
mov    (%rbx),%edi
mov    0x2dcc(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <glLightfv@plt>
mov    0x2d9b(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    (%rbx),%edi
call   1060 <glEnable@plt>
mov    0x2dc6(%rip),%rbx
mov    (%rbx),%edi
mov    0x2d8d(%rip),%rax
mov    (%rax),%esi
lea    0x40(%rsp),%rdx
call   10b0 <glMaterialfv@plt>
mov    (%rbx),%edi
mov    0x2db8(%rip),%rax
mov    (%rax),%esi
lea    0x20(%rsp),%rdx
call   10b0 <glMaterialfv@plt>
mov    (%rbx),%edi
mov    0x2dab(%rip),%rax
mov    (%rax),%esi
movsd  0xdb1(%rip),%xmm0
call   1040 <glMaterialf@plt>
mov    0x2d45(%rip),%rax
mov    (%rax),%edi
call   1050 <glMatrixMode@plt>
xor    %eax,%eax
call   1080 <glLoadIdentity@plt>
mov    0x2d58(%rip),%rax
mov    (%rax),%edi
call   1050 <glMatrixMode@plt>
xor    %eax,%eax
call   1080 <glLoadIdentity@plt>
mov    0x2d2b(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2ce5(%rip),%rax
mov    (%rax),%edi
call   1070 <glDepthFunc@plt>
mov    0x2ce7(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2ce1(%rip),%rax
mov    (%rax),%edi
call   10a0 <glShadeModel@plt>
xor    %eax,%eax
call   1090 <glFlush@plt>
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.myGLInit.mat_ambuse = [4 x double] [double 6.000000e-01, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@__const.myGLInit.mat_specular = [4 x double] [double 4.000000e-01, double 4.000000e-01, double 4.000000e-01, double 1.000000e+00]
@__const.myGLInit.light0_position = [4 x double] [double 6.000000e-01, double 4.000000e-01, double 3.000000e-01, double 0.000000e+00]
@GL_LIGHT0 = global i32 0
@GL_POSITION = global i32 0
@GL_LIGHTING = global i32 0
@GL_FRONT = global i32 0
@GL_AMBIENT_AND_DIFFUSE = global i32 0
@GL_SPECULAR = global i32 0
@GL_SHININESS = global i32 0
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
@GL_NORMALIZE = global i32 0
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_SMOOTH = global i32 0
define void @myGLInit() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = bitcast [4 x double]* %1 to i8*
%5 = bitcast [4 x double]* %2 to i8*
%6 = bitcast [4 x double]* %3 to i8*
%7 = load i32, i32* @GL_LIGHT0
%8 = load i32, i32* @GL_POSITION
%9 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%10 = call i32 @glLightfv(i32 %7, i32 %8, double* %9)
%11 = load i32, i32* @GL_LIGHTING
%12 = call i32 @glEnable(i32 %11)
%13 = load i32, i32* @GL_LIGHT0
%14 = call i32 @glEnable(i32 %13)
%15 = load i32, i32* @GL_FRONT
%16 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%17 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%18 = call i32 @glMaterialfv(i32 %15, i32 %16, double* %17)
%19 = load i32, i32* @GL_FRONT
%20 = load i32, i32* @GL_SPECULAR
%21 = getelementptr inbounds [4 x double], [4 x double]* %2, 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 = call i32 @glMaterialf(i32 %23, i32 %24, double 2.500000e+01)
%26 = load i32, i32* @GL_PROJECTION
%27 = call i32 @glMatrixMode(i32 %26)
%28 = call i32 (...) @glLoadIdentity()
%29 = load i32, i32* @GL_MODELVIEW
%30 = call i32 @glMatrixMode(i32 %29)
%31 = call i32 (...) @glLoadIdentity()
%32 = load i32, i32* @GL_NORMALIZE
%33 = call i32 @glEnable(i32 %32)
%34 = load i32, i32* @GL_LESS
%35 = call i32 @glDepthFunc(i32 %34)
%36 = load i32, i32* @GL_DEPTH_TEST
%37 = call i32 @glEnable(i32 %36)
%38 = load i32, i32* @GL_SMOOTH
%39 = call i32 @glShadeModel(i32 %38)
%40 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@__const.myGLInit.mat_ambuse = [4 x double] [double 6.000000e-01, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@__const.myGLInit.mat_specular = [4 x double] [double 4.000000e-01, double 4.000000e-01, double 4.000000e-01, double 1.000000e+00]
@__const.myGLInit.light0_position = [4 x double] [double 6.000000e-01, double 4.000000e-01, double 3.000000e-01, double 0.000000e+00]
@GL_LIGHT0 = global i32 0
@GL_POSITION = global i32 0
@GL_LIGHTING = global i32 0
@GL_FRONT = global i32 0
@GL_AMBIENT_AND_DIFFUSE = global i32 0
@GL_SPECULAR = global i32 0
@GL_SHININESS = global i32 0
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
@GL_NORMALIZE = global i32 0
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_SMOOTH = global i32 0
define void @myGLInit() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = bitcast [4 x double]* %1 to i8*
%5 = bitcast [4 x double]* %2 to i8*
%6 = bitcast [4 x double]* %3 to i8*
%7 = load i32, i32* @GL_LIGHT0
%8 = load i32, i32* @GL_POSITION
%9 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%10 = call i32 @glLightfv(i32 %7, i32 %8, double* %9)
%11 = load i32, i32* @GL_LIGHTING
%12 = call i32 @glEnable(i32 %11)
%13 = load i32, i32* @GL_LIGHT0
%14 = call i32 @glEnable(i32 %13)
%15 = load i32, i32* @GL_FRONT
%16 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%17 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%18 = call i32 @glMaterialfv(i32 %15, i32 %16, double* %17)
%19 = load i32, i32* @GL_FRONT
%20 = load i32, i32* @GL_SPECULAR
%21 = getelementptr inbounds [4 x double], [4 x double]* %2, 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 = call i32 @glMaterialf(i32 %23, i32 %24, double 2.500000e+01)
%26 = load i32, i32* @GL_PROJECTION
%27 = call i32 @glMatrixMode(i32 %26)
%28 = call i32 (...) @glLoadIdentity()
%29 = load i32, i32* @GL_MODELVIEW
%30 = call i32 @glMatrixMode(i32 %29)
%31 = call i32 (...) @glLoadIdentity()
%32 = load i32, i32* @GL_NORMALIZE
%33 = call i32 @glEnable(i32 %32)
%34 = load i32, i32* @GL_LESS
%35 = call i32 @glDepthFunc(i32 %34)
%36 = load i32, i32* @GL_DEPTH_TEST
%37 = call i32 @glEnable(i32 %36)
%38 = load i32, i32* @GL_SMOOTH
%39 = call i32 @glShadeModel(i32 %38)
%40 = call i32 (...) @glFlush()
ret void
}