#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 /*<<< orphan*/);
int /*<<< orphan*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/,
                                double *);
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glScaled(double, double, double);
int /*<<< orphan*/ glTranslated(double, double, double);
int /*<<< orphan*/ *gluNewQuadric();
int /*<<< orphan*/ gluQuadricDrawStyle(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/);
int /*<<< orphan*/ gluQuadricNormals(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ glutSolidCube(double);
void myDrawCarpet1(void) {
  GLUquadricObj *qobj;
  GLfloat diffCarpetRed[] = {0.98, 0.11, 0.44, 1.0};
  GLfloat diffCarpetPurple[] = {0.30, 0.0, 0.8, 1.0};
  GLfloat diffCarpetBlue[] = {0.02, 0.62, 0.99, 1.0};
  GLfloat diffCarpetOrange[] = {0.94, 0.4, 0.06, 1.0};
  GLfloat spec[] = {0.0, 0.0, 0.0, 1.0};
  glMaterialfv(GL_FRONT, GL_SPECULAR, spec);
  glMaterialf(GL_FRONT, GL_SHININESS, 0);
  glMaterialfv(GL_FRONT, GL_DIFFUSE, diffCarpetRed);
  qobj = gluNewQuadric();
  gluQuadricDrawStyle(qobj, GLU_FILL);
  gluQuadricNormals(qobj, GLU_SMOOTH);
  glPushMatrix();
  glScaled(7.6, 1.0, 5.5);
  glutSolidCube(3.0);
  glPopMatrix();
  glPushMatrix();
  glMaterialfv(GL_FRONT, GL_DIFFUSE, diffCarpetPurple);
  glTranslated(0.0, 0.01, 0.0);
  glScaled(5.6, 1.0, 4.5);
  glutSolidCube(3.0);
  glPopMatrix();
  glPushMatrix();
  glMaterialfv(GL_FRONT, GL_DIFFUSE, diffCarpetBlue);
  glTranslated(0.0, 0.02, 0.0);
  glScaled(3.4, 1.0, 3.3);
  glutSolidCube(3.0);
  glPopMatrix();
  glPushMatrix();
  glMaterialfv(GL_FRONT, GL_DIFFUSE, diffCarpetOrange);
  glTranslated(0.0, 0.03, 0.0);
  glScaled(1.6, 1.0, 1.5);
  glutSolidCube(3.0);
  glPopMatrix();
}


x86 assembly (clang, -O0):
<myDrawCarpet1>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    0xebe(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xebb(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xeb8(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb5(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb2(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xeaf(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xeac(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xea9(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xea6(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xea3(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xea0(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe9d(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xe9a(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xe94(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0xe8e(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xe8b(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xe88(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0xe82(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    0xe7c(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xe76(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    0x2d38(%rip),%rax
mov    (%rax),%edi
mov    0x2d3f(%rip),%rax
mov    (%rax),%esi
lea    -0xb0(%rbp),%rdx
call   10c0 <glMaterialfv@plt>
mov    0x2d1a(%rip),%rax
mov    (%rax),%edi
mov    0x2d29(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <glMaterialf@plt>
mov    0x2d01(%rip),%rax
mov    (%rax),%edi
mov    0x2cd8(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   10c0 <glMaterialfv@plt>
mov    $0x0,%al
call   1040 <gluNewQuadric@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2cbf(%rip),%rax
mov    (%rax),%esi
call   1080 <gluQuadricDrawStyle@plt>
mov    -0x8(%rbp),%rdi
mov    0x2cbd(%rip),%rax
mov    (%rax),%esi
call   10a0 <gluQuadricNormals@plt>
mov    $0x0,%al
call   1090 <glPushMatrix@plt>
movsd  0xd2f(%rip),%xmm0
movsd  0xcdf(%rip),%xmm1
movsd  0xd27(%rip),%xmm2
call   1070 <glScaled@plt>
movsd  0xcba(%rip),%xmm0
call   1050 <glutSolidCube@plt>
mov    $0x0,%al
call   1060 <glPopMatrix@plt>
mov    $0x0,%al
call   1090 <glPushMatrix@plt>
mov    0x2c78(%rip),%rax
mov    (%rax),%edi
mov    0x2c4f(%rip),%rax
mov    (%rax),%esi
lea    -0x50(%rbp),%rdx
call   10c0 <glMaterialfv@plt>
xorps  %xmm2,%xmm2
movsd  0xcd1(%rip),%xmm1
movaps %xmm2,%xmm0
call   10b0 <glTranslated@plt>
movsd  0xcb1(%rip),%xmm0
movsd  0xc79(%rip),%xmm1
movsd  0xca9(%rip),%xmm2
call   1070 <glScaled@plt>
movsd  0xc54(%rip),%xmm0
call   1050 <glutSolidCube@plt>
mov    $0x0,%al
call   1060 <glPopMatrix@plt>
mov    $0x0,%al
call   1090 <glPushMatrix@plt>
mov    0x2c12(%rip),%rax
mov    (%rax),%edi
mov    0x2be9(%rip),%rax
mov    (%rax),%esi
lea    -0x70(%rbp),%rdx
call   10c0 <glMaterialfv@plt>
xorps  %xmm2,%xmm2
movsd  0xc53(%rip),%xmm1
movaps %xmm2,%xmm0
call   10b0 <glTranslated@plt>
movsd  0xc33(%rip),%xmm0
movsd  0xc13(%rip),%xmm1
movsd  0xc2b(%rip),%xmm2
call   1070 <glScaled@plt>
movsd  0xbee(%rip),%xmm0
call   1050 <glutSolidCube@plt>
mov    $0x0,%al
call   1060 <glPopMatrix@plt>
mov    $0x0,%al
call   1090 <glPushMatrix@plt>
mov    0x2bac(%rip),%rax
mov    (%rax),%edi
mov    0x2b83(%rip),%rax
mov    (%rax),%esi
lea    -0x90(%rbp),%rdx
call   10c0 <glMaterialfv@plt>
xorps  %xmm2,%xmm2
movsd  0xbd2(%rip),%xmm1
movaps %xmm2,%xmm0
call   10b0 <glTranslated@plt>
movsd  0xbaa(%rip),%xmm0
movsd  0xbaa(%rip),%xmm1
movsd  0xbaa(%rip),%xmm2
call   1070 <glScaled@plt>
movsd  0xb85(%rip),%xmm0
call   1050 <glutSolidCube@plt>
mov    $0x0,%al
call   1060 <glPopMatrix@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myDrawCarpet1>:
push   %r15
push   %r14
push   %rbx
sub    $0xa0,%rsp
movaps 0xecd(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xeae(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xecf(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xeb3(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xed7(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xebb(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xedf(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xec3(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xee7(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2da8(%rip),%r14
mov    (%r14),%edi
mov    0x2dae(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   10c0 <glMaterialfv@plt>
mov    (%r14),%edi
mov    0x2da2(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <glMaterialf@plt>
mov    (%r14),%edi
mov    0x2d57(%rip),%r15
mov    (%r15),%esi
lea    0x80(%rsp),%rdx
call   10c0 <glMaterialfv@plt>
xor    %eax,%eax
call   1040 <gluNewQuadric@plt>
mov    %rax,%rbx
mov    0x2d3e(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1080 <gluQuadricDrawStyle@plt>
mov    0x2d3d(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   10a0 <gluQuadricNormals@plt>
xor    %eax,%eax
call   1090 <glPushMatrix@plt>
movsd  0xd54(%rip),%xmm0
movsd  0xd54(%rip),%xmm1
movsd  0xd54(%rip),%xmm2
call   1070 <glScaled@plt>
movsd  0xd4f(%rip),%xmm0
call   1050 <glutSolidCube@plt>
xor    %eax,%eax
call   1060 <glPopMatrix@plt>
xor    %eax,%eax
call   1090 <glPushMatrix@plt>
mov    (%r14),%edi
mov    (%r15),%esi
lea    0x60(%rsp),%rdx
call   10c0 <glMaterialfv@plt>
movsd  0xd2c(%rip),%xmm1
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
call   10b0 <glTranslated@plt>
movsd  0xd21(%rip),%xmm0
movsd  0xd21(%rip),%xmm2
movsd  0xcf1(%rip),%xmm1
call   1070 <glScaled@plt>
movsd  0xcf4(%rip),%xmm0
call   1050 <glutSolidCube@plt>
xor    %eax,%eax
call   1060 <glPopMatrix@plt>
xor    %eax,%eax
call   1090 <glPushMatrix@plt>
mov    (%r14),%edi
mov    (%r15),%esi
lea    0x40(%rsp),%rdx
call   10c0 <glMaterialfv@plt>
movsd  0xce9(%rip),%xmm1
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
call   10b0 <glTranslated@plt>
movsd  0xcde(%rip),%xmm0
movsd  0xcde(%rip),%xmm2
movsd  0xc96(%rip),%xmm1
call   1070 <glScaled@plt>
movsd  0xc99(%rip),%xmm0
call   1050 <glutSolidCube@plt>
xor    %eax,%eax
call   1060 <glPopMatrix@plt>
xor    %eax,%eax
call   1090 <glPushMatrix@plt>
mov    (%r14),%edi
mov    (%r15),%esi
lea    0x20(%rsp),%rdx
call   10c0 <glMaterialfv@plt>
movsd  0xca6(%rip),%xmm1
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
call   10b0 <glTranslated@plt>
movsd  0xc9b(%rip),%xmm0
movsd  0xc9b(%rip),%xmm2
movsd  0xc3b(%rip),%xmm1
call   1070 <glScaled@plt>
movsd  0xc3e(%rip),%xmm0
call   1050 <glutSolidCube@plt>
xor    %eax,%eax
call   1060 <glPopMatrix@plt>
add    $0xa0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.myDrawCarpet1.diffCarpetRed = [4 x double] [double 0x3FEF5C28F5C28F5C, double 1.100000e-01, double 4.400000e-01, double 1.000000e+00]
@__const.myDrawCarpet1.diffCarpetPurple = [4 x double] [double 3.000000e-01, double 0.000000e+00, double 8.000000e-01, double 1.000000e+00]
@__const.myDrawCarpet1.diffCarpetBlue = [4 x double] [double 2.000000e-02, double 6.200000e-01, double 0x3FEFAE147AE147AE, double 1.000000e+00]
@__const.myDrawCarpet1.diffCarpetOrange = [4 x double] [double 0x3FEE147AE147AE14, double 4.000000e-01, double 6.000000e-02, double 1.000000e+00]
@__const.myDrawCarpet1.spec = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@GL_FRONT = global i32 0
@GL_SPECULAR = global i32 0
@GL_SHININESS = global i32 0
@GL_DIFFUSE = global i32 0
@GLU_FILL = global i32 0
@GLU_SMOOTH = global i32 0
define void @myDrawCarpet1() {
%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 = load i32, i32* @GL_FRONT
%13 = load i32, i32* @GL_SPECULAR
%14 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 0
%15 = call i32 @glMaterialfv(i32 %12, i32 %13, double* %14)
%16 = load i32, i32* @GL_FRONT
%17 = load i32, i32* @GL_SHININESS
%18 = call i32 @glMaterialf(i32 %16, i32 %17, i32 0)
%19 = load i32, i32* @GL_FRONT
%20 = load i32, i32* @GL_DIFFUSE
%21 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%22 = call i32 @glMaterialfv(i32 %19, i32 %20, double* %21)
%23 = call i32* (...) @gluNewQuadric()
store i32* %23, i32** %1
%24 = load i32*, i32** %1
%25 = load i32, i32* @GLU_FILL
%26 = call i32 @gluQuadricDrawStyle(i32* %24, i32 %25)
%27 = load i32*, i32** %1
%28 = load i32, i32* @GLU_SMOOTH
%29 = call i32 @gluQuadricNormals(i32* %27, i32 %28)
%30 = call i32 (...) @glPushMatrix()
%31 = call i32 @glScaled(double 7.600000e+00, double 1.000000e+00, double 5.500000e+00)
%32 = call i32 @glutSolidCube(double 3.000000e+00)
%33 = call i32 (...) @glPopMatrix()
%34 = call i32 (...) @glPushMatrix()
%35 = load i32, i32* @GL_FRONT
%36 = load i32, i32* @GL_DIFFUSE
%37 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%38 = call i32 @glMaterialfv(i32 %35, i32 %36, double* %37)
%39 = call i32 @glTranslated(double 0.000000e+00, double 1.000000e-02, double 0.000000e+00)
%40 = call i32 @glScaled(double 5.600000e+00, double 1.000000e+00, double 4.500000e+00)
%41 = call i32 @glutSolidCube(double 3.000000e+00)
%42 = call i32 (...) @glPopMatrix()
%43 = call i32 (...) @glPushMatrix()
%44 = load i32, i32* @GL_FRONT
%45 = load i32, i32* @GL_DIFFUSE
%46 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%47 = call i32 @glMaterialfv(i32 %44, i32 %45, double* %46)
%48 = call i32 @glTranslated(double 0.000000e+00, double 2.000000e-02, double 0.000000e+00)
%49 = call i32 @glScaled(double 3.400000e+00, double 1.000000e+00, double 3.300000e+00)
%50 = call i32 @glutSolidCube(double 3.000000e+00)
%51 = call i32 (...) @glPopMatrix()
%52 = call i32 (...) @glPushMatrix()
%53 = load i32, i32* @GL_FRONT
%54 = load i32, i32* @GL_DIFFUSE
%55 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%56 = call i32 @glMaterialfv(i32 %53, i32 %54, double* %55)
%57 = call i32 @glTranslated(double 0.000000e+00, double 3.000000e-02, double 0.000000e+00)
%58 = call i32 @glScaled(double 1.600000e+00, double 1.000000e+00, double 1.500000e+00)
%59 = call i32 @glutSolidCube(double 3.000000e+00)
%60 = call i32 (...) @glPopMatrix()
ret void
}

LLVM IR (-O2):
@__const.myDrawCarpet1.diffCarpetRed = [4 x double] [double 0x3FEF5C28F5C28F5C, double 1.100000e-01, double 4.400000e-01, double 1.000000e+00]
@__const.myDrawCarpet1.diffCarpetPurple = [4 x double] [double 3.000000e-01, double 0.000000e+00, double 8.000000e-01, double 1.000000e+00]
@__const.myDrawCarpet1.diffCarpetBlue = [4 x double] [double 2.000000e-02, double 6.200000e-01, double 0x3FEFAE147AE147AE, double 1.000000e+00]
@__const.myDrawCarpet1.diffCarpetOrange = [4 x double] [double 0x3FEE147AE147AE14, double 4.000000e-01, double 6.000000e-02, double 1.000000e+00]
@__const.myDrawCarpet1.spec = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@GL_FRONT = global i32 0
@GL_SPECULAR = global i32 0
@GL_SHININESS = global i32 0
@GL_DIFFUSE = global i32 0
@GLU_FILL = global i32 0
@GLU_SMOOTH = global i32 0
define void @myDrawCarpet1() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = alloca [4 x double]
%5 = alloca [4 x double]
%6 = bitcast [4 x double]* %1 to i8*
%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 = load i32, i32* @GL_FRONT
%12 = load i32, i32* @GL_SPECULAR
%13 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%14 = call i32 @glMaterialfv(i32 %11, i32 %12, double* %13)
%15 = load i32, i32* @GL_FRONT
%16 = load i32, i32* @GL_SHININESS
%17 = call i32 @glMaterialf(i32 %15, i32 %16, i32 0)
%18 = load i32, i32* @GL_FRONT
%19 = load i32, i32* @GL_DIFFUSE
%20 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%21 = call i32 @glMaterialfv(i32 %18, i32 %19, double* %20)
%22 = call i32* (...) @gluNewQuadric()
%23 = load i32, i32* @GLU_FILL
%24 = call i32 @gluQuadricDrawStyle(i32* %22, i32 %23)
%25 = load i32, i32* @GLU_SMOOTH
%26 = call i32 @gluQuadricNormals(i32* %22, i32 %25)
%27 = call i32 (...) @glPushMatrix()
%28 = call i32 @glScaled(double 7.600000e+00, double 1.000000e+00, double 5.500000e+00)
%29 = call i32 @glutSolidCube(double 3.000000e+00)
%30 = call i32 (...) @glPopMatrix()
%31 = call i32 (...) @glPushMatrix()
%32 = load i32, i32* @GL_FRONT
%33 = load i32, i32* @GL_DIFFUSE
%34 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%35 = call i32 @glMaterialfv(i32 %32, i32 %33, double* %34)
%36 = call i32 @glTranslated(double 0.000000e+00, double 1.000000e-02, double 0.000000e+00)
%37 = call i32 @glScaled(double 5.600000e+00, double 1.000000e+00, double 4.500000e+00)
%38 = call i32 @glutSolidCube(double 3.000000e+00)
%39 = call i32 (...) @glPopMatrix()
%40 = call i32 (...) @glPushMatrix()
%41 = load i32, i32* @GL_FRONT
%42 = load i32, i32* @GL_DIFFUSE
%43 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%44 = call i32 @glMaterialfv(i32 %41, i32 %42, double* %43)
%45 = call i32 @glTranslated(double 0.000000e+00, double 2.000000e-02, double 0.000000e+00)
%46 = call i32 @glScaled(double 3.400000e+00, double 1.000000e+00, double 3.300000e+00)
%47 = call i32 @glutSolidCube(double 3.000000e+00)
%48 = call i32 (...) @glPopMatrix()
%49 = call i32 (...) @glPushMatrix()
%50 = load i32, i32* @GL_FRONT
%51 = load i32, i32* @GL_DIFFUSE
%52 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%53 = call i32 @glMaterialfv(i32 %50, i32 %51, double* %52)
%54 = call i32 @glTranslated(double 0.000000e+00, double 3.000000e-02, double 0.000000e+00)
%55 = call i32 @glScaled(double 1.600000e+00, double 1.000000e+00, double 1.500000e+00)
%56 = call i32 @glutSolidCube(double 3.000000e+00)
%57 = call i32 (...) @glPopMatrix()
ret void
}