#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;

/* Variables and functions */
int /*<<< orphan*/ GL_AMBIENT_AND_DIFFUSE;
int /*<<< orphan*/ GL_FRONT;
int /*<<< orphan*/ draw_arm_C(int, int);
int /*<<< orphan*/ draw_head_C(int);
int /*<<< orphan*/ draw_leg_C(int, int);
int /*<<< orphan*/ draw_torso_C(int);
int /*<<< orphan*/ glMaterialfv(int /*<<< orphan*/, int /*<<< orphan*/,
                                double *);
void DrawTheGuy_SC(void) {
  GLfloat head_diffuse[] = {0.7, 0.7, 0.0, 1.0};
  GLfloat torso_diffuse[] = {0.0, 0.7, 0.7, 1.0};
  GLfloat leg_diffuse[] = {0.7, 0.0, 0.7, 1.0};
  GLfloat arm_diffuse[] = {0.7, 0.4, 0.4, 1.0};
  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, head_diffuse);
  draw_head_C(1);
  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, torso_diffuse);
  draw_torso_C(1);
  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, leg_diffuse);
  draw_leg_C(0, 1);
  draw_leg_C(1, 1);
  glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, arm_diffuse);
  draw_arm_C(0, 1);
  draw_arm_C(1, 1);
}


x86 assembly (clang, -O0):
<DrawTheGuy_SC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    0xe9e(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe9b(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xe98(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xe95(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xe92(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe8f(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe8c(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe89(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe86(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xe83(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xe80(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xe7d(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xe7a(%rip),%rax
mov    %rax,-0x80(%rbp)
mov    0xe77(%rip),%rax
mov    %rax,-0x78(%rbp)
mov    0xe74(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xe71(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0x2dd6(%rip),%rax
mov    (%rax),%edi
mov    0x2dbd(%rip),%rax
mov    (%rax),%esi
lea    -0x20(%rbp),%rdx
call   1060 <glMaterialfv@plt>
mov    $0x1,%edi
call   1030 <draw_head_C@plt>
mov    0x2db1(%rip),%rax
mov    (%rax),%edi
mov    0x2d98(%rip),%rax
mov    (%rax),%esi
lea    -0x40(%rbp),%rdx
call   1060 <glMaterialfv@plt>
mov    $0x1,%edi
call   1040 <draw_torso_C@plt>
mov    0x2d8c(%rip),%rax
mov    (%rax),%edi
mov    0x2d73(%rip),%rax
mov    (%rax),%esi
lea    -0x60(%rbp),%rdx
call   1060 <glMaterialfv@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1050 <draw_leg_C@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1050 <draw_leg_C@plt>
mov    0x2d59(%rip),%rax
mov    (%rax),%edi
mov    0x2d40(%rip),%rax
mov    (%rax),%esi
lea    -0x80(%rbp),%rdx
call   1060 <glMaterialfv@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1070 <draw_arm_C@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1070 <draw_arm_C@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DrawTheGuy_SC>:
push   %r14
push   %rbx
sub    $0x88,%rsp
movaps 0xeaf(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xe93(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xeb7(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xe9b(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xebf(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xea3(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec7(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeab(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    0x2e28(%rip),%r14
mov    (%r14),%edi
mov    0x2e0e(%rip),%rbx
mov    (%rbx),%esi
lea    0x60(%rsp),%rdx
call   1060 <glMaterialfv@plt>
mov    $0x1,%edi
call   1030 <draw_head_C@plt>
mov    (%r14),%edi
mov    (%rbx),%esi
lea    0x40(%rsp),%rdx
call   1060 <glMaterialfv@plt>
mov    $0x1,%edi
call   1040 <draw_torso_C@plt>
mov    (%r14),%edi
mov    (%rbx),%esi
lea    0x20(%rsp),%rdx
call   1060 <glMaterialfv@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1050 <draw_leg_C@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1050 <draw_leg_C@plt>
mov    (%r14),%edi
mov    (%rbx),%esi
mov    %rsp,%rdx
call   1060 <glMaterialfv@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1070 <draw_arm_C@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1070 <draw_arm_C@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.DrawTheGuy_SC.head_diffuse = [4 x double] [double 0x3FE6666666666666, double 0x3FE6666666666666, double 0.000000e+00, double 1.000000e+00]
@__const.DrawTheGuy_SC.torso_diffuse = [4 x double] [double 0.000000e+00, double 0x3FE6666666666666, double 0x3FE6666666666666, double 1.000000e+00]
@__const.DrawTheGuy_SC.leg_diffuse = [4 x double] [double 0x3FE6666666666666, double 0.000000e+00, double 0x3FE6666666666666, double 1.000000e+00]
@__const.DrawTheGuy_SC.arm_diffuse = [4 x double] [double 0x3FE6666666666666, double 4.000000e-01, double 4.000000e-01, double 1.000000e+00]
@GL_FRONT = global i32 0
@GL_AMBIENT_AND_DIFFUSE = global i32 0
define void @DrawTheGuy_SC() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = alloca [4 x double]
%5 = bitcast [4 x double]* %1 to i8*
%6 = bitcast [4 x double]* %2 to i8*
%7 = bitcast [4 x double]* %3 to i8*
%8 = bitcast [4 x double]* %4 to i8*
%9 = load i32, i32* @GL_FRONT
%10 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%11 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%12 = call i32 @glMaterialfv(i32 %9, i32 %10, double* %11)
%13 = call i32 @draw_head_C(i32 1)
%14 = load i32, i32* @GL_FRONT
%15 = load i32, i32* @GL_AMBIENT_AND_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 = call i32 @draw_torso_C(i32 1)
%19 = load i32, i32* @GL_FRONT
%20 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%21 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%22 = call i32 @glMaterialfv(i32 %19, i32 %20, double* %21)
%23 = call i32 @draw_leg_C(i32 0, i32 1)
%24 = call i32 @draw_leg_C(i32 1, i32 1)
%25 = load i32, i32* @GL_FRONT
%26 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%27 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%28 = call i32 @glMaterialfv(i32 %25, i32 %26, double* %27)
%29 = call i32 @draw_arm_C(i32 0, i32 1)
%30 = call i32 @draw_arm_C(i32 1, i32 1)
ret void
}

LLVM IR (-O2):
@__const.DrawTheGuy_SC.head_diffuse = [4 x double] [double 0x3FE6666666666666, double 0x3FE6666666666666, double 0.000000e+00, double 1.000000e+00]
@__const.DrawTheGuy_SC.torso_diffuse = [4 x double] [double 0.000000e+00, double 0x3FE6666666666666, double 0x3FE6666666666666, double 1.000000e+00]
@__const.DrawTheGuy_SC.leg_diffuse = [4 x double] [double 0x3FE6666666666666, double 0.000000e+00, double 0x3FE6666666666666, double 1.000000e+00]
@__const.DrawTheGuy_SC.arm_diffuse = [4 x double] [double 0x3FE6666666666666, double 4.000000e-01, double 4.000000e-01, double 1.000000e+00]
@GL_FRONT = global i32 0
@GL_AMBIENT_AND_DIFFUSE = global i32 0
define void @DrawTheGuy_SC() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = alloca [4 x double]
%5 = bitcast [4 x double]* %1 to i8*
%6 = bitcast [4 x double]* %2 to i8*
%7 = bitcast [4 x double]* %3 to i8*
%8 = bitcast [4 x double]* %4 to i8*
%9 = load i32, i32* @GL_FRONT
%10 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%11 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%12 = call i32 @glMaterialfv(i32 %9, i32 %10, double* %11)
%13 = call i32 @draw_head_C(i32 1)
%14 = load i32, i32* @GL_FRONT
%15 = load i32, i32* @GL_AMBIENT_AND_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 = call i32 @draw_torso_C(i32 1)
%19 = load i32, i32* @GL_FRONT
%20 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%21 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%22 = call i32 @glMaterialfv(i32 %19, i32 %20, double* %21)
%23 = call i32 @draw_leg_C(i32 0, i32 1)
%24 = call i32 @draw_leg_C(i32 1, i32 1)
%25 = load i32, i32* @GL_FRONT
%26 = load i32, i32* @GL_AMBIENT_AND_DIFFUSE
%27 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%28 = call i32 @glMaterialfv(i32 %25, i32 %26, double* %27)
%29 = call i32 @draw_arm_C(i32 0, i32 1)
%30 = call i32 @draw_arm_C(i32 1, i32 1)
ret void
}