user: 请将以下的汇编代码转换成C语言代码：

```asm
<l2projectVector>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x58,%rsp
  mov    %edi,-0x54(%rbp)
  mov    %esi,-0x58(%rbp)
  mov    %edx,-0x5c(%rbp)
  mov    %rcx,-0x68(%rbp)
  mov    %r8,-0x70(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    -0x5c(%rbp),%eax
  cltq
  sub    $0x1,%rax
  mov    %rax,-0x38(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  mov    %rax,%r12
  mov    $0x0,%r13d
  mov    -0x5c(%rbp),%eax
  cltq
  mov    %rax,%r10
  mov    $0x0,%r11d
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L20:
  cmp    %rdx,%rsp
  je     L127
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L20
L127:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L146
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L146:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x30(%rbp)
  movl   $0x0,-0x4c(%rbp)
  jmp    L17
L132:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movl   $0x0,-0x44(%rbp)
  jmp    L65
L148:
  mov    -0x30(%rbp),%rax
  mov    -0x44(%rbp),%edx
  movslq %edx,%rdx
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax,%rdx,8)
  addl   $0x1,-0x44(%rbp)
L65:
  mov    -0x44(%rbp),%eax
  cmp    -0x5c(%rbp),%eax
  jl     L148
  movl   $0x0,-0x48(%rbp)
  jmp    L129
L36:
  mov    -0x4c(%rbp),%eax
  imul   -0x58(%rbp),%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x40(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movl   $0x0,-0x44(%rbp)
  jmp    L118
L74:
  mov    -0x30(%rbp),%rax
  mov    -0x44(%rbp),%edx
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm1
  mov    -0x4c(%rbp),%eax
  imul   -0x58(%rbp),%eax
  imul   -0x5c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%eax
  imul   -0x5c(%rbp),%eax
  add    %eax,%edx
  mov    -0x44(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x4c(%rbp),%eax
  imul   -0x58(%rbp),%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x30(%rbp),%rax
  mov    -0x44(%rbp),%edx
  movslq %edx,%rdx
  movsd  %xmm0,(%rax,%rdx,8)
  addl   $0x1,-0x44(%rbp)
L118:
  mov    -0x44(%rbp),%eax
  cmp    -0x5c(%rbp),%eax
  jl     L74
  addl   $0x1,-0x48(%rbp)
L129:
  mov    -0x48(%rbp),%eax
  cmp    -0x58(%rbp),%eax
  jl     L36
  movsd  -0x40(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  seta   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  movl   $0x0,-0x48(%rbp)
  jmp    L57
L142:
  movl   $0x0,-0x44(%rbp)
  jmp    L28
L152:
  mov    -0x30(%rbp),%rax
  mov    -0x44(%rbp),%edx
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  mov    -0x4c(%rbp),%eax
  imul   -0x58(%rbp),%eax
  imul   -0x5c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x48(%rbp),%eax
  imul   -0x5c(%rbp),%eax
  add    %eax,%edx
  mov    -0x44(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  divsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x44(%rbp)
L28:
  mov    -0x44(%rbp),%eax
  cmp    -0x5c(%rbp),%eax
  jl     L152
  addl   $0x1,-0x48(%rbp)
L57:
  mov    -0x48(%rbp),%eax
  cmp    -0x58(%rbp),%eax
  jl     L142
  addl   $0x1,-0x4c(%rbp)
L17:
  mov    -0x4c(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L132
  mov    %rbx,%rsp
  nop
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L75
  call   <__stack_chk_fail@plt>
L75:
  lea    -0x18(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
```

assistant: ```c
void l2projectVector(const int nSimplices, const int nPointsPerSimplex, const int nSpace, double *dV, double *r) {
  int eN, k, I;
  double vol;
  double ravg[nSpace];
  for (eN = 0; eN < nSimplices; eN++) {
    vol = 0.0;
    for (I = 0; I < nSpace; I++)
      ravg[I] = 0.0;
    for (k = 0; k < nPointsPerSimplex; k++) {
      vol += dV[eN * nPointsPerSimplex + k];
      for (I = 0; I < nSpace; I++)
        ravg[I] += r[eN * nPointsPerSimplex * nSpace + k * nSpace + I] * dV[eN * nPointsPerSimplex + k];
    }
    assert(vol > 0.0);
    for (k = 0; k < nPointsPerSimplex; k++) {
      for (I = 0; I < nSpace; I++)
        r[eN * nPointsPerSimplex * nSpace + k * nSpace + I] = ravg[I] / vol;
    }
  }
}
```