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

```asm
<u2fw>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  mov    %r9,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %r8,%rbp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x548,%rsp
  mov    %r9,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x538(%rsp)
  xor    %eax,%eax
  test   %r9,%r9
  je     L91
L195:
  cmp    $0x8,%ebx
  jle    L9
  lea    0x40(%rsp),%r9
  lea    0x20(%rsp),%rcx
  mov    %r15,%rdi
  mov    %ebx,%edx
  mov    %r9,%r8
  mov    %r13,%rsi
  mov    %r9,0x18(%rsp)
  mov    %rcx,0x8(%rsp)
  call   <normu@plt>
  mov    0x18(%rsp),%r9
  mov    %r15,%rdi
  mov    %ebx,%ecx
  mov    0x8(%rsp),%r8
  mov    %r13,%rdx
  mov    %r14,%rsi
  mov    %r14,%r15
  call   <lin_fmN@plt>
  lea    -0x1(%rbx),%eax
  lea    0x4(%r13,%rax,4),%rax
  mov    %rax,0x8(%rsp)
  xchg   %ax,%ax
L169:
  movslq 0x0(%r13),%rax
  mov    %r15,%rdi
  mov    $0x1,%edx
  add    $0x4,%r13
  mov    $0x9,%esi
  add    $0x48,%r15
  movsd  (%r12,%rax,8),%xmm0
  call   <scalmul@plt>
  cmp    %r13,0x8(%rsp)
  jne    L169
  lea    0x2b0(%rsp),%r12
  mov    $0x9,%ecx
  mov    %ebx,%edx
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   <cov_mat@plt>
  lea    0x60(%rsp),%rsi
  mov    $0x9,%edx
  mov    %r12,%rdi
  call   <lap_eig@plt>
  mov    $0x9,%esi
  mov    %r12,%rdi
  call   <trnm@plt>
  movsd  0x60(%rsp),%xmm0
  movsd  0x68(%rsp),%xmm1
  mov    $0x1,%eax
  comisd %xmm1,%xmm0
  jbe    L134
  movsd  0x70(%rsp),%xmm0
  comisd %xmm0,%xmm1
  ja     L265
L41:
  movapd %xmm1,%xmm0
  movsd  0x78(%rsp),%xmm1
  comisd %xmm1,%xmm0
  ja     L218
L142:
  movapd %xmm0,%xmm1
  movsd  0x80(%rsp),%xmm0
  comisd %xmm0,%xmm1
  ja     L138
L269:
  movapd %xmm1,%xmm0
  movsd  0x88(%rsp),%xmm1
  comisd %xmm1,%xmm0
  ja     L76
L180:
  movapd %xmm0,%xmm1
  movsd  0x90(%rsp),%xmm0
  comisd %xmm0,%xmm1
  ja     L162
L181:
  movapd %xmm1,%xmm0
  movsd  0x98(%rsp),%xmm1
  comisd %xmm1,%xmm0
  ja     L51
L23:
  movapd %xmm0,%xmm1
L68:
  ucomisd 0xa0(%rsp),%xmm1
  mov    $0x8,%edx
  cmova  %rdx,%rax
  lea    (%r12,%rax,8),%rax
  jmp    L102
  xchg   %ax,%ax
L9:
  mov    %ebx,%ecx
  mov    %r13,%rdx
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <lin_fm@plt>
  test   %ebx,%ebx
  jle    L3
  mov    %ebx,%eax
  mov    %r14,%r15
  lea    (%r14,%rax,8),%rax
  mov    %rax,0x8(%rsp)
  nopw   0x0(%rax,%rax,1)
L234:
  movslq 0x0(%r13),%rax
  mov    %r15,%rdi
  mov    $0x9,%edx
  add    $0x4,%r13
  mov    $0x9,%esi
  add    $0x8,%r15
  movsd  (%r12,%rax,8),%xmm0
  call   <scalmul@plt>
  cmp    0x8(%rsp),%r15
  jne    L234
L3:
  lea    0x2b0(%rsp),%rdx
  lea    0x60(%rsp),%rdi
  mov    %r14,%rsi
  mov    $0x8,%r9d
  lea    0xb0(%rsp),%r8
  mov    $0x9,%ecx
  call   <svduv@plt>
  lea    0x2f0(%rsp),%rax
L102:
  movupd 0x40(%rax),%xmm2
  movupd 0xd0(%rax),%xmm3
  mov    %rbp,%rdi
  movupd 0x160(%rax),%xmm4
  movupd 0x1f0(%rax),%xmm5
  movsd  0x240(%rax),%xmm0
  movlpd (%rax),%xmm2
  movlpd 0x90(%rax),%xmm3
  movlpd 0x120(%rax),%xmm4
  movlpd 0x1b0(%rax),%xmm5
  movups %xmm2,0x0(%rbp)
  movups %xmm3,0x10(%rbp)
  movups %xmm4,0x20(%rbp)
  movups %xmm5,0x30(%rbp)
  movsd  %xmm0,0x40(%rbp)
  call   <singulF@plt>
  cmp    $0x8,%ebx
  jg     L158
  cmpq   $0x0,0x10(%rsp)
  je     L220
L257:
  mov    0x538(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L144
  add    $0x548,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L265:
  movsd  0x78(%rsp),%xmm1
  mov    $0x2,%eax
  comisd %xmm1,%xmm0
  jbe    L142
L218:
  movsd  0x80(%rsp),%xmm0
  mov    $0x3,%eax
  comisd %xmm0,%xmm1
  jbe    L269
L138:
  movsd  0x88(%rsp),%xmm1
  mov    $0x4,%eax
  comisd %xmm1,%xmm0
  jbe    L180
L76:
  movsd  0x90(%rsp),%xmm0
  mov    $0x5,%eax
  comisd %xmm0,%xmm1
  jbe    L181
L162:
  movsd  0x98(%rsp),%xmm1
  mov    $0x6,%eax
  comisd %xmm1,%xmm0
  jbe    L23
L51:
  mov    $0x7,%eax
  jmp    L68
  nop
L134:
  movapd %xmm0,%xmm1
  movsd  0x70(%rsp),%xmm0
  xor    %eax,%eax
  comisd %xmm0,%xmm1
  ja     L265
  jmp    L41
  nopl   0x0(%rax,%rax,1)
L158:
  lea    0x40(%rsp),%rdx
  lea    0x20(%rsp),%rsi
  mov    %rbp,%rdi
  call   <denormF@plt>
  cmpq   $0x0,0x10(%rsp)
  jne    L257
L220:
  mov    %r14,%rdi
  call   <free@plt>
  jmp    L257
  nopl   0x0(%rax,%rax,1)
L91:
  lea    (%rcx,%rcx,8),%edi
  shl    $0x3,%edi
  call   <malloc@plt>
  mov    %rax,%r14
  jmp    L195
L144:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void u2fw(const double *u, const int *inl, const double *w, int len, double *F, double *buffer) {
  double A1[3], A2[3];
  double *Z, V[9 * 9], U[8 * 8], D[9], *p;
  int i, j;
  if (buffer == NULL)
    Z = (double *)malloc(sizeof(double) * 9 * len);
  else
    Z = buffer;
  if (len > 8) {
    normu(u, inl, len, A1, A2);
    lin_fmN(u, Z, inl, len, A1, A2);
    for (i = 0; i < len; i++) {
      j = inl[i];
      scalmul(Z + 9 * i, w[j], 9, 1);
    }
    cov_mat(V, Z, len, 9);
    lap_eig(V, D, 9);
    trnm(V, 9);
  } else {
    lin_fm(u, Z, inl, len);
    for (i = 0; i < len; i++) {
      j = inl[i];
      scalmul(Z + i, w[j], 9, 9);
    }
    svduv(D, Z, V, 9, U, 8);
  }
  if (len > 8) {
    j = 0;
    for (i = 1; i < 9; i++)
      if (D[i] < D[j])
        j = i;
    p = V + j;
  } else
    p = V + 8;
  for (i = 0; i < 9; i++) {
    F[i] = *p;
    p += 9;
  }
  singulF(F);
  if (len > 8)
    denormF(F, A1, A2);
  if (buffer == NULL)
    free(Z);
}
```