user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  movl   $0x4,-0x80(%rbp)
  movl   $0x4,-0x7c(%rbp)
  movl   $0x1,-0x78(%rbp)
  movl   $0x3e8,-0x74(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x80(%rbp),%xmm1
  movsd  D40(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  D16(%rip),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movl   $0x2,-0x70(%rbp)
  movl   $0x0,-0x20(%rbp)
  movl   $0x5,-0x1c(%rbp)
  mov    -0x80(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  sub    -0x70(%rbp),%eax
  mov    %eax,-0x6c(%rbp)
  mov    -0x6c(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x50(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  movslq %eax,%rdx
  mov    %rdx,%rsi
  mov    $0x0,%edi
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L3:
  cmp    %rdx,%rsp
  je     L55
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L3
L55:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L21
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L21:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x48(%rbp)
  mov    -0x80(%rbp),%eax
  imul   -0x7c(%rbp),%eax
  mov    %eax,%edi
  mov    -0x6c(%rbp),%ecx
  mov    -0x48(%rbp),%rdx
  mov    -0x70(%rbp),%esi
  lea    -0x20(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <create_omega@plt>
  mov    -0x7c(%rbp),%edx
  mov    -0x80(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <alloc_array_z@plt>
  mov    %rax,-0x40(%rbp)
  mov    -0x7c(%rbp),%edx
  mov    -0x80(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <alloc_array_z@plt>
  mov    %rax,-0x68(%rbp)
  mov    -0x7c(%rbp),%edx
  mov    -0x80(%rbp),%ecx
  mov    -0x78(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <test_mat@plt>
  mov    %rax,-0x38(%rbp)
  mov    -0x7c(%rbp),%edx
  mov    -0x80(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <alloc_array_z@plt>
  mov    %rax,-0x30(%rbp)
  mov    -0x7c(%rbp),%edx
  mov    -0x80(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <alloc_array_z@plt>
  mov    %rax,-0x28(%rbp)
  movl   $0x0,-0x88(%rbp)
  jmp    L16
L57:
  movl   $0x0,-0x84(%rbp)
  jmp    L43
L22:
  mov    -0x84(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    -0x84(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x28(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x84(%rbp)
L43:
  mov    -0x7c(%rbp),%eax
  imul   -0x80(%rbp),%eax
  cmp    %eax,-0x84(%rbp)
  jl     L22
  mov    -0x7c(%rbp),%edx
  mov    -0x80(%rbp),%esi
  mov    -0x60(%rbp),%rcx
  mov    -0x28(%rbp),%rax
  movq   %rcx,%xmm0
  mov    %rax,%rdi
  call   <shrink@plt>
  mov    %rax,-0x68(%rbp)
  mov    -0x30(%rbp),%rdi
  mov    -0x6c(%rbp),%ecx
  mov    -0x48(%rbp),%rdx
  mov    -0x68(%rbp),%rsi
  mov    -0x38(%rbp),%rax
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <Proj_sub@plt>
  movsd  -0x58(%rbp),%xmm0
  mov    -0x80(%rbp),%r9d
  mov    -0x7c(%rbp),%r10d
  mov    -0x30(%rbp),%rcx
  mov    D27(%rip),%rdi
  mov    -0x80(%rbp),%edx
  mov    -0x7c(%rbp),%esi
  mov    -0x40(%rbp),%rax
  sub    $0x8,%rsp
  push   -0x40(%rbp)
  mov    -0x6c(%rbp),%r8d
  push   %r8
  push   -0x48(%rbp)
  movapd %xmm0,%xmm1
  mov    %r10d,%r8d
  movq   %rdi,%xmm0
  mov    %rax,%rdi
  call   <ma@plt>
  add    $0x20,%rsp
  addl   $0x1,-0x88(%rbp)
L16:
  mov    -0x88(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jl     L57
  mov    -0x70(%rbp),%ecx
  lea    -0x20(%rbp),%rdx
  mov    -0x68(%rbp),%rsi
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <RMSE2@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  lea    D42(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x68(%rbp),%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  lea    D52(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <free_array@plt>
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <free_array@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <free_array@plt>
  mov    -0x68(%rbp),%rax
  mov    %rax,%rdi
  call   <free_array@plt>
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <free_array@plt>
  mov    $0x0,%eax
  mov    %rbx,%rsp
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L25
  call   <__stack_chk_fail@plt>
L25:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D40
datatype: f64
name: unpack_data
arguments: label: D16
datatype: f64
name: unpack_data
arguments: label: D27
datatype: f64
name: unpack_data
arguments: label: D21
datatype: string
name: unpack_data
arguments: label: D42
datatype: string
name: unpack_data
arguments: label: D52
datatype: string

tool: D40: 1.5

tool: D16: 1.4

tool: D27: 1

tool: D21: Error = %f



tool: D42: Known value = %f


tool: D52: Approximation = %f


assistant: ```c
int main(void) {
  int nrows = 4;
  int ncols = 4;
  int rank = 1;
  int numIter = 1000;
  int i, j;
  double tau = 1.5 * nrows;
  double delta = 1.4;
  int ku = 2;
  int omega_c[] = {0, 5};
  int kn = (nrows * ncols) - ku;
  int omega[kn];
  create_omega(omega_c, ku, omega, kn, nrows * ncols);
  double *Y = alloc_array_z(nrows, ncols);
  double *Z = alloc_array_z(nrows, ncols);
  double *M = test_mat(rank, nrows, ncols);
  double *dummyMatrix = alloc_array_z(nrows, ncols);
  double *dummy2 = alloc_array_z(nrows, ncols);
  for (i = 0; i < numIter; i++) {
    for (j = 0; j < ncols * nrows; j++) {
      dummy2[j] = Y[j];
    }
    Z = shrink(dummy2, tau, nrows, ncols);
    Proj_sub(M, Z, omega, kn, dummyMatrix);
    ma(Y, ncols, nrows, 1.0, dummyMatrix, ncols, nrows, delta, omega, kn, Y);
  }
  printf("Error = %f\n\n", RMSE2(M, Z, omega_c, ku));
  printf("Known value = %f\n", M[0]);
  printf("Approximation = %f\n", Z[0]);
  free_array(Y);
  free_array(M);
  free_array(dummy2);
  free_array(Z);
  free_array(dummyMatrix);
  return 0;
}
```