user: Translate the below assembly code into C programming language:

```asm
<pinv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rsi,%r15
  mov    %rdx,%rbx
  mov    %rcx,0x20(%rsp)
  mov    %r8,%r14
  mov    %rdx,%rax
  cmp    %rsi,%rdx
  mov    %rdx,%r12
  cmovl  %rsi,%r12
  add    $0x1,%r12
  mov    %rsi,%rbp
  imul   %rsi,%rbp
  imul   %rsi,%rax
  mov    %rax,%r13
  mov    %rdx,0x10(%rsp)
  imul   %rdx,%rbx
  lea    0x0(%rbp,%rax,1),%rdi
  mov    %rbx,(%rsp)
  add    %rbx,%rdi
  lea    (%r12,%r12,2),%rax
  add    %rax,%rdi
  shl    $0x3,%rdi
  call   <malloc@plt>
  mov    %rax,%rbx
  lea    (%rax,%rbp,8),%rbp
  lea    0x0(,%r13,8),%rdx
  lea    0x0(%rbp,%rdx,1),%r11
  mov    %r11,0x18(%rsp)
  mov    (%rsp),%rcx
  lea    (%r11,%rcx,8),%r13
  shl    $0x3,%r12
  lea    0x0(%r13,%r12,1),%rcx
  mov    %rcx,(%rsp)
  add    %rcx,%r12
  mov    0x10(%rsp),%rax
  mov    %rax,(%r14)
  mov    %r15,0x8(%r14)
  mov    0x8(%rsp),%rsi
  mov    %rbp,%rdi
  call   <memcpy@plt>
  sub    $0x8,%rsp
  push   $0x64
  push   %r12
  push   0x18(%rsp)
  mov    %r13,%r9
  mov    0x38(%rsp),%r8
  mov    %rbp,%rcx
  mov    %rbx,%rdx
  mov    0x30(%rsp),%r14
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <uav@plt>
  cmp    %r15,%r14
  mov    %r14,%r12
  cmovg  %r15,%r12
  add    $0x20,%rsp
  test   %r12,%r12
  jle    L16
  mov    0x10(%rsp),%rax
  lea    0x8(,%rax,8),%rcx
  mov    %rbp,%rax
  mov    $0x0,%edx
  pxor   %xmm1,%xmm1
  movapd %xmm1,%xmm0
L107:
  ucomisd (%rax),%xmm1
  jp     L54
  ucomisd (%rax),%xmm0
  je     L131
L54:
  add    $0x1,%rdx
  add    %rcx,%rax
  cmp    %rdx,%r12
  jne    L107
  jmp    L51
L16:
  mov    $0x0,%r12d
  jmp    L51
L131:
  mov    %rdx,%r12
L51:
  mov    0x10(%rsp),%rax
  test   %rax,%rax
  jle    L61
  lea    0x0(,%r15,8),%rdi
  mov    %rdi,(%rsp)
  mov    0x20(%rsp),%r11
  add    %rdi,%r11
  lea    (%rbx,%r12,8),%rdi
  mov    %rdi,0x28(%rsp)
  lea    0x0(,%rax,8),%r8
  lea    0x8(,%rax,8),%rdi
  movq   $0x0,0x8(%rsp)
  mov    $0x0,%r14d
  jmp    L59
L77:
  lea    (%rbx,%r10,8),%rax
  mov    %rbp,%rcx
  mov    %r13,%rdx
  pxor   %xmm1,%xmm1
L26:
  movsd  (%rdx),%xmm0
  mulsd  (%rax),%xmm0
  divsd  (%rcx),%xmm0
  addsd  %xmm0,%xmm1
  add    %r8,%rdx
  add    $0x8,%rax
  add    %rdi,%rcx
  cmp    %rsi,%rax
  jne    L26
L38:
  movsd  %xmm1,(%r9)
  add    $0x8,%r9
  add    %r15,%r10
  add    (%rsp),%rsi
  cmp    %r11,%r9
  je     L145
L108:
  pxor   %xmm1,%xmm1
  test   %r12,%r12
  jg     L77
  jmp    L38
L145:
  add    $0x1,%r14
  add    %r15,0x8(%rsp)
  add    (%rsp),%r11
  cmp    %r14,0x10(%rsp)
  je     L61
L59:
  test   %r15,%r15
  jle    L145
  mov    0x20(%rsp),%rax
  mov    0x8(%rsp),%rsi
  lea    (%rax,%rsi,8),%r9
  mov    0x18(%rsp),%rax
  lea    (%rax,%r14,8),%r13
  mov    0x28(%rsp),%rsi
  mov    $0x0,%r10d
  jmp    L108
L61:
  mov    %rbx,%rdi
  call   <free@plt>
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void pinv(double *A, int32_t m, int32_t n, double *Y, int32_t *size) {
  int32_t ka = ((((m) > (n)) ? (m) : (n)) + 1);
  double *u = (double *)malloc(((m * m) + (m * n) + (n * n) + ka * 3) * sizeof(double));
  double *a = u + m * m;
  double *v = a + m * n;
  double *s = v + n * n;
  double *e = s + ka;
  double *w = e + ka;
  size[0] = n;
  size[1] = m;
  int32_t i, j, k, l;
  memcpy(a, A, m * n * sizeof(double));
  uav(m, n, u, a, v, s, e, w, 100);
  j = n;
  if (m < n)
    j = m;
  j = j - 1;
  k = 0;
  while ((k <= j) && (a[k * n + k] != 0.0))
    k = k + 1;
  k = k - 1;
  double sum;
  for (i = 0; i <= n - 1; i++)
    for (j = 0; j <= m - 1; j++) {
      sum = 0.0;
      for (l = 0; l <= k; l++)
        sum += v[l * n + i] * u[j * m + l] / a[l * n + l];
      Y[i * m + j] = sum;
    }
  free(u);
}
```