unsigned u2Fit(double *u, unsigned len, double *F, unsigned char *inl,
               double th, double ths, unsigned iters) {
  double dth = (ths - th) / (iters - 1);
  unsigned iter, i, no_i;
  int *inlI = (int *)malloc(len * sizeof(int));
  double *Ds = (double *)malloc(len * sizeof(double));
  double *buffer = (double *)malloc(9 * len * sizeof(double));
  for (iter = 0; iter < iters; ++iter) {
    FDs(u, F, Ds, len);
    no_i = 0;
    for (i = 0; i < len; ++i) {
      if (Ds[i] < ths) {
        inl[i] = 1;
        ++no_i;
      } else {
        inl[i] = 0;
      }
    }
    if (no_i < 8) {
      free(inlI);
      free(Ds);
      free(buffer);
      return no_i;
    }
    no_i = 0;
    for (i = 0; i < len; ++i) {
      if (inl[i]) {
        inlI[no_i++] = i;
      }
    }
    u2f(u, inlI, no_i, F, buffer);
    ths -= dth;
  }
  FDs(u, F, Ds, len);
  no_i = 0;
  for (i = 0; i < len; ++i) {
    if (Ds[i] < th) {
      inl[i] = 1;
      ++no_i;
    } else {
      inl[i] = 0;
    }
  }
  free(inlI);
  free(Ds);
  free(buffer);
  return no_i;
}


x86 assembly (clang, -O0):
<u2Fit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movsd  %xmm0,-0x30(%rbp)
movsd  %xmm1,-0x38(%rbp)
mov    %r8d,-0x3c(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
subsd  %xmm1,%xmm0
mov    -0x3c(%rbp),%eax
add    $0xffffffff,%eax
cvtsi2sd %rax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%edi
shl    $0x2,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x60(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%edi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x68(%rbp)
imul   $0x9,-0x14(%rbp),%eax
mov    %eax,%eax
mov    %eax,%edi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x70(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jae    1315 <u2Fit+0x1d5>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x0,%al
call   1060 <FDs@plt>
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    1255 <u2Fit+0x115>
mov    -0x68(%rbp),%rax
mov    -0x50(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x38(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1237 <u2Fit+0xf7>
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%ecx
movb   $0x1,(%rax,%rcx,1)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1242 <u2Fit+0x102>
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
jmp    1247 <u2Fit+0x107>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11f7 <u2Fit+0xb7>
cmpl   $0x8,-0x54(%rbp)
jae    1285 <u2Fit+0x145>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
mov    -0x54(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    13b8 <u2Fit+0x278>
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    12da <u2Fit+0x19a>
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%ecx
cmpb   $0x0,(%rax,%rcx,1)
je     12c7 <u2Fit+0x187>
mov    -0x50(%rbp),%edx
mov    -0x60(%rbp),%rax
mov    -0x54(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x54(%rbp)
mov    %ecx,%ecx
mov    %edx,(%rax,%rcx,4)
jmp    12cc <u2Fit+0x18c>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1293 <u2Fit+0x153>
mov    -0x10(%rbp),%rdi
mov    -0x60(%rbp),%rsi
mov    -0x54(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x70(%rbp),%r8
mov    $0x0,%al
call   1040 <u2f@plt>
movsd  -0x48(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    11c7 <u2Fit+0x87>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x0,%al
call   1060 <FDs@plt>
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    1397 <u2Fit+0x257>
mov    -0x68(%rbp),%rax
mov    -0x50(%rbp),%ecx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1379 <u2Fit+0x239>
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%ecx
movb   $0x1,(%rax,%rcx,1)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1384 <u2Fit+0x244>
mov    -0x28(%rbp),%rax
mov    -0x50(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
jmp    1389 <u2Fit+0x249>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1339 <u2Fit+0x1f9>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
mov    -0x54(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u2Fit>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %r8d,%r13d
movapd %xmm1,0x30(%rsp)
movapd %xmm0,0x50(%rsp)
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,0x20(%rsp)
mov    %esi,%r12d
lea    0x0(,%r12,4),%rdi
call   1050 <malloc@plt>
mov    %rax,0x8(%rsp)
lea    0x0(,%r12,8),%rdi
call   1050 <malloc@plt>
mov    %rax,%r15
lea    0x0(%rbp,%rbp,8),%edi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,0x48(%rsp)
mov    %r13d,0x2c(%rsp)
mov    %r13d,%eax
mov    0x20(%rsp),%rdi
sub    $0x1,%eax
mov    %rbp,0x10(%rsp)
jae    11f4 <u2Fit+0xb4>
mov    0x10(%rsp),%r13
xor    %ebp,%ebp
mov    %r14,%rsi
mov    %r15,%rdx
mov    %r13d,%ecx
xor    %eax,%eax
call   1060 <FDs@plt>
test   %r13d,%r13d
mov    0x8(%rsp),%rsi
je     17e3 <u2Fit+0x6a3>
cmpl   $0x4,0x10(%rsp)
jae    15b1 <u2Fit+0x471>
xor    %eax,%eax
xor    %ebp,%ebp
jmp    17b0 <u2Fit+0x670>
movapd 0x30(%rsp),%xmm1
subsd  0x50(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,0x80(%rsp)
mov    %r12d,%eax
and    $0xfffffffc,%eax
mov    %rax,0x78(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0x70(%rsp)
mov    %rax,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
mov    %rcx,%rax
mov    %rcx,0x68(%rsp)
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0x60(%rsp)
mov    %r12d,%r13d
and    $0xfffffffe,%r13d
xor    %eax,%eax
mov    %r13,0x18(%rsp)
jmp    129d <u2Fit+0x15d>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %edx,%edx
mov    %r14,%rcx
mov    0x48(%rsp),%r8
xor    %eax,%eax
mov    %rdi,%rbp
call   1040 <u2f@plt>
mov    %rbp,%rdi
movapd 0x30(%rsp),%xmm0
subsd  0x80(%rsp),%xmm0
movapd %xmm0,0x30(%rsp)
mov    0x20(%rsp),%eax
add    $0x1,%eax
cmp    0x2c(%rsp),%eax
je     11bb <u2Fit+0x7b>
mov    %eax,0x20(%rsp)
mov    %r12,%r13
mov    %rdi,%r12
mov    %r14,%rsi
mov    %r15,%rdx
mov    0x10(%rsp),%rbp
mov    %ebp,%ecx
xor    %eax,%eax
call   1060 <FDs@plt>
test   %ebp,%ebp
je     17dc <u2Fit+0x69c>
cmp    $0x4,%ebp
jae    12f0 <u2Fit+0x1b0>
xor    %eax,%eax
xor    %ebp,%ebp
mov    0x8(%rsp),%rsi
movapd 0x30(%rsp),%xmm8
mov    %r12,%rdi
mov    %r13,%r12
mov    0x18(%rsp),%r13
jmp    14f0 <u2Fit+0x3b0>
nopl   0x0(%rax,%rax,1)
movapd 0x30(%rsp),%xmm8
movapd %xmm8,%xmm2
unpcklpd %xmm8,%xmm2
cmpq   $0x0,0x70(%rsp)
movdqa 0xcf1(%rip),%xmm7
xorpd  %xmm0,%xmm0
je     158b <u2Fit+0x44b>
mov    0x60(%rsp),%rcx
xor    %eax,%eax
xorpd  %xmm1,%xmm1
mov    0x8(%rsp),%rsi
mov    %r12,%rdi
mov    %r13,%r12
mov    0x18(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd (%r15,%rax,8),%xmm4
movupd 0x10(%r15,%rax,8),%xmm3
cmpltpd %xmm2,%xmm4
movq   %xmm4,%rdx
movzbl %dl,%edx
movdqa %xmm4,%xmm5
punpckhqdq %xmm4,%xmm5
movq   %xmm5,%rbp
shl    $0x8,%ebp
or     %edx,%ebp
movd   %ebp,%xmm5
pand   %xmm7,%xmm5
cmpltpd %xmm2,%xmm3
movq   %xmm3,%rdx
movzbl %dl,%edx
movdqa %xmm3,%xmm6
punpckhqdq %xmm3,%xmm6
movq   %xmm6,%rbp
shl    $0x8,%ebp
or     %edx,%ebp
movd   %ebp,%xmm6
pand   %xmm7,%xmm6
shufps $0xe8,%xmm4,%xmm4
psubd  %xmm4,%xmm0
shufps $0xe8,%xmm3,%xmm3
psubd  %xmm3,%xmm1
movd   %xmm5,%edx
mov    %dx,(%rbx,%rax,1)
movd   %xmm6,%edx
mov    %dx,0x2(%rbx,%rax,1)
movupd 0x20(%r15,%rax,8),%xmm4
movupd 0x30(%r15,%rax,8),%xmm3
cmpltpd %xmm2,%xmm4
movq   %xmm4,%rdx
movzbl %dl,%edx
movdqa %xmm4,%xmm5
punpckhqdq %xmm4,%xmm5
movq   %xmm5,%rbp
shl    $0x8,%ebp
or     %edx,%ebp
movd   %ebp,%xmm5
pand   %xmm7,%xmm5
cmpltpd %xmm2,%xmm3
movq   %xmm3,%rdx
movzbl %dl,%edx
movdqa %xmm3,%xmm6
punpckhqdq %xmm3,%xmm6
movq   %xmm6,%rbp
shl    $0x8,%ebp
or     %edx,%ebp
movd   %ebp,%xmm6
pand   %xmm7,%xmm6
shufps $0xe8,%xmm4,%xmm4
psubd  %xmm4,%xmm0
shufps $0xe8,%xmm3,%xmm3
psubd  %xmm3,%xmm1
movd   %xmm5,%edx
mov    %dx,0x4(%rbx,%rax,1)
movd   %xmm6,%edx
mov    %dx,0x6(%rbx,%rax,1)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rcx
jne    1340 <u2Fit+0x200>
testb  $0x1,0x68(%rsp)
je     14cb <u2Fit+0x38b>
movupd (%r15,%rax,8),%xmm4
movupd 0x10(%r15,%rax,8),%xmm3
cmpltpd %xmm2,%xmm4
movq   %xmm4,%rcx
movzbl %cl,%ecx
movdqa %xmm4,%xmm5
punpckhqdq %xmm4,%xmm5
movq   %xmm5,%rdx
shl    $0x8,%edx
or     %ecx,%edx
movd   %edx,%xmm5
pand   %xmm7,%xmm5
cmpltpd %xmm2,%xmm3
movq   %xmm3,%rcx
movzbl %cl,%ecx
movdqa %xmm3,%xmm2
punpckhqdq %xmm3,%xmm2
movq   %xmm2,%rdx
shl    $0x8,%edx
or     %ecx,%edx
movd   %edx,%xmm2
pand   %xmm7,%xmm2
shufps $0xe8,%xmm4,%xmm4
psubd  %xmm4,%xmm0
shufps $0xe8,%xmm3,%xmm3
psubd  %xmm3,%xmm1
movd   %xmm5,%ecx
mov    %cx,(%rbx,%rax,1)
movd   %xmm2,%ecx
mov    %cx,0x2(%rbx,%rax,1)
paddd  %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%ebp
mov    0x78(%rsp),%rcx
mov    %rcx,%rax
cmp    %r12,%rcx
je     150a <u2Fit+0x3ca>
nopl   0x0(%rax)
xor    %ecx,%ecx
ucomisd (%r15,%rax,8),%xmm8
seta   %cl
seta   (%rbx,%rax,1)
add    %ecx,%ebp
add    $0x1,%rax
cmp    %rax,%r12
jne    14f0 <u2Fit+0x3b0>
cmp    $0x8,%ebp
jb     17e3 <u2Fit+0x6a3>
mov    0x10(%rsp),%rax
test   %eax,%eax
je     1260 <u2Fit+0x120>
cmp    $0x1,%eax
jne    1550 <u2Fit+0x410>
xor    %eax,%eax
xor    %edx,%edx
test   $0x1,%r12b
je     1262 <u2Fit+0x122>
cmpb   $0x0,(%rbx,%rax,1)
je     1262 <u2Fit+0x122>
mov    %edx,%ecx
add    $0x1,%edx
mov    %eax,(%rsi,%rcx,4)
jmp    1262 <u2Fit+0x122>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
xor    %edx,%edx
jmp    1569 <u2Fit+0x429>
cs nopw 0x0(%rax,%rax,1)
add    $0x2,%rax
cmp    %rax,%r13
je     1529 <u2Fit+0x3e9>
cmpb   $0x0,(%rbx,%rax,1)
je     1577 <u2Fit+0x437>
mov    %edx,%ecx
add    $0x1,%edx
mov    %eax,(%rsi,%rcx,4)
cmpb   $0x0,0x1(%rbx,%rax,1)
je     1560 <u2Fit+0x420>
mov    %edx,%ecx
add    $0x1,%edx
lea    0x1(%rax),%ebp
mov    %ebp,(%rsi,%rcx,4)
jmp    1560 <u2Fit+0x420>
xor    %eax,%eax
xorpd  %xmm1,%xmm1
mov    0x8(%rsp),%rsi
mov    %r12,%rdi
mov    %r13,%r12
mov    0x18(%rsp),%r13
testb  $0x1,0x68(%rsp)
jne    144f <u2Fit+0x30f>
jmp    14cb <u2Fit+0x38b>
mov    %r12d,%eax
and    $0xfffffffc,%eax
movapd 0x50(%rsp),%xmm2
unpcklpd %xmm2,%xmm2
lea    -0x4(%rax),%rcx
mov    %rcx,%r8
shr    $0x2,%r8
add    $0x1,%r8
test   %rcx,%rcx
je     1811 <u2Fit+0x6d1>
mov    %r8,%rdx
and    $0xfffffffffffffffe,%rdx
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
movdqa 0xa12(%rip),%xmm3
xorpd  %xmm1,%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd (%r15,%rcx,8),%xmm5
movupd 0x10(%r15,%rcx,8),%xmm4
cmpltpd %xmm2,%xmm5
movq   %xmm5,%rdi
movzbl %dil,%edi
movdqa %xmm5,%xmm6
punpckhqdq %xmm5,%xmm6
movq   %xmm6,%rbp
shl    $0x8,%ebp
or     %edi,%ebp
movd   %ebp,%xmm6
pand   %xmm3,%xmm6
cmpltpd %xmm2,%xmm4
movq   %xmm4,%rdi
movzbl %dil,%edi
movdqa %xmm4,%xmm7
punpckhqdq %xmm4,%xmm7
movq   %xmm7,%rbp
shl    $0x8,%ebp
or     %edi,%ebp
movd   %ebp,%xmm7
pand   %xmm3,%xmm7
shufps $0xe8,%xmm5,%xmm5
psubd  %xmm5,%xmm0
shufps $0xe8,%xmm4,%xmm4
psubd  %xmm4,%xmm1
movd   %xmm6,%edi
mov    %di,(%rbx,%rcx,1)
movd   %xmm7,%edi
mov    %di,0x2(%rbx,%rcx,1)
movupd 0x20(%r15,%rcx,8),%xmm5
movupd 0x30(%r15,%rcx,8),%xmm4
cmpltpd %xmm2,%xmm5
movq   %xmm5,%rdi
movzbl %dil,%edi
movdqa %xmm5,%xmm6
punpckhqdq %xmm5,%xmm6
movq   %xmm6,%rbp
shl    $0x8,%ebp
or     %edi,%ebp
movd   %ebp,%xmm6
pand   %xmm3,%xmm6
cmpltpd %xmm2,%xmm4
movq   %xmm4,%rdi
movzbl %dil,%edi
movdqa %xmm4,%xmm7
punpckhqdq %xmm4,%xmm7
movq   %xmm7,%rbp
shl    $0x8,%ebp
or     %edi,%ebp
movd   %ebp,%xmm7
pand   %xmm3,%xmm7
shufps $0xe8,%xmm5,%xmm5
psubd  %xmm5,%xmm0
shufps $0xe8,%xmm4,%xmm4
psubd  %xmm4,%xmm1
movd   %xmm6,%edi
mov    %di,0x4(%rbx,%rcx,1)
movd   %xmm7,%edi
mov    %di,0x6(%rbx,%rcx,1)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rdx
jne    1600 <u2Fit+0x4c0>
test   $0x1,%r8b
je     179a <u2Fit+0x65a>
movupd (%r15,%rcx,8),%xmm4
movupd 0x10(%r15,%rcx,8),%xmm3
cmpltpd %xmm2,%xmm4
movq   %xmm4,%rdx
movzbl %dl,%edx
movdqa %xmm4,%xmm5
punpckhqdq %xmm4,%xmm5
movq   %xmm5,%rdi
shl    $0x8,%edi
or     %edx,%edi
movd   %edi,%xmm5
movdqa 0x8b2(%rip),%xmm6
pand   %xmm6,%xmm5
cmpltpd %xmm2,%xmm3
movq   %xmm3,%rdx
movzbl %dl,%edx
movdqa %xmm3,%xmm2
punpckhqdq %xmm3,%xmm2
movq   %xmm2,%rdi
shl    $0x8,%edi
or     %edx,%edi
movd   %edi,%xmm2
pand   %xmm6,%xmm2
shufps $0xe8,%xmm4,%xmm4
psubd  %xmm4,%xmm0
shufps $0xe8,%xmm3,%xmm3
psubd  %xmm3,%xmm1
movd   %xmm5,%edx
mov    %dx,(%rbx,%rcx,1)
movd   %xmm2,%edx
mov    %dx,0x2(%rbx,%rcx,1)
paddd  %xmm1,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%ebp
cmp    %r12,%rax
je     17e3 <u2Fit+0x6a3>
movapd 0x50(%rsp),%xmm0
cs nopw 0x0(%rax,%rax,1)
xor    %ecx,%ecx
ucomisd (%r15,%rax,8),%xmm0
seta   %cl
seta   (%rbx,%rax,1)
add    %ecx,%ebp
add    $0x1,%rax
cmp    %rax,%r12
jne    17c0 <u2Fit+0x680>
jmp    17e3 <u2Fit+0x6a3>
xor    %ebp,%ebp
mov    0x8(%rsp),%rsi
mov    %rsi,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    0x48(%rsp),%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
xorpd  %xmm1,%xmm1
test   $0x1,%r8b
jne    1716 <u2Fit+0x5d6>
jmp    179a <u2Fit+0x65a>

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

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