#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);
int fabs(double);
int /*<<< orphan*/ range(double *, int);
double sin(double);
void reduce_elements(double mj0, double mj, double inc0, double ap0, double om0,
                     double *inc, double *ap, double *om) {
  double t0, t1;
  double tt, tt2, t02, tt3;
  double eta, th, th0;
  double a, b;
  double dap;
  double cinc, sinc;
  double ot, sot, cot, ot1;
  double seta, ceta;
  if (fabs(mj - mj0) < 1e-5) {
    *inc = inc0;
    *ap = ap0;
    *om = om0;
    return;
  }
  t0 = mj0 / 365250.0;
  t1 = mj / 365250.0;
  tt = t1 - t0;
  tt2 = tt * tt;
  t02 = t0 * t0;
  tt3 = tt * tt2;
  eta = (471.07 - 6.75 * t0 + .57 * t02) * tt + (.57 * t0 - 3.37) * tt2 +
        .05 * tt3;
  th0 = 32869.0 * t0 + 56 * t02 - (8694 + 55 * t0) * tt + 3 * tt2;
  eta = ((eta / 3600.0) * 3.141592653589793 / 180.);
  th0 = (((th0 / 3600.0) + 173.950833) * 3.141592653589793 / 180.);
  th = (50256.41 + 222.29 * t0 + .26 * t02) * tt + (111.15 + .26 * t0) * tt2 +
       .1 * tt3;
  th = th0 + ((th / 3600.0) * 3.141592653589793 / 180.);
  cinc = cos(inc0);
  sinc = sin(inc0);
  ot = om0 - th0;
  sot = sin(ot);
  cot = cos(ot);
  seta = sin(eta);
  ceta = cos(eta);
  a = sinc * sot;
  b = ceta * sinc * cot - seta * cinc;
  ot1 = atan(a / b);
  if (b < 0)
    ot1 += 3.141592653589793;
  b = sinc * ceta - cinc * seta * cot;
  a = -1 * seta * sot;
  dap = atan(a / b);
  if (b < 0)
    dap += 3.141592653589793;
  *ap = ap0 + dap;
  range(ap, 2 * 3.141592653589793);
  *om = ot1 + th;
  range(om, 2 * 3.141592653589793);
  if (inc0 < .175)
    *inc = asin(a / sin(dap));
  else
    *inc = 1.570796327 - asin((cinc * ceta) + (sinc * seta * cot));
}


x86 assembly (clang, -O0):
<reduce_elements>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe55(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11e1 <reduce_elements+0x81>
movsd  -0x18(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x20(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1733 <reduce_elements+0x5d3>
movsd  -0x8(%rbp),%xmm0
movsd  0xeb2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe9c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
subsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  0xe3a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe36(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  0xe0d(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm0
movsd  0xdf3(%rip),%xmm3
mulsd  %xmm3,%xmm0
movsd  0xdef(%rip),%xmm3
addsd  %xmm3,%xmm0
mulsd  -0x60(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
movsd  0xdc1(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  0xd9f(%rip),%xmm1
mulsd  -0x68(%rbp),%xmm1
movsd  0xd8a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  0xd65(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd61(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  -0x58(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
movsd  0xd1c(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movsd  0xcc7(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xcb3(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc9f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
movsd  0xc96(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xcba(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xc76(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc62(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  0xc79(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc75(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  0xc4c(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm0
movsd  0xc32(%rip),%xmm3
mulsd  %xmm3,%xmm0
movsd  0xc2e(%rip),%xmm3
addsd  %xmm3,%xmm0
mulsd  -0x60(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
movsd  0xc00(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x80(%rbp),%xmm1
movsd  0xbd6(%rip),%xmm2
divsd  %xmm2,%xmm1
movsd  0xbc2(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xbae(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
subsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
call   1040 <sin@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
call   1080 <cos@plt>
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm2
ff
movsd  -0xd8(%rbp),%xmm1
ff
mulsd  -0xa8(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
divsd  -0x98(%rbp),%xmm0
ff
call   1050 <atan@plt>
movsd  %xmm0,-0xd0(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0x98(%rbp),%xmm0
ff
jbe    159b <reduce_elements+0x43b>
movsd  0xa85(%rip),%xmm0
addsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xe0(%rbp),%xmm2
ff
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  -0xd8(%rbp),%xmm1
ff
mulsd  -0xc8(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xab6(%rip),%xmm0
mulsd  -0xd8(%rbp),%xmm0
ff
mulsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
divsd  -0x98(%rbp),%xmm0
ff
call   1050 <atan@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0x98(%rbp),%xmm0
ff
jbe    1650 <reduce_elements+0x4f0>
movsd  0x9d0(%rip),%xmm0
addsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
addsd  -0xa0(%rbp),%xmm0
ff
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rdi
mov    $0x6,%esi
call   1070 <range@plt>
movsd  -0xd0(%rbp),%xmm0
ff
addsd  -0x80(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x40(%rbp),%rdi
mov    $0x6,%esi
call   1070 <range@plt>
movsd  0xa12(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    16e7 <reduce_elements+0x587>
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xe8(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
call   1060 <asin@plt>
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1733 <reduce_elements+0x5d3>
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xe0(%rbp),%xmm2
ff
movsd  -0xb0(%rbp),%xmm1
ff
mulsd  -0xd8(%rbp),%xmm1
ff
mulsd  -0xc8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <asin@plt>
movaps %xmm0,%xmm1
movsd  0x991(%rip),%xmm0
subsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reduce_elements>:
push   %r15
push   %r14
push   %rbx
sub    $0xa0,%rsp
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%r14
movsd  %xmm4,(%rsp)
movsd  %xmm3,0x58(%rsp)
movsd  %xmm2,0x18(%rsp)
movapd %xmm0,%xmm2
movapd %xmm1,0x30(%rsp)
movapd %xmm1,%xmm0
movapd %xmm2,0x20(%rsp)
subsd  %xmm2,%xmm0
call   1030 <fabs@plt>
test   %eax,%eax
jle    1508 <reduce_elements+0x3a8>
movapd 0x30(%rsp),%xmm2
unpcklpd 0x20(%rsp),%xmm2
divpd  0xe41(%rip),%xmm2
movapd %xmm2,%xmm0
unpckhpd %xmm2,%xmm0
subsd  %xmm0,%xmm2
movapd %xmm2,%xmm7
mulsd  %xmm2,%xmm7
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm2,%xmm9
mulsd  %xmm7,%xmm9
movsd  0xe33(%rip),%xmm3
mulsd  %xmm0,%xmm3
addsd  0xe2f(%rip),%xmm3
movsd  0xe2f(%rip),%xmm4
movapd %xmm1,%xmm5
mulsd  %xmm4,%xmm5
mulsd  %xmm0,%xmm4
addsd  0xe23(%rip),%xmm4
addsd  %xmm3,%xmm5
mulsd  %xmm7,%xmm4
mulsd  %xmm2,%xmm5
addsd  %xmm4,%xmm5
movsd  0xe13(%rip),%xmm3
mulsd  %xmm9,%xmm3
addsd  %xmm5,%xmm3
movapd %xmm3,%xmm5
movsd  0xe06(%rip),%xmm3
mulsd  %xmm1,%xmm3
movsd  0xe02(%rip),%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm4
movsd  0xdfa(%rip),%xmm3
mulsd  %xmm0,%xmm3
addsd  0xdf6(%rip),%xmm3
mulsd  %xmm2,%xmm3
subsd  %xmm3,%xmm4
movsd  0xdee(%rip),%xmm3
mulsd  %xmm7,%xmm3
addsd  %xmm4,%xmm3
movsd  0xde5(%rip),%xmm10
movapd %xmm5,%xmm4
divsd  %xmm10,%xmm4
movsd  0xddc(%rip),%xmm5
mulsd  %xmm5,%xmm4
movapd %xmm4,%xmm6
movsd  0xdd4(%rip),%xmm4
divsd  %xmm4,%xmm6
movsd  %xmm6,0x20(%rsp)
divsd  %xmm10,%xmm3
addsd  0xdc5(%rip),%xmm3
mulsd  %xmm5,%xmm3
movapd %xmm5,%xmm8
divsd  %xmm4,%xmm3
movsd  %xmm3,0x30(%rsp)
movsd  0xdb2(%rip),%xmm5
mulsd  %xmm0,%xmm5
addsd  0xdae(%rip),%xmm5
movsd  0xdae(%rip),%xmm6
mulsd  %xmm6,%xmm1
addsd  %xmm5,%xmm1
mulsd  %xmm6,%xmm0
addsd  0xda2(%rip),%xmm0
mulsd  %xmm7,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mulsd  0xd95(%rip),%xmm9
addsd  %xmm1,%xmm9
divsd  %xmm10,%xmm9
mulsd  %xmm8,%xmm9
divsd  %xmm4,%xmm9
addsd  %xmm3,%xmm9
movapd %xmm9,0x90(%rsp)
movsd  0x18(%rsp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x48(%rsp)
movsd  0x18(%rsp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,0x40(%rsp)
movsd  (%rsp),%xmm0
subsd  0x30(%rsp),%xmm0
movsd  %xmm0,(%rsp)
call   1040 <sin@plt>
movsd  %xmm0,0x50(%rsp)
movsd  (%rsp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x20(%rsp),%xmm0
call   1040 <sin@plt>
movaps %xmm0,0x80(%rsp)
movsd  0x20(%rsp),%xmm0
call   1080 <cos@plt>
movapd %xmm0,%xmm1
movsd  0x40(%rsp),%xmm2
movapd %xmm2,%xmm0
mulsd  0x50(%rsp),%xmm0
movsd  %xmm1,0x70(%rsp)
mulsd  %xmm1,%xmm2
movsd  %xmm2,0x78(%rsp)
movapd 0xc3b(%rip),%xmm1
xorpd  0x80(%rsp),%xmm1
movapd %xmm1,0x20(%rsp)
movsd  0x48(%rsp),%xmm3
mulsd  %xmm1,%xmm3
movapd %xmm3,(%rsp)
mulsd  0x30(%rsp),%xmm2
addsd  %xmm3,%xmm2
movapd %xmm2,0x60(%rsp)
divsd  %xmm2,%xmm0
call   1050 <atan@plt>
xorpd  %xmm1,%xmm1
movapd 0x60(%rsp),%xmm3
cmpltsd %xmm1,%xmm3
movapd %xmm3,%xmm2
andnpd %xmm0,%xmm2
movsd  0xc4d(%rip),%xmm1
addsd  %xmm1,%xmm0
andpd  %xmm3,%xmm0
orpd   %xmm2,%xmm0
movapd %xmm0,0x60(%rsp)
movapd (%rsp),%xmm1
mulsd  0x30(%rsp),%xmm1
addsd  0x78(%rsp),%xmm1
movapd %xmm1,(%rsp)
movapd 0x20(%rsp),%xmm0
mulsd  0x50(%rsp),%xmm0
movapd %xmm0,0x20(%rsp)
divsd  %xmm1,%xmm0
call   1050 <atan@plt>
movsd  0xc02(%rip),%xmm2
addsd  %xmm0,%xmm2
movapd (%rsp),%xmm3
cmpltsd 0xc40(%rip),%xmm3
movapd %xmm3,%xmm1
andnpd %xmm0,%xmm1
andpd  %xmm2,%xmm3
orpd   %xmm1,%xmm3
movsd  0x58(%rsp),%xmm0
movapd %xmm3,(%rsp)
addsd  %xmm3,%xmm0
movsd  %xmm0,(%rbx)
mov    %rbx,%rdi
mov    $0x6,%esi
call   1070 <range@plt>
movapd 0x60(%rsp),%xmm0
addsd  0x90(%rsp),%xmm0
movsd  %xmm0,(%r15)
mov    %r15,%rdi
mov    $0x6,%esi
call   1070 <range@plt>
movsd  0xbd7(%rip),%xmm0
ucomisd 0x18(%rsp),%xmm0
jbe    1529 <reduce_elements+0x3c9>
movapd (%rsp),%xmm0
call   1040 <sin@plt>
movapd 0x20(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1060 <asin@plt>
jmp    1567 <reduce_elements+0x407>
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,(%r14)
movsd  0x58(%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  (%rsp),%xmm0
movsd  %xmm0,(%r15)
jmp    156c <reduce_elements+0x40c>
movsd  0x40(%rsp),%xmm0
mulsd  0x80(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x48(%rsp),%xmm0
mulsd  0x70(%rsp),%xmm0
addsd  %xmm1,%xmm0
call   1060 <asin@plt>
movapd %xmm0,%xmm1
movsd  0xb5d(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%r14)
add    $0xa0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @reduce_elements(double %0, double %1, double %2, double %3, double %4, double* nocapture writeonly %5, double* %6, double* %7) {
%9 = fsub double %1, %0
%10 = tail call i32 @fabs(double %9)
%11 = icmp slt i32 %10, 1
br i1 %11, label %12, label %13
12: ; preds = %8
store double %2, double* %5
store double %3, double* %6
store double %4, double* %7
br label %94
13: ; preds = %8
%14 = insertelement <2 x double> poison, double %1, i64 0
%15 = insertelement <2 x double> %14, double %0, i64 1
%16 = fdiv <2 x double> %15, <double 3.652500e+05, double 3.652500e+05>
%17 = extractelement <2 x double> %16, i64 0
%18 = extractelement <2 x double> %16, i64 1
%19 = fsub double %17, %18
%20 = fmul double %19, %19
%21 = fmul double %18, %18
%22 = fmul double %19, %20
%23 = tail call double @llvm.fmuladd.f64(double %18, double -6.750000e+00, double 4.710700e+02)
%24 = tail call double @llvm.fmuladd.f64(double %21, double 5.700000e-01, double %23)
%25 = tail call double @llvm.fmuladd.f64(double %18, double 5.700000e-01, double -3.370000e+00)
%26 = fmul double %25, %20
%27 = tail call double @llvm.fmuladd.f64(double %24, double %19, double %26)
%28 = tail call double @llvm.fmuladd.f64(double %22, double 5.000000e-02, double %27)
%29 = fmul double %21, 5.600000e+01
%30 = tail call double @llvm.fmuladd.f64(double %18, double 3.286900e+04, double %29)
%31 = tail call double @llvm.fmuladd.f64(double %18, double 5.500000e+01, double 8.694000e+03)
%32 = fneg double %31
%33 = tail call double @llvm.fmuladd.f64(double %32, double %19, double %30)
%34 = tail call double @llvm.fmuladd.f64(double %20, double 3.000000e+00, double %33)
%35 = fdiv double %28, 3.600000e+03
%36 = fmul double %35, 0x400921FB54442D18
%37 = fdiv double %36, 1.800000e+02
%38 = fdiv double %34, 3.600000e+03
%39 = fadd double %38, 0x4065BE6D3953DEA4
%40 = fmul double %39, 0x400921FB54442D18
%41 = fdiv double %40, 1.800000e+02
%42 = tail call double @llvm.fmuladd.f64(double %18, double 2.222900e+02, double 0x40E88A0D1EB851EC)
%43 = tail call double @llvm.fmuladd.f64(double %21, double 2.600000e-01, double %42)
%44 = tail call double @llvm.fmuladd.f64(double %18, double 2.600000e-01, double 1.111500e+02)
%45 = fmul double %44, %20
%46 = tail call double @llvm.fmuladd.f64(double %43, double %19, double %45)
%47 = tail call double @llvm.fmuladd.f64(double %22, double 1.000000e-01, double %46)
%48 = fdiv double %47, 3.600000e+03
%49 = fmul double %48, 0x400921FB54442D18
%50 = fdiv double %49, 1.800000e+02
%51 = fadd double %41, %50
%52 = tail call double @cos(double %2)
%53 = tail call double @sin(double %2)
%54 = fsub double %4, %41
%55 = tail call double @sin(double %54)
%56 = tail call double @cos(double %54)
%57 = tail call double @sin(double %37)
%58 = tail call double @cos(double %37)
%59 = fmul double %53, %55
%60 = fmul double %53, %58
%61 = fneg double %57
%62 = fmul double %52, %61
%63 = tail call double @llvm.fmuladd.f64(double %60, double %56, double %62)
%64 = fdiv double %59, %63
%65 = tail call double @atan(double %64)
%66 = fcmp olt double %63, 0.000000e+00
%67 = fadd double %65, 0x400921FB54442D18
%68 = select i1 %66, double %67, double %65
%69 = fmul double %56, %62
%70 = tail call double @llvm.fmuladd.f64(double %53, double %58, double %69)
%71 = fmul double %55, %61
%72 = fdiv double %71, %70
%73 = tail call double @atan(double %72)
%74 = fcmp olt double %70, 0.000000e+00
%75 = fadd double %73, 0x400921FB54442D18
%76 = select i1 %74, double %75, double %73
%77 = fadd double %76, %3
store double %77, double* %6
%78 = tail call i32 @range(double* %6, i32 6)
%79 = fadd double %51, %68
store double %79, double* %7
%80 = tail call i32 @range(double* %7, i32 6)
%81 = fcmp olt double %2, 1.750000e-01
br i1 %81, label %82, label %86
82: ; preds = %13
%83 = tail call double @sin(double %76)
%84 = fdiv double %71, %83
%85 = tail call double @asin(double %84)
br label %92
86: ; preds = %13
%87 = fmul double %53, %57
%88 = fmul double %56, %87
%89 = tail call double @llvm.fmuladd.f64(double %52, double %58, double %88)
%90 = tail call double @asin(double %89)
%91 = fsub double 0x3FF921FB54524550, %90
br label %92
92: ; preds = %86, %82
%93 = phi double [ %91, %86 ], [ %85, %82 ]
store double %93, double* %5
br label %94
94: ; preds = %92, %12
ret void
}