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

```asm
<pinv>:
  endbr64
  push   %r15
  mov    %rdx,%rax
  mov    %r8,%r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x38,%rsp
  cmp    %rsi,%rdx
  cmovl  %rsi,%r13
  imul   %rsi,%rax
  mov    %rdx,0x10(%rsp)
  imul   %rsi,%r12
  mov    %rcx,0x20(%rsp)
  imul   %rdx,%rdx
  add    $0x1,%r13
  mov    %rax,0x8(%rsp)
  lea    (%r12,%rax,1),%rdi
  lea    0x0(%r13,%r13,2),%rax
  shl    $0x3,%r13
  add    %rdx,%rdi
  mov    %rdx,(%rsp)
  add    %rax,%rdi
  shl    $0x3,%rdi
  call   <malloc@plt>
  mov    (%rsp),%rdx
  mov    %rbx,0x8(%r15)
  mov    %r14,%rsi
  mov    0x8(%rsp),%rcx
  lea    (%rax,%r12,8),%r12
  mov    %rax,%rbp
  mov    0x10(%rsp),%rax
  shl    $0x3,%rcx
  mov    %rax,(%r15)
  lea    (%r12,%rcx,1),%rdi
  lea    (%rdi,%rdx,8),%r9
  mov    %rdi,0x18(%rsp)
  mov    %rcx,%rdx
  mov    %r12,%rdi
  lea    (%r9,%r13,1),%r8
  mov    %r9,0x8(%rsp)
  mov    %r8,(%rsp)
  add    %r8,%r13
  call   <memcpy@plt>
  sub    $0x8,%rsp
  mov    %r12,%rcx
  mov    %rbp,%rdx
  push   $0x64
  mov    %rbx,%rdi
  push   %r13
  mov    0x18(%rsp),%r8
  push   %r8
  mov    0x30(%rsp),%r15
  mov    0x28(%rsp),%r9
  mov    0x38(%rsp),%r8
  mov    %r15,%rsi
  call   <uav@plt>
  cmp    %rbx,%r15
  mov    %r15,%rax
  cmovg  %rbx,%rax
  add    $0x20,%rsp
  xor    %r11d,%r11d
  test   %rax,%rax
  jle    L13
  mov    %rax,%rdx
  mov    0x10(%rsp),%rax
  xor    %r11d,%r11d
  pxor   %xmm0,%xmm0
  lea    0x8(,%rax,8),%rcx
  mov    %r12,%rax
  jmp    L93
  cs nopw 0x0(%rax,%rax,1)
L82:
  add    $0x1,%r11
  add    %rcx,%rax
  cmp    %r11,%rdx
  je     L13
L93:
  ucomisd (%rax),%xmm0
  jp     L82
  jne    L82
L13:
  mov    0x10(%rsp),%rax
  test   %rax,%rax
  jle    L76
  mov    0x20(%rsp),%rdi
  lea    0x0(,%rbx,8),%r14
  pxor   %xmm2,%xmm2
  movq   $0x0,0x8(%rsp)
  movq   $0x0,(%rsp)
  lea    0x0(,%rax,8),%r8
  lea    (%rdi,%r14,1),%r13
  lea    0x0(%rbp,%r11,8),%rdi
  mov    %rdi,0x28(%rsp)
  lea    0x8(,%rax,8),%rdi
  nopw   0x0(%rax,%rax,1)
L85:
  test   %rbx,%rbx
  jle    L52
  mov    0x20(%rsp),%rax
  mov    0x8(%rsp),%rsi
  xor    %r10d,%r10d
  lea    (%rax,%rsi,8),%r9
  mov    (%rsp),%rsi
  mov    0x18(%rsp),%rax
  lea    (%rax,%rsi,8),%r15
  mov    0x28(%rsp),%rsi
L3:
  movapd %xmm2,%xmm1
  test   %r11,%r11
  je     L57
  lea    0x0(%rbp,%r10,8),%rax
  mov    %r12,%rcx
  movapd %xmm2,%xmm1
  mov    %r15,%rdx
  nopl   0x0(%rax,%rax,1)
L42:
  movsd  (%rdx),%xmm0
  mulsd  (%rax),%xmm0
  add    $0x8,%rax
  add    %r8,%rdx
  divsd  (%rcx),%xmm0
  add    %rdi,%rcx
  addsd  %xmm0,%xmm1
  cmp    %rax,%rsi
  jne    L42
L57:
  movsd  %xmm1,(%r9)
  add    $0x8,%r9
  add    %rbx,%r10
  add    %r14,%rsi
  cmp    %r13,%r9
  jne    L3
L52:
  addq   $0x1,(%rsp)
  add    %r14,%r13
  mov    (%rsp),%rax
  add    %rbx,0x8(%rsp)
  cmp    %rax,0x10(%rsp)
  jne    L85
L76:
  add    $0x38,%rsp
  mov    %rbp,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <free@plt>
```

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);
}
```