#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 GL_COLOR_BUFFER_BIT;
int GL_DEPTH_BUFFER_BIT;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_POSITION;
int /*<<< orphan*/ drawPlane();
int /*<<< orphan*/ glClear(int);
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, double *);
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glTranslatef(double, double, double);
void display(void) {
  GLfloat infinite_light[] = {1.0, 1.0, 1.0, 0.0};
  GLfloat local_light[] = {1.0, 1.0, 1.0, 1.0};
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  glPushMatrix();
  glTranslatef(-1.5, 0.0, 0.0);
  glLightfv(GL_LIGHT0, GL_POSITION, infinite_light);
  drawPlane();
  glPopMatrix();
  glPushMatrix();
  glTranslatef(1.5, 0.0, 0.0);
  glLightfv(GL_LIGHT0, GL_POSITION, local_light);
  drawPlane();
  glPopMatrix();
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0xe91(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe8e(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xe8b(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xe88(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xe85(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe82(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe7f(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe7c(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
mov    0x2e08(%rip),%rax
or     (%rax),%edi
call   1040 <glClear@plt>
mov    $0x0,%al
call   1080 <glPushMatrix@plt>
movsd  0xe12(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1090 <glTranslatef@plt>
mov    0x2dd8(%rip),%rax
mov    (%rax),%edi
mov    0x2dbf(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    $0x0,%al
call   1050 <drawPlane@plt>
mov    $0x0,%al
call   1060 <glPopMatrix@plt>
mov    $0x0,%al
call   1080 <glPushMatrix@plt>
movsd  0xdc7(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1090 <glTranslatef@plt>
mov    0x2d95(%rip),%rax
mov    (%rax),%edi
mov    0x2d7c(%rip),%rax
mov    (%rax),%esi
lea    -0x40(%rbp),%rdx
call   1030 <glLightfv@plt>
mov    $0x0,%al
call   1050 <drawPlane@plt>
mov    $0x0,%al
call   1060 <glPopMatrix@plt>
mov    $0x0,%al
call   1070 <glFlush@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %r14
push   %rbx
sub    $0x48,%rsp
movaps 0xea2(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe86(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeaa(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe8e(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2e1b(%rip),%rax
mov    0x2e34(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1040 <glClear@plt>
xor    %eax,%eax
call   1080 <glPushMatrix@plt>
movsd  0xe34(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1090 <glTranslatef@plt>
mov    0x2e02(%rip),%r14
mov    (%r14),%edi
mov    0x2de8(%rip),%rbx
mov    (%rbx),%esi
lea    0x20(%rsp),%rdx
call   1030 <glLightfv@plt>
xor    %eax,%eax
call   1050 <drawPlane@plt>
xor    %eax,%eax
call   1060 <glPopMatrix@plt>
xor    %eax,%eax
call   1080 <glPushMatrix@plt>
movsd  0xdf7(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   1090 <glTranslatef@plt>
mov    (%r14),%edi
mov    (%rbx),%esi
mov    %rsp,%rdx
call   1030 <glLightfv@plt>
xor    %eax,%eax
call   1050 <drawPlane@plt>
xor    %eax,%eax
call   1060 <glPopMatrix@plt>
xor    %eax,%eax
call   1070 <glFlush@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.display.infinite_light = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 0.000000e+00]
@__const.display.local_light = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
@GL_LIGHT0 = global i32 0
@GL_POSITION = global i32 0
define void @display() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = bitcast [4 x double]* %1 to i8*
%4 = bitcast [4 x double]* %2 to i8*
%5 = load i32, i32* @GL_COLOR_BUFFER_BIT
%6 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%7 = or i32 %5, %6
%8 = call i32 @glClear(i32 %7)
%9 = call i32 (...) @glPushMatrix()
%10 = call i32 @glTranslatef(double -1.500000e+00, double 0.000000e+00, double 0.000000e+00)
%11 = load i32, i32* @GL_LIGHT0
%12 = load i32, i32* @GL_POSITION
%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 = call i32 (...) @drawPlane()
%16 = call i32 (...) @glPopMatrix()
%17 = call i32 (...) @glPushMatrix()
%18 = call i32 @glTranslatef(double 1.500000e+00, double 0.000000e+00, double 0.000000e+00)
%19 = load i32, i32* @GL_LIGHT0
%20 = load i32, i32* @GL_POSITION
%21 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%22 = call i32 @glLightfv(i32 %19, i32 %20, double* %21)
%23 = call i32 (...) @drawPlane()
%24 = call i32 (...) @glPopMatrix()
%25 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@__const.display.infinite_light = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 0.000000e+00]
@__const.display.local_light = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
@GL_LIGHT0 = global i32 0
@GL_POSITION = global i32 0
define void @display() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = bitcast [4 x double]* %1 to i8*
%4 = bitcast [4 x double]* %2 to i8*
%5 = load i32, i32* @GL_COLOR_BUFFER_BIT
%6 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%7 = or i32 %6, %5
%8 = tail call i32 @glClear(i32 %7)
%9 = tail call i32 (...) @glPushMatrix()
%10 = tail call i32 @glTranslatef(double -1.500000e+00, double 0.000000e+00, double 0.000000e+00)
%11 = load i32, i32* @GL_LIGHT0
%12 = load i32, i32* @GL_POSITION
%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 = call i32 (...) @drawPlane()
%16 = call i32 (...) @glPopMatrix()
%17 = call i32 (...) @glPushMatrix()
%18 = call i32 @glTranslatef(double 1.500000e+00, double 0.000000e+00, double 0.000000e+00)
%19 = load i32, i32* @GL_LIGHT0
%20 = load i32, i32* @GL_POSITION
%21 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%22 = call i32 @glLightfv(i32 %19, i32 %20, double* %21)
%23 = call i32 (...) @drawPlane()
%24 = call i32 (...) @glPopMatrix()
%25 = call i32 (...) @glFlush()
ret void
}