#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_BLEND;
int GL_COLOR_BUFFER_BIT;
int /*<<< orphan*/ GL_COLOR_MATERIAL;
int GL_DEPTH_BUFFER_BIT;
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_DIFFUSE;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_LIGHT1;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_ONE_MINUS_SRC_ALPHA;
int /*<<< orphan*/ GL_POSITION;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ GL_SRC_ALPHA;
int /*<<< orphan*/ glBlendFunc(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glClear(int);
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glColor4f(double, double, double, double);
int /*<<< orphan*/ glDisable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glFinish();
int /*<<< orphan*/ glLightfv(int /*<<< orphan*/, int /*<<< orphan*/, double *);
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glRotatef(double, double, double, double);
int /*<<< orphan*/ glShadeModel(int /*<<< orphan*/);
int /*<<< orphan*/ glTranslatef(double, double, double);
int /*<<< orphan*/ glutSolidTeapot(double);
void Redraw(void) {
  static GLfloat red_light[4] = {1.0, 0.0, 0.0, 1.0};
  static GLfloat red_pos[4] = {1.0, 1.0, 1.0, 0.0};
  static GLfloat blue_light[4] = {0.0, 0.0, 1.0, 1.0};
  static GLfloat blue_pos[4] = {-1.0, -1.0, -1.0, 0.0};
  glClearColor(0.0, 0.0, 0.0, 1.0);
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  glEnable(GL_DEPTH_TEST);
  glEnable(GL_LIGHTING);
  glEnable(GL_LIGHT0);
  glEnable(GL_LIGHT1);
  glShadeModel(GL_SMOOTH);
  glLightfv(GL_LIGHT0, GL_DIFFUSE, red_light);
  glLightfv(GL_LIGHT0, GL_POSITION, red_pos);
  glLightfv(GL_LIGHT1, GL_DIFFUSE, blue_light);
  glLightfv(GL_LIGHT1, GL_POSITION, blue_pos);
  glEnable(GL_COLOR_MATERIAL);
  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  glPushMatrix();
  glTranslatef(0.0, 0.0, -15.0);
  glRotatef(-45.0, 0.0, 1.0, 0.0);
  glDisable(GL_BLEND);
  glColor3f(1.0, 1.0, 0.0);
  glutSolidTeapot(1.0);
  glPopMatrix();
  glPushMatrix();
  glTranslatef(0.0, 0.0, -10.0);
  glRotatef(45.0, 0.0, 1.0, 0.0);
  glEnable(GL_BLEND);
  glColor4f(1.0, 1.0, 1.0, 0.25);
  glutSolidTeapot(1.0);
  glPopMatrix();
  glFinish();
}


x86 assembly (clang, -O0):
<Redraw>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm2,%xmm2
movsd  0xe01(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   10a0 <glClearColor@plt>
mov    0x2d87(%rip),%rax
mov    (%rax),%edi
mov    0x2dbe(%rip),%rax
or     (%rax),%edi
call   1070 <glClear@plt>
mov    0x2d60(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
mov    0x2d7a(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
mov    0x2d8c(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
mov    0x2d2e(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
mov    0x2d30(%rip),%rax
mov    (%rax),%edi
call   10f0 <glShadeModel@plt>
mov    0x2d62(%rip),%rax
mov    (%rax),%edi
mov    0x2d29(%rip),%rax
mov    (%rax),%esi
lea    0x2e20(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x2d44(%rip),%rax
mov    (%rax),%edi
mov    0x2d23(%rip),%rax
mov    (%rax),%esi
lea    0x2e22(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x2cd6(%rip),%rax
mov    (%rax),%edi
mov    0x2ced(%rip),%rax
mov    (%rax),%esi
lea    0x2e24(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x2cb8(%rip),%rax
mov    (%rax),%edi
mov    0x2ce7(%rip),%rax
mov    (%rax),%esi
lea    0x2e26(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x2ce2(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
mov    0x2cb4(%rip),%rax
mov    (%rax),%edi
mov    0x2ceb(%rip),%rax
mov    (%rax),%esi
call   1050 <glBlendFunc@plt>
mov    $0x0,%al
call   10d0 <glPushMatrix@plt>
xorps  %xmm1,%xmm1
movsd  0xd12(%rip),%xmm2
movaps %xmm1,%xmm0
call   10e0 <glTranslatef@plt>
movsd  0xcfa(%rip),%xmm0
xorps  %xmm3,%xmm3
movsd  0xccf(%rip),%xmm2
movaps %xmm3,%xmm1
call   1110 <glRotatef@plt>
mov    0x2ca0(%rip),%rax
mov    (%rax),%edi
call   1100 <glDisable@plt>
movsd  0xcb1(%rip),%xmm1
xorps  %xmm2,%xmm2
movaps %xmm1,%xmm0
call   10c0 <glColor3f@plt>
movsd  0xc9e(%rip),%xmm0
call   1040 <glutSolidTeapot@plt>
mov    $0x0,%al
call   10b0 <glPopMatrix@plt>
mov    $0x0,%al
call   10d0 <glPushMatrix@plt>
xorps  %xmm1,%xmm1
movsd  0xc98(%rip),%xmm2
movaps %xmm1,%xmm0
call   10e0 <glTranslatef@plt>
movsd  0xc80(%rip),%xmm0
xorps  %xmm3,%xmm3
movsd  0xc65(%rip),%xmm2
movaps %xmm3,%xmm1
call   1110 <glRotatef@plt>
mov    0x2c36(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
movsd  0xc47(%rip),%xmm2
movsd  0xc47(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1060 <glColor4f@plt>
movsd  0xc2c(%rip),%xmm0
call   1040 <glutSolidTeapot@plt>
mov    $0x0,%al
call   10b0 <glPopMatrix@plt>
mov    $0x0,%al
call   1090 <glFinish@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Redraw>:
push   %r15
push   %r14
push   %rbx
movsd  0xe03(%rip),%xmm3
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   10a0 <glClearColor@plt>
mov    0x2d86(%rip),%rax
mov    0x2dbf(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1070 <glClear@plt>
mov    0x2d5f(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
mov    0x2d79(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
mov    0x2d8b(%rip),%rbx
mov    (%rbx),%edi
call   1080 <glEnable@plt>
mov    0x2d2d(%rip),%r14
mov    (%r14),%edi
call   1080 <glEnable@plt>
mov    0x2d2e(%rip),%rax
mov    (%rax),%edi
call   10f0 <glShadeModel@plt>
mov    (%rbx),%edi
mov    0x2d2e(%rip),%r15
mov    (%r15),%esi
lea    0x2e24(%rip),%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x2d2e(%rip),%rbx
mov    (%rbx),%esi
lea    0x2e2d(%rip),%rdx
call   1030 <glLightfv@plt>
mov    (%r14),%edi
mov    (%r15),%esi
lea    0x2e3b(%rip),%rdx
call   1030 <glLightfv@plt>
mov    (%r14),%edi
mov    (%rbx),%esi
lea    0x2e4a(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x2d06(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
mov    0x2cd8(%rip),%rax
mov    (%rax),%edi
mov    0x2d0f(%rip),%rax
mov    (%rax),%esi
call   1050 <glBlendFunc@plt>
xor    %eax,%eax
call   10d0 <glPushMatrix@plt>
movsd  0xd19(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   10e0 <glTranslatef@plt>
movsd  0xd0e(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm3,%xmm3
movsd  0xcf0(%rip),%xmm2
call   1110 <glRotatef@plt>
mov    0x2cc4(%rip),%rbx
mov    (%rbx),%edi
call   1100 <glDisable@plt>
xorps  %xmm2,%xmm2
movsd  0xcd2(%rip),%xmm0
movaps %xmm0,%xmm1
call   10c0 <glColor3f@plt>
movsd  0xcc2(%rip),%xmm0
call   1040 <glutSolidTeapot@plt>
xor    %eax,%eax
call   10b0 <glPopMatrix@plt>
xor    %eax,%eax
call   10d0 <glPushMatrix@plt>
movsd  0xcbf(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   10e0 <glTranslatef@plt>
movsd  0xcb4(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm3,%xmm3
movsd  0xc86(%rip),%xmm2
call   1110 <glRotatef@plt>
mov    (%rbx),%edi
call   1080 <glEnable@plt>
movsd  0xc9a(%rip),%xmm3
movsd  0xc6a(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1060 <glColor4f@plt>
movsd  0xc57(%rip),%xmm0
call   1040 <glutSolidTeapot@plt>
xor    %eax,%eax
call   10b0 <glPopMatrix@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1090 <glFinish@plt>

LLVM IR (-O0):
@Redraw.red_light = internal global [4 x double] [double 1.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@Redraw.red_pos = internal global [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 0.000000e+00]
@Redraw.blue_light = internal global [4 x double] [double 0.000000e+00, double 0.000000e+00, double 1.000000e+00, double 1.000000e+00]
@Redraw.blue_pos = internal global [4 x double] [double -1.000000e+00, double -1.000000e+00, double -1.000000e+00, double 0.000000e+00]
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_LIGHTING = global i32 0
@GL_LIGHT0 = global i32 0
@GL_LIGHT1 = global i32 0
@GL_SMOOTH = global i32 0
@GL_DIFFUSE = global i32 0
@GL_POSITION = global i32 0
@GL_COLOR_MATERIAL = global i32 0
@GL_SRC_ALPHA = global i32 0
@GL_ONE_MINUS_SRC_ALPHA = global i32 0
@GL_BLEND = global i32 0
define void @Redraw() {
%1 = call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%2 = load i32, i32* @GL_COLOR_BUFFER_BIT
%3 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%4 = or i32 %2, %3
%5 = call i32 @glClear(i32 %4)
%6 = load i32, i32* @GL_DEPTH_TEST
%7 = call i32 @glEnable(i32 %6)
%8 = load i32, i32* @GL_LIGHTING
%9 = call i32 @glEnable(i32 %8)
%10 = load i32, i32* @GL_LIGHT0
%11 = call i32 @glEnable(i32 %10)
%12 = load i32, i32* @GL_LIGHT1
%13 = call i32 @glEnable(i32 %12)
%14 = load i32, i32* @GL_SMOOTH
%15 = call i32 @glShadeModel(i32 %14)
%16 = load i32, i32* @GL_LIGHT0
%17 = load i32, i32* @GL_DIFFUSE
%18 = call i32 @glLightfv(i32 %16, i32 %17, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.red_light, i64 0, i64 0))
%19 = load i32, i32* @GL_LIGHT0
%20 = load i32, i32* @GL_POSITION
%21 = call i32 @glLightfv(i32 %19, i32 %20, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.red_pos, i64 0, i64 0))
%22 = load i32, i32* @GL_LIGHT1
%23 = load i32, i32* @GL_DIFFUSE
%24 = call i32 @glLightfv(i32 %22, i32 %23, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.blue_light, i64 0, i64 0))
%25 = load i32, i32* @GL_LIGHT1
%26 = load i32, i32* @GL_POSITION
%27 = call i32 @glLightfv(i32 %25, i32 %26, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.blue_pos, i64 0, i64 0))
%28 = load i32, i32* @GL_COLOR_MATERIAL
%29 = call i32 @glEnable(i32 %28)
%30 = load i32, i32* @GL_SRC_ALPHA
%31 = load i32, i32* @GL_ONE_MINUS_SRC_ALPHA
%32 = call i32 @glBlendFunc(i32 %30, i32 %31)
%33 = call i32 (...) @glPushMatrix()
%34 = call i32 @glTranslatef(double 0.000000e+00, double 0.000000e+00, double -1.500000e+01)
%35 = call i32 @glRotatef(double -4.500000e+01, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%36 = load i32, i32* @GL_BLEND
%37 = call i32 @glDisable(i32 %36)
%38 = call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 0.000000e+00)
%39 = call i32 @glutSolidTeapot(double 1.000000e+00)
%40 = call i32 (...) @glPopMatrix()
%41 = call i32 (...) @glPushMatrix()
%42 = call i32 @glTranslatef(double 0.000000e+00, double 0.000000e+00, double -1.000000e+01)
%43 = call i32 @glRotatef(double 4.500000e+01, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%44 = load i32, i32* @GL_BLEND
%45 = call i32 @glEnable(i32 %44)
%46 = call i32 @glColor4f(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 2.500000e-01)
%47 = call i32 @glutSolidTeapot(double 1.000000e+00)
%48 = call i32 (...) @glPopMatrix()
%49 = call i32 (...) @glFinish()
ret void
}

LLVM IR (-O2):
@Redraw.red_light = internal global [4 x double] [double 1.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@Redraw.red_pos = internal global [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 0.000000e+00]
@Redraw.blue_light = internal global [4 x double] [double 0.000000e+00, double 0.000000e+00, double 1.000000e+00, double 1.000000e+00]
@Redraw.blue_pos = internal global [4 x double] [double -1.000000e+00, double -1.000000e+00, double -1.000000e+00, double 0.000000e+00]
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
@GL_DEPTH_TEST = global i32 0
@GL_LIGHTING = global i32 0
@GL_LIGHT0 = global i32 0
@GL_LIGHT1 = global i32 0
@GL_SMOOTH = global i32 0
@GL_DIFFUSE = global i32 0
@GL_POSITION = global i32 0
@GL_COLOR_MATERIAL = global i32 0
@GL_SRC_ALPHA = global i32 0
@GL_ONE_MINUS_SRC_ALPHA = global i32 0
@GL_BLEND = global i32 0
define void @Redraw() {
%1 = tail call i32 @glClearColor(double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%2 = load i32, i32* @GL_COLOR_BUFFER_BIT
%3 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%4 = or i32 %3, %2
%5 = tail call i32 @glClear(i32 %4)
%6 = load i32, i32* @GL_DEPTH_TEST
%7 = tail call i32 @glEnable(i32 %6)
%8 = load i32, i32* @GL_LIGHTING
%9 = tail call i32 @glEnable(i32 %8)
%10 = load i32, i32* @GL_LIGHT0
%11 = tail call i32 @glEnable(i32 %10)
%12 = load i32, i32* @GL_LIGHT1
%13 = tail call i32 @glEnable(i32 %12)
%14 = load i32, i32* @GL_SMOOTH
%15 = tail call i32 @glShadeModel(i32 %14)
%16 = load i32, i32* @GL_LIGHT0
%17 = load i32, i32* @GL_DIFFUSE
%18 = tail call i32 @glLightfv(i32 %16, i32 %17, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.red_light, i64 0, i64 0))
%19 = load i32, i32* @GL_LIGHT0
%20 = load i32, i32* @GL_POSITION
%21 = tail call i32 @glLightfv(i32 %19, i32 %20, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.red_pos, i64 0, i64 0))
%22 = load i32, i32* @GL_LIGHT1
%23 = load i32, i32* @GL_DIFFUSE
%24 = tail call i32 @glLightfv(i32 %22, i32 %23, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.blue_light, i64 0, i64 0))
%25 = load i32, i32* @GL_LIGHT1
%26 = load i32, i32* @GL_POSITION
%27 = tail call i32 @glLightfv(i32 %25, i32 %26, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.blue_pos, i64 0, i64 0))
%28 = load i32, i32* @GL_COLOR_MATERIAL
%29 = tail call i32 @glEnable(i32 %28)
%30 = load i32, i32* @GL_SRC_ALPHA
%31 = load i32, i32* @GL_ONE_MINUS_SRC_ALPHA
%32 = tail call i32 @glBlendFunc(i32 %30, i32 %31)
%33 = tail call i32 (...) @glPushMatrix()
%34 = tail call i32 @glTranslatef(double 0.000000e+00, double 0.000000e+00, double -1.500000e+01)
%35 = tail call i32 @glRotatef(double -4.500000e+01, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%36 = load i32, i32* @GL_BLEND
%37 = tail call i32 @glDisable(i32 %36)
%38 = tail call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 0.000000e+00)
%39 = tail call i32 @glutSolidTeapot(double 1.000000e+00)
%40 = tail call i32 (...) @glPopMatrix()
%41 = tail call i32 (...) @glPushMatrix()
%42 = tail call i32 @glTranslatef(double 0.000000e+00, double 0.000000e+00, double -1.000000e+01)
%43 = tail call i32 @glRotatef(double 4.500000e+01, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%44 = load i32, i32* @GL_BLEND
%45 = tail call i32 @glEnable(i32 %44)
%46 = tail call i32 @glColor4f(double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 2.500000e-01)
%47 = tail call i32 @glutSolidTeapot(double 1.000000e+00)
%48 = tail call i32 (...) @glPopMatrix()
%49 = tail call i32 (...) @glFinish()
ret void
}