#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 t, theta = 0, phi = 0;
  int i1 = 0, i2 = 0;
  double x1, y1, z1;
  double x2, y2, z2;
  double x3, y3;
  double x4, y4;
  glBegin(GL_QUAD_STRIP);
  for (theta = 0; theta <= 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(0.0, 1.0, 0.0);
        i1 = 1;
      } else {
        glColor3d(0.0, 0.8, 0.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    $0x120,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe78(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe5d(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
mov    0x2e17(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe18(%rip),%xmm0
ucomisd -0x30(%rbp),%xmm0
jb     15f1 <sphere+0x491>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jne    127b <sphere+0x11b>
movl   $0x1,-0x3c(%rbp)
jmp    1282 <sphere+0x122>
movl   $0x0,-0x3c(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xd76(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jb     15d8 <sphere+0x478>
cmpl   $0x0,-0x3c(%rbp)
jne    12c6 <sphere+0x166>
xorps  %xmm2,%xmm2
movsd  0xd66(%rip),%xmm1
movaps %xmm2,%xmm0
call   1060 <glColor3d@plt>
movl   $0x1,-0x3c(%rbp)
jmp    12e0 <sphere+0x180>
xorps  %xmm2,%xmm2
movsd  0xd3f(%rip),%xmm1
movaps %xmm2,%xmm0
call   1060 <glColor3d@plt>
movl   $0x0,-0x3c(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x120(%rbp),%xmm0
ff
mulsd  %xmm1,%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,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x110(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x108(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x100(%rbp),%xmm0
ff
mulsd  %xmm1,%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,-0x60(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
mulsd  %xmm1,%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,-0x78(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm1,%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,-0x88(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
call   1030 <glVertex3d@plt>
movsd  -0x60(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
call   1030 <glVertex3d@plt>
movsd  -0x78(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
call   1030 <glVertex3d@plt>
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x90(%rbp),%xmm1
ff
movsd  -0x70(%rbp),%xmm2
call   1030 <glVertex3d@plt>
movsd  -0x20(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    128a <sphere+0x12a>
jmp    15dd <sphere+0x47d>
movsd  -0x18(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    11e0 <sphere+0x80>
mov    $0x0,%al
call   1040 <glEnd@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sphere>:
push   %rbp
push   %rbx
sub    $0xa8,%rsp
movaps %xmm0,0x40(%rsp)
add    $0x1,%esi
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
movsd  0xe80(%rip),%xmm2
movapd %xmm2,%xmm3
add    $0x1,%edi
cvtsi2sd %edi,%xmm1
divsd  %xmm0,%xmm3
movsd  %xmm3,0x60(%rsp)
divsd  %xmm1,%xmm2
movsd  %xmm2,0x68(%rsp)
mov    0x2e42(%rip),%rax
mov    (%rax),%edi
call   1080 <glBegin@plt>
movapd 0xe5b(%rip),%xmm0
xorpd  0x40(%rsp),%xmm0
movapd %xmm0,0x90(%rsp)
xor    %ebp,%ebp
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
lea    0xe49(%rip),%rbx
nopw   0x0(%rax,%rax,1)
movsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x38(%rsp)
call   1070 <cos@plt>
mulsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x58(%rsp)
movsd  0x60(%rsp),%xmm0
addsd  0x38(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
call   1070 <cos@plt>
mulsd  0x90(%rsp),%xmm0
movsd  %xmm0,0x50(%rsp)
xor    %eax,%eax
test   %ebp,%ebp
sete   %al
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %eax,%ebp
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
test   %ebp,%ebp
sete   %al
movsd  (%rbx,%rax,8),%xmm1
xor    $0x1,%ebp
xorpd  %xmm0,%xmm0
xorpd  %xmm2,%xmm2
call   1060 <glColor3d@plt>
movsd  0x8(%rsp),%xmm0
call   1070 <cos@plt>
mulsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x38(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x88(%rsp)
movsd  0x38(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x8(%rsp),%xmm0
call   1050 <sin@plt>
movsd  0x30(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%rsp)
movsd  0x8(%rsp),%xmm0
call   1070 <cos@plt>
mulsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  0x10(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x28(%rsp),%xmm0
movsd  %xmm0,0x80(%rsp)
movsd  0x10(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x40(%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
addsd  0x68(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1070 <cos@plt>
mulsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x38(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x78(%rsp)
movsd  0x38(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x40(%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
call   1070 <cos@plt>
mulsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x10(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x70(%rsp)
movsd  0x10(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x40(%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  0x88(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
movsd  0x58(%rsp),%xmm2
call   1030 <glVertex3d@plt>
movsd  0x80(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
movsd  0x50(%rsp),%xmm2
call   1030 <glVertex3d@plt>
movsd  0x78(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x58(%rsp),%xmm2
call   1030 <glVertex3d@plt>
movsd  0x70(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x50(%rsp),%xmm2
call   1030 <glVertex3d@plt>
movsd  0xbb0(%rip),%xmm0
ucomisd 0x8(%rsp),%xmm0
jae    1240 <sphere+0xe0>
movsd  0xb94(%rip),%xmm0
ucomisd 0x10(%rsp),%xmm0
jae    11e0 <sphere+0x80>
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %rbp
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 i32
%13 = alloca i32
%14 = alloca double
%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
store double %0, double* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
%26 = sitofp i32 %25 to double
%27 = fdiv double 0x400921FB4D12D84A, %26
store double %27, double* %7
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
%30 = sitofp i32 %29 to double
%31 = fdiv double 0x400921FB4D12D84A, %30
store double %31, double* %8
store double 0.000000e+00, double* %10
store double 0.000000e+00, double* %11
store i32 0, i32* %12
store i32 0, i32* %13
%32 = load i32, i32* @GL_QUAD_STRIP
%33 = call i32 @glBegin(i32 %32)
store double 0.000000e+00, double* %10
br label %34
34: ; preds = %158, %3
%35 = load double, double* %10
%36 = fcmp ole double %35, 0x400921FB4D12D84A
br i1 %36, label %37, label %162
37: ; preds = %34
%38 = load double, double* %4
%39 = load double, double* %10
%40 = call double @cos(double %39)
%41 = fmul double %38, %40
store double %41, double* %16
%42 = load double, double* %4
%43 = fneg double %42
%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* %19
%49 = load i32, i32* %12
%50 = icmp eq i32 %49, 0
br i1 %50, label %51, label %52
51: ; preds = %37
store i32 1, i32* %12
br label %53
52: ; preds = %37
store i32 0, i32* %12
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* %12
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %62
60: ; preds = %57
%61 = call i32 @glColor3d(double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
store i32 1, i32* %12
br label %64
62: ; preds = %57
%63 = call i32 @glColor3d(double 0.000000e+00, double 8.000000e-01, double 0.000000e+00)
store i32 0, i32* %12
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* %14
%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* %15
%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* %17
%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* %18
%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* %20
%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* %21
%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* %22
%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* %23
%137 = load double, double* %14
%138 = load double, double* %15
%139 = load double, double* %16
%140 = call i32 @glVertex3d(double %137, double %138, double %139)
%141 = load double, double* %17
%142 = load double, double* %18
%143 = load double, double* %19
%144 = call i32 @glVertex3d(double %141, double %142, double %143)
%145 = load double, double* %20
%146 = load double, double* %21
%147 = load double, double* %16
%148 = call i32 @glVertex3d(double %145, double %146, double %147)
%149 = load double, double* %22
%150 = load double, double* %23
%151 = load double, double* %19
%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 %34
162: ; preds = %34
%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)
%12 = fneg double %0
br label %15
13: ; preds = %25
%14 = fcmp ugt double %20, 0x400921FB4D12D84A
br i1 %14, label %70, label %15
15: ; preds = %3, %13
%16 = phi double [ 0.000000e+00, %3 ], [ %20, %13 ]
%17 = phi i32 [ 0, %3 ], [ %30, %13 ]
%18 = tail call double @cos(double %16)
%19 = fmul double %18, %0
%20 = fadd double %6, %16
%21 = tail call double @cos(double %20)
%22 = fmul double %21, %12
%23 = icmp eq i32 %17, 0
%24 = zext i1 %23 to i32
br label %25
25: ; preds = %15, %25
%26 = phi double [ 0.000000e+00, %15 ], [ %48, %25 ]
%27 = phi i32 [ %24, %15 ], [ %30, %25 ]
%28 = icmp eq i32 %27, 0
%29 = select i1 %28, double 1.000000e+00, double 8.000000e-01
%30 = xor i32 %27, 1
%31 = tail call i32 @glColor3d(double 0.000000e+00, double %29, double 0.000000e+00)
%32 = tail call double @cos(double %26)
%33 = fmul double %32, %0
%34 = tail call double @sin(double %16)
%35 = fmul double %33, %34
%36 = tail call double @sin(double %16)
%37 = fmul double %36, %0
%38 = tail call double @sin(double %26)
%39 = fmul double %37, %38
%40 = tail call double @cos(double %26)
%41 = fmul double %40, %0
%42 = tail call double @sin(double %20)
%43 = fmul double %41, %42
%44 = tail call double @sin(double %20)
%45 = fmul double %44, %0
%46 = tail call double @sin(double %26)
%47 = fmul double %45, %46
%48 = fadd double %9, %26
%49 = tail call double @cos(double %48)
%50 = fmul double %49, %0
%51 = tail call double @sin(double %16)
%52 = fmul double %50, %51
%53 = tail call double @sin(double %16)
%54 = fmul double %53, %0
%55 = tail call double @sin(double %48)
%56 = fmul double %54, %55
%57 = tail call double @cos(double %48)
%58 = fmul double %57, %0
%59 = tail call double @sin(double %20)
%60 = fmul double %58, %59
%61 = tail call double @sin(double %20)
%62 = fmul double %61, %0
%63 = tail call double @sin(double %48)
%64 = fmul double %62, %63
%65 = tail call i32 @glVertex3d(double %35, double %39, double %19)
%66 = tail call i32 @glVertex3d(double %43, double %47, double %22)
%67 = tail call i32 @glVertex3d(double %52, double %56, double %19)
%68 = tail call i32 @glVertex3d(double %60, double %64, double %22)
%69 = fcmp ugt double %48, 0x401921FB4D12D84A
br i1 %69, label %13, label %25
70: ; preds = %13
%71 = tail call i32 (...) @glEnd()
ret void
}