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

```asm
<slaSvdsol>:
  endbr64
  push   %r15
  mov    %edi,%r10d
  push   %r14
  mov    %r8,%r14
  push   %r13
  mov    %esi,%r13d
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  lea    0x0(,%r13,8),%ebp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x88,%rsp
  mov    0xc8(%rsp),%rdi
  mov    %r9,0x38(%rsp)
  mov    0xc0(%rsp),%r15
  mov    %rdi,0x40(%rsp)
  mov    0xd0(%rsp),%rdi
  mov    %rdi,0x48(%rsp)
  mov    0xd8(%rsp),%rdi
  mov    %rdi,0x50(%rsp)
  movslq %r10d,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  mov    %rdi,0x58(%rsp)
  lea    0x0(,%r10,8),%edi
  mov    %r10d,0x30(%rsp)
  call   <malloc@plt>
  mov    %r12d,%edi
  mov    %r12d,0x28(%rsp)
  imul   %ebx,%edi
  mov    %rax,0x20(%rsp)
  shl    $0x3,%edi
  call   <malloc@plt>
  mov    %ebp,%edi
  mov    %rax,0x8(%rsp)
  call   <malloc@plt>
  mov    %ebx,%esi
  imul   %ebx,%esi
  mov    %rax,0x10(%rsp)
  mov    %esi,%edi
  shl    $0x3,%edi
  call   <malloc@plt>
  mov    %ebp,%edi
  mov    %rax,0x18(%rsp)
  call   <malloc@plt>
  mov    %ebp,%edi
  mov    %rax,%r12
  call   <malloc@plt>
  mov    0x20(%rsp),%r11
  test   %rax,%rax
  mov    %rax,%rbp
  je     L105
  mov    0x30(%rsp),%r10d
  mov    0x28(%rsp),%edi
  mov    %r13d,0x6c(%rsp)
  mov    %ebx,0x74(%rsp)
  mov    %r10d,0x68(%rsp)
  mov    %edi,0x70(%rsp)
  test   %r10d,%r10d
  jle    L73
  mov    0x38(%rsp),%rax
  movslq %edi,%rcx
  mov    %rbp,0x28(%rsp)
  xor    %r9d,%r9d
  lea    -0x1(%r13),%esi
  mov    0x8(%rsp),%r10
  mov    0x58(%rsp),%rbp
  xor    %edi,%edi
  mov    %r12,0x20(%rsp)
  shl    $0x3,%rcx
  lea    0x8(%rax),%r8
  mov    %rax,%r12
  mov    %r15,0x30(%rsp)
  mov    %rsi,%r15
  nopl   0x0(%rax)
L103:
  movsd  (%r14,%rdi,8),%xmm0
  movsd  %xmm0,(%r11,%rdi,8)
  test   %r13d,%r13d
  jle    L92
  movslq %r9d,%rdx
  lea    (%r12,%rdx,8),%rax
  add    %r15,%rdx
  lea    (%r8,%rdx,8),%rsi
  mov    %r10,%rdx
  nopw   0x0(%rax,%rax,1)
L68:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  movsd  %xmm0,(%rdx)
  add    %rcx,%rdx
  cmp    %rsi,%rax
  jne    L68
L92:
  add    $0x1,%rdi
  add    $0x8,%r10
  add    %ebx,%r9d
  cmp    %rbp,%rdi
  jne    L103
  mov    0x20(%rsp),%r12
  mov    0x28(%rsp),%rbp
  mov    0x30(%rsp),%r15
L73:
  test   %r13d,%r13d
  jle    L93
  movslq %ebx,%rcx
  lea    -0x1(%r13),%eax
  mov    0x40(%rsp),%rbx
  xor    %edi,%edi
  shl    $0x3,%rax
  mov    $0xfffffffffffffff8,%r8
  mov    0x10(%rsp),%r9
  mov    0x18(%rsp),%r10
  shl    $0x3,%rcx
  lea    0x8(%rbx,%rax,1),%rsi
  sub    %rax,%r8
  nopl   0x0(%rax,%rax,1)
L26:
  movsd  (%r15,%rdi,8),%xmm0
  lea    (%r8,%rsi,1),%rax
  lea    (%r10,%rdi,8),%rdx
  movsd  %xmm0,(%r9,%rdi,8)
  nopl   0x0(%rax)
L32:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  movsd  %xmm0,(%rdx)
  add    %rcx,%rdx
  cmp    %rsi,%rax
  jne    L32
  add    $0x1,%rdi
  lea    (%rax,%rcx,1),%rsi
  cmp    %r13,%rdi
  jne    L26
  lea    0x74(%rsp),%rcx
  lea    0x70(%rsp),%rdx
  mov    %r11,%r8
  lea    0x6c(%rsp),%rsi
  lea    0x68(%rsp),%rdi
  push   %rbp
  push   %r12
  push   0x28(%rsp)
  push   0x28(%rsp)
  mov    0x28(%rsp),%r9
  mov    %r11,0x40(%rsp)
  call   <sla_svdsol_@plt>
  mov    0x40(%rsp),%r11
  add    $0x20,%rsp
  xor    %eax,%eax
  mov    0x48(%rsp),%rdx
  mov    0x50(%rsp),%rcx
  nop
L52:
  movsd  0x0(%rbp,%rax,8),%xmm0
  movsd  %xmm0,(%rcx,%rax,8)
  movsd  (%r12,%rax,8),%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %r13,%rax
  jne    L52
L105:
  mov    %r11,%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  mov    0x18(%rsp),%rdi
  call   <free@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L56
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L93:
  lea    0x74(%rsp),%rcx
  lea    0x70(%rsp),%rdx
  mov    %r11,%r8
  lea    0x6c(%rsp),%rsi
  lea    0x68(%rsp),%rdi
  push   %rbp
  push   %r12
  push   0x28(%rsp)
  push   0x28(%rsp)
  mov    0x28(%rsp),%r9
  mov    %r11,0x40(%rsp)
  call   <sla_svdsol_@plt>
  add    $0x20,%rsp
  mov    0x20(%rsp),%r11
  jmp    L105
L56:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void slaSvdsol(int m, int n, int mp, int np, double *b, double *u, double *w, double *v, double *work, double *x) {
  int M;
  int N;
  int MP;
  int NP;
  double *B;
  double *U;
  double *W;
  double *V;
  double *WORK;
  double *X;
  int i;
  int j;
  B = malloc(sizeof(double) * (size_t)(m));
  U = malloc(sizeof(double) * (size_t)(mp * np));
  W = malloc(sizeof(double) * (size_t)n);
  V = malloc(sizeof(double) * (size_t)(np * np));
  WORK = malloc(sizeof(double) * (size_t)n);
  X = malloc(sizeof(double) * (size_t)n);
  if (X) {
    M = m;
    N = n;
    MP = mp;
    NP = np;
    for (i = 0; i < m; i++) {
      B[i] = b[i];
      for (j = 0; j < n; j++)
        U[i + mp * j] = u[np * i + j];
    }
    for (i = 0; i < n; i++) {
      W[i] = w[i];
      for (j = 0; j < n; j++)
        V[i + np * j] = v[np * i + j];
    }
    sla_svdsol_(&M, &N, &MP, &NP, (double *)B, (double *)U, (double *)W, (double *)V, (double *)WORK, (double *)X);
    for (i = 0; i < n; i++) {
      x[i] = X[i];
      work[i] = WORK[i];
    }
  }
  free(B);
  free(U);
  free(W);
  free(V);
  free(WORK);
  free(X);
}
```