#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 */
double asin(double);
double atan(double);
double cos(double);
double fabs(double);
int /*<<< orphan*/ range(double *, int);
double sin(double);
double sqrt(double);
int /*<<< orphan*/ sunpos(double, double *, double *, int /*<<< orphan*/);
void comet(double mj, double ep, double inc, double ap, double qp, double om,
           double *lpd, double *psi, double *rp, double *rho, double *lam,
           double *bet) {
  double w, s, s2;
  double l, sl, cl, y;
  double spsi, cpsi;
  double rd, lsn, rsn;
  double lg, re, ll;
  double cll, sll;
  double nu;
  w = ((mj - ep) * 3.649116e-02) / (qp * sqrt(qp));
  s = w / 3;
  for (;;) {
    double d;
    s2 = s * s;
    d = (s2 + 3) * s - w;
    if (fabs(d) <= 0.0001)
      break;
    s = ((2 * s * s2) + w) / (3 * (s2 + 1));
  }
  nu = 2 * atan(s);
  *rp = qp * (1 + s2);
  l = nu + ap;
  sl = sin(l);
  cl = cos(l);
  spsi = sl * sin(inc);
  *psi = asin(spsi);
  y = sl * cos(inc);
  *lpd = atan(y / cl) + om;
  cpsi = cos(*psi);
  if (cl < 0)
    *lpd += 3.141592653589793;
  range(lpd, 2 * 3.141592653589793);
  rd = *rp * cpsi;
  sunpos(mj, &lsn, &rsn, 0);
  lg = lsn + 3.141592653589793;
  re = rsn;
  ll = *lpd - lg;
  cll = cos(ll);
  sll = sin(ll);
  *rho = sqrt((re * re) + (*rp * *rp) - (2 * re * rd * cll));
  if (rd < re)
    *lam = atan((-1 * rd * sll) / (re - (rd * cll))) + lg + 3.141592653589793;
  else
    *lam = atan((re * sll) / (rd - (re * cll))) + *lpd;
  range(lam, 2 * 3.141592653589793);
  *bet = atan((rd * spsi * sin(*lam - *lpd)) / (cpsi * re * sll));
}


x86 assembly (clang, -O0):
<comet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
mov    %rdi,-0x38(%rbp)
mov    %rsi,-0x40(%rbp)
mov    %rdx,-0x48(%rbp)
mov    %rcx,-0x50(%rbp)
mov    %r8,-0x58(%rbp)
mov    %r9,-0x60(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  0xe45(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
call   1080 <sqrt@plt>
movsd  -0x108(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x100(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  0xded(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xdcd(%rip),%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xf8(%rbp),%xmm1
ff
movaps 0xdc8(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xd8c(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1293 <comet+0x123>
jmp    12d9 <comet+0x169>
movsd  0xd85(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xd5e(%rip),%xmm2
addsd  -0x78(%rbp),%xmm2
movsd  0xd39(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    121c <comet+0xac>
movsd  -0x70(%rbp),%xmm0
call   1040 <atan@plt>
movaps %xmm0,%xmm1
movsd  0xd32(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  0xd11(%rip),%xmm1
addsd  -0x78(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xf0(%rbp),%xmm0
ff
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x118(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1050 <asin@plt>
mov    -0x40(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x110(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
divsd  -0x90(%rbp),%xmm0
ff
call   1040 <atan@plt>
addsd  -0x30(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x40(%rbp),%rax
movsd  (%rax),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0x90(%rbp),%xmm0
ff
jbe    1421 <comet+0x2b1>
mov    -0x38(%rbp),%rax
movsd  0xc0f(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rdi
mov    $0x6,%esi
call   1060 <range@plt>
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
lea    -0xb8(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
xor    %edx,%edx
call   1090 <sunpos@plt>
movsd  0xbbf(%rip),%xmm0
addsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
call   1070 <cos@plt>
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xd8(%rbp),%xmm0
ff
call   1030 <sin@plt>
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xd0(%rbp),%xmm1
ff
movsd  -0xd0(%rbp),%xmm2
ff
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x48(%rbp),%rax
mulsd  (%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xb25(%rip),%xmm0
mulsd  -0xd0(%rbp),%xmm0
ff
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xe0(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1080 <sqrt@plt>
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xb0(%rbp),%xmm1
ff
movsd  -0xd0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    15d2 <comet+0x462>
movsd  0xacf(%rip),%xmm0
mulsd  -0xb0(%rbp),%xmm0
ff
mulsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xd0(%rbp),%xmm2
ff
movsd  -0xb0(%rbp),%xmm1
ff
movsd  -0xe0(%rbp),%xmm3
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1040 <atan@plt>
addsd  -0xc8(%rbp),%xmm0
ff
movsd  0xa67(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x58(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1632 <comet+0x4c2>
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm2
ff
movsd  -0xd0(%rbp),%xmm1
ff
movsd  -0xe0(%rbp),%xmm3
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1040 <atan@plt>
mov    -0x38(%rbp),%rax
addsd  (%rax),%xmm0
mov    -0x58(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x58(%rbp),%rdi
mov    $0x6,%esi
call   1060 <range@plt>
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
mov    -0x58(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
subsd  (%rax),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x120(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  -0xd0(%rbp),%xmm1
ff
mulsd  -0xe8(%rbp),%xmm1
ff
divsd  %xmm1,%xmm0
call   1040 <atan@plt>
mov    -0x60(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<comet>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
movsd  %xmm0,0x18(%rsp)
movapd %xmm0,%xmm7
subsd  %xmm1,%xmm7
mulsd  0xe6c(%rip),%xmm7
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%rbp
mov    %rdi,%rbx
movsd  %xmm5,0x10(%rsp)
movsd  %xmm3,(%rsp)
movsd  %xmm2,0x30(%rsp)
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm4
movsd  %xmm4,0x8(%rsp)
jb     11d0 <comet+0x60>
xorps  %xmm0,%xmm0
sqrtsd %xmm4,%xmm0
jmp    11eb <comet+0x7b>
movapd %xmm4,%xmm0
movapd %xmm7,0x20(%rsp)
call   1080 <sqrt@plt>
movapd 0x20(%rsp),%xmm7
movsd  0x8(%rsp),%xmm4
mulsd  %xmm4,%xmm0
divsd  %xmm0,%xmm7
movsd  0xe0d(%rip),%xmm1
movapd %xmm7,%xmm0
divsd  %xmm1,%xmm0
movapd %xmm0,%xmm3
mulsd  %xmm0,%xmm3
movapd %xmm3,%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
subsd  %xmm7,%xmm2
andpd  0xe2d(%rip),%xmm2
movsd  0xde4(%rip),%xmm8
ucomisd %xmm2,%xmm8
jae    128b <comet+0x11b>
movapd 0xe05(%rip),%xmm2
xorpd  %xmm7,%xmm2
movsd  0xdd1(%rip),%xmm4
movapd 0xe01(%rip),%xmm5
nop
addsd  %xmm0,%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm7,%xmm0
addsd  %xmm4,%xmm3
mulsd  %xmm1,%xmm3
divsd  %xmm3,%xmm0
movapd %xmm0,%xmm3
mulsd  %xmm0,%xmm3
movapd %xmm3,%xmm6
addsd  %xmm1,%xmm6
mulsd  %xmm0,%xmm6
addsd  %xmm2,%xmm6
andpd  %xmm5,%xmm6
ucomisd %xmm6,%xmm8
jb     1250 <comet+0xe0>
movapd %xmm3,0x20(%rsp)
call   1040 <atan@plt>
movapd 0x20(%rsp),%xmm1
addsd  0xd74(%rip),%xmm1
addsd  %xmm0,%xmm0
mulsd  0x8(%rsp),%xmm1
movsd  %xmm1,0x0(%r13)
addsd  (%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1030 <sin@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,(%rsp)
movsd  0x30(%rsp),%xmm0
call   1030 <sin@plt>
mulsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1050 <asin@plt>
movsd  %xmm0,0x0(%rbp)
movsd  0x30(%rsp),%xmm0
call   1070 <cos@plt>
mulsd  0x20(%rsp),%xmm0
divsd  (%rsp),%xmm0
call   1040 <atan@plt>
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  0x0(%rbp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,0x20(%rsp)
xorpd  %xmm0,%xmm0
ucomisd (%rsp),%xmm0
jbe    134b <comet+0x1db>
movsd  (%rbx),%xmm0
addsd  0xcd9(%rip),%xmm0
movsd  %xmm0,(%rbx)
mov    %rbx,%rdi
mov    $0x6,%esi
call   1060 <range@plt>
movsd  0x0(%r13),%xmm0
mulsd  0x20(%rsp),%xmm0
movapd %xmm0,0x30(%rsp)
lea    0x50(%rsp),%rdi
lea    0x48(%rsp),%rsi
movsd  0x18(%rsp),%xmm0
xor    %edx,%edx
call   1090 <sunpos@plt>
movsd  0x50(%rsp),%xmm2
addsd  0xc91(%rip),%xmm2
movsd  0x48(%rsp),%xmm1
movsd  %xmm1,(%rsp)
movsd  (%rbx),%xmm0
movsd  %xmm2,0x40(%rsp)
subsd  %xmm2,%xmm0
movsd  %xmm0,0x10(%rsp)
call   1070 <cos@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <sin@plt>
movsd  (%rsp),%xmm2
movapd %xmm0,%xmm3
movsd  0x0(%r13),%xmm0
mulsd  %xmm0,%xmm0
movapd %xmm2,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xc3d(%rip),%xmm0
mulsd  %xmm2,%xmm0
mulsd  0x30(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
addsd  %xmm1,%xmm0
ucomisd 0xc29(%rip),%xmm0
movsd  %xmm3,0x10(%rsp)
jb     1415 <comet+0x2a5>
sqrtsd %xmm0,%xmm0
jmp    1425 <comet+0x2b5>
call   1080 <sqrt@plt>
movsd  0x10(%rsp),%xmm3
movsd  (%rsp),%xmm2
movsd  %xmm0,(%r12)
movapd 0x30(%rsp),%xmm1
ucomisd %xmm1,%xmm2
jbe    147a <comet+0x30a>
movapd 0xc01(%rip),%xmm0
xorpd  %xmm1,%xmm0
mulsd  %xmm3,%xmm0
movsd  0x18(%rsp),%xmm4
mulsd  %xmm1,%xmm4
movapd %xmm2,%xmm1
subsd  %xmm4,%xmm1
divsd  %xmm1,%xmm0
call   1040 <atan@plt>
movsd  0x40(%rsp),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
addsd  0xba8(%rip),%xmm0
jmp    149d <comet+0x32d>
movapd %xmm2,%xmm0
mulsd  %xmm3,%xmm0
movsd  0x18(%rsp),%xmm4
mulsd  %xmm2,%xmm4
subsd  %xmm4,%xmm1
divsd  %xmm1,%xmm0
call   1040 <atan@plt>
addsd  (%rbx),%xmm0
movsd  %xmm0,(%r15)
mov    %r15,%rdi
mov    $0x6,%esi
call   1060 <range@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%r15),%xmm0
subsd  (%rbx),%xmm0
call   1030 <sin@plt>
mulsd  0x8(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mulsd  (%rsp),%xmm1
mulsd  0x10(%rsp),%xmm1
divsd  %xmm1,%xmm0
call   1040 <atan@plt>
movsd  %xmm0,(%r14)
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @comet(double %0, double %1, double %2, double %3, double %4, double %5, double* %6, double* nocapture %7, double* nocapture %8, double* nocapture writeonly %9, double* %10, double* nocapture writeonly %11) {
%13 = alloca double
%14 = alloca double
%15 = bitcast double* %13 to i8*
%16 = bitcast double* %14 to i8*
%17 = fsub double %0, %1
%18 = fmul double %17, 0x3FA2AEF8259611A5
%19 = tail call double @sqrt(double %4)
%20 = fmul double %19, %4
%21 = fdiv double %18, %20
%22 = fdiv double %21, 3.000000e+00
%23 = fneg double %21
%24 = fmul double %22, %22
%25 = fadd double %24, 3.000000e+00
%26 = tail call double @llvm.fmuladd.f64(double %25, double %22, double %23)
%27 = tail call double @llvm.fabs.f64(double %26)
%28 = fcmp ugt double %27, 1.000000e-04
br i1 %28, label %29, label %42
29: ; preds = %12, %29
%30 = phi double [ %37, %29 ], [ %24, %12 ]
%31 = phi double [ %36, %29 ], [ %22, %12 ]
%32 = fmul double %31, 2.000000e+00
%33 = tail call double @llvm.fmuladd.f64(double %32, double %30, double %21)
%34 = fadd double %30, 1.000000e+00
%35 = fmul double %34, 3.000000e+00
%36 = fdiv double %33, %35
%37 = fmul double %36, %36
%38 = fadd double %37, 3.000000e+00
%39 = tail call double @llvm.fmuladd.f64(double %38, double %36, double %23)
%40 = tail call double @llvm.fabs.f64(double %39)
%41 = fcmp ugt double %40, 1.000000e-04
br i1 %41, label %29, label %42
42: ; preds = %29, %12
%43 = phi double [ %22, %12 ], [ %36, %29 ]
%44 = phi double [ %24, %12 ], [ %37, %29 ]
%45 = tail call double @atan(double %43)
%46 = fmul double %45, 2.000000e+00
%47 = fadd double %44, 1.000000e+00
%48 = fmul double %47, %4
store double %48, double* %8
%49 = fadd double %46, %3
%50 = tail call double @sin(double %49)
%51 = tail call double @cos(double %49)
%52 = tail call double @sin(double %2)
%53 = fmul double %50, %52
%54 = tail call double @asin(double %53)
store double %54, double* %7
%55 = tail call double @cos(double %2)
%56 = fmul double %50, %55
%57 = fdiv double %56, %51
%58 = tail call double @atan(double %57)
%59 = fadd double %58, %5
store double %59, double* %6
%60 = load double, double* %7
%61 = tail call double @cos(double %60)
%62 = fcmp olt double %51, 0.000000e+00
br i1 %62, label %63, label %66
63: ; preds = %42
%64 = load double, double* %6
%65 = fadd double %64, 0x400921FB54442D18
store double %65, double* %6
br label %66
66: ; preds = %63, %42
%67 = tail call i32 @range(double* %6, i32 6)
%68 = load double, double* %8
%69 = fmul double %61, %68
%70 = call i32 @sunpos(double %0, double* %13, double* %14, i32 0)
%71 = load double, double* %13
%72 = fadd double %71, 0x400921FB54442D18
%73 = load double, double* %14
%74 = load double, double* %6
%75 = fsub double %74, %72
%76 = call double @cos(double %75)
%77 = call double @sin(double %75)
%78 = load double, double* %8
%79 = fmul double %78, %78
%80 = call double @llvm.fmuladd.f64(double %73, double %73, double %79)
%81 = fmul double %73, -2.000000e+00
%82 = fmul double %69, %81
%83 = call double @llvm.fmuladd.f64(double %82, double %76, double %80)
%84 = call double @sqrt(double %83)
store double %84, double* %9
%85 = fcmp olt double %69, %73
br i1 %85, label %86, label %94
86: ; preds = %66
%87 = fneg double %69
%88 = fmul double %77, %87
%89 = call double @llvm.fmuladd.f64(double %87, double %76, double %73)
%90 = fdiv double %88, %89
%91 = call double @atan(double %90)
%92 = fadd double %72, %91
%93 = fadd double %92, 0x400921FB54442D18
br label %102
94: ; preds = %66
%95 = fmul double %73, %77
%96 = fneg double %73
%97 = call double @llvm.fmuladd.f64(double %96, double %76, double %69)
%98 = fdiv double %95, %97
%99 = call double @atan(double %98)
%100 = load double, double* %6
%101 = fadd double %99, %100
br label %102
102: ; preds = %94, %86
%103 = phi double [ %101, %94 ], [ %93, %86 ]
store double %103, double* %10
%104 = call i32 @range(double* %10, i32 6)
%105 = fmul double %53, %69
%106 = load double, double* %10
%107 = load double, double* %6
%108 = fsub double %106, %107
%109 = call double @sin(double %108)
%110 = fmul double %105, %109
%111 = fmul double %61, %73
%112 = fmul double %111, %77
%113 = fdiv double %110, %112
%114 = call double @atan(double %113)
store double %114, double* %11
ret void
}