#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;
int /*<<< orphan*/ GL_AUTO_NORMAL;
int /*<<< orphan*/ GL_CW;
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_DIFFUSE;
int /*<<< orphan*/ GL_LESS;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_LIGHT_MODEL_AMBIENT;
int /*<<< orphan*/ GL_NORMALIZE;
int /*<<< orphan*/ GL_POSITION;
int /*<<< orphan*/ GL_SPECULAR;
int /*<<< orphan*/ glDepthFunc(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glFrontFace(int /*<<< orphan*/);
int /*<<< orphan*/ glLightModelfv(int /*<<< orphan*/, double *);
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, double *);
void myinit(void) {
  GLfloat light_ambient[] = {0.0, 0.0, 0.0, 1.0};
  GLfloat light_diffuse[] = {1.0, 1.0, 1.0, 1.0};
  GLfloat light_specular[] = {1.0, 1.0, 1.0, 1.0};
  GLfloat light_position[] = {1.0, 0.0, 0.0, 0.0};
  GLfloat global_ambient[] = {0.75, 0.75, 0.75, 1.0};
  glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient);
  glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse);
  glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular);
  glLightfv(GL_LIGHT0, GL_POSITION, light_position);
  glLightModelfv(GL_LIGHT_MODEL_AMBIENT, global_ambient);
  glFrontFace(GL_CW);
  glEnable(GL_LIGHTING);
  glEnable(GL_LIGHT0);
  glEnable(GL_AUTO_NORMAL);
  glEnable(GL_NORMALIZE);
  glDepthFunc(GL_LESS);
  glEnable(GL_DEPTH_TEST);
}


x86 assembly (clang, -O0):
<myinit>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    0xe9e(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe9b(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xe98(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xe95(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xe92(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe8f(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe8c(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe89(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe66(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe63(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xe60(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xe5d(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xe5a(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xe57(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xe54(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xe51(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xe4e(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xe48(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    0xe42(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xe3c(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0x2d86(%rip),%rax
mov    (%rax),%edi
mov    0x2d9d(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d6b(%rip),%rax
mov    (%rax),%edi
mov    0x2d32(%rip),%rax
mov    (%rax),%esi
lea    -0x40(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d50(%rip),%rax
mov    (%rax),%edi
mov    0x2d5f(%rip),%rax
mov    (%rax),%esi
lea    -0x60(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d35(%rip),%rax
mov    (%rax),%edi
mov    0x2d14(%rip),%rax
mov    (%rax),%esi
lea    -0x80(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d22(%rip),%rax
mov    (%rax),%edi
lea    -0xa0(%rbp),%rsi
call   1040 <glLightModelfv@plt>
mov    0x2cbd(%rip),%rax
mov    (%rax),%edi
call   1070 <glFrontFace@plt>
mov    0x2ccf(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2ce9(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2ccb(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2cad(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2c6f(%rip),%rax
mov    (%rax),%edi
call   1060 <glDepthFunc@plt>
mov    0x2c79(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myinit>:
push   %rbx
sub    $0xa0,%rsp
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xe92(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xeb3(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xe97(%rip),%xmm1
movaps %xmm1,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm1,0x40(%rsp)
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe95(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeb9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe9d(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2e02(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e19(%rip),%rax
mov    (%rax),%esi
lea    0x80(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x2db1(%rip),%rax
mov    (%rax),%esi
lea    0x60(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x2de4(%rip),%rax
mov    (%rax),%esi
lea    0x40(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x2d9f(%rip),%rax
mov    (%rax),%esi
lea    0x20(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    0x2dac(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1040 <glLightModelfv@plt>
mov    0x2d4b(%rip),%rax
mov    (%rax),%edi
call   1070 <glFrontFace@plt>
mov    0x2d5d(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    (%rbx),%edi
call   1050 <glEnable@plt>
mov    0x2d60(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d42(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
mov    0x2d04(%rip),%rax
mov    (%rax),%edi
call   1060 <glDepthFunc@plt>
mov    0x2d0e(%rip),%rax
mov    (%rax),%edi
call   1050 <glEnable@plt>
add    $0xa0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.myinit.light_ambient = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@__const.myinit.light_diffuse = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.myinit.light_specular = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.myinit.light_position = [4 x double] [double 1.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00]
@__const.myinit.global_ambient = [4 x double] [double 7.500000e-01, double 7.500000e-01, double 7.500000e-01, double 1.000000e+00]
@GL_LIGHT0 = global i32 0
@GL_AMBIENT = global i32 0
@GL_DIFFUSE = global i32 0
@GL_SPECULAR = global i32 0
@GL_POSITION = global i32 0
@GL_LIGHT_MODEL_AMBIENT = global i32 0
@GL_CW = global i32 0
@GL_LIGHTING = global i32 0
@GL_AUTO_NORMAL = global i32 0
@GL_NORMALIZE = global i32 0
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
define void @myinit() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = alloca [4 x double]
%5 = alloca [4 x double]
%6 = bitcast [4 x double]* %1 to i8*
%7 = bitcast [4 x double]* %2 to i8*
%8 = bitcast [4 x double]* %3 to i8*
%9 = bitcast [4 x double]* %4 to i8*
%10 = bitcast [4 x double]* %5 to i8*
%11 = load i32, i32* @GL_LIGHT0
%12 = load i32, i32* @GL_AMBIENT
%13 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%14 = call i32 @glLightfv(i32 %11, i32 %12, double* %13)
%15 = load i32, i32* @GL_LIGHT0
%16 = load i32, i32* @GL_DIFFUSE
%17 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%18 = call i32 @glLightfv(i32 %15, i32 %16, double* %17)
%19 = load i32, i32* @GL_LIGHT0
%20 = load i32, i32* @GL_SPECULAR
%21 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%22 = call i32 @glLightfv(i32 %19, i32 %20, double* %21)
%23 = load i32, i32* @GL_LIGHT0
%24 = load i32, i32* @GL_POSITION
%25 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%26 = call i32 @glLightfv(i32 %23, i32 %24, double* %25)
%27 = load i32, i32* @GL_LIGHT_MODEL_AMBIENT
%28 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%29 = call i32 @glLightModelfv(i32 %27, double* %28)
%30 = load i32, i32* @GL_CW
%31 = call i32 @glFrontFace(i32 %30)
%32 = load i32, i32* @GL_LIGHTING
%33 = call i32 @glEnable(i32 %32)
%34 = load i32, i32* @GL_LIGHT0
%35 = call i32 @glEnable(i32 %34)
%36 = load i32, i32* @GL_AUTO_NORMAL
%37 = call i32 @glEnable(i32 %36)
%38 = load i32, i32* @GL_NORMALIZE
%39 = call i32 @glEnable(i32 %38)
%40 = load i32, i32* @GL_LESS
%41 = call i32 @glDepthFunc(i32 %40)
%42 = load i32, i32* @GL_DEPTH_TEST
%43 = call i32 @glEnable(i32 %42)
ret void
}

LLVM IR (-O2):
@__const.myinit.light_ambient = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@__const.myinit.light_specular = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.myinit.light_position = [4 x double] [double 1.000000e+00, double 0.000000e+00, double 0.000000e+00, double 0.000000e+00]
@__const.myinit.global_ambient = [4 x double] [double 7.500000e-01, double 7.500000e-01, double 7.500000e-01, double 1.000000e+00]
@GL_LIGHT0 = global i32 0
@GL_AMBIENT = global i32 0
@GL_DIFFUSE = global i32 0
@GL_SPECULAR = global i32 0
@GL_POSITION = global i32 0
@GL_LIGHT_MODEL_AMBIENT = global i32 0
@GL_CW = global i32 0
@GL_LIGHTING = global i32 0
@GL_AUTO_NORMAL = global i32 0
@GL_NORMALIZE = global i32 0
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
define void @myinit() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = alloca [4 x double]
%5 = alloca [4 x double]
%6 = bitcast [4 x double]* %1 to i8*
%7 = bitcast [4 x double]* %2 to i8*
%8 = bitcast [4 x double]* %3 to i8*
%9 = bitcast [4 x double]* %4 to i8*
%10 = bitcast [4 x double]* %5 to i8*
%11 = load i32, i32* @GL_LIGHT0
%12 = load i32, i32* @GL_AMBIENT
%13 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%14 = call i32 @glLightfv(i32 %11, i32 %12, double* %13)
%15 = load i32, i32* @GL_LIGHT0
%16 = load i32, i32* @GL_DIFFUSE
%17 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%18 = call i32 @glLightfv(i32 %15, i32 %16, double* %17)
%19 = load i32, i32* @GL_LIGHT0
%20 = load i32, i32* @GL_SPECULAR
%21 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%22 = call i32 @glLightfv(i32 %19, i32 %20, double* %21)
%23 = load i32, i32* @GL_LIGHT0
%24 = load i32, i32* @GL_POSITION
%25 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%26 = call i32 @glLightfv(i32 %23, i32 %24, double* %25)
%27 = load i32, i32* @GL_LIGHT_MODEL_AMBIENT
%28 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%29 = call i32 @glLightModelfv(i32 %27, double* %28)
%30 = load i32, i32* @GL_CW
%31 = call i32 @glFrontFace(i32 %30)
%32 = load i32, i32* @GL_LIGHTING
%33 = call i32 @glEnable(i32 %32)
%34 = load i32, i32* @GL_LIGHT0
%35 = call i32 @glEnable(i32 %34)
%36 = load i32, i32* @GL_AUTO_NORMAL
%37 = call i32 @glEnable(i32 %36)
%38 = load i32, i32* @GL_NORMALIZE
%39 = call i32 @glEnable(i32 %38)
%40 = load i32, i32* @GL_LESS
%41 = call i32 @glDepthFunc(i32 %40)
%42 = load i32, i32* @GL_DEPTH_TEST
%43 = call i32 @glEnable(i32 %42)
ret void
}