#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*/ glScalef(double, double, double);
int /*<<< orphan*/ glTranslatef(double, double, double);
int /*<<< orphan*/ glutSolidIcosahedron();
int /*<<< orphan*/ glutSolidTetrahedron();
int /*<<< orphan*/ glutSolidTorus(double, double, int, int);
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  glPushMatrix();
  glScalef(1.3, 1.3, 1.3);
  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, 10, 15);
  glPopMatrix();
  glPushMatrix();
  glTranslatef(-0.75, -0.5, 0.0);
  glRotatef(270.0, 1.0, 0.0, 0.0);
  glutSolidTetrahedron();
  glPopMatrix();
  glPushMatrix();
  glTranslatef(0.75, 0.0, -1.0);
  glutSolidIcosahedron();
  glPopMatrix();
  glPopMatrix();
  glFlush();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
mov    0x2e34(%rip),%rax
or     (%rax),%edi
call   1030 <glClear@plt>
mov    $0x0,%al
call   1080 <glPushMatrix@plt>
movsd  0xe8e(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1060 <glScalef@plt>
movsd  0xe73(%rip),%xmm0
movsd  0xe33(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   10b0 <glRotatef@plt>
mov    $0x0,%al
call   1080 <glPushMatrix@plt>
movsd  0xe21(%rip),%xmm0
movsd  0xe41(%rip),%xmm1
xorps  %xmm2,%xmm2
call   10a0 <glTranslatef@plt>
movsd  0xe29(%rip),%xmm0
movsd  0xdf9(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   10b0 <glRotatef@plt>
movsd  0xdfe(%rip),%xmm0
movsd  0xdfe(%rip),%xmm1
mov    $0xa,%edi
mov    $0xf,%esi
call   10c0 <glutSolidTorus@plt>
mov    $0x0,%al
call   1050 <glPopMatrix@plt>
mov    $0x0,%al
call   1080 <glPushMatrix@plt>
movsd  0xdc1(%rip),%xmm0
movsd  0xdc1(%rip),%xmm1
xorps  %xmm2,%xmm2
call   10a0 <glTranslatef@plt>
movsd  0xd99(%rip),%xmm0
movsd  0xd99(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   10b0 <glRotatef@plt>
mov    $0x0,%al
call   1040 <glutSolidTetrahedron@plt>
mov    $0x0,%al
call   1050 <glPopMatrix@plt>
mov    $0x0,%al
call   1080 <glPushMatrix@plt>
movsd  0xd59(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xd56(%rip),%xmm2
call   10a0 <glTranslatef@plt>
mov    $0x0,%al
call   1090 <glutSolidIcosahedron@plt>
mov    $0x0,%al
call   1050 <glPopMatrix@plt>
mov    $0x0,%al
call   1050 <glPopMatrix@plt>
mov    $0x0,%al
call   1070 <glFlush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2e30(%rip),%rax
mov    0x2e39(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1030 <glClear@plt>
xor    %eax,%eax
call   1080 <glPushMatrix@plt>
movsd  0xe39(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1060 <glScalef@plt>
movsd  0xe2e(%rip),%xmm0
movsd  0xe2e(%rip),%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   10b0 <glRotatef@plt>
xor    %eax,%eax
call   1080 <glPushMatrix@plt>
movsd  0xe1c(%rip),%xmm0
movsd  0xe1c(%rip),%xmm1
xorps  %xmm2,%xmm2
call   10a0 <glTranslatef@plt>
movsd  0xe14(%rip),%xmm0
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
movsd  0xdee(%rip),%xmm1
call   10b0 <glRotatef@plt>
movsd  0xe01(%rip),%xmm0
movsd  0xe01(%rip),%xmm1
mov    $0xa,%edi
mov    $0xf,%esi
call   10c0 <glutSolidTorus@plt>
xor    %eax,%eax
call   1050 <glPopMatrix@plt>
xor    %eax,%eax
call   1080 <glPushMatrix@plt>
movsd  0xde4(%rip),%xmm1
xorps  %xmm2,%xmm2
movsd  0xdb1(%rip),%xmm0
call   10a0 <glTranslatef@plt>
movsd  0xdd4(%rip),%xmm0
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
movsd  0xd8e(%rip),%xmm1
call   10b0 <glRotatef@plt>
xor    %eax,%eax
call   1040 <glutSolidTetrahedron@plt>
xor    %eax,%eax
call   1050 <glPopMatrix@plt>
xor    %eax,%eax
call   1080 <glPushMatrix@plt>
movsd  0xdac(%rip),%xmm0
movsd  0xdac(%rip),%xmm2
xorps  %xmm1,%xmm1
call   10a0 <glTranslatef@plt>
xor    %eax,%eax
call   1090 <glutSolidIcosahedron@plt>
xor    %eax,%eax
call   1050 <glPopMatrix@plt>
xor    %eax,%eax
call   1050 <glPopMatrix@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <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 @glScalef(double 1.300000e+00, double 1.300000e+00, double 1.300000e+00)
%7 = call i32 @glRotatef(double 2.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%8 = call i32 (...) @glPushMatrix()
%9 = call i32 @glTranslatef(double -7.500000e-01, double 5.000000e-01, double 0.000000e+00)
%10 = call i32 @glRotatef(double 9.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%11 = call i32 @glutSolidTorus(double 2.750000e-01, double 8.500000e-01, i32 10, i32 15)
%12 = call i32 (...) @glPopMatrix()
%13 = call i32 (...) @glPushMatrix()
%14 = call i32 @glTranslatef(double -7.500000e-01, double -5.000000e-01, double 0.000000e+00)
%15 = call i32 @glRotatef(double 2.700000e+02, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%16 = call i32 (...) @glutSolidTetrahedron()
%17 = call i32 (...) @glPopMatrix()
%18 = call i32 (...) @glPushMatrix()
%19 = call i32 @glTranslatef(double 7.500000e-01, double 0.000000e+00, double -1.000000e+00)
%20 = call i32 (...) @glutSolidIcosahedron()
%21 = call i32 (...) @glPopMatrix()
%22 = call i32 (...) @glPopMatrix()
%23 = 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 @glScalef(double 1.300000e+00, double 1.300000e+00, double 1.300000e+00)
%7 = tail call i32 @glRotatef(double 2.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%8 = tail call i32 (...) @glPushMatrix()
%9 = tail call i32 @glTranslatef(double -7.500000e-01, double 5.000000e-01, double 0.000000e+00)
%10 = tail call i32 @glRotatef(double 9.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%11 = tail call i32 @glutSolidTorus(double 2.750000e-01, double 8.500000e-01, i32 10, i32 15)
%12 = tail call i32 (...) @glPopMatrix()
%13 = tail call i32 (...) @glPushMatrix()
%14 = tail call i32 @glTranslatef(double -7.500000e-01, double -5.000000e-01, double 0.000000e+00)
%15 = tail call i32 @glRotatef(double 2.700000e+02, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%16 = tail call i32 (...) @glutSolidTetrahedron()
%17 = tail call i32 (...) @glPopMatrix()
%18 = tail call i32 (...) @glPushMatrix()
%19 = tail call i32 @glTranslatef(double 7.500000e-01, double 0.000000e+00, double -1.000000e+00)
%20 = tail call i32 (...) @glutSolidIcosahedron()
%21 = tail call i32 (...) @glPopMatrix()
%22 = tail call i32 (...) @glPopMatrix()
%23 = tail call i32 (...) @glFlush()
ret void
}