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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double _FADD_(double, double, double, double);
double _FDIV_(double, long, double, double);
double _FMUL_(long, double, double, double);
long _FSUB_(double, double, double, double);
void detrend(long nts, double missval1, double *array1, double *array2) {
  long n;
  long j;
  double zj;
  double sumj, sumjj;
  double sumx, sumjx;
  double work1, work2;
  double missval2 = missval1;
  sumx = sumjx = 0;
  sumj = sumjj = 0;
  n = 0;
  for (j = 0; j < nts; j++)
    if (!(((array1[j]) != (array1[j])) || ((missval1) != (missval1))
              ? (((array1[j]) != (array1[j])) && ((missval1) != (missval1)) ? 1
                                                                            : 0)
              : !(array1[j] < missval1 || missval1 < array1[j]))) {
      zj = j;
      sumx += array1[j];
      sumjx += zj * array1[j];
      sumj += zj;
      sumjj += zj * zj;
      n++;
    }
  work1 = _FDIV_(_FSUB_(sumjx,
                        _FDIV_(_FMUL_(sumx, sumj, missval1, missval2), n,
                               missval1, missval2),
                        missval1, missval2),
                 _FSUB_(sumjj,
                        _FDIV_(_FMUL_(sumj, sumj, missval1, missval2), n,
                               missval1, missval2),
                        missval1, missval2),
                 missval1, missval2);
  work2 = _FSUB_(
      _FDIV_(sumx, n, missval1, missval2),
      _FMUL_(work1, _FDIV_(sumj, n, missval1, missval2), missval1, missval2),
      missval1, missval2);
  for (j = 0; j < nts; j++)
    array2[j] = _FSUB_(
        array1[j],
        _FADD_(work2, _FMUL_(j, work1, missval1, missval2), missval1, missval2),
        missval1, missval2);
}


x86 assembly (clang, -O0):
<detrend>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    1314 <detrend+0x1d4>
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jne    11e5 <detrend+0xa5>
jp     11e5 <detrend+0xa5>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    11e5 <detrend+0xa5>
jp     11e5 <detrend+0xa5>
jmp    1249 <detrend+0x109>
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jne    1210 <detrend+0xd0>
jp     1210 <detrend+0xd0>
jmp    123a <detrend+0xfa>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    122b <detrend+0xeb>
jp     122b <detrend+0xeb>
jmp    123a <detrend+0xfa>
mov    $0x1,%al
test   $0x1,%al
jne    12fe <detrend+0x1be>
jmp    1281 <detrend+0x141>
xor    %eax,%eax
test   $0x1,%al
jne    12fe <detrend+0x1be>
jmp    1281 <detrend+0x141>
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
ja     1281 <detrend+0x141>
movsd  -0x10(%rbp),%xmm1
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    12fe <detrend+0x1be>
cvtsi2sdq -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1303 <detrend+0x1c3>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1196 <detrend+0x56>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
cvttsd2si -0x50(%rbp),%rdi
movsd  -0x40(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
call   1030 <_FMUL_@plt>
mov    -0x28(%rbp),%rdi
movsd  -0x10(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
call   1060 <_FDIV_@plt>
movaps %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
movsd  -0x10(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm3
call   1050 <_FSUB_@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
cvttsd2si -0x40(%rbp),%rdi
movsd  -0x40(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
call   1030 <_FMUL_@plt>
mov    -0x28(%rbp),%rdi
movsd  -0x10(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
call   1060 <_FDIV_@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x10(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm3
call   1050 <_FSUB_@plt>
movsd  -0x88(%rbp),%xmm0
ff
mov    %rax,%rdi
movsd  -0x10(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
call   1060 <_FDIV_@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x50(%rbp),%xmm0
mov    -0x28(%rbp),%rdi
movsd  -0x10(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
call   1060 <_FDIV_@plt>
movsd  %xmm0,-0x78(%rbp)
cvttsd2si -0x60(%rbp),%rax
mov    %rax,-0x80(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    -0x28(%rbp),%rdi
movsd  -0x10(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
call   1060 <_FDIV_@plt>
mov    -0x80(%rbp),%rdi
movsd  -0x10(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
call   1030 <_FMUL_@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm3
call   1050 <_FSUB_@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x68(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x8(%rbp),%rax
jge    1502 <detrend+0x3c2>
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x30(%rbp),%rdi
movsd  -0x60(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
call   1030 <_FMUL_@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0x10(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm3
call   1040 <_FADD_@plt>
movaps %xmm0,%xmm1
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x10(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm3
call   1050 <_FSUB_@plt>
cvtsi2sd %rax,%xmm0
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1463 <detrend+0x323>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<detrend>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x40,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
movapd %xmm0,%xmm3
mov    %rdi,%r13
xorpd  %xmm6,%xmm6
test   %rdi,%rdi
jle    11d3 <detrend+0x93>
xorpd  %xmm0,%xmm0
xor    %r12d,%r12d
xor    %eax,%eax
xorpd  %xmm5,%xmm5
jmp    11b1 <detrend+0x71>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
addsd  %xmm4,%xmm5
addsd  %xmm1,%xmm0
movapd %xmm1,%xmm2
unpcklpd %xmm1,%xmm2
unpcklpd %xmm4,%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm1,%xmm6
add    $0x1,%r12
add    $0x1,%rax
cmp    %rax,%r13
je     11de <detrend+0x9e>
movsd  (%r15,%rax,8),%xmm4
ucomisd %xmm4,%xmm3
jp     11c5 <detrend+0x85>
ucomisd %xmm3,%xmm4
jne    1180 <detrend+0x40>
jmp    11a8 <detrend+0x68>
ucomisd %xmm3,%xmm3
jnp    1180 <detrend+0x40>
ucomisd %xmm4,%xmm4
jp     11a8 <detrend+0x68>
jmp    1180 <detrend+0x40>
xorpd  %xmm5,%xmm5
xor    %r12d,%r12d
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
movapd %xmm6,0x20(%rsp)
movsd  %xmm5,0x38(%rsp)
cvttsd2si %xmm5,%rdi
movapd %xmm3,%xmm1
movapd %xmm3,%xmm2
movsd  %xmm3,0x8(%rsp)
call   1030 <_FMUL_@plt>
mov    %r12,%rdi
movsd  0x8(%rsp),%xmm1
movaps %xmm1,%xmm2
call   1060 <_FDIV_@plt>
movapd %xmm0,%xmm1
movaps 0x20(%rsp),%xmm0
movhlps %xmm0,%xmm0
movsd  0x8(%rsp),%xmm2
movaps %xmm2,%xmm3
call   1050 <_FSUB_@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x10(%rsp),%xmm0
cvttsd2si %xmm0,%rdi
movsd  0x8(%rsp),%xmm1
movaps %xmm1,%xmm2
call   1030 <_FMUL_@plt>
mov    %r12,%rdi
movsd  0x8(%rsp),%xmm1
movaps %xmm1,%xmm2
call   1060 <_FDIV_@plt>
movapd %xmm0,%xmm1
movaps 0x20(%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
movaps %xmm2,%xmm3
call   1050 <_FSUB_@plt>
movsd  0x18(%rsp),%xmm0
mov    %rax,%rdi
movsd  0x8(%rsp),%xmm1
movaps %xmm1,%xmm2
call   1060 <_FDIV_@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x38(%rsp),%xmm0
mov    %r12,%rdi
movsd  0x8(%rsp),%xmm1
movaps %xmm1,%xmm2
call   1060 <_FDIV_@plt>
movsd  %xmm0,0x20(%rsp)
cvttsd2si 0x18(%rsp),%rbx
movsd  0x10(%rsp),%xmm0
mov    %r12,%rdi
movsd  0x8(%rsp),%xmm1
movaps %xmm1,%xmm2
call   1060 <_FDIV_@plt>
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm1
movaps %xmm1,%xmm2
call   1030 <_FMUL_@plt>
movaps %xmm0,%xmm1
movsd  0x20(%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
movaps %xmm2,%xmm3
call   1050 <_FSUB_@plt>
test   %r13,%r13
jle    1388 <detrend+0x248>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,0x10(%rsp)
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movsd  (%r15,%rbx,8),%xmm0
movsd  %xmm0,0x20(%rsp)
mov    %rbx,%rdi
movsd  0x18(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movaps %xmm1,%xmm2
call   1030 <_FMUL_@plt>
movaps %xmm0,%xmm1
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
movaps %xmm2,%xmm3
call   1040 <_FADD_@plt>
movaps %xmm0,%xmm1
movsd  0x20(%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
movaps %xmm2,%xmm3
call   1050 <_FSUB_@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1320 <detrend+0x1e0>
add    $0x40,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @detrend(i64 %0, double %1, double* %2, double* %3) {
%5 = alloca i64
%6 = alloca double
%7 = alloca double*
%8 = alloca double*
%9 = alloca i64
%10 = alloca i64
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
store i64 %0, i64* %5
store double %1, double* %6
store double* %2, double** %7
store double* %3, double** %8
%19 = load double, double* %6
store double %19, double* %18
store double 0.000000e+00, double* %15
store double 0.000000e+00, double* %14
store double 0.000000e+00, double* %13
store double 0.000000e+00, double* %12
store i64 0, i64* %9
store i64 0, i64* %10
br label %20
20: ; preds = %94, %4
%21 = load i64, i64* %10
%22 = load i64, i64* %5
%23 = icmp slt i64 %21, %22
br i1 %23, label %24, label %97
24: ; preds = %20
%25 = load double*, double** %7
%26 = load i64, i64* %10
%27 = getelementptr inbounds double, double* %25, i64 %26
%28 = load double, double* %27
%29 = load double*, double** %7
%30 = load i64, i64* %10
%31 = getelementptr inbounds double, double* %29, i64 %30
%32 = load double, double* %31
%33 = fcmp une double %28, %32
br i1 %33, label %38, label %34
34: ; preds = %24
%35 = load double, double* %6
%36 = load double, double* %6
%37 = fcmp une double %35, %36
br i1 %37, label %38, label %54
38: ; preds = %34, %24
%39 = load double*, double** %7
%40 = load i64, i64* %10
%41 = getelementptr inbounds double, double* %39, i64 %40
%42 = load double, double* %41
%43 = load double*, double** %7
%44 = load i64, i64* %10
%45 = getelementptr inbounds double, double* %43, i64 %44
%46 = load double, double* %45
%47 = fcmp une double %42, %46
br i1 %47, label %48, label %53
48: ; preds = %38
%49 = load double, double* %6
%50 = load double, double* %6
%51 = fcmp une double %49, %50
br i1 %51, label %52, label %53
52: ; preds = %48
br i1 true, label %93, label %68
53: ; preds = %48, %38
br i1 false, label %93, label %68
54: ; preds = %34
%55 = load double*, double** %7
%56 = load i64, i64* %10
%57 = getelementptr inbounds double, double* %55, i64 %56
%58 = load double, double* %57
%59 = load double, double* %6
%60 = fcmp olt double %58, %59
br i1 %60, label %68, label %61
61: ; preds = %54
%62 = load double, double* %6
%63 = load double*, double** %7
%64 = load i64, i64* %10
%65 = getelementptr inbounds double, double* %63, i64 %64
%66 = load double, double* %65
%67 = fcmp olt double %62, %66
br i1 %67, label %68, label %93
68: ; preds = %61, %54, %53, %52
%69 = load i64, i64* %10
%70 = sitofp i64 %69 to double
store double %70, double* %11
%71 = load double*, double** %7
%72 = load i64, i64* %10
%73 = getelementptr inbounds double, double* %71, i64 %72
%74 = load double, double* %73
%75 = load double, double* %14
%76 = fadd double %75, %74
store double %76, double* %14
%77 = load double, double* %11
%78 = load double*, double** %7
%79 = load i64, i64* %10
%80 = getelementptr inbounds double, double* %78, i64 %79
%81 = load double, double* %80
%82 = load double, double* %15
%83 = call double @llvm.fmuladd.f64(double %77, double %81, double %82)
store double %83, double* %15
%84 = load double, double* %11
%85 = load double, double* %12
%86 = fadd double %85, %84
store double %86, double* %12
%87 = load double, double* %11
%88 = load double, double* %11
%89 = load double, double* %13
%90 = call double @llvm.fmuladd.f64(double %87, double %88, double %89)
store double %90, double* %13
%91 = load i64, i64* %9
%92 = add nsw i64 %91, 1
store i64 %92, i64* %9
br label %93
93: ; preds = %68, %61, %53, %52
br label %94
94: ; preds = %93
%95 = load i64, i64* %10
%96 = add nsw i64 %95, 1
store i64 %96, i64* %10
br label %20
97: ; preds = %20
%98 = load double, double* %15
%99 = load double, double* %14
%100 = fptosi double %99 to i64
%101 = load double, double* %12
%102 = load double, double* %6
%103 = load double, double* %18
%104 = call double @_FMUL_(i64 %100, double %101, double %102, double %103)
%105 = load i64, i64* %9
%106 = load double, double* %6
%107 = load double, double* %18
%108 = call double @_FDIV_(double %104, i64 %105, double %106, double %107)
%109 = load double, double* %6
%110 = load double, double* %18
%111 = call i64 @_FSUB_(double %98, double %108, double %109, double %110)
%112 = sitofp i64 %111 to double
%113 = load double, double* %13
%114 = load double, double* %12
%115 = fptosi double %114 to i64
%116 = load double, double* %12
%117 = load double, double* %6
%118 = load double, double* %18
%119 = call double @_FMUL_(i64 %115, double %116, double %117, double %118)
%120 = load i64, i64* %9
%121 = load double, double* %6
%122 = load double, double* %18
%123 = call double @_FDIV_(double %119, i64 %120, double %121, double %122)
%124 = load double, double* %6
%125 = load double, double* %18
%126 = call i64 @_FSUB_(double %113, double %123, double %124, double %125)
%127 = load double, double* %6
%128 = load double, double* %18
%129 = call double @_FDIV_(double %112, i64 %126, double %127, double %128)
store double %129, double* %16
%130 = load double, double* %14
%131 = load i64, i64* %9
%132 = load double, double* %6
%133 = load double, double* %18
%134 = call double @_FDIV_(double %130, i64 %131, double %132, double %133)
%135 = load double, double* %16
%136 = fptosi double %135 to i64
%137 = load double, double* %12
%138 = load i64, i64* %9
%139 = load double, double* %6
%140 = load double, double* %18
%141 = call double @_FDIV_(double %137, i64 %138, double %139, double %140)
%142 = load double, double* %6
%143 = load double, double* %18
%144 = call double @_FMUL_(i64 %136, double %141, double %142, double %143)
%145 = load double, double* %6
%146 = load double, double* %18
%147 = call i64 @_FSUB_(double %134, double %144, double %145, double %146)
%148 = sitofp i64 %147 to double
store double %148, double* %17
store i64 0, i64* %10
br label %149
149: ; preds = %174, %97
%150 = load i64, i64* %10
%151 = load i64, i64* %5
%152 = icmp slt i64 %150, %151
br i1 %152, label %153, label %177
153: ; preds = %149
%154 = load double*, double** %7
%155 = load i64, i64* %10
%156 = getelementptr inbounds double, double* %154, i64 %155
%157 = load double, double* %156
%158 = load double, double* %17
%159 = load i64, i64* %10
%160 = load double, double* %16
%161 = load double, double* %6
%162 = load double, double* %18
%163 = call double @_FMUL_(i64 %159, double %160, double %161, double %162)
%164 = load double, double* %6
%165 = load double, double* %18
%166 = call double @_FADD_(double %158, double %163, double %164, double %165)
%167 = load double, double* %6
%168 = load double, double* %18
%169 = call i64 @_FSUB_(double %157, double %166, double %167, double %168)
%170 = sitofp i64 %169 to double
%171 = load double*, double** %8
%172 = load i64, i64* %10
%173 = getelementptr inbounds double, double* %171, i64 %172
store double %170, double* %173
br label %174
174: ; preds = %153
%175 = load i64, i64* %10
%176 = add nsw i64 %175, 1
store i64 %176, i64* %10
br label %149
177: ; preds = %149
ret void
}

LLVM IR (-O2):
define void @detrend(i64 %0, double %1, double* nocapture %2, double* nocapture writeonly %3) {
%5 = icmp sgt i64 %0, 0
br i1 %5, label %6, label %38
6: ; preds = %4
%7 = fcmp uno double %1, 0.000000e+00
br label %8
8: ; preds = %6, %31
%9 = phi i64 [ 0, %6 ], [ %34, %31 ]
%10 = phi i64 [ 0, %6 ], [ %36, %31 ]
%11 = phi double [ 0.000000e+00, %6 ], [ %33, %31 ]
%12 = phi double [ 0.000000e+00, %6 ], [ %32, %31 ]
%13 = phi <2 x double> [ zeroinitializer, %6 ], [ %35, %31 ]
%14 = getelementptr inbounds double, double* %2, i64 %10
%15 = load double, double* %14
%16 = fcmp uno double %15, %1
br i1 %16, label %17, label %20
17: ; preds = %8
%18 = fcmp uno double %15, 0.000000e+00
%19 = and i1 %7, %18
br i1 %19, label %31, label %22
20: ; preds = %8
%21 = fcmp ueq double %15, %1
br i1 %21, label %31, label %22
22: ; preds = %17, %20
%23 = sitofp i64 %10 to double
%24 = fadd double %12, %15
%25 = fadd double %11, %23
%26 = insertelement <2 x double> poison, double %23, i64 0
%27 = shufflevector <2 x double> %26, <2 x double> poison, <2 x i32> zeroinitializer
%28 = insertelement <2 x double> %26, double %15, i64 1
%29 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %27, <2 x double> %28, <2 x double> %13)
%30 = add nsw i64 %9, 1
br label %31
31: ; preds = %20, %17, %22
%32 = phi double [ %24, %22 ], [ %12, %17 ], [ %12, %20 ]
%33 = phi double [ %25, %22 ], [ %11, %17 ], [ %11, %20 ]
%34 = phi i64 [ %30, %22 ], [ %9, %17 ], [ %9, %20 ]
%35 = phi <2 x double> [ %29, %22 ], [ %13, %17 ], [ %13, %20 ]
%36 = add nuw nsw i64 %10, 1
%37 = icmp eq i64 %36, %0
br i1 %37, label %38, label %8
38: ; preds = %31, %4
%39 = phi double [ 0.000000e+00, %4 ], [ %32, %31 ]
%40 = phi double [ 0.000000e+00, %4 ], [ %33, %31 ]
%41 = phi i64 [ 0, %4 ], [ %34, %31 ]
%42 = phi <2 x double> [ zeroinitializer, %4 ], [ %35, %31 ]
%43 = fptosi double %39 to i64
%44 = tail call double @_FMUL_(i64 %43, double %40, double %1, double %1)
%45 = tail call double @_FDIV_(double %44, i64 %41, double %1, double %1)
%46 = extractelement <2 x double> %42, i64 1
%47 = tail call i64 @_FSUB_(double %46, double %45, double %1, double %1)
%48 = sitofp i64 %47 to double
%49 = fptosi double %40 to i64
%50 = tail call double @_FMUL_(i64 %49, double %40, double %1, double %1)
%51 = tail call double @_FDIV_(double %50, i64 %41, double %1, double %1)
%52 = extractelement <2 x double> %42, i64 0
%53 = tail call i64 @_FSUB_(double %52, double %51, double %1, double %1)
%54 = tail call double @_FDIV_(double %48, i64 %53, double %1, double %1)
%55 = tail call double @_FDIV_(double %39, i64 %41, double %1, double %1)
%56 = fptosi double %54 to i64
%57 = tail call double @_FDIV_(double %40, i64 %41, double %1, double %1)
%58 = tail call double @_FMUL_(i64 %56, double %57, double %1, double %1)
%59 = tail call i64 @_FSUB_(double %55, double %58, double %1, double %1)
%60 = sitofp i64 %59 to double
br i1 %5, label %61, label %72
61: ; preds = %38, %61
%62 = phi i64 [ %70, %61 ], [ 0, %38 ]
%63 = getelementptr inbounds double, double* %2, i64 %62
%64 = load double, double* %63
%65 = tail call double @_FMUL_(i64 %62, double %54, double %1, double %1)
%66 = tail call double @_FADD_(double %60, double %65, double %1, double %1)
%67 = tail call i64 @_FSUB_(double %64, double %66, double %1, double %1)
%68 = sitofp i64 %67 to double
%69 = getelementptr inbounds double, double* %3, i64 %62
store double %68, double* %69
%70 = add nuw nsw i64 %62, 1
%71 = icmp eq i64 %70, %0
br i1 %71, label %72, label %61
72: ; preds = %61, %38
ret void
}