#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 */

/* Variables and functions */
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glScalef(double, double, double);
int /*<<< orphan*/ glTranslatef(double, double, double);
int /*<<< orphan*/ glutSolidCube(double);
int /*<<< orphan*/ glutWireCube(double);
void draw_torso_C(int solid) {
  glPushMatrix();
  glColor3f(0.0, 1.0, 1.0);
  glTranslatef(0.0, 0.8 / 2.0, 0.0);
  glScalef(0.5, 0.8, 0.1);
  if (solid)
    glutSolidCube(1.0);
  else
    glutWireCube(1.0);
  glPopMatrix();
}


x86 assembly (clang, -O0):
<draw_torso_C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1070 <glPushMatrix@plt>
xorps  %xmm0,%xmm0
movsd  0xe93(%rip),%xmm2
movaps %xmm2,%xmm1
call   1050 <glColor3f@plt>
xorps  %xmm2,%xmm2
movsd  0xe78(%rip),%xmm1
movaps %xmm2,%xmm0
call   1080 <glTranslatef@plt>
movsd  0xe50(%rip),%xmm0
movsd  0xe50(%rip),%xmm1
movsd  0xe50(%rip),%xmm2
call   1060 <glScalef@plt>
cmpl   $0x0,-0x4(%rbp)
je     11e1 <draw_torso_C+0x71>
movsd  0xe49(%rip),%xmm0
call   1030 <glutSolidCube@plt>
jmp    11ee <draw_torso_C+0x7e>
movsd  0xe37(%rip),%xmm0
call   1090 <glutWireCube@plt>
mov    $0x0,%al
call   1040 <glPopMatrix@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_torso_C>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1070 <glPushMatrix@plt>
movsd  0xe7e(%rip),%xmm1
xorps  %xmm0,%xmm0
movaps %xmm1,%xmm2
call   1050 <glColor3f@plt>
movsd  0xe73(%rip),%xmm1
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
call   1080 <glTranslatef@plt>
movsd  0xe68(%rip),%xmm0
movsd  0xe68(%rip),%xmm1
movsd  0xe68(%rip),%xmm2
call   1060 <glScalef@plt>
movsd  0xe3b(%rip),%xmm0
test   %ebx,%ebx
je     11d0 <draw_torso_C+0x60>
call   1030 <glutSolidCube@plt>
jmp    11d5 <draw_torso_C+0x65>
call   1090 <glutWireCube@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <glPopMatrix@plt>

LLVM IR (-O0):
define void @draw_torso_C(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @glPushMatrix()
%4 = call i32 @glColor3f(double 0.000000e+00, double 1.000000e+00, double 1.000000e+00)
%5 = call i32 @glTranslatef(double 0.000000e+00, double 4.000000e-01, double 0.000000e+00)
%6 = call i32 @glScalef(double 5.000000e-01, double 8.000000e-01, double 1.000000e-01)
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @glutSolidCube(double 1.000000e+00)
br label %13
11: ; preds = %1
%12 = call i32 @glutWireCube(double 1.000000e+00)
br label %13
13: ; preds = %11, %9
%14 = call i32 (...) @glPopMatrix()
ret void
}

LLVM IR (-O2):
define void @draw_torso_C(i32 %0) {
%2 = tail call i32 (...) @glPushMatrix()
%3 = tail call i32 @glColor3f(double 0.000000e+00, double 1.000000e+00, double 1.000000e+00)
%4 = tail call i32 @glTranslatef(double 0.000000e+00, double 4.000000e-01, double 0.000000e+00)
%5 = tail call i32 @glScalef(double 5.000000e-01, double 8.000000e-01, double 1.000000e-01)
%6 = icmp eq i32 %0, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @glutSolidCube(double 1.000000e+00)
br label %11
9: ; preds = %1
%10 = tail call i32 @glutWireCube(double 1.000000e+00)
br label %11
11: ; preds = %9, %7
%12 = tail call i32 (...) @glPopMatrix()
ret void
}