#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 */
scalar_t__ ceil(int);
double pl_gau(double, double, double);
void pl_Rconvolv(double *y, double *ys, long num, double st, double dw,
                 double R) {
  double w, s, t, nd, sigma;
  long i, n1, n2, n;
  sigma = st / (2.35 * R);
  nd = (long)ceil(3 * sigma / dw);
  n1 = nd + 1;
  for (i = 0; i < n1; i++)
    ys[i] = y[i];
  sigma = (st + ((double)num) * dw) / (2.35 * R);
  nd = (long)ceil(3 * sigma / dw);
  n2 = num - nd - 1;
  for (i = n2; i < num; i++)
    ys[i] = y[i];
  w = st + (n1 - 1) * dw;
  for (n = n1; n < n2; n++) {
    w = w + dw;
    s = 0.0;
    t = 0.0;
    sigma = w / (2.35 * R);
    nd = (long)ceil(3 * sigma / dw);
    for (i = -nd; i <= nd; i++) {
      t = t + pl_gau((-(double)i) * dw, 0.0, sigma);
      s = s + pl_gau((-(double)i) * dw, 0.0, sigma) * y[n + i];
    }
    ys[n] = s / t;
  }
  return;
}


x86 assembly (clang, -O0):
<pl_Rconvolv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xebd(%rip),%xmm1
mulsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe9f(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <ceil@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe72(%rip),%xmm0
addsd  -0x50(%rbp),%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x68(%rbp)
movq   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%rax
cmp    -0x68(%rbp),%rax
jge    11dd <pl_Rconvolv+0xbd>
mov    -0x8(%rbp),%rax
mov    -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x60(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    11a4 <pl_Rconvolv+0x84>
movsd  -0x20(%rbp),%xmm1
cvtsi2sdq -0x18(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe13(%rip),%xmm1
mulsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xdf5(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <ceil@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x50(%rbp)
cvtsi2sdq -0x18(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  0xdbd(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1291 <pl_Rconvolv+0x171>
mov    -0x8(%rbp),%rax
mov    -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x60(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    1258 <pl_Rconvolv+0x138>
movsd  -0x20(%rbp),%xmm1
mov    -0x68(%rbp),%rax
sub    $0x1,%rax
cvtsi2sd %rax,%xmm0
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
cmp    -0x70(%rbp),%rax
jge    1449 <pl_Rconvolv+0x329>
movsd  -0x38(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xd19(%rip),%xmm1
mulsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xcfb(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <ceil@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x60(%rbp)
cvtsi2sdq -0x60(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1421 <pl_Rconvolv+0x301>
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
cvtsi2sdq -0x60(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
xorps  %xmm1,%xmm1
call   1040 <pl_gau@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
cvtsi2sdq -0x60(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
xorps  %xmm1,%xmm1
call   1040 <pl_gau@plt>
movsd  -0x80(%rbp),%xmm1
mov    -0x8(%rbp),%rax
mov    -0x78(%rbp),%rcx
add    -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x60(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x60(%rbp)
jmp    134f <pl_Rconvolv+0x22f>
movsd  -0x40(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x78(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x78(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x78(%rbp)
jmp    12bd <pl_Rconvolv+0x19d>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pl_Rconvolv>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mulsd  0xeca(%rip),%xmm2
movsd  %xmm0,(%rsp)
movsd  %xmm2,0x20(%rsp)
divsd  %xmm2,%xmm0
mulsd  0xebb(%rip),%xmm0
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r12
movsd  %xmm1,0x8(%rsp)
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <ceil@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0xe97(%rip),%xmm0
cvttsd2si %xmm0,%r15
test   %r15,%r15
jle    1308 <pl_Rconvolv+0x1e8>
cmp    $0x4,%r15
jb     11a7 <pl_Rconvolv+0x87>
lea    (%r12,%r15,8),%rax
cmp    %r14,%rax
jbe    1224 <pl_Rconvolv+0x104>
lea    (%r14,%r15,8),%rax
cmp    %r12,%rax
jbe    1224 <pl_Rconvolv+0x104>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
add    %r15,%rcx
mov    %r15,%rdx
and    $0x3,%rdx
je     11d6 <pl_Rconvolv+0xb6>
nopl   0x0(%rax,%rax,1)
movsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    11c0 <pl_Rconvolv+0xa0>
cmp    $0x3,%rcx
jb     1308 <pl_Rconvolv+0x1e8>
movsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
movsd  0x8(%r12,%rax,8),%xmm0
movsd  %xmm0,0x8(%r14,%rax,8)
movsd  0x10(%r12,%rax,8),%xmm0
movsd  %xmm0,0x10(%r14,%rax,8)
movsd  0x18(%r12,%rax,8),%xmm0
movsd  %xmm0,0x18(%r14,%rax,8)
add    $0x4,%rax
cmp    %rax,%r15
jne    11e0 <pl_Rconvolv+0xc0>
jmp    1308 <pl_Rconvolv+0x1e8>
mov    %r15,%rax
and    $0xfffffffffffffffc,%rax
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x3,%ecx
cmp    $0xc,%rsi
jae    1249 <pl_Rconvolv+0x129>
xor    %esi,%esi
jmp    12bc <pl_Rconvolv+0x19c>
and    $0xfffffffffffffffc,%rdx
xor    %esi,%esi
nop
movups (%r12,%rsi,8),%xmm0
movups 0x10(%r12,%rsi,8),%xmm1
movups %xmm0,(%r14,%rsi,8)
movups %xmm1,0x10(%r14,%rsi,8)
movups 0x20(%r12,%rsi,8),%xmm0
movups 0x30(%r12,%rsi,8),%xmm1
movups %xmm0,0x20(%r14,%rsi,8)
movups %xmm1,0x30(%r14,%rsi,8)
movups 0x40(%r12,%rsi,8),%xmm0
movups 0x50(%r12,%rsi,8),%xmm1
movups %xmm0,0x40(%r14,%rsi,8)
movups %xmm1,0x50(%r14,%rsi,8)
movupd 0x60(%r12,%rsi,8),%xmm0
movupd 0x70(%r12,%rsi,8),%xmm1
movupd %xmm0,0x60(%r14,%rsi,8)
movupd %xmm1,0x70(%r14,%rsi,8)
add    $0x10,%rsi
add    $0xfffffffffffffffc,%rdx
jne    1250 <pl_Rconvolv+0x130>
test   %rcx,%rcx
je     12ff <pl_Rconvolv+0x1df>
lea    (%r14,%rsi,8),%rdx
add    $0x10,%rdx
lea    (%r12,%rsi,8),%rsi
add    $0x10,%rsi
shl    $0x5,%rcx
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
movupd -0x10(%rsi,%rdi,1),%xmm0
movupd (%rsi,%rdi,1),%xmm1
movupd %xmm0,-0x10(%rdx,%rdi,1)
movupd %xmm1,(%rdx,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rcx
jne    12e0 <pl_Rconvolv+0x1c0>
cmp    %r15,%rax
jne    11a9 <pl_Rconvolv+0x89>
xorps  %xmm0,%xmm0
cvtsi2sd %rbx,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm0
addsd  (%rsp),%xmm0
divsd  0x20(%rsp),%xmm0
mulsd  0xcd5(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <ceil@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
addsd  0xcbe(%rip),%xmm1
cvttsd2si %xmm1,%r13
cmp    %rbx,%r13
jge    14ff <pl_Rconvolv+0x3df>
mov    %rbx,%r8
sub    %r13,%r8
mov    %r13,%rax
cmp    $0x4,%r8
jb     1487 <pl_Rconvolv+0x367>
lea    (%r14,%r13,8),%rax
lea    (%r12,%rbx,8),%rcx
cmp    %rcx,%rax
jae    139c <pl_Rconvolv+0x27c>
lea    (%r14,%rbx,8),%rcx
lea    (%r12,%r13,8),%rdx
mov    %r13,%rax
cmp    %rcx,%rdx
jb     1487 <pl_Rconvolv+0x367>
mov    %r8,%rax
and    $0xfffffffffffffffc,%rax
lea    -0x4(%rax),%rcx
mov    %rcx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x3,%edx
cmp    $0xc,%rcx
jae    13c1 <pl_Rconvolv+0x2a1>
xor    %edi,%edi
jmp    143d <pl_Rconvolv+0x31d>
and    $0xfffffffffffffffc,%rsi
lea    (%r14,%r13,8),%rbp
add    $0x70,%rbp
lea    (%r12,%r13,8),%rcx
add    $0x70,%rcx
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
movups -0x70(%rcx,%rdi,8),%xmm0
movups -0x60(%rcx,%rdi,8),%xmm1
movups %xmm0,-0x70(%rbp,%rdi,8)
movups %xmm1,-0x60(%rbp,%rdi,8)
movups -0x50(%rcx,%rdi,8),%xmm0
movups -0x40(%rcx,%rdi,8),%xmm1
movups %xmm0,-0x50(%rbp,%rdi,8)
movups %xmm1,-0x40(%rbp,%rdi,8)
movups -0x30(%rcx,%rdi,8),%xmm0
movups -0x20(%rcx,%rdi,8),%xmm1
movups %xmm0,-0x30(%rbp,%rdi,8)
movups %xmm1,-0x20(%rbp,%rdi,8)
movupd -0x10(%rcx,%rdi,8),%xmm0
movupd (%rcx,%rdi,8),%xmm1
movupd %xmm0,-0x10(%rbp,%rdi,8)
movupd %xmm1,0x0(%rbp,%rdi,8)
add    $0x10,%rdi
add    $0xfffffffffffffffc,%rsi
jne    13e0 <pl_Rconvolv+0x2c0>
test   %rdx,%rdx
je     147f <pl_Rconvolv+0x35f>
add    %r13,%rdi
lea    (%r14,%rdi,8),%rcx
add    $0x10,%rcx
lea    (%r12,%rdi,8),%rsi
add    $0x10,%rsi
shl    $0x5,%rdx
xor    %edi,%edi
nopl   0x0(%rax,%rax,1)
movupd -0x10(%rsi,%rdi,1),%xmm0
movupd (%rsi,%rdi,1),%xmm1
movupd %xmm0,-0x10(%rcx,%rdi,1)
movupd %xmm1,(%rcx,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rdx
jne    1460 <pl_Rconvolv+0x340>
cmp    %rax,%r8
je     14ff <pl_Rconvolv+0x3df>
add    %r13,%rax
mov    %ebx,%edx
sub    %eax,%edx
mov    %rax,%rcx
not    %rcx
add    %rbx,%rcx
and    $0x3,%rdx
je     14b6 <pl_Rconvolv+0x396>
nopw   0x0(%rax,%rax,1)
movsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    14a0 <pl_Rconvolv+0x380>
cmp    $0x3,%rcx
jb     14ff <pl_Rconvolv+0x3df>
nopl   0x0(%rax)
movsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,(%r14,%rax,8)
movsd  0x8(%r12,%rax,8),%xmm0
movsd  %xmm0,0x8(%r14,%rax,8)
movsd  0x10(%r12,%rax,8),%xmm0
movsd  %xmm0,0x10(%r14,%rax,8)
movsd  0x18(%r12,%rax,8),%xmm0
movsd  %xmm0,0x18(%r14,%rax,8)
add    $0x4,%rax
cmp    %rax,%rbx
jne    14c0 <pl_Rconvolv+0x3a0>
cmp    %r13,%r15
movsd  0x8(%rsp),%xmm1
jge    1665 <pl_Rconvolv+0x545>
lea    -0x1(%r15),%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mulsd  %xmm1,%xmm0
addsd  (%rsp),%xmm0
lea    (%r12,%r15,8),%rbx
jmp    1553 <pl_Rconvolv+0x433>
nopl   0x0(%rax)
movsd  %xmm0,(%r14,%r15,8)
add    $0x1,%r15
add    $0x8,%rbx
cmp    %r13,%r15
movsd  0x8(%rsp),%xmm1
movsd  0x28(%rsp),%xmm0
je     1665 <pl_Rconvolv+0x545>
addsd  %xmm1,%xmm0
movsd  %xmm0,0x28(%rsp)
divsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
mulsd  0xa97(%rip),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <ceil@plt>
movapd 0xaaa(%rip),%xmm1
xorps  %xmm2,%xmm2
cvtsi2sd %rax,%xmm2
movapd %xmm2,%xmm0
xorpd  %xmm1,%xmm0
cvttsd2si %xmm0,%rbp
xorps  %xmm4,%xmm4
cvtsi2sd %rbp,%xmm4
ucomisd %xmm4,%xmm2
movsd  0xa71(%rip),%xmm0
jb     1530 <pl_Rconvolv+0x410>
add    $0x1,%rbp
xorpd  %xmm0,%xmm0
xorps  %xmm3,%xmm3
movsd  %xmm3,0x18(%rsp)
movapd %xmm2,0x30(%rsp)
nopl   0x0(%rax)
movsd  %xmm0,(%rsp)
xorpd  %xmm1,%xmm4
mulsd  0x8(%rsp),%xmm4
movapd %xmm4,0x40(%rsp)
xorpd  %xmm1,%xmm1
movapd %xmm4,%xmm0
movsd  0x10(%rsp),%xmm2
call   1040 <pl_gau@plt>
movsd  0x18(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
xorpd  %xmm1,%xmm1
movapd 0x40(%rsp),%xmm0
movsd  0x10(%rsp),%xmm2
call   1040 <pl_gau@plt>
movapd 0x30(%rsp),%xmm2
movapd 0xa05(%rip),%xmm1
mulsd  -0x8(%rbx,%rbp,8),%xmm0
xorps  %xmm4,%xmm4
cvtsi2sd %rbp,%xmm4
movsd  (%rsp),%xmm3
addsd  %xmm0,%xmm3
movsd  %xmm3,(%rsp)
movsd  (%rsp),%xmm0
add    $0x1,%rbp
ucomisd %xmm4,%xmm2
jae    15d0 <pl_Rconvolv+0x4b0>
divsd  0x18(%rsp),%xmm0
jmp    1530 <pl_Rconvolv+0x410>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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