void remap_laf(double *restrict dst_array, double missval, long dst_size,
               long num_links, double *restrict map_wts, long num_wts,
               const int *restrict dst_add, const int *restrict src_add,
               const double *restrict src_array) {
  long i, n, k, ncls, imax;
  long max_cls;
  double wts;
  double *src_cls;
  double *src_wts;
  for (i = 0; i < dst_size; ++i)
    dst_array[i] = missval;
  if (num_links == 0)
    return;
  max_cls = get_max_add(num_links, dst_size, dst_add);
  src_cls = (double *)Malloc(
      __func__,
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/remaplib.c",
      1285, (max_cls * sizeof(double)));
  src_wts = (double *)Malloc(
      __func__,
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/remaplib.c",
      1286, (max_cls * sizeof(double)));
  for (n = 0; n < num_links; ++n)
    if ((((dst_array[dst_add[n]]) != (dst_array[dst_add[n]])) ||
                 ((missval) != (missval))
             ? (((dst_array[dst_add[n]]) != (dst_array[dst_add[n]])) &&
                        ((missval) != (missval))
                    ? 1
                    : 0)
             : !(dst_array[dst_add[n]] < missval ||
                 missval < dst_array[dst_add[n]])))
      dst_array[dst_add[n]] = 0.0;
  for (i = 0; i < dst_size; ++i) {
    memset(src_cls, 0, max_cls * sizeof(double));
    memset(src_wts, 0, max_cls * sizeof(double));
    {
      long min_add = 1, max_add = 0;
      n = binary_search_int(dst_add, num_links, (int)i);
      if (n >= 0 && n < num_links) {
        min_add = n;
        for (n = min_add + 1; n < num_links; ++n)
          if (i != dst_add[n])
            break;
        max_add = n;
        for (n = min_add; n > 0; --n)
          if (i != dst_add[n - 1])
            break;
        min_add = n;
      }
      ncls = 0;
      for (n = min_add; n < max_add; ++n) {
        for (k = 0; k < ncls; ++k)
          if ((!(src_array[src_add[n]] < src_cls[k] ||
                 src_cls[k] < src_array[src_add[n]])))
            break;
        if (k == ncls) {
          src_cls[k] = src_array[src_add[n]];
          ncls++;
        }
        src_wts[k] += map_wts[num_wts * n];
      }
    }
    if (ncls) {
      imax = 0;
      wts = src_wts[0];
      for (k = 1; k < ncls; ++k) {
        if (src_wts[k] > wts) {
          wts = src_wts[k];
          imax = k;
        }
      }
      dst_array[i] = src_cls[imax];
    }
  }
  Free(__func__,
       "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
       "2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/remaplib.c",
       1390, (src_cls));
  Free(__func__,
       "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
       "2022-01-22/02-19-57/repos/AZed/cdo/refs/heads/master/src/remaplib.c",
       1391, (src_wts));
}


x86 assembly (clang, -O0):
<remap_laf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
movq   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    11b9 <remap_laf+0x69>
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x40(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    1188 <remap_laf+0x38>
cmpq   $0x0,-0x20(%rbp)
jne    11c9 <remap_laf+0x79>
jmp    16d1 <remap_laf+0x581>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    $0x0,%al
call   1060 <get_max_add@plt>
cltq
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rcx
shl    $0x3,%rcx
lea    0xe0f(%rip),%rdi
lea    0xe12(%rip),%rsi
mov    $0x505,%edx
mov    $0x0,%al
call   1030 <Malloc@plt>
cltq
mov    %rax,-0x78(%rbp)
mov    -0x68(%rbp),%rcx
shl    $0x3,%rcx
lea    0xde7(%rip),%rdi
lea    0xdea(%rip),%rsi
mov    $0x506,%edx
mov    $0x0,%al
call   1030 <Malloc@plt>
cltq
mov    %rax,-0x80(%rbp)
movq   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    1383 <remap_laf+0x233>
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    -0x48(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    -0x48(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jne    1299 <remap_laf+0x149>
jp     1299 <remap_laf+0x149>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    1299 <remap_laf+0x149>
jp     1299 <remap_laf+0x149>
jmp    130d <remap_laf+0x1bd>
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    -0x48(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    -0x48(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jne    12d4 <remap_laf+0x184>
jp     12d4 <remap_laf+0x184>
jmp    12fe <remap_laf+0x1ae>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    12ef <remap_laf+0x19f>
jp     12ef <remap_laf+0x19f>
jmp    12fe <remap_laf+0x1ae>
mov    $0x1,%al
test   $0x1,%al
jne    1355 <remap_laf+0x205>
jmp    136d <remap_laf+0x21d>
xor    %eax,%eax
test   $0x1,%al
jne    1355 <remap_laf+0x205>
jmp    136d <remap_laf+0x21d>
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    -0x48(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
ja     136d <remap_laf+0x21d>
movsd  -0x10(%rbp),%xmm1
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    -0x48(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
ja     136d <remap_laf+0x21d>
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    -0x48(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1372 <remap_laf+0x222>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    123a <remap_laf+0xea>
movq   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1695 <remap_laf+0x545>
mov    -0x78(%rbp),%rdi
mov    -0x68(%rbp),%rdx
shl    $0x3,%rdx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x80(%rbp),%rdi
mov    -0x68(%rbp),%rdx
shl    $0x3,%rdx
xor    %esi,%esi
call   1040 <memset@plt>
movq   $0x1,-0x88(%rbp)
movq   $0x0,-0x90(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x40(%rbp),%rax
mov    %eax,%edx
mov    $0x0,%al
call   1050 <binary_search_int@plt>
cltq
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jl     14c9 <remap_laf+0x379>
mov    -0x48(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    14c9 <remap_laf+0x379>
mov    -0x48(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x20(%rbp),%rax
jge    1465 <remap_laf+0x315>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    -0x48(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
cmp    %rcx,%rax
je     144f <remap_laf+0x2ff>
jmp    1465 <remap_laf+0x315>
jmp    1454 <remap_laf+0x304>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    1423 <remap_laf+0x2d3>
mov    -0x48(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x88(%rbp),%rax
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jle    14be <remap_laf+0x36e>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    -0x48(%rbp),%rdx
sub    $0x1,%rdx
movslq (%rcx,%rdx,4),%rcx
cmp    %rcx,%rax
je     14a8 <remap_laf+0x358>
jmp    14be <remap_laf+0x36e>
jmp    14ad <remap_laf+0x35d>
mov    -0x48(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x48(%rbp)
jmp    147b <remap_laf+0x32b>
mov    -0x48(%rbp),%rax
mov    %rax,-0x88(%rbp)
movq   $0x0,-0x58(%rbp)
mov    -0x88(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
cmp    -0x90(%rbp),%rax
jge    15e7 <remap_laf+0x497>
movq   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%rax
cmp    -0x58(%rbp),%rax
jge    1576 <remap_laf+0x426>
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rcx
mov    -0x48(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x78(%rbp),%rax
mov    -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
ja     1560 <remap_laf+0x410>
mov    -0x78(%rbp),%rax
mov    -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rcx
mov    -0x48(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
ja     1560 <remap_laf+0x410>
jmp    1576 <remap_laf+0x426>
jmp    1565 <remap_laf+0x415>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    14f5 <remap_laf+0x3a5>
mov    -0x50(%rbp),%rax
cmp    -0x58(%rbp),%rax
jne    15b2 <remap_laf+0x462>
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rcx
mov    -0x48(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x78(%rbp),%rax
mov    -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
imul   -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x80(%rbp),%rax
mov    -0x50(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x48(%rbp)
jmp    14dc <remap_laf+0x38c>
cmpq   $0x0,-0x58(%rbp)
je     167f <remap_laf+0x52f>
movq   $0x0,-0x60(%rbp)
mov    -0x80(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x70(%rbp)
movq   $0x1,-0x50(%rbp)
mov    -0x50(%rbp),%rax
cmp    -0x58(%rbp),%rax
jge    1665 <remap_laf+0x515>
mov    -0x80(%rbp),%rax
mov    -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x70(%rbp),%xmm0
jbe    164f <remap_laf+0x4ff>
mov    -0x80(%rbp),%rax
mov    -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0x60(%rbp)
jmp    1654 <remap_laf+0x504>
mov    -0x50(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    160f <remap_laf+0x4bf>
mov    -0x78(%rbp),%rax
mov    -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x40(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1684 <remap_laf+0x534>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
jmp    138b <remap_laf+0x23b>
mov    -0x78(%rbp),%rcx
lea    0x960(%rip),%rdi
lea    0x963(%rip),%rsi
mov    $0x56e,%edx
mov    $0x0,%al
call   1070 <Free@plt>
mov    -0x80(%rbp),%rcx
lea    0x942(%rip),%rdi
lea    0x945(%rip),%rsi
mov    $0x56f,%edx
mov    $0x0,%al
call   1070 <Free@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remap_laf>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9,(%rsp)
mov    %rdx,%r15
mov    %rsi,%rbp
mov    %rdi,%rbx
mov    0xa8(%rsp),%r9
mov    0xa0(%rsp),%r10
test   %rsi,%rsi
jle    129e <remap_laf+0x14e>
cmp    $0x4,%rbp
jae    1191 <remap_laf+0x41>
xor    %eax,%eax
jmp    1290 <remap_laf+0x140>
mov    %rbp,%rax
and    $0xfffffffffffffffc,%rax
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%edi
and    $0x7,%edi
cmp    $0x1c,%rsi
jae    11c1 <remap_laf+0x71>
xor    %esi,%esi
jmp    1255 <remap_laf+0x105>
and    $0xfffffffffffffff8,%rdx
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
movupd %xmm1,(%rbx,%rsi,8)
movupd %xmm1,0x10(%rbx,%rsi,8)
movupd %xmm1,0x20(%rbx,%rsi,8)
movupd %xmm1,0x30(%rbx,%rsi,8)
movupd %xmm1,0x40(%rbx,%rsi,8)
movupd %xmm1,0x50(%rbx,%rsi,8)
movupd %xmm1,0x60(%rbx,%rsi,8)
movupd %xmm1,0x70(%rbx,%rsi,8)
movupd %xmm1,0x80(%rbx,%rsi,8)
movupd %xmm1,0x90(%rbx,%rsi,8)
movupd %xmm1,0xa0(%rbx,%rsi,8)
movupd %xmm1,0xb0(%rbx,%rsi,8)
movupd %xmm1,0xc0(%rbx,%rsi,8)
movupd %xmm1,0xd0(%rbx,%rsi,8)
movupd %xmm1,0xe0(%rbx,%rsi,8)
movupd %xmm1,0xf0(%rbx,%rsi,8)
add    $0x20,%rsi
add    $0xfffffffffffffff8,%rdx
jne    11d0 <remap_laf+0x80>
test   %rdi,%rdi
je     1284 <remap_laf+0x134>
lea    (%rbx,%rsi,8),%rdx
add    $0x10,%rdx
shl    $0x5,%rdi
xor    %esi,%esi
nopl   0x0(%rax,%rax,1)
movupd %xmm1,-0x10(%rdx,%rsi,1)
movupd %xmm1,(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%rdi
jne    1270 <remap_laf+0x120>
cmp    %rbp,%rax
je     129e <remap_laf+0x14e>
nopl   0x0(%rax)
movsd  %xmm0,(%rbx,%rax,8)
add    $0x1,%rax
cmp    %rax,%rbp
jne    1290 <remap_laf+0x140>
test   %r15,%r15
je     162c <remap_laf+0x4dc>
mov    %r10,0x30(%rsp)
mov    %r9,0x38(%rsp)
mov    %rcx,0x40(%rsp)
mov    %r8,0x48(%rsp)
mov    %r15,%rdi
mov    %rbp,%rsi
mov    (%rsp),%rdx
xor    %eax,%eax
movapd %xmm0,0x50(%rsp)
call   1060 <get_max_add@plt>
movslq %eax,%r14
shl    $0x3,%r14
mov    %rbx,0x18(%rsp)
lea    0xd1b(%rip),%r12
lea    0xd1e(%rip),%r13
mov    %r12,%rdi
mov    %r13,%rsi
mov    $0x505,%edx
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <Malloc@plt>
mov    %eax,0x14(%rsp)
mov    %r12,%rdi
mov    0x18(%rsp),%rbx
mov    %r13,%rsi
mov    $0x506,%edx
mov    %r14,0x28(%rsp)
mov    %r14,%rcx
xor    %eax,%eax
call   1030 <Malloc@plt>
movapd 0x50(%rsp),%xmm1
test   %r15,%r15
jle    1366 <remap_laf+0x216>
cmp    $0x1,%r15
jne    163b <remap_laf+0x4eb>
xor    %ecx,%ecx
test   $0x1,%r15b
je     1366 <remap_laf+0x216>
mov    (%rsp),%rdx
movslq (%rdx,%rcx,4),%rcx
movsd  (%rbx,%rcx,8),%xmm0
ucomisd %xmm0,%xmm1
jp     16b6 <remap_laf+0x566>
ucomisd %xmm1,%xmm0
jne    1366 <remap_laf+0x216>
movq   $0x0,(%rbx,%rcx,8)
movslq 0x14(%rsp),%r12
movslq %eax,%r13
test   %rbp,%rbp
jle    15e6 <remap_laf+0x496>
lea    -0x1(%r15),%r10
xor    %r14d,%r14d
mov    %r15,0x8(%rsp)
mov    %rbp,0x20(%rsp)
jmp    13b7 <remap_laf+0x267>
xor    %edx,%edx
movsd  (%r12,%rdx,8),%xmm0
mov    0x18(%rsp),%rax
movsd  %xmm0,(%rax,%r14,8)
nopl   (%rax)
add    $0x1,%r14
mov    0x20(%rsp),%rbp
cmp    %rbp,%r14
mov    0x8(%rsp),%r15
je     15e6 <remap_laf+0x496>
mov    %r12,%rdi
xor    %esi,%esi
mov    0x28(%rsp),%rbx
mov    %rbx,%rdx
mov    %r10,%rbp
call   1040 <memset@plt>
mov    %r13,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1040 <memset@plt>
mov    (%rsp),%rdi
mov    %r15,%rsi
mov    %r14d,%edx
xor    %eax,%eax
call   1050 <binary_search_int@plt>
mov    %rbp,%r10
test   %eax,%eax
mov    0x48(%rsp),%r8
mov    0x40(%rsp),%r9
mov    0x38(%rsp),%rbp
mov    0x30(%rsp),%rbx
js     13a0 <remap_laf+0x250>
movslq %eax,%rdx
cmp    0x8(%rsp),%rdx
jge    13a0 <remap_laf+0x250>
mov    %rdx,%rax
mov    (%rsp),%rdi
cs nopw 0x0(%rax,%rax,1)
cmp    %rax,%r10
je     1440 <remap_laf+0x2f0>
movslq 0x4(%rdi,%rax,4),%rcx
add    $0x1,%rax
cmp    %rcx,%r14
je     1420 <remap_laf+0x2d0>
jmp    1445 <remap_laf+0x2f5>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x8(%rsp),%rax
test   %rdx,%rdx
mov    $0x0,%ecx
cmovs  %rdx,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
test   %rdx,%rdx
jle    147a <remap_laf+0x32a>
movslq -0x4(%rdi,%rdx,4),%rsi
add    $0xffffffffffffffff,%rdx
cmp    %rsi,%r14
je     1460 <remap_laf+0x310>
add    $0x1,%rdx
mov    %rdx,%rcx
cmp    %rax,%rcx
jge    13a0 <remap_laf+0x250>
xor    %edx,%edx
jmp    14c8 <remap_laf+0x378>
nopw   0x0(%rax,%rax,1)
movslq (%rbx,%rcx,4),%rdi
movsd  0x0(%rbp,%rdi,8),%xmm0
movsd  %xmm0,(%r12,%rdx,8)
add    $0x1,%rdx
mov    %rcx,%rdi
imul   %r8,%rdi
movsd  (%r9,%rdi,8),%xmm0
addsd  0x0(%r13,%rsi,8),%xmm0
movsd  %xmm0,0x0(%r13,%rsi,8)
add    $0x1,%rcx
cmp    %rax,%rcx
je     1510 <remap_laf+0x3c0>
test   %rdx,%rdx
jle    1500 <remap_laf+0x3b0>
movslq (%rbx,%rcx,4),%rsi
movsd  0x0(%rbp,%rsi,8),%xmm0
xor    %esi,%esi
nopl   0x0(%rax)
ucomisd (%r12,%rsi,8),%xmm0
je     1502 <remap_laf+0x3b2>
add    $0x1,%rsi
cmp    %rsi,%rdx
jne    14e0 <remap_laf+0x390>
mov    %rdx,%rsi
jmp    1490 <remap_laf+0x340>
cs nopw 0x0(%rax,%rax,1)
xor    %esi,%esi
cmp    %rdx,%rsi
je     1490 <remap_laf+0x340>
jmp    14a4 <remap_laf+0x354>
nopl   0x0(%rax)
test   %rdx,%rdx
je     13a0 <remap_laf+0x250>
cmp    $0x2,%rdx
jl     138a <remap_laf+0x23a>
movsd  0x0(%r13),%xmm0
lea    -0x1(%rdx),%rsi
add    $0xfffffffffffffffe,%rdx
mov    %esi,%eax
and    $0x3,%eax
cmp    $0x3,%rdx
jae    1545 <remap_laf+0x3f5>
mov    $0x1,%ecx
xor    %edx,%edx
jmp    15b1 <remap_laf+0x461>
and    $0xfffffffffffffffc,%rsi
mov    $0x1,%ecx
xor    %edx,%edx
movsd  0x0(%r13,%rcx,8),%xmm1
ucomisd %xmm0,%xmm1
cmova  %rcx,%rdx
movsd  0x8(%r13,%rcx,8),%xmm2
maxsd  %xmm0,%xmm1
ucomisd %xmm1,%xmm2
lea    0x1(%rcx),%rdi
cmovbe %rdx,%rdi
maxsd  %xmm1,%xmm2
movsd  0x10(%r13,%rcx,8),%xmm1
ucomisd %xmm2,%xmm1
lea    0x2(%rcx),%rdx
cmovbe %rdi,%rdx
maxsd  %xmm2,%xmm1
movsd  0x18(%r13,%rcx,8),%xmm0
ucomisd %xmm1,%xmm0
lea    0x3(%rcx),%rdi
cmova  %rdi,%rdx
maxsd  %xmm1,%xmm0
add    $0x4,%rcx
cmp    %rsi,%rdi
jne    1550 <remap_laf+0x400>
test   %rax,%rax
je     138c <remap_laf+0x23c>
nopw   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rcx,8),%xmm1
ucomisd %xmm0,%xmm1
cmova  %rcx,%rdx
maxsd  %xmm0,%xmm1
add    $0x1,%rcx
movapd %xmm1,%xmm0
add    $0xffffffffffffffff,%rax
jne    15c0 <remap_laf+0x470>
jmp    138c <remap_laf+0x23c>
lea    0xa13(%rip),%rbx
lea    0xa16(%rip),%rbp
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x56e,%edx
mov    %r12,%rcx
xor    %eax,%eax
call   1070 <Free@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x56f,%edx
mov    %r13,%rcx
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1070 <Free@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %r15,%rdx
and    $0xfffffffffffffffe,%rdx
xor    %ecx,%ecx
mov    (%rsp),%rdi
jmp    1665 <remap_laf+0x515>
nopw   0x0(%rax,%rax,1)
movq   $0x0,(%rbx,%rsi,8)
add    $0x2,%rcx
cmp    %rcx,%rdx
je     133b <remap_laf+0x1eb>
movslq (%rdi,%rcx,4),%rsi
movsd  (%rbx,%rsi,8),%xmm0
ucomisd %xmm0,%xmm1
jp     169a <remap_laf+0x54a>
ucomisd %xmm1,%xmm0
jne    1682 <remap_laf+0x532>
movq   $0x0,(%rbx,%rsi,8)
movslq 0x4(%rdi,%rcx,4),%rsi
movsd  (%rbx,%rsi,8),%xmm0
ucomisd %xmm0,%xmm1
jp     16a8 <remap_laf+0x558>
ucomisd %xmm1,%xmm0
jne    1658 <remap_laf+0x508>
jmp    1650 <remap_laf+0x500>
ucomisd %xmm1,%xmm1
jnp    1682 <remap_laf+0x532>
ucomisd %xmm0,%xmm0
jp     167a <remap_laf+0x52a>
jmp    1682 <remap_laf+0x532>
ucomisd %xmm1,%xmm1
jnp    1658 <remap_laf+0x508>
ucomisd %xmm0,%xmm0
jp     1650 <remap_laf+0x500>
jmp    1658 <remap_laf+0x508>
ucomisd %xmm1,%xmm1
jnp    1366 <remap_laf+0x216>
ucomisd %xmm0,%xmm0
jp     135e <remap_laf+0x20e>
jmp    1366 <remap_laf+0x216>

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

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