#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ calloc(int, int);
int /*<<< orphan*/ free(char *);
scalar_t__ isnan(double);
int /*<<< orphan*/ printf(char *);
double sqrt(double);
double testFreq2(double *vect1, double *vect2, int n, int reps,
                 double bootstopCutoff) {
  int i;
  double sum_xy = 0.0, sum_x = 0.0, sum_y = 0.0, corr = 0.0;
  double av1 = 0.0, av2 = 0.0;
  if (bootstopCutoff > 0.0) {
    const double scale = 1.0 / ((double)reps * 0.5);
    const double upper_bound = 0.5 + bootstopCutoff;
    const double lower_bound = 0.5 - bootstopCutoff;
    int count = 0, verify = 0;
    char *isSet = (char *)calloc(n, sizeof(char));
    assert(bootstopCutoff > 0.0 && bootstopCutoff <= 0.5);
    assert(lower_bound < upper_bound);
    assert(lower_bound >= 0.0 && upper_bound <= 1.0);
    for (i = 0; i < n; i++) {
      vect1[i] *= scale;
      vect2[i] *= scale;
    }
    for (i = 0; i < n; i++) {
      if ((vect1[i] >= lower_bound && vect1[i] <= upper_bound) ||
          (vect2[i] >= lower_bound && vect2[i] <= upper_bound)) {
        av1 += vect1[i];
        av2 += vect2[i];
        isSet[i] = 1;
        count++;
      }
    }
    if (count == 0) {
      return 0.0;
    }
    av1 /= ((double)count);
    av2 /= ((double)count);
    for (i = 0; i < n; i++) {
      if (isSet[i]) {
        sum_xy += ((vect1[i] - av1) * (vect2[i] - av2));
        sum_x += ((vect1[i] - av1) * (vect1[i] - av1));
        sum_y += ((vect2[i] - av2) * (vect2[i] - av2));
        verify++;
      }
    }
    free(isSet);
    assert(verify == count);
    corr = sum_xy / (sqrt(sum_x) * sqrt(sum_y));
    if (isnan(corr)) {
      printf("Numerical Error pearson correlation is not a number\n");
      assert(0);
    }
    return corr;
  } else {
    for (i = 0; i < n; i++) {
      av1 += vect1[i];
      av2 += vect2[i];
    }
    av1 /= ((double)n);
    av2 /= ((double)n);
    for (i = 0; i < n; i++) {
      sum_xy += ((vect1[i] - av1) * (vect2[i] - av2));
      sum_x += ((vect1[i] - av1) * (vect1[i] - av1));
      sum_y += ((vect2[i] - av2) * (vect2[i] - av2));
    }
    corr = sum_xy / (sqrt(sum_x) * sqrt(sum_y));
    if (isnan(corr)) {
      printf("Numerical Error pearson correlation is not a number\n");
      assert(0);
    }
    return corr;
  }
}


x86 assembly (clang, -O0):
<testFreq2>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    15a7 <testFreq2+0x447>
cvtsi2sdl -0x20(%rbp),%xmm1
movsd  0xe33(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe2f(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xe16(%rip),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xe04(%rip),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x0,-0x7c(%rbp)
movl   $0x0,-0x80(%rbp)
mov    -0x1c(%rbp),%edi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,-0x88(%rbp)
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x89(%rbp)
jbe    1258 <testFreq2+0xf8>
movsd  0xdb6(%rip),%xmm0
ucomisd -0x28(%rbp),%xmm0
setae  %al
mov    %al,-0x89(%rbp)
mov    -0x89(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movsd  -0x78(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movsd  -0x78(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x8a(%rbp)
jb     12b3 <testFreq2+0x153>
movsd  0xd63(%rip),%xmm0
ucomisd -0x70(%rbp),%xmm0
setae  %al
mov    %al,-0x8a(%rbp)
mov    -0x8a(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1312 <testFreq2+0x1b2>
movsd  -0x68(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x68(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12ca <testFreq2+0x16a>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    13e6 <testFreq2+0x286>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x78(%rbp),%xmm0
jb     1359 <testFreq2+0x1f9>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x70(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jae    138d <testFreq2+0x22d>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x78(%rbp),%xmm0
jb     13d3 <testFreq2+0x273>
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x70(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     13d3 <testFreq2+0x273>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x88(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movb   $0x1,(%rax,%rcx,1)
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    13d8 <testFreq2+0x278>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1319 <testFreq2+0x1b9>
cmpl   $0x0,-0x7c(%rbp)
jne    13fd <testFreq2+0x29d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1759 <testFreq2+0x5f9>
cvtsi2sdl -0x7c(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
cvtsi2sdl -0x7c(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1509 <testFreq2+0x3a9>
mov    -0x88(%rbp),%rax
movslq -0x2c(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     14f6 <testFreq2+0x396>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x58(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
subsd  -0x60(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x58(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
subsd  -0x58(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x60(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
subsd  -0x60(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    14fb <testFreq2+0x39b>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    142a <testFreq2+0x2ca>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    -0x80(%rbp),%eax
cmp    -0x7c(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
call   1080 <sqrt@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1080 <sqrt@plt>
movsd  -0xa0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
call   1070 <isnan@plt>
cmp    $0x0,%rax
je     1598 <testFreq2+0x438>
lea    0xa84(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <assert@plt>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1759 <testFreq2+0x5f9>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    15f6 <testFreq2+0x496>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    15ae <testFreq2+0x44e>
cvtsi2sdl -0x1c(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
cvtsi2sdl -0x1c(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    16df <testFreq2+0x57f>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x58(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
subsd  -0x60(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x58(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
subsd  -0x58(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x60(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
subsd  -0x60(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1623 <testFreq2+0x4c3>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
call   1080 <sqrt@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1080 <sqrt@plt>
movsd  -0xb0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
call   1070 <isnan@plt>
cmp    $0x0,%rax
je     174f <testFreq2+0x5ef>
lea    0x8cd(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1060 <assert@plt>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testFreq2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %edx,%r15d
mov    %rsi,%rbx
mov    %rdi,%r14
xorpd  %xmm5,%xmm5
ucomisd %xmm5,%xmm0
jbe    12fe <testFreq2+0x19e>
mov    %ecx,%r12d
movsd  0xe70(%rip),%xmm1
movapd %xmm0,%xmm2
movsd  %xmm0,0x10(%rsp)
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
movapd %xmm1,%xmm0
subsd  %xmm2,%xmm0
movsd  %xmm0,0x20(%rsp)
mov    %r15d,%edi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,%r13
xor    %edi,%edi
movsd  0xe35(%rip),%xmm0
ucomisd 0x10(%rsp),%xmm0
setae  %dil
call   1060 <assert@plt>
xor    %edi,%edi
movsd  (%rsp),%xmm0
ucomisd 0x20(%rsp),%xmm0
seta   %dil
call   1060 <assert@plt>
xorpd  %xmm1,%xmm1
xorpd  %xmm0,%xmm0
movapd %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
movsd  0xdf5(%rip),%xmm0
ucomisd (%rsp),%xmm0
setae  %cl
and    %al,%cl
movzbl %cl,%edi
call   1060 <assert@plt>
test   %r15d,%r15d
jle    1724 <testFreq2+0x5c4>
xorps  %xmm0,%xmm0
cvtsi2sd %r12d,%xmm0
mulsd  0xdc2(%rip),%xmm0
movsd  0xdc2(%rip),%xmm5
divsd  %xmm0,%xmm5
mov    %r15d,%eax
cmp    $0x4,%r15d
jb     126d <testFreq2+0x10d>
lea    (%rbx,%rax,8),%rcx
cmp    %r14,%rcx
jbe    1457 <testFreq2+0x2f7>
lea    (%r14,%rax,8),%rcx
cmp    %rbx,%rcx
jbe    1457 <testFreq2+0x2f7>
xor    %ecx,%ecx
movsd  (%rsp),%xmm3
movsd  0x20(%rsp),%xmm4
mov    %rcx,%rdx
not    %rdx
test   $0x1,%al
je     12a6 <testFreq2+0x146>
movsd  (%r14,%rcx,8),%xmm0
mulsd  %xmm5,%xmm0
movsd  %xmm0,(%r14,%rcx,8)
movsd  (%rbx,%rcx,8),%xmm0
mulsd  %xmm5,%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
or     $0x1,%rcx
add    %rax,%rdx
je     1571 <testFreq2+0x411>
nop
movsd  (%r14,%rcx,8),%xmm0
mulsd  %xmm5,%xmm0
movsd  %xmm0,(%r14,%rcx,8)
movsd  (%rbx,%rcx,8),%xmm0
mulsd  %xmm5,%xmm0
movsd  %xmm0,(%rbx,%rcx,8)
movsd  0x8(%r14,%rcx,8),%xmm0
mulsd  %xmm5,%xmm0
movsd  %xmm0,0x8(%r14,%rcx,8)
movsd  0x8(%rbx,%rcx,8),%xmm0
mulsd  %xmm5,%xmm0
movsd  %xmm0,0x8(%rbx,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%rax
jne    12b0 <testFreq2+0x150>
jmp    1571 <testFreq2+0x411>
test   %r15d,%r15d
jle    144e <testFreq2+0x2ee>
mov    %r15d,%eax
lea    -0x1(%rax),%rcx
mov    %eax,%edx
and    $0x3,%edx
cmp    $0x3,%rcx
jae    1321 <testFreq2+0x1c1>
xorpd  %xmm0,%xmm0
xor    %esi,%esi
jmp    137f <testFreq2+0x21f>
mov    %eax,%edi
and    $0xfffffffc,%edi
xorpd  %xmm1,%xmm1
xor    %esi,%esi
nopl   0x0(%rax)
movsd  (%rbx,%rsi,8),%xmm2
movsd  0x8(%rbx,%rsi,8),%xmm3
movsd  0x10(%rbx,%rsi,8),%xmm4
movsd  0x18(%rbx,%rsi,8),%xmm0
movhpd (%r14,%rsi,8),%xmm2
addpd  %xmm1,%xmm2
movhpd 0x8(%r14,%rsi,8),%xmm3
addpd  %xmm2,%xmm3
movhpd 0x10(%r14,%rsi,8),%xmm4
movhpd 0x18(%r14,%rsi,8),%xmm0
addpd  %xmm3,%xmm4
addpd  %xmm4,%xmm0
add    $0x4,%rsi
movapd %xmm0,%xmm1
cmp    %rsi,%rdi
jne    1330 <testFreq2+0x1d0>
test   %rdx,%rdx
je     13a7 <testFreq2+0x247>
lea    (%rbx,%rsi,8),%rdi
lea    (%r14,%rsi,8),%rsi
xor    %ebp,%ebp
xchg   %ax,%ax
movsd  (%rdi,%rbp,8),%xmm1
movhpd (%rsi,%rbp,8),%xmm1
addpd  %xmm1,%xmm0
add    $0x1,%rbp
cmp    %rbp,%rdx
jne    1390 <testFreq2+0x230>
test   %r15d,%r15d
jle    144e <testFreq2+0x2ee>
xorps  %xmm1,%xmm1
cvtsi2sd %r15d,%xmm1
unpcklpd %xmm1,%xmm1
divpd  %xmm1,%xmm0
test   %rcx,%rcx
je     165c <testFreq2+0x4fc>
mov    %eax,%edx
and    $0xfffffffe,%edx
xorpd  %xmm1,%xmm1
xorpd  %xmm5,%xmm5
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movsd  (%rbx,%rcx,8),%xmm2
movsd  0x8(%rbx,%rcx,8),%xmm4
movhpd (%r14,%rcx,8),%xmm2
subpd  %xmm0,%xmm2
movapd %xmm2,%xmm3
unpckhpd %xmm2,%xmm3
mulsd  %xmm2,%xmm3
addsd  %xmm5,%xmm3
mulpd  %xmm2,%xmm2
addpd  %xmm1,%xmm2
movhpd 0x8(%r14,%rcx,8),%xmm4
subpd  %xmm0,%xmm4
movapd %xmm4,%xmm5
unpckhpd %xmm4,%xmm5
mulsd  %xmm4,%xmm5
addsd  %xmm3,%xmm5
mulpd  %xmm4,%xmm4
movapd %xmm4,%xmm1
addpd  %xmm2,%xmm1
add    $0x2,%rcx
cmp    %rcx,%rdx
jne    13e0 <testFreq2+0x280>
addpd  %xmm2,%xmm4
test   $0x1,%al
jne    166a <testFreq2+0x50a>
jmp    1691 <testFreq2+0x531>
xorpd  %xmm4,%xmm4
jmp    1691 <testFreq2+0x531>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
movapd %xmm5,%xmm0
unpcklpd %xmm5,%xmm0
lea    -0x4(%rcx),%rdx
mov    %rdx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
test   %rdx,%rdx
movsd  (%rsp),%xmm3
movsd  0x20(%rsp),%xmm4
je     17b1 <testFreq2+0x651>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
movupd (%r14,%rdx,8),%xmm1
movupd 0x10(%r14,%rdx,8),%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,(%r14,%rdx,8)
movupd %xmm2,0x10(%r14,%rdx,8)
movupd (%rbx,%rdx,8),%xmm1
movupd 0x10(%rbx,%rdx,8),%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,(%rbx,%rdx,8)
movupd %xmm2,0x10(%rbx,%rdx,8)
movupd 0x20(%r14,%rdx,8),%xmm1
movupd 0x30(%r14,%rdx,8),%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,0x20(%r14,%rdx,8)
movupd %xmm2,0x30(%r14,%rdx,8)
movupd 0x20(%rbx,%rdx,8),%xmm1
movupd 0x30(%rbx,%rdx,8),%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,0x20(%rbx,%rdx,8)
movupd %xmm2,0x30(%rbx,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    1490 <testFreq2+0x330>
test   $0x1,%sil
je     1568 <testFreq2+0x408>
movupd (%r14,%rdx,8),%xmm1
movupd 0x10(%r14,%rdx,8),%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,(%r14,%rdx,8)
movupd %xmm2,0x10(%r14,%rdx,8)
movupd (%rbx,%rdx,8),%xmm1
movupd 0x10(%rbx,%rdx,8),%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,(%rbx,%rdx,8)
movupd %xmm2,0x10(%rbx,%rdx,8)
cmp    %rax,%rcx
jne    127a <testFreq2+0x11a>
test   %r15d,%r15d
jle    1724 <testFreq2+0x5c4>
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
xor    %ebp,%ebp
jmp    15aa <testFreq2+0x44a>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
unpcklpd %xmm1,%xmm2
addpd  %xmm2,%xmm0
movb   $0x1,0x0(%r13,%rcx,1)
add    $0x1,%ebp
add    $0x1,%rcx
cmp    %rcx,%rax
je     15cf <testFreq2+0x46f>
movsd  (%r14,%rcx,8),%xmm1
ucomisd %xmm4,%xmm1
movsd  (%rbx,%rcx,8),%xmm2
jb     15c1 <testFreq2+0x461>
ucomisd %xmm1,%xmm3
jae    1590 <testFreq2+0x430>
ucomisd %xmm4,%xmm2
jb     15a1 <testFreq2+0x441>
ucomisd %xmm2,%xmm3
jae    1590 <testFreq2+0x430>
jmp    15a1 <testFreq2+0x441>
test   %ebp,%ebp
je     1724 <testFreq2+0x5c4>
test   %r15d,%r15d
jle    1738 <testFreq2+0x5d8>
xorps  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
unpcklpd %xmm1,%xmm1
divpd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
movapd %xmm1,(%rsp)
xorpd  %xmm3,%xmm3
xor    %ecx,%ecx
xor    %r15d,%r15d
jmp    161d <testFreq2+0x4bd>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rcx
cmp    %rcx,%rax
je     1748 <testFreq2+0x5e8>
cmpb   $0x0,0x0(%r13,%rcx,1)
je     1610 <testFreq2+0x4b0>
movsd  (%rbx,%rcx,8),%xmm1
movhpd (%r14,%rcx,8),%xmm1
subpd  %xmm0,%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm2,%xmm3
mulpd  %xmm1,%xmm1
movapd (%rsp),%xmm2
addpd  %xmm1,%xmm2
movapd %xmm2,(%rsp)
add    $0x1,%r15d
jmp    1610 <testFreq2+0x4b0>
xorpd  %xmm1,%xmm1
xorpd  %xmm5,%xmm5
xor    %ecx,%ecx
test   $0x1,%al
je     1691 <testFreq2+0x531>
movsd  (%rbx,%rcx,8),%xmm4
movhpd (%r14,%rcx,8),%xmm4
subpd  %xmm0,%xmm4
movapd %xmm4,%xmm0
unpckhpd %xmm4,%xmm0
mulsd  %xmm4,%xmm0
addsd  %xmm0,%xmm5
mulpd  %xmm4,%xmm4
addpd  %xmm1,%xmm4
movapd %xmm4,%xmm0
unpckhpd %xmm4,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
movapd %xmm5,0x10(%rsp)
jb     16cb <testFreq2+0x56b>
xorps  %xmm2,%xmm2
sqrtsd %xmm0,%xmm2
ucomisd %xmm1,%xmm4
jae    16e8 <testFreq2+0x588>
movapd %xmm4,%xmm0
movsd  %xmm2,(%rsp)
call   1080 <sqrt@plt>
movsd  (%rsp),%xmm2
jmp    16ef <testFreq2+0x58f>
movapd %xmm4,(%rsp)
call   1080 <sqrt@plt>
xorpd  %xmm1,%xmm1
movapd (%rsp),%xmm4
movapd %xmm0,%xmm2
ucomisd %xmm1,%xmm4
jb     16b6 <testFreq2+0x556>
xorps  %xmm0,%xmm0
sqrtsd %xmm4,%xmm0
movapd 0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm2
divsd  %xmm2,%xmm1
movapd %xmm1,0x10(%rsp)
movapd %xmm1,%xmm0
call   1070 <isnan@plt>
test   %rax,%rax
je     1724 <testFreq2+0x5c4>
lea    0x900(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1060 <assert@plt>
movaps 0x10(%rsp),%xmm0
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %r15d,%r15d
xorpd  %xmm0,%xmm0
movapd %xmm0,(%rsp)
xorpd  %xmm3,%xmm3
movapd %xmm3,0x10(%rsp)
mov    %r13,%rdi
call   1030 <free@plt>
xor    %edi,%edi
cmp    %ebp,%r15d
sete   %dil
call   1060 <assert@plt>
movapd (%rsp),%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
ucomisd 0x897(%rip),%xmm0
jb     1784 <testFreq2+0x624>
xorps  %xmm2,%xmm2
sqrtsd %xmm0,%xmm2
jmp    1792 <testFreq2+0x632>
call   1080 <sqrt@plt>
movapd (%rsp),%xmm1
movapd %xmm0,%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jb     17a8 <testFreq2+0x648>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    16ef <testFreq2+0x58f>
movapd %xmm1,%xmm0
jmp    16ba <testFreq2+0x55a>
xor    %edx,%edx
test   $0x1,%sil
jne    1528 <testFreq2+0x3c8>
jmp    1568 <testFreq2+0x408>

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

LLVM IR (-O2):
@str.1 = [52 x i8] c"Numerical Error pearson correlation is not a number\00"
define double @testFreq2(double* nocapture %0, double* nocapture %1, i32 %2, i32 %3, double %4) {
%6 = fcmp ogt double %4, 0.000000e+00
br i1 %6, label %16, label %7
7: ; preds = %5
%8 = icmp sgt i32 %2, 0
br i1 %8, label %9, label %366
9: ; preds = %7
%10 = zext i32 %2 to i64
%11 = add nsw i64 %10, -1
%12 = and i64 %10, 3
%13 = icmp ult i64 %11, 3
br i1 %13, label %284, label %14
14: ; preds = %9
%15 = and i64 %10, 4294967292
br label %246
16: ; preds = %5
%17 = sitofp i32 %3 to double
%18 = fmul double %17, 5.000000e-01
%19 = fdiv double 1.000000e+00, %18
%20 = fadd double %4, 5.000000e-01
%21 = fsub double 5.000000e-01, %4
%22 = tail call i64 @calloc(i32 %2, i32 1)
%23 = inttoptr i64 %22 to i8*
%24 = fcmp ole double %4, 5.000000e-01
%25 = zext i1 %24 to i32
%26 = tail call i32 @assert(i32 %25)
%27 = fcmp olt double %21, %20
%28 = zext i1 %27 to i32
%29 = tail call i32 @assert(i32 %28)
%30 = fcmp oge double %21, 0.000000e+00
%31 = fcmp ole double %20, 1.000000e+00
%32 = and i1 %30, %31
%33 = zext i1 %32 to i32
%34 = tail call i32 @assert(i32 %33)
%35 = icmp sgt i32 %2, 0
br i1 %35, label %36, label %382
36: ; preds = %16
%37 = zext i32 %2 to i64
%38 = icmp ult i32 %2, 4
br i1 %38, label %131, label %39
39: ; preds = %36
%40 = getelementptr double, double* %0, i64 %37
%41 = getelementptr double, double* %1, i64 %37
%42 = icmp ugt double* %41, %0
%43 = icmp ugt double* %40, %1
%44 = and i1 %42, %43
br i1 %44, label %131, label %45
45: ; preds = %39
%46 = and i64 %37, 4294967292
%47 = insertelement <2 x double> poison, double %19, i64 0
%48 = shufflevector <2 x double> %47, <2 x double> poison, <2 x i32> zeroinitializer
%49 = insertelement <2 x double> poison, double %19, i64 0
%50 = shufflevector <2 x double> %49, <2 x double> poison, <2 x i32> zeroinitializer
%51 = add nsw i64 %46, -4
%52 = lshr exact i64 %51, 2
%53 = add nuw nsw i64 %52, 1
%54 = and i64 %53, 1
%55 = icmp eq i64 %51, 0
br i1 %55, label %105, label %56
56: ; preds = %45
%57 = and i64 %53, 9223372036854775806
br label %58
58: ; preds = %58, %56
%59 = phi i64 [ 0, %56 ], [ %102, %58 ]
%60 = phi i64 [ 0, %56 ], [ %103, %58 ]
%61 = getelementptr inbounds double, double* %0, i64 %59
%62 = bitcast double* %61 to <2 x double>*
%63 = load <2 x double>, <2 x double>* %62
%64 = getelementptr inbounds double, double* %61, i64 2
%65 = bitcast double* %64 to <2 x double>*
%66 = load <2 x double>, <2 x double>* %65
%67 = fmul <2 x double> %48, %63
%68 = fmul <2 x double> %50, %66
%69 = bitcast double* %61 to <2 x double>*
store <2 x double> %67, <2 x double>* %69
%70 = bitcast double* %64 to <2 x double>*
store <2 x double> %68, <2 x double>* %70
%71 = getelementptr inbounds double, double* %1, i64 %59
%72 = bitcast double* %71 to <2 x double>*
%73 = load <2 x double>, <2 x double>* %72
%74 = getelementptr inbounds double, double* %71, i64 2
%75 = bitcast double* %74 to <2 x double>*
%76 = load <2 x double>, <2 x double>* %75
%77 = fmul <2 x double> %48, %73
%78 = fmul <2 x double> %50, %76
%79 = bitcast double* %71 to <2 x double>*
store <2 x double> %77, <2 x double>* %79
%80 = bitcast double* %74 to <2 x double>*
store <2 x double> %78, <2 x double>* %80
%81 = or i64 %59, 4
%82 = getelementptr inbounds double, double* %0, i64 %81
%83 = bitcast double* %82 to <2 x double>*
%84 = load <2 x double>, <2 x double>* %83
%85 = getelementptr inbounds double, double* %82, i64 2
%86 = bitcast double* %85 to <2 x double>*
%87 = load <2 x double>, <2 x double>* %86
%88 = fmul <2 x double> %48, %84
%89 = fmul <2 x double> %50, %87
%90 = bitcast double* %82 to <2 x double>*
store <2 x double> %88, <2 x double>* %90
%91 = bitcast double* %85 to <2 x double>*
store <2 x double> %89, <2 x double>* %91
%92 = getelementptr inbounds double, double* %1, i64 %81
%93 = bitcast double* %92 to <2 x double>*
%94 = load <2 x double>, <2 x double>* %93
%95 = getelementptr inbounds double, double* %92, i64 2
%96 = bitcast double* %95 to <2 x double>*
%97 = load <2 x double>, <2 x double>* %96
%98 = fmul <2 x double> %48, %94
%99 = fmul <2 x double> %50, %97
%100 = bitcast double* %92 to <2 x double>*
store <2 x double> %98, <2 x double>* %100
%101 = bitcast double* %95 to <2 x double>*
store <2 x double> %99, <2 x double>* %101
%102 = add nuw i64 %59, 8
%103 = add i64 %60, 2
%104 = icmp eq i64 %103, %57
br i1 %104, label %105, label %58
105: ; preds = %58, %45
%106 = phi i64 [ 0, %45 ], [ %102, %58 ]
%107 = icmp eq i64 %54, 0
br i1 %107, label %129, label %108
108: ; preds = %105
%109 = getelementptr inbounds double, double* %0, i64 %106
%110 = bitcast double* %109 to <2 x double>*
%111 = load <2 x double>, <2 x double>* %110
%112 = getelementptr inbounds double, double* %109, i64 2
%113 = bitcast double* %112 to <2 x double>*
%114 = load <2 x double>, <2 x double>* %113
%115 = fmul <2 x double> %48, %111
%116 = fmul <2 x double> %50, %114
%117 = bitcast double* %109 to <2 x double>*
store <2 x double> %115, <2 x double>* %117
%118 = bitcast double* %112 to <2 x double>*
store <2 x double> %116, <2 x double>* %118
%119 = getelementptr inbounds double, double* %1, i64 %106
%120 = bitcast double* %119 to <2 x double>*
%121 = load <2 x double>, <2 x double>* %120
%122 = getelementptr inbounds double, double* %119, i64 2
%123 = bitcast double* %122 to <2 x double>*
%124 = load <2 x double>, <2 x double>* %123
%125 = fmul <2 x double> %48, %121
%126 = fmul <2 x double> %50, %124
%127 = bitcast double* %119 to <2 x double>*
store <2 x double> %125, <2 x double>* %127
%128 = bitcast double* %122 to <2 x double>*
store <2 x double> %126, <2 x double>* %128
br label %129
129: ; preds = %105, %108
%130 = icmp eq i64 %46, %37
br i1 %130, label %148, label %131
131: ; preds = %39, %36, %129
%132 = phi i64 [ 0, %39 ], [ 0, %36 ], [ %46, %129 ]
%133 = xor i64 %132, -1
%134 = and i64 %37, 1
%135 = icmp eq i64 %134, 0
br i1 %135, label %144, label %136
136: ; preds = %131
%137 = getelementptr inbounds double, double* %0, i64 %132
%138 = load double, double* %137
%139 = fmul double %19, %138
store double %139, double* %137
%140 = getelementptr inbounds double, double* %1, i64 %132
%141 = load double, double* %140
%142 = fmul double %19, %141
store double %142, double* %140
%143 = or i64 %132, 1
br label %144
144: ; preds = %136, %131
%145 = phi i64 [ %132, %131 ], [ %143, %136 ]
%146 = sub nsw i64 0, %37
%147 = icmp eq i64 %133, %146
br i1 %147, label %148, label %151
148: ; preds = %144, %151, %129
br i1 %35, label %149, label %382
149: ; preds = %148
%150 = zext i32 %2 to i64
br label %168
151: ; preds = %144, %151
%152 = phi i64 [ %166, %151 ], [ %145, %144 ]
%153 = getelementptr inbounds double, double* %0, i64 %152
%154 = load double, double* %153
%155 = fmul double %19, %154
store double %155, double* %153
%156 = getelementptr inbounds double, double* %1, i64 %152
%157 = load double, double* %156
%158 = fmul double %19, %157
store double %158, double* %156
%159 = add nuw nsw i64 %152, 1
%160 = getelementptr inbounds double, double* %0, i64 %159
%161 = load double, double* %160
%162 = fmul double %19, %161
store double %162, double* %160
%163 = getelementptr inbounds double, double* %1, i64 %159
%164 = load double, double* %163
%165 = fmul double %19, %164
store double %165, double* %163
%166 = add nuw nsw i64 %152, 2
%167 = icmp eq i64 %166, %37
br i1 %167, label %148, label %151
168: ; preds = %149, %189
%169 = phi i64 [ 0, %149 ], [ %192, %189 ]
%170 = phi i32 [ 0, %149 ], [ %190, %189 ]
%171 = phi <2 x double> [ zeroinitializer, %149 ], [ %191, %189 ]
%172 = getelementptr inbounds double, double* %0, i64 %169
%173 = load double, double* %172
%174 = fcmp ult double %173, %21
%175 = fcmp ugt double %173, %20
%176 = or i1 %174, %175
%177 = getelementptr inbounds double, double* %1, i64 %169
%178 = load double, double* %177
br i1 %176, label %179, label %183
179: ; preds = %168
%180 = fcmp ult double %178, %21
%181 = fcmp ugt double %178, %20
%182 = or i1 %180, %181
br i1 %182, label %189, label %183
183: ; preds = %168, %179
%184 = insertelement <2 x double> poison, double %178, i64 0
%185 = insertelement <2 x double> %184, double %173, i64 1
%186 = fadd <2 x double> %171, %185
%187 = getelementptr inbounds i8, i8* %23, i64 %169
store i8 1, i8* %187
%188 = add nsw i32 %170, 1
br label %189
189: ; preds = %179, %183
%190 = phi i32 [ %188, %183 ], [ %170, %179 ]
%191 = phi <2 x double> [ %186, %183 ], [ %171, %179 ]
%192 = add nuw nsw i64 %169, 1
%193 = icmp eq i64 %192, %150
br i1 %193, label %194, label %168
194: ; preds = %189
%195 = icmp eq i32 %190, 0
br i1 %195, label %382, label %196
196: ; preds = %194
%197 = sitofp i32 %190 to double
%198 = insertelement <2 x double> poison, double %197, i64 0
%199 = shufflevector <2 x double> %198, <2 x double> poison, <2 x i32> zeroinitializer
%200 = fdiv <2 x double> %191, %199
br i1 %35, label %201, label %230
201: ; preds = %196
%202 = zext i32 %2 to i64
br label %203
203: ; preds = %201, %224
%204 = phi i64 [ 0, %201 ], [ %228, %224 ]
%205 = phi i32 [ 0, %201 ], [ %226, %224 ]
%206 = phi double [ 0.000000e+00, %201 ], [ %225, %224 ]
%207 = phi <2 x double> [ zeroinitializer, %201 ], [ %227, %224 ]
%208 = getelementptr inbounds i8, i8* %23, i64 %204
%209 = load i8, i8* %208
%210 = icmp eq i8 %209, 0
br i1 %210, label %224, label %211
211: ; preds = %203
%212 = getelementptr inbounds double, double* %0, i64 %204
%213 = load double, double* %212
%214 = getelementptr inbounds double, double* %1, i64 %204
%215 = load double, double* %214
%216 = insertelement <2 x double> poison, double %215, i64 0
%217 = insertelement <2 x double> %216, double %213, i64 1
%218 = fsub <2 x double> %217, %200
%219 = extractelement <2 x double> %218, i64 0
%220 = extractelement <2 x double> %218, i64 1
%221 = tail call double @llvm.fmuladd.f64(double %220, double %219, double %206)
%222 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %218, <2 x double> %218, <2 x double> %207)
%223 = add nsw i32 %205, 1
br label %224
224: ; preds = %203, %211
%225 = phi double [ %221, %211 ], [ %206, %203 ]
%226 = phi i32 [ %223, %211 ], [ %205, %203 ]
%227 = phi <2 x double> [ %222, %211 ], [ %207, %203 ]
%228 = add nuw nsw i64 %204, 1
%229 = icmp eq i64 %228, %202
br i1 %229, label %230, label %203
230: ; preds = %224, %196
%231 = phi double [ 0.000000e+00, %196 ], [ %225, %224 ]
%232 = phi i32 [ 0, %196 ], [ %226, %224 ]
%233 = phi <2 x double> [ zeroinitializer, %196 ], [ %227, %224 ]
%234 = tail call i32 @free(i8* %23)
%235 = icmp eq i32 %232, %190
%236 = zext i1 %235 to i32
%237 = tail call i32 @assert(i32 %236)
%238 = extractelement <2 x double> %233, i64 1
%239 = tail call double @sqrt(double %238)
%240 = extractelement <2 x double> %233, i64 0
%241 = tail call double @sqrt(double %240)
%242 = fmul double %239, %241
%243 = fdiv double %231, %242
%244 = tail call i64 @isnan(double %243)
%245 = icmp eq i64 %244, 0
br i1 %245, label %382, label %377
246: ; preds = %246, %14
%247 = phi i64 [ 0, %14 ], [ %281, %246 ]
%248 = phi <2 x double> [ zeroinitializer, %14 ], [ %280, %246 ]
%249 = phi i64 [ 0, %14 ], [ %282, %246 ]
%250 = getelementptr inbounds double, double* %0, i64 %247
%251 = load double, double* %250
%252 = getelementptr inbounds double, double* %1, i64 %247
%253 = load double, double* %252
%254 = insertelement <2 x double> poison, double %253, i64 0
%255 = insertelement <2 x double> %254, double %251, i64 1
%256 = fadd <2 x double> %248, %255
%257 = or i64 %247, 1
%258 = getelementptr inbounds double, double* %0, i64 %257
%259 = load double, double* %258
%260 = getelementptr inbounds double, double* %1, i64 %257
%261 = load double, double* %260
%262 = insertelement <2 x double> poison, double %261, i64 0
%263 = insertelement <2 x double> %262, double %259, i64 1
%264 = fadd <2 x double> %256, %263
%265 = or i64 %247, 2
%266 = getelementptr inbounds double, double* %0, i64 %265
%267 = load double, double* %266
%268 = getelementptr inbounds double, double* %1, i64 %265
%269 = load double, double* %268
%270 = insertelement <2 x double> poison, double %269, i64 0
%271 = insertelement <2 x double> %270, double %267, i64 1
%272 = fadd <2 x double> %264, %271
%273 = or i64 %247, 3
%274 = getelementptr inbounds double, double* %0, i64 %273
%275 = load double, double* %274
%276 = getelementptr inbounds double, double* %1, i64 %273
%277 = load double, double* %276
%278 = insertelement <2 x double> poison, double %277, i64 0
%279 = insertelement <2 x double> %278, double %275, i64 1
%280 = fadd <2 x double> %272, %279
%281 = add nuw nsw i64 %247, 4
%282 = add i64 %249, 4
%283 = icmp eq i64 %282, %15
br i1 %283, label %284, label %246
284: ; preds = %246, %9
%285 = phi <2 x double> [ undef, %9 ], [ %280, %246 ]
%286 = phi i64 [ 0, %9 ], [ %281, %246 ]
%287 = phi <2 x double> [ zeroinitializer, %9 ], [ %280, %246 ]
%288 = icmp eq i64 %12, 0
br i1 %288, label %303, label %289
289: ; preds = %284, %289
%290 = phi i64 [ %300, %289 ], [ %286, %284 ]
%291 = phi <2 x double> [ %299, %289 ], [ %287, %284 ]
%292 = phi i64 [ %301, %289 ], [ 0, %284 ]
%293 = getelementptr inbounds double, double* %0, i64 %290
%294 = load double, double* %293
%295 = getelementptr inbounds double, double* %1, i64 %290
%296 = load double, double* %295
%297 = insertelement <2 x double> poison, double %296, i64 0
%298 = insertelement <2 x double> %297, double %294, i64 1
%299 = fadd <2 x double> %291, %298
%300 = add nuw nsw i64 %290, 1
%301 = add i64 %292, 1
%302 = icmp eq i64 %301, %12
br i1 %302, label %303, label %289
303: ; preds = %289, %284
%304 = phi <2 x double> [ %285, %284 ], [ %299, %289 ]
%305 = sitofp i32 %2 to double
%306 = insertelement <2 x double> poison, double %305, i64 0
%307 = shufflevector <2 x double> %306, <2 x double> poison, <2 x i32> zeroinitializer
%308 = fdiv <2 x double> %304, %307
br i1 %8, label %309, label %366
309: ; preds = %303
%310 = and i64 %10, 1
%311 = icmp eq i64 %11, 0
br i1 %311, label %347, label %312
312: ; preds = %309
%313 = and i64 %10, 4294967294
br label %314
314: ; preds = %314, %312
%315 = phi i64 [ 0, %312 ], [ %342, %314 ]
%316 = phi double [ 0.000000e+00, %312 ], [ %340, %314 ]
%317 = phi <2 x double> [ zeroinitializer, %312 ], [ %341, %314 ]
%318 = phi i64 [ 0, %312 ], [ %343, %314 ]
%319 = getelementptr inbounds double, double* %0, i64 %315
%320 = load double, double* %319
%321 = getelementptr inbounds double, double* %1, i64 %315
%322 = load double, double* %321
%323 = insertelement <2 x double> poison, double %322, i64 0
%324 = insertelement <2 x double> %323, double %320, i64 1
%325 = fsub <2 x double> %324, %308
%326 = extractelement <2 x double> %325, i64 0
%327 = extractelement <2 x double> %325, i64 1
%328 = tail call double @llvm.fmuladd.f64(double %327, double %326, double %316)
%329 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %325, <2 x double> %325, <2 x double> %317)
%330 = or i64 %315, 1
%331 = getelementptr inbounds double, double* %0, i64 %330
%332 = load double, double* %331
%333 = getelementptr inbounds double, double* %1, i64 %330
%334 = load double, double* %333
%335 = insertelement <2 x double> poison, double %334, i64 0
%336 = insertelement <2 x double> %335, double %332, i64 1
%337 = fsub <2 x double> %336, %308
%338 = extractelement <2 x double> %337, i64 0
%339 = extractelement <2 x double> %337, i64 1
%340 = tail call double @llvm.fmuladd.f64(double %339, double %338, double %328)
%341 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %337, <2 x double> %337, <2 x double> %329)
%342 = add nuw nsw i64 %315, 2
%343 = add i64 %318, 2
%344 = icmp eq i64 %343, %313
br i1 %344, label %345, label %314
345: ; preds = %314
%346 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %337, <2 x double> %337, <2 x double> %329)
br label %347
347: ; preds = %345, %309
%348 = phi double [ undef, %309 ], [ %340, %345 ]
%349 = phi <2 x double> [ undef, %309 ], [ %346, %345 ]
%350 = phi i64 [ 0, %309 ], [ %342, %345 ]
%351 = phi double [ 0.000000e+00, %309 ], [ %340, %345 ]
%352 = phi <2 x double> [ zeroinitializer, %309 ], [ %341, %345 ]
%353 = icmp eq i64 %310, 0
br i1 %353, label %366, label %354
354: ; preds = %347
%355 = getelementptr inbounds double, double* %0, i64 %350
%356 = load double, double* %355
%357 = getelementptr inbounds double, double* %1, i64 %350
%358 = load double, double* %357
%359 = insertelement <2 x double> poison, double %358, i64 0
%360 = insertelement <2 x double> %359, double %356, i64 1
%361 = fsub <2 x double> %360, %308
%362 = extractelement <2 x double> %361, i64 0
%363 = extractelement <2 x double> %361, i64 1
%364 = tail call double @llvm.fmuladd.f64(double %363, double %362, double %351)
%365 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %361, <2 x double> %361, <2 x double> %352)
br label %366
366: ; preds = %354, %347, %7, %303
%367 = phi double [ 0.000000e+00, %303 ], [ 0.000000e+00, %7 ], [ %348, %347 ], [ %364, %354 ]
%368 = phi <2 x double> [ zeroinitializer, %303 ], [ zeroinitializer, %7 ], [ %349, %347 ], [ %365, %354 ]
%369 = extractelement <2 x double> %368, i64 1
%370 = tail call double @sqrt(double %369)
%371 = extractelement <2 x double> %368, i64 0
%372 = tail call double @sqrt(double %371)
%373 = fmul double %370, %372
%374 = fdiv double %367, %373
%375 = tail call i64 @isnan(double %374)
%376 = icmp eq i64 %375, 0
br i1 %376, label %382, label %377
377: ; preds = %366, %230
%378 = phi i8* [ getelementptr inbounds ([52 x i8], [52 x i8]* @str.1, i64 0, i64 0), %230 ], [ getelementptr inbounds ([52 x i8], [52 x i8]* @str.1, i64 0, i64 0), %366 ]
%379 = phi double [ %243, %230 ], [ %374, %366 ]
%380 = tail call i32 @puts(i8* dereferenceable(1) %378)
%381 = tail call i32 @assert(i32 0)
br label %382
382: ; preds = %377, %16, %148, %366, %194, %230
%383 = phi double [ 0.000000e+00, %194 ], [ %243, %230 ], [ %374, %366 ], [ 0.000000e+00, %148 ], [ 0.000000e+00, %16 ], [ %379, %377 ]
ret double %383
}