#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_CONSTANT_ATTENUATION;
int /*<<< orphan*/ GL_DIFFUSE;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_LINEAR_ATTENUATION;
int /*<<< orphan*/ GL_POSITION;
int /*<<< orphan*/ GL_QUADRATIC_ATTENUATION;
int /*<<< orphan*/ GL_SPECULAR;
int /*<<< orphan*/ GL_SPOT_CUTOFF;
int /*<<< orphan*/ GL_SPOT_DIRECTION;
int /*<<< orphan*/ GL_SPOT_EXPONENT;
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glLightf(int /*<<< orphan*/, int /*<<< orphan*/, double);
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, double *);
void setLight(void) {
  GLfloat light0Pos[4] = {0.70, 0.70, 1.25, 0.00};
  GLfloat light0Amb[4] = {0.00, 0.00, 0.00, 1.00};
  GLfloat light0Diff[4] = {1.00, 1.00, 1.00, 1.00};
  GLfloat light0Spec[4] = {1.00, 1.00, 1.00, 1.00};
  GLfloat light0SpotDir[3] = {0.00, 0.00, -1.00};
  GLfloat light0SpotExp = 0.00;
  GLfloat light0SpotCutoff = 180.00;
  GLfloat light0Atten0 = 1.00;
  GLfloat light0Atten1 = 0.00;
  GLfloat light0Atten2 = 0.00;
  glEnable(GL_LIGHT0);
  glLightfv(GL_LIGHT0, GL_POSITION, light0Pos);
  glLightfv(GL_LIGHT0, GL_AMBIENT, light0Amb);
  glLightfv(GL_LIGHT0, GL_DIFFUSE, light0Diff);
  glLightfv(GL_LIGHT0, GL_SPECULAR, light0Spec);
  glLightfv(GL_LIGHT0, GL_SPOT_DIRECTION, light0SpotDir);
  glLightf(GL_LIGHT0, GL_SPOT_EXPONENT, light0SpotExp);
  glLightf(GL_LIGHT0, GL_SPOT_CUTOFF, light0SpotCutoff);
  glLightf(GL_LIGHT0, GL_CONSTANT_ATTENUATION, light0Atten0);
  glLightf(GL_LIGHT0, GL_LINEAR_ATTENUATION, light0Atten1);
  glLightf(GL_LIGHT0, GL_QUADRATIC_ATTENUATION, light0Atten2);
}


x86 assembly (clang, -O0):
<setLight>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    0xece(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xec2(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xebf(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xebc(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb9(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xeb6(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xeb3(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xeb0(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xead(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xe8a(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xe87(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xe84(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xe81(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xe7e(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xe78(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    0xe72(%rip),%rax
mov    %rax,-0x90(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0xde0(%rip),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  0xdc8(%rip),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    0x2d63(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    0x2d55(%rip),%rax
mov    (%rax),%edi
mov    0x2d3c(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d3a(%rip),%rax
mov    (%rax),%edi
mov    0x2d61(%rip),%rax
mov    (%rax),%esi
lea    -0x40(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d1f(%rip),%rax
mov    (%rax),%edi
mov    0x2cee(%rip),%rax
mov    (%rax),%esi
lea    -0x60(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d04(%rip),%rax
mov    (%rax),%edi
mov    0x2d1b(%rip),%rax
mov    (%rax),%esi
lea    -0x80(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2ce9(%rip),%rax
mov    (%rax),%edi
mov    0x2ce8(%rip),%rax
mov    (%rax),%esi
lea    -0xa0(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2ccb(%rip),%rax
mov    (%rax),%edi
mov    0x2cd2(%rip),%rax
mov    (%rax),%esi
movsd  -0xa8(%rbp),%xmm0
ff
call   1050 <glLightf@plt>
mov    0x2cac(%rip),%rax
mov    (%rax),%edi
mov    0x2ccb(%rip),%rax
mov    (%rax),%esi
movsd  -0xb0(%rbp),%xmm0
ff
call   1050 <glLightf@plt>
mov    0x2c8d(%rip),%rax
mov    (%rax),%edi
mov    0x2c54(%rip),%rax
mov    (%rax),%esi
movsd  -0xb8(%rbp),%xmm0
ff
call   1050 <glLightf@plt>
mov    0x2c6e(%rip),%rax
mov    (%rax),%edi
mov    0x2c4d(%rip),%rax
mov    (%rax),%esi
movsd  -0xc0(%rbp),%xmm0
ff
call   1050 <glLightf@plt>
mov    0x2c4f(%rip),%rax
mov    (%rax),%edi
mov    0x2c26(%rip),%rax
mov    (%rax),%esi
movsd  -0xc8(%rbp),%xmm0
ff
call   1050 <glLightf@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setLight>:
push   %rbx
sub    $0xa0,%rsp
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xec2(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xee3(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xec7(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xeeb(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xecf(%rip),%xmm1
movaps %xmm1,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm1,0x20(%rsp)
mov    0xee9(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2e12(%rip),%rbx
mov    (%rbx),%edi
call   1040 <glEnable@plt>
mov    (%rbx),%edi
mov    0x2df2(%rip),%rax
mov    (%rax),%esi
lea    0x80(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x2e1a(%rip),%rax
mov    (%rax),%esi
lea    0x60(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x2dad(%rip),%rax
mov    (%rax),%esi
lea    0x40(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x2de0(%rip),%rax
mov    (%rax),%esi
lea    0x20(%rsp),%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x2db3(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x2da8(%rip),%rax
mov    (%rax),%esi
xorps  %xmm0,%xmm0
call   1050 <glLightf@plt>
mov    (%rbx),%edi
mov    0x2dad(%rip),%rax
mov    (%rax),%esi
movsd  0xdbb(%rip),%xmm0
call   1050 <glLightf@plt>
mov    (%rbx),%edi
mov    0x2d3d(%rip),%rax
mov    (%rax),%esi
movsd  0xdab(%rip),%xmm0
call   1050 <glLightf@plt>
mov    (%rbx),%edi
mov    0x2d3d(%rip),%rax
mov    (%rax),%esi
xorps  %xmm0,%xmm0
call   1050 <glLightf@plt>
mov    (%rbx),%edi
mov    0x2d22(%rip),%rax
mov    (%rax),%esi
xorps  %xmm0,%xmm0
call   1050 <glLightf@plt>
add    $0xa0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.setLight.light0Pos = [4 x double] [double 0x3FE6666666666666, double 0x3FE6666666666666, double 1.250000e+00, double 0.000000e+00]
@__const.setLight.light0Amb = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@__const.setLight.light0Diff = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.setLight.light0Spec = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.setLight.light0SpotDir = [3 x double] [double 0.000000e+00, double 0.000000e+00, double -1.000000e+00]
@GL_LIGHT0 = global i32 0
@GL_POSITION = global i32 0
@GL_AMBIENT = global i32 0
@GL_DIFFUSE = global i32 0
@GL_SPECULAR = global i32 0
@GL_SPOT_DIRECTION = global i32 0
@GL_SPOT_EXPONENT = global i32 0
@GL_SPOT_CUTOFF = global i32 0
@GL_CONSTANT_ATTENUATION = global i32 0
@GL_LINEAR_ATTENUATION = global i32 0
@GL_QUADRATIC_ATTENUATION = global i32 0
define void @setLight() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = alloca [4 x double]
%5 = alloca [3 x double]
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = bitcast [4 x double]* %1 to i8*
%12 = bitcast [4 x double]* %2 to i8*
%13 = bitcast [4 x double]* %3 to i8*
%14 = bitcast [4 x double]* %4 to i8*
%15 = bitcast [3 x double]* %5 to i8*
store double 0.000000e+00, double* %6
store double 1.800000e+02, double* %7
store double 1.000000e+00, double* %8
store double 0.000000e+00, double* %9
store double 0.000000e+00, double* %10
%16 = load i32, i32* @GL_LIGHT0
%17 = call i32 @glEnable(i32 %16)
%18 = load i32, i32* @GL_LIGHT0
%19 = load i32, i32* @GL_POSITION
%20 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%21 = call i32 @glLightfv(i32 %18, i32 %19, double* %20)
%22 = load i32, i32* @GL_LIGHT0
%23 = load i32, i32* @GL_AMBIENT
%24 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%25 = call i32 @glLightfv(i32 %22, i32 %23, double* %24)
%26 = load i32, i32* @GL_LIGHT0
%27 = load i32, i32* @GL_DIFFUSE
%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_LIGHT0
%31 = load i32, i32* @GL_SPECULAR
%32 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%33 = call i32 @glLightfv(i32 %30, i32 %31, double* %32)
%34 = load i32, i32* @GL_LIGHT0
%35 = load i32, i32* @GL_SPOT_DIRECTION
%36 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 0
%37 = call i32 @glLightfv(i32 %34, i32 %35, double* %36)
%38 = load i32, i32* @GL_LIGHT0
%39 = load i32, i32* @GL_SPOT_EXPONENT
%40 = load double, double* %6
%41 = call i32 @glLightf(i32 %38, i32 %39, double %40)
%42 = load i32, i32* @GL_LIGHT0
%43 = load i32, i32* @GL_SPOT_CUTOFF
%44 = load double, double* %7
%45 = call i32 @glLightf(i32 %42, i32 %43, double %44)
%46 = load i32, i32* @GL_LIGHT0
%47 = load i32, i32* @GL_CONSTANT_ATTENUATION
%48 = load double, double* %8
%49 = call i32 @glLightf(i32 %46, i32 %47, double %48)
%50 = load i32, i32* @GL_LIGHT0
%51 = load i32, i32* @GL_LINEAR_ATTENUATION
%52 = load double, double* %9
%53 = call i32 @glLightf(i32 %50, i32 %51, double %52)
%54 = load i32, i32* @GL_LIGHT0
%55 = load i32, i32* @GL_QUADRATIC_ATTENUATION
%56 = load double, double* %10
%57 = call i32 @glLightf(i32 %54, i32 %55, double %56)
ret void
}

LLVM IR (-O2):
@__const.setLight.light0Pos = [4 x double] [double 0x3FE6666666666666, double 0x3FE6666666666666, double 1.250000e+00, double 0.000000e+00]
@__const.setLight.light0Amb = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@__const.setLight.light0Spec = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.setLight.light0SpotDir = [3 x double] [double 0.000000e+00, double 0.000000e+00, double -1.000000e+00]
@GL_LIGHT0 = global i32 0
@GL_POSITION = global i32 0
@GL_AMBIENT = global i32 0
@GL_DIFFUSE = global i32 0
@GL_SPECULAR = global i32 0
@GL_SPOT_DIRECTION = global i32 0
@GL_SPOT_EXPONENT = global i32 0
@GL_SPOT_CUTOFF = global i32 0
@GL_CONSTANT_ATTENUATION = global i32 0
@GL_LINEAR_ATTENUATION = global i32 0
@GL_QUADRATIC_ATTENUATION = global i32 0
define void @setLight() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = alloca [4 x double]
%5 = alloca [3 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 [3 x double]* %5 to i8*
%11 = load i32, i32* @GL_LIGHT0
%12 = tail call i32 @glEnable(i32 %11)
%13 = load i32, i32* @GL_LIGHT0
%14 = load i32, i32* @GL_POSITION
%15 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%16 = call i32 @glLightfv(i32 %13, i32 %14, double* %15)
%17 = load i32, i32* @GL_LIGHT0
%18 = load i32, i32* @GL_AMBIENT
%19 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%20 = call i32 @glLightfv(i32 %17, i32 %18, double* %19)
%21 = load i32, i32* @GL_LIGHT0
%22 = load i32, i32* @GL_DIFFUSE
%23 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%24 = call i32 @glLightfv(i32 %21, i32 %22, double* %23)
%25 = load i32, i32* @GL_LIGHT0
%26 = load i32, i32* @GL_SPECULAR
%27 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%28 = call i32 @glLightfv(i32 %25, i32 %26, double* %27)
%29 = load i32, i32* @GL_LIGHT0
%30 = load i32, i32* @GL_SPOT_DIRECTION
%31 = getelementptr inbounds [3 x double], [3 x double]* %5, i64 0, i64 0
%32 = call i32 @glLightfv(i32 %29, i32 %30, double* %31)
%33 = load i32, i32* @GL_LIGHT0
%34 = load i32, i32* @GL_SPOT_EXPONENT
%35 = call i32 @glLightf(i32 %33, i32 %34, double 0.000000e+00)
%36 = load i32, i32* @GL_LIGHT0
%37 = load i32, i32* @GL_SPOT_CUTOFF
%38 = call i32 @glLightf(i32 %36, i32 %37, double 1.800000e+02)
%39 = load i32, i32* @GL_LIGHT0
%40 = load i32, i32* @GL_CONSTANT_ATTENUATION
%41 = call i32 @glLightf(i32 %39, i32 %40, double 1.000000e+00)
%42 = load i32, i32* @GL_LIGHT0
%43 = load i32, i32* @GL_LINEAR_ATTENUATION
%44 = call i32 @glLightf(i32 %42, i32 %43, double 0.000000e+00)
%45 = load i32, i32* @GL_LIGHT0
%46 = load i32, i32* @GL_QUADRATIC_ATTENUATION
%47 = call i32 @glLightf(i32 %45, i32 %46, double 0.000000e+00)
ret void
}