#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*/ glRotated(double, 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 myDrawUppRightLeg(void) {
  GLUquadricObj *qobj;
  GLfloat spec[] = {0.0, 0.0, 0.0, 1.0};
  GLfloat diff[] = {1.0, 0.8, 0.0, 1.0};
  GLfloat diffb[] = {0.0, 0.0, 0.0, 1.0};
  GLfloat diffl[] = {1.0, 1.0, 1.0, 1.0};
  GLfloat diffBL[] = {0.1, 0.2, 1.0, 1.0};
  glMaterialf(GL_FRONT, GL_SHININESS, 0);
  glMaterialfv(GL_FRONT, GL_SPECULAR, spec);
  glMaterialfv(GL_FRONT, GL_DIFFUSE, diffl);
  glMaterialfv(GL_FRONT, GL_DIFFUSE, diffBL);
  qobj = gluNewQuadric();
  gluQuadricDrawStyle(qobj, GLU_FILL);
  gluQuadricNormals(qobj, GLU_SMOOTH);
  gluSphere(qobj, 1.45, 30, 30);
  glRotated(-90.0, 1.0, 0.0, 0.0);
  glTranslated(0.0, 0.0, -3.3);
  gluCylinder(qobj, 1.30, 1.45, 3.5, 30, 30);
}


x86 assembly (clang, -O0):
<myDrawUppRightLeg>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    0xe8e(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe8b(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe88(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe85(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xe82(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xe7f(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xe7c(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe79(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe36(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xe33(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xe30(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe2d(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xe4a(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xe44(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0xe3e(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xe3b(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xe38(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0xe32(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    0xe2c(%rip),%rax
mov    %rax,-0xa0(%rbp)
mov    0xe26(%rip),%rax
mov    %rax,-0x98(%rbp)
mov    0x2d48(%rip),%rax
mov    (%rax),%edi
mov    0x2d57(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <glMaterialf@plt>
mov    0x2d2f(%rip),%rax
mov    (%rax),%edi
mov    0x2d36(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   10a0 <glMaterialfv@plt>
mov    0x2d14(%rip),%rax
mov    (%rax),%edi
mov    0x2ceb(%rip),%rax
mov    (%rax),%esi
lea    -0x90(%rbp),%rdx
call   10a0 <glMaterialfv@plt>
mov    0x2cf6(%rip),%rax
mov    (%rax),%edi
mov    0x2ccd(%rip),%rax
mov    (%rax),%esi
lea    -0xb0(%rbp),%rdx
call   10a0 <glMaterialfv@plt>
mov    $0x0,%al
call   1040 <gluNewQuadric@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2cb1(%rip),%rax
mov    (%rax),%esi
call   1060 <gluQuadricDrawStyle@plt>
mov    -0x8(%rbp),%rdi
mov    0x2caf(%rip),%rax
mov    (%rax),%esi
call   1080 <gluQuadricNormals@plt>
mov    -0x8(%rbp),%rdi
movsd  0xcd4(%rip),%xmm0
mov    $0x1e,%edx
mov    %edx,%esi
call   1050 <gluSphere@plt>
movsd  0xcd8(%rip),%xmm0
movsd  0xcd8(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   10b0 <glRotated@plt>
xorps  %xmm1,%xmm1
movsd  0xcb2(%rip),%xmm2
movaps %xmm1,%xmm0
call   1090 <glTranslated@plt>
mov    -0x8(%rbp),%rdi
movsd  0xc86(%rip),%xmm0
movsd  0xc86(%rip),%xmm1
movsd  0xc86(%rip),%xmm2
mov    $0x1e,%edx
mov    %edx,%esi
call   1070 <gluCylinder@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myDrawUppRightLeg>:
push   %r14
push   %rbx
sub    $0x68,%rsp
movaps 0xea2(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xe86(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeaa(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe8e(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeb2(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe96(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2df3(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e02(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <glMaterialf@plt>
mov    (%rbx),%edi
mov    0x2de8(%rip),%rax
mov    (%rax),%esi
lea    0x40(%rsp),%rdx
call   10a0 <glMaterialfv@plt>
mov    (%rbx),%edi
mov    0x2da3(%rip),%r14
mov    (%r14),%esi
lea    0x20(%rsp),%rdx
call   10a0 <glMaterialfv@plt>
mov    (%rbx),%edi
mov    (%r14),%esi
mov    %rsp,%rdx
call   10a0 <glMaterialfv@plt>
xor    %eax,%eax
call   1040 <gluNewQuadric@plt>
mov    %rax,%rbx
mov    0x2d80(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1060 <gluQuadricDrawStyle@plt>
mov    0x2d7f(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1080 <gluQuadricNormals@plt>
movsd  0xd9d(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1e,%esi
mov    $0x1e,%edx
call   1050 <gluSphere@plt>
movsd  0xd8b(%rip),%xmm0
movsd  0xd8b(%rip),%xmm1
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
call   10b0 <glRotated@plt>
movsd  0xd80(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1090 <glTranslated@plt>
movsd  0xd75(%rip),%xmm0
movsd  0xd75(%rip),%xmm2
mov    %rbx,%rdi
movsd  0xd42(%rip),%xmm1
mov    $0x1e,%esi
mov    $0x1e,%edx
call   1070 <gluCylinder@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.myDrawUppRightLeg.spec = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@__const.myDrawUppRightLeg.diff = [4 x double] [double 1.000000e+00, double 8.000000e-01, double 0.000000e+00, double 1.000000e+00]
@__const.myDrawUppRightLeg.diffb = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@__const.myDrawUppRightLeg.diffl = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.myDrawUppRightLeg.diffBL = [4 x double] [double 1.000000e-01, double 2.000000e-01, double 1.000000e+00, double 1.000000e+00]
@GL_FRONT = global i32 0
@GL_SHININESS = global i32 0
@GL_SPECULAR = global i32 0
@GL_DIFFUSE = global i32 0
@GLU_FILL = global i32 0
@GLU_SMOOTH = global i32 0
define void @myDrawUppRightLeg() {
%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_SHININESS
%14 = call i32 @glMaterialf(i32 %12, i32 %13, i32 0)
%15 = load i32, i32* @GL_FRONT
%16 = load i32, i32* @GL_SPECULAR
%17 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%18 = call i32 @glMaterialfv(i32 %15, i32 %16, double* %17)
%19 = load i32, i32* @GL_FRONT
%20 = load i32, i32* @GL_DIFFUSE
%21 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%22 = call i32 @glMaterialfv(i32 %19, i32 %20, double* %21)
%23 = load i32, i32* @GL_FRONT
%24 = load i32, i32* @GL_DIFFUSE
%25 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 0
%26 = call i32 @glMaterialfv(i32 %23, i32 %24, double* %25)
%27 = call i32* (...) @gluNewQuadric()
store i32* %27, i32** %1
%28 = load i32*, i32** %1
%29 = load i32, i32* @GLU_FILL
%30 = call i32 @gluQuadricDrawStyle(i32* %28, i32 %29)
%31 = load i32*, i32** %1
%32 = load i32, i32* @GLU_SMOOTH
%33 = call i32 @gluQuadricNormals(i32* %31, i32 %32)
%34 = load i32*, i32** %1
%35 = call i32 @gluSphere(i32* %34, double 1.450000e+00, i32 30, i32 30)
%36 = call i32 @glRotated(double -9.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%37 = call i32 @glTranslated(double 0.000000e+00, double 0.000000e+00, double -3.300000e+00)
%38 = load i32*, i32** %1
%39 = call i32 @gluCylinder(i32* %38, double 1.300000e+00, double 1.450000e+00, double 3.500000e+00, i32 30, i32 30)
ret void
}

LLVM IR (-O2):
@__const.myDrawUppRightLeg.spec = [4 x double] [double 0.000000e+00, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00]
@__const.myDrawUppRightLeg.diffl = [4 x double] [double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00]
@__const.myDrawUppRightLeg.diffBL = [4 x double] [double 1.000000e-01, double 2.000000e-01, double 1.000000e+00, double 1.000000e+00]
@GL_FRONT = global i32 0
@GL_SHININESS = global i32 0
@GL_SPECULAR = global i32 0
@GL_DIFFUSE = global i32 0
@GLU_FILL = global i32 0
@GLU_SMOOTH = global i32 0
define void @myDrawUppRightLeg() {
%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 = load i32, i32* @GL_FRONT
%8 = load i32, i32* @GL_SHININESS
%9 = tail call i32 @glMaterialf(i32 %7, i32 %8, i32 0)
%10 = load i32, i32* @GL_FRONT
%11 = load i32, i32* @GL_SPECULAR
%12 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%13 = call i32 @glMaterialfv(i32 %10, i32 %11, double* %12)
%14 = load i32, i32* @GL_FRONT
%15 = load i32, i32* @GL_DIFFUSE
%16 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%17 = call i32 @glMaterialfv(i32 %14, i32 %15, double* %16)
%18 = load i32, i32* @GL_FRONT
%19 = load i32, i32* @GL_DIFFUSE
%20 = getelementptr inbounds [4 x double], [4 x double]* %3, 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 @gluSphere(i32* %22, double 1.450000e+00, i32 30, i32 30)
%28 = call i32 @glRotated(double -9.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%29 = call i32 @glTranslated(double 0.000000e+00, double 0.000000e+00, double -3.300000e+00)
%30 = call i32 @gluCylinder(i32* %22, double 1.300000e+00, double 1.450000e+00, double 3.500000e+00, i32 30, i32 30)
ret void
}