user: Please show me the C implementation that matches the assembly code listed below:

```asm
<constrained_least_squares>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0xb8,%rsp
  mov    %edi,-0xa4(%rbp)
  mov    %esi,-0xa8(%rbp)
  mov    %rdx,-0xb0(%rbp)
  mov    %ecx,-0xb4(%rbp)
  mov    %r8,-0xc0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    -0xa4(%rbp),%eax
  test   %eax,%eax
  jle    L230
  mov    -0xa8(%rbp),%eax
  test   %eax,%eax
  jle    L230
  mov    -0xa8(%rbp),%edx
  mov    -0xa4(%rbp),%eax
  cmp    %eax,%edx
  jg     L230
  mov    -0xb4(%rbp),%edx
  mov    -0xa8(%rbp),%eax
  cmp    %eax,%edx
  jle    L528
L230:
  mov    $0xfffffffe,%eax
  jmp    L325
L528:
  mov    -0xa4(%rbp),%eax
  mov    -0xb4(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,-0x90(%rbp)
  mov    -0xa8(%rbp),%eax
  mov    -0xb4(%rbp),%edx
  sub    %edx,%eax
  mov    %eax,-0x8c(%rbp)
  mov    -0xa4(%rbp),%edx
  mov    -0xa4(%rbp),%eax
  imul   %edx,%eax
  mov    %eax,-0x84(%rbp)
  mov    -0x84(%rbp),%edx
  lea    -0x68(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <allocate_double_vector@plt>
  test   %eax,%eax
  jne    L6
  mov    $0xffffffff,%eax
  jmp    L325
L6:
  mov    -0xb4(%rbp),%edx
  lea    -0x60(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <allocate_integer_vector@plt>
  test   %eax,%eax
  jne    L300
  mov    $0xffffffff,%eax
  jmp    L325
L300:
  mov    -0xb4(%rbp),%edx
  lea    -0x58(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <allocate_double_vector@plt>
  test   %eax,%eax
  jne    L514
  mov    $0xffffffff,%eax
  jmp    L325
L514:
  mov    -0xa4(%rbp),%edx
  mov    -0xa4(%rbp),%ecx
  lea    -0x50(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <allocate_double_matrix@plt>
  test   %eax,%eax
  jne    L25
  mov    $0xffffffff,%eax
  jmp    L325
L25:
  mov    -0xa8(%rbp),%edx
  mov    -0xa8(%rbp),%ecx
  lea    -0x48(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <allocate_double_matrix@plt>
  test   %eax,%eax
  jne    L257
  mov    $0xffffffff,%eax
  jmp    L325
L257:
  mov    -0xb4(%rbp),%edx
  mov    -0xb4(%rbp),%ecx
  lea    -0x40(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <allocate_double_matrix@plt>
  test   %eax,%eax
  jne    L511
  mov    $0xffffffff,%eax
  jmp    L325
L511:
  mov    -0x90(%rbp),%edx
  mov    -0xa8(%rbp),%ecx
  lea    -0x38(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <allocate_double_matrix@plt>
  test   %eax,%eax
  jne    L482
  mov    $0xffffffff,%eax
  jmp    L325
L482:
  mov    -0x90(%rbp),%edx
  mov    -0x90(%rbp),%ecx
  lea    -0x30(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <allocate_double_matrix@plt>
  test   %eax,%eax
  jne    L146
  mov    $0xffffffff,%eax
  jmp    L325
L146:
  mov    -0xa4(%rbp),%edx
  lea    -0x28(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <allocate_integer_vector@plt>
  test   %eax,%eax
  jne    L118
  mov    $0xffffffff,%eax
  jmp    L325
L118:
  mov    -0x90(%rbp),%edx
  lea    -0x20(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <allocate_integer_vector@plt>
  test   %eax,%eax
  jne    L515
  mov    $0xffffffff,%eax
  jmp    L325
L515:
  movl   $0x0,-0x80(%rbp)
  jmp    L493
L624:
  mov    -0x28(%rbp),%rdx
  mov    -0x80(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movl   $0x0,(%rax)
  addl   $0x1,-0x80(%rbp)
L493:
  mov    -0xa4(%rbp),%eax
  cmp    %eax,-0x80(%rbp)
  jl     L624
  movl   $0x0,-0x80(%rbp)
  jmp    L82
L76:
  mov    -0x28(%rbp),%rdx
  mov    -0x80(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0xc0(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  movl   $0x1,(%rax)
  addl   $0x1,-0x80(%rbp)
L82:
  mov    -0xb4(%rbp),%eax
  cmp    %eax,-0x80(%rbp)
  jl     L76
  movl   $0x0,-0x7c(%rbp)
  movl   $0x0,-0x80(%rbp)
  jmp    L59
L42:
  mov    -0x28(%rbp),%rdx
  mov    -0x80(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L518
  mov    -0x20(%rbp),%rcx
  mov    -0x7c(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0x7c(%rbp)
  cltq
  shl    $0x2,%rax
  lea    (%rcx,%rax,1),%rdx
  mov    -0x80(%rbp),%eax
  mov    %eax,(%rdx)
L518:
  addl   $0x1,-0x80(%rbp)
L59:
  mov    -0xa4(%rbp),%eax
  cmp    %eax,-0x80(%rbp)
  jl     L42
  movl   $0x0,-0x80(%rbp)
  jmp    L621
L220:
  movl   $0x0,-0x7c(%rbp)
  jmp    L272
L497:
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xb0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%rcx
  mov    -0x80(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x50(%rbp),%rcx
  mov    -0x80(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x7c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x7c(%rbp)
L272:
  mov    -0xa8(%rbp),%eax
  cmp    %eax,-0x7c(%rbp)
  jl     L497
  addl   $0x1,-0x80(%rbp)
L621:
  mov    -0x90(%rbp),%eax
  cmp    %eax,-0x80(%rbp)
  jl     L220
  movl   $0x0,-0x80(%rbp)
  jmp    L360
L127:
  movl   $0x0,-0x7c(%rbp)
  jmp    L649
L512:
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xb0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x80(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0xc0(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x48(%rbp),%rcx
  mov    -0x80(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x7c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x7c(%rbp)
L649:
  mov    -0xa8(%rbp),%eax
  cmp    %eax,-0x7c(%rbp)
  jl     L512
  addl   $0x1,-0x80(%rbp)
L360:
  mov    -0xb4(%rbp),%eax
  cmp    %eax,-0x80(%rbp)
  jl     L127
  mov    -0x68(%rbp),%r9
  mov    -0x58(%rbp),%r8
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rdx
  lea    -0xa8(%rbp),%rcx
  lea    -0xb4(%rbp),%rsi
  lea    -0xa8(%rbp),%rax
  lea    -0x88(%rbp),%rdi
  push   %rdi
  lea    -0x84(%rbp),%rdi
  push   %rdi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <dgeqrf_@plt>
  add    $0x10,%rsp
  movl   $0x0,-0x80(%rbp)
  jmp    L164
L516:
  movl   $0x0,-0x7c(%rbp)
  jmp    L561
L434:
  mov    -0x7c(%rbp),%eax
  cmp    -0x80(%rbp),%eax
  jl     L260
  mov    -0x48(%rbp),%rdx
  mov    -0x7c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x80(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  jmp    L330
L260:
  pxor   %xmm0,%xmm0
L330:
  mov    -0x40(%rbp),%rdx
  mov    -0x80(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x7c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x7c(%rbp)
L561:
  mov    -0xb4(%rbp),%eax
  cmp    %eax,-0x7c(%rbp)
  jl     L434
  addl   $0x1,-0x80(%rbp)
L164:
  mov    -0xb4(%rbp),%eax
  cmp    %eax,-0x80(%rbp)
  jl     L516
  mov    -0x68(%rbp),%rdi
  mov    -0x58(%rbp),%r9
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rcx
  lea    -0xa8(%rbp),%r10
  lea    -0xb4(%rbp),%rdx
  lea    -0xa8(%rbp),%rsi
  lea    -0xa8(%rbp),%rax
  sub    $0x8,%rsp
  lea    -0x88(%rbp),%r8
  push   %r8
  lea    -0x84(%rbp),%r8
  push   %r8
  push   %rdi
  mov    %r10,%r8
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <dorgqr_@plt>
  add    $0x20,%rsp
  movb   $0x54,-0x92(%rbp)
  movb   $0x4e,-0x91(%rbp)
  movsd  D11(%rip),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  mov    -0x38(%rbp),%rax
  mov    (%rax),%r9
  mov    -0x48(%rbp),%rax
  mov    (%rax),%r8
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rdi
  lea    -0x78(%rbp),%rbx
  lea    -0xa8(%rbp),%r11
  lea    -0xa8(%rbp),%rcx
  lea    -0x90(%rbp),%rdx
  lea    -0x91(%rbp),%rsi
  lea    -0x92(%rbp),%rax
  sub    $0x8,%rsp
  lea    -0x90(%rbp),%r10
  push   %r10
  push   %r9
  lea    -0x70(%rbp),%r9
  push   %r9
  lea    -0xa8(%rbp),%r9
  push   %r9
  push   %r8
  lea    -0xa4(%rbp),%r8
  push   %r8
  push   %rdi
  mov    %rbx,%r9
  mov    %r11,%r8
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <dgemm_@plt>
  add    $0x40,%rsp
  mov    -0x60(%rbp),%rdi
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rdx
  lea    -0x88(%rbp),%r8
  lea    -0xb4(%rbp),%rcx
  lea    -0xb4(%rbp),%rsi
  lea    -0xb4(%rbp),%rax
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <dgetrf_@plt>
  mov    -0x68(%rbp),%r8
  mov    -0x60(%rbp),%rcx
  mov    -0x40(%rbp),%rax
  mov    (%rax),%rsi
  lea    -0x84(%rbp),%r9
  lea    -0xb4(%rbp),%rdx
  lea    -0xb4(%rbp),%rax
  sub    $0x8,%rsp
  lea    -0x88(%rbp),%rdi
  push   %rdi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <dgetri_@plt>
  add    $0x10,%rsp
  movl   $0x0,-0x80(%rbp)
  jmp    L380
L475:
  movl   $0x0,-0x7c(%rbp)
  jmp    L358
L52:
  mov    -0x38(%rbp),%rdx
  mov    -0xb4(%rbp),%ecx
  mov    -0x7c(%rbp),%eax
  add    %ecx,%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x80(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x50(%rbp),%rcx
  mov    -0x7c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x80(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x7c(%rbp)
L358:
  mov    -0x8c(%rbp),%eax
  cmp    %eax,-0x7c(%rbp)
  jl     L52
  addl   $0x1,-0x80(%rbp)
L380:
  mov    -0x90(%rbp),%eax
  cmp    %eax,-0x80(%rbp)
  jl     L475
  movl   $0x0,-0x80(%rbp)
  jmp    L538
L438:
  movl   $0x0,-0x7c(%rbp)
  jmp    L282
L259:
  mov    -0x80(%rbp),%eax
  cmp    -0x7c(%rbp),%eax
  jne    L596
  movsd  D11(%rip),%xmm0
  jmp    L277
L596:
  pxor   %xmm0,%xmm0
L277:
  mov    -0x30(%rbp),%rdx
  mov    -0x80(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x7c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x7c(%rbp)
L282:
  mov    -0x90(%rbp),%eax
  cmp    %eax,-0x7c(%rbp)
  jl     L259
  addl   $0x1,-0x80(%rbp)
L538:
  mov    -0x90(%rbp),%eax
  cmp    %eax,-0x80(%rbp)
  jl     L438
  movb   $0x4e,-0x92(%rbp)
  mov    -0x68(%rbp),%r8
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rdi
  mov    -0x50(%rbp),%rax
  mov    (%rax),%r10
  lea    -0xa4(%rbp),%r11
  lea    -0x90(%rbp),%rcx
  lea    -0x8c(%rbp),%rdx
  lea    -0x90(%rbp),%rsi
  lea    -0x92(%rbp),%rax
  sub    $0x8,%rsp
  lea    -0x88(%rbp),%r9
  push   %r9
  lea    -0x84(%rbp),%r9
  push   %r9
  push   %r8
  lea    -0x90(%rbp),%r8
  push   %r8
  push   %rdi
  mov    %r11,%r9
  mov    %r10,%r8
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <dgels_@plt>
  add    $0x30,%rsp
  movb   $0x4e,-0x91(%rbp)
  movzbl -0x91(%rbp),%eax
  mov    %al,-0x92(%rbp)
  movsd  D11(%rip),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%r9
  mov    -0x30(%rbp),%rax
  mov    (%rax),%r8
  mov    -0x48(%rbp),%rdx
  mov    -0xb4(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdi
  lea    -0x78(%rbp),%rbx
  lea    -0x8c(%rbp),%r11
  lea    -0x90(%rbp),%rcx
  lea    -0xa8(%rbp),%rdx
  lea    -0x91(%rbp),%rsi
  lea    -0x92(%rbp),%rax
  sub    $0x8,%rsp
  lea    -0xa4(%rbp),%r10
  push   %r10
  push   %r9
  lea    -0x70(%rbp),%r9
  push   %r9
  lea    -0x90(%rbp),%r9
  push   %r9
  push   %r8
  lea    -0xa8(%rbp),%r8
  push   %r8
  push   %rdi
  mov    %rbx,%r9
  mov    %r11,%r8
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <dgemm_@plt>
  add    $0x40,%rsp
  movsd  D20(%rip),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  movsd  D11(%rip),%xmm0
  movsd  %xmm0,-0x70(%rbp)
  mov    -0x48(%rbp),%rax
  mov    (%rax),%r9
  mov    -0x38(%rbp),%rax
  mov    (%rax),%r8
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rdi
  lea    -0x78(%rbp),%rbx
  lea    -0x90(%rbp),%r11
  lea    -0xb4(%rbp),%rcx
  lea    -0xa8(%rbp),%rdx
  lea    -0x91(%rbp),%rsi
  lea    -0x92(%rbp),%rax
  sub    $0x8,%rsp
  lea    -0xa8(%rbp),%r10
  push   %r10
  push   %r9
  lea    -0x70(%rbp),%r9
  push   %r9
  lea    -0x90(%rbp),%r9
  push   %r9
  push   %r8
  lea    -0xa4(%rbp),%r8
  push   %r8
  push   %rdi
  mov    %rbx,%r9
  mov    %r11,%r8
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <dgemm_@plt>
  add    $0x40,%rsp
  movsd  D11(%rip),%xmm0
  movsd  %xmm0,-0x78(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x70(%rbp)
  mov    -0x50(%rbp),%rdx
  mov    -0x90(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%r9
  mov    -0x40(%rbp),%rax
  mov    (%rax),%r8
  mov    -0x48(%rbp),%rax
  mov    (%rax),%rdi
  lea    -0x78(%rbp),%rbx
  lea    -0xb4(%rbp),%r11
  lea    -0xb4(%rbp),%rcx
  lea    -0xa8(%rbp),%rdx
  lea    -0x91(%rbp),%rsi
  lea    -0x92(%rbp),%rax
  sub    $0x8,%rsp
  lea    -0xa4(%rbp),%r10
  push   %r10
  push   %r9
  lea    -0x70(%rbp),%r9
  push   %r9
  lea    -0xb4(%rbp),%r9
  push   %r9
  push   %r8
  lea    -0xa8(%rbp),%r8
  push   %r8
  push   %rdi
  mov    %rbx,%r9
  mov    %r11,%r8
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <dgemm_@plt>
  add    $0x40,%rsp
  movl   $0x0,-0x80(%rbp)
  jmp    L394
L489:
  movl   $0x0,-0x7c(%rbp)
  jmp    L23
L245:
  mov    -0x50(%rbp),%rdx
  mov    -0x7c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x80(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x80(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0xb0(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x20(%rbp),%rsi
  mov    -0x7c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x7c(%rbp)
L23:
  mov    -0x90(%rbp),%eax
  cmp    %eax,-0x7c(%rbp)
  jl     L245
  addl   $0x1,-0x80(%rbp)
L394:
  mov    -0xa8(%rbp),%eax
  cmp    %eax,-0x80(%rbp)
  jl     L489
  movl   $0x0,-0x80(%rbp)
  jmp    L48
L331:
  movl   $0x0,-0x7c(%rbp)
  jmp    L254
L36:
  mov    -0x50(%rbp),%rdx
  mov    -0x90(%rbp),%ecx
  mov    -0x7c(%rbp),%eax
  add    %ecx,%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x80(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rax,%rdx
  mov    -0x80(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0xb0(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0xc0(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x7c(%rbp)
L254:
  mov    -0xb4(%rbp),%eax
  cmp    %eax,-0x7c(%rbp)
  jl     L36
  addl   $0x1,-0x80(%rbp)
L48:
  mov    -0xa8(%rbp),%eax
  cmp    %eax,-0x80(%rbp)
  jl     L331
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <free_vector@plt>
  mov    -0x60(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <free_vector@plt>
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <free_vector@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <free_vector@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <free_vector@plt>
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <free_matrix@plt>
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <free_matrix@plt>
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <free_matrix@plt>
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <free_matrix@plt>
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <free_matrix@plt>
  mov    $0x1,%eax
L325:
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L638
  call   <__stack_chk_fail@plt>
L638:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D11
type: f64
name: extract_symbolic_data
arguments: data_tag: D20
type: f32[2]

tool: D11: 1

tool: {"D20": [0.0,-1.875]}

assistant: ```c
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;
}
```