#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 */
float cosf(float);
float expf(float);
int /*<<< orphan*/ memset(float *, int /*<<< orphan*/, size_t);
int /*<<< orphan*/ setPhasorPeriod(float);
float sinf(float);
float sqrtf(float);
int GCI_Phasor(float xincr, float y[], int fit_start, int fit_end, float *Z,
               float *U, float *V, float *taup, float *taum, float *tau,
               float *fitted, float *residuals, float *chisq) {
  int i, ret = 0, nBins;
  float *data, u, v, A, w, I, Ifit, bg, chisq_local, res, sigma2;
  data = &(y[fit_start]);
  nBins = (fit_end - fit_start);
  bg = *Z;
  if (!data)
    return (-1);
  if (nBins < 0)
    return (-2);
  w = 2.0f * 3.1415926535897932384626433832795028841971f / (float)nBins;
  setPhasorPeriod((float)nBins * xincr);
  for (i = 0, I = 0.0f; i < nBins; i++)
    I += (data[i] - bg);
  for (i = 0, u = 0.0f; i < nBins; i++)
    u += (data[i] - bg) * cosf(w * ((float)i + 0.5f));
  u /= I;
  for (i = 0, v = 0.0f; i < nBins; i++)
    v += (data[i] - bg) * sinf(w * ((float)i + 0.5f));
  v /= I;
  *taup = (xincr / w) * (v / u);
  *taum = (xincr / w) * sqrtf(1.0f / (u * u + v * v) - 1.0f);
  *tau = ((*taup) + (*taum)) / 2.0f;
  *U = u;
  *V = v;
  if (fitted == 0)
    return 0;
  memset(fitted, 0, (size_t)fit_end * sizeof(float));
  memset(residuals, 0, (size_t)fit_end * sizeof(float));
  for (Ifit = 0.0f, i = fit_start; i < fit_end; i++)
    Ifit += expf((float)(-(i - fit_start)) * xincr / (*tau));
  A = I / Ifit;
  for (i = fit_start; i < fit_end; i++) {
    fitted[i] = bg + A * expf((float)(-(i - fit_start)) * xincr / (*tau));
  }
  if (residuals == 0 && chisq == 0)
    return 0;
  chisq_local = 0.0f;
  for (i = 0; i < fit_start; i++) {
    res = y[i] - fitted[i];
    if (residuals != 0)
      residuals[i] = res;
  }
  for (i = fit_start; i < fit_end; i++) {
    res = y[i] - fitted[i];
    if (residuals != 0)
      residuals[i] = res;
    sigma2 = (fitted[i] > 1 ? 1.0f / fitted[i] : 1.0f);
    chisq_local += res * res * sigma2;
  }
  if (chisq != 0)
    *chisq = chisq_local;
  return (ret);
}


x86 assembly (clang, -O0):
<GCI_Phasor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
movss  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x18(%rbp),%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x64(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    11e5 <GCI_Phasor+0x85>
movl   $0xffffffff,-0x4(%rbp)
jmp    16da <GCI_Phasor+0x57a>
cmpl   $0x0,-0x3c(%rbp)
jge    11fb <GCI_Phasor+0x9b>
movl   $0xfffffffe,-0x4(%rbp)
jmp    16da <GCI_Phasor+0x57a>
cvtsi2ssl -0x3c(%rbp),%xmm1
movss  0xdf8(%rip),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x58(%rbp)
cvtsi2ssl -0x3c(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
call   1080 <setPhasorPeriod@plt>
movl   $0x0,-0x34(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x5c(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1265 <GCI_Phasor+0x105>
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
subss  -0x64(%rbp),%xmm0
addss  -0x5c(%rbp),%xmm0
movss  %xmm0,-0x5c(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    122f <GCI_Phasor+0xcf>
movl   $0x0,-0x34(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    12de <GCI_Phasor+0x17e>
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
subss  -0x64(%rbp),%xmm0
movss  %xmm0,-0x74(%rbp)
movss  -0x58(%rbp),%xmm0
cvtsi2ssl -0x34(%rbp),%xmm1
movss  0xd63(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
call   1040 <cosf@plt>
movaps %xmm0,%xmm2
movss  -0x74(%rbp),%xmm0
movss  -0x4c(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x4c(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1274 <GCI_Phasor+0x114>
movss  -0x5c(%rbp),%xmm1
movss  -0x4c(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x4c(%rbp)
movl   $0x0,-0x34(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x50(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    136a <GCI_Phasor+0x20a>
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
subss  -0x64(%rbp),%xmm0
movss  %xmm0,-0x78(%rbp)
movss  -0x58(%rbp),%xmm0
cvtsi2ssl -0x34(%rbp),%xmm1
movss  0xcd7(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
call   1030 <sinf@plt>
movaps %xmm0,%xmm2
movss  -0x78(%rbp),%xmm0
movss  -0x50(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x50(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1300 <GCI_Phasor+0x1a0>
movss  -0x5c(%rbp),%xmm1
movss  -0x50(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x50(%rbp)
movss  -0x8(%rbp),%xmm0
divss  -0x58(%rbp),%xmm0
movss  -0x50(%rbp),%xmm1
divss  -0x4c(%rbp),%xmm1
mulss  %xmm1,%xmm0
mov    0x10(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x8(%rbp),%xmm0
divss  -0x58(%rbp),%xmm0
movss  %xmm0,-0x7c(%rbp)
movss  -0x4c(%rbp),%xmm1
movss  -0x4c(%rbp),%xmm2
movss  -0x50(%rbp),%xmm0
mulss  -0x50(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  0xc38(%rip),%xmm0
divss  %xmm1,%xmm0
movss  0xc2c(%rip),%xmm1
subss  %xmm1,%xmm0
call   1070 <sqrtf@plt>
movaps %xmm0,%xmm1
movss  -0x7c(%rbp),%xmm0
mulss  %xmm1,%xmm0
mov    0x18(%rbp),%rax
movss  %xmm0,(%rax)
mov    0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    0x18(%rbp),%rax
addss  (%rax),%xmm0
movss  0xbf3(%rip),%xmm1
divss  %xmm1,%xmm0
mov    0x20(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x4c(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x50(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movss  %xmm0,(%rax)
cmpq   $0x0,0x28(%rbp)
jne    144e <GCI_Phasor+0x2ee>
movl   $0x0,-0x4(%rbp)
jmp    16da <GCI_Phasor+0x57a>
mov    0x28(%rbp),%rdi
movslq -0x18(%rbp),%rdx
shl    $0x2,%rdx
xor    %esi,%esi
call   1060 <memset@plt>
mov    0x30(%rbp),%rdi
movslq -0x18(%rbp),%rdx
shl    $0x2,%rdx
xor    %esi,%esi
call   1060 <memset@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x60(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    14c6 <GCI_Phasor+0x366>
mov    -0x34(%rbp),%ecx
sub    -0x14(%rbp),%ecx
xor    %eax,%eax
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
mulss  -0x8(%rbp),%xmm0
mov    0x20(%rbp),%rax
divss  (%rax),%xmm0
call   1050 <expf@plt>
addss  -0x60(%rbp),%xmm0
movss  %xmm0,-0x60(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1482 <GCI_Phasor+0x322>
movss  -0x5c(%rbp),%xmm0
divss  -0x60(%rbp),%xmm0
movss  %xmm0,-0x54(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1551 <GCI_Phasor+0x3f1>
movss  -0x64(%rbp),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movss  -0x54(%rbp),%xmm0
movss  %xmm0,-0x80(%rbp)
mov    -0x34(%rbp),%ecx
sub    -0x14(%rbp),%ecx
xor    %eax,%eax
sub    %ecx,%eax
cvtsi2ss %eax,%xmm0
mulss  -0x8(%rbp),%xmm0
mov    0x20(%rbp),%rax
divss  (%rax),%xmm0
call   1050 <expf@plt>
movss  -0x84(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movss  -0x80(%rbp),%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    14db <GCI_Phasor+0x37b>
cmpq   $0x0,0x30(%rbp)
jne    1573 <GCI_Phasor+0x413>
cmpq   $0x0,0x38(%rbp)
jne    1573 <GCI_Phasor+0x413>
movl   $0x0,-0x4(%rbp)
jmp    16da <GCI_Phasor+0x57a>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x68(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    15dd <GCI_Phasor+0x47d>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
subss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x6c(%rbp)
cmpq   $0x0,0x30(%rbp)
je     15ca <GCI_Phasor+0x46a>
movss  -0x6c(%rbp),%xmm0
mov    0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
jmp    15cf <GCI_Phasor+0x46f>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1582 <GCI_Phasor+0x422>
mov    -0x14(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    16bc <GCI_Phasor+0x55c>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
subss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x6c(%rbp)
cmpq   $0x0,0x30(%rbp)
je     162b <GCI_Phasor+0x4cb>
movss  -0x6c(%rbp),%xmm0
mov    0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  0x9c8(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    166b <GCI_Phasor+0x50b>
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movss  0x9af(%rip),%xmm0
divss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x88(%rbp)
ff
jmp    1680 <GCI_Phasor+0x520>
movss  0x995(%rip),%xmm0
movss  %xmm0,-0x88(%rbp)
ff
jmp    1680 <GCI_Phasor+0x520>
movss  -0x88(%rbp),%xmm0
ff
movss  %xmm0,-0x70(%rbp)
movss  -0x6c(%rbp),%xmm0
mulss  -0x6c(%rbp),%xmm0
movss  -0x70(%rbp),%xmm2
movss  -0x68(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x68(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    15e3 <GCI_Phasor+0x483>
cmpq   $0x0,0x38(%rbp)
je     16d4 <GCI_Phasor+0x574>
movss  -0x68(%rbp),%xmm0
mov    0x38(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x38(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GCI_Phasor>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
test   %rdi,%rdi
je     120f <GCI_Phasor+0xaf>
mov    %edx,%r12d
mov    %esi,%ebx
mov    %edx,%r14d
sub    %esi,%r14d
js     1219 <GCI_Phasor+0xb9>
mov    %r9,%rbp
mov    %rdi,%r15
movaps %xmm0,%xmm1
mov    %r8,0x50(%rsp)
movslq %ebx,%r13
xorps  %xmm0,%xmm0
cvtsi2ss %r14d,%xmm0
movss  (%rcx),%xmm2
movss  %xmm2,0x1c(%rsp)
movss  0xe4d(%rip),%xmm2
divss  %xmm0,%xmm2
movss  %xmm2,0xc(%rsp)
movss  %xmm1,0x14(%rsp)
mulss  %xmm1,%xmm0
call   1080 <setPhasorPeriod@plt>
xorps  %xmm3,%xmm3
test   %r14d,%r14d
mov    %r15,0x48(%rsp)
mov    %r12d,0x2c(%rsp)
mov    %ebx,0x28(%rsp)
je     1223 <GCI_Phasor+0xc3>
mov    %rbp,0x38(%rsp)
mov    %r14d,%ebp
lea    -0x1(%rbp),%rdi
mov    %ebp,%eax
and    $0x3,%eax
cmp    $0x3,%rdi
jae    1244 <GCI_Phasor+0xe4>
xorps  %xmm4,%xmm4
xor    %ecx,%ecx
movss  0x14(%rsp),%xmm2
movss  0x1c(%rsp),%xmm3
jmp    12b0 <GCI_Phasor+0x150>
mov    $0xffffffff,%eax
jmp    1801 <GCI_Phasor+0x6a1>
mov    $0xfffffffe,%eax
jmp    1801 <GCI_Phasor+0x6a1>
movss  0xdd9(%rip),%xmm5
xorps  %xmm4,%xmm4
xorps  %xmm6,%xmm6
movss  0x14(%rsp),%xmm2
mov    0x90(%rsp),%r14
jmp    155d <GCI_Phasor+0x3fd>
mov    %ebp,%edx
and    $0xfffffffc,%edx
lea    (%r15,%r13,4),%rsi
add    $0xc,%rsi
xorps  %xmm4,%xmm4
xor    %ecx,%ecx
movss  0x14(%rsp),%xmm2
movss  0x1c(%rsp),%xmm3
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  -0xc(%rsi,%rcx,4),%xmm0
movss  -0x8(%rsi,%rcx,4),%xmm1
subss  %xmm3,%xmm0
addss  %xmm4,%xmm0
subss  %xmm3,%xmm1
addss  %xmm0,%xmm1
movss  -0x4(%rsi,%rcx,4),%xmm0
subss  %xmm3,%xmm0
addss  %xmm1,%xmm0
movss  (%rsi,%rcx,4),%xmm4
subss  %xmm3,%xmm4
addss  %xmm0,%xmm4
add    $0x4,%rcx
cmp    %rcx,%rdx
jne    1270 <GCI_Phasor+0x110>
test   %rax,%rax
je     12d6 <GCI_Phasor+0x176>
add    %r13,%rcx
lea    (%r15,%rcx,4),%rcx
xor    %edx,%edx
xchg   %ax,%ax
movss  (%rcx,%rdx,4),%xmm0
subss  %xmm3,%xmm0
addss  %xmm0,%xmm4
add    $0x1,%rdx
cmp    %rdx,%rax
jne    12c0 <GCI_Phasor+0x160>
test   %r14d,%r14d
jle    13c9 <GCI_Phasor+0x269>
test   %rdi,%rdi
movss  %xmm4,0x18(%rsp)
je     13d8 <GCI_Phasor+0x278>
mov    %rdi,0x40(%rsp)
mov    %rbp,0x30(%rsp)
mov    %ebp,%ebx
and    $0xfffffffe,%ebx
lea    (%r15,%r13,4),%rbp
add    $0x4,%rbp
xorps  %xmm5,%xmm5
xor    %r12d,%r12d
nopl   0x0(%rax,%rax,1)
movss  %xmm5,0x20(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %r12d,%xmm0
movss  -0x4(%rbp,%r12,4),%xmm1
subss  %xmm3,%xmm1
movss  %xmm1,0x10(%rsp)
movss  0xcd1(%rip),%xmm1
addss  %xmm1,%xmm0
mulss  0xc(%rsp),%xmm0
call   1040 <cosf@plt>
mulss  0x10(%rsp),%xmm0
addss  0x20(%rsp),%xmm0
movss  %xmm0,0x20(%rsp)
lea    0x1(%r12),%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0x0(%rbp,%r12,4),%xmm1
subss  0x1c(%rsp),%xmm1
movss  %xmm1,0x10(%rsp)
addss  0xc89(%rip),%xmm0
mulss  0xc(%rsp),%xmm0
call   1040 <cosf@plt>
movss  0x1c(%rsp),%xmm3
movaps %xmm0,%xmm5
mulss  0x10(%rsp),%xmm5
addss  0x20(%rsp),%xmm5
add    $0x2,%r12
cmp    %rbx,%r12
jne    1310 <GCI_Phasor+0x1b0>
mov    0x48(%rsp),%r15
movss  0x14(%rsp),%xmm2
movss  0x18(%rsp),%xmm4
mov    0x30(%rsp),%rbp
mov    0x40(%rsp),%rdi
jmp    13de <GCI_Phasor+0x27e>
xorps  %xmm6,%xmm6
xorps  %xmm5,%xmm5
divss  %xmm4,%xmm5
jmp    154d <GCI_Phasor+0x3ed>
xorps  %xmm5,%xmm5
xor    %r12d,%r12d
lea    (%r15,%r13,4),%rax
test   $0x1,%bpl
je     1447 <GCI_Phasor+0x2e7>
movss  (%rax,%r12,4),%xmm1
xorps  %xmm0,%xmm0
cvtsi2ss %r12d,%xmm0
subss  %xmm3,%xmm1
movss  %xmm1,0x10(%rsp)
addss  0xc00(%rip),%xmm0
mulss  0xc(%rsp),%xmm0
movss  %xmm5,0x20(%rsp)
mov    %rdi,%r12
mov    %rax,%rbx
call   1040 <cosf@plt>
mov    %rbx,%rax
mov    %r12,%rdi
movss  0x20(%rsp),%xmm5
movss  0x18(%rsp),%xmm4
movss  0x1c(%rsp),%xmm3
movss  0x14(%rsp),%xmm2
mulss  0x10(%rsp),%xmm0
addss  %xmm0,%xmm5
divss  %xmm4,%xmm5
test   %r14d,%r14d
jle    154a <GCI_Phasor+0x3ea>
test   %rdi,%rdi
movss  %xmm5,0x20(%rsp)
je     1810 <GCI_Phasor+0x6b0>
mov    %rax,0x40(%rsp)
mov    %rbp,%r12
mov    %ebp,%r14d
and    $0xfffffffe,%r14d
lea    (%r15,%r13,4),%rbp
add    $0x4,%rbp
xorps  %xmm6,%xmm6
xor    %ebx,%ebx
nop
movss  %xmm6,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
movss  -0x4(%rbp,%rbx,4),%xmm1
subss  %xmm3,%xmm1
movss  %xmm1,0x30(%rsp)
movss  0xb63(%rip),%xmm1
addss  %xmm1,%xmm0
mulss  0xc(%rsp),%xmm0
call   1030 <sinf@plt>
mulss  0x30(%rsp),%xmm0
addss  0x10(%rsp),%xmm0
movss  %xmm0,0x10(%rsp)
lea    0x1(%rbx),%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0x0(%rbp,%rbx,4),%xmm1
subss  0x1c(%rsp),%xmm1
movss  %xmm1,0x30(%rsp)
addss  0xb1e(%rip),%xmm0
mulss  0xc(%rsp),%xmm0
call   1030 <sinf@plt>
movss  0x1c(%rsp),%xmm3
movaps %xmm0,%xmm6
mulss  0x30(%rsp),%xmm6
addss  0x10(%rsp),%xmm6
add    $0x2,%rbx
cmp    %r14,%rbx
jne    1480 <GCI_Phasor+0x320>
movss  0x14(%rsp),%xmm2
movss  0x18(%rsp),%xmm4
mov    0x90(%rsp),%r14
mov    %r12,%rbp
movss  0x20(%rsp),%xmm5
mov    0x40(%rsp),%rax
test   $0x1,%bpl
jne    1827 <GCI_Phasor+0x6c7>
mov    0x38(%rsp),%rbp
jmp    155a <GCI_Phasor+0x3fa>
xorps  %xmm6,%xmm6
mov    0x38(%rsp),%rbp
mov    0x90(%rsp),%r14
xorps  %xmm3,%xmm3
movss  0xc(%rsp),%xmm0
mov    0xa8(%rsp),%rdi
mov    0xa0(%rsp),%r12
mov    0x98(%rsp),%r15
divss  %xmm4,%xmm6
divss  %xmm0,%xmm2
movaps %xmm6,%xmm0
divss  %xmm5,%xmm0
mulss  %xmm2,%xmm0
movss  %xmm0,(%r14)
movaps %xmm6,%xmm0
mulss  %xmm6,%xmm0
movaps %xmm5,%xmm1
mulss  %xmm5,%xmm1
addss  %xmm0,%xmm1
movss  0xa5f(%rip),%xmm0
divss  %xmm1,%xmm0
addss  0xa57(%rip),%xmm0
ucomiss %xmm3,%xmm0
movss  %xmm4,0x18(%rsp)
jb     15ca <GCI_Phasor+0x46a>
sqrtss %xmm0,%xmm0
jmp    15f9 <GCI_Phasor+0x499>
mov    %rdi,%rbx
movss  %xmm5,0x20(%rsp)
movss  %xmm6,0x10(%rsp)
movss  %xmm2,0xc(%rsp)
call   1070 <sqrtf@plt>
movss  0xc(%rsp),%xmm2
movss  0x10(%rsp),%xmm6
movss  0x20(%rsp),%xmm5
mov    %rbx,%rdi
mov    0x50(%rsp),%rax
mulss  %xmm0,%xmm2
movss  %xmm2,(%r15)
addss  (%r14),%xmm2
mulss  0x9f4(%rip),%xmm2
movss  %xmm2,(%r12)
movss  %xmm5,(%rax)
movss  %xmm6,0x0(%rbp)
test   %rdi,%rdi
je     173e <GCI_Phasor+0x5de>
mov    0xb0(%rsp),%r15
mov    0x2c(%rsp),%ebx
movslq %ebx,%rax
mov    %rax,0x20(%rsp)
lea    0x0(,%rax,4),%r14
xor    %esi,%esi
mov    %r14,%rdx
call   1060 <memset@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1060 <memset@plt>
cmp    0x28(%rsp),%ebx
movss  0x14(%rsp),%xmm1
jle    172e <GCI_Phasor+0x5ce>
mov    0x28(%rsp),%ebx
sub    0x2c(%rsp),%ebx
xorps  %xmm3,%xmm3
xor    %ebp,%ebp
nopl   0x0(%rax)
movss  %xmm3,0xc(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ss %ebp,%xmm0
mulss  %xmm1,%xmm0
divss  (%r12),%xmm0
call   1050 <expf@plt>
movss  0xc(%rsp),%xmm3
movss  0x14(%rsp),%xmm1
addss  %xmm0,%xmm3
add    $0xffffffff,%ebp
cmp    %ebp,%ebx
jne    1680 <GCI_Phasor+0x520>
mov    0x28(%rsp),%eax
cmp    %eax,0x2c(%rsp)
jle    172e <GCI_Phasor+0x5ce>
movss  0x18(%rsp),%xmm0
divss  %xmm3,%xmm0
movss  %xmm0,0x18(%rsp)
mov    0xa8(%rsp),%rax
lea    (%rax,%r13,4),%rbp
mov    %r13,%r14
sub    0x20(%rsp),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
mulss  %xmm1,%xmm0
divss  (%r12),%xmm0
call   1050 <expf@plt>
movss  0x1c(%rsp),%xmm2
movss  0x14(%rsp),%xmm1
mulss  0x18(%rsp),%xmm0
addss  %xmm2,%xmm0
movss  %xmm0,0x0(%rbp)
add    $0x4,%rbp
add    $0xffffffffffffffff,%rbx
cmp    %rbx,%r14
jne    16f0 <GCI_Phasor+0x590>
mov    %r15,%rax
mov    0xb8(%rsp),%r8
or     %r8,%rax
jne    1745 <GCI_Phasor+0x5e5>
xor    %eax,%eax
jmp    1801 <GCI_Phasor+0x6a1>
mov    0x28(%rsp),%ebp
test   %ebp,%ebp
mov    0x48(%rsp),%rsi
mov    0x2c(%rsp),%edi
mov    0xa8(%rsp),%rbx
movss  0x8a8(%rip),%xmm4
jle    178d <GCI_Phasor+0x62d>
mov    %ebp,%ecx
cmp    $0x1,%ebp
jne    188b <GCI_Phasor+0x72b>
xor    %eax,%eax
test   $0x1,%cl
je     178d <GCI_Phasor+0x62d>
test   %r15,%r15
je     178d <GCI_Phasor+0x62d>
movss  (%rsi,%rax,4),%xmm0
subss  (%rbx,%rax,4),%xmm0
movss  %xmm0,(%r15,%rax,4)
xorps  %xmm0,%xmm0
cmp    %ebp,%edi
mov    $0x0,%eax
mov    0x20(%rsp),%rcx
jle    17f7 <GCI_Phasor+0x697>
xorps  %xmm0,%xmm0
jmp    17c5 <GCI_Phasor+0x665>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mulss  %xmm1,%xmm1
mulss  %xmm3,%xmm1
addss  %xmm1,%xmm0
add    $0x1,%r13
cmp    %r13,%rcx
je     17f7 <GCI_Phasor+0x697>
movss  (%rsi,%r13,4),%xmm1
movss  (%rbx,%r13,4),%xmm2
subss  %xmm2,%xmm1
test   %r15,%r15
je     17e6 <GCI_Phasor+0x686>
movss  %xmm1,(%r15,%r13,4)
movss  (%rbx,%r13,4),%xmm2
ucomiss %xmm4,%xmm2
movaps %xmm4,%xmm3
jbe    17b0 <GCI_Phasor+0x650>
movaps %xmm4,%xmm3
divss  %xmm2,%xmm3
jmp    17b0 <GCI_Phasor+0x650>
test   %r8,%r8
je     1801 <GCI_Phasor+0x6a1>
movss  %xmm0,(%r8)
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xorps  %xmm6,%xmm6
xor    %ebx,%ebx
mov    0x90(%rsp),%r14
test   $0x1,%bpl
je     1543 <GCI_Phasor+0x3e3>
movss  (%rax,%rbx,4),%xmm1
xorps  %xmm0,%xmm0
cvtsi2ss %ebx,%xmm0
subss  %xmm3,%xmm1
movss  %xmm1,0x30(%rsp)
addss  0x7c3(%rip),%xmm0
mulss  0xc(%rsp),%xmm0
movss  %xmm6,0x10(%rsp)
call   1030 <sinf@plt>
movss  0x10(%rsp),%xmm6
movss  0x20(%rsp),%xmm5
movss  0x18(%rsp),%xmm4
movss  0x14(%rsp),%xmm2
mulss  0x30(%rsp),%xmm0
addss  %xmm0,%xmm6
movss  0xc(%rsp),%xmm0
mov    0x38(%rsp),%rbp
xorps  %xmm3,%xmm3
jmp    1563 <GCI_Phasor+0x403>
mov    %ecx,%edx
and    $0xfffffffe,%edx
xor    %eax,%eax
jmp    18ad <GCI_Phasor+0x74d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x2,%rax
cmp    %rax,%rdx
je     1773 <GCI_Phasor+0x613>
test   %r15,%r15
je     18c2 <GCI_Phasor+0x762>
movss  (%rsi,%rax,4),%xmm0
subss  (%rbx,%rax,4),%xmm0
movss  %xmm0,(%r15,%rax,4)
test   %r15,%r15
je     18a0 <GCI_Phasor+0x740>
movss  0x4(%rsi,%rax,4),%xmm0
subss  0x4(%rbx,%rax,4),%xmm0
movss  %xmm0,0x4(%r15,%rax,4)
jmp    18a0 <GCI_Phasor+0x740>

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

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