#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_DIFFUSE;
int /*<<< orphan*/ GL_FRONT;
int /*<<< orphan*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/,
                                double *);
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glRotatef(double, double, double, double);
int /*<<< orphan*/ glTranslatef(double, double, double);
int /*<<< orphan*/ glutSolidCube(double);
int /*<<< orphan*/ glutSolidOctahedron();
int /*<<< orphan*/ glutSolidSphere(double, int, int);
int /*<<< orphan*/ glutSolidTorus(double, double, int, int);
void displayObjects(void) {
  GLfloat torus_diffuse[] = {0.7, 0.7, 0.0, 1.0};
  GLfloat cube_diffuse[] = {0.0, 0.7, 0.7, 1.0};
  GLfloat sphere_diffuse[] = {0.7, 0.0, 0.7, 1.0};
  GLfloat octa_diffuse[] = {0.7, 0.4, 0.4, 1.0};
  glPushMatrix();
  glTranslatef(0.0, 0.0, -5.0);
  glRotatef(30.0, 1.0, 0.0, 0.0);
  glPushMatrix();
  glTranslatef(-0.80, 0.35, 0.0);
  glRotatef(100.0, 1.0, 0.0, 0.0);
  glMaterialfv(GL_FRONT, GL_DIFFUSE, torus_diffuse);
  glutSolidTorus(0.275, 0.85, 16, 16);
  glPopMatrix();
  glPushMatrix();
  glTranslatef(-0.75, -0.50, 0.0);
  glRotatef(45.0, 0.0, 0.0, 1.0);
  glRotatef(45.0, 1.0, 0.0, 0.0);
  glMaterialfv(GL_FRONT, GL_DIFFUSE, cube_diffuse);
  glutSolidCube(1.5);
  glPopMatrix();
  glPushMatrix();
  glTranslatef(0.75, 0.60, 0.0);
  glRotatef(30.0, 1.0, 0.0, 0.0);
  glMaterialfv(GL_FRONT, GL_DIFFUSE, sphere_diffuse);
  glutSolidSphere(1.0, 16, 16);
  glPopMatrix();
  glPushMatrix();
  glTranslatef(0.70, -0.90, 0.25);
  glMaterialfv(GL_FRONT, GL_DIFFUSE, octa_diffuse);
  glutSolidOctahedron();
  glPopMatrix();
  glPopMatrix();
}


x86 assembly (clang, -O0):
<displayObjects>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0xeee(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeeb(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xee8(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xee5(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xee2(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xedf(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xedc(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed9(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed6(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xecd(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
xorps  %xmm1,%xmm1
movsd  0xe23(%rip),%xmm2
movaps %xmm1,%xmm0
call   1080 <glTranslatef@plt>
movsd  0xdb3(%rip),%xmm0
movsd  0xda3(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   10a0 <glRotatef@plt>
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
movsd  0xde1(%rip),%xmm0
movsd  0xde1(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1080 <glTranslatef@plt>
movsd  0xdc1(%rip),%xmm0
movsd  0xd69(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   10a0 <glRotatef@plt>
mov    0x2d27(%rip),%rax
mov    (%rax),%edi
mov    0x2d0e(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1090 <glMaterialfv@plt>
movsd  0xd7b(%rip),%xmm0
movsd  0xd7b(%rip),%xmm1
mov    $0x10,%esi
mov    %esi,%edi
call   10b0 <glutSolidTorus@plt>
mov    $0x0,%al
call   1050 <glPopMatrix@plt>
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
movsd  0xd41(%rip),%xmm0
movsd  0xd41(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1080 <glTranslatef@plt>
movsd  0xd21(%rip),%xmm0
xorps  %xmm2,%xmm2
movsd  0xcee(%rip),%xmm3
movaps %xmm2,%xmm1
call   10a0 <glRotatef@plt>
movsd  0xd06(%rip),%xmm0
movsd  0xcd6(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   10a0 <glRotatef@plt>
mov    0x2c94(%rip),%rax
mov    (%rax),%edi
mov    0x2c7b(%rip),%rax
mov    (%rax),%esi
lea    -0x40(%rbp),%rdx
call   1090 <glMaterialfv@plt>
movsd  0xcc8(%rip),%xmm0
call   1030 <glutSolidCube@plt>
mov    $0x0,%al
call   1050 <glPopMatrix@plt>
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
movsd  0xc9d(%rip),%xmm0
movsd  0xc9d(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1080 <glTranslatef@plt>
movsd  0xc7d(%rip),%xmm0
movsd  0xc6d(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   10a0 <glRotatef@plt>
mov    0x2c2b(%rip),%rax
mov    (%rax),%edi
mov    0x2c12(%rip),%rax
mov    (%rax),%esi
lea    -0x60(%rbp),%rdx
call   1090 <glMaterialfv@plt>
movsd  0xc3f(%rip),%xmm0
mov    $0x10,%esi
mov    %esi,%edi
call   1070 <glutSolidSphere@plt>
mov    $0x0,%al
call   1050 <glPopMatrix@plt>
mov    $0x0,%al
call   1060 <glPushMatrix@plt>
movsd  0xc05(%rip),%xmm0
movsd  0xc05(%rip),%xmm1
movsd  0xc05(%rip),%xmm2
call   1080 <glTranslatef@plt>
mov    0x2bd1(%rip),%rax
mov    (%rax),%edi
mov    0x2bb8(%rip),%rax
mov    (%rax),%esi
lea    -0x80(%rbp),%rdx
call   1090 <glMaterialfv@plt>
mov    $0x0,%al
call   1040 <glutSolidOctahedron@plt>
mov    $0x0,%al
call   1050 <glPopMatrix@plt>
mov    $0x0,%al
call   1050 <glPopMatrix@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayObjects>:
push   %r14
push   %rbx
sub    $0x88,%rsp
movaps 0xeff(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xee3(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xf07(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xeeb(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xf0f(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xef3(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xf17(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xefb(%rip),%xmm0
movaps %xmm0,(%rsp)
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
movsd  0xdf8(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1080 <glTranslatef@plt>
movsd  0xded(%rip),%xmm0
movsd  0xded(%rip),%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   10a0 <glRotatef@plt>
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
movsd  0xddb(%rip),%xmm0
movsd  0xddb(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1080 <glTranslatef@plt>
movsd  0xdd3(%rip),%xmm0
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
movsd  0xdad(%rip),%xmm1
call   10a0 <glRotatef@plt>
mov    0x2d79(%rip),%r14
mov    (%r14),%edi
mov    0x2d5f(%rip),%rbx
mov    (%rbx),%esi
lea    0x60(%rsp),%rdx
call   1090 <glMaterialfv@plt>
movsd  0xda3(%rip),%xmm0
movsd  0xda3(%rip),%xmm1
mov    $0x10,%edi
mov    $0x10,%esi
call   10b0 <glutSolidTorus@plt>
xor    %eax,%eax
call   1050 <glPopMatrix@plt>
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
movsd  0xd86(%rip),%xmm0
movsd  0xd86(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1080 <glTranslatef@plt>
movsd  0xd7e(%rip),%xmm0
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
movsd  0xd30(%rip),%xmm3
call   10a0 <glRotatef@plt>
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
movsd  0xd5d(%rip),%xmm0
movsd  0xd15(%rip),%xmm1
call   10a0 <glRotatef@plt>
mov    (%r14),%edi
mov    (%rbx),%esi
lea    0x40(%rsp),%rdx
call   1090 <glMaterialfv@plt>
movsd  0xd41(%rip),%xmm0
call   1030 <glutSolidCube@plt>
xor    %eax,%eax
call   1050 <glPopMatrix@plt>
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
movsd  0xd2e(%rip),%xmm0
movsd  0xd2e(%rip),%xmm1
xorps  %xmm2,%xmm2
call   1080 <glTranslatef@plt>
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
movsd  0xcb8(%rip),%xmm0
movsd  0xcb8(%rip),%xmm1
call   10a0 <glRotatef@plt>
mov    (%r14),%edi
mov    (%rbx),%esi
lea    0x20(%rsp),%rdx
call   1090 <glMaterialfv@plt>
movsd  0xc9c(%rip),%xmm0
mov    $0x10,%edi
mov    $0x10,%esi
call   1070 <glutSolidSphere@plt>
xor    %eax,%eax
call   1050 <glPopMatrix@plt>
xor    %eax,%eax
call   1060 <glPushMatrix@plt>
movsd  0xcd7(%rip),%xmm0
movsd  0xcd7(%rip),%xmm1
movsd  0xcd7(%rip),%xmm2
call   1080 <glTranslatef@plt>
mov    (%r14),%edi
mov    (%rbx),%esi
mov    %rsp,%rdx
call   1090 <glMaterialfv@plt>
xor    %eax,%eax
call   1040 <glutSolidOctahedron@plt>
xor    %eax,%eax
call   1050 <glPopMatrix@plt>
xor    %eax,%eax
call   1050 <glPopMatrix@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.displayObjects.torus_diffuse = [4 x double] [double 0x3FE6666666666666, double 0x3FE6666666666666, double 0.000000e+00, double 1.000000e+00]
@__const.displayObjects.cube_diffuse = [4 x double] [double 0.000000e+00, double 0x3FE6666666666666, double 0x3FE6666666666666, double 1.000000e+00]
@__const.displayObjects.sphere_diffuse = [4 x double] [double 0x3FE6666666666666, double 0.000000e+00, double 0x3FE6666666666666, double 1.000000e+00]
@__const.displayObjects.octa_diffuse = [4 x double] [double 0x3FE6666666666666, double 4.000000e-01, double 4.000000e-01, double 1.000000e+00]
@GL_FRONT = global i32 0
@GL_DIFFUSE = global i32 0
define void @displayObjects() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = alloca [4 x double]
%5 = bitcast [4 x double]* %1 to i8*
%6 = bitcast [4 x double]* %2 to i8*
%7 = bitcast [4 x double]* %3 to i8*
%8 = bitcast [4 x double]* %4 to i8*
%9 = call i32 (...) @glPushMatrix()
%10 = call i32 @glTranslatef(double 0.000000e+00, double 0.000000e+00, double -5.000000e+00)
%11 = call i32 @glRotatef(double 3.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%12 = call i32 (...) @glPushMatrix()
%13 = call i32 @glTranslatef(double -8.000000e-01, double 3.500000e-01, double 0.000000e+00)
%14 = call i32 @glRotatef(double 1.000000e+02, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%15 = load i32, i32* @GL_FRONT
%16 = load i32, i32* @GL_DIFFUSE
%17 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%18 = call i32 @glMaterialfv(i32 %15, i32 %16, double* %17)
%19 = call i32 @glutSolidTorus(double 2.750000e-01, double 8.500000e-01, i32 16, i32 16)
%20 = call i32 (...) @glPopMatrix()
%21 = call i32 (...) @glPushMatrix()
%22 = call i32 @glTranslatef(double -7.500000e-01, double -5.000000e-01, double 0.000000e+00)
%23 = call i32 @glRotatef(double 4.500000e+01, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%24 = call i32 @glRotatef(double 4.500000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%25 = load i32, i32* @GL_FRONT
%26 = load i32, i32* @GL_DIFFUSE
%27 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%28 = call i32 @glMaterialfv(i32 %25, i32 %26, double* %27)
%29 = call i32 @glutSolidCube(double 1.500000e+00)
%30 = call i32 (...) @glPopMatrix()
%31 = call i32 (...) @glPushMatrix()
%32 = call i32 @glTranslatef(double 7.500000e-01, double 6.000000e-01, double 0.000000e+00)
%33 = call i32 @glRotatef(double 3.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%34 = load i32, i32* @GL_FRONT
%35 = load i32, i32* @GL_DIFFUSE
%36 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%37 = call i32 @glMaterialfv(i32 %34, i32 %35, double* %36)
%38 = call i32 @glutSolidSphere(double 1.000000e+00, i32 16, i32 16)
%39 = call i32 (...) @glPopMatrix()
%40 = call i32 (...) @glPushMatrix()
%41 = call i32 @glTranslatef(double 0x3FE6666666666666, double -9.000000e-01, double 2.500000e-01)
%42 = load i32, i32* @GL_FRONT
%43 = load i32, i32* @GL_DIFFUSE
%44 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%45 = call i32 @glMaterialfv(i32 %42, i32 %43, double* %44)
%46 = call i32 (...) @glutSolidOctahedron()
%47 = call i32 (...) @glPopMatrix()
%48 = call i32 (...) @glPopMatrix()
ret void
}

LLVM IR (-O2):
@__const.displayObjects.torus_diffuse = [4 x double] [double 0x3FE6666666666666, double 0x3FE6666666666666, double 0.000000e+00, double 1.000000e+00]
@__const.displayObjects.cube_diffuse = [4 x double] [double 0.000000e+00, double 0x3FE6666666666666, double 0x3FE6666666666666, double 1.000000e+00]
@__const.displayObjects.sphere_diffuse = [4 x double] [double 0x3FE6666666666666, double 0.000000e+00, double 0x3FE6666666666666, double 1.000000e+00]
@__const.displayObjects.octa_diffuse = [4 x double] [double 0x3FE6666666666666, double 4.000000e-01, double 4.000000e-01, double 1.000000e+00]
@GL_FRONT = global i32 0
@GL_DIFFUSE = global i32 0
define void @displayObjects() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = alloca [4 x double]
%5 = bitcast [4 x double]* %1 to i8*
%6 = bitcast [4 x double]* %2 to i8*
%7 = bitcast [4 x double]* %3 to i8*
%8 = bitcast [4 x double]* %4 to i8*
%9 = tail call i32 (...) @glPushMatrix()
%10 = tail call i32 @glTranslatef(double 0.000000e+00, double 0.000000e+00, double -5.000000e+00)
%11 = tail call i32 @glRotatef(double 3.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%12 = tail call i32 (...) @glPushMatrix()
%13 = tail call i32 @glTranslatef(double -8.000000e-01, double 3.500000e-01, double 0.000000e+00)
%14 = tail call i32 @glRotatef(double 1.000000e+02, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%15 = load i32, i32* @GL_FRONT
%16 = load i32, i32* @GL_DIFFUSE
%17 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%18 = call i32 @glMaterialfv(i32 %15, i32 %16, double* %17)
%19 = call i32 @glutSolidTorus(double 2.750000e-01, double 8.500000e-01, i32 16, i32 16)
%20 = call i32 (...) @glPopMatrix()
%21 = call i32 (...) @glPushMatrix()
%22 = call i32 @glTranslatef(double -7.500000e-01, double -5.000000e-01, double 0.000000e+00)
%23 = call i32 @glRotatef(double 4.500000e+01, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%24 = call i32 @glRotatef(double 4.500000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%25 = load i32, i32* @GL_FRONT
%26 = load i32, i32* @GL_DIFFUSE
%27 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%28 = call i32 @glMaterialfv(i32 %25, i32 %26, double* %27)
%29 = call i32 @glutSolidCube(double 1.500000e+00)
%30 = call i32 (...) @glPopMatrix()
%31 = call i32 (...) @glPushMatrix()
%32 = call i32 @glTranslatef(double 7.500000e-01, double 6.000000e-01, double 0.000000e+00)
%33 = call i32 @glRotatef(double 3.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%34 = load i32, i32* @GL_FRONT
%35 = load i32, i32* @GL_DIFFUSE
%36 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%37 = call i32 @glMaterialfv(i32 %34, i32 %35, double* %36)
%38 = call i32 @glutSolidSphere(double 1.000000e+00, i32 16, i32 16)
%39 = call i32 (...) @glPopMatrix()
%40 = call i32 (...) @glPushMatrix()
%41 = call i32 @glTranslatef(double 0x3FE6666666666666, double -9.000000e-01, double 2.500000e-01)
%42 = load i32, i32* @GL_FRONT
%43 = load i32, i32* @GL_DIFFUSE
%44 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%45 = call i32 @glMaterialfv(i32 %42, i32 %43, double* %44)
%46 = call i32 (...) @glutSolidOctahedron()
%47 = call i32 (...) @glPopMatrix()
%48 = call i32 (...) @glPopMatrix()
ret void
}