#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 float GLfloat;

/* Variables and functions */
int /*<<< orphan*/ GL_AMBIENT;
int /*<<< orphan*/ GL_AMBIENT_AND_DIFFUSE;
int /*<<< orphan*/ GL_CCW;
int /*<<< orphan*/ GL_COLOR_MATERIAL;
int /*<<< orphan*/ GL_CULL_FACE;
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_DIFFUSE;
int /*<<< orphan*/ GL_FRONT;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_LIGHT_MODEL_AMBIENT;
int /*<<< orphan*/ GL_POSITION;
int /*<<< orphan*/ glClearColor(float, float, float, float);
int /*<<< orphan*/ glColorMaterial(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glFrontFace(int /*<<< orphan*/);
int /*<<< orphan*/ glLightModelfv(int /*<<< orphan*/, float *);
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, float *);
void setupRC() {
  GLfloat whiteLight[] = {0.45f, 0.45f, 0.45f, 1.0f};
  GLfloat sourceLight[] = {0.25f, 0.25f, 0.25f, 1.0f};
  GLfloat lightPos[] = {-50.f, 25.0f, 250.0f, 0.0f};
  glEnable(GL_DEPTH_TEST);
  glFrontFace(GL_CCW);
  glEnable(GL_CULL_FACE);
  glEnable(GL_LIGHTING);
  glLightModelfv(GL_LIGHT_MODEL_AMBIENT, whiteLight);
  glLightfv(GL_LIGHT0, GL_AMBIENT, sourceLight);
  glLightfv(GL_LIGHT0, GL_DIFFUSE, sourceLight);
  glLightfv(GL_LIGHT0, GL_POSITION, lightPos);
  glEnable(GL_LIGHT0);
  glEnable(GL_COLOR_MATERIAL);
  glColorMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE);
  glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
}


x86 assembly (clang, -O0):
<setupRC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xea1(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xe9e(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xe9b(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe98(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xe95(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe92(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2dd7(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
call   1080 <glFrontFace@plt>
mov    0x2dcb(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2dc5(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2def(%rip),%rax
mov    (%rax),%edi
lea    -0x10(%rbp),%rsi
call   1050 <glLightModelfv@plt>
mov    0x2dd5(%rip),%rax
mov    (%rax),%edi
mov    0x2dec(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2dba(%rip),%rax
mov    (%rax),%edi
mov    0x2d71(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d9f(%rip),%rax
mov    (%rax),%edi
mov    0x2d7e(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    0x2d84(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2d6e(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2d78(%rip),%rax
mov    (%rax),%edi
mov    0x2d37(%rip),%rax
mov    (%rax),%esi
call   1040 <glColorMaterial@plt>
xorps  %xmm2,%xmm2
movss  0xd7d(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1070 <glClearColor@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setupRC>:
push   %r14
push   %rbx
sub    $0x38,%rsp
movaps 0xea2(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xea6(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeaa(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2df7(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2e11(%rip),%rax
mov    (%rax),%edi
call   1080 <glFrontFace@plt>
mov    0x2deb(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2de5(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2e0f(%rip),%rax
mov    (%rax),%edi
lea    0x20(%rsp),%rsi
call   1050 <glLightModelfv@plt>
mov    0x2df4(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e0b(%rip),%rax
mov    (%rax),%esi
lea    0x10(%rsp),%r14
mov    %r14,%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x2d93(%rip),%rax
mov    (%rax),%esi
mov    %r14,%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x2da8(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
call   1060 <glEnable@plt>
mov    0x2da0(%rip),%rax
mov    (%rax),%edi
call   1060 <glEnable@plt>
mov    0x2daa(%rip),%rax
mov    (%rax),%edi
mov    0x2d69(%rip),%rax
mov    (%rax),%esi
call   1040 <glColorMaterial@plt>
movss  0xdb2(%rip),%xmm3
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1070 <glClearColor@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.setupRC.whiteLight = [4 x float] [float 0x3FDCCCCCC0000000, float 0x3FDCCCCCC0000000, float 0x3FDCCCCCC0000000, float 1.000000e+00]
@__const.setupRC.sourceLight = [4 x float] [float 2.500000e-01, float 2.500000e-01, float 2.500000e-01, float 1.000000e+00]
@__const.setupRC.lightPos = [4 x float] [float -5.000000e+01, float 2.500000e+01, float 2.500000e+02, float 0.000000e+00]
@GL_DEPTH_TEST = global i32 0
@GL_CCW = global i32 0
@GL_CULL_FACE = global i32 0
@GL_LIGHTING = global i32 0
@GL_LIGHT_MODEL_AMBIENT = global i32 0
@GL_LIGHT0 = global i32 0
@GL_AMBIENT = global i32 0
@GL_DIFFUSE = global i32 0
@GL_POSITION = global i32 0
@GL_COLOR_MATERIAL = global i32 0
@GL_FRONT = global i32 0
@GL_AMBIENT_AND_DIFFUSE = global i32 0
define void @setupRC() {
%1 = alloca [4 x float]
%2 = alloca [4 x float]
%3 = alloca [4 x float]
%4 = bitcast [4 x float]* %1 to i8*
%5 = bitcast [4 x float]* %2 to i8*
%6 = bitcast [4 x float]* %3 to i8*
%7 = load i32, i32* @GL_DEPTH_TEST
%8 = call i32 @glEnable(i32 %7)
%9 = load i32, i32* @GL_CCW
%10 = call i32 @glFrontFace(i32 %9)
%11 = load i32, i32* @GL_CULL_FACE
%12 = call i32 @glEnable(i32 %11)
%13 = load i32, i32* @GL_LIGHTING
%14 = call i32 @glEnable(i32 %13)
%15 = load i32, i32* @GL_LIGHT_MODEL_AMBIENT
%16 = getelementptr inbounds [4 x float], [4 x float]* %1, i64 0, i64 0
%17 = call i32 @glLightModelfv(i32 %15, float* %16)
%18 = load i32, i32* @GL_LIGHT0
%19 = load i32, i32* @GL_AMBIENT
%20 = getelementptr inbounds [4 x float], [4 x float]* %2, i64 0, i64 0
%21 = call i32 @glLightfv(i32 %18, i32 %19, float* %20)
%22 = load i32, i32* @GL_LIGHT0
%23 = load i32, i32* @GL_DIFFUSE
%24 = getelementptr inbounds [4 x float], [4 x float]* %2, i64 0, i64 0
%25 = call i32 @glLightfv(i32 %22, i32 %23, float* %24)
%26 = load i32, i32* @GL_LIGHT0
%27 = load i32, i32* @GL_POSITION
%28 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 0
%29 = call i32 @glLightfv(i32 %26, i32 %27, float* %28)
%30 = load i32, i32* @GL_LIGHT0
%31 = call i32 @glEnable(i32 %30)
%32 = load i32, i32* @GL_COLOR_MATERIAL
%33 = call i32 @glEnable(i32 %32)
%34 = load i32, i32* @GL_FRONT
%35 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%36 = call i32 @glColorMaterial(i32 %34, i32 %35)
%37 = call i32 @glClearColor(float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00)
ret void
}

LLVM IR (-O2):
@__const.setupRC.whiteLight = [4 x float] [float 0x3FDCCCCCC0000000, float 0x3FDCCCCCC0000000, float 0x3FDCCCCCC0000000, float 1.000000e+00]
@__const.setupRC.sourceLight = [4 x float] [float 2.500000e-01, float 2.500000e-01, float 2.500000e-01, float 1.000000e+00]
@__const.setupRC.lightPos = [4 x float] [float -5.000000e+01, float 2.500000e+01, float 2.500000e+02, float 0.000000e+00]
@GL_DEPTH_TEST = global i32 0
@GL_CCW = global i32 0
@GL_CULL_FACE = global i32 0
@GL_LIGHTING = global i32 0
@GL_LIGHT_MODEL_AMBIENT = global i32 0
@GL_LIGHT0 = global i32 0
@GL_AMBIENT = global i32 0
@GL_DIFFUSE = global i32 0
@GL_POSITION = global i32 0
@GL_COLOR_MATERIAL = global i32 0
@GL_FRONT = global i32 0
@GL_AMBIENT_AND_DIFFUSE = global i32 0
define void @setupRC() {
%1 = alloca [4 x float]
%2 = alloca [4 x float]
%3 = alloca [4 x float]
%4 = bitcast [4 x float]* %1 to i8*
%5 = bitcast [4 x float]* %2 to i8*
%6 = bitcast [4 x float]* %3 to i8*
%7 = load i32, i32* @GL_DEPTH_TEST
%8 = tail call i32 @glEnable(i32 %7)
%9 = load i32, i32* @GL_CCW
%10 = tail call i32 @glFrontFace(i32 %9)
%11 = load i32, i32* @GL_CULL_FACE
%12 = tail call i32 @glEnable(i32 %11)
%13 = load i32, i32* @GL_LIGHTING
%14 = tail call i32 @glEnable(i32 %13)
%15 = load i32, i32* @GL_LIGHT_MODEL_AMBIENT
%16 = getelementptr inbounds [4 x float], [4 x float]* %1, i64 0, i64 0
%17 = call i32 @glLightModelfv(i32 %15, float* %16)
%18 = load i32, i32* @GL_LIGHT0
%19 = load i32, i32* @GL_AMBIENT
%20 = getelementptr inbounds [4 x float], [4 x float]* %2, i64 0, i64 0
%21 = call i32 @glLightfv(i32 %18, i32 %19, float* %20)
%22 = load i32, i32* @GL_LIGHT0
%23 = load i32, i32* @GL_DIFFUSE
%24 = call i32 @glLightfv(i32 %22, i32 %23, float* %20)
%25 = load i32, i32* @GL_LIGHT0
%26 = load i32, i32* @GL_POSITION
%27 = getelementptr inbounds [4 x float], [4 x float]* %3, i64 0, i64 0
%28 = call i32 @glLightfv(i32 %25, i32 %26, float* %27)
%29 = load i32, i32* @GL_LIGHT0
%30 = call i32 @glEnable(i32 %29)
%31 = load i32, i32* @GL_COLOR_MATERIAL
%32 = call i32 @glEnable(i32 %31)
%33 = load i32, i32* @GL_FRONT
%34 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%35 = call i32 @glColorMaterial(i32 %33, i32 %34)
%36 = call i32 @glClearColor(float 0.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00)
ret void
}