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

/* Variables and functions */
int /*<<< orphan*/ GLU_FILL;
int /*<<< orphan*/ GLU_SMOOTH;
int /*<<< orphan*/ GL_DIFFUSE;
int /*<<< orphan*/ GL_FRONT;
int /*<<< orphan*/ GL_SHININESS;
int /*<<< orphan*/ GL_SPECULAR;
int /*<<< orphan*/ glMaterialf(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/,
                                double *);
int /*<<< orphan*/ glRotated(int, double, int, double);
int /*<<< orphan*/ glTranslated(double, double, double);
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*/ glutSolidCone(double, double, int, int);
void myDrawLamp1(void) {
  GLUquadricObj *qobj;
  GLfloat diffCarpetRed[] = {0.98, 0.0, 1.0, 1.0};
  GLfloat diffLightBlue[] = {0.28, 0.81, 0.99, 1.0};
  GLfloat Metalspec[] = {1.0, 1.0, 1.0, 1.0};
  GLfloat diffl[] = {1.0, 1.0, 1.0, 1.0};
  GLfloat mat_emission[] = {0.3f, 0.2f, 0.2f, 0.0f};
  qobj = gluNewQuadric();
  gluQuadricDrawStyle(qobj, GLU_FILL);
  gluQuadricNormals(qobj, GLU_SMOOTH);
  glRotated(90.0, 1.0, 0.0, 0.0);
  glMaterialfv(GL_FRONT, GL_DIFFUSE, diffCarpetRed);
  glTranslated(0.0, 0.0, -3.8);
  gluCylinder(qobj, 1.45, 3.00, 4.5, 30, 30);
  glMaterialf(GL_FRONT, GL_SHININESS, 7);
  glMaterialfv(GL_FRONT, GL_SPECULAR, Metalspec);
  glMaterialfv(GL_FRONT, GL_DIFFUSE, diffLightBlue);
  gluCylinder(qobj, 0.5, 0.5, 15.5, 30, 30);
  glTranslated(0.0, 0.0, 15.5);
  glRotated(180, 0, 1, 0);
  glutSolidCone(3.45, 1.2, 33, 22);
}


x86 assembly (clang, -O0):
<myDrawLamp1>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    0xeae(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeab(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xea8(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xea5(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xea2(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xe9f(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xe9c(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe99(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe96(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xe93(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xe90(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe8d(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xe6a(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xe64(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0xe5e(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xe5b(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xe58(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0xe52(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    0xe4c(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xe46(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    $0x0,%al
call   1050 <gluNewQuadric@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2d21(%rip),%rax
mov    (%rax),%esi
call   1060 <gluQuadricDrawStyle@plt>
mov    -0x8(%rbp),%rdi
mov    0x2d1f(%rip),%rax
mov    (%rax),%esi
call   1080 <gluQuadricNormals@plt>
mov    $0x5a,%edi
movsd  0xd7b(%rip),%xmm0
xor    %esi,%esi
xorps  %xmm1,%xmm1
call   10b0 <glRotated@plt>
mov    0x2d02(%rip),%rax
mov    (%rax),%edi
mov    0x2cd9(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   10a0 <glMaterialfv@plt>
xorps  %xmm1,%xmm1
movsd  0xd43(%rip),%xmm2
movaps %xmm1,%xmm0
call   1090 <glTranslated@plt>
mov    -0x8(%rbp),%rdi
movsd  0xd17(%rip),%xmm0
movsd  0xd17(%rip),%xmm1
movsd  0xd17(%rip),%xmm2
mov    $0x1e,%edx
mov    %edx,%esi
call   1070 <gluCylinder@plt>
mov    0x2cac(%rip),%rax
mov    (%rax),%edi
mov    0x2cbb(%rip),%rax
mov    (%rax),%esi
mov    $0x7,%edx
call   1040 <glMaterialf@plt>
mov    0x2c90(%rip),%rax
mov    (%rax),%edi
mov    0x2c97(%rip),%rax
mov    (%rax),%esi
lea    -0x70(%rbp),%rdx
call   10a0 <glMaterialfv@plt>
mov    0x2c75(%rip),%rax
mov    (%rax),%edi
mov    0x2c4c(%rip),%rax
mov    (%rax),%esi
lea    -0x50(%rbp),%rdx
call   10a0 <glMaterialfv@plt>
mov    -0x8(%rbp),%rdi
movsd  0xc95(%rip),%xmm1
movsd  0xc85(%rip),%xmm2
mov    $0x1e,%edx
movaps %xmm1,%xmm0
mov    %edx,%esi
call   1070 <gluCylinder@plt>
xorps  %xmm1,%xmm1
movsd  0xc6b(%rip),%xmm2
movaps %xmm1,%xmm0
call   1090 <glTranslated@plt>
mov    $0xb4,%edi
xorps  %xmm1,%xmm1
mov    $0x1,%esi
movaps %xmm1,%xmm0
call   10b0 <glRotated@plt>
movsd  0xc36(%rip),%xmm0
movsd  0xc36(%rip),%xmm1
mov    $0x21,%edi
mov    $0x16,%esi
call   1030 <glutSolidCone@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myDrawLamp1>:
push   %r15
push   %r14
push   %rbx
sub    $0x60,%rsp
movaps 0xec0(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xea4(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xeac(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed0(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeb4(%rip),%xmm0
movaps %xmm0,(%rsp)
xor    %eax,%eax
call   1050 <gluNewQuadric@plt>
mov    %rax,%rbx
mov    0x2dcf(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1060 <gluQuadricDrawStyle@plt>
mov    0x2dce(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1080 <gluQuadricNormals@plt>
movsd  0xdec(%rip),%xmm0
xorps  %xmm1,%xmm1
mov    $0x5a,%edi
xor    %esi,%esi
call   10b0 <glRotated@plt>
mov    0x2dae(%rip),%r14
mov    (%r14),%edi
mov    0x2d84(%rip),%r15
mov    (%r15),%esi
lea    0x40(%rsp),%rdx
call   10a0 <glMaterialfv@plt>
movsd  0xdbf(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1090 <glTranslated@plt>
movsd  0xdb4(%rip),%xmm0
movsd  0xdb4(%rip),%xmm1
movsd  0xdb4(%rip),%xmm2
mov    %rbx,%rdi
mov    $0x1e,%esi
mov    $0x1e,%edx
call   1070 <gluCylinder@plt>
mov    (%r14),%edi
mov    0x2d68(%rip),%rax
mov    (%rax),%esi
mov    $0x7,%edx
call   1040 <glMaterialf@plt>
mov    (%r14),%edi
mov    0x2d4a(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   10a0 <glMaterialfv@plt>
mov    (%r14),%edi
mov    (%r15),%esi
lea    0x20(%rsp),%rdx
call   10a0 <glMaterialfv@plt>
movsd  0xd68(%rip),%xmm0
movsd  0xd68(%rip),%xmm2
mov    %rbx,%rdi
movaps %xmm0,%xmm1
mov    $0x1e,%esi
mov    $0x1e,%edx
call   1070 <gluCylinder@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
movsd  0xd45(%rip),%xmm2
call   1090 <glTranslated@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
mov    $0xb4,%edi
mov    $0x1,%esi
call   10b0 <glRotated@plt>
movsd  0xd2b(%rip),%xmm0
movsd  0xd2b(%rip),%xmm1
mov    $0x21,%edi
mov    $0x16,%esi
call   1030 <glutSolidCone@plt>
add    $0x60,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.myDrawLamp1.diffCarpetRed = [4 x double] [double 0x3FEF5C28F5C28F5C, double 0.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.myDrawLamp1.diffLightBlue = [4 x double] [double 2.800000e-01, double 8.100000e-01, double 0x3FEFAE147AE147AE, double 1.000000e+00]
@__const.myDrawLamp1.Metalspec = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.myDrawLamp1.diffl = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.myDrawLamp1.mat_emission = [4 x double] [double 0x3FD3333340000000, double 0x3FC99999A0000000, double 0x3FC99999A0000000, double 0.000000e+00]
@GLU_FILL = global i32 0
@GLU_SMOOTH = global i32 0
@GL_FRONT = global i32 0
@GL_DIFFUSE = global i32 0
@GL_SHININESS = global i32 0
@GL_SPECULAR = global i32 0
define void @myDrawLamp1() {
%1 = alloca i32*
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = alloca [4 x double]
%5 = alloca [4 x double]
%6 = alloca [4 x double]
%7 = bitcast [4 x double]* %2 to i8*
%8 = bitcast [4 x double]* %3 to i8*
%9 = bitcast [4 x double]* %4 to i8*
%10 = bitcast [4 x double]* %5 to i8*
%11 = bitcast [4 x double]* %6 to i8*
%12 = call i32* (...) @gluNewQuadric()
store i32* %12, i32** %1
%13 = load i32*, i32** %1
%14 = load i32, i32* @GLU_FILL
%15 = call i32 @gluQuadricDrawStyle(i32* %13, i32 %14)
%16 = load i32*, i32** %1
%17 = load i32, i32* @GLU_SMOOTH
%18 = call i32 @gluQuadricNormals(i32* %16, i32 %17)
%19 = call i32 @glRotated(i32 90, double 1.000000e+00, i32 0, double 0.000000e+00)
%20 = load i32, i32* @GL_FRONT
%21 = load i32, i32* @GL_DIFFUSE
%22 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%23 = call i32 @glMaterialfv(i32 %20, i32 %21, double* %22)
%24 = call i32 @glTranslated(double 0.000000e+00, double 0.000000e+00, double -3.800000e+00)
%25 = load i32*, i32** %1
%26 = call i32 @gluCylinder(i32* %25, double 1.450000e+00, double 3.000000e+00, double 4.500000e+00, i32 30, i32 30)
%27 = load i32, i32* @GL_FRONT
%28 = load i32, i32* @GL_SHININESS
%29 = call i32 @glMaterialf(i32 %27, i32 %28, i32 7)
%30 = load i32, i32* @GL_FRONT
%31 = load i32, i32* @GL_SPECULAR
%32 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%33 = call i32 @glMaterialfv(i32 %30, i32 %31, double* %32)
%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 = load i32*, i32** %1
%39 = call i32 @gluCylinder(i32* %38, double 5.000000e-01, double 5.000000e-01, double 1.550000e+01, i32 30, i32 30)
%40 = call i32 @glTranslated(double 0.000000e+00, double 0.000000e+00, double 1.550000e+01)
%41 = call i32 @glRotated(i32 180, double 0.000000e+00, i32 1, double 0.000000e+00)
%42 = call i32 @glutSolidCone(double 3.450000e+00, double 1.200000e+00, i32 33, i32 22)
ret void
}

LLVM IR (-O2):
@__const.myDrawLamp1.diffCarpetRed = [4 x double] [double 0x3FEF5C28F5C28F5C, double 0.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.myDrawLamp1.diffLightBlue = [4 x double] [double 2.800000e-01, double 8.100000e-01, double 0x3FEFAE147AE147AE, double 1.000000e+00]
@__const.myDrawLamp1.Metalspec = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@GLU_FILL = global i32 0
@GLU_SMOOTH = global i32 0
@GL_FRONT = global i32 0
@GL_DIFFUSE = global i32 0
@GL_SHININESS = global i32 0
@GL_SPECULAR = global i32 0
define void @myDrawLamp1() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = bitcast [4 x double]* %1 to i8*
%5 = bitcast [4 x double]* %2 to i8*
%6 = bitcast [4 x double]* %3 to i8*
%7 = tail call i32* (...) @gluNewQuadric()
%8 = load i32, i32* @GLU_FILL
%9 = tail call i32 @gluQuadricDrawStyle(i32* %7, i32 %8)
%10 = load i32, i32* @GLU_SMOOTH
%11 = tail call i32 @gluQuadricNormals(i32* %7, i32 %10)
%12 = tail call i32 @glRotated(i32 90, double 1.000000e+00, i32 0, double 0.000000e+00)
%13 = load i32, i32* @GL_FRONT
%14 = load i32, i32* @GL_DIFFUSE
%15 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%16 = call i32 @glMaterialfv(i32 %13, i32 %14, double* %15)
%17 = call i32 @glTranslated(double 0.000000e+00, double 0.000000e+00, double -3.800000e+00)
%18 = call i32 @gluCylinder(i32* %7, double 1.450000e+00, double 3.000000e+00, double 4.500000e+00, i32 30, i32 30)
%19 = load i32, i32* @GL_FRONT
%20 = load i32, i32* @GL_SHININESS
%21 = call i32 @glMaterialf(i32 %19, i32 %20, i32 7)
%22 = load i32, i32* @GL_FRONT
%23 = load i32, i32* @GL_SPECULAR
%24 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%25 = call i32 @glMaterialfv(i32 %22, i32 %23, double* %24)
%26 = load i32, i32* @GL_FRONT
%27 = load i32, i32* @GL_DIFFUSE
%28 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%29 = call i32 @glMaterialfv(i32 %26, i32 %27, double* %28)
%30 = call i32 @gluCylinder(i32* %7, double 5.000000e-01, double 5.000000e-01, double 1.550000e+01, i32 30, i32 30)
%31 = call i32 @glTranslated(double 0.000000e+00, double 0.000000e+00, double 1.550000e+01)
%32 = call i32 @glRotated(i32 180, double 0.000000e+00, i32 1, double 0.000000e+00)
%33 = call i32 @glutSolidCone(double 3.450000e+00, double 1.200000e+00, i32 33, i32 22)
ret void
}