user: 这段汇编代码用C语言表示是什么样的?

```asm
<pca>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,%r15d
  mov    %esi,(%rsp)
  mov    %rdx,%r13
  mov    %rcx,%r12
  mov    %r8,%r14
  movslq %esi,%rbx
  lea    0x0(,%rbx,4),%rax
  mov    %rax,0x8(%rsp)
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,%rbp
  lea    0x0(,%rbx,8),%rdi
  call   <malloc@plt>
  mov    %rax,%rbx
  test   %rbp,%rbp
  je     L40
  test   %rax,%rax
  je     L40
  mov    %r12,%r8
  mov    %r14,%rcx
  mov    %r13,%rdx
  mov    (%rsp),%esi
  mov    %r15d,%edi
  mov    $0x0,%eax
  call   <svd@plt>
  mov    %eax,0x4(%rsp)
  test   %eax,%eax
  jne    L315
  cmp    %r15d,(%rsp)
  jle    L391
  test   %r15d,%r15d
  jle    L92
  lea    -0x1(%r15),%eax
  lea    0x8(,%rax,8),%rdi
  lea    0x8(%r12,%rax,8),%rsi
  mov    $0x0,%ecx
L297:
  movsd  (%r14,%rcx,1),%xmm1
  mov    %r12,%rax
L117:
  mov    %rcx,%rdx
  add    (%rax),%rdx
  movapd %xmm1,%xmm0
  mulsd  (%rdx),%xmm0
  movsd  %xmm0,(%rdx)
  add    $0x8,%rax
  cmp    %rsi,%rax
  jne    L117
  add    $0x8,%rcx
  cmp    %rdi,%rcx
  jne    L297
L92:
  mov    %rbp,%rdx
  mov    %r14,%rsi
  mov    %r15d,%edi
  mov    $0x0,%eax
  call   <sort@plt>
  mov    %r15d,%edi
  shr    $0x1f,%edi
  add    %r15d,%edi
  sar    %edi
  cmp    $0x1,%r15d
  jle    L110
  movslq %r15d,%rax
  lea    0x0(%rbp,%rax,4),%rdx
  mov    $0x0,%eax
L140:
  mov    0x0(%rbp,%rax,4),%ecx
  mov    -0x4(%rdx),%esi
  mov    %esi,0x0(%rbp,%rax,4)
  mov    %ecx,-0x4(%rdx)
  add    $0x1,%rax
  sub    $0x4,%rdx
  cmp    %eax,%edi
  jg     L140
L110:
  mov    (%rsp),%eax
  test   %eax,%eax
  jle    L38
  lea    -0x1(%rax),%eax
  lea    0x8(,%rax,8),%rdi
  mov    $0x0,%edx
  lea    -0x1(%r15),%ecx
  jmp    L94
L40:
  test   %rbp,%rbp
  je     L343
  mov    %rbp,%rdi
  call   <free@plt>
L343:
  test   %rbx,%rbx
  je     L286
  mov    %rbx,%rdi
  call   <free@plt>
  movl   $0xffffffff,0x4(%rsp)
  jmp    L105
L391:
  mov    (%rsp),%eax
  test   %eax,%eax
  jle    L296
  lea    -0x1(%rax),%eax
  lea    0x8(,%rax,8),%rdi
  lea    -0x1(%r15),%eax
  lea    0x8(%r13,%rax,8),%rsi
  mov    $0x0,%ecx
L115:
  movsd  (%r14,%rcx,1),%xmm1
  test   %r15d,%r15d
  jle    L278
  mov    %r13,%rax
L375:
  mov    %rcx,%rdx
  add    (%rax),%rdx
  movapd %xmm1,%xmm0
  mulsd  (%rdx),%xmm0
  movsd  %xmm0,(%rdx)
  add    $0x8,%rax
  cmp    %rax,%rsi
  jne    L375
L278:
  add    $0x8,%rcx
  cmp    %rcx,%rdi
  jne    L115
L296:
  mov    %rbp,%rdx
  mov    %r14,%rsi
  mov    (%rsp),%edi
  mov    $0x0,%eax
  call   <sort@plt>
  mov    (%rsp),%eax
  mov    %eax,%edi
  shr    $0x1f,%edi
  add    %eax,%edi
  sar    %edi
  cmp    $0x1,%eax
  jle    L106
  mov    0x8(%rsp),%rax
  add    %rbp,%rax
  mov    $0x0,%edx
L384:
  mov    0x0(%rbp,%rdx,4),%ecx
  mov    -0x4(%rax),%esi
  mov    %esi,0x0(%rbp,%rdx,4)
  mov    %ecx,-0x4(%rax)
  add    $0x1,%rdx
  sub    $0x4,%rax
  cmp    %edx,%edi
  jg     L384
L106:
  test   %r15d,%r15d
  jle    L249
  mov    %r13,%r8
  lea    -0x1(%r15),%eax
  lea    0x8(%r13,%rax,8),%r9
  mov    (%rsp),%r10d
  lea    -0x1(%r10),%esi
  lea    0x8(,%rsi,8),%rdi
  jmp    L220
L263:
  mov    %r8,%rcx
  mov    (%r8),%r11
  mov    $0x0,%eax
L174:
  movslq 0x0(%rbp,%rax,4),%rdx
  movsd  (%r11,%rdx,8),%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  mov    %rax,%rdx
  add    $0x1,%rax
  cmp    %rsi,%rdx
  jne    L174
  mov    $0x0,%eax
L100:
  mov    (%rcx),%rdx
  movsd  (%rbx,%rax,1),%xmm0
  movsd  %xmm0,(%rdx,%rax,1)
  add    $0x8,%rax
  cmp    %rdi,%rax
  jne    L100
L268:
  add    $0x8,%r8
  cmp    %r8,%r9
  je     L249
L220:
  test   %r10d,%r10d
  jg     L263
  jmp    L268
L249:
  mov    (%rsp),%eax
  test   %eax,%eax
  jle    L315
  lea    -0x1(%rax),%ecx
  lea    0x8(,%rcx,8),%rdi
  mov    $0x0,%edx
L310:
  mov    $0x0,%eax
L327:
  movslq 0x0(%rbp,%rax,4),%rsi
  mov    (%r12,%rsi,8),%rsi
  movsd  (%rsi,%rdx,1),%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  mov    %rax,%rsi
  add    $0x1,%rax
  cmp    %rcx,%rsi
  jne    L327
  mov    $0x0,%eax
L287:
  mov    (%r12,%rax,8),%rsi
  movsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,(%rsi,%rdx,1)
  mov    %rax,%rsi
  add    $0x1,%rax
  cmp    %rcx,%rsi
  jne    L287
  add    $0x8,%rdx
  cmp    %rdi,%rdx
  jne    L310
  mov    $0x0,%eax
L358:
  movslq 0x0(%rbp,%rax,4),%rdx
  movsd  (%r14,%rdx,8),%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  mov    %rax,%rdx
  add    $0x1,%rax
  cmp    %rcx,%rdx
  jne    L358
  mov    $0x0,%eax
L408:
  movsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,(%r14,%rax,8)
  mov    %rax,%rdx
  add    $0x1,%rax
  cmp    %rcx,%rdx
  jne    L408
L315:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %rbx,%rdi
  call   <free@plt>
L105:
  mov    0x4(%rsp),%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L71:
  movslq 0x0(%rbp,%rax,4),%rsi
  mov    0x0(%r13,%rsi,8),%rsi
  movsd  (%rsi,%rdx,1),%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  mov    %rax,%rsi
  add    $0x1,%rax
  cmp    %rcx,%rsi
  jne    L71
  mov    $0x0,%eax
L136:
  mov    0x0(%r13,%rax,8),%rsi
  movsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,(%rsi,%rdx,1)
  mov    %rax,%rsi
  add    $0x1,%rax
  cmp    %rcx,%rsi
  jne    L136
L449:
  add    $0x8,%rdx
  cmp    %rdi,%rdx
  je     L38
L94:
  mov    $0x0,%eax
  test   %r15d,%r15d
  jg     L71
  jmp    L449
L38:
  test   %r15d,%r15d
  jle    L315
  mov    %r12,%r8
  lea    -0x1(%r15),%ecx
  lea    0x8(%r12,%rcx,8),%r10
  lea    0x8(,%rcx,8),%r9
L153:
  mov    %r8,%rdi
  mov    (%r8),%rsi
  mov    $0x0,%eax
L294:
  movslq 0x0(%rbp,%rax,4),%rdx
  movsd  (%rsi,%rdx,8),%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  mov    %rax,%rdx
  add    $0x1,%rax
  cmp    %rcx,%rdx
  jne    L294
  mov    $0x0,%eax
L160:
  mov    (%rdi),%rdx
  movsd  (%rbx,%rax,1),%xmm0
  movsd  %xmm0,(%rdx,%rax,1)
  add    $0x8,%rax
  cmp    %r9,%rax
  jne    L160
  add    $0x8,%r8
  cmp    %r10,%r8
  jne    L153
  mov    $0x0,%eax
L142:
  movslq 0x0(%rbp,%rax,4),%rdx
  movsd  (%r14,%rdx,8),%xmm0
  movsd  %xmm0,(%rbx,%rax,8)
  mov    %rax,%rdx
  add    $0x1,%rax
  cmp    %rcx,%rdx
  jne    L142
  mov    $0x0,%eax
L168:
  movsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,(%r14,%rax,8)
  mov    %rax,%rdx
  add    $0x1,%rax
  cmp    %rcx,%rdx
  jne    L168
  jmp    L315
L286:
  movl   $0xffffffff,0x4(%rsp)
  jmp    L105
```

assistant: ```c
int pca(int nrows, int ncolumns, double **u, double **v, double *w) {
  int i;
  int j;
  int error;
  int *index = malloc(ncolumns * sizeof(int));
  double *temp = malloc(ncolumns * sizeof(double));
  if (!index || !temp) {
    if (index)
      free(index);
    if (temp)
      free(temp);
    return -1;
  }
  error = svd(nrows, ncolumns, u, w, v);
  if (error == 0) {
    if (nrows >= ncolumns) {
      for (j = 0; j < ncolumns; j++) {
        const double s = w[j];
        for (i = 0; i < nrows; i++)
          u[i][j] *= s;
      }
      sort(ncolumns, w, index);
      for (i = 0; i < ncolumns / 2; i++) {
        j = index[i];
        index[i] = index[ncolumns - 1 - i];
        index[ncolumns - 1 - i] = j;
      }
      for (i = 0; i < nrows; i++) {
        for (j = 0; j < ncolumns; j++)
          temp[j] = u[i][index[j]];
        for (j = 0; j < ncolumns; j++)
          u[i][j] = temp[j];
      }
      for (i = 0; i < ncolumns; i++) {
        for (j = 0; j < ncolumns; j++)
          temp[j] = v[index[j]][i];
        for (j = 0; j < ncolumns; j++)
          v[j][i] = temp[j];
      }
      for (i = 0; i < ncolumns; i++)
        temp[i] = w[index[i]];
      for (i = 0; i < ncolumns; i++)
        w[i] = temp[i];
    } else {
      for (j = 0; j < nrows; j++) {
        const double s = w[j];
        for (i = 0; i < nrows; i++)
          v[i][j] *= s;
      }
      sort(nrows, w, index);
      for (i = 0; i < nrows / 2; i++) {
        j = index[i];
        index[i] = index[nrows - 1 - i];
        index[nrows - 1 - i] = j;
      }
      for (j = 0; j < ncolumns; j++) {
        for (i = 0; i < nrows; i++)
          temp[i] = u[index[i]][j];
        for (i = 0; i < nrows; i++)
          u[i][j] = temp[i];
      }
      for (j = 0; j < nrows; j++) {
        for (i = 0; i < nrows; i++)
          temp[i] = v[j][index[i]];
        for (i = 0; i < nrows; i++)
          v[j][i] = temp[i];
      }
      for (i = 0; i < nrows; i++)
        temp[i] = w[index[i]];
      for (i = 0; i < nrows; i++)
        w[i] = temp[i];
    }
  }
  free(index);
  free(temp);
  return error;
}
```