#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 int /*<<< orphan*/ GLvoid;
typedef int /*<<< orphan*/ GLfloat;
typedef int /*<<< orphan*/ GLUquadricObj;

/* Variables and functions */
int /*<<< orphan*/ GLU_FILL;
int /*<<< orphan*/ GLU_LINE;
int /*<<< orphan*/ GLU_SMOOTH;
int /*<<< orphan*/ GL_COMPILE;
int /*<<< orphan*/ glEndList();
int /*<<< orphan*/ glNewList(int, int /*<<< orphan*/);
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glRotatef(int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glTranslatef(int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/);
int /*<<< orphan*/ gluCylinder(int /*<<< orphan*/ *, double, double, double,
                               int, int);
int /*<<< orphan*/ *gluNewQuadric();
int /*<<< orphan*/ gluQuadricDrawStyle(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/);
int /*<<< orphan*/ gluQuadricNormals(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ gluSphere(int /*<<< orphan*/ *, double, int, int);
GLvoid createObjects() {
  GLUquadricObj *quadObj;
  glNewList(1, GL_COMPILE);
  quadObj = gluNewQuadric();
  gluQuadricDrawStyle(quadObj, GLU_LINE);
  gluSphere(quadObj, 1.5, 16, 16);
  glEndList();
  glNewList(3, GL_COMPILE);
  quadObj = gluNewQuadric();
  gluQuadricDrawStyle(quadObj, GLU_FILL);
  gluQuadricNormals(quadObj, GLU_SMOOTH);
  gluCylinder(quadObj, 0.3, 0.0, 0.6, 15, 10);
  glEndList();
  glNewList(2, GL_COMPILE);
  glPushMatrix();
  glRotatef((GLfloat)90.0, (GLfloat)1.0, (GLfloat)0.0, (GLfloat)0.0);
  glTranslatef((GLfloat)0.0, (GLfloat)0.0, (GLfloat)-1.0);
  quadObj = gluNewQuadric();
  gluQuadricDrawStyle(quadObj, GLU_FILL);
  gluQuadricNormals(quadObj, GLU_SMOOTH);
  gluCylinder(quadObj, 0.3, 0.3, 0.6, 12, 2);
  glPopMatrix();
  glEndList();
}


x86 assembly (clang, -O0):
<createObjects>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e09(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edi
call   1040 <glNewList@plt>
mov    $0x0,%al
call   1030 <gluNewQuadric@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e07(%rip),%rax
mov    (%rax),%esi
call   1070 <gluQuadricDrawStyle@plt>
mov    -0x10(%rbp),%rdi
movsd  0xe1c(%rip),%xmm0
mov    $0x10,%edx
mov    %edx,%esi
call   1050 <gluSphere@plt>
mov    $0x0,%al
call   10d0 <glEndList@plt>
mov    0x2dba(%rip),%rax
mov    (%rax),%esi
mov    $0x3,%edi
call   1040 <glNewList@plt>
mov    $0x0,%al
call   1030 <gluNewQuadric@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2da0(%rip),%rax
mov    (%rax),%esi
call   1070 <gluQuadricDrawStyle@plt>
mov    -0x10(%rbp),%rdi
mov    0x2d9e(%rip),%rax
mov    (%rax),%esi
call   10a0 <gluQuadricNormals@plt>
mov    -0x10(%rbp),%rdi
movsd  0xdab(%rip),%xmm0
xorps  %xmm1,%xmm1
movsd  0xda8(%rip),%xmm2
mov    $0xf,%esi
mov    $0xa,%edx
call   1090 <gluCylinder@plt>
mov    $0x0,%al
call   10d0 <glEndList@plt>
mov    0x2d4b(%rip),%rax
mov    (%rax),%esi
mov    $0x2,%edi
call   1040 <glNewList@plt>
mov    $0x0,%al
call   1080 <glPushMatrix@plt>
mov    $0x5a,%edi
mov    $0x1,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   10c0 <glRotatef@plt>
xor    %esi,%esi
mov    $0xffffffff,%edx
mov    %esi,%edi
call   10b0 <glTranslatef@plt>
mov    $0x0,%al
call   1030 <gluNewQuadric@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2d09(%rip),%rax
mov    (%rax),%esi
call   1070 <gluQuadricDrawStyle@plt>
mov    -0x10(%rbp),%rdi
mov    0x2d07(%rip),%rax
mov    (%rax),%esi
call   10a0 <gluQuadricNormals@plt>
mov    -0x10(%rbp),%rdi
movsd  0xd14(%rip),%xmm1
movsd  0xd14(%rip),%xmm2
mov    $0xc,%esi
mov    $0x2,%edx
movaps %xmm1,%xmm0
call   1090 <gluCylinder@plt>
mov    $0x0,%al
call   1060 <glPopMatrix@plt>
mov    $0x0,%al
call   10d0 <glEndList@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createObjects>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    0x2e09(%rip),%r14
mov    (%r14),%esi
mov    $0x1,%edi
call   1040 <glNewList@plt>
xor    %eax,%eax
call   1030 <gluNewQuadric@plt>
mov    %rax,%rbx
mov    0x2e0b(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1070 <gluQuadricDrawStyle@plt>
movsd  0xe11(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x10,%esi
mov    $0x10,%edx
call   1050 <gluSphere@plt>
xor    %eax,%eax
call   10d0 <glEndList@plt>
mov    (%r14),%esi
mov    $0x3,%edi
call   1040 <glNewList@plt>
xor    %eax,%eax
call   1030 <gluNewQuadric@plt>
mov    %rax,%rbx
mov    0x2daa(%rip),%r15
mov    (%r15),%esi
mov    %rax,%rdi
call   1070 <gluQuadricDrawStyle@plt>
mov    0x2da8(%rip),%r12
mov    (%r12),%esi
mov    %rbx,%rdi
call   10a0 <gluQuadricNormals@plt>
movsd  0xdbc(%rip),%xmm0
movsd  0xdbc(%rip),%xmm2
xorps  %xmm1,%xmm1
mov    %rbx,%rdi
mov    $0xf,%esi
mov    $0xa,%edx
call   1090 <gluCylinder@plt>
xor    %eax,%eax
call   10d0 <glEndList@plt>
mov    (%r14),%esi
mov    $0x2,%edi
call   1040 <glNewList@plt>
xor    %eax,%eax
call   1080 <glPushMatrix@plt>
mov    $0x5a,%edi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   10c0 <glRotatef@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0xffffffff,%edx
call   10b0 <glTranslatef@plt>
xor    %eax,%eax
call   1030 <gluNewQuadric@plt>
mov    %rax,%rbx
mov    (%r15),%esi
mov    %rax,%rdi
call   1070 <gluQuadricDrawStyle@plt>
mov    (%r12),%esi
mov    %rbx,%rdi
call   10a0 <gluQuadricNormals@plt>
mov    %rbx,%rdi
movsd  0xd37(%rip),%xmm0
movaps %xmm0,%xmm1
movsd  0xd34(%rip),%xmm2
mov    $0xc,%esi
mov    $0x2,%edx
call   1090 <gluCylinder@plt>
xor    %eax,%eax
call   1060 <glPopMatrix@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    10d0 <glEndList@plt>

LLVM IR (-O0):
@GL_COMPILE = global i32 0
@GLU_LINE = global i32 0
@GLU_FILL = global i32 0
@GLU_SMOOTH = global i32 0
define i32 @createObjects() {
%1 = alloca i32
%2 = alloca i32*
%3 = load i32, i32* @GL_COMPILE
%4 = call i32 @glNewList(i32 1, i32 %3)
%5 = call i32* (...) @gluNewQuadric()
store i32* %5, i32** %2
%6 = load i32*, i32** %2
%7 = load i32, i32* @GLU_LINE
%8 = call i32 @gluQuadricDrawStyle(i32* %6, i32 %7)
%9 = load i32*, i32** %2
%10 = call i32 @gluSphere(i32* %9, double 1.500000e+00, i32 16, i32 16)
%11 = call i32 (...) @glEndList()
%12 = load i32, i32* @GL_COMPILE
%13 = call i32 @glNewList(i32 3, i32 %12)
%14 = call i32* (...) @gluNewQuadric()
store i32* %14, i32** %2
%15 = load i32*, i32** %2
%16 = load i32, i32* @GLU_FILL
%17 = call i32 @gluQuadricDrawStyle(i32* %15, i32 %16)
%18 = load i32*, i32** %2
%19 = load i32, i32* @GLU_SMOOTH
%20 = call i32 @gluQuadricNormals(i32* %18, i32 %19)
%21 = load i32*, i32** %2
%22 = call i32 @gluCylinder(i32* %21, double 3.000000e-01, double 0.000000e+00, double 6.000000e-01, i32 15, i32 10)
%23 = call i32 (...) @glEndList()
%24 = load i32, i32* @GL_COMPILE
%25 = call i32 @glNewList(i32 2, i32 %24)
%26 = call i32 (...) @glPushMatrix()
%27 = call i32 @glRotatef(i32 90, i32 1, i32 0, i32 0)
%28 = call i32 @glTranslatef(i32 0, i32 0, i32 -1)
%29 = call i32* (...) @gluNewQuadric()
store i32* %29, i32** %2
%30 = load i32*, i32** %2
%31 = load i32, i32* @GLU_FILL
%32 = call i32 @gluQuadricDrawStyle(i32* %30, i32 %31)
%33 = load i32*, i32** %2
%34 = load i32, i32* @GLU_SMOOTH
%35 = call i32 @gluQuadricNormals(i32* %33, i32 %34)
%36 = load i32*, i32** %2
%37 = call i32 @gluCylinder(i32* %36, double 3.000000e-01, double 3.000000e-01, double 6.000000e-01, i32 12, i32 2)
%38 = call i32 (...) @glPopMatrix()
%39 = call i32 (...) @glEndList()
%40 = load i32, i32* %1
ret i32 %40
}

LLVM IR (-O2):
@GL_COMPILE = global i32 0
@GLU_LINE = global i32 0
@GLU_FILL = global i32 0
@GLU_SMOOTH = global i32 0
define i32 @createObjects() {
%1 = load i32, i32* @GL_COMPILE
%2 = tail call i32 @glNewList(i32 1, i32 %1)
%3 = tail call i32* (...) @gluNewQuadric()
%4 = load i32, i32* @GLU_LINE
%5 = tail call i32 @gluQuadricDrawStyle(i32* %3, i32 %4)
%6 = tail call i32 @gluSphere(i32* %3, double 1.500000e+00, i32 16, i32 16)
%7 = tail call i32 (...) @glEndList()
%8 = load i32, i32* @GL_COMPILE
%9 = tail call i32 @glNewList(i32 3, i32 %8)
%10 = tail call i32* (...) @gluNewQuadric()
%11 = load i32, i32* @GLU_FILL
%12 = tail call i32 @gluQuadricDrawStyle(i32* %10, i32 %11)
%13 = load i32, i32* @GLU_SMOOTH
%14 = tail call i32 @gluQuadricNormals(i32* %10, i32 %13)
%15 = tail call i32 @gluCylinder(i32* %10, double 3.000000e-01, double 0.000000e+00, double 6.000000e-01, i32 15, i32 10)
%16 = tail call i32 (...) @glEndList()
%17 = load i32, i32* @GL_COMPILE
%18 = tail call i32 @glNewList(i32 2, i32 %17)
%19 = tail call i32 (...) @glPushMatrix()
%20 = tail call i32 @glRotatef(i32 90, i32 1, i32 0, i32 0)
%21 = tail call i32 @glTranslatef(i32 0, i32 0, i32 -1)
%22 = tail call i32* (...) @gluNewQuadric()
%23 = load i32, i32* @GLU_FILL
%24 = tail call i32 @gluQuadricDrawStyle(i32* %22, i32 %23)
%25 = load i32, i32* @GLU_SMOOTH
%26 = tail call i32 @gluQuadricNormals(i32* %22, i32 %25)
%27 = tail call i32 @gluCylinder(i32* %22, double 3.000000e-01, double 3.000000e-01, double 6.000000e-01, i32 12, i32 2)
%28 = tail call i32 (...) @glPopMatrix()
%29 = tail call i32 (...) @glEndList()
ret i32 undef
}