void snip2d(double *data, int nrows, int ncolumns, int width) {
  int i, j;
  int p;
  int size;
  double *w;
  double P1, P2, P3, P4;
  double S1, S2, S3, S4;
  double dhelp;
  int iminuspxncolumns;
  int ixncolumns;
  int ipluspxncolumns;
  size = nrows * ncolumns;
  w = (double *)malloc(size * sizeof(double));
  for (p = width; p > 0; p--) {
    for (i = p; i < (nrows - p); i++) {
      iminuspxncolumns = (i - p) * ncolumns;
      ixncolumns = i * ncolumns;
      ipluspxncolumns = (i + p) * ncolumns;
      for (j = p; j < (ncolumns - p); j++) {
        P4 = data[iminuspxncolumns + (j - p)];
        S4 = data[iminuspxncolumns + j];
        P2 = data[iminuspxncolumns + (j + p)];
        S3 = data[ixncolumns + (j - p)];
        S2 = data[ixncolumns + (j + p)];
        P3 = data[ipluspxncolumns + (j - p)];
        S1 = data[ipluspxncolumns + j];
        P1 = data[ipluspxncolumns + (j + p)];
        dhelp = 0.5 * (P1 + P3);
        S1 = (((S1) > (dhelp)) ? (S1) : (dhelp)) - dhelp;
        dhelp = 0.5 * (P1 + P2);
        S2 = (((S2) > (dhelp)) ? (S2) : (dhelp)) - dhelp;
        dhelp = 0.5 * (P3 + P4);
        S3 = (((S3) > (dhelp)) ? (S3) : (dhelp)) - dhelp;
        dhelp = 0.5 * (P2 + P4);
        S4 = (((S4) > (dhelp)) ? (S4) : (dhelp)) - dhelp;
        w[ixncolumns + j] =
            (((data[ixncolumns + j]) <
              (0.5 * (S1 + S2 + S3 + S4) + 0.25 * (P1 + P2 + P3 + P4)))
                 ? (data[ixncolumns + j])
                 : (0.5 * (S1 + S2 + S3 + S4) + 0.25 * (P1 + P2 + P3 + P4)));
      }
    }
    for (i = p; i < (nrows - p); i++) {
      ixncolumns = i * ncolumns;
      for (j = p; j < (ncolumns - p); j++) {
        data[ixncolumns + j] = w[ixncolumns + j];
      }
    }
  }
  free(w);
}


x86 assembly (clang, -O0):
<snip2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x24(%rbp)
movslq -0x24(%rbp),%rdi
shl    $0x3,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jle    159d <snip2d+0x47d>
mov    -0x20(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    -0x20(%rbp),%ecx
cmp    %ecx,%eax
jge    150d <snip2d+0x3ed>
mov    -0x18(%rbp),%eax
sub    -0x20(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x18(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    -0x18(%rbp),%eax
add    -0x20(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    -0x20(%rbp),%ecx
cmp    %ecx,%eax
jge    14fa <snip2d+0x3da>
mov    -0x8(%rbp),%rax
mov    -0x7c(%rbp),%ecx
mov    -0x1c(%rbp),%edx
sub    -0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x7c(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x7c(%rbp),%ecx
mov    -0x1c(%rbp),%edx
add    -0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x80(%rbp),%ecx
mov    -0x1c(%rbp),%edx
sub    -0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x80(%rbp),%ecx
mov    -0x1c(%rbp),%edx
add    -0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x84(%rbp),%ecx
mov    -0x1c(%rbp),%edx
sub    -0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x84(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x84(%rbp),%ecx
mov    -0x1c(%rbp),%edx
add    -0x20(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm1
addsd  -0x48(%rbp),%xmm1
movsd  0xd57(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
ucomisd -0x78(%rbp),%xmm0
jbe    12d4 <snip2d+0x1b4>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    12e1 <snip2d+0x1c1>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
subsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm1
addsd  -0x40(%rbp),%xmm1
movsd  0xcfb(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x60(%rbp),%xmm0
ucomisd -0x78(%rbp),%xmm0
jbe    1330 <snip2d+0x210>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
jmp    133d <snip2d+0x21d>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
subsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x48(%rbp),%xmm1
addsd  -0x50(%rbp),%xmm1
movsd  0xc9f(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x68(%rbp),%xmm0
ucomisd -0x78(%rbp),%xmm0
jbe    138c <snip2d+0x26c>
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
jmp    1399 <snip2d+0x279>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
subsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm1
addsd  -0x50(%rbp),%xmm1
movsd  0xc43(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x70(%rbp),%xmm0
ucomisd -0x78(%rbp),%xmm0
jbe    13e8 <snip2d+0x2c8>
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
jmp    13f5 <snip2d+0x2d5>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
subsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x80(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x58(%rbp),%xmm0
addsd  -0x60(%rbp),%xmm0
addsd  -0x68(%rbp),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm3
addsd  -0x40(%rbp),%xmm3
addsd  -0x48(%rbp),%xmm3
addsd  -0x50(%rbp),%xmm3
movsd  0xbbf(%rip),%xmm2
mulsd  %xmm3,%xmm2
movsd  0xbab(%rip),%xmm3
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    1486 <snip2d+0x366>
mov    -0x8(%rbp),%rax
mov    -0x80(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
jmp    14d2 <snip2d+0x3b2>
movsd  -0x58(%rbp),%xmm0
addsd  -0x60(%rbp),%xmm0
addsd  -0x68(%rbp),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm2
addsd  -0x40(%rbp),%xmm2
addsd  -0x48(%rbp),%xmm2
addsd  -0x50(%rbp),%xmm2
movsd  0xb52(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xb3e(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
mov    -0x80(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11a7 <snip2d+0x87>
jmp    14ff <snip2d+0x3df>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1169 <snip2d+0x49>
mov    -0x20(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    -0x20(%rbp),%ecx
cmp    %ecx,%eax
jge    158a <snip2d+0x46a>
mov    -0x18(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    -0x20(%rbp),%ecx
cmp    %ecx,%eax
jge    1577 <snip2d+0x457>
mov    -0x30(%rbp),%rax
mov    -0x80(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x80(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1534 <snip2d+0x414>
jmp    157c <snip2d+0x45c>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1513 <snip2d+0x3f3>
jmp    158f <snip2d+0x46f>
mov    -0x20(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
jmp    1159 <snip2d+0x39>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<snip2d>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x178,%rsp
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%ebx
mov    %rdi,0x20(%rsp)
mov    %edx,%eax
imul   %esi,%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,%r15
test   %r14d,%r14d
jle    186b <snip2d+0x73b>
mov    %r14d,%r10d
movslq %ebp,%rsi
lea    0x1(%rsi),%r13d
imul   %r14d,%r13d
mov    %esi,%eax
not    %eax
mov    %eax,0x3c(%rsp)
lea    (%r14,%r14,1),%eax
not    %eax
add    %ebp,%eax
mov    %rax,0xd0(%rsp)
movslq %ebx,%rax
mov    %rax,0x138(%rsp)
mov    %rsi,%r8
sub    %r10,%r8
sub    %r10,%r8
lea    0x0(,%rsi,8),%r9
mov    %rsi,%rax
imul   %r10,%rax
mov    0x20(%rsp),%rdi
lea    (%rdi,%rax,8),%rbx
mov    %rbx,0xa0(%rsp)
mov    %r9,%rbx
neg    %rbx
mov    %rbx,0x130(%rsp)
lea    (%r15,%rax,8),%rbx
mov    %rbx,0x98(%rsp)
shl    $0x4,%rax
add    %rdi,%rax
mov    %rax,0x90(%rsp)
mov    %rsi,%rdx
shl    $0x4,%rdx
lea    0x0(,%r10,8),%rax
mov    %rdi,%rcx
sub    %rax,%rcx
mov    %rcx,0x88(%rsp)
mov    %rdx,%rax
neg    %rax
mov    %rax,0x120(%rsp)
lea    (%rsi,%rsi,1),%rax
add    $0x2,%rax
imul   %r10,%rax
lea    (%rdi,%rax,8),%rax
mov    %rax,0x80(%rsp)
mov    %rdx,%rax
xor    $0xfffffffffffffff0,%rax
mov    %rax,0x118(%rsp)
lea    0x2(%rsi),%rax
imul   %r10,%rax
lea    (%rdi,%rax,8),%rax
mov    %rax,0x78(%rsp)
mov    $0xfffffffffffffff0,%rax
sub    %r9,%rax
mov    %rax,0x110(%rsp)
mov    %r10,%rax
shl    $0x4,%rax
add    %rdi,%rax
mov    %rax,0x70(%rsp)
lea    (%rsi,%rsi,1),%rax
add    $0x1,%rax
imul   %r10,%rax
lea    (%rdi,%rax,8),%rax
mov    %rax,0x18(%rsp)
lea    0x1(%rsi),%rax
imul   %r10,%rax
mov    %r9,%rcx
xor    $0xfffffffffffffff8,%rcx
mov    %rcx,0x108(%rsp)
lea    (%r15,%rax,8),%rcx
mov    %rcx,0x68(%rsp)
lea    (%rdi,%rax,8),%rax
mov    %rax,0x60(%rsp)
lea    (%rsi,%rsi,1),%rax
add    $0xffffffffffffffff,%rax
imul   %r10,%rax
lea    (%rdi,%rax,8),%rax
mov    %rax,0x58(%rsp)
mov    $0x8,%eax
sub    %rdx,%rax
mov    %rax,0x100(%rsp)
xor    $0xfffffffffffffff8,%rdx
mov    %rdx,0x128(%rsp)
mov    %rsi,0xd8(%rsp)
lea    -0x1(%rsi),%rax
imul   %r10,%rax
lea    (%rdi,%rax,8),%rax
mov    %rax,0x50(%rsp)
mov    $0x8,%eax
mov    %r9,0x170(%rsp)
sub    %r9,%rax
mov    %rax,0xf8(%rsp)
add    $0x1,%r14d
movsd  0xd02(%rip),%xmm9
movapd 0xcd9(%rip),%xmm10
movsd  0xcf8(%rip),%xmm11
movapd 0xcc7(%rip),%xmm12
movapd 0xcce(%rip),%xmm13
lea    (%rdi,%r10,8),%rax
mov    %rax,0x48(%rsp)
xor    %eax,%eax
mov    %rax,0x10(%rsp)
mov    %r8,0xc8(%rsp)
mov    %r8,0x40(%rsp)
mov    %r10,0x140(%rsp)
mov    %r10,%rsi
mov    %ebp,0x34(%rsp)
mov    %r15,0xe0(%rsp)
jmp    144a <snip2d+0x31a>
nopl   0x0(%rax,%rax,1)
add    $0xffffffffffffffff,%rsi
mov    0x10(%rsp),%rdx
add    $0x1,%rdx
mov    0x130(%rsp),%rax
add    %rax,0xa0(%rsp)
mov    0x120(%rsp),%rcx
add    %rcx,0x90(%rsp)
addq   $0x2,0x40(%rsp)
addq   $0xfffffffffffffff8,0x48(%rsp)
mov    0x118(%rsp),%rcx
add    %rcx,0x80(%rsp)
mov    0x110(%rsp),%rcx
add    %rcx,0x78(%rsp)
addq   $0xfffffffffffffff0,0x70(%rsp)
mov    0x18(%rsp),%rcx
add    0x128(%rsp),%rcx
mov    %rcx,0x18(%rsp)
mov    0x108(%rsp),%rcx
add    %rcx,0x68(%rsp)
add    %rcx,0x60(%rsp)
add    %rax,0x98(%rsp)
mov    0x100(%rsp),%rax
add    %rax,0x58(%rsp)
mov    0xf8(%rsp),%rax
add    %rax,0x50(%rsp)
addq   $0x8,0x88(%rsp)
add    0x3c(%rsp),%r13d
add    $0xffffffff,%r14d
mov    %rdx,%rax
mov    %rdx,0x10(%rsp)
cmp    0x140(%rsp),%rdx
je     186b <snip2d+0x73b>
mov    0x138(%rsp),%rax
sub    %rsi,%rax
mov    %rax,0x28(%rsp)
cmp    %rax,%rsi
jge    1380 <snip2d+0x250>
mov    %r13d,0x38(%rsp)
mov    %r14,0xf0(%rsp)
movslq %r14d,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,0xe8(%rsp)
mov    0x40(%rsp),%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,0x158(%rsp)
mov    0xc8(%rsp),%rax
mov    0x10(%rsp),%rcx
lea    (%rax,%rcx,2),%rdx
mov    0xd0(%rsp),%rax
lea    (%rax,%rcx,2),%eax
lea    0x8(,%rax,8),%rax
mov    %rax,0x160(%rsp)
mov    0xd8(%rsp),%rax
sub    %rsi,%rax
mov    %rax,(%rsp)
mov    %rdx,0xa8(%rsp)
and    $0xfffffffffffffffe,%rdx
mov    %rdx,0x150(%rsp)
lea    (%rsi,%rdx,1),%rax
mov    %rax,0x148(%rsp)
mov    0x88(%rsp),%rdi
mov    %rsi,%rbx
mov    0x50(%rsp),%r10
mov    0x58(%rsp),%rbp
mov    0x98(%rsp),%rdx
mov    0x60(%rsp),%rcx
mov    0x68(%rsp),%rax
mov    0x18(%rsp),%r8
mov    0x70(%rsp),%rsi
mov    %rsi,0xb0(%rsp)
mov    0x78(%rsp),%rsi
mov    0x80(%rsp),%r13
mov    0x48(%rsp),%r12
mov    0x90(%rsp),%r14
mov    0xa0(%rsp),%r15
mov    0x20(%rsp),%r11
mov    %rbx,0x8(%rsp)
mov    %rbx,0xb8(%rsp)
jmp    15be <snip2d+0x48e>
nopw   0x0(%rax,%rax,1)
mov    0xb8(%rsp),%r9
add    $0x1,%r9
mov    0x170(%rsp),%rbx
add    %rbx,%r11
add    %rbx,%r15
add    %rbx,%r14
add    %rbx,%r12
add    %rbx,%r13
add    %rbx,%rsi
add    %rbx,0xb0(%rsp)
add    %rbx,%r8
mov    0xc0(%rsp),%rax
add    %rbx,%rax
add    %rbx,%rcx
add    %rbx,%rdx
add    %rbx,%rbp
add    %rbx,%r10
add    %rbx,%rdi
mov    %r9,0xb8(%rsp)
cmp    0x28(%rsp),%r9
jge    17c0 <snip2d+0x690>
mov    %rax,0xc0(%rsp)
mov    (%rsp),%rax
cmp    %rax,0x8(%rsp)
jge    1560 <snip2d+0x430>
mov    0x8(%rsp),%rbx
cmpq   $0x2,0xa8(%rsp)
jb     1700 <snip2d+0x5d0>
mov    %rdi,0x168(%rsp)
xor    %ebx,%ebx
mov    0x158(%rsp),%rax
mov    %r13,%rdi
mov    %rsi,%r13
mov    0xb0(%rsp),%rsi
mov    0xc0(%rsp),%r9
nopl   (%rax)
movupd (%r11,%rbx,8),%xmm8
movupd (%r12,%rbx,8),%xmm0
movupd (%rsi,%rbx,8),%xmm1
movupd (%r15,%rbx,8),%xmm2
movupd 0x0(%r13,%rbx,8),%xmm5
movupd (%r14,%rbx,8),%xmm4
movupd (%r8,%rbx,8),%xmm7
movupd (%rdi,%rbx,8),%xmm3
movapd %xmm4,%xmm6
addpd  %xmm3,%xmm6
mulpd  %xmm12,%xmm6
maxpd  %xmm6,%xmm7
subpd  %xmm6,%xmm7
addpd  %xmm1,%xmm3
movapd %xmm3,%xmm6
mulpd  %xmm12,%xmm6
maxpd  %xmm6,%xmm5
subpd  %xmm6,%xmm5
addpd  %xmm7,%xmm5
addpd  %xmm8,%xmm1
addpd  %xmm4,%xmm3
addpd  %xmm8,%xmm3
addpd  %xmm4,%xmm8
mulpd  %xmm12,%xmm8
maxpd  %xmm8,%xmm2
subpd  %xmm8,%xmm2
addpd  %xmm5,%xmm2
mulpd  %xmm12,%xmm1
maxpd  %xmm1,%xmm0
subpd  %xmm1,%xmm0
addpd  %xmm2,%xmm0
movupd (%rcx,%rbx,8),%xmm1
mulpd  %xmm13,%xmm3
mulpd  %xmm12,%xmm0
addpd  %xmm3,%xmm0
minpd  %xmm0,%xmm1
movupd %xmm1,(%r9,%rbx,8)
add    $0x2,%rbx
cmp    %rbx,%rax
jne    1610 <snip2d+0x4e0>
mov    0x148(%rsp),%rbx
mov    0x150(%rsp),%rax
cmp    %rax,0xa8(%rsp)
mov    (%rsp),%rax
mov    %r13,%rsi
mov    %rdi,%r13
mov    0x168(%rsp),%rdi
je     1560 <snip2d+0x430>
xchg   %ax,%ax
movsd  (%rdi,%rbx,8),%xmm3
movsd  (%r12,%rbx,8),%xmm2
movsd  (%rcx,%rbx,8),%xmm1
movsd  0x0(%rbp,%rbx,8),%xmm4
movsd  (%r14,%rbx,8),%xmm5
movsd  (%r8,%rbx,8),%xmm0
movapd %xmm4,%xmm6
addsd  %xmm0,%xmm6
mulsd  %xmm9,%xmm6
maxsd  %xmm6,%xmm5
subsd  %xmm6,%xmm5
addsd  %xmm2,%xmm0
movapd %xmm0,%xmm6
mulsd  %xmm9,%xmm6
maxsd  %xmm6,%xmm1
subsd  %xmm6,%xmm1
addsd  %xmm5,%xmm1
addsd  %xmm4,%xmm0
addsd  %xmm3,%xmm0
unpcklpd %xmm3,%xmm3
unpcklpd %xmm4,%xmm2
addpd  %xmm3,%xmm2
mulpd  %xmm10,%xmm2
movsd  (%r11,%rbx,8),%xmm3
movhpd (%r10,%rbx,8),%xmm3
maxpd  %xmm2,%xmm3
subpd  %xmm2,%xmm3
movsd  (%r15,%rbx,8),%xmm2
movapd %xmm3,%xmm4
unpckhpd %xmm3,%xmm4
addsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
mulsd  %xmm11,%xmm0
mulsd  %xmm9,%xmm4
addsd  %xmm0,%xmm4
minsd  %xmm4,%xmm2
movsd  %xmm2,(%rdx,%rbx,8)
add    $0x1,%rbx
cmp    %rax,%rbx
jl     1700 <snip2d+0x5d0>
jmp    1560 <snip2d+0x430>
nopl   0x0(%rax)
mov    0x8(%rsp),%rsi
cmp    0x28(%rsp),%rsi
mov    0xf0(%rsp),%r14
mov    0x34(%rsp),%ebp
mov    0xe0(%rsp),%r15
mov    0x38(%rsp),%r13d
mov    0xe8(%rsp),%r12
mov    (%rsp),%rcx
jge    1380 <snip2d+0x250>
mov    %r13d,%ebx
jmp    1811 <snip2d+0x6e1>
nopw   0x0(%rax,%rax,1)
add    %ebp,%ebx
add    $0x1,%r12
cmp    %r12,0x28(%rsp)
jle    1380 <snip2d+0x250>
cmp    %rcx,%rsi
jge    1800 <snip2d+0x6d0>
movslq %ebx,%rax
lea    (%r15,%rax,8),%rsi
mov    0x20(%rsp),%rcx
lea    (%rcx,%rax,8),%rdi
mov    0x160(%rsp),%rdx
call   1040 <memcpy@plt>
mov    (%rsp),%rcx
mov    0x8(%rsp),%rsi
movapd 0x7cb(%rip),%xmm13
movapd 0x7b2(%rip),%xmm12
movsd  0x7d1(%rip),%xmm11
movapd 0x7a0(%rip),%xmm10
movsd  0x7b7(%rip),%xmm9
jmp    1800 <snip2d+0x6d0>
mov    %r15,%rdi
add    $0x178,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @snip2d(double* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = mul nsw i32 %2, %1
%6 = sext i32 %5 to i64
%7 = shl nsw i64 %6, 3
%8 = tail call i8* @malloc(i64 %7)
%9 = bitcast i8* %8 to double*
%10 = icmp sgt i32 %3, 0
br i1 %10, label %11, label %225
11: ; preds = %4
%12 = zext i32 %3 to i64
%13 = sext i32 %2 to i64
%14 = add i32 %2, 1
%15 = mul i32 %14, %3
%16 = xor i32 %2, -1
%17 = add i32 %2, -1
%18 = mul i32 %3, -2
%19 = add i32 %18, %17
%20 = sext i32 %1 to i64
%21 = zext i32 %3 to i64
%22 = mul nsw i64 %12, -2
%23 = add nsw i64 %22, %13
br label %24
24: ; preds = %11, %221
%25 = phi i64 [ 0, %11 ], [ %223, %221 ]
%26 = phi i64 [ %12, %11 ], [ %222, %221 ]
%27 = shl nuw nsw i64 %25, 1
%28 = add i64 %23, %27
%29 = trunc i64 %25 to i32
%30 = mul i32 %16, %29
%31 = add i32 %15, %30
%32 = trunc i64 %25 to i32
%33 = shl i32 %32, 1
%34 = add i32 %19, %33
%35 = zext i32 %34 to i64
%36 = shl nuw nsw i64 %35, 3
%37 = add nuw nsw i64 %36, 8
%38 = sub nsw i64 %20, %26
%39 = icmp slt i64 %26, %38
br i1 %39, label %40, label %221
40: ; preds = %24
%41 = sub nsw i64 %13, %26
%42 = icmp slt i64 %26, %41
%43 = icmp ult i64 %28, 2
%44 = and i64 %28, -2
%45 = add i64 %26, %44
%46 = icmp eq i64 %28, %44
br label %52
47: ; preds = %202
br i1 %39, label %48, label %221
48: ; preds = %47
%49 = sub nsw i64 %13, %26
%50 = icmp slt i64 %26, %49
%51 = trunc i64 %26 to i32
br label %205
52: ; preds = %40, %202
%53 = phi i64 [ %26, %40 ], [ %203, %202 ]
%54 = sub nsw i64 %53, %26
%55 = mul nsw i64 %54, %13
%56 = mul nsw i64 %53, %13
%57 = add nsw i64 %53, %26
%58 = mul nsw i64 %57, %13
br i1 %42, label %59, label %202
59: ; preds = %52
br i1 %43, label %134, label %60
60: ; preds = %59, %60
%61 = phi i64 [ %131, %60 ], [ 0, %59 ]
%62 = add i64 %26, %61
%63 = add nsw i64 %61, %55
%64 = getelementptr inbounds double, double* %0, i64 %63
%65 = bitcast double* %64 to <2 x double>*
%66 = load <2 x double>, <2 x double>* %65
%67 = add nsw i64 %62, %55
%68 = getelementptr inbounds double, double* %0, i64 %67
%69 = bitcast double* %68 to <2 x double>*
%70 = load <2 x double>, <2 x double>* %69
%71 = add nsw i64 %62, %26
%72 = add nsw i64 %71, %55
%73 = getelementptr inbounds double, double* %0, i64 %72
%74 = bitcast double* %73 to <2 x double>*
%75 = load <2 x double>, <2 x double>* %74
%76 = add nsw i64 %61, %56
%77 = getelementptr inbounds double, double* %0, i64 %76
%78 = bitcast double* %77 to <2 x double>*
%79 = load <2 x double>, <2 x double>* %78
%80 = add nsw i64 %71, %56
%81 = getelementptr inbounds double, double* %0, i64 %80
%82 = bitcast double* %81 to <2 x double>*
%83 = load <2 x double>, <2 x double>* %82
%84 = add nsw i64 %61, %58
%85 = getelementptr inbounds double, double* %0, i64 %84
%86 = bitcast double* %85 to <2 x double>*
%87 = load <2 x double>, <2 x double>* %86
%88 = add nsw i64 %62, %58
%89 = getelementptr inbounds double, double* %0, i64 %88
%90 = bitcast double* %89 to <2 x double>*
%91 = load <2 x double>, <2 x double>* %90
%92 = add nsw i64 %71, %58
%93 = getelementptr inbounds double, double* %0, i64 %92
%94 = bitcast double* %93 to <2 x double>*
%95 = load <2 x double>, <2 x double>* %94
%96 = fadd <2 x double> %87, %95
%97 = fmul <2 x double> %96, <double 5.000000e-01, double 5.000000e-01>
%98 = fcmp ogt <2 x double> %91, %97
%99 = select <2 x i1> %98, <2 x double> %91, <2 x double> %97
%100 = fsub <2 x double> %99, %97
%101 = fadd <2 x double> %75, %95
%102 = fmul <2 x double> %101, <double 5.000000e-01, double 5.000000e-01>
%103 = fcmp ogt <2 x double> %83, %102
%104 = select <2 x i1> %103, <2 x double> %83, <2 x double> %102
%105 = fsub <2 x double> %104, %102
%106 = fadd <2 x double> %66, %87
%107 = fmul <2 x double> %106, <double 5.000000e-01, double 5.000000e-01>
%108 = fcmp ogt <2 x double> %79, %107
%109 = select <2 x i1> %108, <2 x double> %79, <2 x double> %107
%110 = fsub <2 x double> %109, %107
%111 = fadd <2 x double> %66, %75
%112 = fmul <2 x double> %111, <double 5.000000e-01, double 5.000000e-01>
%113 = fcmp ogt <2 x double> %70, %112
%114 = select <2 x i1> %113, <2 x double> %70, <2 x double> %112
%115 = fsub <2 x double> %114, %112
%116 = add nsw i64 %62, %56
%117 = getelementptr inbounds double, double* %0, i64 %116
%118 = bitcast double* %117 to <2 x double>*
%119 = load <2 x double>, <2 x double>* %118
%120 = fadd <2 x double> %100, %105
%121 = fadd <2 x double> %110, %120
%122 = fadd <2 x double> %115, %121
%123 = fadd <2 x double> %87, %101
%124 = fadd <2 x double> %66, %123
%125 = fmul <2 x double> %124, <double 2.500000e-01, double 2.500000e-01>
%126 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %122, <2 x double> <double 5.000000e-01, double 5.000000e-01>, <2 x double> %125)
%127 = fcmp olt <2 x double> %119, %126
%128 = select <2 x i1> %127, <2 x double> %119, <2 x double> %126
%129 = getelementptr inbounds double, double* %9, i64 %116
%130 = bitcast double* %129 to <2 x double>*
store <2 x double> %128, <2 x double>* %130
%131 = add nuw i64 %61, 2
%132 = icmp eq i64 %131, %44
br i1 %132, label %133, label %60
133: ; preds = %60
br i1 %46, label %202, label %134
134: ; preds = %59, %133
%135 = phi i64 [ %26, %59 ], [ %45, %133 ]
br label %136
136: ; preds = %134, %136
%137 = phi i64 [ %200, %136 ], [ %135, %134 ]
%138 = sub nsw i64 %137, %26
%139 = add nsw i64 %138, %55
%140 = getelementptr inbounds double, double* %0, i64 %139
%141 = load double, double* %140
%142 = add nsw i64 %137, %55
%143 = getelementptr inbounds double, double* %0, i64 %142
%144 = load double, double* %143
%145 = add nsw i64 %137, %26
%146 = add nsw i64 %145, %55
%147 = getelementptr inbounds double, double* %0, i64 %146
%148 = load double, double* %147
%149 = add nsw i64 %138, %56
%150 = getelementptr inbounds double, double* %0, i64 %149
%151 = load double, double* %150
%152 = add nsw i64 %145, %56
%153 = getelementptr inbounds double, double* %0, i64 %152
%154 = load double, double* %153
%155 = add nsw i64 %138, %58
%156 = getelementptr inbounds double, double* %0, i64 %155
%157 = load double, double* %156
%158 = add nsw i64 %137, %58
%159 = getelementptr inbounds double, double* %0, i64 %158
%160 = load double, double* %159
%161 = add nsw i64 %145, %58
%162 = getelementptr inbounds double, double* %0, i64 %161
%163 = load double, double* %162
%164 = fadd double %157, %163
%165 = fmul double %164, 5.000000e-01
%166 = fcmp ogt double %160, %165
%167 = select i1 %166, double %160, double %165
%168 = fsub double %167, %165
%169 = fadd double %148, %163
%170 = fmul double %169, 5.000000e-01
%171 = fcmp ogt double %154, %170
%172 = select i1 %171, double %154, double %170
%173 = fsub double %172, %170
%174 = insertelement <2 x double> poison, double %141, i64 0
%175 = shufflevector <2 x double> %174, <2 x double> poison, <2 x i32> zeroinitializer
%176 = insertelement <2 x double> poison, double %148, i64 0
%177 = insertelement <2 x double> %176, double %157, i64 1
%178 = fadd <2 x double> %175, %177
%179 = fmul <2 x double> %178, <double 5.000000e-01, double 5.000000e-01>
%180 = insertelement <2 x double> poison, double %144, i64 0
%181 = insertelement <2 x double> %180, double %151, i64 1
%182 = fcmp ogt <2 x double> %181, %179
%183 = select <2 x i1> %182, <2 x double> %181, <2 x double> %179
%184 = fsub <2 x double> %183, %179
%185 = add nsw i64 %137, %56
%186 = getelementptr inbounds double, double* %0, i64 %185
%187 = load double, double* %186
%188 = fadd double %168, %173
%189 = extractelement <2 x double> %184, i64 1
%190 = fadd double %189, %188
%191 = extractelement <2 x double> %184, i64 0
%192 = fadd double %191, %190
%193 = fadd double %157, %169
%194 = fadd double %141, %193
%195 = fmul double %194, 2.500000e-01
%196 = tail call double @llvm.fmuladd.f64(double %192, double 5.000000e-01, double %195)
%197 = fcmp olt double %187, %196
%198 = select i1 %197, double %187, double %196
%199 = getelementptr inbounds double, double* %9, i64 %185
store double %198, double* %199
%200 = add nsw i64 %137, 1
%201 = icmp slt i64 %200, %41
br i1 %201, label %136, label %202
202: ; preds = %136, %133, %52
%203 = add nsw i64 %53, 1
%204 = icmp slt i64 %203, %38
br i1 %204, label %52, label %47
205: ; preds = %48, %216
%206 = phi i32 [ 0, %48 ], [ %220, %216 ]
%207 = phi i32 [ %51, %48 ], [ %217, %216 ]
%208 = mul i32 %206, %2
%209 = add i32 %31, %208
%210 = sext i32 %209 to i64
br i1 %50, label %211, label %216
211: ; preds = %205
%212 = shl nsw i64 %210, 3
%213 = getelementptr i8, i8* %8, i64 %212
%214 = getelementptr double, double* %0, i64 %210
%215 = bitcast double* %214 to i8*
br label %216
216: ; preds = %211, %205
%217 = add nsw i32 %207, 1
%218 = sext i32 %217 to i64
%219 = icmp sgt i64 %38, %218
%220 = add i32 %206, 1
br i1 %219, label %205, label %221
221: ; preds = %216, %24, %47
%222 = add nsw i64 %26, -1
%223 = add nuw nsw i64 %25, 1
%224 = icmp eq i64 %223, %21
br i1 %224, label %225, label %24
225: ; preds = %221, %4
tail call void @free(i8* %8)
ret void
}