int constrained_least_squares(int m, int n, double **matrix, int c,
                              int *constrained) {
  if (m < 1 || n < 1 || n > m || c > n)
    return -2;
  int i, j;
  int f = m - c, u = n - c;
  char transa, transb;
  double alpha, beta;
  int info;
  int lwork = m * m;
  double *work;
  if (!allocate_double_vector(&work, lwork)) {
    return -1;
  }
  int *ipiv;
  if (!allocate_integer_vector(&ipiv, c)) {
    return -1;
  }
  double *tau;
  if (!allocate_double_vector(&tau, c)) {
    return -1;
  }
  double **t_matrix;
  if (!allocate_double_matrix(&t_matrix, m, m)) {
    return -1;
  }
  double **c_matrix;
  if (!allocate_double_matrix(&c_matrix, n, n)) {
    return -1;
  }
  double **r_matrix;
  if (!allocate_double_matrix(&r_matrix, c, c)) {
    return -1;
  }
  double **a_matrix;
  if (!allocate_double_matrix(&a_matrix, n, f)) {
    return -1;
  }
  double **d_matrix;
  if (!allocate_double_matrix(&d_matrix, f, f)) {
    return -1;
  }
  int *temp, *unconstrained;
  if (!allocate_integer_vector(&temp, m)) {
    return -1;
  }
  if (!allocate_integer_vector(&unconstrained, f)) {
    return -1;
  }
  for (i = 0; i < m; i++)
    temp[i] = 0;
  for (i = 0; i < c; i++)
    temp[constrained[i]] = 1;
  j = 0;
  for (i = 0; i < m; i++)
    if (!temp[i])
      unconstrained[j++] = i;
  for (i = 0; i < f; i++)
    for (j = 0; j < n; j++)
      t_matrix[i][j] = matrix[j][unconstrained[i]];
  for (i = 0; i < c; i++)
    for (j = 0; j < n; j++)
      c_matrix[i][j] = matrix[j][constrained[i]];
  dgeqrf_(&n, &c, c_matrix[0], &n, tau, work, &lwork, &info);
  for (i = 0; i < c; i++)
    for (j = 0; j < c; j++)
      r_matrix[i][j] = ((j >= i) ? c_matrix[j][i] : 0);
  dorgqr_(&n, &n, &c, c_matrix[0], &n, tau, work, &lwork, &info);
  transa = 'T';
  transb = 'N';
  alpha = 1.0;
  beta = 0.0;
  dgemm_(&transa, &transb, &f, &n, &n, &alpha, t_matrix[0], &m, c_matrix[0], &n,
         &beta, a_matrix[0], &f);
  dgetrf_(&c, &c, r_matrix[0], &c, ipiv, &info);
  dgetri_(&c, r_matrix[0], &c, ipiv, work, &lwork, &info);
  for (i = 0; i < f; i++)
    for (j = 0; j < u; j++)
      t_matrix[j][i] = a_matrix[j + c][i];
  for (i = 0; i < f; i++)
    for (j = 0; j < f; j++)
      d_matrix[i][j] = (i == j);
  transa = 'N';
  dgels_(&transa, &f, &u, &f, t_matrix[0], &m, d_matrix[0], &f, work, &lwork,
         &info);
  transa = transb = 'N';
  alpha = 1.0;
  beta = 0.0;
  dgemm_(&transa, &transb, &n, &f, &u, &alpha, c_matrix[c], &n, d_matrix[0], &f,
         &beta, t_matrix[0], &m);
  alpha = -1.0;
  beta = 1.0;
  dgemm_(&transa, &transb, &n, &c, &f, &alpha, t_matrix[0], &m, a_matrix[0], &f,
         &beta, c_matrix[0], &n);
  alpha = 1.0;
  beta = 0.0;
  dgemm_(&transa, &transb, &n, &c, &c, &alpha, c_matrix[0], &n, r_matrix[0], &c,
         &beta, t_matrix[f], &m);
  for (i = 0; i < n; i++)
    for (j = 0; j < f; j++)
      matrix[i][unconstrained[j]] = t_matrix[j][i];
  for (i = 0; i < n; i++)
    for (j = 0; j < c; j++)
      matrix[i][constrained[j]] = t_matrix[j + f][i];
  free_vector(work);
  free_vector(ipiv);
  free_vector(tau);
  free_vector(temp);
  free_vector(unconstrained);
  free_matrix((void **)t_matrix);
  free_matrix((void **)c_matrix);
  free_matrix((void **)r_matrix);
  free_matrix((void **)a_matrix);
  free_matrix((void **)d_matrix);
  return 1;
}


x86 assembly (clang, -O0):
<constrained_least_squares>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xf0,%rsp
mov    %edi,-0x28(%rbp)
mov    %esi,-0x2c(%rbp)
mov    %rdx,-0x38(%rbp)
mov    %ecx,-0x3c(%rbp)
mov    %r8,-0x48(%rbp)
cmpl   $0x1,-0x28(%rbp)
jl     11ff <constrained_least_squares+0x4f>
cmpl   $0x1,-0x2c(%rbp)
jl     11ff <constrained_least_squares+0x4f>
mov    -0x2c(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     11ff <constrained_least_squares+0x4f>
mov    -0x3c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jle    120b <constrained_least_squares+0x5b>
movl   $0xfffffffe,-0x24(%rbp)
jmp    1be5 <constrained_least_squares+0xa35>
mov    -0x28(%rbp),%eax
sub    -0x3c(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x2c(%rbp),%eax
sub    -0x3c(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x28(%rbp),%eax
imul   -0x28(%rbp),%eax
mov    %eax,-0x78(%rbp)
mov    -0x78(%rbp),%esi
lea    -0x80(%rbp),%rdi
mov    $0x0,%al
call   1090 <allocate_double_vector@plt>
cmp    $0x0,%eax
jne    124a <constrained_least_squares+0x9a>
movl   $0xffffffff,-0x24(%rbp)
jmp    1be5 <constrained_least_squares+0xa35>
mov    -0x3c(%rbp),%esi
lea    -0x88(%rbp),%rdi
mov    $0x0,%al
call   1060 <allocate_integer_vector@plt>
cmp    $0x0,%eax
jne    1270 <constrained_least_squares+0xc0>
movl   $0xffffffff,-0x24(%rbp)
jmp    1be5 <constrained_least_squares+0xa35>
mov    -0x3c(%rbp),%esi
lea    -0x90(%rbp),%rdi
mov    $0x0,%al
call   1090 <allocate_double_vector@plt>
cmp    $0x0,%eax
jne    1296 <constrained_least_squares+0xe6>
movl   $0xffffffff,-0x24(%rbp)
jmp    1be5 <constrained_least_squares+0xa35>
mov    -0x28(%rbp),%esi
mov    -0x28(%rbp),%edx
lea    -0x98(%rbp),%rdi
mov    $0x0,%al
call   10b0 <allocate_double_matrix@plt>
cmp    $0x0,%eax
jne    12bf <constrained_least_squares+0x10f>
movl   $0xffffffff,-0x24(%rbp)
jmp    1be5 <constrained_least_squares+0xa35>
mov    -0x2c(%rbp),%esi
mov    -0x2c(%rbp),%edx
lea    -0xa0(%rbp),%rdi
mov    $0x0,%al
call   10b0 <allocate_double_matrix@plt>
cmp    $0x0,%eax
jne    12e8 <constrained_least_squares+0x138>
movl   $0xffffffff,-0x24(%rbp)
jmp    1be5 <constrained_least_squares+0xa35>
mov    -0x3c(%rbp),%esi
mov    -0x3c(%rbp),%edx
lea    -0xa8(%rbp),%rdi
mov    $0x0,%al
call   10b0 <allocate_double_matrix@plt>
cmp    $0x0,%eax
jne    1311 <constrained_least_squares+0x161>
movl   $0xffffffff,-0x24(%rbp)
jmp    1be5 <constrained_least_squares+0xa35>
mov    -0x2c(%rbp),%esi
mov    -0x54(%rbp),%edx
lea    -0xb0(%rbp),%rdi
mov    $0x0,%al
call   10b0 <allocate_double_matrix@plt>
cmp    $0x0,%eax
jne    133a <constrained_least_squares+0x18a>
movl   $0xffffffff,-0x24(%rbp)
jmp    1be5 <constrained_least_squares+0xa35>
mov    -0x54(%rbp),%esi
mov    -0x54(%rbp),%edx
lea    -0xb8(%rbp),%rdi
mov    $0x0,%al
call   10b0 <allocate_double_matrix@plt>
cmp    $0x0,%eax
jne    1363 <constrained_least_squares+0x1b3>
movl   $0xffffffff,-0x24(%rbp)
jmp    1be5 <constrained_least_squares+0xa35>
mov    -0x28(%rbp),%esi
lea    -0xc0(%rbp),%rdi
mov    $0x0,%al
call   1060 <allocate_integer_vector@plt>
cmp    $0x0,%eax
jne    1389 <constrained_least_squares+0x1d9>
movl   $0xffffffff,-0x24(%rbp)
jmp    1be5 <constrained_least_squares+0xa35>
mov    -0x54(%rbp),%esi
lea    -0xc8(%rbp),%rdi
mov    $0x0,%al
call   1060 <allocate_integer_vector@plt>
cmp    $0x0,%eax
jne    13af <constrained_least_squares+0x1ff>
movl   $0xffffffff,-0x24(%rbp)
jmp    1be5 <constrained_least_squares+0xa35>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    13e2 <constrained_least_squares+0x232>
mov    -0xc0(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    13b6 <constrained_least_squares+0x206>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    141d <constrained_least_squares+0x26d>
mov    -0xc0(%rbp),%rax
mov    -0x48(%rbp),%rcx
movslq -0x4c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    13e9 <constrained_least_squares+0x239>
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    147a <constrained_least_squares+0x2ca>
mov    -0xc0(%rbp),%rax
movslq -0x4c(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    1467 <constrained_least_squares+0x2b7>
mov    -0x4c(%rbp),%edx
mov    -0xc8(%rbp),%rax
mov    -0x50(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x50(%rbp)
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
jmp    146c <constrained_least_squares+0x2bc>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    142b <constrained_least_squares+0x27b>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    14f9 <constrained_least_squares+0x349>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    14e6 <constrained_least_squares+0x336>
mov    -0x38(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0xc8(%rbp),%rcx
movslq -0x4c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x98(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1494 <constrained_least_squares+0x2e4>
jmp    14eb <constrained_least_squares+0x33b>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1481 <constrained_least_squares+0x2d1>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1575 <constrained_least_squares+0x3c5>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1562 <constrained_least_squares+0x3b2>
mov    -0x38(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x48(%rbp),%rcx
movslq -0x4c(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0xa0(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1513 <constrained_least_squares+0x363>
jmp    1567 <constrained_least_squares+0x3b7>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1500 <constrained_least_squares+0x350>
mov    -0xa0(%rbp),%rax
mov    (%rax),%rdx
mov    -0x90(%rbp),%r8
mov    -0x80(%rbp),%r9
lea    -0x2c(%rbp),%rcx
lea    -0x3c(%rbp),%rsi
lea    -0x78(%rbp),%r10
lea    -0x74(%rbp),%rax
mov    %rcx,%rdi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1040 <dgeqrf_@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1655 <constrained_least_squares+0x4a5>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1642 <constrained_least_squares+0x492>
mov    -0x50(%rbp),%eax
cmp    -0x4c(%rbp),%eax
jl     1604 <constrained_least_squares+0x454>
mov    -0xa0(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
jmp    1614 <constrained_least_squares+0x464>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
jmp    1614 <constrained_least_squares+0x464>
movsd  -0xd0(%rbp),%xmm0
ff
mov    -0xa8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    15c7 <constrained_least_squares+0x417>
jmp    1647 <constrained_least_squares+0x497>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    15b4 <constrained_least_squares+0x404>
mov    -0xa0(%rbp),%rax
mov    (%rax),%rcx
mov    -0x90(%rbp),%r9
mov    -0x80(%rbp),%r11
lea    -0x2c(%rbp),%r8
lea    -0x3c(%rbp),%rdx
lea    -0x78(%rbp),%r10
lea    -0x74(%rbp),%rax
mov    %r8,%rdi
mov    %r8,%rsi
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    $0x0,%al
call   10d0 <dorgqr_@plt>
movb   $0x54,-0x59(%rbp)
movb   $0x4e,-0x5a(%rbp)
movsd  0x95b(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x98(%rbp),%rax
mov    (%rax),%r12
mov    -0xa0(%rbp),%rax
mov    (%rax),%r14
mov    -0xb0(%rbp),%rax
mov    (%rax),%r10
lea    -0x59(%rbp),%rdi
lea    -0x5a(%rbp),%rsi
lea    -0x54(%rbp),%rax
lea    -0x2c(%rbp),%rbx
lea    -0x68(%rbp),%r9
lea    -0x28(%rbp),%r15
lea    -0x70(%rbp),%r11
mov    %rax,%rdx
mov    %rbx,%rcx
mov    %rbx,%r8
mov    %r12,(%rsp)
mov    %r15,0x8(%rsp)
mov    %r14,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %rax,0x30(%rsp)
mov    $0x0,%al
call   1050 <dgemm_@plt>
mov    -0xa8(%rbp),%rax
mov    (%rax),%rdx
mov    -0x88(%rbp),%r8
lea    -0x3c(%rbp),%rcx
lea    -0x74(%rbp),%r9
mov    %rcx,%rdi
mov    %rcx,%rsi
mov    $0x0,%al
call   10c0 <dgetrf_@plt>
mov    -0xa8(%rbp),%rax
mov    (%rax),%rsi
mov    -0x88(%rbp),%rcx
mov    -0x80(%rbp),%r8
lea    -0x3c(%rbp),%rdx
lea    -0x78(%rbp),%r9
lea    -0x74(%rbp),%rax
mov    %rdx,%rdi
mov    %rax,(%rsp)
mov    $0x0,%al
call   10a0 <dgetri_@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    17ef <constrained_least_squares+0x63f>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x58(%rbp),%eax
jge    17dc <constrained_least_squares+0x62c>
mov    -0xb0(%rbp),%rax
mov    -0x50(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x98(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x4c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    178d <constrained_least_squares+0x5dd>
jmp    17e1 <constrained_least_squares+0x631>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    177a <constrained_least_squares+0x5ca>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    1860 <constrained_least_squares+0x6b0>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    184d <constrained_least_squares+0x69d>
mov    -0x4c(%rbp),%eax
cmp    -0x50(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
mov    -0xb8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1809 <constrained_least_squares+0x659>
jmp    1852 <constrained_least_squares+0x6a2>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    17f6 <constrained_least_squares+0x646>
movb   $0x4e,-0x59(%rbp)
mov    -0x98(%rbp),%rax
mov    (%rax),%r8
mov    -0xb8(%rbp),%rax
mov    (%rax),%r14
mov    -0x80(%rbp),%r11
lea    -0x59(%rbp),%rdi
lea    -0x54(%rbp),%rbx
lea    -0x58(%rbp),%rdx
lea    -0x28(%rbp),%r9
lea    -0x78(%rbp),%r10
lea    -0x74(%rbp),%rax
mov    %rbx,%rsi
mov    %rbx,%rcx
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10,0x18(%rsp)
mov    %rax,0x20(%rsp)
mov    $0x0,%al
call   1070 <dgels_@plt>
movb   $0x4e,-0x5a(%rbp)
movb   $0x4e,-0x59(%rbp)
movsd  0x737(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0xa0(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%r12
mov    -0xb8(%rbp),%rax
mov    (%rax),%r14
mov    -0x98(%rbp),%rax
mov    (%rax),%r10
lea    -0x59(%rbp),%rdi
lea    -0x5a(%rbp),%rsi
lea    -0x2c(%rbp),%r15
lea    -0x54(%rbp),%rbx
lea    -0x58(%rbp),%r8
lea    -0x68(%rbp),%r9
lea    -0x70(%rbp),%r11
lea    -0x28(%rbp),%rax
mov    %r15,%rdx
mov    %rbx,%rcx
mov    %r12,(%rsp)
mov    %r15,0x8(%rsp)
mov    %r14,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %rax,0x30(%rsp)
mov    $0x0,%al
call   1050 <dgemm_@plt>
movsd  0x6b8(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0x6a3(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x98(%rbp),%rax
mov    (%rax),%r12
mov    -0xb0(%rbp),%rax
mov    (%rax),%r14
mov    -0xa0(%rbp),%rax
mov    (%rax),%r10
lea    -0x59(%rbp),%rdi
lea    -0x5a(%rbp),%rsi
lea    -0x2c(%rbp),%rax
lea    -0x3c(%rbp),%rcx
lea    -0x54(%rbp),%rbx
lea    -0x68(%rbp),%r9
lea    -0x28(%rbp),%r15
lea    -0x70(%rbp),%r11
mov    %rax,%rdx
mov    %rbx,%r8
mov    %r12,(%rsp)
mov    %r15,0x8(%rsp)
mov    %r14,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %rax,0x30(%rsp)
mov    $0x0,%al
call   1050 <dgemm_@plt>
movsd  0x629(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0xa0(%rbp),%rax
mov    (%rax),%r12
mov    -0xa8(%rbp),%rax
mov    (%rax),%r14
mov    -0x98(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%r10
lea    -0x59(%rbp),%rdi
lea    -0x5a(%rbp),%rsi
lea    -0x2c(%rbp),%r15
lea    -0x3c(%rbp),%rbx
lea    -0x68(%rbp),%r9
lea    -0x70(%rbp),%r11
lea    -0x28(%rbp),%rax
mov    %r15,%rdx
mov    %rbx,%rcx
mov    %rbx,%r8
mov    %r12,(%rsp)
mov    %r15,0x8(%rsp)
mov    %r14,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %rax,0x30(%rsp)
mov    $0x0,%al
call   1050 <dgemm_@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1ad4 <constrained_least_squares+0x924>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    1ac1 <constrained_least_squares+0x911>
mov    -0x98(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0xc8(%rbp),%rcx
movslq -0x50(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1a6f <constrained_least_squares+0x8bf>
jmp    1ac6 <constrained_least_squares+0x916>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1a5c <constrained_least_squares+0x8ac>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1b55 <constrained_least_squares+0x9a5>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1b42 <constrained_least_squares+0x992>
mov    -0x98(%rbp),%rax
mov    -0x50(%rbp),%ecx
add    -0x54(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x48(%rbp),%rcx
movslq -0x50(%rbp),%rdx
movslq (%rcx,%rdx,4),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1aee <constrained_least_squares+0x93e>
jmp    1b47 <constrained_least_squares+0x997>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1adb <constrained_least_squares+0x92b>
mov    -0x80(%rbp),%rdi
mov    $0x0,%al
call   1080 <free_vector@plt>
mov    -0x88(%rbp),%rdi
mov    $0x0,%al
call   1080 <free_vector@plt>
mov    -0x90(%rbp),%rdi
mov    $0x0,%al
call   1080 <free_vector@plt>
mov    -0xc0(%rbp),%rdi
mov    $0x0,%al
call   1080 <free_vector@plt>
mov    -0xc8(%rbp),%rdi
mov    $0x0,%al
call   1080 <free_vector@plt>
mov    -0x98(%rbp),%rdi
mov    $0x0,%al
call   1030 <free_matrix@plt>
mov    -0xa0(%rbp),%rdi
mov    $0x0,%al
call   1030 <free_matrix@plt>
mov    -0xa8(%rbp),%rdi
mov    $0x0,%al
call   1030 <free_matrix@plt>
mov    -0xb0(%rbp),%rdi
mov    $0x0,%al
call   1030 <free_matrix@plt>
mov    -0xb8(%rbp),%rdi
mov    $0x0,%al
call   1030 <free_matrix@plt>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0xf0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<constrained_least_squares>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %edi,0x10(%rsp)
mov    %esi,0x14(%rsp)
mov    %ecx,0x8(%rsp)
mov    $0xfffffffe,%ebp
cmp    %edi,%esi
jg     136f <constrained_least_squares+0x1bf>
mov    %edi,%eax
test   %edi,%edi
jle    136f <constrained_least_squares+0x1bf>
test   %esi,%esi
jle    136f <constrained_least_squares+0x1bf>
sub    %ecx,%esi
jl     136f <constrained_least_squares+0x1bf>
mov    %r8,%r14
mov    %rdx,%r12
mov    %eax,%edx
sub    %ecx,%edx
mov    %edx,0xc(%rsp)
mov    %esi,0x44(%rsp)
imul   %eax,%eax
mov    %eax,0x2c(%rsp)
lea    0x50(%rsp),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1090 <allocate_double_vector@plt>
test   %eax,%eax
je     136a <constrained_least_squares+0x1ba>
mov    0x8(%rsp),%esi
lea    0x80(%rsp),%rdi
xor    %eax,%eax
call   1060 <allocate_integer_vector@plt>
test   %eax,%eax
je     136a <constrained_least_squares+0x1ba>
mov    0x8(%rsp),%esi
lea    0x78(%rsp),%rdi
xor    %eax,%eax
call   1090 <allocate_double_vector@plt>
test   %eax,%eax
je     136a <constrained_least_squares+0x1ba>
mov    0x10(%rsp),%edx
lea    0x18(%rsp),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   10b0 <allocate_double_matrix@plt>
test   %eax,%eax
je     136a <constrained_least_squares+0x1ba>
mov    0x14(%rsp),%edx
lea    0x20(%rsp),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   10b0 <allocate_double_matrix@plt>
test   %eax,%eax
je     136a <constrained_least_squares+0x1ba>
mov    0x8(%rsp),%edx
lea    0x48(%rsp),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   10b0 <allocate_double_matrix@plt>
test   %eax,%eax
je     136a <constrained_least_squares+0x1ba>
mov    0x14(%rsp),%esi
mov    0xc(%rsp),%edx
lea    0x70(%rsp),%rdi
xor    %eax,%eax
call   10b0 <allocate_double_matrix@plt>
test   %eax,%eax
je     136a <constrained_least_squares+0x1ba>
mov    0xc(%rsp),%edx
lea    0x68(%rsp),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   10b0 <allocate_double_matrix@plt>
test   %eax,%eax
je     136a <constrained_least_squares+0x1ba>
mov    0x10(%rsp),%esi
lea    0x60(%rsp),%rdi
xor    %eax,%eax
call   1060 <allocate_integer_vector@plt>
mov    $0xffffffff,%ebp
test   %eax,%eax
je     136f <constrained_least_squares+0x1bf>
mov    0xc(%rsp),%esi
lea    0x58(%rsp),%rdi
xor    %eax,%eax
call   1060 <allocate_integer_vector@plt>
test   %eax,%eax
je     136f <constrained_least_squares+0x1bf>
mov    0x10(%rsp),%eax
test   %eax,%eax
jle    132b <constrained_least_squares+0x17b>
mov    0x60(%rsp),%rcx
xor    %edx,%edx
movl   $0x0,(%rcx,%rdx,4)
add    $0x1,%rdx
movslq 0x10(%rsp),%rax
cmp    %rax,%rdx
jl     1316 <constrained_least_squares+0x166>
cmpl   $0x0,0x8(%rsp)
jle    1356 <constrained_least_squares+0x1a6>
mov    0x60(%rsp),%rax
xor    %ecx,%ecx
movslq (%r14,%rcx,4),%rdx
movl   $0x1,(%rax,%rdx,4)
add    $0x1,%rcx
movslq 0x8(%rsp),%rdx
cmp    %rdx,%rcx
jl     1339 <constrained_least_squares+0x189>
mov    0x10(%rsp),%eax
test   %eax,%eax
jle    13a4 <constrained_least_squares+0x1f4>
mov    0x60(%rsp),%rcx
xor    %edx,%edx
mov    0x58(%rsp),%rsi
xor    %edi,%edi
jmp    138f <constrained_least_squares+0x1df>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
add    $0x1,%rdx
movslq %eax,%rbp
cmp    %rbp,%rdx
jge    13a4 <constrained_least_squares+0x1f4>
cmpl   $0x0,(%rcx,%rdx,4)
jne    1383 <constrained_least_squares+0x1d3>
movslq %edi,%rax
add    $0x1,%edi
mov    %edx,(%rsi,%rax,4)
mov    0x10(%rsp),%eax
jmp    1383 <constrained_least_squares+0x1d3>
mov    0xc(%rsp),%r11d
test   %r11d,%r11d
jle    147c <constrained_least_squares+0x2cc>
mov    0x14(%rsp),%r15d
mov    0x58(%rsp),%r8
mov    0x18(%rsp),%r9
mov    %r15,%r10
add    $0xffffffffffffffff,%r10
mov    %r15d,%ecx
and    $0x3,%ecx
mov    %r15d,%edi
and    $0xfffffffc,%edi
xor    %r13d,%r13d
jmp    13e6 <constrained_least_squares+0x236>
add    $0x1,%r13
cmp    %r11,%r13
je     147c <constrained_least_squares+0x2cc>
test   %r15d,%r15d
jle    13d9 <constrained_least_squares+0x229>
movslq (%r8,%r13,4),%rdx
mov    (%r9,%r13,8),%rax
xor    %ebx,%ebx
cmp    $0x3,%r10
jb     144b <constrained_least_squares+0x29b>
nopl   0x0(%rax,%rax,1)
mov    (%r12,%rbx,8),%rbp
movsd  0x0(%rbp,%rdx,8),%xmm0
movsd  %xmm0,(%rax,%rbx,8)
mov    0x8(%r12,%rbx,8),%rbp
movsd  0x0(%rbp,%rdx,8),%xmm0
movsd  %xmm0,0x8(%rax,%rbx,8)
mov    0x10(%r12,%rbx,8),%rbp
movsd  0x0(%rbp,%rdx,8),%xmm0
movsd  %xmm0,0x10(%rax,%rbx,8)
mov    0x18(%r12,%rbx,8),%rbp
movsd  0x0(%rbp,%rdx,8),%xmm0
movsd  %xmm0,0x18(%rax,%rbx,8)
add    $0x4,%rbx
cmp    %rbx,%rdi
jne    1400 <constrained_least_squares+0x250>
test   %rcx,%rcx
je     13d9 <constrained_least_squares+0x229>
lea    (%rax,%rbx,8),%rax
lea    (%r12,%rbx,8),%rbx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    (%rbx,%rbp,8),%rsi
movsd  (%rsi,%rdx,8),%xmm0
movsd  %xmm0,(%rax,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%rcx
jne    1460 <constrained_least_squares+0x2b0>
jmp    13d9 <constrained_least_squares+0x229>
mov    0x8(%rsp),%r10d
test   %r10d,%r10d
jle    154c <constrained_least_squares+0x39c>
mov    0x14(%rsp),%r11d
mov    0x20(%rsp),%r8
mov    %r11,%r9
add    $0xffffffffffffffff,%r9
mov    %r11d,%edi
and    $0x3,%edi
mov    %r11d,%ecx
and    $0xfffffffc,%ecx
xor    %r15d,%r15d
jmp    14b9 <constrained_least_squares+0x309>
add    $0x1,%r15
cmp    %r10,%r15
je     154c <constrained_least_squares+0x39c>
test   %r11d,%r11d
jle    14ac <constrained_least_squares+0x2fc>
movslq (%r14,%r15,4),%rbp
mov    (%r8,%r15,8),%rax
xor    %ebx,%ebx
cmp    $0x3,%r9
jb     1517 <constrained_least_squares+0x367>
xchg   %ax,%ax
mov    (%r12,%rbx,8),%rsi
movsd  (%rsi,%rbp,8),%xmm0
movsd  %xmm0,(%rax,%rbx,8)
mov    0x8(%r12,%rbx,8),%rsi
movsd  (%rsi,%rbp,8),%xmm0
movsd  %xmm0,0x8(%rax,%rbx,8)
mov    0x10(%r12,%rbx,8),%rsi
movsd  (%rsi,%rbp,8),%xmm0
movsd  %xmm0,0x10(%rax,%rbx,8)
mov    0x18(%r12,%rbx,8),%rsi
movsd  (%rsi,%rbp,8),%xmm0
movsd  %xmm0,0x18(%rax,%rbx,8)
add    $0x4,%rbx
cmp    %rbx,%rcx
jne    14d0 <constrained_least_squares+0x320>
test   %rdi,%rdi
je     14ac <constrained_least_squares+0x2fc>
lea    (%rax,%rbx,8),%rax
lea    (%r12,%rbx,8),%rbx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
mov    (%rbx,%rsi,8),%rdx
movsd  (%rdx,%rbp,8),%xmm0
movsd  %xmm0,(%rax,%rsi,8)
add    $0x1,%rsi
cmp    %rsi,%rdi
jne    1530 <constrained_least_squares+0x380>
jmp    14ac <constrained_least_squares+0x2fc>
mov    0x20(%rsp),%rax
mov    (%rax),%rdx
mov    0x78(%rsp),%r8
mov    0x50(%rsp),%r9
lea    0x40(%rsp),%r13
lea    0x2c(%rsp),%rbp
lea    0x8(%rsp),%rsi
lea    0x14(%rsp),%rcx
mov    %rcx,%rdi
xor    %eax,%eax
push   %r13
push   %rbp
call   1040 <dgeqrf_@plt>
add    $0x10,%rsp
mov    0x8(%rsp),%r9d
test   %r9d,%r9d
jle    1636 <constrained_least_squares+0x486>
mov    0x48(%rsp),%r8
mov    %r9d,%edx
and    $0xfffffffe,%edx
xor    %esi,%esi
jmp    15b2 <constrained_least_squares+0x402>
movsd  %xmm0,(%rdi,%rbx,8)
add    $0x1,%rsi
cmp    %r9,%rsi
je     1636 <constrained_least_squares+0x486>
mov    0x20(%rsp),%rbp
mov    (%r8,%rsi,8),%rdi
cmp    $0x1,%r9d
jne    15cb <constrained_least_squares+0x41b>
xor    %ebx,%ebx
test   $0x1,%r9b
je     15a5 <constrained_least_squares+0x3f5>
jmp    161b <constrained_least_squares+0x46b>
xor    %ecx,%ecx
jmp    15df <constrained_least_squares+0x42f>
nop
movsd  %xmm0,0x8(%rdi,%rbx,8)
add    $0x1,%rcx
cmp    %rdx,%rcx
je     1611 <constrained_least_squares+0x461>
mov    %rcx,%rbx
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
cmp    %rsi,%rcx
jb     15f7 <constrained_least_squares+0x447>
mov    0x0(%rbp,%rbx,8),%rcx
movsd  (%rcx,%rsi,8),%xmm1
movsd  %xmm1,(%rdi,%rbx,8)
lea    0x1(%rbx),%rcx
cmp    %rsi,%rcx
jb     15d0 <constrained_least_squares+0x420>
mov    0x8(%rbp,%rbx,8),%rax
movsd  (%rax,%rsi,8),%xmm0
jmp    15d0 <constrained_least_squares+0x420>
add    $0x2,%rbx
test   $0x1,%r9b
je     15a5 <constrained_least_squares+0x3f5>
xorps  %xmm0,%xmm0
cmp    %rsi,%rbx
jb     15a0 <constrained_least_squares+0x3f0>
mov    0x0(%rbp,%rbx,8),%rax
movsd  (%rax,%rsi,8),%xmm0
jmp    15a0 <constrained_least_squares+0x3f0>
mov    0x20(%rsp),%rax
mov    (%rax),%rcx
mov    0x78(%rsp),%r9
sub    $0x8,%rsp
lea    0x10(%rsp),%r15
lea    0x1c(%rsp),%rbx
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %rbx,%r8
xor    %eax,%eax
push   %r13
lea    0x3c(%rsp),%r13
push   %r13
push   0x68(%rsp)
call   10d0 <dorgqr_@plt>
add    $0x20,%rsp
movb   $0x54,0x6(%rsp)
movb   $0x4e,0x7(%rsp)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x38(%rsp)
movq   $0x0,0x30(%rsp)
mov    0x18(%rsp),%r10
mov    0x20(%rsp),%r13
mov    0x70(%rsp),%rbp
sub    $0x8,%rsp
lea    0x14(%rsp),%rdx
lea    0x38(%rsp),%r11
lea    0xe(%rsp),%rdi
lea    0xf(%rsp),%rsi
lea    0x40(%rsp),%r9
mov    %rbx,%rcx
mov    %rbx,%r8
mov    $0x0,%eax
push   %rdx
push   0x0(%rbp)
push   %r11
push   %rbx
push   0x0(%r13)
lea    0x40(%rsp),%rbp
push   %rbp
push   (%r10)
call   1050 <dgemm_@plt>
add    $0x40,%rsp
mov    0x48(%rsp),%rax
mov    (%rax),%rdx
mov    0x80(%rsp),%r8
mov    %r15,%rdi
mov    %r15,%rsi
mov    %r15,%rcx
lea    0x40(%rsp),%r9
xor    %eax,%eax
call   10c0 <dgetrf_@plt>
mov    0x48(%rsp),%rax
mov    (%rax),%rsi
mov    0x80(%rsp),%rcx
mov    0x50(%rsp),%r8
sub    $0x8,%rsp
mov    %r15,%rdi
mov    %r15,%rdx
lea    0x34(%rsp),%r9
lea    0x48(%rsp),%r13
xor    %eax,%eax
push   %r13
call   10a0 <dgetri_@plt>
add    $0x10,%rsp
mov    0xc(%rsp),%r10d
test   %r10d,%r10d
jle    18ba <constrained_least_squares+0x70a>
mov    0x44(%rsp),%ebp
mov    0x70(%rsp),%r8
movslq 0x8(%rsp),%r9
mov    0x18(%rsp),%rdi
mov    %ebp,%ecx
and    $0xfffffffe,%ecx
lea    (%r8,%r9,8),%rdx
add    $0x8,%rdx
xor    %esi,%esi
jmp    1781 <constrained_least_squares+0x5d1>
add    $0x1,%rsi
cmp    %r10,%rsi
je     17dd <constrained_least_squares+0x62d>
test   %ebp,%ebp
jle    1778 <constrained_least_squares+0x5c8>
xor    %ebx,%ebx
cmp    $0x1,%ebp
je     17bf <constrained_least_squares+0x60f>
nopl   0x0(%rax)
mov    -0x8(%rdx,%rbx,8),%rax
movsd  (%rax,%rsi,8),%xmm0
mov    (%rdi,%rbx,8),%rax
movsd  %xmm0,(%rax,%rsi,8)
mov    (%rdx,%rbx,8),%rax
movsd  (%rax,%rsi,8),%xmm0
mov    0x8(%rdi,%rbx,8),%rax
movsd  %xmm0,(%rax,%rsi,8)
add    $0x2,%rbx
cmp    %rbx,%rcx
jne    1790 <constrained_least_squares+0x5e0>
test   $0x1,%bpl
je     1778 <constrained_least_squares+0x5c8>
lea    (%rbx,%r9,1),%rax
mov    (%r8,%rax,8),%rax
movsd  (%rax,%rsi,8),%xmm0
mov    (%rdi,%rbx,8),%rax
movsd  %xmm0,(%rax,%rsi,8)
jmp    1778 <constrained_least_squares+0x5c8>
test   %r10d,%r10d
jle    18ba <constrained_least_squares+0x70a>
mov    0x68(%rsp),%r8
lea    -0x1(%r10),%r9
mov    %r10d,%esi
and    $0x3,%esi
mov    %r10d,%edi
and    $0xfffffffc,%edi
xor    %ebp,%ebp
movsd  0x7fb(%rip),%xmm0
jmp    1814 <constrained_least_squares+0x664>
add    $0x1,%rbp
cmp    %r10,%rbp
je     18ba <constrained_least_squares+0x70a>
mov    (%r8,%rbp,8),%rcx
xor    %edx,%edx
cmp    $0x3,%r9
jae    186f <constrained_least_squares+0x6bf>
test   %rsi,%rsi
je     1807 <constrained_least_squares+0x657>
lea    (%rcx,%rdx,8),%rcx
mov    %rbp,%rbx
sub    %rdx,%rbx
xor    %edx,%edx
jmp    184e <constrained_least_squares+0x69e>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  %xmm1,(%rcx,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%rsi
je     1807 <constrained_least_squares+0x657>
movaps %xmm0,%xmm1
cmp    %rdx,%rbx
je     1840 <constrained_least_squares+0x690>
xorps  %xmm1,%xmm1
jmp    1840 <constrained_least_squares+0x690>
nopl   0x0(%rax,%rax,1)
movsd  %xmm1,0x18(%rcx,%rdx,8)
add    $0x4,%rdx
cmp    %rdi,%rdx
je     1820 <constrained_least_squares+0x670>
movaps %xmm0,%xmm1
cmp    %rdx,%rbp
je     187a <constrained_least_squares+0x6ca>
xorps  %xmm1,%xmm1
movsd  %xmm1,(%rcx,%rdx,8)
lea    0x1(%rdx),%rax
movaps %xmm0,%xmm1
cmp    %rax,%rbp
je     188e <constrained_least_squares+0x6de>
xorps  %xmm1,%xmm1
movsd  %xmm1,0x8(%rcx,%rdx,8)
lea    0x2(%rdx),%rax
movaps %xmm0,%xmm1
cmp    %rax,%rbp
je     18a3 <constrained_least_squares+0x6f3>
xorps  %xmm1,%xmm1
movsd  %xmm1,0x10(%rcx,%rdx,8)
lea    0x3(%rdx),%rax
movaps %xmm0,%xmm1
cmp    %rax,%rbp
je     1860 <constrained_least_squares+0x6b0>
xorps  %xmm1,%xmm1
jmp    1860 <constrained_least_squares+0x6b0>
movb   $0x4e,0x6(%rsp)
mov    0x18(%rsp),%rax
mov    (%rax),%r8
mov    0x68(%rsp),%rbp
sub    $0x8,%rsp
lea    0xe(%rsp),%r15
lea    0x4c(%rsp),%rdx
mov    %r15,%rdi
lea    0x14(%rsp),%rcx
mov    %rcx,%rsi
lea    0x18(%rsp),%r9
xor    %eax,%eax
lea    0x48(%rsp),%rbx
push   %rbx
lea    0x3c(%rsp),%rbx
push   %rbx
push   0x68(%rsp)
push   %rcx
push   0x0(%rbp)
call   1070 <dgels_@plt>
add    $0x30,%rsp
movb   $0x4e,0x7(%rsp)
movb   $0x4e,0x6(%rsp)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x38(%rsp)
movq   $0x0,0x30(%rsp)
mov    0x20(%rsp),%r10
movslq 0x8(%rsp),%r11
mov    0x68(%rsp),%rbx
mov    0x18(%rsp),%rbp
sub    $0x8,%rsp
lea    0xf(%rsp),%rsi
lea    0x40(%rsp),%r9
mov    %r15,%rdi
lea    0x1c(%rsp),%r13
mov    %r13,%rdx
lea    0x14(%rsp),%rcx
lea    0x4c(%rsp),%r8
xor    %eax,%eax
lea    0x18(%rsp),%r15
push   %r15
push   0x0(%rbp)
lea    0x48(%rsp),%rbp
push   %rbp
push   %rcx
push   (%rbx)
push   %r13
push   (%r10,%r11,8)
call   1050 <dgemm_@plt>
add    $0x40,%rsp
movabs $0xbff0000000000000,%rax
mov    %rax,0x38(%rsp)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x30(%rsp)
mov    0x18(%rsp),%r10
mov    0x70(%rsp),%rbx
mov    0x20(%rsp),%rbp
sub    $0x8,%rsp
lea    0xe(%rsp),%rdi
lea    0xf(%rsp),%rsi
mov    %r13,%rdx
lea    0x10(%rsp),%r15
mov    %r15,%rcx
lea    0x14(%rsp),%r8
lea    0x40(%rsp),%r9
xor    %eax,%eax
push   %r13
push   0x0(%rbp)
lea    0x48(%rsp),%rbp
push   %rbp
push   %r8
push   (%rbx)
lea    0x40(%rsp),%rbp
push   %rbp
push   (%r10)
call   1050 <dgemm_@plt>
add    $0x40,%rsp
movabs $0x3ff0000000000000,%rax
mov    %rax,0x38(%rsp)
movq   $0x0,0x30(%rsp)
mov    0x20(%rsp),%r10
mov    0x48(%rsp),%r11
mov    0x18(%rsp),%rbp
movslq 0xc(%rsp),%rbx
sub    $0x8,%rsp
lea    0xe(%rsp),%rdi
lea    0xf(%rsp),%rsi
mov    %r13,%rdx
mov    %r15,%rcx
mov    %r15,%r8
lea    0x40(%rsp),%r9
xor    %eax,%eax
lea    0x18(%rsp),%r13
push   %r13
push   0x0(%rbp,%rbx,8)
lea    0x48(%rsp),%rbx
push   %rbx
push   %r15
push   (%r11)
lea    0x44(%rsp),%rbp
push   %rbp
push   (%r10)
call   1050 <dgemm_@plt>
add    $0x40,%rsp
mov    0x14(%rsp),%r9d
test   %r9d,%r9d
jle    1beb <constrained_least_squares+0xa3b>
mov    0xc(%rsp),%r10d
mov    0x18(%rsp),%rdx
mov    0x58(%rsp),%rsi
mov    %r10,%r8
add    $0xffffffffffffffff,%r8
mov    %r10d,%r15d
and    $0x3,%r15d
mov    %r10d,%r11d
and    $0xfffffffc,%r11d
xor    %eax,%eax
jmp    1aae <constrained_least_squares+0x8fe>
add    $0x1,%rax
cmp    %r9,%rax
je     1b52 <constrained_least_squares+0x9a2>
test   %r10d,%r10d
jle    1aa1 <constrained_least_squares+0x8f1>
mov    (%r12,%rax,8),%rbp
xor    %ebx,%ebx
cmp    $0x3,%r8
jb     1b1b <constrained_least_squares+0x96b>
nop
mov    (%rdx,%rbx,8),%rcx
movsd  (%rcx,%rax,8),%xmm0
movslq (%rsi,%rbx,4),%rcx
movsd  %xmm0,0x0(%rbp,%rcx,8)
mov    0x8(%rdx,%rbx,8),%rcx
movsd  (%rcx,%rax,8),%xmm0
movslq 0x4(%rsi,%rbx,4),%rcx
movsd  %xmm0,0x0(%rbp,%rcx,8)
mov    0x10(%rdx,%rbx,8),%rcx
movsd  (%rcx,%rax,8),%xmm0
movslq 0x8(%rsi,%rbx,4),%rcx
movsd  %xmm0,0x0(%rbp,%rcx,8)
mov    0x18(%rdx,%rbx,8),%rcx
movsd  (%rcx,%rax,8),%xmm0
movslq 0xc(%rsi,%rbx,4),%rcx
movsd  %xmm0,0x0(%rbp,%rcx,8)
add    $0x4,%rbx
cmp    %rbx,%r11
jne    1ac0 <constrained_least_squares+0x910>
test   %r15,%r15
je     1aa1 <constrained_least_squares+0x8f1>
lea    (%rsi,%rbx,4),%r13
lea    (%rdx,%rbx,8),%rbx
xor    %ecx,%ecx
xchg   %ax,%ax
mov    (%rbx,%rcx,8),%rdi
movsd  (%rdi,%rax,8),%xmm0
movslq 0x0(%r13,%rcx,4),%rdi
movsd  %xmm0,0x0(%rbp,%rdi,8)
add    $0x1,%rcx
cmp    %rcx,%r15
jne    1b30 <constrained_least_squares+0x980>
jmp    1aa1 <constrained_least_squares+0x8f1>
test   %r9d,%r9d
jle    1beb <constrained_least_squares+0xa3b>
mov    0x8(%rsp),%eax
mov    0x18(%rsp),%r8
movslq 0xc(%rsp),%r10
mov    %eax,%esi
and    $0xfffffffe,%esi
lea    (%r8,%r10,8),%rdi
add    $0x8,%rdi
xor    %ebp,%ebp
jmp    1b83 <constrained_least_squares+0x9d3>
add    $0x1,%rbp
cmp    %r9,%rbp
je     1beb <constrained_least_squares+0xa3b>
test   %eax,%eax
jle    1b7a <constrained_least_squares+0x9ca>
mov    (%r12,%rbp,8),%rcx
xor    %ebx,%ebx
cmp    $0x1,%eax
je     1bcf <constrained_least_squares+0xa1f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    -0x8(%rdi,%rbx,8),%rdx
movsd  (%rdx,%rbp,8),%xmm0
movslq (%r14,%rbx,4),%rdx
movsd  %xmm0,(%rcx,%rdx,8)
mov    (%rdi,%rbx,8),%rdx
movsd  (%rdx,%rbp,8),%xmm0
movslq 0x4(%r14,%rbx,4),%rdx
movsd  %xmm0,(%rcx,%rdx,8)
add    $0x2,%rbx
cmp    %rbx,%rsi
jne    1ba0 <constrained_least_squares+0x9f0>
test   $0x1,%al
je     1b7a <constrained_least_squares+0x9ca>
lea    (%rbx,%r10,1),%rdx
mov    (%r8,%rdx,8),%rdx
movsd  (%rdx,%rbp,8),%xmm0
movslq (%r14,%rbx,4),%rdx
movsd  %xmm0,(%rcx,%rdx,8)
jmp    1b7a <constrained_least_squares+0x9ca>
mov    0x50(%rsp),%rdi
xor    %eax,%eax
call   1080 <free_vector@plt>
mov    0x80(%rsp),%rdi
xor    %eax,%eax
call   1080 <free_vector@plt>
mov    0x78(%rsp),%rdi
xor    %eax,%eax
call   1080 <free_vector@plt>
mov    0x60(%rsp),%rdi
xor    %eax,%eax
call   1080 <free_vector@plt>
mov    0x58(%rsp),%rdi
xor    %eax,%eax
call   1080 <free_vector@plt>
mov    0x18(%rsp),%rdi
xor    %eax,%eax
call   1030 <free_matrix@plt>
mov    0x20(%rsp),%rdi
xor    %eax,%eax
call   1030 <free_matrix@plt>
mov    0x48(%rsp),%rdi
xor    %eax,%eax
call   1030 <free_matrix@plt>
mov    0x70(%rsp),%rdi
xor    %eax,%eax
call   1030 <free_matrix@plt>
mov    0x68(%rsp),%rdi
xor    %eax,%eax
call   1030 <free_matrix@plt>
mov    $0x1,%ebp
jmp    136f <constrained_least_squares+0x1bf>

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

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