#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*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/,
                                double *);
int /*<<< orphan*/ glRotated(double, double, double, double);
int /*<<< orphan*/ glScaled(double, double, 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*/ gluSphere(int /*<<< orphan*/ *, double, int, int);
void myDrawTorso(void) {
  GLUquadricObj *qobj;
  GLfloat diffW[] = {1.0, 1.0, 1.0, 1.0};
  GLfloat diffb[] = {0.5, 0.5, 0.5, 1.0};
  glMaterialfv(GL_FRONT, GL_DIFFUSE, diffW);
  qobj = gluNewQuadric();
  gluQuadricDrawStyle(qobj, GLU_FILL);
  gluQuadricNormals(qobj, GLU_SMOOTH);
  glRotated(-90.0, 1.0, 0.0, 0.0);
  glScaled(1.2, 1.0, 1.0);
  gluSphere(qobj, 2.5, 30, 30);
  glTranslated(0.0, 0.0, -3.9);
  gluCylinder(qobj, 2.5, 2.5, 3.9, 30, 30);
  glTranslated(0.0, 0.0, 3.5);
  gluCylinder(qobj, 2.4, 0.5, 3.0, 30, 30);
  glTranslated(0.0, 0.0, -4.0);
  gluCylinder(qobj, 2.6, 2.5, 0.6, 30, 30);
}


x86 assembly (clang, -O0):
<myDrawTorso>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xec2(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xebf(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xebc(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
mov    0x2dc8(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   10a0 <glMaterialfv@plt>
mov    $0x0,%al
call   1030 <gluNewQuadric@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2daf(%rip),%rax
mov    (%rax),%esi
call   1060 <gluQuadricDrawStyle@plt>
mov    -0x8(%rbp),%rdi
mov    0x2dad(%rip),%rax
mov    (%rax),%esi
call   1080 <gluQuadricNormals@plt>
movsd  0xe1e(%rip),%xmm0
movsd  0xe0e(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   10b0 <glRotated@plt>
movsd  0xdf3(%rip),%xmm0
movsd  0xdf3(%rip),%xmm2
movaps %xmm2,%xmm1
call   1050 <glScaled@plt>
mov    -0x8(%rbp),%rdi
movsd  0xd8f(%rip),%xmm0
mov    $0x1e,%edx
mov    %edx,%esi
call   1040 <gluSphere@plt>
xorps  %xmm1,%xmm1
movsd  0xdb8(%rip),%xmm2
movaps %xmm1,%xmm0
call   1090 <glTranslated@plt>
mov    -0x8(%rbp),%rdi
movsd  0xd64(%rip),%xmm1
movsd  0xd94(%rip),%xmm2
mov    $0x1e,%edx
movaps %xmm1,%xmm0
mov    %edx,%esi
call   1070 <gluCylinder@plt>
xorps  %xmm1,%xmm1
movsd  0xd72(%rip),%xmm2
movaps %xmm1,%xmm0
call   1090 <glTranslated@plt>
mov    -0x8(%rbp),%rdi
movsd  0xd46(%rip),%xmm0
movsd  0xd46(%rip),%xmm1
movsd  0xd46(%rip),%xmm2
mov    $0x1e,%edx
mov    %edx,%esi
call   1070 <gluCylinder@plt>
xorps  %xmm1,%xmm1
movsd  0xd17(%rip),%xmm2
movaps %xmm1,%xmm0
call   1090 <glTranslated@plt>
mov    -0x8(%rbp),%rdi
movsd  0xceb(%rip),%xmm0
movsd  0xceb(%rip),%xmm1
movsd  0xceb(%rip),%xmm2
mov    $0x1e,%edx
mov    %edx,%esi
call   1070 <gluCylinder@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myDrawTorso>:
push   %rbx
sub    $0x20,%rsp
movaps 0xee4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2e35(%rip),%rax
mov    (%rax),%edi
mov    0x2e0c(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   10a0 <glMaterialfv@plt>
xor    %eax,%eax
call   1030 <gluNewQuadric@plt>
mov    %rax,%rbx
mov    0x2df9(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1060 <gluQuadricDrawStyle@plt>
mov    0x2df8(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1080 <gluQuadricNormals@plt>
movsd  0xe06(%rip),%xmm0
movsd  0xe06(%rip),%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   10b0 <glRotated@plt>
movsd  0xdfb(%rip),%xmm0
movsd  0xdeb(%rip),%xmm1
movaps %xmm1,%xmm2
call   1050 <glScaled@plt>
movsd  0xdeb(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1e,%esi
mov    $0x1e,%edx
call   1040 <gluSphere@plt>
movsd  0xdd9(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1090 <glTranslated@plt>
movsd  0xdce(%rip),%xmm2
mov    %rbx,%rdi
movsd  0xdb3(%rip),%xmm0
movaps %xmm0,%xmm1
mov    $0x1e,%esi
mov    $0x1e,%edx
call   1070 <gluCylinder@plt>
movsd  0xdb1(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1090 <glTranslated@plt>
movsd  0xda6(%rip),%xmm0
movsd  0xda6(%rip),%xmm1
movsd  0xda6(%rip),%xmm2
mov    %rbx,%rdi
mov    $0x1e,%esi
mov    $0x1e,%edx
call   1070 <gluCylinder@plt>
movsd  0xd94(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1090 <glTranslated@plt>
movsd  0xd89(%rip),%xmm0
movsd  0xd89(%rip),%xmm2
mov    %rbx,%rdi
movsd  0xd36(%rip),%xmm1
mov    $0x1e,%esi
mov    $0x1e,%edx
call   1070 <gluCylinder@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.myDrawTorso.diffW = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.myDrawTorso.diffb = [4 x double] [double 5.000000e-01, double 5.000000e-01, double 5.000000e-01, double 1.000000e+00]
@GL_FRONT = global i32 0
@GL_DIFFUSE = global i32 0
@GLU_FILL = global i32 0
@GLU_SMOOTH = global i32 0
define void @myDrawTorso() {
%1 = alloca i32*
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = bitcast [4 x double]* %2 to i8*
%5 = bitcast [4 x double]* %3 to i8*
%6 = load i32, i32* @GL_FRONT
%7 = load i32, i32* @GL_DIFFUSE
%8 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%9 = call i32 @glMaterialfv(i32 %6, i32 %7, double* %8)
%10 = call i32* (...) @gluNewQuadric()
store i32* %10, i32** %1
%11 = load i32*, i32** %1
%12 = load i32, i32* @GLU_FILL
%13 = call i32 @gluQuadricDrawStyle(i32* %11, i32 %12)
%14 = load i32*, i32** %1
%15 = load i32, i32* @GLU_SMOOTH
%16 = call i32 @gluQuadricNormals(i32* %14, i32 %15)
%17 = call i32 @glRotated(double -9.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%18 = call i32 @glScaled(double 1.200000e+00, double 1.000000e+00, double 1.000000e+00)
%19 = load i32*, i32** %1
%20 = call i32 @gluSphere(i32* %19, double 2.500000e+00, i32 30, i32 30)
%21 = call i32 @glTranslated(double 0.000000e+00, double 0.000000e+00, double -3.900000e+00)
%22 = load i32*, i32** %1
%23 = call i32 @gluCylinder(i32* %22, double 2.500000e+00, double 2.500000e+00, double 3.900000e+00, i32 30, i32 30)
%24 = call i32 @glTranslated(double 0.000000e+00, double 0.000000e+00, double 3.500000e+00)
%25 = load i32*, i32** %1
%26 = call i32 @gluCylinder(i32* %25, double 2.400000e+00, double 5.000000e-01, double 3.000000e+00, i32 30, i32 30)
%27 = call i32 @glTranslated(double 0.000000e+00, double 0.000000e+00, double -4.000000e+00)
%28 = load i32*, i32** %1
%29 = call i32 @gluCylinder(i32* %28, double 2.600000e+00, double 2.500000e+00, double 6.000000e-01, i32 30, i32 30)
ret void
}

LLVM IR (-O2):
@__const.myDrawTorso.diffW = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@GL_FRONT = global i32 0
@GL_DIFFUSE = global i32 0
@GLU_FILL = global i32 0
@GLU_SMOOTH = global i32 0
define void @myDrawTorso() {
%1 = alloca [4 x double]
%2 = bitcast [4 x double]* %1 to i8*
%3 = load i32, i32* @GL_FRONT
%4 = load i32, i32* @GL_DIFFUSE
%5 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%6 = call i32 @glMaterialfv(i32 %3, i32 %4, double* %5)
%7 = call i32* (...) @gluNewQuadric()
%8 = load i32, i32* @GLU_FILL
%9 = call i32 @gluQuadricDrawStyle(i32* %7, i32 %8)
%10 = load i32, i32* @GLU_SMOOTH
%11 = call i32 @gluQuadricNormals(i32* %7, i32 %10)
%12 = call i32 @glRotated(double -9.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%13 = call i32 @glScaled(double 1.200000e+00, double 1.000000e+00, double 1.000000e+00)
%14 = call i32 @gluSphere(i32* %7, double 2.500000e+00, i32 30, i32 30)
%15 = call i32 @glTranslated(double 0.000000e+00, double 0.000000e+00, double -3.900000e+00)
%16 = call i32 @gluCylinder(i32* %7, double 2.500000e+00, double 2.500000e+00, double 3.900000e+00, i32 30, i32 30)
%17 = call i32 @glTranslated(double 0.000000e+00, double 0.000000e+00, double 3.500000e+00)
%18 = call i32 @gluCylinder(i32* %7, double 2.400000e+00, double 5.000000e-01, double 3.000000e+00, i32 30, i32 30)
%19 = call i32 @glTranslated(double 0.000000e+00, double 0.000000e+00, double -4.000000e+00)
%20 = call i32 @gluCylinder(i32* %7, double 2.600000e+00, double 2.500000e+00, double 6.000000e-01, i32 30, i32 30)
ret void
}