user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<pinv>:
  endbr64
  push   %r15
  movq   %rsi,%xmm5
  movq   %rdx,%xmm0
  push   %r14
  mov    %rsi,%r14
  punpcklqdq %xmm5,%xmm0
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x58,%rsp
  cmp    %rsi,%rdx
  cmovge %rdx,%r14
  mov    %rcx,0x48(%rsp)
  imul   %rsi,%rbx
  mov    %rdx,%rcx
  imul   %rdx,%r13
  mov    %rdi,0x38(%rsp)
  imul   %rdx,%rcx
  add    $0x1,%r14
  mov    %r8,0x30(%rsp)
  lea    (%r14,%r14,2),%rax
  mov    %rsi,0x8(%rsp)
  shl    $0x3,%r14
  lea    (%rbx,%r13,1),%r15
  movaps %xmm0,0x20(%rsp)
  lea    (%r15,%rcx,1),%rdi
  mov    %rcx,0x10(%rsp)
  add    %rax,%rdi
  shl    $0x3,%rdi
  call   <malloc@plt>
  mov    0x10(%rsp),%rcx
  mov    0x30(%rsp),%rsi
  lea    0x0(,%r13,8),%rdx
  movdqa 0x20(%rsp),%xmm0
  lea    (%rax,%rbx,8),%rbx
  mov    %rax,%r12
  lea    (%rbx,%rdx,1),%r13
  mov    %rbx,%rdi
  lea    0x0(%r13,%rcx,8),%r9
  movups %xmm0,(%rsi)
  mov    0x38(%rsp),%rsi
  lea    (%r9,%r14,1),%rcx
  mov    %r9,0x18(%rsp)
  mov    %rcx,0x10(%rsp)
  add    %rcx,%r14
  call   <memcpy@plt>
  sub    $0x8,%rsp
  mov    %r13,%r8
  mov    %r12,%rdx
  push   $0x64
  mov    %rbp,%rsi
  push   %r14
  mov    0x28(%rsp),%rcx
  push   %rcx
  mov    0x28(%rsp),%r14
  mov    %rbx,%rcx
  mov    0x38(%rsp),%r9
  mov    %r14,%rdi
  call   <uav@plt>
  cmp    %r14,%rbp
  mov    %r14,%rax
  cmovle %rbp,%rax
  add    $0x20,%rsp
  xor    %r14d,%r14d
  test   %rax,%rax
  jle    L23
  mov    %rax,%rdx
  xor    %r14d,%r14d
  pxor   %xmm3,%xmm3
  mov    %rbx,%rax
  lea    0x8(,%rbp,8),%rcx
  jmp    L7
  nopw   0x0(%rax,%rax,1)
L132:
  add    $0x1,%r14
  add    %rcx,%rax
  cmp    %r14,%rdx
  je     L23
L7:
  ucomisd (%rax),%xmm3
  jp     L132
  jne    L132
L23:
  test   %rbp,%rbp
  jle    L34
  mov    0x8(%rsp),%rax
  test   %rax,%rax
  jle    L34
  mov    0x48(%rsp),%rsi
  shl    $0x3,%rax
  xor    %r9d,%r9d
  pxor   %xmm3,%xmm3
  mov    %rax,0x18(%rsp)
  lea    0x0(,%rbp,8),%rdi
  movq   $0x0,0x40(%rsp)
  add    %rax,%rsi
  lea    (%r12,%r15,8),%rax
  mov    %rax,0x20(%rsp)
  mov    %r14,%rax
  shr    %rax
  mov    %rsi,0x10(%rsp)
  lea    0x8(,%rbp,8),%rsi
  shl    $0x4,%rax
  mov    %rax,0x30(%rsp)
  mov    %r14,%rax
  and    $0xfffffffffffffffe,%rax
  mov    %rax,0x38(%rsp)
  nopl   (%rax)
L90:
  mov    0x48(%rsp),%rax
  mov    0x40(%rsp),%rcx
  mov    %r12,%r11
  xor    %r8d,%r8d
  lea    (%rax,%rcx,8),%r10
  nopl   0x0(%rax)
L5:
  movapd %xmm3,%xmm1
  test   %r14,%r14
  je     L114
  cmp    $0x1,%r14
  je     L40
  mov    0x30(%rsp),%rax
  mov    0x20(%rsp),%rcx
  mov    %r11,%rdx
  movapd %xmm3,%xmm1
  lea    (%r11,%rax,1),%r15
  mov    %rbx,%rax
  nopw   0x0(%rax,%rax,1)
L28:
  movsd  (%rcx),%xmm0
  movupd (%rdx),%xmm4
  add    $0x10,%rdx
  movsd  (%rax),%xmm2
  movhpd (%rdi,%rcx,1),%xmm0
  lea    (%rcx,%rdi,2),%rcx
  mulpd  %xmm4,%xmm0
  movhpd (%rsi,%rax,1),%xmm2
  lea    (%rax,%rsi,2),%rax
  divpd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  unpckhpd %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rdx,%r15
  jne    L28
  mov    0x38(%rsp),%rax
  cmp    %r14,%rax
  je     L114
L127:
  mov    %rbp,%rdx
  lea    (%r8,%rax,1),%r15
  imul   %rax,%rdx
  movsd  (%r12,%r15,8),%xmm0
  lea    (%r9,%rdx,1),%rcx
  add    %rdx,%rax
  mulsd  0x0(%r13,%rcx,8),%xmm0
  divsd  (%rbx,%rax,8),%xmm0
  addsd  %xmm0,%xmm1
L114:
  movsd  %xmm1,(%r10)
  add    0x8(%rsp),%r8
  add    $0x8,%r10
  add    0x18(%rsp),%r11
  cmp    0x10(%rsp),%r10
  jne    L5
  add    $0x1,%r9
  mov    0x8(%rsp),%rcx
  addq   $0x8,0x20(%rsp)
  add    %rcx,0x40(%rsp)
  mov    0x18(%rsp),%rcx
  add    %rcx,0x10(%rsp)
  cmp    %r9,%rbp
  jne    L90
L34:
  add    $0x58,%rsp
  mov    %r12,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <free@plt>
L40:
  movapd %xmm3,%xmm1
  xor    %eax,%eax
  jmp    L127
```

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