#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*/ glClear(int);
int /*<<< orphan*/ glFlush();
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glRotatef(double, double, double, double);
int /*<<< orphan*/ glTranslatef(double, double, double);
int /*<<< orphan*/ glutSolidCone(double, double, int, int);
int /*<<< orphan*/ glutSolidSphere(double, int, int);
int /*<<< orphan*/ glutSolidTorus(double, double, int, int);
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  glPushMatrix();
  glRotatef(20.0, 1.0, 0.0, 0.0);
  glPushMatrix();
  glTranslatef(-0.75, 0.5, 0.0);
  glRotatef(90.0, 1.0, 0.0, 0.0);
  glutSolidTorus(0.275, 0.85, 15, 15);
  glPopMatrix();
  glPushMatrix();
  glTranslatef(-0.75, -0.5, 0.0);
  glRotatef(270.0, 1.0, 0.0, 0.0);
  glutSolidCone(1.0, 2.0, 15, 15);
  glPopMatrix();
  glPushMatrix();
  glTranslatef(0.75, 0.0, -1.0);
  glutSolidSphere(1.0, 15, 15);
  glPopMatrix();
  glPopMatrix();
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e3d(%rip),%rax
mov    (%rax),%edi
mov    0x2e44(%rip),%rax
or     (%rax),%edi
call   1040 <glClear@plt>
mov    $0x0,%al
call   1070 <glPushMatrix@plt>
movsd  0xe9e(%rip),%xmm0
movsd  0xe3e(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   10a0 <glRotatef@plt>
mov    $0x0,%al
call   1070 <glPushMatrix@plt>
movsd  0xe4c(%rip),%xmm0
movsd  0xe6c(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1090 <glTranslatef@plt>
movsd  0xe54(%rip),%xmm0
movsd  0xe04(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   10a0 <glRotatef@plt>
movsd  0xe29(%rip),%xmm0
movsd  0xe29(%rip),%xmm1
mov    $0xf,%esi
mov    %esi,%edi
call   10b0 <glutSolidTorus@plt>
mov    $0x0,%al
call   1050 <glPopMatrix@plt>
mov    $0x0,%al
call   1070 <glPushMatrix@plt>
movsd  0xdef(%rip),%xmm0
movsd  0xdef(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1090 <glTranslatef@plt>
movsd  0xdcf(%rip),%xmm0
movsd  0xda7(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   10a0 <glRotatef@plt>
movsd  0xd94(%rip),%xmm0
movsd  0xda4(%rip),%xmm1
mov    $0xf,%esi
mov    %esi,%edi
call   1030 <glutSolidCone@plt>
mov    $0x0,%al
call   1050 <glPopMatrix@plt>
mov    $0x0,%al
call   1070 <glPushMatrix@plt>
movsd  0xd72(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xd6f(%rip),%xmm2
call   1090 <glTranslatef@plt>
movsd  0xd52(%rip),%xmm0
mov    $0xf,%esi
mov    %esi,%edi
call   1080 <glutSolidSphere@plt>
mov    $0x0,%al
call   1050 <glPopMatrix@plt>
mov    $0x0,%al
call   1050 <glPopMatrix@plt>
mov    $0x0,%al
call   1060 <glFlush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2e40(%rip),%rax
mov    0x2e49(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1040 <glClear@plt>
xor    %eax,%eax
call   1070 <glPushMatrix@plt>
movsd  0xe49(%rip),%xmm0
movsd  0xe49(%rip),%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   10a0 <glRotatef@plt>
xor    %eax,%eax
call   1070 <glPushMatrix@plt>
movsd  0xe37(%rip),%xmm0
movsd  0xe37(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1090 <glTranslatef@plt>
movsd  0xe2f(%rip),%xmm0
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
movsd  0xe09(%rip),%xmm1
call   10a0 <glRotatef@plt>
movsd  0xe1c(%rip),%xmm0
movsd  0xe1c(%rip),%xmm1
mov    $0xf,%edi
mov    $0xf,%esi
call   10b0 <glutSolidTorus@plt>
xor    %eax,%eax
call   1050 <glPopMatrix@plt>
xor    %eax,%eax
call   1070 <glPushMatrix@plt>
movsd  0xdff(%rip),%xmm1
xorps  %xmm2,%xmm2
movsd  0xdcc(%rip),%xmm0
call   1090 <glTranslatef@plt>
movsd  0xdef(%rip),%xmm0
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
movsd  0xda9(%rip),%xmm1
call   10a0 <glRotatef@plt>
movsd  0xddc(%rip),%xmm1
movsd  0xd94(%rip),%xmm0
mov    $0xf,%edi
mov    $0xf,%esi
call   1030 <glutSolidCone@plt>
xor    %eax,%eax
call   1050 <glPopMatrix@plt>
xor    %eax,%eax
call   1070 <glPushMatrix@plt>
movsd  0xdb7(%rip),%xmm0
movsd  0xdb7(%rip),%xmm2
xorps  %xmm1,%xmm1
call   1090 <glTranslatef@plt>
movsd  0xd57(%rip),%xmm0
mov    $0xf,%edi
mov    $0xf,%esi
call   1080 <glutSolidSphere@plt>
xor    %eax,%eax
call   1050 <glPopMatrix@plt>
xor    %eax,%eax
call   1050 <glPopMatrix@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <glFlush@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = 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 (...) @glPushMatrix()
%6 = call i32 @glRotatef(double 2.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%7 = call i32 (...) @glPushMatrix()
%8 = call i32 @glTranslatef(double -7.500000e-01, double 5.000000e-01, double 0.000000e+00)
%9 = call i32 @glRotatef(double 9.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%10 = call i32 @glutSolidTorus(double 2.750000e-01, double 8.500000e-01, i32 15, i32 15)
%11 = call i32 (...) @glPopMatrix()
%12 = call i32 (...) @glPushMatrix()
%13 = call i32 @glTranslatef(double -7.500000e-01, double -5.000000e-01, double 0.000000e+00)
%14 = call i32 @glRotatef(double 2.700000e+02, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%15 = call i32 @glutSolidCone(double 1.000000e+00, double 2.000000e+00, i32 15, i32 15)
%16 = call i32 (...) @glPopMatrix()
%17 = call i32 (...) @glPushMatrix()
%18 = call i32 @glTranslatef(double 7.500000e-01, double 0.000000e+00, double -1.000000e+00)
%19 = call i32 @glutSolidSphere(double 1.000000e+00, i32 15, i32 15)
%20 = call i32 (...) @glPopMatrix()
%21 = call i32 (...) @glPopMatrix()
%22 = call i32 (...) @glFlush()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = 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 (...) @glPushMatrix()
%6 = tail call i32 @glRotatef(double 2.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%7 = tail call i32 (...) @glPushMatrix()
%8 = tail call i32 @glTranslatef(double -7.500000e-01, double 5.000000e-01, double 0.000000e+00)
%9 = tail call i32 @glRotatef(double 9.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%10 = tail call i32 @glutSolidTorus(double 2.750000e-01, double 8.500000e-01, i32 15, i32 15)
%11 = tail call i32 (...) @glPopMatrix()
%12 = tail call i32 (...) @glPushMatrix()
%13 = tail call i32 @glTranslatef(double -7.500000e-01, double -5.000000e-01, double 0.000000e+00)
%14 = tail call i32 @glRotatef(double 2.700000e+02, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%15 = tail call i32 @glutSolidCone(double 1.000000e+00, double 2.000000e+00, i32 15, i32 15)
%16 = tail call i32 (...) @glPopMatrix()
%17 = tail call i32 (...) @glPushMatrix()
%18 = tail call i32 @glTranslatef(double 7.500000e-01, double 0.000000e+00, double -1.000000e+00)
%19 = tail call i32 @glutSolidSphere(double 1.000000e+00, i32 15, i32 15)
%20 = tail call i32 (...) @glPopMatrix()
%21 = tail call i32 (...) @glPopMatrix()
%22 = tail call i32 (...) @glFlush()
ret void
}