#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 const exp(double);
double const fabs(double);
int /*<<< orphan*/ free(double *);
double const log(double const);
double *malloc(int const);
int /*<<< orphan*/ memset(double *, int /*<<< orphan*/, int const);
void ln_evaluate_kde(const double *data, const double *weight, const int n,
                     double *result, const double *x, const int m,
                     const double bandwidth, const double threshold) {
  memset(result, 0, m * sizeof(double));
  double total_weight = 0;
  double *log_data = malloc(n * sizeof(double));
  for (int i = 0; i < n; i++) {
    log_data[i] = log(data[i]) / bandwidth;
    total_weight += weight[i];
  }
  double *log_x = malloc(m * sizeof(double));
  for (int j = 0; j < m; j++) {
    if (x[j] > 0) {
      log_x[j] = log(x[j]) / bandwidth;
    }
  }
  for (int i = 0; i < m; i++) {
    if (x[i] <= 0) {
      result[i] = 0;
      continue;
    }
    for (int j = 0; j < n; j++) {
      double residual = log_x[i] - log_data[j];
      if (fabs(residual) < threshold || threshold <= 0) {
        result[i] += weight[j] * exp(-0.5 * residual * residual) / x[i];
      }
    }
    result[i] /= bandwidth * total_weight * 2.506628275;
  }
  free(log_data);
  free(log_x);
}


x86 assembly (clang, -O0):
<ln_evaluate_kde>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
movsd  %xmm0,-0x38(%rbp)
movsd  %xmm1,-0x40(%rbp)
mov    -0x20(%rbp),%rdi
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1040 <memset@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1218 <ln_evaluate_kde+0xb8>
mov    -0x8(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1080 <log@plt>
divsd  -0x38(%rbp),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    11c3 <ln_evaluate_kde+0x63>
movslq -0x2c(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    128f <ln_evaluate_kde+0x12f>
mov    -0x28(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    127c <ln_evaluate_kde+0x11c>
mov    -0x28(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1080 <log@plt>
divsd  -0x38(%rbp),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1281 <ln_evaluate_kde+0x121>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1232 <ln_evaluate_kde+0xd2>
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    13ca <ln_evaluate_kde+0x26a>
mov    -0x28(%rbp),%rax
movslq -0x68(%rbp),%rcx
xorps  %xmm0,%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jb     12cd <ln_evaluate_kde+0x16d>
mov    -0x20(%rbp),%rax
movslq -0x68(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    13bc <ln_evaluate_kde+0x25c>
movl   $0x0,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1390 <ln_evaluate_kde+0x230>
mov    -0x60(%rbp),%rax
movslq -0x68(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x6c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
call   1050 <fabs@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
ucomisd %xmm1,%xmm0
ja     1329 <ln_evaluate_kde+0x1c9>
xorps  %xmm0,%xmm0
ucomisd -0x40(%rbp),%xmm0
jb     137d <ln_evaluate_kde+0x21d>
mov    -0x10(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xcc5(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
call   1070 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x68(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x68(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1382 <ln_evaluate_kde+0x222>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    12d4 <ln_evaluate_kde+0x174>
movsd  -0x38(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
movsd  0xc5e(%rip),%xmm0
mulsd  %xmm0,%xmm1
mov    -0x20(%rbp),%rax
movslq -0x68(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    1296 <ln_evaluate_kde+0x136>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ln_evaluate_kde>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
movsd  %xmm1,0x20(%rsp)
movsd  %xmm0,0x10(%rsp)
mov    %r8,%r14
mov    %rcx,%r13
mov    %edx,%ebp
mov    %rsi,0x30(%rsp)
mov    %rdi,%r12
mov    %r9,0x28(%rsp)
lea    0x0(,%r9,8),%edx
mov    %rcx,%rdi
xor    %esi,%esi
mov    %edx,0x8(%rsp)
call   1040 <memset@plt>
lea    0x0(,%rbp,8),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %ebp,%r15d
mov    %rbp,0x40(%rsp)
xorpd  %xmm0,%xmm0
test   %ebp,%ebp
jle    1205 <ln_evaluate_kde+0xb5>
movsd  %xmm0,(%rsp)
xor    %ebp,%ebp
mov    %r12,0x18(%rsp)
mov    0x30(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x18(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm0
call   1070 <log@plt>
divsd  0x10(%rsp),%xmm0
movsd  %xmm0,(%rbx,%rbp,8)
movsd  (%rsp),%xmm0
addsd  (%r12,%rbp,8),%xmm0
movsd  %xmm0,(%rsp)
add    $0x1,%rbp
cmp    %rbp,%r15
jne    11d0 <ln_evaluate_kde+0x80>
jmp    120a <ln_evaluate_kde+0xba>
movsd  %xmm0,(%rsp)
mov    0x8(%rsp),%edi
call   1050 <malloc@plt>
mov    %rax,0x8(%rsp)
mov    0x28(%rsp),%rax
test   %eax,%eax
movsd  0x20(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
jle    1391 <ln_evaluate_kde+0x241>
mov    %eax,%r12d
xor    %ebp,%ebp
xorpd  %xmm3,%xmm3
jmp    1249 <ln_evaluate_kde+0xf9>
nopl   0x0(%rax)
add    $0x1,%rbp
cmp    %rbp,%r12
je     127a <ln_evaluate_kde+0x12a>
movsd  (%r14,%rbp,8),%xmm0
ucomisd %xmm3,%xmm0
jbe    1240 <ln_evaluate_kde+0xf0>
call   1070 <log@plt>
xorpd  %xmm3,%xmm3
movsd  0x10(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
divsd  %xmm1,%xmm0
mov    0x8(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,8)
jmp    1240 <ln_evaluate_kde+0xf0>
cmpl   $0x0,0x28(%rsp)
movsd  (%rsp),%xmm0
jle    1391 <ln_evaluate_kde+0x241>
mulsd  %xmm1,%xmm0
mulsd  0xd6a(%rip),%xmm0
xor    %ebp,%ebp
xorpd  %xmm3,%xmm3
movsd  %xmm0,(%rsp)
mov    %r12,0x38(%rsp)
jmp    12c6 <ln_evaluate_kde+0x176>
nopl   0x0(%rax,%rax,1)
movq   $0x0,0x0(%r13,%rbp,8)
add    $0x1,%rbp
cmp    %r12,%rbp
je     1391 <ln_evaluate_kde+0x241>
ucomisd (%r14,%rbp,8),%xmm3
jae    12b0 <ln_evaluate_kde+0x160>
cmpl   $0x0,0x40(%rsp)
jle    1370 <ln_evaluate_kde+0x220>
mov    0x8(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm4
xor    %r12d,%r12d
movsd  %xmm4,0x18(%rsp)
jmp    1349 <ln_evaluate_kde+0x1f9>
xchg   %ax,%ax
mov    0x30(%rsp),%rax
movsd  (%rax,%r12,8),%xmm0
movsd  %xmm0,0x10(%rsp)
movapd %xmm1,%xmm0
mulsd  0xcfb(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1060 <exp@plt>
movsd  0x18(%rsp),%xmm4
xorpd  %xmm3,%xmm3
movsd  0x20(%rsp),%xmm2
mulsd  0x10(%rsp),%xmm0
divsd  (%r14,%rbp,8),%xmm0
addsd  0x0(%r13,%rbp,8),%xmm0
movsd  %xmm0,0x0(%r13,%rbp,8)
add    $0x1,%r12
cmp    %r12,%r15
je     1370 <ln_evaluate_kde+0x220>
ucomisd %xmm2,%xmm3
movapd %xmm4,%xmm1
subsd  (%rbx,%r12,8),%xmm1
jae    12f0 <ln_evaluate_kde+0x1a0>
movapd %xmm1,%xmm0
andpd  0xcab(%rip),%xmm0
ucomisd %xmm0,%xmm2
jbe    1340 <ln_evaluate_kde+0x1f0>
jmp    12f0 <ln_evaluate_kde+0x1a0>
nopl   (%rax)
movsd  0x0(%r13,%rbp,8),%xmm0
movsd  (%rsp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x0(%r13,%rbp,8)
mov    0x38(%rsp),%r12
jmp    12b9 <ln_evaluate_kde+0x169>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x8(%rsp),%rdi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @ln_evaluate_kde(double* nocapture %0, double* nocapture %1, i32 %2, double* %3, double* nocapture %4, i32 %5, double %6, double %7) {
%9 = shl i32 %5, 3
%10 = tail call i32 @memset(double* %3, i32 0, i32 %9)
%11 = shl i32 %2, 3
%12 = tail call double* @malloc(i32 %11)
%13 = icmp sgt i32 %2, 0
br i1 %13, label %14, label %16
14: ; preds = %8
%15 = zext i32 %2 to i64
br label %22
16: ; preds = %22, %8
%17 = phi double [ 0.000000e+00, %8 ], [ %32, %22 ]
%18 = tail call double* @malloc(i32 %9)
%19 = icmp sgt i32 %5, 0
br i1 %19, label %20, label %54
20: ; preds = %16
%21 = zext i32 %5 to i64
br label %42
22: ; preds = %14, %22
%23 = phi i64 [ 0, %14 ], [ %33, %22 ]
%24 = phi double [ 0.000000e+00, %14 ], [ %32, %22 ]
%25 = getelementptr inbounds double, double* %0, i64 %23
%26 = load double, double* %25
%27 = tail call double @log(double %26)
%28 = fdiv double %27, %6
%29 = getelementptr inbounds double, double* %12, i64 %23
store double %28, double* %29
%30 = getelementptr inbounds double, double* %1, i64 %23
%31 = load double, double* %30
%32 = fadd double %24, %31
%33 = add nuw nsw i64 %23, 1
%34 = icmp eq i64 %33, %15
br i1 %34, label %16, label %22
35: ; preds = %51
br i1 %19, label %36, label %54
36: ; preds = %35
%37 = fcmp ole double %7, 0.000000e+00
%38 = fmul double %17, %6
%39 = fmul double %38, 0x40040D932002D4C7
%40 = zext i32 %5 to i64
%41 = zext i32 %2 to i64
br label %57
42: ; preds = %20, %51
%43 = phi i64 [ 0, %20 ], [ %52, %51 ]
%44 = getelementptr inbounds double, double* %4, i64 %43
%45 = load double, double* %44
%46 = fcmp ogt double %45, 0.000000e+00
br i1 %46, label %47, label %51
47: ; preds = %42
%48 = tail call double @log(double %45)
%49 = fdiv double %48, %6
%50 = getelementptr inbounds double, double* %18, i64 %43
store double %49, double* %50
br label %51
51: ; preds = %42, %47
%52 = add nuw nsw i64 %43, 1
%53 = icmp eq i64 %52, %21
br i1 %53, label %35, label %42
54: ; preds = %95, %16, %35
%55 = tail call i32 @free(double* %12)
%56 = tail call i32 @free(double* %18)
ret void
57: ; preds = %36, %95
%58 = phi i64 [ 0, %36 ], [ %96, %95 ]
%59 = getelementptr inbounds double, double* %4, i64 %58
%60 = load double, double* %59
%61 = fcmp ugt double %60, 0.000000e+00
br i1 %61, label %62, label %67
62: ; preds = %57
br i1 %13, label %63, label %69
63: ; preds = %62
%64 = getelementptr inbounds double, double* %18, i64 %58
%65 = load double, double* %64
%66 = getelementptr inbounds double, double* %3, i64 %58
br label %73
67: ; preds = %57
%68 = getelementptr inbounds double, double* %3, i64 %58
store double 0.000000e+00, double* %68
br label %95
69: ; preds = %92, %62
%70 = getelementptr inbounds double, double* %3, i64 %58
%71 = load double, double* %70
%72 = fdiv double %71, %39
store double %72, double* %70
br label %95
73: ; preds = %63, %92
%74 = phi i64 [ 0, %63 ], [ %93, %92 ]
%75 = getelementptr inbounds double, double* %12, i64 %74
%76 = load double, double* %75
%77 = fsub double %65, %76
%78 = tail call double @llvm.fabs.f64(double %77)
%79 = fcmp olt double %78, %7
%80 = or i1 %37, %79
br i1 %80, label %81, label %92
81: ; preds = %73
%82 = getelementptr inbounds double, double* %1, i64 %74
%83 = load double, double* %82
%84 = fmul double %77, -5.000000e-01
%85 = fmul double %77, %84
%86 = tail call double @exp(double %85)
%87 = fmul double %83, %86
%88 = load double, double* %59
%89 = fdiv double %87, %88
%90 = load double, double* %66
%91 = fadd double %90, %89
store double %91, double* %66
br label %92
92: ; preds = %73, %81
%93 = add nuw nsw i64 %74, 1
%94 = icmp eq i64 %93, %41
br i1 %94, label %69, label %73
95: ; preds = %69, %67
%96 = add nuw nsw i64 %58, 1
%97 = icmp eq i64 %96, %40
br i1 %97, label %54, label %57
}