#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 atan2(double, double);
double cos(double);
double sin(double);
double sqrt(double);
void do_ftuneven(int NJD, double *t, double *mag, double ft_sign,
                 double tt_zero, int Nfreq, double *freqvals, double *FT_real,
                 double *FT_imag, double *FT_periodogram) {
  int ii_ww, ii_t;
  double magmean;
  double wrun, csum, ssum, wtau, sumr, sumi, scos2, ssin2, cval, sval;
  double ft_real, ft_imag, phi_this;
  magmean = 0.0;
  for (ii_t = 0; ii_t < NJD; ii_t++) {
    magmean += mag[ii_t];
  }
  magmean = magmean / (double)NJD;
  for (ii_ww = 0; ii_ww < Nfreq; ii_ww++) {
    wrun = freqvals[ii_ww];
    if (wrun == 0.0) {
      FT_real[ii_ww] = 0.0;
      for (ii_t = 0; ii_t < NJD; ii_t++) {
        FT_real[ii_ww] += (mag[ii_t] - magmean);
      }
      FT_real[ii_ww] = FT_real[ii_ww] / sqrt(NJD);
      FT_imag[ii_ww] = 0.0;
      FT_periodogram[ii_ww] = FT_real[ii_ww] * FT_real[ii_ww];
    } else {
      csum = 0.0;
      ssum = 0.0;
      for (ii_t = 0; ii_t < NJD; ii_t++) {
        csum += cos(2.0 * wrun * t[ii_t]);
        ssum += sin(2.0 * wrun * t[ii_t]);
      }
      wtau = 0.5 * atan2(ssum, csum);
      sumr = 0.0;
      sumi = 0.0;
      scos2 = 0.0;
      ssin2 = 0.0;
      for (ii_t = 0; ii_t < NJD; ii_t++) {
        cval = cos(wrun * t[ii_t] - wtau);
        sval = sin(wrun * t[ii_t] - wtau);
        sumr += (mag[ii_t] - magmean) * cval;
        sumi += (mag[ii_t] - magmean) * sval;
        scos2 += cval * cval;
        ssin2 += sval * sval;
      }
      if (ft_sign > 0) {
        sumr = sumr / sqrt(2.0);
        sumi = sumi / sqrt(2.0);
      }
      ft_real = sumr / (sqrt(2.0) * sqrt(scos2));
      ft_imag = ft_sign * sumi / (sqrt(2.0) * sqrt(ssin2));
      phi_this = wtau - wrun * tt_zero;
      FT_real[ii_ww] = ft_real * cos(phi_this) - ft_imag * sin(phi_this);
      FT_imag[ii_ww] = ft_imag * cos(phi_this) + ft_real * sin(phi_this);
      FT_periodogram[ii_ww] = (sumr * sumr / scos2) + (sumi * sumi / ssin2);
    }
  }
}


x86 assembly (clang, -O0):
<do_ftuneven>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    %ecx,-0x2c(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11b3 <do_ftuneven+0x73>
mov    -0x18(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1182 <do_ftuneven+0x42>
movsd  -0x50(%rbp),%xmm0
cvtsi2sdl -0x4(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1782 <do_ftuneven+0x642>
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12cf <do_ftuneven+0x18f>
jp     12cf <do_ftuneven+0x18f>
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1258 <do_ftuneven+0x118>
mov    -0x18(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x50(%rbp),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    121a <do_ftuneven+0xda>
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
cvtsi2sdl -0x4(%rbp),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    176f <do_ftuneven+0x62f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1352 <do_ftuneven+0x212>
movsd  0xd0e(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
call   1050 <cos@plt>
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xce5(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
call   1040 <sin@plt>
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    12e6 <do_ftuneven+0x1a6>
movsd  -0x68(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
call   1030 <atan2@plt>
movaps %xmm0,%xmm1
movsd  0xc94(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    14ea <do_ftuneven+0x3aa>
movsd  -0x58(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x70(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <cos@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x70(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  -0xa0(%rbp),%xmm2
ff
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x98(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm2
ff
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    13a2 <do_ftuneven+0x262>
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1558 <do_ftuneven+0x418>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0xaf7(%rip),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0xac9(%rip),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xc8(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  0xa9b(%rip),%xmm0
call   1060 <sqrt@plt>
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
call   1060 <sqrt@plt>
movsd  -0x120(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x118(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  0xa44(%rip),%xmm0
call   1060 <sqrt@plt>
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
call   1060 <sqrt@plt>
movsd  -0x110(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x108(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
movsd  -0x70(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
call   1050 <cos@plt>
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
call   1040 <sin@plt>
movsd  -0x100(%rbp),%xmm1
ff
movsd  -0xf8(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xb0(%rbp),%xmm0
ff
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
call   1050 <cos@plt>
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
call   1040 <sin@plt>
movsd  -0xe8(%rbp),%xmm1
ff
movsd  -0xe0(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x78(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
movsd  -0x80(%rbp),%xmm1
mulsd  -0x80(%rbp),%xmm1
divsd  -0x90(%rbp),%xmm1
ff
addsd  %xmm1,%xmm0
mov    0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1774 <do_ftuneven+0x634>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11cd <do_ftuneven+0x8d>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_ftuneven>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %r9,%r14
mov    %r8,%r13
movsd  %xmm1,0xc0(%rsp)
movsd  %xmm0,0xa8(%rsp)
mov    %rdx,%r15
mov    %rsi,%r12
mov    %edi,%ebx
mov    %edi,%esi
test   %edi,%edi
mov    %rsi,0x50(%rsp)
jle    1193 <do_ftuneven+0x53>
lea    -0x1(%rsi),%rdx
mov    %esi,%eax
and    $0x7,%eax
cmp    $0x7,%rdx
jae    1199 <do_ftuneven+0x59>
xorpd  %xmm2,%xmm2
xor    %edx,%edx
jmp    11f0 <do_ftuneven+0xb0>
xorpd  %xmm2,%xmm2
jmp    120e <do_ftuneven+0xce>
and    $0xfffffff8,%esi
xorpd  %xmm2,%xmm2
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
addsd  (%r15,%rdx,8),%xmm2
addsd  0x8(%r15,%rdx,8),%xmm2
addsd  0x10(%r15,%rdx,8),%xmm2
addsd  0x18(%r15,%rdx,8),%xmm2
addsd  0x20(%r15,%rdx,8),%xmm2
addsd  0x28(%r15,%rdx,8),%xmm2
addsd  0x30(%r15,%rdx,8),%xmm2
addsd  0x38(%r15,%rdx,8),%xmm2
add    $0x8,%rdx
cmp    %rdx,%rsi
jne    11b0 <do_ftuneven+0x70>
test   %rax,%rax
je     120e <do_ftuneven+0xce>
lea    (%r15,%rdx,8),%rdx
xor    %esi,%esi
nopl   0x0(%rax,%rax,1)
addsd  (%rdx,%rsi,8),%xmm2
add    $0x1,%rsi
cmp    %rsi,%rax
jne    1200 <do_ftuneven+0xc0>
test   %ecx,%ecx
jle    17d5 <do_ftuneven+0x695>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
divsd  %xmm0,%xmm2
mov    %ecx,%eax
mov    %rax,0xd0(%rsp)
mov    0x50(%rsp),%rax
lea    -0x1(%rax),%rcx
mov    %rcx,0x90(%rsp)
mov    %eax,%ecx
and    $0xfffffffe,%ecx
mov    %rcx,0xb8(%rsp)
mov    %eax,%edx
and    $0x3,%edx
mov    %eax,%esi
and    $0xfffffffc,%esi
xor    %ebp,%ebp
xorpd  %xmm3,%xmm3
movsd  %xmm0,0xb0(%rsp)
sqrtsd %xmm0,%xmm0
movsd  %xmm0,0xc8(%rsp)
mov    %ebx,0x3c(%rsp)
movsd  %xmm2,0x58(%rsp)
mov    %rdx,0xa0(%rsp)
mov    %rsi,0x98(%rsp)
mov    %r13,0x88(%rsp)
jmp    12e3 <do_ftuneven+0x1a3>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
divsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%rbp,8)
mov    0x110(%rsp),%rax
movq   $0x0,(%rax,%rbp,8)
movsd  (%r14,%rbp,8),%xmm0
mulsd  %xmm0,%xmm0
mov    0x118(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,8)
add    $0x1,%rbp
cmp    0xd0(%rsp),%rbp
je     17d5 <do_ftuneven+0x695>
movsd  0x0(%r13,%rbp,8),%xmm0
ucomisd %xmm3,%xmm0
jne    1320 <do_ftuneven+0x1e0>
jp     1320 <do_ftuneven+0x1e0>
movq   $0x0,(%r14,%rbp,8)
test   %ebx,%ebx
jle    13f0 <do_ftuneven+0x2b0>
cmpq   $0x3,0x90(%rsp)
jae    13f9 <do_ftuneven+0x2b9>
xorpd  %xmm1,%xmm1
xor    %eax,%eax
jmp    145c <do_ftuneven+0x31c>
nopl   0x0(%rax)
test   %ebx,%ebx
movsd  %xmm0,0x40(%rsp)
jle    14e1 <do_ftuneven+0x3a1>
addsd  %xmm0,%xmm0
cmpq   $0x0,0x90(%rsp)
movsd  %xmm0,0x10(%rsp)
xorpd  %xmm1,%xmm1
je     1509 <do_ftuneven+0x3c9>
movsd  %xmm1,(%rsp)
xor    %r13d,%r13d
xorpd  %xmm2,%xmm2
mov    0xb8(%rsp),%rbx
nop
movsd  %xmm2,0x20(%rsp)
movsd  (%r12,%r13,8),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1050 <cos@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%r12,%r13,8),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1040 <sin@plt>
addsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%r12,%r13,8),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1050 <cos@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%r12,%r13,8),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1040 <sin@plt>
movapd %xmm0,%xmm2
addsd  0x20(%rsp),%xmm2
add    $0x2,%r13
cmp    %r13,%rbx
jne    1360 <do_ftuneven+0x220>
jmp    1515 <do_ftuneven+0x3d5>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xorpd  %xmm1,%xmm1
jmp    148c <do_ftuneven+0x34c>
xorpd  %xmm1,%xmm1
xor    %eax,%eax
nop
movsd  (%r15,%rax,8),%xmm0
subsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%r14,%rbp,8)
movsd  0x8(%r15,%rax,8),%xmm1
subsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%rbp,8)
movsd  0x10(%r15,%rax,8),%xmm0
subsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%r14,%rbp,8)
movsd  0x18(%r15,%rax,8),%xmm1
subsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%rbp,8)
add    $0x4,%rax
cmp    %rax,%rsi
jne    1400 <do_ftuneven+0x2c0>
test   %rdx,%rdx
je     148c <do_ftuneven+0x34c>
lea    (%r15,%rax,8),%rax
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
movsd  (%rax,%rcx,8),%xmm0
subsd  %xmm2,%xmm0
addsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%rbp,8)
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1470 <do_ftuneven+0x330>
movsd  0xb0(%rsp),%xmm0
ucomisd %xmm3,%xmm0
movsd  0xc8(%rsp),%xmm0
jae    12a0 <do_ftuneven+0x160>
movsd  0xb0(%rsp),%xmm0
movsd  %xmm1,0x10(%rsp)
call   1060 <sqrt@plt>
movsd  0x10(%rsp),%xmm1
xorpd  %xmm3,%xmm3
mov    0x98(%rsp),%rsi
mov    0xa0(%rsp),%rdx
movsd  0x58(%rsp),%xmm2
jmp    12a0 <do_ftuneven+0x160>
xorpd  %xmm0,%xmm0
movapd %xmm0,0x60(%rsp)
xorpd  %xmm0,%xmm0
xorpd  %xmm1,%xmm1
call   1030 <atan2@plt>
xorpd  %xmm1,%xmm1
xorpd  %xmm3,%xmm3
xorpd  %xmm2,%xmm2
jmp    1663 <do_ftuneven+0x523>
movsd  %xmm1,(%rsp)
xor    %r13d,%r13d
xorpd  %xmm2,%xmm2
movsd  0x10(%rsp),%xmm1
testb  $0x1,0x50(%rsp)
je     1560 <do_ftuneven+0x420>
movsd  (%r12,%r13,8),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm2,0x20(%rsp)
call   1050 <cos@plt>
movsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  (%r12,%r13,8),%xmm0
call   1040 <sin@plt>
movsd  0x20(%rsp),%xmm2
addsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
movsd  (%rsp),%xmm1
call   1030 <atan2@plt>
mulsd  0xa8a(%rip),%xmm0
mov    0x3c(%rsp),%ebx
test   %ebx,%ebx
movapd %xmm0,0x60(%rsp)
jle    164f <do_ftuneven+0x50f>
xorpd  0xa80(%rip),%xmm0
movapd %xmm0,(%rsp)
xorpd  %xmm0,%xmm0
xor    %ebx,%ebx
xorpd  %xmm1,%xmm1
mov    0x50(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movapd %xmm1,0x20(%rsp)
movapd %xmm0,0x70(%rsp)
movsd  (%r12,%rbx,8),%xmm0
mulsd  0x40(%rsp),%xmm0
addsd  (%rsp),%xmm0
call   1050 <cos@plt>
movapd %xmm0,0x10(%rsp)
movsd  (%r12,%rbx,8),%xmm0
mulsd  0x40(%rsp),%xmm0
addsd  (%rsp),%xmm0
call   1040 <sin@plt>
movapd 0x20(%rsp),%xmm5
movapd 0x70(%rsp),%xmm4
movapd 0x10(%rsp),%xmm2
movsd  (%r15,%rbx,8),%xmm3
subsd  0x58(%rsp),%xmm3
unpcklpd %xmm3,%xmm3
unpcklpd %xmm0,%xmm2
mulpd  %xmm2,%xmm3
movapd %xmm3,%xmm0
addpd  %xmm4,%xmm0
mulpd  %xmm2,%xmm2
movapd %xmm2,%xmm1
addpd  %xmm5,%xmm1
add    $0x1,%rbx
cmp    %rbx,%r13
jne    15b0 <do_ftuneven+0x470>
addpd  %xmm5,%xmm2
addpd  %xmm4,%xmm3
mov    0x88(%rsp),%r13
mov    0x3c(%rsp),%ebx
jmp    165f <do_ftuneven+0x51f>
xorpd  %xmm3,%xmm3
xorpd  %xmm2,%xmm2
mov    0x88(%rsp),%r13
xorpd  %xmm1,%xmm1
movsd  0xa8(%rsp),%xmm0
ucomisd %xmm1,%xmm0
jbe    167a <do_ftuneven+0x53a>
divpd  0x9a6(%rip),%xmm3
ucomisd %xmm1,%xmm2
movapd %xmm2,0x10(%rsp)
movapd %xmm3,0x20(%rsp)
jb     1695 <do_ftuneven+0x555>
xorps  %xmm4,%xmm4
sqrtsd %xmm2,%xmm4
jmp    16ac <do_ftuneven+0x56c>
movapd %xmm2,%xmm0
call   1060 <sqrt@plt>
movapd 0x10(%rsp),%xmm2
xorpd  %xmm1,%xmm1
movapd %xmm0,%xmm4
mulsd  0x954(%rip),%xmm4
movapd %xmm2,%xmm0
unpckhpd %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     16c8 <do_ftuneven+0x588>
sqrtsd %xmm0,%xmm0
jmp    16d7 <do_ftuneven+0x597>
movsd  %xmm4,(%rsp)
call   1060 <sqrt@plt>
movsd  (%rsp),%xmm4
movsd  0x40(%rsp),%xmm1
movapd 0x20(%rsp),%xmm2
movapd %xmm2,%xmm3
divsd  %xmm4,%xmm3
movapd %xmm3,0x40(%rsp)
movapd %xmm2,%xmm3
unpckhpd %xmm2,%xmm3
mulsd  0xa8(%rsp),%xmm3
mulsd  0x8fe(%rip),%xmm0
divsd  %xmm0,%xmm3
movapd %xmm3,(%rsp)
mulsd  0xc0(%rsp),%xmm1
movapd 0x60(%rsp),%xmm0
subsd  %xmm1,%xmm0
movapd %xmm0,0x60(%rsp)
call   1050 <cos@plt>
movsd  %xmm0,0x70(%rsp)
movapd 0x60(%rsp),%xmm0
call   1040 <sin@plt>
mulsd  (%rsp),%xmm0
movsd  0x70(%rsp),%xmm1
mulsd  0x40(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%r14,%rbp,8)
movaps 0x60(%rsp),%xmm0
call   1050 <cos@plt>
movsd  %xmm0,0x70(%rsp)
movapd 0x60(%rsp),%xmm0
call   1040 <sin@plt>
mulsd  0x40(%rsp),%xmm0
movsd  0x70(%rsp),%xmm1
mulsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
mov    0x110(%rsp),%rax
movsd  %xmm1,(%rax,%rbp,8)
movapd 0x20(%rsp),%xmm1
mulpd  %xmm1,%xmm1
divpd  0x10(%rsp),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
movsd  0x58(%rsp),%xmm2
mov    0xa0(%rsp),%rdx
mov    0x98(%rsp),%rsi
xorpd  %xmm3,%xmm3
jmp    12c4 <do_ftuneven+0x184>
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @do_ftuneven(i32 %0, double* %1, double* %2, double %3, double %4, i32 %5, double* %6, double* %7, double* %8, double* %9) {
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
%14 = alloca double
%15 = alloca double
%16 = alloca i32
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca i32
%22 = alloca i32
%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 i32 %0, i32* %11
store double* %1, double** %12
store double* %2, double** %13
store double %3, double* %14
store double %4, double* %15
store i32 %5, i32* %16
store double* %6, double** %17
store double* %7, double** %18
store double* %8, double** %19
store double* %9, double** %20
store double 0.000000e+00, double* %23
store i32 0, i32* %22
br label %37
37: ; preds = %49, %10
%38 = load i32, i32* %22
%39 = load i32, i32* %11
%40 = icmp slt i32 %38, %39
br i1 %40, label %41, label %52
41: ; preds = %37
%42 = load double*, double** %13
%43 = load i32, i32* %22
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds double, double* %42, i64 %44
%46 = load double, double* %45
%47 = load double, double* %23
%48 = fadd double %47, %46
store double %48, double* %23
br label %49
49: ; preds = %41
%50 = load i32, i32* %22
%51 = add nsw i32 %50, 1
store i32 %51, i32* %22
br label %37
52: ; preds = %37
%53 = load double, double* %23
%54 = load i32, i32* %11
%55 = sitofp i32 %54 to double
%56 = fdiv double %53, %55
store double %56, double* %23
store i32 0, i32* %21
br label %57
57: ; preds = %291, %52
%58 = load i32, i32* %21
%59 = load i32, i32* %16
%60 = icmp slt i32 %58, %59
br i1 %60, label %61, label %294
61: ; preds = %57
%62 = load double*, double** %17
%63 = load i32, i32* %21
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds double, double* %62, i64 %64
%66 = load double, double* %65
store double %66, double* %24
%67 = load double, double* %24
%68 = fcmp oeq double %67, 0.000000e+00
br i1 %68, label %69, label %128
69: ; preds = %61
%70 = load double*, double** %18
%71 = load i32, i32* %21
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double, double* %70, i64 %72
store double 0.000000e+00, double* %73
store i32 0, i32* %22
br label %74
74: ; preds = %92, %69
%75 = load i32, i32* %22
%76 = load i32, i32* %11
%77 = icmp slt i32 %75, %76
br i1 %77, label %78, label %95
78: ; preds = %74
%79 = load double*, double** %13
%80 = load i32, i32* %22
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds double, double* %79, i64 %81
%83 = load double, double* %82
%84 = load double, double* %23
%85 = fsub double %83, %84
%86 = load double*, double** %18
%87 = load i32, i32* %21
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds double, double* %86, i64 %88
%90 = load double, double* %89
%91 = fadd double %90, %85
store double %91, double* %89
br label %92
92: ; preds = %78
%93 = load i32, i32* %22
%94 = add nsw i32 %93, 1
store i32 %94, i32* %22
br label %74
95: ; preds = %74
%96 = load double*, double** %18
%97 = load i32, i32* %21
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds double, double* %96, i64 %98
%100 = load double, double* %99
%101 = load i32, i32* %11
%102 = sitofp i32 %101 to double
%103 = call double @sqrt(double %102)
%104 = fdiv double %100, %103
%105 = load double*, double** %18
%106 = load i32, i32* %21
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds double, double* %105, i64 %107
store double %104, double* %108
%109 = load double*, double** %19
%110 = load i32, i32* %21
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds double, double* %109, i64 %111
store double 0.000000e+00, double* %112
%113 = load double*, double** %18
%114 = load i32, i32* %21
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %113, i64 %115
%117 = load double, double* %116
%118 = load double*, double** %18
%119 = load i32, i32* %21
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds double, double* %118, i64 %120
%122 = load double, double* %121
%123 = fmul double %117, %122
%124 = load double*, double** %20
%125 = load i32, i32* %21
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds double, double* %124, i64 %126
store double %123, double* %127
br label %290
128: ; preds = %61
store double 0.000000e+00, double* %25
store double 0.000000e+00, double* %26
store i32 0, i32* %22
br label %129
129: ; preds = %156, %128
%130 = load i32, i32* %22
%131 = load i32, i32* %11
%132 = icmp slt i32 %130, %131
br i1 %132, label %133, label %159
133: ; preds = %129
%134 = load double, double* %24
%135 = fmul double 2.000000e+00, %134
%136 = load double*, double** %12
%137 = load i32, i32* %22
%138 = sext i32 %137 to i64
%139 = getelementptr inbounds double, double* %136, i64 %138
%140 = load double, double* %139
%141 = fmul double %135, %140
%142 = call double @cos(double %141)
%143 = load double, double* %25
%144 = fadd double %143, %142
store double %144, double* %25
%145 = load double, double* %24
%146 = fmul double 2.000000e+00, %145
%147 = load double*, double** %12
%148 = load i32, i32* %22
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds double, double* %147, i64 %149
%151 = load double, double* %150
%152 = fmul double %146, %151
%153 = call double @sin(double %152)
%154 = load double, double* %26
%155 = fadd double %154, %153
store double %155, double* %26
br label %156
156: ; preds = %133
%157 = load i32, i32* %22
%158 = add nsw i32 %157, 1
store i32 %158, i32* %22
br label %129
159: ; preds = %129
%160 = load double, double* %26
%161 = load double, double* %25
%162 = call double @atan2(double %160, double %161)
%163 = fmul double 5.000000e-01, %162
store double %163, double* %27
store double 0.000000e+00, double* %28
store double 0.000000e+00, double* %29
store double 0.000000e+00, double* %30
store double 0.000000e+00, double* %31
store i32 0, i32* %22
br label %164
164: ; preds = %217, %159
%165 = load i32, i32* %22
%166 = load i32, i32* %11
%167 = icmp slt i32 %165, %166
br i1 %167, label %168, label %220
168: ; preds = %164
%169 = load double, double* %24
%170 = load double*, double** %12
%171 = load i32, i32* %22
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds double, double* %170, i64 %172
%174 = load double, double* %173
%175 = load double, double* %27
%176 = fneg double %175
%177 = call double @llvm.fmuladd.f64(double %169, double %174, double %176)
%178 = call double @cos(double %177)
store double %178, double* %32
%179 = load double, double* %24
%180 = load double*, double** %12
%181 = load i32, i32* %22
%182 = sext i32 %181 to i64
%183 = getelementptr inbounds double, double* %180, i64 %182
%184 = load double, double* %183
%185 = load double, double* %27
%186 = fneg double %185
%187 = call double @llvm.fmuladd.f64(double %179, double %184, double %186)
%188 = call double @sin(double %187)
store double %188, double* %33
%189 = load double*, double** %13
%190 = load i32, i32* %22
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds double, double* %189, i64 %191
%193 = load double, double* %192
%194 = load double, double* %23
%195 = fsub double %193, %194
%196 = load double, double* %32
%197 = load double, double* %28
%198 = call double @llvm.fmuladd.f64(double %195, double %196, double %197)
store double %198, double* %28
%199 = load double*, double** %13
%200 = load i32, i32* %22
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds double, double* %199, i64 %201
%203 = load double, double* %202
%204 = load double, double* %23
%205 = fsub double %203, %204
%206 = load double, double* %33
%207 = load double, double* %29
%208 = call double @llvm.fmuladd.f64(double %205, double %206, double %207)
store double %208, double* %29
%209 = load double, double* %32
%210 = load double, double* %32
%211 = load double, double* %30
%212 = call double @llvm.fmuladd.f64(double %209, double %210, double %211)
store double %212, double* %30
%213 = load double, double* %33
%214 = load double, double* %33
%215 = load double, double* %31
%216 = call double @llvm.fmuladd.f64(double %213, double %214, double %215)
store double %216, double* %31
br label %217
217: ; preds = %168
%218 = load i32, i32* %22
%219 = add nsw i32 %218, 1
store i32 %219, i32* %22
br label %164
220: ; preds = %164
%221 = load double, double* %14
%222 = fcmp ogt double %221, 0.000000e+00
br i1 %222, label %223, label %230
223: ; preds = %220
%224 = load double, double* %28
%225 = call double @sqrt(double 2.000000e+00)
%226 = fdiv double %224, %225
store double %226, double* %28
%227 = load double, double* %29
%228 = call double @sqrt(double 2.000000e+00)
%229 = fdiv double %227, %228
store double %229, double* %29
br label %230
230: ; preds = %223, %220
%231 = load double, double* %28
%232 = call double @sqrt(double 2.000000e+00)
%233 = load double, double* %30
%234 = call double @sqrt(double %233)
%235 = fmul double %232, %234
%236 = fdiv double %231, %235
store double %236, double* %34
%237 = load double, double* %14
%238 = load double, double* %29
%239 = fmul double %237, %238
%240 = call double @sqrt(double 2.000000e+00)
%241 = load double, double* %31
%242 = call double @sqrt(double %241)
%243 = fmul double %240, %242
%244 = fdiv double %239, %243
store double %244, double* %35
%245 = load double, double* %27
%246 = load double, double* %24
%247 = load double, double* %15
%248 = fneg double %246
%249 = call double @llvm.fmuladd.f64(double %248, double %247, double %245)
store double %249, double* %36
%250 = load double, double* %34
%251 = load double, double* %36
%252 = call double @cos(double %251)
%253 = load double, double* %35
%254 = load double, double* %36
%255 = call double @sin(double %254)
%256 = fmul double %253, %255
%257 = fneg double %256
%258 = call double @llvm.fmuladd.f64(double %250, double %252, double %257)
%259 = load double*, double** %18
%260 = load i32, i32* %21
%261 = sext i32 %260 to i64
%262 = getelementptr inbounds double, double* %259, i64 %261
store double %258, double* %262
%263 = load double, double* %35
%264 = load double, double* %36
%265 = call double @cos(double %264)
%266 = load double, double* %34
%267 = load double, double* %36
%268 = call double @sin(double %267)
%269 = fmul double %266, %268
%270 = call double @llvm.fmuladd.f64(double %263, double %265, double %269)
%271 = load double*, double** %19
%272 = load i32, i32* %21
%273 = sext i32 %272 to i64
%274 = getelementptr inbounds double, double* %271, i64 %273
store double %270, double* %274
%275 = load double, double* %28
%276 = load double, double* %28
%277 = fmul double %275, %276
%278 = load double, double* %30
%279 = fdiv double %277, %278
%280 = load double, double* %29
%281 = load double, double* %29
%282 = fmul double %280, %281
%283 = load double, double* %31
%284 = fdiv double %282, %283
%285 = fadd double %279, %284
%286 = load double*, double** %20
%287 = load i32, i32* %21
%288 = sext i32 %287 to i64
%289 = getelementptr inbounds double, double* %286, i64 %288
store double %285, double* %289
br label %290
290: ; preds = %230, %95
br label %291
291: ; preds = %290
%292 = load i32, i32* %21
%293 = add nsw i32 %292, 1
store i32 %293, i32* %21
br label %57
294: ; preds = %57
ret void
}

LLVM IR (-O2):
define void @do_ftuneven(i32 %0, double* nocapture %1, double* nocapture %2, double %3, double %4, i32 %5, double* nocapture %6, double* nocapture %7, double* nocapture writeonly %8, double* nocapture writeonly %9) {
%11 = icmp sgt i32 %0, 0
br i1 %11, label %12, label %72
12: ; preds = %10
%13 = zext i32 %0 to i64
%14 = add nsw i64 %13, -1
%15 = and i64 %13, 7
%16 = icmp ult i64 %14, 7
br i1 %16, label %57, label %17
17: ; preds = %12
%18 = and i64 %13, 4294967288
br label %19
19: ; preds = %19, %17
%20 = phi i64 [ 0, %17 ], [ %54, %19 ]
%21 = phi double [ 0.000000e+00, %17 ], [ %53, %19 ]
%22 = phi i64 [ 0, %17 ], [ %55, %19 ]
%23 = getelementptr inbounds double, double* %2, i64 %20
%24 = load double, double* %23
%25 = fadd double %21, %24
%26 = or i64 %20, 1
%27 = getelementptr inbounds double, double* %2, i64 %26
%28 = load double, double* %27
%29 = fadd double %25, %28
%30 = or i64 %20, 2
%31 = getelementptr inbounds double, double* %2, i64 %30
%32 = load double, double* %31
%33 = fadd double %29, %32
%34 = or i64 %20, 3
%35 = getelementptr inbounds double, double* %2, i64 %34
%36 = load double, double* %35
%37 = fadd double %33, %36
%38 = or i64 %20, 4
%39 = getelementptr inbounds double, double* %2, i64 %38
%40 = load double, double* %39
%41 = fadd double %37, %40
%42 = or i64 %20, 5
%43 = getelementptr inbounds double, double* %2, i64 %42
%44 = load double, double* %43
%45 = fadd double %41, %44
%46 = or i64 %20, 6
%47 = getelementptr inbounds double, double* %2, i64 %46
%48 = load double, double* %47
%49 = fadd double %45, %48
%50 = or i64 %20, 7
%51 = getelementptr inbounds double, double* %2, i64 %50
%52 = load double, double* %51
%53 = fadd double %49, %52
%54 = add nuw nsw i64 %20, 8
%55 = add i64 %22, 8
%56 = icmp eq i64 %55, %18
br i1 %56, label %57, label %19
57: ; preds = %19, %12
%58 = phi double [ undef, %12 ], [ %53, %19 ]
%59 = phi i64 [ 0, %12 ], [ %54, %19 ]
%60 = phi double [ 0.000000e+00, %12 ], [ %53, %19 ]
%61 = icmp eq i64 %15, 0
br i1 %61, label %72, label %62
62: ; preds = %57, %62
%63 = phi i64 [ %69, %62 ], [ %59, %57 ]
%64 = phi double [ %68, %62 ], [ %60, %57 ]
%65 = phi i64 [ %70, %62 ], [ 0, %57 ]
%66 = getelementptr inbounds double, double* %2, i64 %63
%67 = load double, double* %66
%68 = fadd double %64, %67
%69 = add nuw nsw i64 %63, 1
%70 = add i64 %65, 1
%71 = icmp eq i64 %70, %15
br i1 %71, label %72, label %62
72: ; preds = %57, %62, %10
%73 = phi double [ 0.000000e+00, %10 ], [ %58, %57 ], [ %68, %62 ]
%74 = sitofp i32 %0 to double
%75 = fdiv double %73, %74
%76 = icmp sgt i32 %5, 0
br i1 %76, label %77, label %267
77: ; preds = %72
%78 = fcmp ogt double %3, 0.000000e+00
%79 = zext i32 %5 to i64
%80 = zext i32 %0 to i64
%81 = zext i32 %0 to i64
%82 = add nsw i64 %80, -1
%83 = and i64 %80, 1
%84 = icmp eq i64 %82, 0
%85 = and i64 %80, 4294967294
%86 = icmp eq i64 %83, 0
%87 = and i64 %80, 3
%88 = icmp ult i64 %82, 3
%89 = and i64 %80, 4294967292
%90 = icmp eq i64 %87, 0
br label %91
91: ; preds = %77, %262
%92 = phi i64 [ 0, %77 ], [ %265, %262 ]
%93 = getelementptr inbounds double, double* %6, i64 %92
%94 = load double, double* %93
%95 = fcmp oeq double %94, 0.000000e+00
br i1 %95, label %101, label %96
96: ; preds = %91
br i1 %11, label %99, label %97
97: ; preds = %96
%98 = tail call double @atan2(double 0.000000e+00, double 0.000000e+00)
br label %227
99: ; preds = %96
%100 = fmul double %94, 2.000000e+00
br i1 %84, label %179, label %152
101: ; preds = %91
%102 = getelementptr inbounds double, double* %7, i64 %92
store double 0.000000e+00, double* %102
br i1 %11, label %103, label %145
103: ; preds = %101
br i1 %88, label %130, label %104
104: ; preds = %103, %104
%105 = phi double [ %126, %104 ], [ 0.000000e+00, %103 ]
%106 = phi i64 [ %127, %104 ], [ 0, %103 ]
%107 = phi i64 [ %128, %104 ], [ 0, %103 ]
%108 = getelementptr inbounds double, double* %2, i64 %106
%109 = load double, double* %108
%110 = fsub double %109, %75
%111 = fadd double %105, %110
store double %111, double* %102
%112 = or i64 %106, 1
%113 = getelementptr inbounds double, double* %2, i64 %112
%114 = load double, double* %113
%115 = fsub double %114, %75
%116 = fadd double %111, %115
store double %116, double* %102
%117 = or i64 %106, 2
%118 = getelementptr inbounds double, double* %2, i64 %117
%119 = load double, double* %118
%120 = fsub double %119, %75
%121 = fadd double %116, %120
store double %121, double* %102
%122 = or i64 %106, 3
%123 = getelementptr inbounds double, double* %2, i64 %122
%124 = load double, double* %123
%125 = fsub double %124, %75
%126 = fadd double %121, %125
store double %126, double* %102
%127 = add nuw nsw i64 %106, 4
%128 = add i64 %107, 4
%129 = icmp eq i64 %128, %89
br i1 %129, label %130, label %104
130: ; preds = %104, %103
%131 = phi double [ undef, %103 ], [ %126, %104 ]
%132 = phi double [ 0.000000e+00, %103 ], [ %126, %104 ]
%133 = phi i64 [ 0, %103 ], [ %127, %104 ]
br i1 %90, label %145, label %134
134: ; preds = %130, %134
%135 = phi double [ %141, %134 ], [ %132, %130 ]
%136 = phi i64 [ %142, %134 ], [ %133, %130 ]
%137 = phi i64 [ %143, %134 ], [ 0, %130 ]
%138 = getelementptr inbounds double, double* %2, i64 %136
%139 = load double, double* %138
%140 = fsub double %139, %75
%141 = fadd double %135, %140
store double %141, double* %102
%142 = add nuw nsw i64 %136, 1
%143 = add i64 %137, 1
%144 = icmp eq i64 %143, %87
br i1 %144, label %145, label %134
145: ; preds = %130, %134, %101
%146 = phi double [ 0.000000e+00, %101 ], [ %131, %130 ], [ %141, %134 ]
%147 = tail call double @sqrt(double %74)
%148 = fdiv double %146, %147
store double %148, double* %102
%149 = getelementptr inbounds double, double* %8, i64 %92
store double 0.000000e+00, double* %149
%150 = load double, double* %102
%151 = fmul double %150, %150
br label %262
152: ; preds = %99, %152
%153 = phi i64 [ %176, %152 ], [ 0, %99 ]
%154 = phi double [ %171, %152 ], [ 0.000000e+00, %99 ]
%155 = phi double [ %175, %152 ], [ 0.000000e+00, %99 ]
%156 = phi i64 [ %177, %152 ], [ 0, %99 ]
%157 = getelementptr inbounds double, double* %1, i64 %153
%158 = load double, double* %157
%159 = fmul double %100, %158
%160 = tail call double @cos(double %159)
%161 = fadd double %154, %160
%162 = load double, double* %157
%163 = fmul double %100, %162
%164 = tail call double @sin(double %163)
%165 = fadd double %155, %164
%166 = or i64 %153, 1
%167 = getelementptr inbounds double, double* %1, i64 %166
%168 = load double, double* %167
%169 = fmul double %100, %168
%170 = tail call double @cos(double %169)
%171 = fadd double %161, %170
%172 = load double, double* %167
%173 = fmul double %100, %172
%174 = tail call double @sin(double %173)
%175 = fadd double %165, %174
%176 = add nuw nsw i64 %153, 2
%177 = add i64 %156, 2
%178 = icmp eq i64 %177, %85
br i1 %178, label %179, label %152
179: ; preds = %152, %99
%180 = phi double [ undef, %99 ], [ %171, %152 ]
%181 = phi double [ undef, %99 ], [ %175, %152 ]
%182 = phi i64 [ 0, %99 ], [ %176, %152 ]
%183 = phi double [ 0.000000e+00, %99 ], [ %171, %152 ]
%184 = phi double [ 0.000000e+00, %99 ], [ %175, %152 ]
br i1 %86, label %195, label %185
185: ; preds = %179
%186 = getelementptr inbounds double, double* %1, i64 %182
%187 = load double, double* %186
%188 = fmul double %100, %187
%189 = tail call double @cos(double %188)
%190 = fadd double %183, %189
%191 = load double, double* %186
%192 = fmul double %100, %191
%193 = tail call double @sin(double %192)
%194 = fadd double %184, %193
br label %195
195: ; preds = %179, %185
%196 = phi double [ %180, %179 ], [ %190, %185 ]
%197 = phi double [ %181, %179 ], [ %194, %185 ]
%198 = tail call double @atan2(double %197, double %196)
%199 = fmul double %198, 5.000000e-01
br i1 %11, label %200, label %227
200: ; preds = %195
%201 = fneg double %199
br label %202
202: ; preds = %200, %202
%203 = phi i64 [ 0, %200 ], [ %222, %202 ]
%204 = phi <2 x double> [ zeroinitializer, %200 ], [ %220, %202 ]
%205 = phi <2 x double> [ zeroinitializer, %200 ], [ %221, %202 ]
%206 = getelementptr inbounds double, double* %1, i64 %203
%207 = load double, double* %206
%208 = tail call double @llvm.fmuladd.f64(double %94, double %207, double %201)
%209 = tail call double @cos(double %208)
%210 = load double, double* %206
%211 = tail call double @llvm.fmuladd.f64(double %94, double %210, double %201)
%212 = tail call double @sin(double %211)
%213 = getelementptr inbounds double, double* %2, i64 %203
%214 = load double, double* %213
%215 = fsub double %214, %75
%216 = insertelement <2 x double> poison, double %215, i64 0
%217 = shufflevector <2 x double> %216, <2 x double> poison, <2 x i32> zeroinitializer
%218 = insertelement <2 x double> poison, double %209, i64 0
%219 = insertelement <2 x double> %218, double %212, i64 1
%220 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %217, <2 x double> %219, <2 x double> %204)
%221 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %219, <2 x double> %219, <2 x double> %205)
%222 = add nuw nsw i64 %203, 1
%223 = icmp eq i64 %222, %81
br i1 %223, label %224, label %202
224: ; preds = %202
%225 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %219, <2 x double> %219, <2 x double> %205)
%226 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %217, <2 x double> %219, <2 x double> %204)
br label %227
227: ; preds = %224, %97, %195
%228 = phi double [ %199, %195 ], [ 0.000000e+00, %97 ], [ %199, %224 ]
%229 = phi <2 x double> [ zeroinitializer, %195 ], [ zeroinitializer, %97 ], [ %226, %224 ]
%230 = phi <2 x double> [ zeroinitializer, %195 ], [ zeroinitializer, %97 ], [ %225, %224 ]
%231 = fdiv <2 x double> %229, <double 0x3FF6A09E667F3BCD, double 0x3FF6A09E667F3BCD>
%232 = select i1 %78, <2 x double> %231, <2 x double> %229
%233 = extractelement <2 x double> %230, i64 0
%234 = tail call double @sqrt(double %233)
%235 = fmul double %234, 0x3FF6A09E667F3BCD
%236 = extractelement <2 x double> %232, i64 0
%237 = fdiv double %236, %235
%238 = extractelement <2 x double> %232, i64 1
%239 = fmul double %238, %3
%240 = extractelement <2 x double> %230, i64 1
%241 = tail call double @sqrt(double %240)
%242 = fmul double %241, 0x3FF6A09E667F3BCD
%243 = fdiv double %239, %242
%244 = fneg double %94
%245 = tail call double @llvm.fmuladd.f64(double %244, double %4, double %228)
%246 = tail call double @cos(double %245)
%247 = tail call double @sin(double %245)
%248 = fneg double %243
%249 = fmul double %247, %248
%250 = tail call double @llvm.fmuladd.f64(double %237, double %246, double %249)
%251 = getelementptr inbounds double, double* %7, i64 %92
store double %250, double* %251
%252 = tail call double @cos(double %245)
%253 = tail call double @sin(double %245)
%254 = fmul double %237, %253
%255 = tail call double @llvm.fmuladd.f64(double %243, double %252, double %254)
%256 = getelementptr inbounds double, double* %8, i64 %92
store double %255, double* %256
%257 = fmul <2 x double> %232, %232
%258 = fdiv <2 x double> %257, %230
%259 = shufflevector <2 x double> %258, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%260 = fadd <2 x double> %258, %259
%261 = extractelement <2 x double> %260, i64 0
br label %262
262: ; preds = %145, %227
%263 = phi double [ %151, %145 ], [ %261, %227 ]
%264 = getelementptr inbounds double, double* %9, i64 %92
store double %263, double* %264
%265 = add nuw nsw i64 %92, 1
%266 = icmp eq i64 %265, %79
br i1 %266, label %267, label %91
267: ; preds = %262, %72
ret void
}