#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 */

/* Variables and functions */
int GL_COLOR_BUFFER_BIT;
int GL_DEPTH_BUFFER_BIT;
int /*<<< orphan*/ GL_LINES;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glClear(int);
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glLineWidth(double);
int /*<<< orphan*/ glLoadIdentity();
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glRotatef(int, double, double, double);
int /*<<< orphan*/ glTranslatef(double, double, double);
int /*<<< orphan*/ glVertex2i(int, int);
int /*<<< orphan*/ glutSolidCone(double, double, int, int);
int /*<<< orphan*/ glutSolidSphere(double, int, int);
int /*<<< orphan*/ glutSwapBuffers();
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  glLoadIdentity();
  glColor3f(0.5, 0.5, 1.0);
  glPushMatrix();
  glTranslatef(0.0, -2.0, 0.0);
  glutSolidSphere(2.0, 100, 100);
  glPopMatrix();
  glPushMatrix();
  glTranslatef(0.0, 0.5, 0.0);
  glutSolidSphere(1.5, 50, 50);
  glPopMatrix();
  glPushMatrix();
  glTranslatef(0.0, 2.2, 0.0);
  glutSolidSphere(1.0, 30, 30);
  glPopMatrix();
  glPushMatrix();
  glRotatef(-90., 0.0, 0.0, 0.5);
  glTranslatef(-2.4, 0.0, 0.0);
  glutSolidCone(0.3, 2.0, 40, 30);
  glPopMatrix();
  glPushMatrix();
  glTranslatef(0.6, 2.7, 0.6);
  glutSolidSphere(0.17, 50, 50);
  glPopMatrix();
  glPushMatrix();
  glTranslatef(-0.6, 2.7, 0.6);
  glutSolidSphere(0.17, 50, 50);
  glPopMatrix();
  glColor3f(50.0, 50.0, 50.0);
  glBegin(GL_LINES);
  glVertex2i(200, 600);
  glVertex2i(600, 1000);
  glEnd();
  glLineWidth(10.5);
  glutSwapBuffers();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2de5(%rip),%rax
mov    (%rax),%edi
mov    0x2dec(%rip),%rax
or     (%rax),%edi
call   1060 <glClear@plt>
mov    $0x0,%al
call   10a0 <glLoadIdentity@plt>
movsd  0xe3e(%rip),%xmm1
movsd  0xe3e(%rip),%xmm2
movaps %xmm1,%xmm0
call   10b0 <glColor3f@plt>
mov    $0x0,%al
call   10c0 <glPushMatrix@plt>
xorps  %xmm2,%xmm2
movsd  0xe3c(%rip),%xmm1
movaps %xmm2,%xmm0
call   10e0 <glTranslatef@plt>
movsd  0xdfc(%rip),%xmm0
mov    $0x64,%esi
mov    %esi,%edi
call   10d0 <glutSolidSphere@plt>
mov    $0x0,%al
call   1090 <glPopMatrix@plt>
mov    $0x0,%al
call   10c0 <glPushMatrix@plt>
xorps  %xmm2,%xmm2
movsd  0xde7(%rip),%xmm1
movaps %xmm2,%xmm0
call   10e0 <glTranslatef@plt>
movsd  0xdef(%rip),%xmm0
mov    $0x32,%esi
mov    %esi,%edi
call   10d0 <glutSolidSphere@plt>
mov    $0x0,%al
call   1090 <glPopMatrix@plt>
mov    $0x0,%al
call   10c0 <glPushMatrix@plt>
xorps  %xmm2,%xmm2
movsd  0xdc2(%rip),%xmm1
movaps %xmm2,%xmm0
call   10e0 <glTranslatef@plt>
movsd  0xdaa(%rip),%xmm0
mov    $0x1e,%esi
mov    %esi,%edi
call   10d0 <glutSolidSphere@plt>
mov    $0x0,%al
call   1090 <glPopMatrix@plt>
mov    $0x0,%al
call   10c0 <glPushMatrix@plt>
mov    $0xffffffa6,%edi
xorps  %xmm1,%xmm1
movsd  0xd78(%rip),%xmm2
movaps %xmm1,%xmm0
call   1100 <glRotatef@plt>
movsd  0xd60(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   10e0 <glTranslatef@plt>
movsd  0xd3d(%rip),%xmm0
movsd  0xd3d(%rip),%xmm1
mov    $0x28,%edi
mov    $0x1e,%esi
call   1050 <glutSolidCone@plt>
mov    $0x0,%al
call   1090 <glPopMatrix@plt>
mov    $0x0,%al
call   10c0 <glPushMatrix@plt>
movsd  0xd08(%rip),%xmm2
movsd  0xcf8(%rip),%xmm1
movaps %xmm2,%xmm0
call   10e0 <glTranslatef@plt>
movsd  0xcd8(%rip),%xmm0
mov    $0x32,%esi
mov    %esi,%edi
call   10d0 <glutSolidSphere@plt>
mov    $0x0,%al
call   1090 <glPopMatrix@plt>
mov    $0x0,%al
call   10c0 <glPushMatrix@plt>
movsd  0xcbe(%rip),%xmm0
movsd  0xcbe(%rip),%xmm1
movsd  0xcbe(%rip),%xmm2
call   10e0 <glTranslatef@plt>
movsd  0xc99(%rip),%xmm0
mov    $0x32,%esi
mov    %esi,%edi
call   10d0 <glutSolidSphere@plt>
mov    $0x0,%al
call   1090 <glPopMatrix@plt>
movsd  0xc76(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   10b0 <glColor3f@plt>
mov    0x2c4c(%rip),%rax
mov    (%rax),%edi
call   10f0 <glBegin@plt>
mov    $0xc8,%edi
mov    $0x258,%esi
call   1040 <glVertex2i@plt>
mov    $0x258,%edi
mov    $0x3e8,%esi
call   1040 <glVertex2i@plt>
mov    $0x0,%al
call   1080 <glEnd@plt>
movsd  0xc28(%rip),%xmm0
call   1030 <glLineWidth@plt>
mov    $0x0,%al
call   1070 <glutSwapBuffers@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2de8(%rip),%rax
mov    0x2df1(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1060 <glClear@plt>
xor    %eax,%eax
call   10a0 <glLoadIdentity@plt>
movsd  0xdf9(%rip),%xmm0
movsd  0xdf9(%rip),%xmm2
movaps %xmm0,%xmm1
call   10b0 <glColor3f@plt>
xor    %eax,%eax
call   10c0 <glPushMatrix@plt>
movsd  0xdea(%rip),%xmm1
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
call   10e0 <glTranslatef@plt>
movsd  0xddf(%rip),%xmm0
mov    $0x64,%edi
mov    $0x64,%esi
call   10d0 <glutSolidSphere@plt>
xor    %eax,%eax
call   1090 <glPopMatrix@plt>
xor    %eax,%eax
call   10c0 <glPushMatrix@plt>
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
movsd  0xd9c(%rip),%xmm1
call   10e0 <glTranslatef@plt>
movsd  0xdaf(%rip),%xmm0
mov    $0x32,%edi
mov    $0x32,%esi
call   10d0 <glutSolidSphere@plt>
xor    %eax,%eax
call   1090 <glPopMatrix@plt>
xor    %eax,%eax
call   10c0 <glPushMatrix@plt>
movsd  0xd92(%rip),%xmm1
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
call   10e0 <glTranslatef@plt>
movsd  0xd5f(%rip),%xmm0
mov    $0x1e,%edi
mov    $0x1e,%esi
call   10d0 <glutSolidSphere@plt>
xor    %eax,%eax
call   1090 <glPopMatrix@plt>
xor    %eax,%eax
call   10c0 <glPushMatrix@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
mov    $0xffffffa6,%edi
movsd  0xd27(%rip),%xmm2
call   1100 <glRotatef@plt>
movsd  0xd4a(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
call   10e0 <glTranslatef@plt>
movsd  0xd3f(%rip),%xmm0
movsd  0xd17(%rip),%xmm1
mov    $0x28,%edi
mov    $0x1e,%esi
call   1050 <glutSolidCone@plt>
xor    %eax,%eax
call   1090 <glPopMatrix@plt>
xor    %eax,%eax
call   10c0 <glPushMatrix@plt>
movsd  0xd1a(%rip),%xmm1
movsd  0xd1a(%rip),%xmm0
movaps %xmm0,%xmm2
call   10e0 <glTranslatef@plt>
movsd  0xd12(%rip),%xmm0
mov    $0x32,%edi
mov    $0x32,%esi
call   10d0 <glutSolidSphere@plt>
xor    %eax,%eax
call   1090 <glPopMatrix@plt>
xor    %eax,%eax
call   10c0 <glPushMatrix@plt>
movsd  0xcf5(%rip),%xmm0
movsd  0xcd5(%rip),%xmm1
movsd  0xcd5(%rip),%xmm2
call   10e0 <glTranslatef@plt>
movsd  0xcd0(%rip),%xmm0
mov    $0x32,%edi
mov    $0x32,%esi
call   10d0 <glutSolidSphere@plt>
xor    %eax,%eax
call   1090 <glPopMatrix@plt>
movsd  0xcc2(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   10b0 <glColor3f@plt>
mov    0x2c40(%rip),%rax
mov    (%rax),%edi
call   10f0 <glBegin@plt>
mov    $0xc8,%edi
mov    $0x258,%esi
call   1040 <glVertex2i@plt>
mov    $0x258,%edi
mov    $0x3e8,%esi
call   1040 <glVertex2i@plt>
xor    %eax,%eax
call   1080 <glEnd@plt>
movsd  0xc84(%rip),%xmm0
call   1030 <glLineWidth@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <glutSwapBuffers@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
@GL_LINES = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %1, %2
%4 = call i32 @glClear(i32 %3)
%5 = call i32 (...) @glLoadIdentity()
%6 = call i32 @glColor3f(double 5.000000e-01, double 5.000000e-01, double 1.000000e+00)
%7 = call i32 (...) @glPushMatrix()
%8 = call i32 @glTranslatef(double 0.000000e+00, double -2.000000e+00, double 0.000000e+00)
%9 = call i32 @glutSolidSphere(double 2.000000e+00, i32 100, i32 100)
%10 = call i32 (...) @glPopMatrix()
%11 = call i32 (...) @glPushMatrix()
%12 = call i32 @glTranslatef(double 0.000000e+00, double 5.000000e-01, double 0.000000e+00)
%13 = call i32 @glutSolidSphere(double 1.500000e+00, i32 50, i32 50)
%14 = call i32 (...) @glPopMatrix()
%15 = call i32 (...) @glPushMatrix()
%16 = call i32 @glTranslatef(double 0.000000e+00, double 2.200000e+00, double 0.000000e+00)
%17 = call i32 @glutSolidSphere(double 1.000000e+00, i32 30, i32 30)
%18 = call i32 (...) @glPopMatrix()
%19 = call i32 (...) @glPushMatrix()
%20 = call i32 @glRotatef(i32 -90, double 0.000000e+00, double 0.000000e+00, double 5.000000e-01)
%21 = call i32 @glTranslatef(double -2.400000e+00, double 0.000000e+00, double 0.000000e+00)
%22 = call i32 @glutSolidCone(double 3.000000e-01, double 2.000000e+00, i32 40, i32 30)
%23 = call i32 (...) @glPopMatrix()
%24 = call i32 (...) @glPushMatrix()
%25 = call i32 @glTranslatef(double 6.000000e-01, double 2.700000e+00, double 6.000000e-01)
%26 = call i32 @glutSolidSphere(double 1.700000e-01, i32 50, i32 50)
%27 = call i32 (...) @glPopMatrix()
%28 = call i32 (...) @glPushMatrix()
%29 = call i32 @glTranslatef(double -6.000000e-01, double 2.700000e+00, double 6.000000e-01)
%30 = call i32 @glutSolidSphere(double 1.700000e-01, i32 50, i32 50)
%31 = call i32 (...) @glPopMatrix()
%32 = call i32 @glColor3f(double 5.000000e+01, double 5.000000e+01, double 5.000000e+01)
%33 = load i32, i32* @GL_LINES
%34 = call i32 @glBegin(i32 %33)
%35 = call i32 @glVertex2i(i32 200, i32 600)
%36 = call i32 @glVertex2i(i32 600, i32 1000)
%37 = call i32 (...) @glEnd()
%38 = call i32 @glLineWidth(double 1.050000e+01)
%39 = call i32 (...) @glutSwapBuffers()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
@GL_LINES = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %2, %1
%4 = tail call i32 @glClear(i32 %3)
%5 = tail call i32 (...) @glLoadIdentity()
%6 = tail call i32 @glColor3f(double 5.000000e-01, double 5.000000e-01, double 1.000000e+00)
%7 = tail call i32 (...) @glPushMatrix()
%8 = tail call i32 @glTranslatef(double 0.000000e+00, double -2.000000e+00, double 0.000000e+00)
%9 = tail call i32 @glutSolidSphere(double 2.000000e+00, i32 100, i32 100)
%10 = tail call i32 (...) @glPopMatrix()
%11 = tail call i32 (...) @glPushMatrix()
%12 = tail call i32 @glTranslatef(double 0.000000e+00, double 5.000000e-01, double 0.000000e+00)
%13 = tail call i32 @glutSolidSphere(double 1.500000e+00, i32 50, i32 50)
%14 = tail call i32 (...) @glPopMatrix()
%15 = tail call i32 (...) @glPushMatrix()
%16 = tail call i32 @glTranslatef(double 0.000000e+00, double 2.200000e+00, double 0.000000e+00)
%17 = tail call i32 @glutSolidSphere(double 1.000000e+00, i32 30, i32 30)
%18 = tail call i32 (...) @glPopMatrix()
%19 = tail call i32 (...) @glPushMatrix()
%20 = tail call i32 @glRotatef(i32 -90, double 0.000000e+00, double 0.000000e+00, double 5.000000e-01)
%21 = tail call i32 @glTranslatef(double -2.400000e+00, double 0.000000e+00, double 0.000000e+00)
%22 = tail call i32 @glutSolidCone(double 3.000000e-01, double 2.000000e+00, i32 40, i32 30)
%23 = tail call i32 (...) @glPopMatrix()
%24 = tail call i32 (...) @glPushMatrix()
%25 = tail call i32 @glTranslatef(double 6.000000e-01, double 2.700000e+00, double 6.000000e-01)
%26 = tail call i32 @glutSolidSphere(double 1.700000e-01, i32 50, i32 50)
%27 = tail call i32 (...) @glPopMatrix()
%28 = tail call i32 (...) @glPushMatrix()
%29 = tail call i32 @glTranslatef(double -6.000000e-01, double 2.700000e+00, double 6.000000e-01)
%30 = tail call i32 @glutSolidSphere(double 1.700000e-01, i32 50, i32 50)
%31 = tail call i32 (...) @glPopMatrix()
%32 = tail call i32 @glColor3f(double 5.000000e+01, double 5.000000e+01, double 5.000000e+01)
%33 = load i32, i32* @GL_LINES
%34 = tail call i32 @glBegin(i32 %33)
%35 = tail call i32 @glVertex2i(i32 200, i32 600)
%36 = tail call i32 @glVertex2i(i32 600, i32 1000)
%37 = tail call i32 (...) @glEnd()
%38 = tail call i32 @glLineWidth(double 1.050000e+01)
%39 = tail call i32 (...) @glutSwapBuffers()
ret void
}