#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 int /*<<< orphan*/ GLfloat;

/* Variables and functions */
int /*<<< orphan*/ glColor4f(float, float, float, double);
int /*<<< orphan*/ glTranslatef(int /*<<< orphan*/, int /*<<< orphan*/, double);
int /*<<< orphan*/ glutSolidSphere(double, int, int);
void gl_print_sphere(GLfloat x, GLfloat y, float r, float g, float b) {
  glColor4f(r, g, b, 1.0);
  glTranslatef(x, y, -50.0);
  glutSolidSphere(1.0, 16, 16);
  glTranslatef(-x, -y, +50.0);
}


x86 assembly (clang, -O0):
<gl_print_sphere>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
movsd  0xea4(%rip),%xmm3
call   1030 <glColor4f@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
movsd  0xe99(%rip),%xmm0
call   1050 <glTranslatef@plt>
movsd  0xe84(%rip),%xmm0
mov    $0x10,%esi
mov    %esi,%edi
call   1040 <glutSolidSphere@plt>
xor    %edi,%edi
sub    -0x4(%rbp),%edi
xor    %esi,%esi
sub    -0x8(%rbp),%esi
movsd  0xe5e(%rip),%xmm0
call   1050 <glTranslatef@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gl_print_sphere>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
movsd  0xec1(%rip),%xmm3
call   1030 <glColor4f@plt>
movsd  0xebc(%rip),%xmm0
mov    %ebp,%edi
mov    %ebx,%esi
call   1050 <glTranslatef@plt>
movsd  0xea3(%rip),%xmm0
mov    $0x10,%edi
mov    $0x10,%esi
call   1040 <glutSolidSphere@plt>
neg    %ebp
neg    %ebx
movsd  0xe98(%rip),%xmm0
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <glTranslatef@plt>

LLVM IR (-O0):
define void @gl_print_sphere(i32 %0, i32 %1, float %2, float %3, float %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca float
store i32 %0, i32* %6
store i32 %1, i32* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%11 = load float, float* %8
%12 = load float, float* %9
%13 = load float, float* %10
%14 = call i32 @glColor4f(float %11, float %12, float %13, double 1.000000e+00)
%15 = load i32, i32* %6
%16 = load i32, i32* %7
%17 = call i32 @glTranslatef(i32 %15, i32 %16, double -5.000000e+01)
%18 = call i32 @glutSolidSphere(double 1.000000e+00, i32 16, i32 16)
%19 = load i32, i32* %6
%20 = sub nsw i32 0, %19
%21 = load i32, i32* %7
%22 = sub nsw i32 0, %21
%23 = call i32 @glTranslatef(i32 %20, i32 %22, double 5.000000e+01)
ret void
}

LLVM IR (-O2):
define void @gl_print_sphere(i32 %0, i32 %1, float %2, float %3, float %4) {
%6 = tail call i32 @glColor4f(float %2, float %3, float %4, double 1.000000e+00)
%7 = tail call i32 @glTranslatef(i32 %0, i32 %1, double -5.000000e+01)
%8 = tail call i32 @glutSolidSphere(double 1.000000e+00, i32 16, i32 16)
%9 = sub nsw i32 0, %0
%10 = sub nsw i32 0, %1
%11 = tail call i32 @glTranslatef(i32 %9, i32 %10, double 5.000000e+01)
ret void
}