void fast_s_large_n(double *X, double *y, int *nn, int *pp, int *NN, int *K,
                    int *ggroups, int *nn_group, int *bbest_r, double *bb,
                    double *rrhoc, double *bbeta, double *sscale) {
  void reset_mat(double **a, int n, int m);
  double loss_rho(double *r, double scale, int n, int p, double rhoc);
  double find_scale(double *r, double b, double rhoc, double initial_scale,
                    int n, int p);
  void fast_s_with_memory(double **x, double *y, int *nn, int *pp, int *NN,
                          int *K, int *bbest_r, double *bb, double *rrhoc,
                          double **best_betas, double *best_scales);
  void sample_n_outof_N(int n, int N, int *x);
  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);
  register int i, j, k, k2;
  int n = *nn, p = *pp, kk = *K, *indices;
  int groups = *ggroups, n_group = *nn_group, best_r = *bbest_r;
  double **best_betas, *best_scales;
  double **final_best_betas, *final_best_scales;
  double **x, **xsamp, *ysamp, *res, sc, *beta_ref;
  double *tmp, *tmp2, **tmp_mat, **tmp_mat2, *weights;
  double best_sc, worst_sc, b = *bb, rhoc = *rrhoc, aux;
  int pos_worst_scale, conv;
  res = (double *)malloc(n * sizeof(double));
  weights = (double *)malloc(n * sizeof(double));
  tmp = (double *)malloc(n * sizeof(double));
  tmp2 = (double *)malloc(n * sizeof(double));
  tmp_mat = (double **)malloc(p * sizeof(double *));
  tmp_mat2 = (double **)malloc(p * 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));
  };
  beta_ref = (double *)malloc(p * sizeof(double));
  final_best_betas = (double **)malloc(best_r * sizeof(double *));
  for (i = 0; i < best_r; i++)
    final_best_betas[i] = (double *)malloc(p * sizeof(double));
  final_best_scales = (double *)malloc(best_r * sizeof(double));
  k = best_r * groups;
  best_betas = (double **)malloc(k * sizeof(double *));
  best_scales = (double *)malloc(k * sizeof(double));
  for (i = 0; i < k; i++)
    best_betas[i] = (double *)malloc(p * sizeof(double));
  x = (double **)malloc(n * sizeof(double *));
  for (i = 0; i < n; i++)
    x[i] = (double *)malloc(p * sizeof(double));
  k = n_group * groups;
  indices = (int *)malloc(k * sizeof(int));
  xsamp = (double **)malloc(k * sizeof(double *));
  ysamp = (double *)malloc(k * sizeof(double));
  for (i = 0; i < k; i++)
    xsamp[i] = (double *)malloc(p * sizeof(double));
  for (i = 0; i < n; i++)
    for (j = 0; j < p; j++)
      x[i][j] = X[j * n + i];
  srand((long)37);
  sample_n_outof_N(k, n - 1, indices);
  for (i = 0; i < k; i++) {
    for (j = 0; j < p; j++)
      xsamp[i][j] = x[indices[i]][j];
    ysamp[i] = y[indices[i]];
  };
  for (i = 0; i < groups; i++) {
    fast_s_with_memory(xsamp + i * n_group, ysamp + i * n_group, &n_group, pp,
                       NN, K, bbest_r, bb, rrhoc, best_betas + i * best_r,
                       best_scales + i * best_r);
  };
  best_sc = 1e+20;
  pos_worst_scale = conv = 0;
  for (i = 0; i < best_r; i++)
    final_best_scales[i] = 1e+20;
  worst_sc = 1e+20;
  reset_mat(final_best_betas, best_r, p);
  k = n_group * groups;
  for (i = 0; i < (best_r * groups); i++) {
    refine_fast_s(xsamp, ysamp, weights, k, p, res, tmp, tmp2, tmp_mat,
                  tmp_mat2, best_betas[i], kk, conv, b, rhoc, best_scales + i,
                  beta_ref, &sc);
    if (loss_rho(res, worst_sc, k, p, rhoc) < b) {
      sc = find_scale(res, b, rhoc, sc, k, p);
      k2 = pos_worst_scale;
      final_best_scales[k2] = sc;
      for (j = 0; j < p; j++)
        final_best_betas[k2][j] = beta_ref[j];
      pos_worst_scale = find_max(final_best_scales, best_r);
      worst_sc = final_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,
                  final_best_betas[i], kk, conv, b, rhoc, final_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];
    };
  };
  for (i = 0; i < n; i++)
    free(x[i]);
  free(x);
  free(best_scales);
  k = best_r * groups;
  for (i = 0; i < k; i++)
    free(best_betas[i]);
  free(best_betas);
  free(indices);
  free(ysamp);
  k = n_group * groups;
  for (i = 0; i < k; i++)
    free(xsamp[i]);
  free(xsamp);
  free(tmp);
  free(tmp2);
  for (i = 0; i < p; i++) {
    free(tmp_mat[i]);
    free(tmp_mat2[i]);
  };
  free(tmp_mat);
  free(tmp_mat2);
  free(weights);
  for (i = 0; i < best_r; i++)
    free(final_best_betas[i]);
  free(final_best_betas);
  free(final_best_scales);
  free(res);
  free(beta_ref);
}


x86 assembly (clang, -O0):
<fast_s_large_n>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x198,%rsp
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
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,-0x6c(%rbp)
mov    -0x48(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x70(%rbp)
mov    -0x58(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x74(%rbp)
mov    0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x84(%rbp)
mov    0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x88(%rbp)
mov    0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x8c(%rbp)
mov    0x28(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
mov    0x30(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movslq -0x6c(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0xd0(%rbp)
movslq -0x6c(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x108(%rbp)
movslq -0x6c(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0xe8(%rbp)
movslq -0x6c(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0xf0(%rbp)
movslq -0x70(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0xf8(%rbp)
movslq -0x70(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x100(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x70(%rbp),%eax
jge    1323 <fast_s_large_n+0x183>
movslq -0x70(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0xf8(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x70(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0x100(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    12c6 <fast_s_large_n+0x126>
movslq -0x70(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0xe0(%rbp)
movslq -0x8c(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0xa8(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x8c(%rbp),%eax
jge    1391 <fast_s_large_n+0x1f1>
movslq -0x70(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0xa8(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1355 <fast_s_large_n+0x1b5>
movslq -0x8c(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0xb0(%rbp)
mov    -0x8c(%rbp),%eax
imul   -0x84(%rbp),%eax
mov    %eax,-0x64(%rbp)
movslq -0x64(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x98(%rbp)
movslq -0x64(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0xa0(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x64(%rbp),%eax
jge    1420 <fast_s_large_n+0x280>
movslq -0x70(%rbp),%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    13e7 <fast_s_large_n+0x247>
movslq -0x6c(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0xb8(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    1474 <fast_s_large_n+0x2d4>
movslq -0x70(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0xb8(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    143b <fast_s_large_n+0x29b>
mov    -0x88(%rbp),%eax
imul   -0x84(%rbp),%eax
mov    %eax,-0x64(%rbp)
movslq -0x64(%rbp),%rdi
shl    $0x2,%rdi
call   1080 <malloc@plt>
mov    %rax,-0x80(%rbp)
movslq -0x64(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0xc0(%rbp)
movslq -0x64(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,-0xc8(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x64(%rbp),%eax
jge    14fd <fast_s_large_n+0x35d>
movslq -0x70(%rbp),%rdi
shl    $0x3,%rdi
call   1080 <malloc@plt>
mov    %rax,%rdx
mov    -0xc0(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    14c4 <fast_s_large_n+0x324>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    1572 <fast_s_large_n+0x3d2>
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x70(%rbp),%eax
jge    155f <fast_s_large_n+0x3bf>
mov    -0x30(%rbp),%rax
mov    -0x60(%rbp),%ecx
imul   -0x6c(%rbp),%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0xb8(%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    1517 <fast_s_large_n+0x377>
jmp    1564 <fast_s_large_n+0x3c4>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1504 <fast_s_large_n+0x364>
mov    $0x25,%edi
mov    $0x0,%al
call   1070 <srand@plt>
mov    -0x64(%rbp),%edi
mov    -0x6c(%rbp),%esi
sub    $0x1,%esi
mov    -0x80(%rbp),%rdx
call   1050 <sample_n_outof_N@plt>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x64(%rbp),%eax
jge    162f <fast_s_large_n+0x48f>
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x70(%rbp),%eax
jge    15fc <fast_s_large_n+0x45c>
mov    -0xb8(%rbp),%rax
mov    -0x80(%rbp),%rcx
movslq -0x5c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0xc0(%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    15aa <fast_s_large_n+0x40a>
mov    -0x38(%rbp),%rax
mov    -0x80(%rbp),%rcx
movslq -0x5c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0xc8(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1597 <fast_s_large_n+0x3f7>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x84(%rbp),%eax
jge    16f8 <fast_s_large_n+0x558>
mov    -0xc0(%rbp),%rdi
mov    -0x5c(%rbp),%eax
imul   -0x88(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0xc8(%rbp),%rsi
mov    -0x5c(%rbp),%eax
imul   -0x88(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x48(%rbp),%rcx
mov    -0x50(%rbp),%r8
mov    -0x58(%rbp),%r9
mov    0x20(%rbp),%r14
mov    0x28(%rbp),%rbx
mov    0x30(%rbp),%r11
mov    -0x98(%rbp),%r10
mov    -0x5c(%rbp),%eax
imul   -0x8c(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%r10
mov    -0xa0(%rbp),%rax
mov    -0x5c(%rbp),%edx
imul   -0x8c(%rbp),%edx
movslq %edx,%rdx
shl    $0x3,%rdx
add    %rdx,%rax
lea    -0x88(%rbp),%rdx
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
call   1040 <fast_s_with_memory@plt>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1636 <fast_s_large_n+0x496>
movsd  0x900(%rip),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movl   $0x0,-0x138(%rbp)
movl   $0x0,-0x134(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x8c(%rbp),%eax
jge    1758 <fast_s_large_n+0x5b8>
mov    -0xb0(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  0x8bb(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1723 <fast_s_large_n+0x583>
movsd  0x8a0(%rip),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
mov    -0xa8(%rbp),%rdi
mov    -0x8c(%rbp),%esi
mov    -0x70(%rbp),%edx
call   10a0 <reset_mat@plt>
mov    -0x88(%rbp),%eax
imul   -0x84(%rbp),%eax
mov    %eax,-0x64(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
mov    -0x8c(%rbp),%ecx
imul   -0x84(%rbp),%ecx
cmp    %ecx,%eax
jge    19ac <fast_s_large_n+0x80c>
mov    -0xc0(%rbp),%rdi
mov    -0xc8(%rbp),%rsi
mov    -0x108(%rbp),%rdx
mov    -0x64(%rbp),%ecx
mov    -0x70(%rbp),%r8d
mov    -0xd0(%rbp),%r9
mov    -0xe8(%rbp),%rax
mov    %rax,-0x150(%rbp)
mov    -0xf0(%rbp),%rax
mov    %rax,-0x148(%rbp)
mov    -0xf8(%rbp),%r13
mov    -0x100(%rbp),%r12
mov    -0x98(%rbp),%rax
movslq -0x5c(%rbp),%r10
mov    (%rax,%r10,8),%r15
mov    -0x74(%rbp),%r14d
mov    -0x138(%rbp),%ebx
movsd  -0x120(%rbp),%xmm0
ff
movsd  -0x128(%rbp),%xmm1
ff
mov    -0xa0(%rbp),%r11
movslq -0x5c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r11
mov    -0xe0(%rbp),%r10
lea    -0xd8(%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>
mov    -0xd0(%rbp),%rdi
movsd  -0x118(%rbp),%xmm0
ff
mov    -0x64(%rbp),%esi
mov    -0x70(%rbp),%edx
movsd  -0x128(%rbp),%xmm1
ff
call   1090 <loss_rho@plt>
movaps %xmm0,%xmm1
movsd  -0x120(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1999 <fast_s_large_n+0x7f9>
mov    -0xd0(%rbp),%rdi
movsd  -0x120(%rbp),%xmm0
ff
movsd  -0x128(%rbp),%xmm1
ff
movsd  -0xd8(%rbp),%xmm2
ff
mov    -0x64(%rbp),%esi
mov    -0x70(%rbp),%edx
call   10c0 <find_scale@plt>
movsd  %xmm0,-0xd8(%rbp)
ff
mov    -0x134(%rbp),%eax
mov    %eax,-0x68(%rbp)
movsd  -0xd8(%rbp),%xmm0
ff
mov    -0xb0(%rbp),%rax
movslq -0x68(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x70(%rbp),%eax
jge    1966 <fast_s_large_n+0x7c6>
mov    -0xe0(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0xa8(%rbp),%rax
movslq -0x68(%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    1924 <fast_s_large_n+0x784>
mov    -0xb0(%rbp),%rdi
mov    -0x8c(%rbp),%esi
call   10b0 <find_max@plt>
mov    %eax,-0x134(%rbp)
mov    -0xb0(%rbp),%rax
movslq -0x134(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
jmp    199e <fast_s_large_n+0x7fe>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1794 <fast_s_large_n+0x5f4>
movsd  0x64c(%rip),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movl   $0x1,-0x138(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x8c(%rbp),%eax
jge    1b48 <fast_s_large_n+0x9a8>
mov    -0xb8(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x108(%rbp),%rdx
mov    -0x6c(%rbp),%ecx
mov    -0x70(%rbp),%r8d
mov    -0xd0(%rbp),%r9
mov    -0xe8(%rbp),%rax
mov    %rax,-0x168(%rbp)
mov    -0xf0(%rbp),%rax
mov    %rax,-0x160(%rbp)
mov    -0xf8(%rbp),%r13
mov    -0x100(%rbp),%r12
mov    -0xa8(%rbp),%rax
movslq -0x5c(%rbp),%r10
mov    (%rax,%r10,8),%r15
mov    -0x74(%rbp),%r14d
mov    -0x138(%rbp),%ebx
movsd  -0x120(%rbp),%xmm0
ff
movsd  -0x128(%rbp),%xmm1
ff
mov    -0xb0(%rbp),%r11
movslq -0x5c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r11
mov    -0xe0(%rbp),%r10
lea    -0x130(%rbp),%rax
mov    %rax,-0x158(%rbp)
mov    -0x168(%rbp),%rax
mov    %rax,(%rsp)
mov    -0x160(%rbp),%rax
mov    %rax,0x8(%rsp)
mov    -0x158(%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  -0x130(%rbp),%xmm1
ff
movsd  -0x110(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1b35 <fast_s_large_n+0x995>
movsd  -0x130(%rbp),%xmm0
ff
movsd  %xmm0,-0x110(%rbp)
ff
mov    0x40(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x70(%rbp),%eax
jge    1b30 <fast_s_large_n+0x990>
mov    -0xe0(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    0x38(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    1af9 <fast_s_large_n+0x959>
jmp    1b35 <fast_s_large_n+0x995>
jmp    1b3a <fast_s_large_n+0x99a>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    19cd <fast_s_large_n+0x82d>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x6c(%rbp),%eax
jge    1b7d <fast_s_large_n+0x9dd>
mov    -0xb8(%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    1b4f <fast_s_large_n+0x9af>
mov    -0xb8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xa0(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8c(%rbp),%eax
imul   -0x84(%rbp),%eax
mov    %eax,-0x64(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x64(%rbp),%eax
jge    1bda <fast_s_large_n+0xa3a>
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    1bac <fast_s_large_n+0xa0c>
mov    -0x98(%rbp),%rdi
call   1030 <free@plt>
mov    -0x80(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x88(%rbp),%eax
imul   -0x84(%rbp),%eax
mov    %eax,-0x64(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x64(%rbp),%eax
jge    1c40 <fast_s_large_n+0xaa0>
mov    -0xc0(%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    1c12 <fast_s_large_n+0xa72>
mov    -0xc0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xe8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xf0(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x70(%rbp),%eax
jge    1cad <fast_s_large_n+0xb0d>
mov    -0xf8(%rbp),%rax
movslq -0x5c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x100(%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    1c6b <fast_s_large_n+0xacb>
mov    -0xf8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x100(%rbp),%rdi
call   1030 <free@plt>
mov    -0x108(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x8c(%rbp),%eax
jge    1d09 <fast_s_large_n+0xb69>
mov    -0xa8(%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    1cd8 <fast_s_large_n+0xb38>
mov    -0xa8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xb0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xd0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xe0(%rbp),%rdi
call   1030 <free@plt>
add    $0x198,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<fast_s_large_n>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x138,%rsp
mov    %r8,0xb0(%rsp)
mov    %rsi,0x110(%rsp)
mov    %rdi,0x60(%rsp)
mov    0x190(%rsp),%r11
mov    0x188(%rsp),%rax
mov    0x180(%rsp),%rdi
mov    0x178(%rsp),%r8
mov    0x170(%rsp),%r10
movslq (%rdx),%rdx
mov    %rcx,0xa8(%rsp)
movslq (%rcx),%rbx
mov    %r9,0x68(%rsp)
mov    (%r9),%esi
mov    %rsi,0x108(%rsp)
mov    (%r10),%ecx
mov    %rcx,0x20(%rsp)
mov    (%r8),%ecx
mov    %ecx,0x50(%rsp)
mov    %ecx,0x14(%rsp)
movslq (%rdi),%rbp
movsd  (%rax),%xmm0
movsd  %xmm0,0x38(%rsp)
movsd  (%r11),%xmm0
movsd  %xmm0,0x30(%rsp)
mov    %rdx,0x70(%rsp)
lea    0x0(,%rdx,8),%r15
mov    %r15,%rdi
call   1090 <malloc@plt>
mov    %rax,0xf8(%rsp)
mov    %r15,%rdi
call   1090 <malloc@plt>
mov    %rax,0xf0(%rsp)
mov    %r15,%rdi
call   1090 <malloc@plt>
mov    %rax,0xe0(%rsp)
mov    %r15,%rdi
call   1090 <malloc@plt>
mov    %rax,0xd8(%rsp)
lea    0x0(,%rbx,8),%r13
mov    %r13,%rdi
call   1090 <malloc@plt>
mov    %rax,0x98(%rsp)
mov    %r13,%rdi
call   1090 <malloc@plt>
mov    %rax,%r12
mov    %ebx,%r14d
mov    %rbp,%rax
mov    %rbp,0x58(%rsp)
mov    %ebp,%eax
mov    %rax,0x28(%rsp)
test   %rbx,%rbx
jle    1309 <fast_s_large_n+0x159>
lea    0x8(,%r14,8),%rbp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdi
call   1090 <malloc@plt>
mov    0x98(%rsp),%rcx
mov    %rax,(%rcx,%rbx,8)
mov    %rbp,%rdi
call   1090 <malloc@plt>
mov    %rax,(%r12,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    12e0 <fast_s_large_n+0x130>
mov    %r14,0x128(%rsp)
mov    %r12,0xe8(%rsp)
mov    0x70(%rsp),%eax
mov    %rax,0xd0(%rsp)
mov    %r13,%rdi
call   1090 <malloc@plt>
mov    %rax,%r12
mov    0x58(%rsp),%rax
lea    0x0(,%rax,8),%rdi
mov    %rdi,0x8(%rsp)
call   1090 <malloc@plt>
mov    %rax,%r14
mov    0x28(%rsp),%rbp
test   %ebp,%ebp
jle    1375 <fast_s_large_n+0x1c5>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r13,%rdi
call   1090 <malloc@plt>
mov    %rax,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1360 <fast_s_large_n+0x1b0>
mov    %r14,0x78(%rsp)
mov    0x8(%rsp),%rdi
call   1090 <malloc@plt>
mov    %rax,0x80(%rsp)
imul   0x20(%rsp),%ebp
movslq %ebp,%rbx
lea    0x0(,%rbx,8),%rdi
mov    %rdi,0x18(%rsp)
call   1090 <malloc@plt>
mov    %rax,%r14
mov    0x18(%rsp),%rdi
call   1090 <malloc@plt>
mov    %rax,0xb8(%rsp)
mov    %ebp,0x4c(%rsp)
mov    %ebp,%ebp
test   %ebx,%ebx
jle    13e5 <fast_s_large_n+0x235>
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
call   1090 <malloc@plt>
mov    %rax,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    13d0 <fast_s_large_n+0x220>
mov    %rbp,0x100(%rsp)
mov    %r14,0xc0(%rsp)
mov    %r15,%rdi
call   1090 <malloc@plt>
mov    %rax,%r14
mov    0xd0(%rsp),%rbp
test   %ebp,%ebp
jle    1425 <fast_s_large_n+0x275>
xor    %ebx,%ebx
xchg   %ax,%ax
mov    %r13,%rdi
call   1090 <malloc@plt>
mov    %rax,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1410 <fast_s_large_n+0x260>
mov    %r14,0x88(%rsp)
mov    0x50(%rsp),%ebx
imul   0x20(%rsp),%ebx
movslq %ebx,%r14
mov    %r14,0x40(%rsp)
lea    0x0(,%r14,4),%rdi
call   1090 <malloc@plt>
mov    %rax,0xc8(%rsp)
lea    0x0(,%r14,8),%r14
mov    %r14,%rdi
call   1090 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    %r14,%rdi
call   1090 <malloc@plt>
mov    %rax,0x90(%rsp)
mov    %ebx,0xa0(%rsp)
mov    %ebx,%r14d
cmpl   $0x0,0x40(%rsp)
jle    14aa <fast_s_large_n+0x2fa>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdi
call   1090 <malloc@plt>
mov    0x18(%rsp),%rcx
mov    %rax,(%rcx,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1490 <fast_s_large_n+0x2e0>
mov    %r14,0x40(%rsp)
test   %ebp,%ebp
mov    0x70(%rsp),%r13
mov    0x128(%rsp),%r14
jle    15ca <fast_s_large_n+0x41a>
lea    -0x1(%r14),%r8
mov    %r14d,%ecx
and    $0x3,%ecx
mov    %r14d,%r11d
and    $0xfffffffc,%r11d
mov    %r13,%rsi
shl    $0x4,%rsi
mov    %r13,%rdi
shl    $0x5,%rdi
lea    (%r15,%r15,2),%rax
xor    %r10d,%r10d
mov    0x60(%rsp),%r9
jmp    1519 <fast_s_large_n+0x369>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r10
add    $0x8,%r9
mov    0xd0(%rsp),%rbp
cmp    %rbp,%r10
je     15ca <fast_s_large_n+0x41a>
test   %r14d,%r14d
jle    1500 <fast_s_large_n+0x350>
mov    0x88(%rsp),%rdx
mov    (%rdx,%r10,8),%rbx
cmp    $0x3,%r8
jae    1540 <fast_s_large_n+0x390>
xor    %ebp,%ebp
jmp    1587 <fast_s_large_n+0x3d7>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r9,%rdx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rdx),%xmm0
movsd  %xmm0,(%rbx,%rbp,8)
movsd  (%rdx,%r13,8),%xmm0
movsd  %xmm0,0x8(%rbx,%rbp,8)
movsd  (%rdx,%rsi,1),%xmm0
movsd  %xmm0,0x10(%rbx,%rbp,8)
movsd  (%rdx,%rax,1),%xmm0
movsd  %xmm0,0x18(%rbx,%rbp,8)
add    $0x4,%rbp
add    %rdi,%rdx
cmp    %rbp,%r11
jne    1550 <fast_s_large_n+0x3a0>
test   %rcx,%rcx
je     1500 <fast_s_large_n+0x350>
lea    (%rbx,%rbp,8),%rbx
imul   %r13,%rbp
add    %r10,%rbp
mov    0x60(%rsp),%rdx
lea    (%rdx,%rbp,8),%rdx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
movsd  (%rdx),%xmm0
movsd  %xmm0,(%rbx,%rbp,8)
add    $0x1,%rbp
add    %r15,%rdx
cmp    %rbp,%rcx
jne    15b0 <fast_s_large_n+0x400>
jmp    1500 <fast_s_large_n+0x350>
mov    $0x25,%edi
xor    %eax,%eax
call   1070 <srand@plt>
lea    -0x1(%rbp),%esi
mov    0xa0(%rsp),%ebx
mov    %ebx,%edi
mov    0xc8(%rsp),%rdx
call   1050 <sample_n_outof_N@plt>
test   %ebx,%ebx
jle    17cc <fast_s_large_n+0x61c>
mov    %r14d,%r11d
and    $0xfffffffc,%r11d
lea    -0x4(%r11),%r8
mov    %r8,%r10
shr    $0x2,%r10
add    $0x1,%r10
mov    %r10d,%r9d
and    $0x3,%r9d
movabs $0x7ffffffffffffffc,%rax
ff ff 7f
and    %rax,%r10
mov    %r14d,%r15d
and    $0x3,%r15d
mov    %r9,%rsi
shl    $0x5,%rsi
xor    %ecx,%ecx
jmp    166a <fast_s_large_n+0x4ba>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x110(%rsp),%rax
movsd  (%rax,%r13,8),%xmm0
mov    0x90(%rsp),%rax
movsd  %xmm0,(%rax,%rcx,8)
add    $0x1,%rcx
cmp    0x40(%rsp),%rcx
je     17cc <fast_s_large_n+0x61c>
mov    0xc8(%rsp),%rax
movslq (%rax,%rcx,4),%r13
test   %r14d,%r14d
jle    1640 <fast_s_large_n+0x490>
mov    0x88(%rsp),%rax
mov    (%rax,%r13,8),%rdx
mov    0x18(%rsp),%rax
mov    (%rax,%rcx,8),%rax
cmp    $0x4,%r14d
jb     16a8 <fast_s_large_n+0x4f8>
lea    (%rdx,%r14,8),%rdi
cmp    %rdi,%rax
jae    171c <fast_s_large_n+0x56c>
lea    (%rax,%r14,8),%rdi
cmp    %rdi,%rdx
jae    171c <fast_s_large_n+0x56c>
xor    %ebp,%ebp
mov    %rbp,%rdi
not    %rdi
add    %r14,%rdi
test   %r15,%r15
je     16d4 <fast_s_large_n+0x524>
mov    %r15,%rbx
nopl   0x0(%rax,%rax,1)
movsd  (%rdx,%rbp,8),%xmm0
movsd  %xmm0,(%rax,%rbp,8)
add    $0x1,%rbp
add    $0xffffffffffffffff,%rbx
jne    16c0 <fast_s_large_n+0x510>
cmp    $0x3,%rdi
jb     1640 <fast_s_large_n+0x490>
xchg   %ax,%ax
movsd  (%rdx,%rbp,8),%xmm0
movsd  %xmm0,(%rax,%rbp,8)
movsd  0x8(%rdx,%rbp,8),%xmm0
movsd  %xmm0,0x8(%rax,%rbp,8)
movsd  0x10(%rdx,%rbp,8),%xmm0
movsd  %xmm0,0x10(%rax,%rbp,8)
movsd  0x18(%rdx,%rbp,8),%xmm0
movsd  %xmm0,0x18(%rax,%rbp,8)
add    $0x4,%rbp
cmp    %rbp,%r14
jne    16e0 <fast_s_large_n+0x530>
jmp    1640 <fast_s_large_n+0x490>
cmp    $0xc,%r8
jae    1726 <fast_s_large_n+0x576>
xor    %ebp,%ebp
jmp    1788 <fast_s_large_n+0x5d8>
mov    %r10,%rdi
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
movups (%rdx,%rbp,8),%xmm0
movups 0x10(%rdx,%rbp,8),%xmm1
movups %xmm0,(%rax,%rbp,8)
movups %xmm1,0x10(%rax,%rbp,8)
movups 0x20(%rdx,%rbp,8),%xmm0
movups 0x30(%rdx,%rbp,8),%xmm1
movups %xmm0,0x20(%rax,%rbp,8)
movups %xmm1,0x30(%rax,%rbp,8)
movups 0x40(%rdx,%rbp,8),%xmm0
movups 0x50(%rdx,%rbp,8),%xmm1
movups %xmm0,0x40(%rax,%rbp,8)
movups %xmm1,0x50(%rax,%rbp,8)
movups 0x60(%rdx,%rbp,8),%xmm0
movups 0x70(%rdx,%rbp,8),%xmm1
movups %xmm0,0x60(%rax,%rbp,8)
movups %xmm1,0x70(%rax,%rbp,8)
add    $0x10,%rbp
add    $0xfffffffffffffffc,%rdi
jne    1730 <fast_s_large_n+0x580>
test   %r9,%r9
je     17bb <fast_s_large_n+0x60b>
lea    (%rax,%rbp,8),%rdi
add    $0x10,%rdi
lea    (%rdx,%rbp,8),%rbx
add    $0x10,%rbx
xor    %ebp,%ebp
nop
movups -0x10(%rbx,%rbp,1),%xmm0
movups (%rbx,%rbp,1),%xmm1
movups %xmm0,-0x10(%rdi,%rbp,1)
movups %xmm1,(%rdi,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%rsi
jne    17a0 <fast_s_large_n+0x5f0>
mov    %r11,%rbp
cmp    %r14,%r11
je     1640 <fast_s_large_n+0x490>
jmp    16aa <fast_s_large_n+0x4fa>
cmpl   $0x0,0x20(%rsp)
jle    1874 <fast_s_large_n+0x6c4>
mov    0x20(%rsp),%rax
lea    -0x1(%rax),%r13
xor    %ebx,%ebx
mov    0xb8(%rsp),%rbp
mov    0xc0(%rsp),%r15
mov    0x50(%rsp),%eax
cs nopw 0x0(%rax,%rax,1)
cltq
imul   %rbx,%rax
mov    0x18(%rsp),%rcx
lea    (%rcx,%rax,8),%rdi
mov    0x90(%rsp),%rcx
lea    (%rcx,%rax,8),%rsi
sub    $0x8,%rsp
lea    0x1c(%rsp),%rdx
mov    0xb0(%rsp),%rcx
mov    0xb8(%rsp),%r8
mov    0x70(%rsp),%r9
push   %rbp
push   %r15
push   0x1a8(%rsp)
push   0x1a8(%rsp)
push   0x1a8(%rsp)
call   1040 <fast_s_with_memory@plt>
add    $0x30,%rsp
cmp    %rbx,%r13
je     1874 <fast_s_large_n+0x6c4>
mov    0x14(%rsp),%eax
mov    0x8(%rsp),%rcx
add    %rcx,%r15
add    %rcx,%rbp
add    $0x1,%rbx
jmp    1800 <fast_s_large_n+0x650>
mov    0x28(%rsp),%rsi
test   %esi,%esi
mov    0x80(%rsp),%rbx
jle    19ad <fast_s_large_n+0x7fd>
cmpl   $0x4,0x58(%rsp)
jae    1897 <fast_s_large_n+0x6e7>
xor    %eax,%eax
jmp    1987 <fast_s_large_n+0x7d7>
mov    %esi,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rdi
mov    %rdi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x7,%ecx
cmp    $0x1c,%rdi
jae    18bd <fast_s_large_n+0x70d>
xor    %edi,%edi
jmp    1951 <fast_s_large_n+0x7a1>
movabs $0x7ffffffffffffffc,%rdi
ff ff 7f
add    $0xfffffffffffffffc,%rdi
and    %rdi,%rdx
xor    %edi,%edi
movaps 0x1729(%rip),%xmm0
nopw   0x0(%rax,%rax,1)
movups %xmm0,(%rbx,%rdi,8)
movups %xmm0,0x10(%rbx,%rdi,8)
movups %xmm0,0x20(%rbx,%rdi,8)
movups %xmm0,0x30(%rbx,%rdi,8)
movups %xmm0,0x40(%rbx,%rdi,8)
movups %xmm0,0x50(%rbx,%rdi,8)
movups %xmm0,0x60(%rbx,%rdi,8)
movups %xmm0,0x70(%rbx,%rdi,8)
movups %xmm0,0x80(%rbx,%rdi,8)
movups %xmm0,0x90(%rbx,%rdi,8)
movups %xmm0,0xa0(%rbx,%rdi,8)
movups %xmm0,0xb0(%rbx,%rdi,8)
movups %xmm0,0xc0(%rbx,%rdi,8)
movups %xmm0,0xd0(%rbx,%rdi,8)
movups %xmm0,0xe0(%rbx,%rdi,8)
movups %xmm0,0xf0(%rbx,%rdi,8)
add    $0x20,%rdi
add    $0xfffffffffffffff8,%rdx
jne    18e0 <fast_s_large_n+0x730>
test   %rcx,%rcx
je     1982 <fast_s_large_n+0x7d2>
lea    (%rbx,%rdi,8),%rdx
add    $0x10,%rdx
shl    $0x5,%rcx
xor    %edi,%edi
movaps 0x1695(%rip),%xmm0
nopl   0x0(%rax,%rax,1)
movups %xmm0,-0x10(%rdx,%rdi,1)
movups %xmm0,(%rdx,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rcx
jne    1970 <fast_s_large_n+0x7c0>
cmp    %rsi,%rax
je     19ad <fast_s_large_n+0x7fd>
movabs $0x4415af1d78b58c40,%rcx
af 15 44
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rcx,(%rbx,%rax,8)
add    $0x1,%rax
cmp    %rax,%rsi
jne    19a0 <fast_s_large_n+0x7f0>
mov    0x78(%rsp),%rdi
mov    %r14d,%edx
call   10b0 <reset_mat@plt>
cmpl   $0x0,0x4c(%rsp)
movsd  0x38(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
jle    1d31 <fast_s_large_n+0xb81>
mov    0x14(%rsp),%r13d
imul   0x20(%rsp),%r13d
lea    (%r12,%r14,8),%rax
mov    %rax,0x40(%rsp)
mov    %r14d,%eax
and    $0xfffffffc,%eax
mov    %rax,0x60(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0x58(%rsp)
mov    %rax,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
mov    %ecx,%edx
and    $0x3,%edx
movabs $0x7ffffffffffffffc,%rax
ff ff 7f
and    %rax,%rcx
mov    %rcx,0x120(%rsp)
mov    %r14d,%eax
and    $0x3,%eax
lea    0x10(%r12),%rcx
mov    %rcx,0xa0(%rsp)
mov    %rdx,0x50(%rsp)
mov    %rdx,%rbx
shl    $0x5,%rbx
movsd  0x15cb(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %r15d,%r15d
movl   $0x0,0x68(%rsp)
mov    %rax,0xa8(%rsp)
mov    %rbx,0xb0(%rsp)
jmp    1aad <fast_s_large_n+0x8fd>
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    0x28(%rsp),%rsi
call   10c0 <find_max@plt>
mov    %eax,0x68(%rsp)
cltq
movsd  0x0(%rbp,%rax,8),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x38(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
add    $0x1,%r15
cmp    0x100(%rsp),%r15
je     1d31 <fast_s_large_n+0xb81>
mov    0xb8(%rsp),%rax
lea    (%rax,%r15,8),%rax
mov    0x18(%rsp),%rdi
mov    0x90(%rsp),%rsi
mov    0xf0(%rsp),%rdx
mov    %r13d,%ecx
mov    %r14d,%r8d
mov    %r13d,%ebx
mov    0xf8(%rsp),%r13
mov    %r13,%r9
movsd  0x38(%rsp),%xmm0
lea    0x118(%rsp),%rbp
push   %rbp
push   %r12
push   %rax
push   $0x0
push   0x128(%rsp)
mov    0xe8(%rsp),%rax
push   (%rax,%r15,8)
push   0x118(%rsp)
push   0xd0(%rsp)
push   0x118(%rsp)
push   0x128(%rsp)
call   1060 <refine_fast_s@plt>
add    $0x50,%rsp
mov    %r13,%rdi
movsd  0x8(%rsp),%xmm0
mov    %ebx,%esi
mov    %r14d,%edx
movsd  0x30(%rsp),%xmm1
call   10a0 <loss_rho@plt>
movsd  0x38(%rsp),%xmm1
ucomisd %xmm0,%xmm1
movsd  0x38(%rsp),%xmm0
jbe    1c50 <fast_s_large_n+0xaa0>
movsd  0x118(%rsp),%xmm2
mov    %r13,%rdi
movsd  0x30(%rsp),%xmm1
mov    %ebx,%esi
mov    %r14d,%edx
call   10d0 <find_scale@plt>
movsd  %xmm0,0x118(%rsp)
movslq 0x68(%rsp),%rax
mov    0x80(%rsp),%rbp
movsd  %xmm0,0x0(%rbp,%rax,8)
test   %r14d,%r14d
mov    %ebx,%r13d
mov    0xb0(%rsp),%rbx
jle    1a70 <fast_s_large_n+0x8c0>
mov    0x78(%rsp),%rcx
mov    (%rcx,%rax,8),%rax
cmp    $0x4,%r14d
jb     1bd0 <fast_s_large_n+0xa20>
cmp    %rax,0x40(%rsp)
jbe    1c5e <fast_s_large_n+0xaae>
lea    (%rax,%r14,8),%rcx
cmp    %rcx,%r12
jae    1c5e <fast_s_large_n+0xaae>
xor    %ecx,%ecx
mov    %rcx,%rdx
not    %rdx
add    %r14,%rdx
mov    0xa8(%rsp),%rsi
test   %rsi,%rsi
je     1c05 <fast_s_large_n+0xa55>
nopl   0x0(%rax,%rax,1)
movsd  (%r12,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    1bf0 <fast_s_large_n+0xa40>
cmp    $0x3,%rdx
jb     1a70 <fast_s_large_n+0x8c0>
nop
movsd  (%r12,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  0x8(%r12,%rcx,8),%xmm0
movsd  %xmm0,0x8(%rax,%rcx,8)
movsd  0x10(%r12,%rcx,8),%xmm0
movsd  %xmm0,0x10(%rax,%rcx,8)
movsd  0x18(%r12,%rcx,8),%xmm0
movsd  %xmm0,0x18(%rax,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%r14
jne    1c10 <fast_s_large_n+0xa60>
jmp    1a70 <fast_s_large_n+0x8c0>
movsd  0x30(%rsp),%xmm1
mov    %ebx,%r13d
jmp    1a9b <fast_s_large_n+0x8eb>
cmpq   $0xc,0x58(%rsp)
jae    1c6a <fast_s_large_n+0xaba>
xor    %ecx,%ecx
jmp    1ce0 <fast_s_large_n+0xb30>
mov    0x120(%rsp),%rdx
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movups (%r12,%rcx,8),%xmm0
movups 0x10(%r12,%rcx,8),%xmm1
movups %xmm0,(%rax,%rcx,8)
movups %xmm1,0x10(%rax,%rcx,8)
movups 0x20(%r12,%rcx,8),%xmm0
movups 0x30(%r12,%rcx,8),%xmm1
movups %xmm0,0x20(%rax,%rcx,8)
movups %xmm1,0x30(%rax,%rcx,8)
movups 0x40(%r12,%rcx,8),%xmm0
movups 0x50(%r12,%rcx,8),%xmm1
movups %xmm0,0x40(%rax,%rcx,8)
movups %xmm1,0x50(%rax,%rcx,8)
movups 0x60(%r12,%rcx,8),%xmm0
movups 0x70(%r12,%rcx,8),%xmm1
movups %xmm0,0x60(%rax,%rcx,8)
movups %xmm1,0x70(%rax,%rcx,8)
add    $0x10,%rcx
add    $0xfffffffffffffffc,%rdx
jne    1c80 <fast_s_large_n+0xad0>
cmpq   $0x0,0x50(%rsp)
je     1d1b <fast_s_large_n+0xb6b>
lea    (%rax,%rcx,8),%rdx
add    $0x10,%rdx
mov    0xa0(%rsp),%rsi
lea    (%rsi,%rcx,8),%rcx
xor    %esi,%esi
xchg   %ax,%ax
movups -0x10(%rcx,%rsi,1),%xmm0
movups (%rcx,%rsi,1),%xmm1
movups %xmm0,-0x10(%rdx,%rsi,1)
movups %xmm1,(%rdx,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%rbx
jne    1d00 <fast_s_large_n+0xb50>
mov    0x60(%rsp),%rdx
mov    %rdx,%rcx
cmp    %r14,%rdx
je     1a70 <fast_s_large_n+0x8c0>
jmp    1bd2 <fast_s_large_n+0xa22>
cmpl   $0x0,0x28(%rsp)
jle    1e4d <fast_s_large_n+0xc9d>
lea    0x0(,%r14,8),%rbx
mov    0x28(%rsp),%rax
lea    0x0(,%rax,8),%rbp
movsd  0x12b7(%rip),%xmm2
movsd  %xmm2,0x8(%rsp)
xor    %r13d,%r13d
lea    0x130(%rsp),%r15
jmp    1da2 <fast_s_large_n+0xbf2>
nopl   0x0(%rax)
mov    0x198(%rsp),%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
movsd  %xmm1,0x8(%rsp)
call   1080 <memcpy@plt>
add    $0x8,%r13
cmp    %r13,%rbp
movsd  0x38(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
je     1e4d <fast_s_large_n+0xc9d>
mov    0x80(%rsp),%rax
add    %r13,%rax
mov    0x88(%rsp),%rdi
mov    0x110(%rsp),%rsi
mov    0xf0(%rsp),%rdx
mov    0x70(%rsp),%rcx
mov    %r14d,%r8d
mov    0xf8(%rsp),%r9
push   %r15
push   %r12
push   %rax
push   $0x1
push   0x128(%rsp)
mov    0xa0(%rsp),%rax
push   (%rax,%r13,1)
push   0x118(%rsp)
push   0xd0(%rsp)
push   0x118(%rsp)
push   0x128(%rsp)
call   1060 <refine_fast_s@plt>
add    $0x50,%rsp
movsd  0x130(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1d89 <fast_s_large_n+0xbd9>
mov    0x1a0(%rsp),%rax
movsd  %xmm1,(%rax)
test   %r14d,%r14d
jg     1d70 <fast_s_large_n+0xbc0>
movsd  %xmm1,0x8(%rsp)
jmp    1d89 <fast_s_large_n+0xbd9>
cmpl   $0x0,0xd0(%rsp)
mov    0x88(%rsp),%r15
jle    1e82 <fast_s_large_n+0xcd2>
mov    0x70(%rsp),%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r15,%rbp,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1e70 <fast_s_large_n+0xcc0>
mov    %r15,%rdi
call   1030 <free@plt>
mov    0xb8(%rsp),%rdi
call   1030 <free@plt>
cmpl   $0x0,0x4c(%rsp)
mov    0xe8(%rsp),%r13
mov    0xc0(%rsp),%rbp
mov    0x100(%rsp),%r15
jle    1ed3 <fast_s_large_n+0xd23>
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    1ec0 <fast_s_large_n+0xd10>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0xc8(%rsp),%rdi
call   1030 <free@plt>
mov    0x90(%rsp),%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rax
imul   0x14(%rsp),%eax
test   %eax,%eax
mov    0x18(%rsp),%r15
jle    1f22 <fast_s_large_n+0xd72>
mov    %eax,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax)
mov    (%r15,%rbp,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1f10 <fast_s_large_n+0xd60>
mov    %r15,%rdi
call   1030 <free@plt>
mov    0xe0(%rsp),%rdi
call   1030 <free@plt>
mov    0xd8(%rsp),%rdi
call   1030 <free@plt>
test   %r14d,%r14d
mov    0x98(%rsp),%rbp
jle    1f7d <fast_s_large_n+0xdcd>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    0x0(%rbp,%rbx,8),%rdi
call   1030 <free@plt>
mov    0x0(%r13,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1f60 <fast_s_large_n+0xdb0>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    0xf0(%rsp),%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rbp
test   %ebp,%ebp
mov    0xf8(%rsp),%r14
mov    0x78(%rsp),%r15
jle    1fd2 <fast_s_large_n+0xe22>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r15,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1fc0 <fast_s_large_n+0xe10>
mov    %r15,%rdi
call   1030 <free@plt>
mov    0x80(%rsp),%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
add    $0x138,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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