#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 /*<<< orphan*/ GL_COLOR_MATERIAL;
int GL_DEPTH_BUFFER_BIT;
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_DIFFUSE;
int /*<<< orphan*/ GL_FOG;
int /*<<< orphan*/ GL_FOG_COLOR;
int /*<<< orphan*/ GL_FOG_END;
int /*<<< orphan*/ GL_FOG_MODE;
int /*<<< orphan*/ GL_FOG_START;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_LIGHT1;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ GL_LINEAR;
int /*<<< orphan*/ GL_POSITION;
int /*<<< orphan*/ GL_SMOOTH;
int /*<<< orphan*/ glClear(int);
int /*<<< orphan*/ glClearColor(double, double, double, double);
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glFinish();
int /*<<< orphan*/ glFogf(int /*<<< orphan*/, double);
int /*<<< orphan*/ glFogfv(int /*<<< orphan*/, double *);
int /*<<< orphan*/ glFogi(int /*<<< orphan*/, int /*<<< orphan*/);
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};
  static GLfloat fogcolor[4] = {0.0, 0.0, 0.0, 0.0};
  glClearColor(0.0, 0.0, 0.0, 1.0);
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  glFogfv(GL_FOG_COLOR, fogcolor);
  glFogi(GL_FOG_MODE, GL_LINEAR);
  glFogf(GL_FOG_START, 10.0);
  glFogf(GL_FOG_END, 20.0);
  glEnable(GL_DEPTH_TEST);
  glEnable(GL_LIGHTING);
  glEnable(GL_LIGHT0);
  glEnable(GL_LIGHT1);
  glEnable(GL_FOG);
  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);
  glPushMatrix();
  glTranslatef(2.5, 0.0, -18.0);
  glRotatef(-45.0, 0.0, 1.0, 0.0);
  glColor3f(1.0, 1.0, 0.0);
  glutSolidTeapot(1.0);
  glPopMatrix();
  glPushMatrix();
  glTranslatef(-1.0, 0.0, -10.0);
  glRotatef(45.0, 0.0, 1.0, 0.0);
  glColor3f(0.0, 1.0, 1.0);
  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    0x2d6f(%rip),%rax
mov    (%rax),%edi
mov    0x2db6(%rip),%rax
or     (%rax),%edi
call   1060 <glClear@plt>
mov    0x2da0(%rip),%rax
mov    (%rax),%edi
lea    0x2eff(%rip),%rsi
call   1040 <glFogfv@plt>
mov    0x2d6b(%rip),%rax
mov    (%rax),%edi
mov    0x2d92(%rip),%rax
mov    (%rax),%esi
call   10e0 <glFogi@plt>
mov    0x2d8c(%rip),%rax
mov    (%rax),%edi
movsd  0xde2(%rip),%xmm0
call   1070 <glFogf@plt>
mov    0x2d86(%rip),%rax
mov    (%rax),%edi
movsd  0xdc4(%rip),%xmm0
call   1070 <glFogf@plt>
mov    0x2cf0(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
mov    0x2d02(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
mov    0x2d24(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
mov    0x2cbe(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
mov    0x2ce8(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
mov    0x2cb2(%rip),%rax
mov    (%rax),%edi
call   1100 <glShadeModel@plt>
mov    0x2cec(%rip),%rax
mov    (%rax),%edi
mov    0x2cab(%rip),%rax
mov    (%rax),%esi
lea    0x2dba(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x2cce(%rip),%rax
mov    (%rax),%edi
mov    0x2c9d(%rip),%rax
mov    (%rax),%esi
lea    0x2dbc(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x2c58(%rip),%rax
mov    (%rax),%edi
mov    0x2c6f(%rip),%rax
mov    (%rax),%esi
lea    0x2dbe(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x2c3a(%rip),%rax
mov    (%rax),%edi
mov    0x2c61(%rip),%rax
mov    (%rax),%esi
lea    0x2dc0(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x2c6c(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
mov    $0x0,%al
call   10d0 <glPushMatrix@plt>
movsd  0xcc6(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xcc3(%rip),%xmm2
call   10f0 <glTranslatef@plt>
movsd  0xca6(%rip),%xmm0
xorps  %xmm3,%xmm3
movsd  0xc7b(%rip),%xmm2
movaps %xmm3,%xmm1
call   1110 <glRotatef@plt>
movsd  0xc6b(%rip),%xmm1
xorps  %xmm2,%xmm2
movaps %xmm1,%xmm0
call   10c0 <glColor3f@plt>
movsd  0xc58(%rip),%xmm0
call   1050 <glutSolidTeapot@plt>
mov    $0x0,%al
call   10b0 <glPopMatrix@plt>
mov    $0x0,%al
call   10d0 <glPushMatrix@plt>
movsd  0xc4d(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xc4a(%rip),%xmm2
call   10f0 <glTranslatef@plt>
movsd  0xc2d(%rip),%xmm0
xorps  %xmm3,%xmm3
movsd  0xc1a(%rip),%xmm2
movaps %xmm3,%xmm1
call   1110 <glRotatef@plt>
xorps  %xmm0,%xmm0
movsd  0xc07(%rip),%xmm2
movaps %xmm2,%xmm1
call   10c0 <glColor3f@plt>
movsd  0xbf7(%rip),%xmm0
call   1050 <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    0x2d6e(%rip),%rax
mov    0x2db7(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1060 <glClear@plt>
mov    0x2d9f(%rip),%rax
mov    (%rax),%edi
lea    0x2efe(%rip),%rsi
call   1040 <glFogfv@plt>
mov    0x2d6a(%rip),%rax
mov    (%rax),%edi
mov    0x2d91(%rip),%rax
mov    (%rax),%esi
call   10e0 <glFogi@plt>
mov    0x2d8b(%rip),%rax
mov    (%rax),%edi
movsd  0xda9(%rip),%xmm0
call   1070 <glFogf@plt>
mov    0x2d85(%rip),%rax
mov    (%rax),%edi
movsd  0xd9b(%rip),%xmm0
call   1070 <glFogf@plt>
mov    0x2cef(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
mov    0x2d01(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
mov    0x2d23(%rip),%rbx
mov    (%rbx),%edi
call   1080 <glEnable@plt>
mov    0x2cbd(%rip),%r14
mov    (%r14),%edi
call   1080 <glEnable@plt>
mov    0x2ce6(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
mov    0x2cb0(%rip),%rax
mov    (%rax),%edi
call   1100 <glShadeModel@plt>
mov    (%rbx),%edi
mov    0x2cb0(%rip),%r15
mov    (%r15),%esi
lea    0x2dbe(%rip),%rdx
call   1030 <glLightfv@plt>
mov    (%rbx),%edi
mov    0x2ca8(%rip),%rbx
mov    (%rbx),%esi
lea    0x2dc7(%rip),%rdx
call   1030 <glLightfv@plt>
mov    (%r14),%edi
mov    (%r15),%esi
lea    0x2dd5(%rip),%rdx
call   1030 <glLightfv@plt>
mov    (%r14),%edi
mov    (%rbx),%esi
lea    0x2de4(%rip),%rdx
call   1030 <glLightfv@plt>
mov    0x2c90(%rip),%rax
mov    (%rax),%edi
call   1080 <glEnable@plt>
xor    %eax,%eax
call   10d0 <glPushMatrix@plt>
movsd  0xcda(%rip),%xmm0
movsd  0xcda(%rip),%xmm2
xorps  %xmm1,%xmm1
call   10f0 <glTranslatef@plt>
movsd  0xcd2(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm3,%xmm3
movsd  0xc9c(%rip),%xmm2
call   1110 <glRotatef@plt>
xorps  %xmm2,%xmm2
movsd  0xc8c(%rip),%xmm0
movaps %xmm0,%xmm1
call   10c0 <glColor3f@plt>
movsd  0xc7c(%rip),%xmm0
call   1050 <glutSolidTeapot@plt>
xor    %eax,%eax
call   10b0 <glPopMatrix@plt>
xor    %eax,%eax
call   10d0 <glPushMatrix@plt>
movsd  0xc91(%rip),%xmm0
movsd  0xc91(%rip),%xmm2
xorps  %xmm1,%xmm1
call   10f0 <glTranslatef@plt>
movsd  0xc89(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm3,%xmm3
movsd  0xc3b(%rip),%xmm2
call   1110 <glRotatef@plt>
xorps  %xmm0,%xmm0
movsd  0xc2b(%rip),%xmm1
movaps %xmm1,%xmm2
call   10c0 <glColor3f@plt>
movsd  0xc1b(%rip),%xmm0
call   1050 <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]
@Redraw.fogcolor = internal global [4 x double] zeroinitializer
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
@GL_FOG_COLOR = global i32 0
@GL_FOG_MODE = global i32 0
@GL_LINEAR = global i32 0
@GL_FOG_START = global i32 0
@GL_FOG_END = 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_FOG = global i32 0
@GL_SMOOTH = global i32 0
@GL_DIFFUSE = global i32 0
@GL_POSITION = global i32 0
@GL_COLOR_MATERIAL = 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_FOG_COLOR
%7 = call i32 @glFogfv(i32 %6, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.fogcolor, i64 0, i64 0))
%8 = load i32, i32* @GL_FOG_MODE
%9 = load i32, i32* @GL_LINEAR
%10 = call i32 @glFogi(i32 %8, i32 %9)
%11 = load i32, i32* @GL_FOG_START
%12 = call i32 @glFogf(i32 %11, double 1.000000e+01)
%13 = load i32, i32* @GL_FOG_END
%14 = call i32 @glFogf(i32 %13, double 2.000000e+01)
%15 = load i32, i32* @GL_DEPTH_TEST
%16 = call i32 @glEnable(i32 %15)
%17 = load i32, i32* @GL_LIGHTING
%18 = call i32 @glEnable(i32 %17)
%19 = load i32, i32* @GL_LIGHT0
%20 = call i32 @glEnable(i32 %19)
%21 = load i32, i32* @GL_LIGHT1
%22 = call i32 @glEnable(i32 %21)
%23 = load i32, i32* @GL_FOG
%24 = call i32 @glEnable(i32 %23)
%25 = load i32, i32* @GL_SMOOTH
%26 = call i32 @glShadeModel(i32 %25)
%27 = load i32, i32* @GL_LIGHT0
%28 = load i32, i32* @GL_DIFFUSE
%29 = call i32 @glLightfv(i32 %27, i32 %28, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.red_light, i64 0, i64 0))
%30 = load i32, i32* @GL_LIGHT0
%31 = load i32, i32* @GL_POSITION
%32 = call i32 @glLightfv(i32 %30, i32 %31, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.red_pos, i64 0, i64 0))
%33 = load i32, i32* @GL_LIGHT1
%34 = load i32, i32* @GL_DIFFUSE
%35 = call i32 @glLightfv(i32 %33, i32 %34, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.blue_light, i64 0, i64 0))
%36 = load i32, i32* @GL_LIGHT1
%37 = load i32, i32* @GL_POSITION
%38 = call i32 @glLightfv(i32 %36, i32 %37, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.blue_pos, i64 0, i64 0))
%39 = load i32, i32* @GL_COLOR_MATERIAL
%40 = call i32 @glEnable(i32 %39)
%41 = call i32 (...) @glPushMatrix()
%42 = call i32 @glTranslatef(double 2.500000e+00, double 0.000000e+00, double -1.800000e+01)
%43 = call i32 @glRotatef(double -4.500000e+01, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%44 = call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 0.000000e+00)
%45 = call i32 @glutSolidTeapot(double 1.000000e+00)
%46 = call i32 (...) @glPopMatrix()
%47 = call i32 (...) @glPushMatrix()
%48 = call i32 @glTranslatef(double -1.000000e+00, double 0.000000e+00, double -1.000000e+01)
%49 = call i32 @glRotatef(double 4.500000e+01, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%50 = call i32 @glColor3f(double 0.000000e+00, double 1.000000e+00, double 1.000000e+00)
%51 = call i32 @glutSolidTeapot(double 1.000000e+00)
%52 = call i32 (...) @glPopMatrix()
%53 = 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]
@Redraw.fogcolor = internal global [4 x double] zeroinitializer
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
@GL_FOG_COLOR = global i32 0
@GL_FOG_MODE = global i32 0
@GL_LINEAR = global i32 0
@GL_FOG_START = global i32 0
@GL_FOG_END = 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_FOG = global i32 0
@GL_SMOOTH = global i32 0
@GL_DIFFUSE = global i32 0
@GL_POSITION = global i32 0
@GL_COLOR_MATERIAL = 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_FOG_COLOR
%7 = tail call i32 @glFogfv(i32 %6, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.fogcolor, i64 0, i64 0))
%8 = load i32, i32* @GL_FOG_MODE
%9 = load i32, i32* @GL_LINEAR
%10 = tail call i32 @glFogi(i32 %8, i32 %9)
%11 = load i32, i32* @GL_FOG_START
%12 = tail call i32 @glFogf(i32 %11, double 1.000000e+01)
%13 = load i32, i32* @GL_FOG_END
%14 = tail call i32 @glFogf(i32 %13, double 2.000000e+01)
%15 = load i32, i32* @GL_DEPTH_TEST
%16 = tail call i32 @glEnable(i32 %15)
%17 = load i32, i32* @GL_LIGHTING
%18 = tail call i32 @glEnable(i32 %17)
%19 = load i32, i32* @GL_LIGHT0
%20 = tail call i32 @glEnable(i32 %19)
%21 = load i32, i32* @GL_LIGHT1
%22 = tail call i32 @glEnable(i32 %21)
%23 = load i32, i32* @GL_FOG
%24 = tail call i32 @glEnable(i32 %23)
%25 = load i32, i32* @GL_SMOOTH
%26 = tail call i32 @glShadeModel(i32 %25)
%27 = load i32, i32* @GL_LIGHT0
%28 = load i32, i32* @GL_DIFFUSE
%29 = tail call i32 @glLightfv(i32 %27, i32 %28, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.red_light, i64 0, i64 0))
%30 = load i32, i32* @GL_LIGHT0
%31 = load i32, i32* @GL_POSITION
%32 = tail call i32 @glLightfv(i32 %30, i32 %31, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.red_pos, i64 0, i64 0))
%33 = load i32, i32* @GL_LIGHT1
%34 = load i32, i32* @GL_DIFFUSE
%35 = tail call i32 @glLightfv(i32 %33, i32 %34, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.blue_light, i64 0, i64 0))
%36 = load i32, i32* @GL_LIGHT1
%37 = load i32, i32* @GL_POSITION
%38 = tail call i32 @glLightfv(i32 %36, i32 %37, double* getelementptr inbounds ([4 x double], [4 x double]* @Redraw.blue_pos, i64 0, i64 0))
%39 = load i32, i32* @GL_COLOR_MATERIAL
%40 = tail call i32 @glEnable(i32 %39)
%41 = tail call i32 (...) @glPushMatrix()
%42 = tail call i32 @glTranslatef(double 2.500000e+00, double 0.000000e+00, double -1.800000e+01)
%43 = tail call i32 @glRotatef(double -4.500000e+01, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%44 = tail call i32 @glColor3f(double 1.000000e+00, double 1.000000e+00, double 0.000000e+00)
%45 = tail call i32 @glutSolidTeapot(double 1.000000e+00)
%46 = tail call i32 (...) @glPopMatrix()
%47 = tail call i32 (...) @glPushMatrix()
%48 = tail call i32 @glTranslatef(double -1.000000e+00, double 0.000000e+00, double -1.000000e+01)
%49 = tail call i32 @glRotatef(double 4.500000e+01, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%50 = tail call i32 @glColor3f(double 0.000000e+00, double 1.000000e+00, double 1.000000e+00)
%51 = tail call i32 @glutSolidTeapot(double 1.000000e+00)
%52 = tail call i32 (...) @glPopMatrix()
%53 = tail call i32 (...) @glFinish()
ret void
}