void fast_s(double *X, double *y, int *nn, int *pp, int *NN, int *K,
            int *bbest_r, double *bb, double *rrhoc, double *bbeta,
            double *sscale) {
  void refine_fast_s(double **x, double *y, double *weights, int n, int p,
                     double *res, double *tmp, double *tmp2, double **tmp_mat,
                     double **tmp_mat2, double *beta_cand, int kk, int conv,
                     double b, double rhoc, double *is, double *beta_ref,
                     double *scale);
  int find_max(double *a, int n);
  double find_scale(double *r, double b, double rhoc, double initial_scale,
                    int n, int p);
  double loss_rho(double *r, double s, int n, int p, double rhoc);
  double vecprime_vec(double *a, double *b, int n);
  void sample_n_outof_N(int n, int N, int *x);
  int lu(double **a, int *P, double *x);
  register int i, j, k;
  int n = *nn, p = *pp, Nres = *NN, kk = *K, no_resamples;
  int *b_i, flag, conv;
  double **x, **x_samp, *beta_cand, *beta_ref, *res, aux;
  double b = *bb, rhoc = *rrhoc, sc, worst_sc = 1e+20;
  double **best_betas, *best_scales, *weights;
  int best_r = *bbest_r, pos_worst_scale;
  double *tmp, *tmp2, **tmp_mat2, **tmp_mat, best_sc;
  best_betas = (double **)malloc(best_r * sizeof(double *));
  best_scales = (double *)malloc(best_r * sizeof(double));
  for (i = 0; i < best_r; i++) {
    best_betas[i] = (double *)malloc(p * sizeof(double));
    best_scales[i] = 1e+20;
  };
  pos_worst_scale = 0;
  res = (double *)malloc(n * sizeof(double));
  tmp = (double *)malloc(n * sizeof(double));
  tmp2 = (double *)malloc(n * sizeof(double));
  weights = (double *)malloc(n * sizeof(double));
  beta_cand = (double *)malloc(p * sizeof(double));
  beta_ref = (double *)malloc(p * sizeof(double));
  b_i = (int *)malloc(n * sizeof(int));
  x = (double **)malloc(n * sizeof(double *));
  x_samp = (double **)malloc(n * sizeof(double *));
  tmp_mat = (double **)malloc(p * sizeof(double *));
  tmp_mat2 = (double **)malloc(p * sizeof(double *));
  for (i = 0; i < n; i++) {
    x[i] = (double *)malloc(p * sizeof(double));
    x_samp[i] = (double *)malloc((p + 1) * sizeof(double));
  };
  for (i = 0; i < p; i++) {
    tmp_mat[i] = (double *)malloc(p * sizeof(double));
    tmp_mat2[i] = (double *)malloc((p + 1) * sizeof(double));
  };
  for (i = 0; i < n; i++)
    for (j = 0; j < p; j++)
      x[i][j] = X[j * n + i];
  srand((long)37);
  conv = 0;
  aux = -1.0;
  for (i = 0; i < Nres; i++) {
    flag = 1;
    no_resamples = 0;
    while (flag == 1) {
      if ((++no_resamples) > 500) {
        return;
      };
      sample_n_outof_N(p, n - 1, b_i);
      for (j = 0; j < p; j++) {
        for (k = 0; k < p; k++)
          x_samp[j][k] = x[b_i[j]][k];
        x_samp[j][p] = y[b_i[j]];
      };
      flag = lu(x_samp, pp, beta_cand);
    };
    refine_fast_s(x, y, weights, n, p, res, tmp, tmp2, tmp_mat, tmp_mat2,
                  beta_cand, kk, conv, b, rhoc, &aux, beta_ref, &sc);
    if (fabs(sc) < 1e-10) {
      *sscale = sc;
      for (j = 0; j < p; j++)
        bbeta[j] = beta_cand[j];
      free(best_scales);
      free(tmp);
      free(tmp2);
      free(res);
      free(weights);
      free(beta_cand);
      free(beta_ref);
      free(b_i);
      for (i = 0; i < best_r; i++)
        free(best_betas[i]);
      free(best_betas);
      for (i = 0; i < n; i++) {
        free(x[i]);
        free(x_samp[i]);
      };
      for (i = 0; i < p; i++) {
        free(tmp_mat[i]);
        free(tmp_mat2[i]);
      };
      free(x);
      free(x_samp);
      free(tmp_mat);
      free(tmp_mat2);
      return;
    };
    if (loss_rho(res, worst_sc, n, p, rhoc) < b) {
      sc = find_scale(res, b, rhoc, sc, n, p);
      k = pos_worst_scale;
      best_scales[k] = sc;
      for (j = 0; j < p; j++)
        best_betas[k][j] = beta_ref[j];
      pos_worst_scale = find_max(best_scales, best_r);
      worst_sc = best_scales[pos_worst_scale];
    };
  };
  best_sc = 1e+20;
  conv = 1;
  for (i = 0; i < best_r; i++) {
    refine_fast_s(x, y, weights, n, p, res, tmp, tmp2, tmp_mat, tmp_mat2,
                  best_betas[i], kk, conv, b, rhoc, best_scales + i, beta_ref,
                  &aux);
    if (aux < best_sc) {
      *sscale = best_sc = aux;
      for (j = 0; j < p; j++)
        bbeta[j] = beta_ref[j];
    };
  };
  free(best_scales);
  free(tmp);
  free(tmp2);
  free(res);
  free(weights);
  free(beta_cand);
  free(beta_ref);
  free(b_i);
  for (i = 0; i < best_r; i++)
    free(best_betas[i]);
  free(best_betas);
  for (i = 0; i < n; i++) {
    free(x[i]);
    free(x_samp[i]);
  };
  for (i = 0; i < p; i++) {
    free(tmp_mat[i]);
    free(tmp_mat2[i]);
  };
  free(x);
  free(x_samp);
  free(tmp_mat);
  free(tmp_mat2);
}


x86 assembly (clang, -O0):
<fast_s>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x178,%rsp
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x48(%rbp)
mov    %r8,-0x50(%rbp)
mov    %r9,-0x58(%rbp)
mov    -0x40(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x68(%rbp)
mov    -0x48(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x50(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x70(%rbp)
mov    -0x58(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x74(%rbp)
mov    0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0xde4(%rip),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
mov    0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xf4(%rbp)
movslq -0xf4(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0xe0(%rbp)
movslq -0xf4(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0xe8(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0xf4(%rbp),%eax
jge    12b9 <fast_s+0x129>
movslq -0x6c(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0xe0(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0xe8(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  0xd5a(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1265 <fast_s+0xd5>
movl   $0x0,-0xf8(%rbp)
movslq -0x68(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0xb0(%rbp)
movslq -0x68(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x100(%rbp)
movslq -0x68(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x108(%rbp)
movslq -0x68(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0xf0(%rbp)
movslq -0x6c(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0xa0(%rbp)
movslq -0x6c(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0xa8(%rbp)
movslq -0x68(%rbp),%rdi
shl    $0x2,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x80(%rbp)
movslq -0x68(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x90(%rbp)
movslq -0x68(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x98(%rbp)
movslq -0x6c(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x118(%rbp)
movslq -0x6c(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x110(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x68(%rbp),%eax
jge    1400 <fast_s+0x270>
movslq -0x6c(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0x90(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0x98(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    13a3 <fast_s+0x213>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    1464 <fast_s+0x2d4>
movslq -0x6c(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0x118(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0x110(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1407 <fast_s+0x277>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x68(%rbp),%eax
jge    14d9 <fast_s+0x349>
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    14c6 <fast_s+0x336>
mov    -0x30(%rbp),%rax
mov    -0x60(%rbp),%ecx
imul   -0x68(%rbp),%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x90(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x60(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    147e <fast_s+0x2ee>
jmp    14cb <fast_s+0x33b>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    146b <fast_s+0x2db>
mov    $0x25,%edi
mov    $0x0,%al
call   1070 <srand@plt>
movl   $0x0,-0x88(%rbp)
movsd  0xb11(%rip),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x70(%rbp),%eax
jge    19e9 <fast_s+0x859>
movl   $0x1,-0x84(%rbp)
movl   $0x0,-0x78(%rbp)
cmpl   $0x1,-0x84(%rbp)
jne    1624 <fast_s+0x494>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
cmp    $0x1f4,%eax
jle    1549 <fast_s+0x3b9>
jmp    1ce8 <fast_s+0xb58>
mov    -0x6c(%rbp),%edi
mov    -0x68(%rbp),%esi
sub    $0x1,%esi
mov    -0x80(%rbp),%rdx
call   1040 <sample_n_outof_N@plt>
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    1602 <fast_s+0x472>
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    15c7 <fast_s+0x437>
mov    -0x90(%rbp),%rax
mov    -0x80(%rbp),%rcx
movslq -0x60(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x64(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x98(%rbp),%rax
movslq -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x64(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1575 <fast_s+0x3e5>
mov    -0x38(%rbp),%rax
mov    -0x80(%rbp),%rcx
movslq -0x60(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x98(%rbp),%rax
movslq -0x60(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x6c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1562 <fast_s+0x3d2>
mov    -0x98(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0xa0(%rbp),%rdx
call   1050 <lu@plt>
mov    %eax,-0x84(%rbp)
jmp    1523 <fast_s+0x393>
mov    -0x90(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0xf0(%rbp),%rdx
mov    -0x68(%rbp),%ecx
mov    -0x6c(%rbp),%r8d
mov    -0xb0(%rbp),%r9
mov    -0x100(%rbp),%rax
mov    %rax,-0x138(%rbp)
mov    -0x108(%rbp),%rax
mov    %rax,-0x130(%rbp)
mov    -0x118(%rbp),%r13
mov    -0x110(%rbp),%r12
mov    -0xa0(%rbp),%r15
mov    -0x74(%rbp),%r14d
mov    -0x88(%rbp),%ebx
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm1
ff
mov    -0xa8(%rbp),%r10
lea    -0xb8(%rbp),%r11
lea    -0xd0(%rbp),%rax
mov    %rax,-0x128(%rbp)
mov    -0x138(%rbp),%rax
mov    %rax,(%rsp)
mov    -0x130(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x128(%rbp),%rax
mov    %r13,0x10(%rsp)
mov    %r12,0x18(%rsp)
mov    %r15,0x20(%rsp)
mov    %r14d,0x28(%rsp)
mov    %ebx,0x30(%rsp)
mov    %r11,0x38(%rsp)
mov    %r10,0x40(%rsp)
mov    %rax,0x48(%rsp)
call   1060 <refine_fast_s@plt>
movsd  -0xd0(%rbp),%xmm1
ff
movaps 0x91c(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0x900(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    18d0 <fast_s+0x740>
movsd  -0xd0(%rbp),%xmm0
ff
mov    0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    1768 <fast_s+0x5d8>
mov    -0xa0(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1731 <fast_s+0x5a1>
mov    -0xe8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x100(%rbp),%rdi
call   1030 <free@plt>
mov    -0x108(%rbp),%rdi
call   1030 <free@plt>
mov    -0xb0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xf0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xa0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xa8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x80(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0xf4(%rbp),%eax
jge    17fd <fast_s+0x66d>
mov    -0xe0(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    17cc <fast_s+0x63c>
mov    -0xe0(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x68(%rbp),%eax
jge    1852 <fast_s+0x6c2>
mov    -0x90(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x98(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1810 <fast_s+0x680>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    189b <fast_s+0x70b>
mov    -0x118(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x110(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1859 <fast_s+0x6c9>
mov    -0x90(%rbp),%rdi
call   1030 <free@plt>
mov    -0x98(%rbp),%rdi
call   1030 <free@plt>
mov    -0x118(%rbp),%rdi
call   1030 <free@plt>
mov    -0x110(%rbp),%rdi
call   1030 <free@plt>
jmp    1ce8 <fast_s+0xb58>
mov    -0xb0(%rbp),%rdi
movsd  -0xd8(%rbp),%xmm0
ff
mov    -0x68(%rbp),%esi
mov    -0x6c(%rbp),%edx
movsd  -0xc8(%rbp),%xmm1
ff
call   1090 <loss_rho@plt>
movaps %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    19d6 <fast_s+0x846>
mov    -0xb0(%rbp),%rdi
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm1
ff
movsd  -0xd0(%rbp),%xmm2
ff
mov    -0x68(%rbp),%esi
mov    -0x6c(%rbp),%edx
call   10b0 <find_scale@plt>
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0xf8(%rbp),%eax
mov    %eax,-0x64(%rbp)
movsd  -0xd0(%rbp),%xmm0
ff
mov    -0xe8(%rbp),%rax
movslq -0x64(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    19a3 <fast_s+0x813>
mov    -0xa8(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0xe0(%rbp),%rax
movslq -0x64(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x60(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1961 <fast_s+0x7d1>
mov    -0xe8(%rbp),%rdi
mov    -0xf4(%rbp),%esi
call   10a0 <find_max@plt>
mov    %eax,-0xf8(%rbp)
mov    -0xe8(%rbp),%rax
movslq -0xf8(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
jmp    19db <fast_s+0x84b>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1506 <fast_s+0x376>
movsd  0x60f(%rip),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movl   $0x1,-0x88(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0xf4(%rbp),%eax
jge    1b85 <fast_s+0x9f5>
mov    -0x90(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0xf0(%rbp),%rdx
mov    -0x68(%rbp),%ecx
mov    -0x6c(%rbp),%r8d
mov    -0xb0(%rbp),%r9
mov    -0x100(%rbp),%rax
mov    %rax,-0x150(%rbp)
mov    -0x108(%rbp),%rax
mov    %rax,-0x148(%rbp)
mov    -0x118(%rbp),%r13
mov    -0x110(%rbp),%r12
mov    -0xe0(%rbp),%rax
movslq -0x5c(%rbp),%r10
mov    (%rax,%r10,8),%r15
mov    -0x74(%rbp),%r14d
mov    -0x88(%rbp),%ebx
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm1
ff
mov    -0xe8(%rbp),%r11
movslq -0x5c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r11
mov    -0xa8(%rbp),%r10
lea    -0xb8(%rbp),%rax
mov    %rax,-0x140(%rbp)
mov    -0x150(%rbp),%rax
mov    %rax,(%rsp)
mov    -0x148(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x140(%rbp),%rax
mov    %r13,0x10(%rsp)
mov    %r12,0x18(%rsp)
mov    %r15,0x20(%rsp)
mov    %r14d,0x28(%rsp)
mov    %ebx,0x30(%rsp)
mov    %r11,0x38(%rsp)
mov    %r10,0x40(%rsp)
mov    %rax,0x48(%rsp)
call   1060 <refine_fast_s@plt>
movsd  -0xb8(%rbp),%xmm1
ff
movsd  -0x120(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1b72 <fast_s+0x9e2>
movsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
mov    0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    1b6d <fast_s+0x9dd>
mov    -0xa8(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x28(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1b36 <fast_s+0x9a6>
jmp    1b72 <fast_s+0x9e2>
jmp    1b77 <fast_s+0x9e7>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1a0a <fast_s+0x87a>
mov    -0xe8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x100(%rbp),%rdi
call   1030 <free@plt>
mov    -0x108(%rbp),%rdi
call   1030 <free@plt>
mov    -0xb0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xf0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xa0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xa8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x80(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0xf4(%rbp),%eax
jge    1c1a <fast_s+0xa8a>
mov    -0xe0(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1be9 <fast_s+0xa59>
mov    -0xe0(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x68(%rbp),%eax
jge    1c6f <fast_s+0xadf>
mov    -0x90(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x98(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1c2d <fast_s+0xa9d>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    1cb8 <fast_s+0xb28>
mov    -0x118(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x110(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1c76 <fast_s+0xae6>
mov    -0x90(%rbp),%rdi
call   1030 <free@plt>
mov    -0x98(%rbp),%rdi
call   1030 <free@plt>
mov    -0x118(%rbp),%rdi
call   1030 <free@plt>
mov    -0x110(%rbp),%rdi
call   1030 <free@plt>
add    $0x178,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<fast_s>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x118,%rsp
mov    %rsi,0x90(%rsp)
mov    %rdi,0x98(%rsp)
mov    0x150(%rsp),%rax
mov    0x160(%rsp),%rdi
mov    0x158(%rsp),%rsi
movslq (%rdx),%rdx
mov    %rdx,0xb0(%rsp)
mov    %edx,%edx
mov    %rdx,0x18(%rsp)
mov    %rcx,0x108(%rsp)
movslq (%rcx),%r15
mov    %r15d,%r14d
mov    (%r8),%ecx
mov    %ecx,0xa4(%rsp)
mov    (%r9),%edx
mov    %rdx,0xd8(%rsp)
movsd  (%rsi),%xmm0
movsd  %xmm0,0x78(%rsp)
movsd  (%rdi),%xmm0
movsd  %xmm0,0x28(%rsp)
movslq (%rax),%rbp
lea    0x0(,%rbp,8),%r12
mov    %r12,%rdi
call   1090 <malloc@plt>
mov    %rax,%r13
mov    %r12,%rdi
call   1090 <malloc@plt>
mov    %rax,%r12
lea    0x0(,%r15,8),%rax
mov    %rax,0x8(%rsp)
mov    %ebp,%ebx
test   %rbp,%rbp
jle    1286 <fast_s+0xe6>
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    0x8(%rsp),%rdi
call   1090 <malloc@plt>
mov    %rax,0x0(%r13,%rbp,8)
movabs $0x4415af1d78b58c40,%rax
af 15 44
mov    %rax,(%r12,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1260 <fast_s+0xc0>
mov    %r12,0x48(%rsp)
mov    %rbx,0xa8(%rsp)
mov    %r13,0x40(%rsp)
mov    0xb0(%rsp),%rbx
lea    0x0(,%rbx,8),%r13
mov    %r13,%rdi
call   1090 <malloc@plt>
mov    %rax,0x70(%rsp)
mov    %r13,%rdi
call   1090 <malloc@plt>
mov    %rax,0x50(%rsp)
mov    %r13,%rdi
call   1090 <malloc@plt>
mov    %rax,0x58(%rsp)
mov    %r13,%rdi
call   1090 <malloc@plt>
mov    %rax,0x60(%rsp)
mov    0x8(%rsp),%rbp
mov    %rbp,%rdi
call   1090 <malloc@plt>
mov    %rax,0x68(%rsp)
mov    %rbp,%rdi
call   1090 <malloc@plt>
mov    %rax,0x20(%rsp)
lea    0x0(,%rbx,4),%rdi
call   1090 <malloc@plt>
mov    %rax,0x38(%rsp)
mov    %r13,%rdi
call   1090 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    %r13,%rdi
call   1090 <malloc@plt>
mov    %rax,0x88(%rsp)
mov    %rbp,%rdi
call   1090 <malloc@plt>
mov    %rax,0x80(%rsp)
mov    %rbp,%rdi
call   1090 <malloc@plt>
mov    %rax,0x30(%rsp)
mov    0x18(%rsp),%rbx
test   %ebx,%ebx
jle    1390 <fast_s+0x1f0>
lea    0x8(,%r15,8),%r12
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    0x8(%rsp),%rdi
call   1090 <malloc@plt>
mov    0x10(%rsp),%rcx
mov    %rax,(%rcx,%rbp,8)
mov    %r12,%rdi
call   1090 <malloc@plt>
mov    0x88(%rsp),%rcx
mov    %rax,(%rcx,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1360 <fast_s+0x1c0>
test   %r14d,%r14d
mov    0x30(%rsp),%rbx
jle    13db <fast_s+0x23b>
lea    0x8(,%r14,8),%r12
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x8(%rsp),%rdi
call   1090 <malloc@plt>
mov    0x80(%rsp),%rcx
mov    %rax,(%rcx,%rbp,8)
mov    %r12,%rdi
call   1090 <malloc@plt>
mov    %rax,(%rbx,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r14
jne    13b0 <fast_s+0x210>
mov    0x18(%rsp),%rax
test   %eax,%eax
mov    0xb0(%rsp),%rbx
jle    14ea <fast_s+0x34a>
lea    -0x1(%r14),%r8
mov    %r14d,%ecx
and    $0x3,%ecx
mov    %r14d,%r11d
and    $0xfffffffc,%r11d
mov    %rbx,%r12
shl    $0x4,%r12
mov    %rbx,%rdi
shl    $0x5,%rdi
lea    0x0(,%r13,2),%rbp
add    %r13,%rbp
xor    %r10d,%r10d
mov    0x98(%rsp),%r9
jmp    1446 <fast_s+0x2a6>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r10
add    $0x8,%r9
mov    0x18(%rsp),%rax
cmp    %rax,%r10
je     14ea <fast_s+0x34a>
test   %r14d,%r14d
jle    1430 <fast_s+0x290>
mov    0x10(%rsp),%rax
mov    (%rax,%r10,8),%rax
cmp    $0x3,%r8
jae    1460 <fast_s+0x2c0>
xor    %edx,%edx
jmp    14a7 <fast_s+0x307>
xchg   %ax,%ax
mov    %r9,%rsi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rax,%rdx,8)
movsd  (%rsi,%rbx,8),%xmm0
movsd  %xmm0,0x8(%rax,%rdx,8)
movsd  (%rsi,%r12,1),%xmm0
movsd  %xmm0,0x10(%rax,%rdx,8)
movsd  (%rsi,%rbp,1),%xmm0
movsd  %xmm0,0x18(%rax,%rdx,8)
add    $0x4,%rdx
add    %rdi,%rsi
cmp    %rdx,%r11
jne    1470 <fast_s+0x2d0>
test   %rcx,%rcx
je     1430 <fast_s+0x290>
lea    (%rax,%rdx,8),%rax
imul   %rbx,%rdx
add    %r10,%rdx
mov    0x98(%rsp),%rsi
lea    (%rsi,%rdx,8),%rdx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rdx),%xmm0
movsd  %xmm0,(%rax,%rsi,8)
add    $0x1,%rsi
add    %r13,%rdx
cmp    %rsi,%rcx
jne    14d0 <fast_s+0x330>
jmp    1430 <fast_s+0x290>
xor    %ebx,%ebx
mov    $0x25,%edi
xor    %eax,%eax
call   1070 <srand@plt>
movabs $0xbff0000000000000,%rax
mov    %rax,0xc0(%rsp)
cmpl   $0x0,0xa4(%rsp)
mov    0x10(%rsp),%rdi
mov    0x38(%rsp),%rdx
mov    0x90(%rsp),%rsi
mov    0x70(%rsp),%r9
movsd  0x78(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
jle    1b12 <fast_s+0x972>
mov    0x18(%rsp),%rax
add    $0xffffffff,%eax
mov    %eax,0xc8(%rsp)
mov    0x20(%rsp),%rax
lea    (%rax,%r14,8),%rcx
mov    %rcx,0xf8(%rsp)
mov    %r14d,%ecx
and    $0xfffffffc,%ecx
mov    %rcx,0x8(%rsp)
add    $0xfffffffffffffffc,%rcx
mov    %rcx,0x98(%rsp)
mov    %rcx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%r12d
and    $0x3,%r12d
mov    %rsi,%rcx
mov    %rsi,0xf0(%rsp)
and    $0xfffffffffffffffc,%rsi
mov    %rsi,0xe0(%rsp)
mov    %r14d,%r13d
and    $0x3,%r13d
mov    %r12,0x110(%rsp)
shl    $0x5,%r12
add    $0x10,%rax
mov    %rax,0xe8(%rsp)
movsd  0xa3e(%rip),%xmm0
movsd  %xmm0,0xd0(%rsp)
movl   $0x0,0xa0(%rsp)
mov    %rbx,0x100(%rsp)
xor    %eax,%eax
jmp    163a <fast_s+0x49a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0xcc(%rsp),%ebx
add    $0x1,%ebx
mov    0x108(%rsp),%rsi
mov    0x68(%rsp),%rdx
call   1050 <lu@plt>
mov    0x90(%rsp),%rsi
mov    0x38(%rsp),%rdx
mov    0x10(%rsp),%rdi
cmp    $0x1,%eax
mov    %ebx,%eax
mov    0x70(%rsp),%rbx
movsd  0x78(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
jne    1830 <fast_s+0x690>
cmp    $0x1f4,%eax
je     1db3 <fast_s+0xc13>
mov    %eax,0xcc(%rsp)
mov    %r14d,%edi
mov    0xc8(%rsp),%esi
call   1040 <sample_n_outof_N@plt>
mov    0x90(%rsp),%r11
mov    0x38(%rsp),%r10
mov    0x10(%rsp),%r8
test   %r14d,%r14d
mov    0x88(%rsp),%rdi
jle    15f0 <fast_s+0x450>
xor    %eax,%eax
jmp    16a9 <fast_s+0x509>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%r11,%r9,8),%xmm0
movsd  %xmm0,(%rdx,%r15,8)
add    $0x1,%rax
cmp    %r14,%rax
je     15f0 <fast_s+0x450>
movslq (%r10,%rax,4),%r9
mov    (%r8,%r9,8),%rsi
mov    (%rdi,%rax,8),%rdx
cmp    $0x4,%r15d
jb     16d1 <fast_s+0x531>
lea    (%rsi,%r14,8),%rcx
cmp    %rcx,%rdx
jae    1750 <fast_s+0x5b0>
lea    (%rdx,%r14,8),%rcx
cmp    %rcx,%rsi
jae    1750 <fast_s+0x5b0>
xor    %ebp,%ebp
mov    %rbp,%rcx
not    %rcx
add    %r14,%rcx
test   %r13,%r13
je     1704 <fast_s+0x564>
mov    %r13,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rsi,%rbp,8),%xmm0
movsd  %xmm0,(%rdx,%rbp,8)
add    $0x1,%rbp
add    $0xffffffffffffffff,%rbx
jne    16f0 <fast_s+0x550>
cmp    $0x3,%rcx
jb     1690 <fast_s+0x4f0>
nopw   0x0(%rax,%rax,1)
movsd  (%rsi,%rbp,8),%xmm0
movsd  %xmm0,(%rdx,%rbp,8)
movsd  0x8(%rsi,%rbp,8),%xmm0
movsd  %xmm0,0x8(%rdx,%rbp,8)
movsd  0x10(%rsi,%rbp,8),%xmm0
movsd  %xmm0,0x10(%rdx,%rbp,8)
movsd  0x18(%rsi,%rbp,8),%xmm0
movsd  %xmm0,0x18(%rdx,%rbp,8)
add    $0x4,%rbp
cmp    %rbp,%r14
jne    1710 <fast_s+0x570>
jmp    1690 <fast_s+0x4f0>
nopl   0x0(%rax)
cmpq   $0xc,0x98(%rsp)
jae    175f <fast_s+0x5bf>
xor    %ecx,%ecx
jmp    17cc <fast_s+0x62c>
mov    0xe0(%rsp),%rbp
xor    %ecx,%ecx
nopl   0x0(%rax)
movups (%rsi,%rcx,8),%xmm0
movups 0x10(%rsi,%rcx,8),%xmm1
movups %xmm0,(%rdx,%rcx,8)
movups %xmm1,0x10(%rdx,%rcx,8)
movups 0x20(%rsi,%rcx,8),%xmm0
movups 0x30(%rsi,%rcx,8),%xmm1
movups %xmm0,0x20(%rdx,%rcx,8)
movups %xmm1,0x30(%rdx,%rcx,8)
movups 0x40(%rsi,%rcx,8),%xmm0
movups 0x50(%rsi,%rcx,8),%xmm1
movups %xmm0,0x40(%rdx,%rcx,8)
movups %xmm1,0x50(%rdx,%rcx,8)
movupd 0x60(%rsi,%rcx,8),%xmm0
movupd 0x70(%rsi,%rcx,8),%xmm1
movupd %xmm0,0x60(%rdx,%rcx,8)
movupd %xmm1,0x70(%rdx,%rcx,8)
add    $0x10,%rcx
add    $0xfffffffffffffffc,%rbp
jne    1770 <fast_s+0x5d0>
cmpq   $0x0,0x110(%rsp)
je     1810 <fast_s+0x670>
lea    (%rdx,%rcx,8),%rbp
add    $0x10,%rbp
lea    (%rsi,%rcx,8),%rcx
add    $0x10,%rcx
xor    %ebx,%ebx
nopl   0x0(%rax)
movupd -0x10(%rcx,%rbx,1),%xmm0
movupd (%rcx,%rbx,1),%xmm1
movupd %xmm0,-0x10(%rbp,%rbx,1)
movupd %xmm1,0x0(%rbp,%rbx,1)
add    $0x20,%rbx
cmp    %rbx,%r12
jne    17f0 <fast_s+0x650>
mov    0x8(%rsp),%rcx
mov    %rcx,%rbp
cmp    %r14,%rcx
je     1690 <fast_s+0x4f0>
jmp    16d3 <fast_s+0x533>
cs nopw 0x0(%rax,%rax,1)
mov    0x60(%rsp),%rdx
mov    0x18(%rsp),%rcx
mov    %r14d,%r8d
mov    %rbx,%r9
lea    0xb8(%rsp),%rax
push   %rax
push   0x28(%rsp)
lea    0xd0(%rsp),%rax
push   %rax
push   $0x0
push   0xf8(%rsp)
push   0x90(%rsp)
push   0x60(%rsp)
push   0xb8(%rsp)
push   0x98(%rsp)
push   0x98(%rsp)
call   1060 <refine_fast_s@plt>
add    $0x50,%rsp
movsd  0xb8(%rsp),%xmm0
movapd %xmm0,%xmm1
andpd  0x773(%rip),%xmm1
movsd  0x763(%rip),%xmm2
ucomisd %xmm1,%xmm2
ja     1dc5 <fast_s+0xc25>
mov    %rbx,%rdi
movsd  0xd0(%rsp),%xmm0
mov    0xb0(%rsp),%rsi
mov    %r14d,%edx
movsd  0x28(%rsp),%xmm1
call   10a0 <loss_rho@plt>
movsd  0x78(%rsp),%xmm1
ucomisd %xmm0,%xmm1
movapd %xmm1,%xmm0
jbe    19d0 <fast_s+0x830>
movsd  0xb8(%rsp),%xmm2
mov    %rbx,%rdi
movsd  0x28(%rsp),%xmm1
mov    0x18(%rsp),%rsi
mov    %r14d,%edx
call   10c0 <find_scale@plt>
movsd  %xmm0,0xb8(%rsp)
movslq 0xa0(%rsp),%rax
mov    0x48(%rsp),%rdi
movsd  %xmm0,(%rdi,%rax,8)
test   %r14d,%r14d
mov    0x20(%rsp),%rbp
jle    1ab0 <fast_s+0x910>
mov    0x40(%rsp),%rcx
mov    (%rcx,%rax,8),%rax
cmp    $0x4,%r15d
jb     1957 <fast_s+0x7b7>
cmp    %rax,0xf8(%rsp)
jbe    19d8 <fast_s+0x838>
lea    (%rax,%r14,8),%rcx
cmp    %rcx,%rbp
jae    19d8 <fast_s+0x838>
xor    %ecx,%ecx
mov    %rcx,%rdx
not    %rdx
add    %r14,%rdx
test   $0x3,%r14b
je     1985 <fast_s+0x7e5>
mov    %r13,%rsi
nopl   0x0(%rax,%rax,1)
movsd  0x0(%rbp,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    1970 <fast_s+0x7d0>
cmp    $0x3,%rdx
jb     1ab0 <fast_s+0x910>
nop
movsd  0x0(%rbp,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  0x8(%rbp,%rcx,8),%xmm0
movsd  %xmm0,0x8(%rax,%rcx,8)
movsd  0x10(%rbp,%rcx,8),%xmm0
movsd  %xmm0,0x10(%rax,%rcx,8)
movsd  0x18(%rbp,%rcx,8),%xmm0
movsd  %xmm0,0x18(%rax,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%r14
jne    1990 <fast_s+0x7f0>
jmp    1ab0 <fast_s+0x910>
nopl   (%rax)
mov    %rbx,%r9
jmp    1ae2 <fast_s+0x942>
cmpq   $0xc,0x98(%rsp)
jae    19e7 <fast_s+0x847>
xor    %ecx,%ecx
jmp    1a5d <fast_s+0x8bd>
mov    0xe0(%rsp),%rdx
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movups 0x0(%rbp,%rcx,8),%xmm0
movups 0x10(%rbp,%rcx,8),%xmm1
movups %xmm0,(%rax,%rcx,8)
movups %xmm1,0x10(%rax,%rcx,8)
movups 0x20(%rbp,%rcx,8),%xmm0
movups 0x30(%rbp,%rcx,8),%xmm1
movups %xmm0,0x20(%rax,%rcx,8)
movups %xmm1,0x30(%rax,%rcx,8)
movups 0x40(%rbp,%rcx,8),%xmm0
movups 0x50(%rbp,%rcx,8),%xmm1
movups %xmm0,0x40(%rax,%rcx,8)
movups %xmm1,0x50(%rax,%rcx,8)
movupd 0x60(%rbp,%rcx,8),%xmm0
movupd 0x70(%rbp,%rcx,8),%xmm1
movupd %xmm0,0x60(%rax,%rcx,8)
movupd %xmm1,0x70(%rax,%rcx,8)
add    $0x10,%rcx
add    $0xfffffffffffffffc,%rdx
jne    1a00 <fast_s+0x860>
testb  $0x3,0xf0(%rsp)
03
je     1a9f <fast_s+0x8ff>
lea    (%rax,%rcx,8),%rdx
add    $0x10,%rdx
mov    0xe8(%rsp),%rsi
lea    (%rsi,%rcx,8),%rcx
xor    %esi,%esi
nopl   (%rax)
movupd -0x10(%rcx,%rsi,1),%xmm0
movupd (%rcx,%rsi,1),%xmm1
movupd %xmm0,-0x10(%rdx,%rsi,1)
movupd %xmm1,(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%r12
jne    1a80 <fast_s+0x8e0>
mov    0x8(%rsp),%rdx
mov    %rdx,%rcx
cmp    %r14,%rdx
jne    1959 <fast_s+0x7b9>
mov    0xa8(%rsp),%rsi
mov    %rdi,%rbx
call   10b0 <find_max@plt>
mov    %eax,0xa0(%rsp)
cltq
movsd  (%rbx,%rax,8),%xmm0
movsd  %xmm0,0xd0(%rsp)
mov    0x70(%rsp),%r9
movsd  0x78(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
mov    0x100(%rsp),%rbx
add    $0x1,%ebx
cmp    0xa4(%rsp),%ebx
mov    0x10(%rsp),%rdi
mov    0x38(%rsp),%rdx
mov    0x90(%rsp),%rsi
jne    15d6 <fast_s+0x436>
mov    0xa8(%rsp),%rax
test   %eax,%eax
jle    1cb5 <fast_s+0xb15>
lea    0x0(,%r14,8),%rbx
lea    0x0(,%rax,8),%r15
movsd  0x4c6(%rip),%xmm2
movsd  %xmm2,0x8(%rsp)
xor    %ebp,%ebp
lea    0xc0(%rsp),%r12
mov    0x18(%rsp),%r13
mov    0x48(%rsp),%rax
jmp    1bab <fast_s+0xa0b>
cs nopw 0x0(%rax,%rax,1)
mov    0x168(%rsp),%rdi
mov    0x20(%rsp),%rsi
mov    %rbx,%rdx
movsd  %xmm1,0x8(%rsp)
call   1080 <memcpy@plt>
add    $0x8,%rbp
cmp    %rbp,%r15
mov    0x10(%rsp),%rdi
mov    0x90(%rsp),%rsi
mov    0x48(%rsp),%rax
mov    0x70(%rsp),%r9
movsd  0x78(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
je     1c2c <fast_s+0xa8c>
add    %rbp,%rax
mov    0x60(%rsp),%rdx
mov    %r13d,%ecx
mov    %r14d,%r8d
push   %r12
push   0x28(%rsp)
push   %rax
push   $0x1
push   0xf8(%rsp)
mov    0x68(%rsp),%rax
push   (%rax,%rbp,1)
push   0x60(%rsp)
push   0xb8(%rsp)
push   0x98(%rsp)
push   0x98(%rsp)
call   1060 <refine_fast_s@plt>
add    $0x50,%rsp
movsd  0xc0(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1b7b <fast_s+0x9db>
mov    0x170(%rsp),%rax
movsd  %xmm1,(%rax)
test   %r14d,%r14d
jg     1b60 <fast_s+0x9c0>
movsd  %xmm1,0x8(%rsp)
jmp    1b7b <fast_s+0x9db>
mov    %rax,%rdi
mov    %r9,%rbx
call   1030 <free@plt>
mov    0x50(%rsp),%rdi
call   1030 <free@plt>
mov    0x58(%rsp),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x60(%rsp),%rdi
call   1030 <free@plt>
mov    0x68(%rsp),%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    0x38(%rsp),%rdi
call   1030 <free@plt>
mov    0xa8(%rsp),%r15
test   %r15d,%r15d
mov    0x30(%rsp),%r12
mov    0x40(%rsp),%rbp
jle    1d16 <fast_s+0xb76>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    0x0(%rbp,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1ca0 <fast_s+0xb00>
jmp    1d16 <fast_s+0xb76>
mov    0x48(%rsp),%rdi
mov    %rdx,%rbx
mov    %r9,%rbp
call   1030 <free@plt>
mov    0x50(%rsp),%rdi
call   1030 <free@plt>
mov    0x58(%rsp),%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0x60(%rsp),%rdi
call   1030 <free@plt>
mov    0x68(%rsp),%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%r13
mov    0x30(%rsp),%r12
mov    0x40(%rsp),%rbp
mov    %rbp,%rdi
call   1030 <free@plt>
test   %r13d,%r13d
mov    0x10(%rsp),%r15
mov    0x88(%rsp),%rbx
jle    1d5b <fast_s+0xbbb>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r15,%rbp,8),%rdi
call   1030 <free@plt>
mov    (%rbx,%rbp,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbp
cmp    %rbp,%r13
jne    1d40 <fast_s+0xba0>
test   %r14d,%r14d
mov    0x80(%rsp),%r13
jle    1d8c <fast_s+0xbec>
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    0x0(%r13,%rbp,8),%rdi
call   1030 <free@plt>
mov    (%r12,%rbp,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1d70 <fast_s+0xbd0>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    0x88(%rsp),%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
add    $0x118,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x170(%rsp),%rax
movsd  %xmm0,(%rax)
test   %r14d,%r14d
mov    0x68(%rsp),%rbx
jle    1df3 <fast_s+0xc53>
lea    0x0(,%r14,8),%rdx
mov    0x168(%rsp),%rdi
mov    %rbx,%rsi
call   1080 <memcpy@plt>
mov    0x48(%rsp),%rdi
call   1030 <free@plt>
mov    0x50(%rsp),%rdi
call   1030 <free@plt>
mov    0x58(%rsp),%rdi
call   1030 <free@plt>
mov    0x70(%rsp),%rdi
call   1030 <free@plt>
mov    0x60(%rsp),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    0x38(%rsp),%rdi
call   1030 <free@plt>
mov    0xa8(%rsp),%rbp
test   %ebp,%ebp
mov    0x18(%rsp),%r15
mov    0x80(%rsp),%r13
mov    0x40(%rsp),%r12
jle    1e82 <fast_s+0xce2>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r12,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1e70 <fast_s+0xcd0>
mov    %r12,%rdi
call   1030 <free@plt>
test   %r15d,%r15d
mov    0x10(%rsp),%r15
mov    0x88(%rsp),%r12
jle    1ecb <fast_s+0xd2b>
mov    0xb0(%rsp),%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r15,%rbp,8),%rdi
call   1030 <free@plt>
mov    (%r12,%rbp,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1eb0 <fast_s+0xd10>
test   %r14d,%r14d
mov    0x30(%rsp),%r12
jle    1d8c <fast_s+0xbec>
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    0x0(%r13,%rbp,8),%rdi
call   1030 <free@plt>
mov    (%r12,%rbp,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbp
cmp    %rbp,%r14
jne    1ee0 <fast_s+0xd40>
jmp    1d8c <fast_s+0xbec>

LLVM IR (-O0):
define void @fast_s(double* %0, double* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %6, double* %7, double* %8, double* %9, double* %10) {
%12 = alloca double*
%13 = alloca double*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca i32*
%18 = alloca i32*
%19 = alloca double*
%20 = alloca double*
%21 = alloca double*
%22 = alloca double*
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32*
%32 = alloca i32
%33 = alloca i32
%34 = alloca double**
%35 = alloca double**
%36 = alloca double*
%37 = alloca double*
%38 = alloca double*
%39 = alloca double
%40 = alloca double
%41 = alloca double
%42 = alloca double
%43 = alloca double
%44 = alloca double**
%45 = alloca double*
%46 = alloca double*
%47 = alloca i32
%48 = alloca i32
%49 = alloca double*
%50 = alloca double*
%51 = alloca double**
%52 = alloca double**
%53 = alloca double
store double* %0, double** %12
store double* %1, double** %13
store i32* %2, i32** %14
store i32* %3, i32** %15
store i32* %4, i32** %16
store i32* %5, i32** %17
store i32* %6, i32** %18
store double* %7, double** %19
store double* %8, double** %20
store double* %9, double** %21
store double* %10, double** %22
%54 = load i32*, i32** %14
%55 = load i32, i32* %54
store i32 %55, i32* %26
%56 = load i32*, i32** %15
%57 = load i32, i32* %56
store i32 %57, i32* %27
%58 = load i32*, i32** %16
%59 = load i32, i32* %58
store i32 %59, i32* %28
%60 = load i32*, i32** %17
%61 = load i32, i32* %60
store i32 %61, i32* %29
%62 = load double*, double** %19
%63 = load double, double* %62
store double %63, double* %40
%64 = load double*, double** %20
%65 = load double, double* %64
store double %65, double* %41
store double 1.000000e+20, double* %43
%66 = load i32*, i32** %18
%67 = load i32, i32* %66
store i32 %67, i32* %47
%68 = load i32, i32* %47
%69 = sext i32 %68 to i64
%70 = mul i64 %69, 8
%71 = call i8* @malloc(i64 %70)
%72 = bitcast i8* %71 to double**
store double** %72, double*** %44
%73 = load i32, i32* %47
%74 = sext i32 %73 to i64
%75 = mul i64 %74, 8
%76 = call i8* @malloc(i64 %75)
%77 = bitcast i8* %76 to double*
store double* %77, double** %45
store i32 0, i32* %23
br label %78
78: ; preds = %96, %11
%79 = load i32, i32* %23
%80 = load i32, i32* %47
%81 = icmp slt i32 %79, %80
br i1 %81, label %82, label %99
82: ; preds = %78
%83 = load i32, i32* %27
%84 = sext i32 %83 to i64
%85 = mul i64 %84, 8
%86 = call i8* @malloc(i64 %85)
%87 = bitcast i8* %86 to double*
%88 = load double**, double*** %44
%89 = load i32, i32* %23
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds double*, double** %88, i64 %90
store double* %87, double** %91
%92 = load double*, double** %45
%93 = load i32, i32* %23
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds double, double* %92, i64 %94
store double 1.000000e+20, double* %95
br label %96
96: ; preds = %82
%97 = load i32, i32* %23
%98 = add nsw i32 %97, 1
store i32 %98, i32* %23
br label %78
99: ; preds = %78
store i32 0, i32* %48
%100 = load i32, i32* %26
%101 = sext i32 %100 to i64
%102 = mul i64 %101, 8
%103 = call i8* @malloc(i64 %102)
%104 = bitcast i8* %103 to double*
store double* %104, double** %38
%105 = load i32, i32* %26
%106 = sext i32 %105 to i64
%107 = mul i64 %106, 8
%108 = call i8* @malloc(i64 %107)
%109 = bitcast i8* %108 to double*
store double* %109, double** %49
%110 = load i32, i32* %26
%111 = sext i32 %110 to i64
%112 = mul i64 %111, 8
%113 = call i8* @malloc(i64 %112)
%114 = bitcast i8* %113 to double*
store double* %114, double** %50
%115 = load i32, i32* %26
%116 = sext i32 %115 to i64
%117 = mul i64 %116, 8
%118 = call i8* @malloc(i64 %117)
%119 = bitcast i8* %118 to double*
store double* %119, double** %46
%120 = load i32, i32* %27
%121 = sext i32 %120 to i64
%122 = mul i64 %121, 8
%123 = call i8* @malloc(i64 %122)
%124 = bitcast i8* %123 to double*
store double* %124, double** %36
%125 = load i32, i32* %27
%126 = sext i32 %125 to i64
%127 = mul i64 %126, 8
%128 = call i8* @malloc(i64 %127)
%129 = bitcast i8* %128 to double*
store double* %129, double** %37
%130 = load i32, i32* %26
%131 = sext i32 %130 to i64
%132 = mul i64 %131, 4
%133 = call i8* @malloc(i64 %132)
%134 = bitcast i8* %133 to i32*
store i32* %134, i32** %31
%135 = load i32, i32* %26
%136 = sext i32 %135 to i64
%137 = mul i64 %136, 8
%138 = call i8* @malloc(i64 %137)
%139 = bitcast i8* %138 to double**
store double** %139, double*** %34
%140 = load i32, i32* %26
%141 = sext i32 %140 to i64
%142 = mul i64 %141, 8
%143 = call i8* @malloc(i64 %142)
%144 = bitcast i8* %143 to double**
store double** %144, double*** %35
%145 = load i32, i32* %27
%146 = sext i32 %145 to i64
%147 = mul i64 %146, 8
%148 = call i8* @malloc(i64 %147)
%149 = bitcast i8* %148 to double**
store double** %149, double*** %52
%150 = load i32, i32* %27
%151 = sext i32 %150 to i64
%152 = mul i64 %151, 8
%153 = call i8* @malloc(i64 %152)
%154 = bitcast i8* %153 to double**
store double** %154, double*** %51
store i32 0, i32* %23
br label %155
155: ; preds = %179, %99
%156 = load i32, i32* %23
%157 = load i32, i32* %26
%158 = icmp slt i32 %156, %157
br i1 %158, label %159, label %182
159: ; preds = %155
%160 = load i32, i32* %27
%161 = sext i32 %160 to i64
%162 = mul i64 %161, 8
%163 = call i8* @malloc(i64 %162)
%164 = bitcast i8* %163 to double*
%165 = load double**, double*** %34
%166 = load i32, i32* %23
%167 = sext i32 %166 to i64
%168 = getelementptr inbounds double*, double** %165, i64 %167
store double* %164, double** %168
%169 = load i32, i32* %27
%170 = add nsw i32 %169, 1
%171 = sext i32 %170 to i64
%172 = mul i64 %171, 8
%173 = call i8* @malloc(i64 %172)
%174 = bitcast i8* %173 to double*
%175 = load double**, double*** %35
%176 = load i32, i32* %23
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds double*, double** %175, i64 %177
store double* %174, double** %178
br label %179
179: ; preds = %159
%180 = load i32, i32* %23
%181 = add nsw i32 %180, 1
store i32 %181, i32* %23
br label %155
182: ; preds = %155
store i32 0, i32* %23
br label %183
183: ; preds = %207, %182
%184 = load i32, i32* %23
%185 = load i32, i32* %27
%186 = icmp slt i32 %184, %185
br i1 %186, label %187, label %210
187: ; preds = %183
%188 = load i32, i32* %27
%189 = sext i32 %188 to i64
%190 = mul i64 %189, 8
%191 = call i8* @malloc(i64 %190)
%192 = bitcast i8* %191 to double*
%193 = load double**, double*** %52
%194 = load i32, i32* %23
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds double*, double** %193, i64 %195
store double* %192, double** %196
%197 = load i32, i32* %27
%198 = add nsw i32 %197, 1
%199 = sext i32 %198 to i64
%200 = mul i64 %199, 8
%201 = call i8* @malloc(i64 %200)
%202 = bitcast i8* %201 to double*
%203 = load double**, double*** %51
%204 = load i32, i32* %23
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds double*, double** %203, i64 %205
store double* %202, double** %206
br label %207
207: ; preds = %187
%208 = load i32, i32* %23
%209 = add nsw i32 %208, 1
store i32 %209, i32* %23
br label %183
210: ; preds = %183
store i32 0, i32* %23
br label %211
211: ; preds = %242, %210
%212 = load i32, i32* %23
%213 = load i32, i32* %26
%214 = icmp slt i32 %212, %213
br i1 %214, label %215, label %245
215: ; preds = %211
store i32 0, i32* %24
br label %216
216: ; preds = %238, %215
%217 = load i32, i32* %24
%218 = load i32, i32* %27
%219 = icmp slt i32 %217, %218
br i1 %219, label %220, label %241
220: ; preds = %216
%221 = load double*, double** %12
%222 = load i32, i32* %24
%223 = load i32, i32* %26
%224 = mul nsw i32 %222, %223
%225 = load i32, i32* %23
%226 = add nsw i32 %224, %225
%227 = sext i32 %226 to i64
%228 = getelementptr inbounds double, double* %221, i64 %227
%229 = load double, double* %228
%230 = load double**, double*** %34
%231 = load i32, i32* %23
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds double*, double** %230, i64 %232
%234 = load double*, double** %233
%235 = load i32, i32* %24
%236 = sext i32 %235 to i64
%237 = getelementptr inbounds double, double* %234, i64 %236
store double %229, double* %237
br label %238
238: ; preds = %220
%239 = load i32, i32* %24
%240 = add nsw i32 %239, 1
store i32 %240, i32* %24
br label %216
241: ; preds = %216
br label %242
242: ; preds = %241
%243 = load i32, i32* %23
%244 = add nsw i32 %243, 1
store i32 %244, i32* %23
br label %211
245: ; preds = %211
%246 = call i32 (i64, ...) bitcast (i32 (...)* @srand to i32 (i64, ...)*)(i64 37)
store i32 0, i32* %33
store double -1.000000e+00, double* %39
store i32 0, i32* %23
br label %247
247: ; preds = %503, %245
%248 = load i32, i32* %23
%249 = load i32, i32* %28
%250 = icmp slt i32 %248, %249
br i1 %250, label %251, label %506
251: ; preds = %247
store i32 1, i32* %32
store i32 0, i32* %30
br label %252
252: ; preds = %320, %251
%253 = load i32, i32* %32
%254 = icmp eq i32 %253, 1
br i1 %254, label %255, label %325
255: ; preds = %252
%256 = load i32, i32* %30
%257 = add nsw i32 %256, 1
store i32 %257, i32* %30
%258 = icmp sgt i32 %257, 500
br i1 %258, label %259, label %260
259: ; preds = %255
br label %648
260: ; preds = %255
%261 = load i32, i32* %27
%262 = load i32, i32* %26
%263 = sub nsw i32 %262, 1
%264 = load i32*, i32** %31
store i32 0, i32* %24
br label %265
265: ; preds = %317, %260
%266 = load i32, i32* %24
%267 = load i32, i32* %27
%268 = icmp slt i32 %266, %267
br i1 %268, label %269, label %320
269: ; preds = %265
store i32 0, i32* %25
br label %270
270: ; preds = %296, %269
%271 = load i32, i32* %25
%272 = load i32, i32* %27
%273 = icmp slt i32 %271, %272
br i1 %273, label %274, label %299
274: ; preds = %270
%275 = load double**, double*** %34
%276 = load i32*, i32** %31
%277 = load i32, i32* %24
%278 = sext i32 %277 to i64
%279 = getelementptr inbounds i32, i32* %276, i64 %278
%280 = load i32, i32* %279
%281 = sext i32 %280 to i64
%282 = getelementptr inbounds double*, double** %275, i64 %281
%283 = load double*, double** %282
%284 = load i32, i32* %25
%285 = sext i32 %284 to i64
%286 = getelementptr inbounds double, double* %283, i64 %285
%287 = load double, double* %286
%288 = load double**, double*** %35
%289 = load i32, i32* %24
%290 = sext i32 %289 to i64
%291 = getelementptr inbounds double*, double** %288, i64 %290
%292 = load double*, double** %291
%293 = load i32, i32* %25
%294 = sext i32 %293 to i64
%295 = getelementptr inbounds double, double* %292, i64 %294
store double %287, double* %295
br label %296
296: ; preds = %274
%297 = load i32, i32* %25
%298 = add nsw i32 %297, 1
store i32 %298, i32* %25
br label %270
299: ; preds = %270
%300 = load double*, double** %13
%301 = load i32*, i32** %31
%302 = load i32, i32* %24
%303 = sext i32 %302 to i64
%304 = getelementptr inbounds i32, i32* %301, i64 %303
%305 = load i32, i32* %304
%306 = sext i32 %305 to i64
%307 = getelementptr inbounds double, double* %300, i64 %306
%308 = load double, double* %307
%309 = load double**, double*** %35
%310 = load i32, i32* %24
%311 = sext i32 %310 to i64
%312 = getelementptr inbounds double*, double** %309, i64 %311
%313 = load double*, double** %312
%314 = load i32, i32* %27
%315 = sext i32 %314 to i64
%316 = getelementptr inbounds double, double* %313, i64 %315
store double %308, double* %316
br label %317
317: ; preds = %299
%318 = load i32, i32* %24
%319 = add nsw i32 %318, 1
store i32 %319, i32* %24
br label %265
320: ; preds = %265
%321 = load double**, double*** %35
%322 = load i32*, i32** %15
%323 = load double*, double** %36
%324 = call i32 @lu(double** %321, i32* %322, double* %323)
store i32 %324, i32* %32
br label %252
325: ; preds = %252
%326 = load double**, double*** %34
%327 = load double*, double** %13
%328 = load double*, double** %46
%329 = load i32, i32* %26
%330 = load i32, i32* %27
%331 = load double*, double** %38
%332 = load double*, double** %49
%333 = load double*, double** %50
%334 = load double**, double*** %52
%335 = load double**, double*** %51
%336 = load double*, double** %36
%337 = load i32, i32* %29
%338 = load i32, i32* %33
%339 = load double, double* %40
%340 = load double, double* %41
%341 = load double*, double** %37
%342 = load double, double* %42
%343 = call double @llvm.fabs.f64(double %342)
%344 = fcmp olt double %343, 1.000000e-10
br i1 %344, label %345, label %449
345: ; preds = %325
%346 = load double, double* %42
%347 = load double*, double** %22
store double %346, double* %347
store i32 0, i32* %24
br label %348
348: ; preds = %362, %345
%349 = load i32, i32* %24
%350 = load i32, i32* %27
%351 = icmp slt i32 %349, %350
br i1 %351, label %352, label %365
352: ; preds = %348
%353 = load double*, double** %36
%354 = load i32, i32* %24
%355 = sext i32 %354 to i64
%356 = getelementptr inbounds double, double* %353, i64 %355
%357 = load double, double* %356
%358 = load double*, double** %21
%359 = load i32, i32* %24
%360 = sext i32 %359 to i64
%361 = getelementptr inbounds double, double* %358, i64 %360
store double %357, double* %361
br label %362
362: ; preds = %352
%363 = load i32, i32* %24
%364 = add nsw i32 %363, 1
store i32 %364, i32* %24
br label %348
365: ; preds = %348
%366 = load double*, double** %45
%367 = bitcast double* %366 to i8*
%368 = load double*, double** %49
%369 = bitcast double* %368 to i8*
%370 = load double*, double** %50
%371 = bitcast double* %370 to i8*
%372 = load double*, double** %38
%373 = bitcast double* %372 to i8*
%374 = load double*, double** %46
%375 = bitcast double* %374 to i8*
%376 = load double*, double** %36
%377 = bitcast double* %376 to i8*
%378 = load double*, double** %37
%379 = bitcast double* %378 to i8*
%380 = load i32*, i32** %31
%381 = bitcast i32* %380 to i8*
store i32 0, i32* %23
br label %382
382: ; preds = %393, %365
%383 = load i32, i32* %23
%384 = load i32, i32* %47
%385 = icmp slt i32 %383, %384
br i1 %385, label %386, label %396
386: ; preds = %382
%387 = load double**, double*** %44
%388 = load i32, i32* %23
%389 = sext i32 %388 to i64
%390 = getelementptr inbounds double*, double** %387, i64 %389
%391 = load double*, double** %390
%392 = bitcast double* %391 to i8*
br label %393
393: ; preds = %386
%394 = load i32, i32* %23
%395 = add nsw i32 %394, 1
store i32 %395, i32* %23
br label %382
396: ; preds = %382
%397 = load double**, double*** %44
%398 = bitcast double** %397 to i8*
store i32 0, i32* %23
br label %399
399: ; preds = %416, %396
%400 = load i32, i32* %23
%401 = load i32, i32* %26
%402 = icmp slt i32 %400, %401
br i1 %402, label %403, label %419
403: ; preds = %399
%404 = load double**, double*** %34
%405 = load i32, i32* %23
%406 = sext i32 %405 to i64
%407 = getelementptr inbounds double*, double** %404, i64 %406
%408 = load double*, double** %407
%409 = bitcast double* %408 to i8*
%410 = load double**, double*** %35
%411 = load i32, i32* %23
%412 = sext i32 %411 to i64
%413 = getelementptr inbounds double*, double** %410, i64 %412
%414 = load double*, double** %413
%415 = bitcast double* %414 to i8*
br label %416
416: ; preds = %403
%417 = load i32, i32* %23
%418 = add nsw i32 %417, 1
store i32 %418, i32* %23
br label %399
419: ; preds = %399
store i32 0, i32* %23
br label %420
420: ; preds = %437, %419
%421 = load i32, i32* %23
%422 = load i32, i32* %27
%423 = icmp slt i32 %421, %422
br i1 %423, label %424, label %440
424: ; preds = %420
%425 = load double**, double*** %52
%426 = load i32, i32* %23
%427 = sext i32 %426 to i64
%428 = getelementptr inbounds double*, double** %425, i64 %427
%429 = load double*, double** %428
%430 = bitcast double* %429 to i8*
%431 = load double**, double*** %51
%432 = load i32, i32* %23
%433 = sext i32 %432 to i64
%434 = getelementptr inbounds double*, double** %431, i64 %433
%435 = load double*, double** %434
%436 = bitcast double* %435 to i8*
br label %437
437: ; preds = %424
%438 = load i32, i32* %23
%439 = add nsw i32 %438, 1
store i32 %439, i32* %23
br label %420
440: ; preds = %420
%441 = load double**, double*** %34
%442 = bitcast double** %441 to i8*
%443 = load double**, double*** %35
%444 = bitcast double** %443 to i8*
%445 = load double**, double*** %52
%446 = bitcast double** %445 to i8*
%447 = load double**, double*** %51
%448 = bitcast double** %447 to i8*
br label %648
449: ; preds = %325
%450 = load double*, double** %38
%451 = load double, double* %43
%452 = load i32, i32* %26
%453 = load i32, i32* %27
%454 = load double, double* %41
%455 = call double @loss_rho(double* %450, double %451, i32 %452, i32 %453, double %454)
%456 = load double, double* %40
%457 = fcmp olt double %455, %456
br i1 %457, label %458, label %502
458: ; preds = %449
%459 = load double*, double** %38
%460 = load double, double* %40
%461 = load double, double* %41
%462 = load double, double* %42
%463 = load i32, i32* %26
%464 = load i32, i32* %27
%465 = call double @find_scale(double* %459, double %460, double %461, double %462, i32 %463, i32 %464)
store double %465, double* %42
%466 = load i32, i32* %48
store i32 %466, i32* %25
%467 = load double, double* %42
%468 = load double*, double** %45
%469 = load i32, i32* %25
%470 = sext i32 %469 to i64
%471 = getelementptr inbounds double, double* %468, i64 %470
store double %467, double* %471
store i32 0, i32* %24
br label %472
472: ; preds = %490, %458
%473 = load i32, i32* %24
%474 = load i32, i32* %27
%475 = icmp slt i32 %473, %474
br i1 %475, label %476, label %493
476: ; preds = %472
%477 = load double*, double** %37
%478 = load i32, i32* %24
%479 = sext i32 %478 to i64
%480 = getelementptr inbounds double, double* %477, i64 %479
%481 = load double, double* %480
%482 = load double**, double*** %44
%483 = load i32, i32* %25
%484 = sext i32 %483 to i64
%485 = getelementptr inbounds double*, double** %482, i64 %484
%486 = load double*, double** %485
%487 = load i32, i32* %24
%488 = sext i32 %487 to i64
%489 = getelementptr inbounds double, double* %486, i64 %488
store double %481, double* %489
br label %490
490: ; preds = %476
%491 = load i32, i32* %24
%492 = add nsw i32 %491, 1
store i32 %492, i32* %24
br label %472
493: ; preds = %472
%494 = load double*, double** %45
%495 = load i32, i32* %47
%496 = call i32 @find_max(double* %494, i32 %495)
store i32 %496, i32* %48
%497 = load double*, double** %45
%498 = load i32, i32* %48
%499 = sext i32 %498 to i64
%500 = getelementptr inbounds double, double* %497, i64 %499
%501 = load double, double* %500
store double %501, double* %43
br label %502
502: ; preds = %493, %449
br label %503
503: ; preds = %502
%504 = load i32, i32* %23
%505 = add nsw i32 %504, 1
store i32 %505, i32* %23
br label %247
506: ; preds = %247
store double 1.000000e+20, double* %53
store i32 1, i32* %33
store i32 0, i32* %23
br label %507
507: ; preds = %561, %506
%508 = load i32, i32* %23
%509 = load i32, i32* %47
%510 = icmp slt i32 %508, %509
br i1 %510, label %511, label %564
511: ; preds = %507
%512 = load double**, double*** %34
%513 = load double*, double** %13
%514 = load double*, double** %46
%515 = load i32, i32* %26
%516 = load i32, i32* %27
%517 = load double*, double** %38
%518 = load double*, double** %49
%519 = load double*, double** %50
%520 = load double**, double*** %52
%521 = load double**, double*** %51
%522 = load double**, double*** %44
%523 = load i32, i32* %23
%524 = sext i32 %523 to i64
%525 = getelementptr inbounds double*, double** %522, i64 %524
%526 = load double*, double** %525
%527 = load i32, i32* %29
%528 = load i32, i32* %33
%529 = load double, double* %40
%530 = load double, double* %41
%531 = load double*, double** %45
%532 = load i32, i32* %23
%533 = sext i32 %532 to i64
%534 = getelementptr inbounds double, double* %531, i64 %533
%535 = load double*, double** %37
%536 = load double, double* %39
%537 = load double, double* %53
%538 = fcmp olt double %536, %537
br i1 %538, label %539, label %560
539: ; preds = %511
%540 = load double, double* %39
store double %540, double* %53
%541 = load double*, double** %22
store double %540, double* %541
store i32 0, i32* %24
br label %542
542: ; preds = %556, %539
%543 = load i32, i32* %24
%544 = load i32, i32* %27
%545 = icmp slt i32 %543, %544
br i1 %545, label %546, label %559
546: ; preds = %542
%547 = load double*, double** %37
%548 = load i32, i32* %24
%549 = sext i32 %548 to i64
%550 = getelementptr inbounds double, double* %547, i64 %549
%551 = load double, double* %550
%552 = load double*, double** %21
%553 = load i32, i32* %24
%554 = sext i32 %553 to i64
%555 = getelementptr inbounds double, double* %552, i64 %554
store double %551, double* %555
br label %556
556: ; preds = %546
%557 = load i32, i32* %24
%558 = add nsw i32 %557, 1
store i32 %558, i32* %24
br label %542
559: ; preds = %542
br label %560
560: ; preds = %559, %511
br label %561
561: ; preds = %560
%562 = load i32, i32* %23
%563 = add nsw i32 %562, 1
store i32 %563, i32* %23
br label %507
564: ; preds = %507
%565 = load double*, double** %45
%566 = bitcast double* %565 to i8*
%567 = load double*, double** %49
%568 = bitcast double* %567 to i8*
%569 = load double*, double** %50
%570 = bitcast double* %569 to i8*
%571 = load double*, double** %38
%572 = bitcast double* %571 to i8*
%573 = load double*, double** %46
%574 = bitcast double* %573 to i8*
%575 = load double*, double** %36
%576 = bitcast double* %575 to i8*
%577 = load double*, double** %37
%578 = bitcast double* %577 to i8*
%579 = load i32*, i32** %31
%580 = bitcast i32* %579 to i8*
store i32 0, i32* %23
br label %581
581: ; preds = %592, %564
%582 = load i32, i32* %23
%583 = load i32, i32* %47
%584 = icmp slt i32 %582, %583
br i1 %584, label %585, label %595
585: ; preds = %581
%586 = load double**, double*** %44
%587 = load i32, i32* %23
%588 = sext i32 %587 to i64
%589 = getelementptr inbounds double*, double** %586, i64 %588
%590 = load double*, double** %589
%591 = bitcast double* %590 to i8*
br label %592
592: ; preds = %585
%593 = load i32, i32* %23
%594 = add nsw i32 %593, 1
store i32 %594, i32* %23
br label %581
595: ; preds = %581
%596 = load double**, double*** %44
%597 = bitcast double** %596 to i8*
store i32 0, i32* %23
br label %598
598: ; preds = %615, %595
%599 = load i32, i32* %23
%600 = load i32, i32* %26
%601 = icmp slt i32 %599, %600
br i1 %601, label %602, label %618
602: ; preds = %598
%603 = load double**, double*** %34
%604 = load i32, i32* %23
%605 = sext i32 %604 to i64
%606 = getelementptr inbounds double*, double** %603, i64 %605
%607 = load double*, double** %606
%608 = bitcast double* %607 to i8*
%609 = load double**, double*** %35
%610 = load i32, i32* %23
%611 = sext i32 %610 to i64
%612 = getelementptr inbounds double*, double** %609, i64 %611
%613 = load double*, double** %612
%614 = bitcast double* %613 to i8*
br label %615
615: ; preds = %602
%616 = load i32, i32* %23
%617 = add nsw i32 %616, 1
store i32 %617, i32* %23
br label %598
618: ; preds = %598
store i32 0, i32* %23
br label %619
619: ; preds = %636, %618
%620 = load i32, i32* %23
%621 = load i32, i32* %27
%622 = icmp slt i32 %620, %621
br i1 %622, label %623, label %639
623: ; preds = %619
%624 = load double**, double*** %52
%625 = load i32, i32* %23
%626 = sext i32 %625 to i64
%627 = getelementptr inbounds double*, double** %624, i64 %626
%628 = load double*, double** %627
%629 = bitcast double* %628 to i8*
%630 = load double**, double*** %51
%631 = load i32, i32* %23
%632 = sext i32 %631 to i64
%633 = getelementptr inbounds double*, double** %630, i64 %632
%634 = load double*, double** %633
%635 = bitcast double* %634 to i8*
br label %636
636: ; preds = %623
%637 = load i32, i32* %23
%638 = add nsw i32 %637, 1
store i32 %638, i32* %23
br label %619
639: ; preds = %619
%640 = load double**, double*** %34
%641 = bitcast double** %640 to i8*
%642 = load double**, double*** %35
%643 = bitcast double** %642 to i8*
%644 = load double**, double*** %52
%645 = bitcast double** %644 to i8*
%646 = load double**, double*** %51
%647 = bitcast double** %646 to i8*
br label %648
648: ; preds = %639, %440, %259
ret void
}

LLVM IR (-O2):
define void @fast_s(double* nocapture %0, double* %1, i32* nocapture %2, i32* %3, i32* nocapture %4, i32* nocapture %5, i32* nocapture %6, double* nocapture %7, double* nocapture %8, double* nocapture writeonly %9, double* nocapture writeonly %10) {
%12 = bitcast double* %9 to i8*
%13 = alloca double
%14 = alloca double
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = bitcast double* %13 to i8*
%20 = load double, double* %7
%21 = load double, double* %8
%22 = bitcast double* %14 to i8*
%23 = load i32, i32* %6
%24 = sext i32 %23 to i64
%25 = shl nsw i64 %24, 3
%26 = tail call i8* @malloc(i64 %25)
%27 = bitcast i8* %26 to double**
%28 = tail call i8* @malloc(i64 %25)
%29 = bitcast i8* %28 to double*
%30 = icmp sgt i32 %23, 0
%31 = sext i32 %16 to i64
%32 = shl nsw i64 %31, 3
br i1 %30, label %33, label %43
33: ; preds = %11
%34 = zext i32 %23 to i64
br label %35
35: ; preds = %33, %35
%36 = phi i64 [ 0, %33 ], [ %41, %35 ]
%37 = tail call i8* @malloc(i64 %32)
%38 = getelementptr inbounds double*, double** %27, i64 %36
%39 = bitcast double** %38 to i8**
store i8* %37, i8** %39
%40 = getelementptr inbounds double, double* %29, i64 %36
store double 1.000000e+20, double* %40
%41 = add nuw nsw i64 %36, 1
%42 = icmp eq i64 %41, %34
br i1 %42, label %43, label %35
43: ; preds = %35, %11
%44 = sext i32 %15 to i64
%45 = shl nsw i64 %44, 3
%46 = tail call i8* @malloc(i64 %45)
%47 = bitcast i8* %46 to double*
%48 = tail call i8* @malloc(i64 %45)
%49 = bitcast i8* %48 to double*
%50 = tail call i8* @malloc(i64 %45)
%51 = bitcast i8* %50 to double*
%52 = tail call i8* @malloc(i64 %45)
%53 = bitcast i8* %52 to double*
%54 = tail call i8* @malloc(i64 %32)
%55 = bitcast i8* %54 to double*
%56 = tail call i8* @malloc(i64 %32)
%57 = bitcast i8* %56 to double*
%58 = shl nsw i64 %44, 2
%59 = tail call i8* @malloc(i64 %58)
%60 = bitcast i8* %59 to i32*
%61 = tail call i8* @malloc(i64 %45)
%62 = bitcast i8* %61 to double**
%63 = tail call i8* @malloc(i64 %45)
%64 = bitcast i8* %63 to double**
%65 = tail call i8* @malloc(i64 %32)
%66 = bitcast i8* %65 to double**
%67 = tail call i8* @malloc(i64 %32)
%68 = bitcast i8* %67 to double**
%69 = icmp sgt i32 %15, 0
br i1 %69, label %70, label %75
70: ; preds = %43
%71 = add nsw i32 %16, 1
%72 = sext i32 %71 to i64
%73 = shl nsw i64 %72, 3
%74 = zext i32 %15 to i64
br label %82
75: ; preds = %82, %43
%76 = icmp sgt i32 %16, 0
br i1 %76, label %77, label %92
77: ; preds = %75
%78 = add nuw nsw i32 %16, 1
%79 = zext i32 %78 to i64
%80 = shl nuw nsw i64 %79, 3
%81 = zext i32 %16 to i64
br label %101
82: ; preds = %70, %82
%83 = phi i64 [ 0, %70 ], [ %90, %82 ]
%84 = tail call i8* @malloc(i64 %32)
%85 = getelementptr inbounds double*, double** %62, i64 %83
%86 = bitcast double** %85 to i8**
store i8* %84, i8** %86
%87 = tail call i8* @malloc(i64 %73)
%88 = getelementptr inbounds double*, double** %64, i64 %83
%89 = bitcast double** %88 to i8**
store i8* %87, i8** %89
%90 = add nuw nsw i64 %83, 1
%91 = icmp eq i64 %90, %74
br i1 %91, label %75, label %82
92: ; preds = %101, %75
br i1 %69, label %93, label %161
93: ; preds = %92
%94 = zext i32 %15 to i64
%95 = zext i32 %16 to i64
%96 = add nsw i64 %95, -1
%97 = and i64 %95, 3
%98 = icmp ult i64 %96, 3
%99 = and i64 %95, 4294967292
%100 = icmp eq i64 %97, 0
br label %111
101: ; preds = %77, %101
%102 = phi i64 [ 0, %77 ], [ %109, %101 ]
%103 = tail call i8* @malloc(i64 %32)
%104 = getelementptr inbounds double*, double** %66, i64 %102
%105 = bitcast double** %104 to i8**
store i8* %103, i8** %105
%106 = tail call i8* @malloc(i64 %80)
%107 = getelementptr inbounds double*, double** %68, i64 %102
%108 = bitcast double** %107 to i8**
store i8* %106, i8** %108
%109 = add nuw nsw i64 %102, 1
%110 = icmp eq i64 %109, %81
br i1 %110, label %92, label %101
111: ; preds = %93, %158
%112 = phi i64 [ 0, %93 ], [ %159, %158 ]
br i1 %76, label %113, label %158
113: ; preds = %111
%114 = getelementptr inbounds double*, double** %62, i64 %112
%115 = load double*, double** %114
br i1 %98, label %145, label %116
116: ; preds = %113, %116
%117 = phi i64 [ %142, %116 ], [ 0, %113 ]
%118 = phi i64 [ %143, %116 ], [ 0, %113 ]
%119 = mul nsw i64 %117, %44
%120 = add nsw i64 %119, %112
%121 = getelementptr inbounds double, double* %0, i64 %120
%122 = load double, double* %121
%123 = getelementptr inbounds double, double* %115, i64 %117
store double %122, double* %123
%124 = or i64 %117, 1
%125 = mul nsw i64 %124, %44
%126 = add nsw i64 %125, %112
%127 = getelementptr inbounds double, double* %0, i64 %126
%128 = load double, double* %127
%129 = getelementptr inbounds double, double* %115, i64 %124
store double %128, double* %129
%130 = or i64 %117, 2
%131 = mul nsw i64 %130, %44
%132 = add nsw i64 %131, %112
%133 = getelementptr inbounds double, double* %0, i64 %132
%134 = load double, double* %133
%135 = getelementptr inbounds double, double* %115, i64 %130
store double %134, double* %135
%136 = or i64 %117, 3
%137 = mul nsw i64 %136, %44
%138 = add nsw i64 %137, %112
%139 = getelementptr inbounds double, double* %0, i64 %138
%140 = load double, double* %139
%141 = getelementptr inbounds double, double* %115, i64 %136
store double %140, double* %141
%142 = add nuw nsw i64 %117, 4
%143 = add i64 %118, 4
%144 = icmp eq i64 %143, %99
br i1 %144, label %145, label %116
145: ; preds = %116, %113
%146 = phi i64 [ 0, %113 ], [ %142, %116 ]
br i1 %100, label %158, label %147
147: ; preds = %145, %147
%148 = phi i64 [ %155, %147 ], [ %146, %145 ]
%149 = phi i64 [ %156, %147 ], [ 0, %145 ]
%150 = mul nsw i64 %148, %44
%151 = add nsw i64 %150, %112
%152 = getelementptr inbounds double, double* %0, i64 %151
%153 = load double, double* %152
%154 = getelementptr inbounds double, double* %115, i64 %148
store double %153, double* %154
%155 = add nuw nsw i64 %148, 1
%156 = add i64 %149, 1
%157 = icmp eq i64 %156, %97
br i1 %157, label %158, label %147
158: ; preds = %145, %147, %111
%159 = add nuw nsw i64 %112, 1
%160 = icmp eq i64 %159, %94
br i1 %160, label %161, label %111
161: ; preds = %158, %92
%162 = tail call i32 (i64, ...) bitcast (i32 (...)* @srand to i32 (i64, ...)*)(i64 37)
store double -1.000000e+00, double* %13
%163 = icmp sgt i32 %17, 0
br i1 %163, label %164, label %196
164: ; preds = %161
%165 = add nsw i32 %15, -1
%166 = zext i32 %16 to i64
%167 = zext i32 %16 to i64
%168 = shl nuw nsw i64 %166, 3
%169 = getelementptr i8, i8* %56, i64 %168
%170 = and i64 %166, 4294967292
%171 = add nsw i64 %170, -4
%172 = lshr exact i64 %171, 2
%173 = add nuw nsw i64 %172, 1
%174 = icmp ult i32 %16, 4
%175 = and i64 %166, 4294967292
%176 = and i64 %173, 3
%177 = icmp ult i64 %171, 12
%178 = and i64 %173, 9223372036854775804
%179 = icmp eq i64 %176, 0
%180 = icmp eq i64 %175, %166
%181 = and i64 %166, 3
%182 = icmp eq i64 %181, 0
%183 = icmp ult i32 %16, 4
%184 = and i64 %166, 4294967292
%185 = and i64 %173, 3
%186 = icmp ult i64 %171, 12
%187 = and i64 %173, 9223372036854775804
%188 = icmp eq i64 %185, 0
%189 = icmp eq i64 %184, %166
%190 = and i64 %166, 3
%191 = icmp eq i64 %190, 0
br label %192
192: ; preds = %164, %505
%193 = phi i32 [ 0, %164 ], [ %508, %505 ]
%194 = phi i32 [ 0, %164 ], [ %507, %505 ]
%195 = phi double [ 1.000000e+20, %164 ], [ %506, %505 ]
br label %201
196: ; preds = %505, %161
br i1 %30, label %197, label %534
197: ; preds = %196
%198 = zext i32 %16 to i64
%199 = shl nuw nsw i64 %198, 3
%200 = zext i32 %23 to i64
br label %510
201: ; preds = %192, %331
%202 = phi i32 [ 0, %192 ], [ %203, %331 ]
%203 = add nuw nsw i32 %202, 1
%204 = icmp eq i32 %202, 500
br i1 %204, label %562, label %205
205: ; preds = %201
br i1 %76, label %206, label %331
206: ; preds = %205, %325
%207 = phi i64 [ %329, %325 ], [ 0, %205 ]
%208 = getelementptr inbounds i32, i32* %60, i64 %207
%209 = load i32, i32* %208
%210 = sext i32 %209 to i64
%211 = getelementptr inbounds double*, double** %62, i64 %210
%212 = load double*, double** %211
%213 = getelementptr inbounds double*, double** %64, i64 %207
%214 = load double*, double** %213
br i1 %174, label %290, label %215
215: ; preds = %206
%216 = getelementptr double, double* %214, i64 %166
%217 = getelementptr double, double* %212, i64 %166
%218 = icmp ult double* %214, %217
%219 = icmp ult double* %212, %216
%220 = and i1 %218, %219
br i1 %220, label %290, label %221
221: ; preds = %215
br i1 %177, label %271, label %222
222: ; preds = %221, %222
%223 = phi i64 [ %268, %222 ], [ 0, %221 ]
%224 = phi i64 [ %269, %222 ], [ 0, %221 ]
%225 = getelementptr inbounds double, double* %212, i64 %223
%226 = bitcast double* %225 to <2 x double>*
%227 = load <2 x double>, <2 x double>* %226
%228 = getelementptr inbounds double, double* %225, i64 2
%229 = bitcast double* %228 to <2 x double>*
%230 = load <2 x double>, <2 x double>* %229
%231 = getelementptr inbounds double, double* %214, i64 %223
%232 = bitcast double* %231 to <2 x double>*
store <2 x double> %227, <2 x double>* %232
%233 = getelementptr inbounds double, double* %231, i64 2
%234 = bitcast double* %233 to <2 x double>*
store <2 x double> %230, <2 x double>* %234
%235 = or i64 %223, 4
%236 = getelementptr inbounds double, double* %212, 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 = getelementptr inbounds double, double* %214, i64 %235
%243 = bitcast double* %242 to <2 x double>*
store <2 x double> %238, <2 x double>* %243
%244 = getelementptr inbounds double, double* %242, i64 2
%245 = bitcast double* %244 to <2 x double>*
store <2 x double> %241, <2 x double>* %245
%246 = or i64 %223, 8
%247 = getelementptr inbounds double, double* %212, i64 %246
%248 = bitcast double* %247 to <2 x double>*
%249 = load <2 x double>, <2 x double>* %248
%250 = getelementptr inbounds double, double* %247, i64 2
%251 = bitcast double* %250 to <2 x double>*
%252 = load <2 x double>, <2 x double>* %251
%253 = getelementptr inbounds double, double* %214, i64 %246
%254 = bitcast double* %253 to <2 x double>*
store <2 x double> %249, <2 x double>* %254
%255 = getelementptr inbounds double, double* %253, i64 2
%256 = bitcast double* %255 to <2 x double>*
store <2 x double> %252, <2 x double>* %256
%257 = or i64 %223, 12
%258 = getelementptr inbounds double, double* %212, i64 %257
%259 = bitcast double* %258 to <2 x double>*
%260 = load <2 x double>, <2 x double>* %259
%261 = getelementptr inbounds double, double* %258, i64 2
%262 = bitcast double* %261 to <2 x double>*
%263 = load <2 x double>, <2 x double>* %262
%264 = getelementptr inbounds double, double* %214, i64 %257
%265 = bitcast double* %264 to <2 x double>*
store <2 x double> %260, <2 x double>* %265
%266 = getelementptr inbounds double, double* %264, i64 2
%267 = bitcast double* %266 to <2 x double>*
store <2 x double> %263, <2 x double>* %267
%268 = add nuw i64 %223, 16
%269 = add nuw i64 %224, 4
%270 = icmp eq i64 %269, %178
br i1 %270, label %271, label %222
271: ; preds = %222, %221
%272 = phi i64 [ 0, %221 ], [ %268, %222 ]
br i1 %179, label %289, label %273
273: ; preds = %271, %273
%274 = phi i64 [ %286, %273 ], [ %272, %271 ]
%275 = phi i64 [ %287, %273 ], [ 0, %271 ]
%276 = getelementptr inbounds double, double* %212, i64 %274
%277 = bitcast double* %276 to <2 x double>*
%278 = load <2 x double>, <2 x double>* %277
%279 = getelementptr inbounds double, double* %276, i64 2
%280 = bitcast double* %279 to <2 x double>*
%281 = load <2 x double>, <2 x double>* %280
%282 = getelementptr inbounds double, double* %214, i64 %274
%283 = bitcast double* %282 to <2 x double>*
store <2 x double> %278, <2 x double>* %283
%284 = getelementptr inbounds double, double* %282, i64 2
%285 = bitcast double* %284 to <2 x double>*
store <2 x double> %281, <2 x double>* %285
%286 = add nuw i64 %274, 4
%287 = add i64 %275, 1
%288 = icmp eq i64 %287, %176
br i1 %288, label %289, label %273
289: ; preds = %273, %271
br i1 %180, label %325, label %290
290: ; preds = %215, %206, %289
%291 = phi i64 [ 0, %215 ], [ 0, %206 ], [ %175, %289 ]
%292 = xor i64 %291, -1
%293 = add nsw i64 %292, %166
br i1 %182, label %303, label %294
294: ; preds = %290, %294
%295 = phi i64 [ %300, %294 ], [ %291, %290 ]
%296 = phi i64 [ %301, %294 ], [ 0, %290 ]
%297 = getelementptr inbounds double, double* %212, i64 %295
%298 = load double, double* %297
%299 = getelementptr inbounds double, double* %214, i64 %295
store double %298, double* %299
%300 = add nuw nsw i64 %295, 1
%301 = add i64 %296, 1
%302 = icmp eq i64 %301, %181
br i1 %302, label %303, label %294
303: ; preds = %294, %290
%304 = phi i64 [ %291, %290 ], [ %300, %294 ]
%305 = icmp ult i64 %293, 3
br i1 %305, label %325, label %306
306: ; preds = %303, %306
%307 = phi i64 [ %323, %306 ], [ %304, %303 ]
%308 = getelementptr inbounds double, double* %212, i64 %307
%309 = load double, double* %308
%310 = getelementptr inbounds double, double* %214, i64 %307
store double %309, double* %310
%311 = add nuw nsw i64 %307, 1
%312 = getelementptr inbounds double, double* %212, i64 %311
%313 = load double, double* %312
%314 = getelementptr inbounds double, double* %214, i64 %311
store double %313, double* %314
%315 = add nuw nsw i64 %307, 2
%316 = getelementptr inbounds double, double* %212, i64 %315
%317 = load double, double* %316
%318 = getelementptr inbounds double, double* %214, i64 %315
store double %317, double* %318
%319 = add nuw nsw i64 %307, 3
%320 = getelementptr inbounds double, double* %212, i64 %319
%321 = load double, double* %320
%322 = getelementptr inbounds double, double* %214, i64 %319
store double %321, double* %322
%323 = add nuw nsw i64 %307, 4
%324 = icmp eq i64 %323, %166
br i1 %324, label %325, label %306
325: ; preds = %303, %306, %289
%326 = getelementptr inbounds double, double* %1, i64 %210
%327 = load double, double* %326
%328 = getelementptr inbounds double, double* %214, i64 %31
store double %327, double* %328
%329 = add nuw nsw i64 %207, 1
%330 = icmp eq i64 %329, %166
br i1 %330, label %331, label %206
331: ; preds = %325, %205
%332 = call i32 @lu(double** %64, i32* %3, double* %55)
%333 = icmp eq i32 %332, 1
br i1 %333, label %201, label %334
334: ; preds = %331
%335 = load double, double* %14
%336 = call double @llvm.fabs.f64(double %335)
%337 = fcmp olt double %336, 1.000000e-10
br i1 %337, label %338, label %378
338: ; preds = %334
store double %335, double* %10
br i1 %76, label %339, label %342
339: ; preds = %338
%340 = zext i32 %16 to i64
%341 = shl nuw nsw i64 %340, 3
br label %342
342: ; preds = %339, %338
br i1 %30, label %343, label %352
343: ; preds = %342
%344 = zext i32 %23 to i64
br label %345
345: ; preds = %343, %345
%346 = phi i64 [ 0, %343 ], [ %350, %345 ]
%347 = getelementptr inbounds double*, double** %27, i64 %346
%348 = bitcast double** %347 to i8**
%349 = load i8*, i8** %348
%350 = add nuw nsw i64 %346, 1
%351 = icmp eq i64 %350, %344
br i1 %351, label %352, label %345
352: ; preds = %345, %342
br i1 %69, label %353, label %355
353: ; preds = %352
%354 = zext i32 %15 to i64
br label %358
355: ; preds = %358, %352
br i1 %76, label %356, label %561
356: ; preds = %355
%357 = zext i32 %16 to i64
br label %368
358: ; preds = %353, %358
%359 = phi i64 [ 0, %353 ], [ %366, %358 ]
%360 = getelementptr inbounds double*, double** %62, i64 %359
%361 = bitcast double** %360 to i8**
%362 = load i8*, i8** %361
%363 = getelementptr inbounds double*, double** %64, i64 %359
%364 = bitcast double** %363 to i8**
%365 = load i8*, i8** %364
%366 = add nuw nsw i64 %359, 1
%367 = icmp eq i64 %366, %354
br i1 %367, label %355, label %358
368: ; preds = %356, %368
%369 = phi i64 [ 0, %356 ], [ %376, %368 ]
%370 = getelementptr inbounds double*, double** %66, i64 %369
%371 = bitcast double** %370 to i8**
%372 = load i8*, i8** %371
%373 = getelementptr inbounds double*, double** %68, i64 %369
%374 = bitcast double** %373 to i8**
%375 = load i8*, i8** %374
%376 = add nuw nsw i64 %369, 1
%377 = icmp eq i64 %376, %357
br i1 %377, label %561, label %368
378: ; preds = %334
%379 = call double @loss_rho(double* %47, double %195, i32 %15, i32 %16, double %21)
%380 = fcmp olt double %379, %20
br i1 %380, label %381, label %505
381: ; preds = %378
%382 = load double, double* %14
%383 = call double @find_scale(double* %47, double %20, double %21, double %382, i32 %15, i32 %16)
store double %383, double* %14
%384 = sext i32 %194 to i64
%385 = getelementptr inbounds double, double* %29, i64 %384
store double %383, double* %385
br i1 %76, label %386, label %500
386: ; preds = %381
%387 = getelementptr inbounds double*, double** %27, i64 %384
%388 = load double*, double** %387
br i1 %183, label %465, label %389
389: ; preds = %386
%390 = bitcast double* %388 to i8*
%391 = getelementptr double, double* %388, i64 %166
%392 = bitcast double* %391 to i8*
%393 = icmp ugt i8* %169, %390
%394 = icmp ult i8* %56, %392
%395 = and i1 %393, %394
br i1 %395, label %465, label %396
396: ; preds = %389
br i1 %186, label %446, label %397
397: ; preds = %396, %397
%398 = phi i64 [ %443, %397 ], [ 0, %396 ]
%399 = phi i64 [ %444, %397 ], [ 0, %396 ]
%400 = getelementptr inbounds double, double* %57, i64 %398
%401 = bitcast double* %400 to <2 x double>*
%402 = load <2 x double>, <2 x double>* %401
%403 = getelementptr inbounds double, double* %400, i64 2
%404 = bitcast double* %403 to <2 x double>*
%405 = load <2 x double>, <2 x double>* %404
%406 = getelementptr inbounds double, double* %388, i64 %398
%407 = bitcast double* %406 to <2 x double>*
store <2 x double> %402, <2 x double>* %407
%408 = getelementptr inbounds double, double* %406, i64 2
%409 = bitcast double* %408 to <2 x double>*
store <2 x double> %405, <2 x double>* %409
%410 = or i64 %398, 4
%411 = getelementptr inbounds double, double* %57, i64 %410
%412 = bitcast double* %411 to <2 x double>*
%413 = load <2 x double>, <2 x double>* %412
%414 = getelementptr inbounds double, double* %411, i64 2
%415 = bitcast double* %414 to <2 x double>*
%416 = load <2 x double>, <2 x double>* %415
%417 = getelementptr inbounds double, double* %388, i64 %410
%418 = bitcast double* %417 to <2 x double>*
store <2 x double> %413, <2 x double>* %418
%419 = getelementptr inbounds double, double* %417, i64 2
%420 = bitcast double* %419 to <2 x double>*
store <2 x double> %416, <2 x double>* %420
%421 = or i64 %398, 8
%422 = getelementptr inbounds double, double* %57, i64 %421
%423 = bitcast double* %422 to <2 x double>*
%424 = load <2 x double>, <2 x double>* %423
%425 = getelementptr inbounds double, double* %422, i64 2
%426 = bitcast double* %425 to <2 x double>*
%427 = load <2 x double>, <2 x double>* %426
%428 = getelementptr inbounds double, double* %388, i64 %421
%429 = bitcast double* %428 to <2 x double>*
store <2 x double> %424, <2 x double>* %429
%430 = getelementptr inbounds double, double* %428, i64 2
%431 = bitcast double* %430 to <2 x double>*
store <2 x double> %427, <2 x double>* %431
%432 = or i64 %398, 12
%433 = getelementptr inbounds double, double* %57, i64 %432
%434 = bitcast double* %433 to <2 x double>*
%435 = load <2 x double>, <2 x double>* %434
%436 = getelementptr inbounds double, double* %433, i64 2
%437 = bitcast double* %436 to <2 x double>*
%438 = load <2 x double>, <2 x double>* %437
%439 = getelementptr inbounds double, double* %388, i64 %432
%440 = bitcast double* %439 to <2 x double>*
store <2 x double> %435, <2 x double>* %440
%441 = getelementptr inbounds double, double* %439, i64 2
%442 = bitcast double* %441 to <2 x double>*
store <2 x double> %438, <2 x double>* %442
%443 = add nuw i64 %398, 16
%444 = add nuw i64 %399, 4
%445 = icmp eq i64 %444, %187
br i1 %445, label %446, label %397
446: ; preds = %397, %396
%447 = phi i64 [ 0, %396 ], [ %443, %397 ]
br i1 %188, label %464, label %448
448: ; preds = %446, %448
%449 = phi i64 [ %461, %448 ], [ %447, %446 ]
%450 = phi i64 [ %462, %448 ], [ 0, %446 ]
%451 = getelementptr inbounds double, double* %57, i64 %449
%452 = bitcast double* %451 to <2 x double>*
%453 = load <2 x double>, <2 x double>* %452
%454 = getelementptr inbounds double, double* %451, i64 2
%455 = bitcast double* %454 to <2 x double>*
%456 = load <2 x double>, <2 x double>* %455
%457 = getelementptr inbounds double, double* %388, i64 %449
%458 = bitcast double* %457 to <2 x double>*
store <2 x double> %453, <2 x double>* %458
%459 = getelementptr inbounds double, double* %457, i64 2
%460 = bitcast double* %459 to <2 x double>*
store <2 x double> %456, <2 x double>* %460
%461 = add nuw i64 %449, 4
%462 = add i64 %450, 1
%463 = icmp eq i64 %462, %185
br i1 %463, label %464, label %448
464: ; preds = %448, %446
br i1 %189, label %500, label %465
465: ; preds = %389, %386, %464
%466 = phi i64 [ 0, %389 ], [ 0, %386 ], [ %184, %464 ]
%467 = xor i64 %466, -1
%468 = add nsw i64 %467, %166
br i1 %191, label %478, label %469
469: ; preds = %465, %469
%470 = phi i64 [ %475, %469 ], [ %466, %465 ]
%471 = phi i64 [ %476, %469 ], [ 0, %465 ]
%472 = getelementptr inbounds double, double* %57, i64 %470
%473 = load double, double* %472
%474 = getelementptr inbounds double, double* %388, i64 %470
store double %473, double* %474
%475 = add nuw nsw i64 %470, 1
%476 = add i64 %471, 1
%477 = icmp eq i64 %476, %190
br i1 %477, label %478, label %469
478: ; preds = %469, %465
%479 = phi i64 [ %466, %465 ], [ %475, %469 ]
%480 = icmp ult i64 %468, 3
br i1 %480, label %500, label %481
481: ; preds = %478, %481
%482 = phi i64 [ %498, %481 ], [ %479, %478 ]
%483 = getelementptr inbounds double, double* %57, i64 %482
%484 = load double, double* %483
%485 = getelementptr inbounds double, double* %388, i64 %482
store double %484, double* %485
%486 = add nuw nsw i64 %482, 1
%487 = getelementptr inbounds double, double* %57, i64 %486
%488 = load double, double* %487
%489 = getelementptr inbounds double, double* %388, i64 %486
store double %488, double* %489
%490 = add nuw nsw i64 %482, 2
%491 = getelementptr inbounds double, double* %57, i64 %490
%492 = load double, double* %491
%493 = getelementptr inbounds double, double* %388, i64 %490
store double %492, double* %493
%494 = add nuw nsw i64 %482, 3
%495 = getelementptr inbounds double, double* %57, i64 %494
%496 = load double, double* %495
%497 = getelementptr inbounds double, double* %388, i64 %494
store double %496, double* %497
%498 = add nuw nsw i64 %482, 4
%499 = icmp eq i64 %498, %167
br i1 %499, label %500, label %481
500: ; preds = %478, %481, %464, %381
%501 = call i32 @find_max(double* %29, i32 %23)
%502 = sext i32 %501 to i64
%503 = getelementptr inbounds double, double* %29, i64 %502
%504 = load double, double* %503
br label %505
505: ; preds = %378, %500
%506 = phi double [ %504, %500 ], [ %195, %378 ]
%507 = phi i32 [ %501, %500 ], [ %194, %378 ]
%508 = add nuw nsw i32 %193, 1
%509 = icmp eq i32 %508, %17
br i1 %509, label %196, label %192
510: ; preds = %197, %520
%511 = phi i64 [ 0, %197 ], [ %522, %520 ]
%512 = phi double [ 1.000000e+20, %197 ], [ %521, %520 ]
%513 = getelementptr inbounds double*, double** %27, i64 %511
%514 = load double*, double** %513
%515 = getelementptr inbounds double, double* %29, i64 %511
%516 = load double, double* %13
%517 = fcmp olt double %516, %512
br i1 %517, label %518, label %520
518: ; preds = %510
store double %516, double* %10
br i1 %76, label %519, label %520
519: ; preds = %518
br label %520
520: ; preds = %519, %518, %510
%521 = phi double [ %512, %510 ], [ %516, %518 ], [ %516, %519 ]
%522 = add nuw nsw i64 %511, 1
%523 = icmp eq i64 %522, %200
br i1 %523, label %524, label %510
524: ; preds = %520
br i1 %30, label %525, label %535
525: ; preds = %524
%526 = zext i32 %23 to i64
br label %527
527: ; preds = %525, %527
%528 = phi i64 [ 0, %525 ], [ %532, %527 ]
%529 = getelementptr inbounds double*, double** %27, i64 %528
%530 = bitcast double** %529 to i8**
%531 = load i8*, i8** %530
%532 = add nuw nsw i64 %528, 1
%533 = icmp eq i64 %532, %526
br i1 %533, label %535, label %527
534: ; preds = %196
br label %535
535: ; preds = %527, %534, %524
br i1 %69, label %536, label %538
536: ; preds = %535
%537 = zext i32 %15 to i64
br label %541
538: ; preds = %541, %535
br i1 %76, label %539, label %561
539: ; preds = %538
%540 = zext i32 %16 to i64
br label %551
541: ; preds = %536, %541
%542 = phi i64 [ 0, %536 ], [ %549, %541 ]
%543 = getelementptr inbounds double*, double** %62, i64 %542
%544 = bitcast double** %543 to i8**
%545 = load i8*, i8** %544
%546 = getelementptr inbounds double*, double** %64, i64 %542
%547 = bitcast double** %546 to i8**
%548 = load i8*, i8** %547
%549 = add nuw nsw i64 %542, 1
%550 = icmp eq i64 %549, %537
br i1 %550, label %538, label %541
551: ; preds = %539, %551
%552 = phi i64 [ 0, %539 ], [ %559, %551 ]
%553 = getelementptr inbounds double*, double** %66, i64 %552
%554 = bitcast double** %553 to i8**
%555 = load i8*, i8** %554
%556 = getelementptr inbounds double*, double** %68, i64 %552
%557 = bitcast double** %556 to i8**
%558 = load i8*, i8** %557
%559 = add nuw nsw i64 %552, 1
%560 = icmp eq i64 %559, %540
br i1 %560, label %561, label %551
561: ; preds = %551, %368, %538, %355
br label %562
562: ; preds = %201, %561
ret void
}