#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*/ free(double *);
double kernel_value_by_name(double *, double *, int, void *);
scalar_t__ malloc(int);
int max_int(int, int);
void ekcpd_pelt_compute(double *signal, int n_samples, int n_dims, double beta,
                        int min_size, void *kernelDescObj, int *M_path) {
  int t, s;
  int s_min = 0;
  double *D, *S, *M_V, *M_pruning;
  double c_cost, c_cost_sum, c_r, diag_element;
  D = (double *)malloc((n_samples + 1) * sizeof(double));
  S = (double *)malloc((n_samples + 1) * sizeof(double));
  M_V = (double *)malloc((n_samples + 1) * sizeof(double));
  M_pruning = (double *)malloc((n_samples + 1) * sizeof(double));
  for (t = 0; t < (n_samples + 1); t++) {
    D[t] = 0.0;
    S[t] = 0.0;
    M_V[t] = 0.0;
    M_path[t] = 0;
    M_pruning[t] = 0.0;
  }
  for (t = 1; t < 2 * min_size; t++) {
    diag_element = kernel_value_by_name(&(signal[(t - 1) * n_dims]),
                                        &(signal[(t - 1) * n_dims]), n_dims,
                                        kernelDescObj);
    D[t] = D[t - 1] + diag_element;
    c_r = 0.0;
    for (s = t - 1; s >= 0; s--) {
      c_r += kernel_value_by_name(&(signal[s * n_dims]),
                                  &(signal[(t - 1) * n_dims]), n_dims,
                                  kernelDescObj);
      S[s] += 2 * c_r - diag_element;
    }
    c_cost = D[t] - D[s] - S[0] / t;
    M_V[t] = c_cost + beta;
  }
  for (t = 2 * min_size; t < (n_samples + 1); t++) {
    diag_element = kernel_value_by_name(&(signal[(t - 1) * n_dims]),
                                        &(signal[(t - 1) * n_dims]), n_dims,
                                        kernelDescObj);
    D[t] = D[t - 1] + diag_element;
    c_r = 0.0;
    for (s = t - 1; s >= s_min; s--) {
      c_r += kernel_value_by_name(&(signal[s * n_dims]),
                                  &(signal[(t - 1) * n_dims]), n_dims,
                                  kernelDescObj);
      S[s] += 2 * c_r - diag_element;
    }
    s = s_min;
    c_cost = D[t] - D[s] - S[s] / (t - s);
    c_cost_sum = M_V[s] + c_cost;
    M_pruning[s] = c_cost_sum;
    c_cost_sum += beta;
    M_V[t] = c_cost_sum;
    M_path[t] = s;
    for (s = max_int(s_min + 1, min_size); s < t - min_size + 1; s++) {
      c_cost = D[t] - D[s] - S[s] / (t - s);
      c_cost_sum = M_V[s] + c_cost;
      M_pruning[s] = c_cost_sum;
      c_cost_sum += beta;
      if (M_V[t] > c_cost_sum) {
        M_V[t] = c_cost_sum;
        M_path[t] = s;
      }
    }
    while ((M_pruning[s_min] >= M_V[t]) && (s_min < t - min_size + 1)) {
      if (s_min == 0) {
        s_min += min_size;
      } else {
        s_min++;
      }
    }
  }
  free(D);
  free(S);
  free(M_V);
  free(M_pruning);
  return;
}


x86 assembly (clang, -O0):
<ekcpd_pelt_compute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x50(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    123d <ekcpd_pelt_compute+0xfd>
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%rax
movslq -0x34(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%rax
movslq -0x34(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x60(%rbp),%rax
movslq -0x34(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11cf <ekcpd_pelt_compute+0x8f>
movl   $0x1,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    13b6 <ekcpd_pelt_compute+0x276>
mov    -0x8(%rbp),%rdi
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
imul   -0x10(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
imul   -0x10(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%edx
mov    -0x28(%rbp),%rcx
call   1060 <kernel_value_by_name@plt>
movsd  %xmm0,-0x80(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x80(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x38(%rbp)
cmpl   $0x0,-0x38(%rbp)
jl     135d <ekcpd_pelt_compute+0x21d>
mov    -0x8(%rbp),%rdi
mov    -0x38(%rbp),%eax
imul   -0x10(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
imul   -0x10(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%edx
mov    -0x28(%rbp),%rcx
call   1060 <kernel_value_by_name@plt>
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
mov    -0x50(%rbp),%rax
movslq -0x38(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x38(%rbp)
jmp    12c9 <ekcpd_pelt_compute+0x189>
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x38(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x50(%rbp),%rax
movsd  (%rax),%xmm1
cvtsi2sdl -0x34(%rbp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1244 <ekcpd_pelt_compute+0x104>
mov    -0x1c(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    16ec <ekcpd_pelt_compute+0x5ac>
mov    -0x8(%rbp),%rdi
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
imul   -0x10(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
imul   -0x10(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%edx
mov    -0x28(%rbp),%rcx
call   1060 <kernel_value_by_name@plt>
movsd  %xmm0,-0x80(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x34(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x80(%rbp),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jl     14da <ekcpd_pelt_compute+0x39a>
mov    -0x8(%rbp),%rdi
mov    -0x38(%rbp),%eax
imul   -0x10(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
imul   -0x10(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%edx
mov    -0x28(%rbp),%rcx
call   1060 <kernel_value_by_name@plt>
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
mov    -0x50(%rbp),%rax
movslq -0x38(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x38(%rbp)
jmp    1444 <ekcpd_pelt_compute+0x304>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x38(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x34(%rbp),%eax
sub    -0x38(%rbp),%eax
cvtsi2sd %eax,%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x58(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%edx
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x3c(%rbp),%edi
add    $0x1,%edi
mov    -0x1c(%rbp),%esi
call   1040 <max_int@plt>
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    -0x34(%rbp),%ecx
sub    -0x1c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    165c <ekcpd_pelt_compute+0x51c>
mov    -0x48(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x38(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x50(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x34(%rbp),%eax
sub    -0x38(%rbp),%eax
cvtsi2sd %eax,%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x58(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x18(%rbp),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x58(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x70(%rbp),%xmm0
jbe    1649 <ekcpd_pelt_compute+0x509>
movsd  -0x70(%rbp),%xmm0
mov    -0x58(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%edx
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    164e <ekcpd_pelt_compute+0x50e>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1587 <ekcpd_pelt_compute+0x447>
jmp    1661 <ekcpd_pelt_compute+0x521>
mov    -0x60(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x58(%rbp),%rcx
movslq -0x34(%rbp),%rdx
xor    %eax,%eax
ucomisd (%rcx,%rdx,8),%xmm0
mov    %al,-0x81(%rbp)
jb     16a0 <ekcpd_pelt_compute+0x560>
mov    -0x3c(%rbp),%eax
mov    -0x34(%rbp),%ecx
sub    -0x1c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
setl   %al
mov    %al,-0x81(%rbp)
mov    -0x81(%rbp),%al
test   $0x1,%al
jne    16b3 <ekcpd_pelt_compute+0x573>
jmp    16d9 <ekcpd_pelt_compute+0x599>
cmpl   $0x0,-0x3c(%rbp)
jne    16cb <ekcpd_pelt_compute+0x58b>
mov    -0x1c(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
jmp    16d4 <ekcpd_pelt_compute+0x594>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1661 <ekcpd_pelt_compute+0x521>
jmp    16de <ekcpd_pelt_compute+0x59e>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13bf <ekcpd_pelt_compute+0x27f>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ekcpd_pelt_compute>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r9,%rbp
mov    %r8,0xa8(%rsp)
mov    %rcx,0x38(%rsp)
movsd  %xmm0,0xa0(%rsp)
mov    %edx,%r14d
mov    %esi,%r15d
mov    %rdi,0x70(%rsp)
lea    0x8(,%r15,8),%ebx
mov    %ebx,%edi
call   1050 <malloc@plt>
mov    %rax,%r12
mov    %ebx,%edi
call   1050 <malloc@plt>
mov    %rax,%r13
mov    %ebx,%edi
call   1050 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %ebx,%edi
call   1050 <malloc@plt>
mov    0x38(%rsp),%rbx
test   %r15d,%r15d
mov    %rbp,0x30(%rsp)
mov    %r14d,0xc(%rsp)
mov    %r12,0x18(%rsp)
mov    %r13,0x10(%rsp)
mov    %rax,0x28(%rsp)
mov    %r15,0x60(%rsp)
js     146e <ekcpd_pelt_compute+0x32e>
lea    0x1(%r15),%r10d
cmp    $0x3,%r15d
jae    11e1 <ekcpd_pelt_compute+0xa1>
xor    %ecx,%ecx
jmp    13c4 <ekcpd_pelt_compute+0x284>
lea    (%r12,%r10,8),%rcx
lea    0x0(,%r10,8),%rbp
add    %r13,%rbp
mov    0x20(%rsp),%rdx
lea    (%rdx,%r10,8),%rdi
lea    (%rax,%r10,8),%rsi
cmp    %rbp,%r12
setb   0x50(%rsp)
cmp    %rcx,%r13
setb   %r11b
cmp    %rdi,%r12
setb   %r14b
cmp    %rcx,%rdx
setb   %r9b
cmp    %rsi,%r12
setb   %bl
cmp    %rcx,%rax
mov    %rax,%rcx
setb   %al
cmp    %rdi,%r13
setb   %r12b
cmp    %rbp,%rdx
setb   0x40(%rsp)
cmp    %rsi,%r13
setb   %r15b
cmp    %rbp,%rcx
setb   %bpl
cmp    %rsi,%rdx
setb   %r8b
cmp    %rdi,%rcx
setb   %sil
xor    %ecx,%ecx
test   %r11b,0x50(%rsp)
jne    1989 <ekcpd_pelt_compute+0x849>
and    %r9b,%r14b
jne    1989 <ekcpd_pelt_compute+0x849>
and    %al,%bl
mov    0x38(%rsp),%rbx
jne    19ac <ekcpd_pelt_compute+0x86c>
and    0x40(%rsp),%r12b
mov    0x18(%rsp),%r12
mov    0x28(%rsp),%rax
jne    13b5 <ekcpd_pelt_compute+0x275>
and    %bpl,%r15b
mov    0x30(%rsp),%rbp
jne    13ba <ekcpd_pelt_compute+0x27a>
and    %sil,%r8b
mov    0xc(%rsp),%r14d
mov    0x10(%rsp),%r13
jne    13c4 <ekcpd_pelt_compute+0x284>
mov    %r10d,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rdx
mov    %rdx,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rdx,%rdx
je     13ab <ekcpd_pelt_compute+0x26b>
mov    %r8,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
xorpd  %xmm0,%xmm0
mov    0x20(%rsp),%rsi
nopl   (%rax)
movupd %xmm0,(%r12,%rdx,8)
movupd %xmm0,0x10(%r12,%rdx,8)
movupd %xmm0,0x0(%r13,%rdx,8)
movupd %xmm0,0x10(%r13,%rdx,8)
movupd %xmm0,(%rsi,%rdx,8)
movupd %xmm0,0x10(%rsi,%rdx,8)
movupd %xmm0,0x0(%rbp,%rdx,4)
movupd %xmm0,(%rax,%rdx,8)
movupd %xmm0,0x10(%rax,%rdx,8)
movupd %xmm0,0x20(%r12,%rdx,8)
movupd %xmm0,0x30(%r12,%rdx,8)
movupd %xmm0,0x20(%r13,%rdx,8)
movupd %xmm0,0x30(%r13,%rdx,8)
movupd %xmm0,0x20(%rsi,%rdx,8)
movupd %xmm0,0x30(%rsi,%rdx,8)
movupd %xmm0,0x10(%rbp,%rdx,4)
movupd %xmm0,0x20(%rax,%rdx,8)
movupd %xmm0,0x30(%rax,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    12e0 <ekcpd_pelt_compute+0x1a0>
test   $0x1,%r8b
je     13a1 <ekcpd_pelt_compute+0x261>
xorpd  %xmm0,%xmm0
movupd %xmm0,(%r12,%rdx,8)
movupd %xmm0,0x10(%r12,%rdx,8)
movupd %xmm0,0x0(%r13,%rdx,8)
movupd %xmm0,0x10(%r13,%rdx,8)
mov    0x20(%rsp),%rsi
movupd %xmm0,(%rsi,%rdx,8)
movupd %xmm0,0x10(%rsi,%rdx,8)
movupd %xmm0,0x0(%rbp,%rdx,4)
movupd %xmm0,(%rax,%rdx,8)
movupd %xmm0,0x10(%rax,%rdx,8)
cmp    %r10,%rcx
jne    13c4 <ekcpd_pelt_compute+0x284>
jmp    146e <ekcpd_pelt_compute+0x32e>
xor    %edx,%edx
test   $0x1,%r8b
jne    1361 <ekcpd_pelt_compute+0x221>
jmp    13a1 <ekcpd_pelt_compute+0x261>
mov    0x30(%rsp),%rbp
mov    0xc(%rsp),%r14d
mov    0x10(%rsp),%r13
mov    %rcx,%rdx
not    %rdx
test   $0x1,%r10b
je     1402 <ekcpd_pelt_compute+0x2c2>
movq   $0x0,(%r12,%rcx,8)
movq   $0x0,0x0(%r13,%rcx,8)
mov    0x20(%rsp),%rsi
movq   $0x0,(%rsi,%rcx,8)
movl   $0x0,0x0(%rbp,%rcx,4)
movq   $0x0,(%rax,%rcx,8)
or     $0x1,%rcx
add    %r10,%rdx
mov    0x20(%rsp),%rdx
je     146e <ekcpd_pelt_compute+0x32e>
nopl   0x0(%rax)
movq   $0x0,(%r12,%rcx,8)
movq   $0x0,0x0(%r13,%rcx,8)
movq   $0x0,(%rdx,%rcx,8)
movl   $0x0,0x0(%rbp,%rcx,4)
movq   $0x0,(%rax,%rcx,8)
movq   $0x0,0x8(%r12,%rcx,8)
movq   $0x0,0x8(%r13,%rcx,8)
movq   $0x0,0x8(%rdx,%rcx,8)
movl   $0x0,0x4(%rbp,%rcx,4)
movq   $0x0,0x8(%rax,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%r10
jne    1410 <ekcpd_pelt_compute+0x2d0>
lea    (%rbx,%rbx,1),%eax
mov    %rax,0x58(%rsp)
movslq %r14d,%rax
mov    %rax,0x68(%rsp)
test   %ebx,%ebx
mov    %r12,%r13
jle    160c <ekcpd_pelt_compute+0x4cc>
mov    0x58(%rsp),%rax
cmp    $0x3,%eax
mov    $0x2,%ecx
cmovge %eax,%ecx
add    $0xffffffff,%ecx
mov    %rcx,0x98(%rsp)
mov    0x68(%rsp),%rax
lea    0x0(,%rax,8),%rax
mov    %rax,0x90(%rsp)
neg    %rax
mov    %rax,0x88(%rsp)
mov    $0x1,%ebp
xor    %r15d,%r15d
mov    0x70(%rsp),%rbx
mov    0xa8(%rsp),%r14
mov    0x10(%rsp),%r12
xchg   %ax,%ax
lea    -0x1(%rbp),%rax
mov    0x68(%rsp),%rdx
imul   %rdx,%rax
mov    0x70(%rsp),%rcx
lea    (%rcx,%rax,8),%rdi
mov    %rdi,0x40(%rsp)
mov    %rdi,%rsi
mov    %r14,%rcx
call   1060 <kernel_value_by_name@plt>
movsd  -0x8(%r13,%rbp,8),%xmm1
addsd  %xmm0,%xmm1
mov    %rbp,0x48(%rsp)
movsd  %xmm1,0x0(%r13,%rbp,8)
xorpd  0xadb(%rip),%xmm0
movapd %xmm0,0xb0(%rsp)
xorpd  %xmm1,%xmm1
mov    %rbx,0x78(%rsp)
mov    %r15,0x80(%rsp)
mov    0xc(%rsp),%r13d
mov    0x88(%rsp),%rbp
nopl   0x0(%rax)
movsd  %xmm1,0x50(%rsp)
mov    %rbx,%rdi
mov    0x40(%rsp),%rsi
mov    %r13d,%edx
mov    %r14,%rcx
call   1060 <kernel_value_by_name@plt>
movsd  0x50(%rsp),%xmm1
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
addsd  %xmm1,%xmm0
addsd  0xb0(%rsp),%xmm0
mov    %r15d,%eax
addsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,(%r12,%rax,8)
lea    -0x1(%r15),%rax
add    %rbp,%rbx
test   %r15,%r15
mov    %rax,%r15
jg     1550 <ekcpd_pelt_compute+0x410>
mov    0x18(%rsp),%r13
mov    0x48(%rsp),%rbp
movsd  0x0(%r13,%rbp,8),%xmm0
subsd  -0x8(%r13),%xmm0
movsd  (%r12),%xmm1
xorps  %xmm2,%xmm2
cvtsi2sd %ebp,%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
addsd  0xa0(%rsp),%xmm0
mov    0x20(%rsp),%rax
movsd  %xmm0,(%rax,%rbp,8)
add    $0x1,%rbp
mov    0x80(%rsp),%r15
add    $0x1,%r15
mov    0x78(%rsp),%rbx
add    0x90(%rsp),%rbx
cmp    0x98(%rsp),%r15
jne    14e0 <ekcpd_pelt_compute+0x3a0>
mov    0x58(%rsp),%rcx
cmp    0x60(%rsp),%ecx
mov    0x38(%rsp),%rax
mov    0x20(%rsp),%r14
mov    %r13,%rbx
jle    1659 <ekcpd_pelt_compute+0x519>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rdi
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
mov    %rax,%r13
lea    -0x2(%rcx),%eax
or     $0x1,%eax
cltq
movslq %ecx,%rbp
movslq %r13d,%rcx
mov    %rcx,0x98(%rsp)
mov    0x60(%rsp),%rcx
add    $0x1,%ecx
mov    %rcx,0x60(%rsp)
lea    0x1(%rax),%rcx
mov    %rcx,0x80(%rsp)
mov    0x68(%rsp),%rdx
imul   %rdx,%rax
mov    0x70(%rsp),%rcx
lea    (%rcx,%rax,8),%rax
mov    %rax,0x78(%rsp)
lea    0x0(,%rdx,8),%rax
mov    %rax,0x90(%rsp)
mov    %rax,%rdx
neg    %rdx
mov    %r13d,%esi
not    %esi
xor    %r12d,%r12d
mov    %rdx,0x58(%rsp)
jmp    1702 <ekcpd_pelt_compute+0x5c2>
nopw   0x0(%rax,%rax,1)
mov    0x18(%rsp),%rbx
mov    0x48(%rsp),%rsi
add    $0x1,%rbp
addq   $0x1,0x80(%rsp)
mov    0x90(%rsp),%rax
add    %rax,0x78(%rsp)
add    $0xffffffffffffffff,%rsi
cmp    %ebp,0x60(%rsp)
je     1624 <ekcpd_pelt_compute+0x4e4>
mov    %rsi,0x48(%rsp)
lea    -0x1(%rbp),%rax
imul   0x68(%rsp),%rax
mov    0x70(%rsp),%rcx
lea    (%rcx,%rax,8),%r15
mov    %r15,%rdi
mov    %r15,%rsi
mov    0xc(%rsp),%edx
mov    0xa8(%rsp),%rcx
call   1060 <kernel_value_by_name@plt>
movsd  -0x8(%rbx,%rbp,8),%xmm3
movapd %xmm0,0xb0(%rsp)
addsd  %xmm0,%xmm3
movsd  %xmm3,(%rbx,%rbp,8)
movslq %r12d,%rcx
cmp    %rcx,%rbp
mov    %rcx,0x40(%rsp)
jle    1813 <ekcpd_pelt_compute+0x6d3>
mov    %rbp,0x88(%rsp)
movapd 0xb0(%rsp),%xmm0
xorpd  0x88d(%rip),%xmm0
movapd %xmm0,0xb0(%rsp)
xorpd  %xmm1,%xmm1
mov    0x78(%rsp),%rbx
mov    0x80(%rsp),%r14
mov    0x10(%rsp),%rbp
mov    0x58(%rsp),%r13
nopw   0x0(%rax,%rax,1)
movsd  %xmm1,0x50(%rsp)
mov    %rbx,%rdi
mov    %r15,%rsi
mov    0xc(%rsp),%edx
mov    0xa8(%rsp),%rcx
call   1060 <kernel_value_by_name@plt>
movsd  0x50(%rsp),%xmm1
mov    0x40(%rsp),%rcx
addsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
addsd  %xmm1,%xmm0
addsd  0xb0(%rsp),%xmm0
addsd  -0x8(%rbp,%r14,8),%xmm0
movsd  %xmm0,-0x8(%rbp,%r14,8)
add    $0xffffffffffffffff,%r14
add    %r13,%rbx
cmp    %rcx,%r14
jg     17a0 <ekcpd_pelt_compute+0x660>
mov    0x18(%rsp),%rbx
mov    0x88(%rsp),%rbp
movsd  (%rbx,%rbp,8),%xmm3
mov    0x38(%rsp),%r13
mov    0x20(%rsp),%r14
subsd  (%rbx,%rcx,8),%xmm3
mov    0x10(%rsp),%rax
movsd  (%rax,%rcx,8),%xmm1
mov    %ebp,%eax
sub    %ecx,%eax
xorps  %xmm2,%xmm2
cvtsi2sd %eax,%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm3
addsd  (%r14,%rcx,8),%xmm3
mov    0x28(%rsp),%r15
movsd  %xmm3,(%r15,%rcx,8)
addsd  0xa0(%rsp),%xmm3
movsd  %xmm3,(%r14,%rbp,8)
mov    0x30(%rsp),%rax
mov    %ecx,(%rax,%rbp,4)
lea    0x1(%rcx),%edi
mov    %r13d,%esi
call   1040 <max_int@plt>
mov    %rbp,%r9
sub    0x98(%rsp),%r9
cltq
cmp    %rax,%r9
jge    18e0 <ekcpd_pelt_compute+0x7a0>
movsd  (%r14,%rbp,8),%xmm0
mov    0x28(%rsp),%rcx
mov    0x40(%rsp),%rax
movsd  (%rcx,%rax,8),%xmm1
ucomisd %xmm0,%xmm1
jb     16d0 <ekcpd_pelt_compute+0x590>
cmp    %rax,%r9
mov    0x18(%rsp),%rbx
mov    0x48(%rsp),%rsi
jl     16da <ekcpd_pelt_compute+0x59a>
nopl   0x0(%rax)
test   %r12d,%r12d
lea    0x1(%r12),%eax
mov    %eax,%r12d
cmove  %r13d,%r12d
movslq %r12d,%rax
movsd  (%rcx,%rax,8),%xmm1
ucomisd %xmm0,%xmm1
jb     16da <ekcpd_pelt_compute+0x59a>
cmp    %rax,%r9
jge    18b0 <ekcpd_pelt_compute+0x770>
jmp    16da <ekcpd_pelt_compute+0x59a>
nopl   0x0(%rax,%rax,1)
mov    %eax,%r8d
mov    %ebp,%edx
sub    %eax,%edx
lea    (%rbx,%rax,8),%r10
mov    0x10(%rsp),%rcx
lea    (%rcx,%rax,8),%r11
lea    (%r14,%rax,8),%rbx
lea    (%r15,%rax,8),%rax
mov    0x48(%rsp),%rcx
add    %r8,%rcx
xor    %esi,%esi
movsd  0xa0(%rsp),%xmm3
jmp    1931 <ekcpd_pelt_compute+0x7f1>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rsi
add    $0xffffffff,%edx
mov    %esi,%edi
add    %ecx,%edi
je     1880 <ekcpd_pelt_compute+0x740>
mov    0x18(%rsp),%rdi
movsd  (%rdi,%rbp,8),%xmm1
subsd  (%r10,%rsi,8),%xmm1
movsd  (%r11,%rsi,8),%xmm0
xorps  %xmm2,%xmm2
cvtsi2sd %edx,%xmm2
divsd  %xmm2,%xmm0
subsd  %xmm0,%xmm1
addsd  (%rbx,%rsi,8),%xmm1
movsd  %xmm1,(%rax,%rsi,8)
addsd  %xmm3,%xmm1
movsd  (%r14,%rbp,8),%xmm0
ucomisd %xmm1,%xmm0
jbe    1920 <ekcpd_pelt_compute+0x7e0>
movsd  %xmm1,(%r14,%rbp,8)
lea    (%r8,%rsi,1),%edi
mov    0x30(%rsp),%r15
mov    %edi,(%r15,%rbp,4)
movapd %xmm1,%xmm0
jmp    1920 <ekcpd_pelt_compute+0x7e0>
mov    0x30(%rsp),%rbp
mov    0xc(%rsp),%r14d
mov    0x18(%rsp),%r12
mov    0x10(%rsp),%r13
mov    0x28(%rsp),%rax
mov    0x38(%rsp),%rbx
jmp    13c4 <ekcpd_pelt_compute+0x284>
mov    0x30(%rsp),%rbp
mov    0xc(%rsp),%r14d
mov    0x18(%rsp),%r12
mov    0x10(%rsp),%r13
mov    0x28(%rsp),%rax
jmp    13c4 <ekcpd_pelt_compute+0x284>

LLVM IR (-O0):
define void @ekcpd_pelt_compute(double* %0, i32 %1, i32 %2, double %3, i32 %4, i8* %5, i32* %6) {
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i32*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca double*
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
store double* %0, double** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store double %3, double* %11
store i32 %4, i32* %12
store i8* %5, i8** %13
store i32* %6, i32** %14
store i32 0, i32* %17
%26 = load i32, i32* %9
%27 = add nsw i32 %26, 1
%28 = sext i32 %27 to i64
%29 = mul i64 %28, 8
%30 = trunc i64 %29 to i32
%31 = call i64 @malloc(i32 %30)
%32 = inttoptr i64 %31 to double*
store double* %32, double** %18
%33 = load i32, i32* %9
%34 = add nsw i32 %33, 1
%35 = sext i32 %34 to i64
%36 = mul i64 %35, 8
%37 = trunc i64 %36 to i32
%38 = call i64 @malloc(i32 %37)
%39 = inttoptr i64 %38 to double*
store double* %39, double** %19
%40 = load i32, i32* %9
%41 = add nsw i32 %40, 1
%42 = sext i32 %41 to i64
%43 = mul i64 %42, 8
%44 = trunc i64 %43 to i32
%45 = call i64 @malloc(i32 %44)
%46 = inttoptr i64 %45 to double*
store double* %46, double** %20
%47 = load i32, i32* %9
%48 = add nsw i32 %47, 1
%49 = sext i32 %48 to i64
%50 = mul i64 %49, 8
%51 = trunc i64 %50 to i32
%52 = call i64 @malloc(i32 %51)
%53 = inttoptr i64 %52 to double*
store double* %53, double** %21
store i32 0, i32* %15
br label %54
54: ; preds = %80, %7
%55 = load i32, i32* %15
%56 = load i32, i32* %9
%57 = add nsw i32 %56, 1
%58 = icmp slt i32 %55, %57
br i1 %58, label %59, label %83
59: ; preds = %54
%60 = load double*, double** %18
%61 = load i32, i32* %15
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds double, double* %60, i64 %62
store double 0.000000e+00, double* %63
%64 = load double*, double** %19
%65 = load i32, i32* %15
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds double, double* %64, i64 %66
store double 0.000000e+00, double* %67
%68 = load double*, double** %20
%69 = load i32, i32* %15
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %68, i64 %70
store double 0.000000e+00, double* %71
%72 = load i32*, i32** %14
%73 = load i32, i32* %15
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i32, i32* %72, i64 %74
store i32 0, i32* %75
%76 = load double*, double** %21
%77 = load i32, i32* %15
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds double, double* %76, i64 %78
store double 0.000000e+00, double* %79
br label %80
80: ; preds = %59
%81 = load i32, i32* %15
%82 = add nsw i32 %81, 1
store i32 %82, i32* %15
br label %54
83: ; preds = %54
store i32 1, i32* %15
br label %84
84: ; preds = %182, %83
%85 = load i32, i32* %15
%86 = load i32, i32* %12
%87 = mul nsw i32 2, %86
%88 = icmp slt i32 %85, %87
br i1 %88, label %89, label %185
89: ; preds = %84
%90 = load double*, double** %8
%91 = load i32, i32* %15
%92 = sub nsw i32 %91, 1
%93 = load i32, i32* %10
%94 = mul nsw i32 %92, %93
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds double, double* %90, i64 %95
%97 = load double*, double** %8
%98 = load i32, i32* %15
%99 = sub nsw i32 %98, 1
%100 = load i32, i32* %10
%101 = mul nsw i32 %99, %100
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds double, double* %97, i64 %102
%104 = load i32, i32* %10
%105 = load i8*, i8** %13
%106 = call double @kernel_value_by_name(double* %96, double* %103, i32 %104, i8* %105)
store double %106, double* %25
%107 = load double*, double** %18
%108 = load i32, i32* %15
%109 = sub nsw i32 %108, 1
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds double, double* %107, i64 %110
%112 = load double, double* %111
%113 = load double, double* %25
%114 = fadd double %112, %113
%115 = load double*, double** %18
%116 = load i32, i32* %15
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds double, double* %115, i64 %117
store double %114, double* %118
store double 0.000000e+00, double* %24
%119 = load i32, i32* %15
%120 = sub nsw i32 %119, 1
store i32 %120, i32* %16
br label %121
121: ; preds = %153, %89
%122 = load i32, i32* %16
%123 = icmp sge i32 %122, 0
br i1 %123, label %124, label %156
124: ; preds = %121
%125 = load double*, double** %8
%126 = load i32, i32* %16
%127 = load i32, i32* %10
%128 = mul nsw i32 %126, %127
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds double, double* %125, i64 %129
%131 = load double*, double** %8
%132 = load i32, i32* %15
%133 = sub nsw i32 %132, 1
%134 = load i32, i32* %10
%135 = mul nsw i32 %133, %134
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds double, double* %131, i64 %136
%138 = load i32, i32* %10
%139 = load i8*, i8** %13
%140 = call double @kernel_value_by_name(double* %130, double* %137, i32 %138, i8* %139)
%141 = load double, double* %24
%142 = fadd double %141, %140
store double %142, double* %24
%143 = load double, double* %24
%144 = load double, double* %25
%145 = fneg double %144
%146 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %143, double %145)
%147 = load double*, double** %19
%148 = load i32, i32* %16
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds double, double* %147, i64 %149
%151 = load double, double* %150
%152 = fadd double %151, %146
store double %152, double* %150
br label %153
153: ; preds = %124
%154 = load i32, i32* %16
%155 = add nsw i32 %154, -1
store i32 %155, i32* %16
br label %121
156: ; preds = %121
%157 = load double*, double** %18
%158 = load i32, i32* %15
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds double, double* %157, i64 %159
%161 = load double, double* %160
%162 = load double*, double** %18
%163 = load i32, i32* %16
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds double, double* %162, i64 %164
%166 = load double, double* %165
%167 = fsub double %161, %166
%168 = load double*, double** %19
%169 = getelementptr inbounds double, double* %168, i64 0
%170 = load double, double* %169
%171 = load i32, i32* %15
%172 = sitofp i32 %171 to double
%173 = fdiv double %170, %172
%174 = fsub double %167, %173
store double %174, double* %22
%175 = load double, double* %22
%176 = load double, double* %11
%177 = fadd double %175, %176
%178 = load double*, double** %20
%179 = load i32, i32* %15
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds double, double* %178, i64 %180
store double %177, double* %181
br label %182
182: ; preds = %156
%183 = load i32, i32* %15
%184 = add nsw i32 %183, 1
store i32 %184, i32* %15
br label %84
185: ; preds = %84
%186 = load i32, i32* %12
%187 = mul nsw i32 2, %186
store i32 %187, i32* %15
br label %188
188: ; preds = %415, %185
%189 = load i32, i32* %15
%190 = load i32, i32* %9
%191 = add nsw i32 %190, 1
%192 = icmp slt i32 %189, %191
br i1 %192, label %193, label %418
193: ; preds = %188
%194 = load double*, double** %8
%195 = load i32, i32* %15
%196 = sub nsw i32 %195, 1
%197 = load i32, i32* %10
%198 = mul nsw i32 %196, %197
%199 = sext i32 %198 to i64
%200 = getelementptr inbounds double, double* %194, i64 %199
%201 = load double*, double** %8
%202 = load i32, i32* %15
%203 = sub nsw i32 %202, 1
%204 = load i32, i32* %10
%205 = mul nsw i32 %203, %204
%206 = sext i32 %205 to i64
%207 = getelementptr inbounds double, double* %201, i64 %206
%208 = load i32, i32* %10
%209 = load i8*, i8** %13
%210 = call double @kernel_value_by_name(double* %200, double* %207, i32 %208, i8* %209)
store double %210, double* %25
%211 = load double*, double** %18
%212 = load i32, i32* %15
%213 = sub nsw i32 %212, 1
%214 = sext i32 %213 to i64
%215 = getelementptr inbounds double, double* %211, i64 %214
%216 = load double, double* %215
%217 = load double, double* %25
%218 = fadd double %216, %217
%219 = load double*, double** %18
%220 = load i32, i32* %15
%221 = sext i32 %220 to i64
%222 = getelementptr inbounds double, double* %219, i64 %221
store double %218, double* %222
store double 0.000000e+00, double* %24
%223 = load i32, i32* %15
%224 = sub nsw i32 %223, 1
store i32 %224, i32* %16
br label %225
225: ; preds = %258, %193
%226 = load i32, i32* %16
%227 = load i32, i32* %17
%228 = icmp sge i32 %226, %227
br i1 %228, label %229, label %261
229: ; preds = %225
%230 = load double*, double** %8
%231 = load i32, i32* %16
%232 = load i32, i32* %10
%233 = mul nsw i32 %231, %232
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds double, double* %230, i64 %234
%236 = load double*, double** %8
%237 = load i32, i32* %15
%238 = sub nsw i32 %237, 1
%239 = load i32, i32* %10
%240 = mul nsw i32 %238, %239
%241 = sext i32 %240 to i64
%242 = getelementptr inbounds double, double* %236, i64 %241
%243 = load i32, i32* %10
%244 = load i8*, i8** %13
%245 = call double @kernel_value_by_name(double* %235, double* %242, i32 %243, i8* %244)
%246 = load double, double* %24
%247 = fadd double %246, %245
store double %247, double* %24
%248 = load double, double* %24
%249 = load double, double* %25
%250 = fneg double %249
%251 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %248, double %250)
%252 = load double*, double** %19
%253 = load i32, i32* %16
%254 = sext i32 %253 to i64
%255 = getelementptr inbounds double, double* %252, i64 %254
%256 = load double, double* %255
%257 = fadd double %256, %251
store double %257, double* %255
br label %258
258: ; preds = %229
%259 = load i32, i32* %16
%260 = add nsw i32 %259, -1
store i32 %260, i32* %16
br label %225
261: ; preds = %225
%262 = load i32, i32* %17
store i32 %262, i32* %16
%263 = load double*, double** %18
%264 = load i32, i32* %15
%265 = sext i32 %264 to i64
%266 = getelementptr inbounds double, double* %263, i64 %265
%267 = load double, double* %266
%268 = load double*, double** %18
%269 = load i32, i32* %16
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds double, double* %268, i64 %270
%272 = load double, double* %271
%273 = fsub double %267, %272
%274 = load double*, double** %19
%275 = load i32, i32* %16
%276 = sext i32 %275 to i64
%277 = getelementptr inbounds double, double* %274, i64 %276
%278 = load double, double* %277
%279 = load i32, i32* %15
%280 = load i32, i32* %16
%281 = sub nsw i32 %279, %280
%282 = sitofp i32 %281 to double
%283 = fdiv double %278, %282
%284 = fsub double %273, %283
store double %284, double* %22
%285 = load double*, double** %20
%286 = load i32, i32* %16
%287 = sext i32 %286 to i64
%288 = getelementptr inbounds double, double* %285, i64 %287
%289 = load double, double* %288
%290 = load double, double* %22
%291 = fadd double %289, %290
store double %291, double* %23
%292 = load double, double* %23
%293 = load double*, double** %21
%294 = load i32, i32* %16
%295 = sext i32 %294 to i64
%296 = getelementptr inbounds double, double* %293, i64 %295
store double %292, double* %296
%297 = load double, double* %11
%298 = load double, double* %23
%299 = fadd double %298, %297
store double %299, double* %23
%300 = load double, double* %23
%301 = load double*, double** %20
%302 = load i32, i32* %15
%303 = sext i32 %302 to i64
%304 = getelementptr inbounds double, double* %301, i64 %303
store double %300, double* %304
%305 = load i32, i32* %16
%306 = load i32*, i32** %14
%307 = load i32, i32* %15
%308 = sext i32 %307 to i64
%309 = getelementptr inbounds i32, i32* %306, i64 %308
store i32 %305, i32* %309
%310 = load i32, i32* %17
%311 = add nsw i32 %310, 1
%312 = load i32, i32* %12
%313 = call i32 @max_int(i32 %311, i32 %312)
store i32 %313, i32* %16
br label %314
314: ; preds = %378, %261
%315 = load i32, i32* %16
%316 = load i32, i32* %15
%317 = load i32, i32* %12
%318 = sub nsw i32 %316, %317
%319 = add nsw i32 %318, 1
%320 = icmp slt i32 %315, %319
br i1 %320, label %321, label %381
321: ; preds = %314
%322 = load double*, double** %18
%323 = load i32, i32* %15
%324 = sext i32 %323 to i64
%325 = getelementptr inbounds double, double* %322, i64 %324
%326 = load double, double* %325
%327 = load double*, double** %18
%328 = load i32, i32* %16
%329 = sext i32 %328 to i64
%330 = getelementptr inbounds double, double* %327, i64 %329
%331 = load double, double* %330
%332 = fsub double %326, %331
%333 = load double*, double** %19
%334 = load i32, i32* %16
%335 = sext i32 %334 to i64
%336 = getelementptr inbounds double, double* %333, i64 %335
%337 = load double, double* %336
%338 = load i32, i32* %15
%339 = load i32, i32* %16
%340 = sub nsw i32 %338, %339
%341 = sitofp i32 %340 to double
%342 = fdiv double %337, %341
%343 = fsub double %332, %342
store double %343, double* %22
%344 = load double*, double** %20
%345 = load i32, i32* %16
%346 = sext i32 %345 to i64
%347 = getelementptr inbounds double, double* %344, i64 %346
%348 = load double, double* %347
%349 = load double, double* %22
%350 = fadd double %348, %349
store double %350, double* %23
%351 = load double, double* %23
%352 = load double*, double** %21
%353 = load i32, i32* %16
%354 = sext i32 %353 to i64
%355 = getelementptr inbounds double, double* %352, i64 %354
store double %351, double* %355
%356 = load double, double* %11
%357 = load double, double* %23
%358 = fadd double %357, %356
store double %358, double* %23
%359 = load double*, double** %20
%360 = load i32, i32* %15
%361 = sext i32 %360 to i64
%362 = getelementptr inbounds double, double* %359, i64 %361
%363 = load double, double* %362
%364 = load double, double* %23
%365 = fcmp ogt double %363, %364
br i1 %365, label %366, label %377
366: ; preds = %321
%367 = load double, double* %23
%368 = load double*, double** %20
%369 = load i32, i32* %15
%370 = sext i32 %369 to i64
%371 = getelementptr inbounds double, double* %368, i64 %370
store double %367, double* %371
%372 = load i32, i32* %16
%373 = load i32*, i32** %14
%374 = load i32, i32* %15
%375 = sext i32 %374 to i64
%376 = getelementptr inbounds i32, i32* %373, i64 %375
store i32 %372, i32* %376
br label %377
377: ; preds = %366, %321
br label %378
378: ; preds = %377
%379 = load i32, i32* %16
%380 = add nsw i32 %379, 1
store i32 %380, i32* %16
br label %314
381: ; preds = %314
br label %382
382: ; preds = %413, %381
%383 = load double*, double** %21
%384 = load i32, i32* %17
%385 = sext i32 %384 to i64
%386 = getelementptr inbounds double, double* %383, i64 %385
%387 = load double, double* %386
%388 = load double*, double** %20
%389 = load i32, i32* %15
%390 = sext i32 %389 to i64
%391 = getelementptr inbounds double, double* %388, i64 %390
%392 = load double, double* %391
%393 = fcmp oge double %387, %392
br i1 %393, label %394, label %401
394: ; preds = %382
%395 = load i32, i32* %17
%396 = load i32, i32* %15
%397 = load i32, i32* %12
%398 = sub nsw i32 %396, %397
%399 = add nsw i32 %398, 1
%400 = icmp slt i32 %395, %399
br label %401
401: ; preds = %394, %382
%402 = phi i1 [ false, %382 ], [ %400, %394 ]
br i1 %402, label %403, label %414
403: ; preds = %401
%404 = load i32, i32* %17
%405 = icmp eq i32 %404, 0
br i1 %405, label %406, label %410
406: ; preds = %403
%407 = load i32, i32* %12
%408 = load i32, i32* %17
%409 = add nsw i32 %408, %407
store i32 %409, i32* %17
br label %413
410: ; preds = %403
%411 = load i32, i32* %17
%412 = add nsw i32 %411, 1
store i32 %412, i32* %17
br label %413
413: ; preds = %410, %406
br label %382
414: ; preds = %401
br label %415
415: ; preds = %414
%416 = load i32, i32* %15
%417 = add nsw i32 %416, 1
store i32 %417, i32* %15
br label %188
418: ; preds = %188
%419 = load double*, double** %18
%420 = call i32 @free(double* %419)
%421 = load double*, double** %19
%422 = call i32 @free(double* %421)
%423 = load double*, double** %20
%424 = call i32 @free(double* %423)
%425 = load double*, double** %21
%426 = call i32 @free(double* %425)
ret void
}

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