#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*/ GL_QUADS;
int M_PI;
double const cos(float);
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3f(int, double, double const);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glVertex3f(double const, double const, double const);
double const sin(float);
void makeSphere(const double rad) {
  const float it = 100.0;
  float i, a;
  glBegin(GL_QUADS);
  for (a = 0; a < it; a += 1.0)
    for (i = 0; i < it; i += 1.0) {
      glColor3f(sin(a / (it * 3)) * 2 * M_PI, 0.5,
                sin((i / (it / 10)) * 2 * M_PI));
      glVertex3f(
          rad * sin((a / (it * 2)) * 2 * M_PI) * cos(((i) / it) * 2 * M_PI),
          rad * sin((a / (it * 2)) * 2 * M_PI) * sin(((i) / it) * 2 * M_PI),
          rad * cos((a / (it * 2)) * 2 * M_PI));
      glVertex3f(
          rad * sin((a / (it * 2)) * 2 * M_PI) * cos(((i + 1) / it) * 2 * M_PI),
          rad * sin((a / (it * 2)) * 2 * M_PI) * sin(((i + 1) / it) * 2 * M_PI),
          rad * cos((a / (it * 2)) * 2 * M_PI));
      glVertex3f(rad * sin(((a + 1) / (it * 2)) * 2 * M_PI) *
                     cos(((i + 1) / it) * 2 * M_PI),
                 rad * sin(((a + 1) / (it * 2)) * 2 * M_PI) *
                     sin(((i + 1) / it) * 2 * M_PI),
                 rad * cos(((a + 1) / (it * 2)) * 2 * M_PI));
      glVertex3f(rad * sin(((a + 1) / (it * 2)) * 2 * M_PI) *
                     cos(((i) / it) * 2 * M_PI),
                 rad * sin(((a + 1) / (it * 2)) * 2 * M_PI) *
                     sin(((i) / it) * 2 * M_PI),
                 rad * cos(((a + 1) / (it * 2)) * 2 * M_PI));
    }
  glEnd();
}


x86 assembly (clang, -O0):
<makeSphere>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movsd  %xmm0,-0x8(%rbp)
movss  0xe88(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    0x2e5c(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xe65(%rip),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    18fe <makeSphere+0x79e>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe4b(%rip),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    18d6 <makeSphere+0x776>
movss  -0x14(%rbp),%xmm0
movss  0xe48(%rip),%xmm1
divss  %xmm1,%xmm0
call   1050 <sin@plt>
movsd  0xe4b(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2e00(%rip),%rax
cvtsi2sdl (%rax),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xfc(%rbp)
movss  -0x10(%rbp),%xmm0
movss  0xe09(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xdf1(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x2dca(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1050 <sin@plt>
mov    -0xfc(%rbp),%edi
movaps %xmm0,%xmm1
movsd  0xde4(%rip),%xmm0
call   1060 <glColor3f@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movss  -0x14(%rbp),%xmm0
movss  0xdad(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xd9d(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x2d76(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xf8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movss  -0x10(%rbp),%xmm0
movss  0xd5d(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xd55(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x2d2e(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movss  -0x14(%rbp),%xmm0
movss  0xd10(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xd00(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x2cd9(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movss  -0x10(%rbp),%xmm0
movss  0xcc0(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xcb8(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x2c91(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movss  -0x14(%rbp),%xmm0
movss  0xc73(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xc63(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x2c3c(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1070 <cos@plt>
movsd  -0xd8(%rbp),%xmm2
ff
movsd  -0xd0(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm2
call   1030 <glVertex3f@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movss  -0x14(%rbp),%xmm0
movss  0xc11(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xc01(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x2bda(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movss  0xbd2(%rip),%xmm0
addss  -0x10(%rbp),%xmm0
movss  0xbb9(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xbb1(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x2b8a(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xb8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movss  -0x14(%rbp),%xmm0
movss  0xb6c(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xb5c(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x2b35(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movss  0xb2d(%rip),%xmm0
addss  -0x10(%rbp),%xmm0
movss  0xb14(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xb0c(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x2ae5(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movss  -0x14(%rbp),%xmm0
movss  0xac7(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xab7(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x2a90(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1070 <cos@plt>
movsd  -0xa0(%rbp),%xmm2
ff
movsd  -0x98(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0x90(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm2
call   1030 <glVertex3f@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movss  0xa6e(%rip),%xmm0
addss  -0x14(%rbp),%xmm0
movss  0xa5d(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xa4d(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x2a26(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movss  0xa21(%rip),%xmm0
addss  -0x10(%rbp),%xmm0
movss  0xa08(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xa00(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x29d9(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movss  0x9cd(%rip),%xmm0
addss  -0x14(%rbp),%xmm0
movss  0x9bc(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0x9ac(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x2985(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movss  0x983(%rip),%xmm0
addss  -0x10(%rbp),%xmm0
movss  0x96a(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0x962(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x293b(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movss  0x92f(%rip),%xmm0
addss  -0x14(%rbp),%xmm0
movss  0x91e(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0x90e(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x28e7(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1070 <cos@plt>
movsd  -0x68(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
movaps %xmm0,%xmm3
movsd  -0x58(%rbp),%xmm0
mulsd  %xmm3,%xmm2
call   1030 <glVertex3f@plt>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movss  0x8d1(%rip),%xmm0
addss  -0x14(%rbp),%xmm0
movss  0x8c0(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0x8b0(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x2889(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movss  -0x10(%rbp),%xmm0
movss  0x876(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0x86e(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x2847(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movss  0x83b(%rip),%xmm0
addss  -0x14(%rbp),%xmm0
movss  0x82a(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0x81a(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x27f3(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movss  -0x10(%rbp),%xmm0
movss  0x7e0(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0x7d8(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x27b1(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movss  0x7a5(%rip),%xmm0
addss  -0x14(%rbp),%xmm0
movss  0x794(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0x784(%rip),%xmm1
mulss  %xmm1,%xmm0
mov    0x275d(%rip),%rax
cvtsi2ssl (%rax),%xmm1
mulss  %xmm1,%xmm0
call   1070 <cos@plt>
movsd  -0x30(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
movaps %xmm0,%xmm3
movsd  -0x20(%rbp),%xmm0
mulsd  %xmm3,%xmm2
call   1030 <glVertex3f@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0x754(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    11ad <makeSphere+0x4d>
jmp    18db <makeSphere+0x77b>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0x72c(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1193 <makeSphere+0x33>
mov    $0x0,%al
call   1040 <glEnd@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeSphere>:
push   %rbp
push   %r14
push   %rbx
sub    $0x40,%rsp
movsd  %xmm0,0x20(%rsp)
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
xor    %r14d,%r14d
movss  0xe81(%rip),%xmm1
mov    0x2e5a(%rip),%rbp
xchg   %ax,%ax
xorps  %xmm2,%xmm2
cvtsi2ss %r14d,%xmm2
movaps %xmm2,%xmm0
divss  0xe5d(%rip),%xmm0
movss  %xmm0,0x3c(%rsp)
movaps %xmm2,%xmm3
movss  0xe50(%rip),%xmm0
divss  %xmm0,%xmm3
addss  %xmm3,%xmm3
movss  %xmm3,0x18(%rsp)
addss  %xmm1,%xmm2
divss  %xmm0,%xmm2
addss  %xmm2,%xmm2
movss  %xmm2,0x1c(%rsp)
xorps  %xmm0,%xmm0
movss  %xmm0,0x28(%rsp)
nopl   (%rax)
movss  0x3c(%rsp),%xmm0
call   1050 <sin@plt>
addsd  %xmm0,%xmm0
mov    0x0(%rbp),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  %xmm0,%xmm1
cvttsd2si %xmm1,%ebx
movss  0x28(%rsp),%xmm1
divss  0xdfd(%rip),%xmm1
addss  %xmm1,%xmm1
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
mov    %ebx,%edi
movsd  0xde8(%rip),%xmm0
call   1060 <glColor3f@plt>
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x18(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movss  0x28(%rsp),%xmm1
divss  0xdae(%rip),%xmm1
addss  %xmm1,%xmm1
movss  %xmm1,0x2c(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  %xmm1,%xmm0
call   1070 <cos@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x18(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x2c(%rsp),%xmm0
call   1050 <sin@plt>
movsd  0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x18(%rsp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm2
mulsd  0x20(%rsp),%xmm2
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x18(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movss  0x28(%rsp),%xmm0
addss  0xce3(%rip),%xmm0
movss  %xmm0,0x28(%rsp)
movaps %xmm0,%xmm1
divss  0xcda(%rip),%xmm1
addss  %xmm1,%xmm1
movss  %xmm1,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  %xmm1,%xmm0
call   1070 <cos@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x18(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x10(%rsp),%xmm0
call   1050 <sin@plt>
movsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x18(%rsp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm2
mulsd  0x20(%rsp),%xmm2
movsd  0x30(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x1c(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x10(%rsp),%xmm0
call   1070 <cos@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x1c(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x10(%rsp),%xmm0
call   1050 <sin@plt>
movsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x1c(%rsp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm2
mulsd  0x20(%rsp),%xmm2
movsd  0x30(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1030 <glVertex3f@plt>
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x1c(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x2c(%rsp),%xmm0
call   1070 <cos@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x1c(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x2c(%rsp),%xmm0
call   1050 <sin@plt>
movsd  0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x0(%rbp),%xmm0
mulss  0x1c(%rsp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm2
mulsd  0x20(%rsp),%xmm2
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1030 <glVertex3f@plt>
movss  0xae2(%rip),%xmm0
ucomiss 0x28(%rsp),%xmm0
ja     11e0 <makeSphere+0x80>
add    $0x1,%r14d
cmp    $0x64,%r14d
movss  0xabf(%rip),%xmm1
jne    1190 <makeSphere+0x30>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <glEnd@plt>

LLVM IR (-O0):
@GL_QUADS = global i32 0
@M_PI = global i32 0
define void @makeSphere(double %0) {
%2 = alloca double
%3 = alloca float
%4 = alloca float
%5 = alloca float
store double %0, double* %2
store float 1.000000e+02, float* %3
%6 = load i32, i32* @GL_QUADS
%7 = call i32 @glBegin(i32 %6)
store float 0.000000e+00, float* %5
br label %8
8: ; preds = %224, %1
%9 = load float, float* %5
%10 = fcmp olt float %9, 1.000000e+02
br i1 %10, label %11, label %229
11: ; preds = %8
store float 0.000000e+00, float* %4
br label %12
12: ; preds = %218, %11
%13 = load float, float* %4
%14 = fcmp olt float %13, 1.000000e+02
br i1 %14, label %15, label %223
15: ; preds = %12
%16 = load float, float* %5
%17 = fdiv float %16, 3.000000e+02
%18 = call double @sin(float %17)
%19 = fmul double %18, 2.000000e+00
%20 = load i32, i32* @M_PI
%21 = sitofp i32 %20 to double
%22 = fmul double %19, %21
%23 = fptosi double %22 to i32
%24 = load float, float* %4
%25 = fdiv float %24, 1.000000e+01
%26 = fmul float %25, 2.000000e+00
%27 = load i32, i32* @M_PI
%28 = sitofp i32 %27 to float
%29 = fmul float %26, %28
%30 = call double @sin(float %29)
%31 = call i32 @glColor3f(i32 %23, double 5.000000e-01, double %30)
%32 = load double, double* %2
%33 = load float, float* %5
%34 = fdiv float %33, 2.000000e+02
%35 = fmul float %34, 2.000000e+00
%36 = load i32, i32* @M_PI
%37 = sitofp i32 %36 to float
%38 = fmul float %35, %37
%39 = call double @sin(float %38)
%40 = fmul double %32, %39
%41 = load float, float* %4
%42 = fdiv float %41, 1.000000e+02
%43 = fmul float %42, 2.000000e+00
%44 = load i32, i32* @M_PI
%45 = sitofp i32 %44 to float
%46 = fmul float %43, %45
%47 = call double @cos(float %46)
%48 = fmul double %40, %47
%49 = load double, double* %2
%50 = load float, float* %5
%51 = fdiv float %50, 2.000000e+02
%52 = fmul float %51, 2.000000e+00
%53 = load i32, i32* @M_PI
%54 = sitofp i32 %53 to float
%55 = fmul float %52, %54
%56 = call double @sin(float %55)
%57 = fmul double %49, %56
%58 = load float, float* %4
%59 = fdiv float %58, 1.000000e+02
%60 = fmul float %59, 2.000000e+00
%61 = load i32, i32* @M_PI
%62 = sitofp i32 %61 to float
%63 = fmul float %60, %62
%64 = call double @sin(float %63)
%65 = fmul double %57, %64
%66 = load double, double* %2
%67 = load float, float* %5
%68 = fdiv float %67, 2.000000e+02
%69 = fmul float %68, 2.000000e+00
%70 = load i32, i32* @M_PI
%71 = sitofp i32 %70 to float
%72 = fmul float %69, %71
%73 = call double @cos(float %72)
%74 = fmul double %66, %73
%75 = call i32 @glVertex3f(double %48, double %65, double %74)
%76 = load double, double* %2
%77 = load float, float* %5
%78 = fdiv float %77, 2.000000e+02
%79 = fmul float %78, 2.000000e+00
%80 = load i32, i32* @M_PI
%81 = sitofp i32 %80 to float
%82 = fmul float %79, %81
%83 = call double @sin(float %82)
%84 = fmul double %76, %83
%85 = load float, float* %4
%86 = fadd float %85, 1.000000e+00
%87 = fdiv float %86, 1.000000e+02
%88 = fmul float %87, 2.000000e+00
%89 = load i32, i32* @M_PI
%90 = sitofp i32 %89 to float
%91 = fmul float %88, %90
%92 = call double @cos(float %91)
%93 = fmul double %84, %92
%94 = load double, double* %2
%95 = load float, float* %5
%96 = fdiv float %95, 2.000000e+02
%97 = fmul float %96, 2.000000e+00
%98 = load i32, i32* @M_PI
%99 = sitofp i32 %98 to float
%100 = fmul float %97, %99
%101 = call double @sin(float %100)
%102 = fmul double %94, %101
%103 = load float, float* %4
%104 = fadd float %103, 1.000000e+00
%105 = fdiv float %104, 1.000000e+02
%106 = fmul float %105, 2.000000e+00
%107 = load i32, i32* @M_PI
%108 = sitofp i32 %107 to float
%109 = fmul float %106, %108
%110 = call double @sin(float %109)
%111 = fmul double %102, %110
%112 = load double, double* %2
%113 = load float, float* %5
%114 = fdiv float %113, 2.000000e+02
%115 = fmul float %114, 2.000000e+00
%116 = load i32, i32* @M_PI
%117 = sitofp i32 %116 to float
%118 = fmul float %115, %117
%119 = call double @cos(float %118)
%120 = fmul double %112, %119
%121 = call i32 @glVertex3f(double %93, double %111, double %120)
%122 = load double, double* %2
%123 = load float, float* %5
%124 = fadd float %123, 1.000000e+00
%125 = fdiv float %124, 2.000000e+02
%126 = fmul float %125, 2.000000e+00
%127 = load i32, i32* @M_PI
%128 = sitofp i32 %127 to float
%129 = fmul float %126, %128
%130 = call double @sin(float %129)
%131 = fmul double %122, %130
%132 = load float, float* %4
%133 = fadd float %132, 1.000000e+00
%134 = fdiv float %133, 1.000000e+02
%135 = fmul float %134, 2.000000e+00
%136 = load i32, i32* @M_PI
%137 = sitofp i32 %136 to float
%138 = fmul float %135, %137
%139 = call double @cos(float %138)
%140 = fmul double %131, %139
%141 = load double, double* %2
%142 = load float, float* %5
%143 = fadd float %142, 1.000000e+00
%144 = fdiv float %143, 2.000000e+02
%145 = fmul float %144, 2.000000e+00
%146 = load i32, i32* @M_PI
%147 = sitofp i32 %146 to float
%148 = fmul float %145, %147
%149 = call double @sin(float %148)
%150 = fmul double %141, %149
%151 = load float, float* %4
%152 = fadd float %151, 1.000000e+00
%153 = fdiv float %152, 1.000000e+02
%154 = fmul float %153, 2.000000e+00
%155 = load i32, i32* @M_PI
%156 = sitofp i32 %155 to float
%157 = fmul float %154, %156
%158 = call double @sin(float %157)
%159 = fmul double %150, %158
%160 = load double, double* %2
%161 = load float, float* %5
%162 = fadd float %161, 1.000000e+00
%163 = fdiv float %162, 2.000000e+02
%164 = fmul float %163, 2.000000e+00
%165 = load i32, i32* @M_PI
%166 = sitofp i32 %165 to float
%167 = fmul float %164, %166
%168 = call double @cos(float %167)
%169 = fmul double %160, %168
%170 = call i32 @glVertex3f(double %140, double %159, double %169)
%171 = load double, double* %2
%172 = load float, float* %5
%173 = fadd float %172, 1.000000e+00
%174 = fdiv float %173, 2.000000e+02
%175 = fmul float %174, 2.000000e+00
%176 = load i32, i32* @M_PI
%177 = sitofp i32 %176 to float
%178 = fmul float %175, %177
%179 = call double @sin(float %178)
%180 = fmul double %171, %179
%181 = load float, float* %4
%182 = fdiv float %181, 1.000000e+02
%183 = fmul float %182, 2.000000e+00
%184 = load i32, i32* @M_PI
%185 = sitofp i32 %184 to float
%186 = fmul float %183, %185
%187 = call double @cos(float %186)
%188 = fmul double %180, %187
%189 = load double, double* %2
%190 = load float, float* %5
%191 = fadd float %190, 1.000000e+00
%192 = fdiv float %191, 2.000000e+02
%193 = fmul float %192, 2.000000e+00
%194 = load i32, i32* @M_PI
%195 = sitofp i32 %194 to float
%196 = fmul float %193, %195
%197 = call double @sin(float %196)
%198 = fmul double %189, %197
%199 = load float, float* %4
%200 = fdiv float %199, 1.000000e+02
%201 = fmul float %200, 2.000000e+00
%202 = load i32, i32* @M_PI
%203 = sitofp i32 %202 to float
%204 = fmul float %201, %203
%205 = call double @sin(float %204)
%206 = fmul double %198, %205
%207 = load double, double* %2
%208 = load float, float* %5
%209 = fadd float %208, 1.000000e+00
%210 = fdiv float %209, 2.000000e+02
%211 = fmul float %210, 2.000000e+00
%212 = load i32, i32* @M_PI
%213 = sitofp i32 %212 to float
%214 = fmul float %211, %213
%215 = call double @cos(float %214)
%216 = fmul double %207, %215
%217 = call i32 @glVertex3f(double %188, double %206, double %216)
br label %218
218: ; preds = %15
%219 = load float, float* %4
%220 = fpext float %219 to double
%221 = fadd double %220, 1.000000e+00
%222 = fptrunc double %221 to float
store float %222, float* %4
br label %12
223: ; preds = %12
br label %224
224: ; preds = %223
%225 = load float, float* %5
%226 = fpext float %225 to double
%227 = fadd double %226, 1.000000e+00
%228 = fptrunc double %227 to float
store float %228, float* %5
br label %8
229: ; preds = %8
%230 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_QUADS = global i32 0
@M_PI = global i32 0
define void @makeSphere(double %0) {
%2 = load i32, i32* @GL_QUADS
%3 = tail call i32 @glBegin(i32 %2)
br label %4
4: ; preds = %1, %137
%5 = phi i32 [ 0, %1 ], [ %138, %137 ]
%6 = sitofp i32 %5 to float
%7 = fdiv float %6, 3.000000e+02
%8 = fdiv float %6, 2.000000e+02
%9 = fmul float %8, 2.000000e+00
%10 = fadd float %6, 1.000000e+00
%11 = fdiv float %10, 2.000000e+02
%12 = fmul float %11, 2.000000e+00
br label %13
13: ; preds = %4, %13
%14 = phi float [ 0.000000e+00, %4 ], [ %60, %13 ]
%15 = tail call double @sin(float %7)
%16 = fmul double %15, 2.000000e+00
%17 = load i32, i32* @M_PI
%18 = sitofp i32 %17 to double
%19 = fmul double %16, %18
%20 = fptosi double %19 to i32
%21 = fdiv float %14, 1.000000e+01
%22 = fmul float %21, 2.000000e+00
%23 = sitofp i32 %17 to float
%24 = fmul float %22, %23
%25 = tail call double @sin(float %24)
%26 = tail call i32 @glColor3f(i32 %20, double 5.000000e-01, double %25)
%27 = load i32, i32* @M_PI
%28 = sitofp i32 %27 to float
%29 = fmul float %9, %28
%30 = tail call double @sin(float %29)
%31 = fmul double %30, %0
%32 = fdiv float %14, 1.000000e+02
%33 = fmul float %32, 2.000000e+00
%34 = load i32, i32* @M_PI
%35 = sitofp i32 %34 to float
%36 = fmul float %33, %35
%37 = tail call double @cos(float %36)
%38 = fmul double %31, %37
%39 = load i32, i32* @M_PI
%40 = sitofp i32 %39 to float
%41 = fmul float %9, %40
%42 = tail call double @sin(float %41)
%43 = fmul double %42, %0
%44 = load i32, i32* @M_PI
%45 = sitofp i32 %44 to float
%46 = fmul float %33, %45
%47 = tail call double @sin(float %46)
%48 = fmul double %43, %47
%49 = load i32, i32* @M_PI
%50 = sitofp i32 %49 to float
%51 = fmul float %9, %50
%52 = tail call double @cos(float %51)
%53 = fmul double %52, %0
%54 = tail call i32 @glVertex3f(double %38, double %48, double %53)
%55 = load i32, i32* @M_PI
%56 = sitofp i32 %55 to float
%57 = fmul float %9, %56
%58 = tail call double @sin(float %57)
%59 = fmul double %58, %0
%60 = fadd float %14, 1.000000e+00
%61 = fdiv float %60, 1.000000e+02
%62 = fmul float %61, 2.000000e+00
%63 = load i32, i32* @M_PI
%64 = sitofp i32 %63 to float
%65 = fmul float %62, %64
%66 = tail call double @cos(float %65)
%67 = fmul double %59, %66
%68 = load i32, i32* @M_PI
%69 = sitofp i32 %68 to float
%70 = fmul float %9, %69
%71 = tail call double @sin(float %70)
%72 = fmul double %71, %0
%73 = load i32, i32* @M_PI
%74 = sitofp i32 %73 to float
%75 = fmul float %62, %74
%76 = tail call double @sin(float %75)
%77 = fmul double %72, %76
%78 = load i32, i32* @M_PI
%79 = sitofp i32 %78 to float
%80 = fmul float %9, %79
%81 = tail call double @cos(float %80)
%82 = fmul double %81, %0
%83 = tail call i32 @glVertex3f(double %67, double %77, double %82)
%84 = load i32, i32* @M_PI
%85 = sitofp i32 %84 to float
%86 = fmul float %12, %85
%87 = tail call double @sin(float %86)
%88 = fmul double %87, %0
%89 = load i32, i32* @M_PI
%90 = sitofp i32 %89 to float
%91 = fmul float %62, %90
%92 = tail call double @cos(float %91)
%93 = fmul double %88, %92
%94 = load i32, i32* @M_PI
%95 = sitofp i32 %94 to float
%96 = fmul float %12, %95
%97 = tail call double @sin(float %96)
%98 = fmul double %97, %0
%99 = load i32, i32* @M_PI
%100 = sitofp i32 %99 to float
%101 = fmul float %62, %100
%102 = tail call double @sin(float %101)
%103 = fmul double %98, %102
%104 = load i32, i32* @M_PI
%105 = sitofp i32 %104 to float
%106 = fmul float %12, %105
%107 = tail call double @cos(float %106)
%108 = fmul double %107, %0
%109 = tail call i32 @glVertex3f(double %93, double %103, double %108)
%110 = load i32, i32* @M_PI
%111 = sitofp i32 %110 to float
%112 = fmul float %12, %111
%113 = tail call double @sin(float %112)
%114 = fmul double %113, %0
%115 = load i32, i32* @M_PI
%116 = sitofp i32 %115 to float
%117 = fmul float %33, %116
%118 = tail call double @cos(float %117)
%119 = fmul double %114, %118
%120 = load i32, i32* @M_PI
%121 = sitofp i32 %120 to float
%122 = fmul float %12, %121
%123 = tail call double @sin(float %122)
%124 = fmul double %123, %0
%125 = load i32, i32* @M_PI
%126 = sitofp i32 %125 to float
%127 = fmul float %33, %126
%128 = tail call double @sin(float %127)
%129 = fmul double %124, %128
%130 = load i32, i32* @M_PI
%131 = sitofp i32 %130 to float
%132 = fmul float %12, %131
%133 = tail call double @cos(float %132)
%134 = fmul double %133, %0
%135 = tail call i32 @glVertex3f(double %119, double %129, double %134)
%136 = fcmp olt float %60, 1.000000e+02
br i1 %136, label %13, label %137
137: ; preds = %13
%138 = add nuw nsw i32 %5, 1
%139 = icmp eq i32 %138, 100
br i1 %139, label %140, label %4
140: ; preds = %137
%141 = tail call i32 (...) @glEnd()
ret void
}