#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_QUAD_STRIP;
double cos(double);
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glColor3d(double, double, double);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glVertex3d(double, double, double);
double sin(double);
void sphere(double r, int m, int n) {
  double step1 = 3.1415926 / (n + 1);
  double step2 = 3.1415926 / (m + 1);
  double drawStep = 0.01;
  double theta = 0;
  double phi = 0;
  double t;
  int i1 = 0;
  int i2 = 0;
  double x1, y1, z1;
  double x2, y2, z2;
  double x3, y3;
  double x4, y4;
  glBegin(GL_QUAD_STRIP);
  for (theta = 0; theta <= 2 * 3.1415926; theta += step1) {
    z1 = r * cos(theta);
    z2 = r * cos(theta + step1);
    if (i1 == 0) {
      i1 = 1;
    } else {
      i1 = 0;
    }
    for (phi = 0; phi <= 2 * 3.1415926; phi += step2) {
      if (i1 == 0) {
        glColor3d(1.0, 0.0, 0.0);
        i1 = 1;
      } else {
        glColor3d(1.0, 0.2, 1.0);
        i1 = 0;
      }
      x1 = r * cos(phi) * sin(theta);
      y1 = r * sin(theta) * sin(phi);
      x2 = r * cos(phi) * sin(theta + step1);
      y2 = r * sin(theta + step1) * sin(phi);
      x3 = r * cos(phi + step2) * sin(theta);
      y3 = r * sin(theta) * sin(phi + step2);
      x4 = r * cos(phi + step2) * sin(theta + step1);
      y4 = r * sin(theta + step1) * sin(phi + step2);
      glVertex3d(x1, y1, z1);
      glVertex3d(x2, y2, z2);
      glVertex3d(x3, y3, z1);
      glVertex3d(x4, y4, z2);
    }
  }
  glEnd();
}


x86 assembly (clang, -O0):
<sphere>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe80(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe65(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe4c(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x44(%rbp)
movl   $0x0,-0x48(%rbp)
mov    0x2e0a(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe1b(%rip),%xmm0
ucomisd -0x30(%rbp),%xmm0
jb     15f2 <sphere+0x492>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
cmpl   $0x0,-0x44(%rbp)
jne    1271 <sphere+0x111>
movl   $0x1,-0x44(%rbp)
jmp    1278 <sphere+0x118>
movl   $0x0,-0x44(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xd88(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     15d9 <sphere+0x479>
cmpl   $0x0,-0x44(%rbp)
jne    12bc <sphere+0x15c>
movsd  0xd73(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1060 <glColor3d@plt>
movl   $0x1,-0x44(%rbp)
jmp    12db <sphere+0x17b>
movsd  0xd54(%rip),%xmm2
movsd  0xd54(%rip),%xmm1
movaps %xmm2,%xmm0
call   1060 <glColor3d@plt>
movl   $0x0,-0x44(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x128(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x120(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x118(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x110(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x108(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x100(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xf8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xb8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
call   1030 <glVertex3d@plt>
movsd  -0x68(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm2
call   1030 <glVertex3d@plt>
movsd  -0x80(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
movsd  -0x60(%rbp),%xmm2
call   1030 <glVertex3d@plt>
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0x78(%rbp),%xmm2
call   1030 <glVertex3d@plt>
movsd  -0x20(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1280 <sphere+0x120>
jmp    15de <sphere+0x47e>
movsd  -0x18(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    11ed <sphere+0x8d>
mov    $0x0,%al
call   1040 <glEnd@plt>
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sphere>:
push   %rbx
sub    $0x80,%rsp
movsd  %xmm0,(%rsp)
add    $0x1,%esi
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
movsd  0xe81(%rip),%xmm2
movapd %xmm2,%xmm3
add    $0x1,%edi
cvtsi2sd %edi,%xmm1
divsd  %xmm0,%xmm3
movsd  %xmm3,0x50(%rsp)
divsd  %xmm1,%xmm2
movsd  %xmm2,0x58(%rsp)
mov    0x2e43(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
xor    %ebx,%ebx
xorpd  %xmm0,%xmm0
jmp    11dc <sphere+0x7c>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  0xe50(%rip),%xmm0
movsd  0x38(%rsp),%xmm1
ucomisd %xmm1,%xmm0
movapd %xmm1,%xmm0
jb     1466 <sphere+0x306>
movsd  %xmm0,0x30(%rsp)
call   1070 <cos@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x48(%rsp)
movsd  0x50(%rsp),%xmm0
addsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x38(%rsp)
call   1070 <cos@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
xor    %eax,%eax
test   %ebx,%ebx
sete   %al
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %eax,%ebx
jmp    143f <sphere+0x2df>
nopl   0x0(%rax)
movsd  0xdd8(%rip),%xmm0
movsd  0xdc8(%rip),%xmm1
movapd %xmm0,%xmm2
call   1060 <glColor3d@plt>
xor    %ebx,%ebx
movsd  0x8(%rsp),%xmm0
call   1070 <cos@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  0x30(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x28(%rsp),%xmm0
movsd  %xmm0,0x78(%rsp)
movsd  0x30(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  0x8(%rsp),%xmm0
call   1050 <sin@plt>
movsd  0x28(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x28(%rsp)
movsd  0x8(%rsp),%xmm0
call   1070 <cos@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x38(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x70(%rsp)
movsd  0x38(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   1050 <sin@plt>
movsd  0x20(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
addsd  0x58(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1070 <cos@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x30(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x68(%rsp)
movsd  0x30(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
call   1050 <sin@plt>
movsd  0x18(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
call   1070 <cos@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x38(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x60(%rsp)
movsd  0x38(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1050 <sin@plt>
movsd  0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0x78(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x48(%rsp),%xmm2
call   1030 <glVertex3d@plt>
movsd  0x70(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x40(%rsp),%xmm2
call   1030 <glVertex3d@plt>
movsd  0x68(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x48(%rsp),%xmm2
call   1030 <glVertex3d@plt>
movsd  0x60(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x40(%rsp),%xmm2
call   1030 <glVertex3d@plt>
movsd  0xbe5(%rip),%xmm0
ucomisd 0x8(%rsp),%xmm0
jb     11c0 <sphere+0x60>
test   %ebx,%ebx
jne    1230 <sphere+0xd0>
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
movsd  0xbb9(%rip),%xmm0
call   1060 <glColor3d@plt>
mov    $0x1,%ebx
jmp    124b <sphere+0xeb>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
jmp    1040 <glEnd@plt>

LLVM IR (-O0):
@GL_QUAD_STRIP = global i32 0
define void @sphere(double %0, i32 %1, i32 %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca i32
%14 = alloca i32
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
store double %0, double* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%25 = load i32, i32* %6
%26 = add nsw i32 %25, 1
%27 = sitofp i32 %26 to double
%28 = fdiv double 0x400921FB4D12D84A, %27
store double %28, double* %7
%29 = load i32, i32* %5
%30 = add nsw i32 %29, 1
%31 = sitofp i32 %30 to double
%32 = fdiv double 0x400921FB4D12D84A, %31
store double %32, double* %8
store double 1.000000e-02, double* %9
store double 0.000000e+00, double* %10
store double 0.000000e+00, double* %11
store i32 0, i32* %13
store i32 0, i32* %14
%33 = load i32, i32* @GL_QUAD_STRIP
%34 = call i32 @glBegin(i32 %33)
store double 0.000000e+00, double* %10
br label %35
35: ; preds = %158, %3
%36 = load double, double* %10
%37 = fcmp ole double %36, 0x401921FB4D12D84A
br i1 %37, label %38, label %162
38: ; preds = %35
%39 = load double, double* %4
%40 = load double, double* %10
%41 = call double @cos(double %40)
%42 = fmul double %39, %41
store double %42, double* %17
%43 = load double, double* %4
%44 = load double, double* %10
%45 = load double, double* %7
%46 = fadd double %44, %45
%47 = call double @cos(double %46)
%48 = fmul double %43, %47
store double %48, double* %20
%49 = load i32, i32* %13
%50 = icmp eq i32 %49, 0
br i1 %50, label %51, label %52
51: ; preds = %38
store i32 1, i32* %13
br label %53
52: ; preds = %38
store i32 0, i32* %13
br label %53
53: ; preds = %52, %51
store double 0.000000e+00, double* %11
br label %54
54: ; preds = %153, %53
%55 = load double, double* %11
%56 = fcmp ole double %55, 0x401921FB4D12D84A
br i1 %56, label %57, label %157
57: ; preds = %54
%58 = load i32, i32* %13
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %62
60: ; preds = %57
%61 = call i32 @glColor3d(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
store i32 1, i32* %13
br label %64
62: ; preds = %57
%63 = call i32 @glColor3d(double 1.000000e+00, double 2.000000e-01, double 1.000000e+00)
store i32 0, i32* %13
br label %64
64: ; preds = %62, %60
%65 = load double, double* %4
%66 = load double, double* %11
%67 = call double @cos(double %66)
%68 = fmul double %65, %67
%69 = load double, double* %10
%70 = call double @sin(double %69)
%71 = fmul double %68, %70
store double %71, double* %15
%72 = load double, double* %4
%73 = load double, double* %10
%74 = call double @sin(double %73)
%75 = fmul double %72, %74
%76 = load double, double* %11
%77 = call double @sin(double %76)
%78 = fmul double %75, %77
store double %78, double* %16
%79 = load double, double* %4
%80 = load double, double* %11
%81 = call double @cos(double %80)
%82 = fmul double %79, %81
%83 = load double, double* %10
%84 = load double, double* %7
%85 = fadd double %83, %84
%86 = call double @sin(double %85)
%87 = fmul double %82, %86
store double %87, double* %18
%88 = load double, double* %4
%89 = load double, double* %10
%90 = load double, double* %7
%91 = fadd double %89, %90
%92 = call double @sin(double %91)
%93 = fmul double %88, %92
%94 = load double, double* %11
%95 = call double @sin(double %94)
%96 = fmul double %93, %95
store double %96, double* %19
%97 = load double, double* %4
%98 = load double, double* %11
%99 = load double, double* %8
%100 = fadd double %98, %99
%101 = call double @cos(double %100)
%102 = fmul double %97, %101
%103 = load double, double* %10
%104 = call double @sin(double %103)
%105 = fmul double %102, %104
store double %105, double* %21
%106 = load double, double* %4
%107 = load double, double* %10
%108 = call double @sin(double %107)
%109 = fmul double %106, %108
%110 = load double, double* %11
%111 = load double, double* %8
%112 = fadd double %110, %111
%113 = call double @sin(double %112)
%114 = fmul double %109, %113
store double %114, double* %22
%115 = load double, double* %4
%116 = load double, double* %11
%117 = load double, double* %8
%118 = fadd double %116, %117
%119 = call double @cos(double %118)
%120 = fmul double %115, %119
%121 = load double, double* %10
%122 = load double, double* %7
%123 = fadd double %121, %122
%124 = call double @sin(double %123)
%125 = fmul double %120, %124
store double %125, double* %23
%126 = load double, double* %4
%127 = load double, double* %10
%128 = load double, double* %7
%129 = fadd double %127, %128
%130 = call double @sin(double %129)
%131 = fmul double %126, %130
%132 = load double, double* %11
%133 = load double, double* %8
%134 = fadd double %132, %133
%135 = call double @sin(double %134)
%136 = fmul double %131, %135
store double %136, double* %24
%137 = load double, double* %15
%138 = load double, double* %16
%139 = load double, double* %17
%140 = call i32 @glVertex3d(double %137, double %138, double %139)
%141 = load double, double* %18
%142 = load double, double* %19
%143 = load double, double* %20
%144 = call i32 @glVertex3d(double %141, double %142, double %143)
%145 = load double, double* %21
%146 = load double, double* %22
%147 = load double, double* %17
%148 = call i32 @glVertex3d(double %145, double %146, double %147)
%149 = load double, double* %23
%150 = load double, double* %24
%151 = load double, double* %20
%152 = call i32 @glVertex3d(double %149, double %150, double %151)
br label %153
153: ; preds = %64
%154 = load double, double* %8
%155 = load double, double* %11
%156 = fadd double %155, %154
store double %156, double* %11
br label %54
157: ; preds = %54
br label %158
158: ; preds = %157
%159 = load double, double* %7
%160 = load double, double* %10
%161 = fadd double %160, %159
store double %161, double* %10
br label %35
162: ; preds = %35
%163 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_QUAD_STRIP = global i32 0
define void @sphere(double %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, 1
%5 = sitofp i32 %4 to double
%6 = fdiv double 0x400921FB4D12D84A, %5
%7 = add nsw i32 %1, 1
%8 = sitofp i32 %7 to double
%9 = fdiv double 0x400921FB4D12D84A, %8
%10 = load i32, i32* @GL_QUAD_STRIP
%11 = tail call i32 @glBegin(i32 %10)
br label %14
12: ; preds = %32
%13 = fcmp ugt double %19, 0x401921FB4D12D84A
br i1 %13, label %72, label %14
14: ; preds = %3, %12
%15 = phi double [ 0.000000e+00, %3 ], [ %19, %12 ]
%16 = phi i32 [ 0, %3 ], [ %33, %12 ]
%17 = tail call double @cos(double %15)
%18 = fmul double %17, %0
%19 = fadd double %6, %15
%20 = tail call double @cos(double %19)
%21 = fmul double %20, %0
%22 = icmp eq i32 %16, 0
%23 = zext i1 %22 to i32
br label %24
24: ; preds = %14, %32
%25 = phi double [ 0.000000e+00, %14 ], [ %50, %32 ]
%26 = phi i32 [ %23, %14 ], [ %33, %32 ]
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = tail call i32 @glColor3d(double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
br label %32
30: ; preds = %24
%31 = tail call i32 @glColor3d(double 1.000000e+00, double 2.000000e-01, double 1.000000e+00)
br label %32
32: ; preds = %30, %28
%33 = phi i32 [ 1, %28 ], [ 0, %30 ]
%34 = tail call double @cos(double %25)
%35 = fmul double %34, %0
%36 = tail call double @sin(double %15)
%37 = fmul double %35, %36
%38 = tail call double @sin(double %15)
%39 = fmul double %38, %0
%40 = tail call double @sin(double %25)
%41 = fmul double %39, %40
%42 = tail call double @cos(double %25)
%43 = fmul double %42, %0
%44 = tail call double @sin(double %19)
%45 = fmul double %43, %44
%46 = tail call double @sin(double %19)
%47 = fmul double %46, %0
%48 = tail call double @sin(double %25)
%49 = fmul double %47, %48
%50 = fadd double %9, %25
%51 = tail call double @cos(double %50)
%52 = fmul double %51, %0
%53 = tail call double @sin(double %15)
%54 = fmul double %52, %53
%55 = tail call double @sin(double %15)
%56 = fmul double %55, %0
%57 = tail call double @sin(double %50)
%58 = fmul double %56, %57
%59 = tail call double @cos(double %50)
%60 = fmul double %59, %0
%61 = tail call double @sin(double %19)
%62 = fmul double %60, %61
%63 = tail call double @sin(double %19)
%64 = fmul double %63, %0
%65 = tail call double @sin(double %50)
%66 = fmul double %64, %65
%67 = tail call i32 @glVertex3d(double %37, double %41, double %18)
%68 = tail call i32 @glVertex3d(double %45, double %49, double %21)
%69 = tail call i32 @glVertex3d(double %54, double %58, double %18)
%70 = tail call i32 @glVertex3d(double %62, double %66, double %21)
%71 = fcmp ugt double %50, 0x401921FB4D12D84A
br i1 %71, label %12, label %24
72: ; preds = %12
%73 = tail call i32 (...) @glEnd()
ret void
}