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

```asm
<svd_pseudoinverse>:
  endbr64
  push   %r15
  movslq %edx,%r15
  push   %r14
  mov    %r15d,%edx
  mov    %ecx,%r14d
  push   %r13
  mov    %rsi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x28,%rsp
  mov    %ecx,0xc(%rsp)
  call   <svd@plt>
  mov    %eax,%r12d
  test   %r14d,%r14d
  jle    L117
  test   %eax,%eax
  jle    L117
  mov    %r14d,%eax
  movslq %r15d,%rdx
  mov    %r12d,%r14d
  movslq %r12d,%r10
  sub    $0x1,%eax
  lea    (%rbx,%rdx,8),%r9
  lea    0x8(%r13),%r11
  and    $0xfffffffe,%r14d
  add    %rdx,%rax
  mov    %r14d,%esi
  lea    0x8(%rbx,%rax,8),%rbp
  mov    %r12d,%eax
  shl    $0x3,%rsi
  shr    %eax
  lea    0x0(%r13,%rsi,1),%rdi
  lea    -0x1(%rax),%ecx
  add    $0x1,%rcx
  shl    $0x4,%rcx
  nopl   (%rax)
L59:
  mov    (%r9),%rax
  cmp    %r11,%rax
  je     L116
  xor    %edx,%edx
  cmp    $0x1,%r12d
  je     L116
  nopl   0x0(%rax,%rax,1)
L129:
  movupd (%rax,%rdx,1),%xmm0
  movupd 0x0(%r13,%rdx,1),%xmm2
  divpd  %xmm2,%xmm0
  movups %xmm0,(%rax,%rdx,1)
  add    $0x10,%rdx
  cmp    %rcx,%rdx
  jne    L129
  cmp    %r12d,%r14d
  je     L53
  add    %rsi,%rax
  movsd  (%rax),%xmm0
  divsd  (%rdi),%xmm0
  movsd  %xmm0,(%rax)
L53:
  add    $0x8,%r9
  cmp    %rbp,%r9
  jne    L59
L117:
  test   %r15d,%r15d
  jle    L149
  lea    -0x1(%r15),%eax
  mov    0xc(%rsp),%ecx
  lea    0x8(%rbx,%rax,8),%rax
  mov    %rax,0x10(%rsp)
  lea    (%rbx,%r15,8),%rax
  movslq %r12d,%r15
  lea    0x0(,%rcx,8),%ebp
  mov    %rax,0x18(%rsp)
  lea    -0x1(%rcx),%eax
  lea    0x8(%r13,%rax,8),%r14
  mov    %r15,%rax
  mov    %r12d,%r15d
  mov    %r13,%r12
  mov    %rax,%r13
  nopl   0x0(%rax)
L66:
  mov    %r12,%rdi
  mov    %ebp,%edx
  xor    %esi,%esi
  call   <memset@plt>
  mov    0xc(%rsp),%eax
  mov    (%rbx),%rdi
  test   %eax,%eax
  jle    L112
  mov    0x18(%rsp),%r10
  mov    %r12,%rdx
  test   %r15d,%r15d
  jle    L112
  nopl   0x0(%rax)
L131:
  mov    (%r10),%rsi
  movsd  (%rdx),%xmm1
  xor    %eax,%eax
  nopl   0x0(%rax)
L78:
  movsd  (%rdi,%rax,8),%xmm0
  mulsd  (%rsi,%rax,8),%xmm0
  add    $0x1,%rax
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdx)
  cmp    %r13,%rax
  jne    L78
  add    $0x8,%rdx
  add    $0x8,%r10
  cmp    %rdx,%r14
  jne    L131
L112:
  mov    %ebp,%edx
  mov    %r12,%rsi
  add    $0x8,%rbx
  call   <memcpy@plt>
  cmp    0x10(%rsp),%rbx
  jne    L66
  mov    %r15d,%r12d
L149:
  add    $0x28,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L116:
  xor    %edx,%edx
  nopl   0x0(%rax)
L103:
  movsd  (%rax,%rdx,8),%xmm0
  divsd  0x0(%r13,%rdx,8),%xmm0
  movsd  %xmm0,(%rax,%rdx,8)
  add    $0x1,%rdx
  cmp    %r10,%rdx
  jne    L103
  jmp    L53
```

assistant: ```c
int svd_pseudoinverse(double **_w, double *_s, int _nrows, int _ncols) {
  int rank;
  int i;
  int j;
  int k;
  rank = svd(_w, _s, _nrows, _ncols);
  for (j = 0; j < _ncols; j++)
    for (i = 0; i < rank; i++)
      _w[_nrows + j][i] /= _s[i];
  for (i = 0; i < _nrows; i++) {
    memset(_s, 0, _ncols * sizeof(*_s));
    for (j = 0; j < _ncols; j++)
      for (k = 0; k < rank; k++)
        _s[j] += _w[i][k] * _w[_nrows + j][k];
    memcpy(_w[i], _s, _ncols * sizeof(*_s));
  }
  return rank;
}
```