user: What would the C source look like for the assembly code provided here?

```asm
<setCornerCP>:
  endbr64
  push   %rbx
  movsd  (%r8),%xmm2
  mov    %edx,%r9d
  mov    %rcx,%rdx
  movsd  0x18(%rdi),%xmm0
  movsd  (%rdi),%xmm1
  mov    %rdi,%rax
  mulsd  %xmm0,%xmm2
  mulsd  (%rcx),%xmm2
  subsd  %xmm2,%xmm1
  movsd  %xmm1,(%rdi)
  movsd  (%r8),%xmm2
  movsd  0x8(%rdi),%xmm1
  mulsd  %xmm0,%xmm2
  mulsd  0x8(%rcx),%xmm2
  subsd  %xmm2,%xmm1
  movsd  %xmm1,0x8(%rdi)
  mulsd  (%r8),%xmm0
  movsd  0x10(%rdi),%xmm1
  mulsd  0x10(%rcx),%xmm0
  lea    -0x1(%rsi),%ecx
  subsd  %xmm0,%xmm1
  movsd  %xmm1,0x10(%rdi)
  lea    0x0(,%rcx,4),%edi
  movslq %edi,%rdi
  lea    (%rax,%rdi,8),%rbx
  lea    0x18(,%rdi,8),%r11
  movslq %ecx,%rdi
  lea    (%rax,%r11,1),%r10
  lea    (%r8,%rdi,8),%rdi
  movsd  (%rbx),%xmm1
  lea    (%rcx,%rcx,2),%ecx
  movsd  (%r10),%xmm0
  mulsd  (%rdi),%xmm0
  movslq %ecx,%rcx
  mulsd  (%rdx,%rcx,8),%xmm0
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rbx)
  movsd  (%r10),%xmm0
  mulsd  (%rdi),%xmm0
  lea    -0x10(%rax,%r11,1),%rbx
  mulsd  0x8(%rdx,%rcx,8),%xmm0
  movsd  (%rbx),%xmm1
  lea    -0x8(%rax,%r11,1),%r11
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rbx)
  movsd  (%r10),%xmm0
  mulsd  (%rdi),%xmm0
  mulsd  0x10(%rdx,%rcx,8),%xmm0
  lea    -0x1(%r9),%ecx
  movsd  (%r11),%xmm1
  imul   %esi,%ecx
  lea    0x0(,%rcx,4),%edi
  subsd  %xmm0,%xmm1
  movslq %edi,%rdi
  lea    (%rax,%rdi,8),%rbx
  movsd  %xmm1,(%r11)
  lea    0x18(,%rdi,8),%r11
  movslq %ecx,%rdi
  lea    (%rax,%r11,1),%r10
  lea    (%r8,%rdi,8),%r9
  lea    (%rcx,%rcx,2),%edi
  movsd  (%r10),%xmm0
  mulsd  (%r9),%xmm0
  lea    -0x1(%rcx,%rsi,1),%ecx
  movslq %edi,%rdi
  lea    0x0(,%rcx,4),%esi
  mulsd  (%rdx,%rdi,8),%xmm0
  movsd  (%rbx),%xmm1
  movslq %esi,%rsi
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rbx)
  movsd  (%r10),%xmm0
  mulsd  (%r9),%xmm0
  lea    -0x10(%rax,%r11,1),%rbx
  mulsd  0x8(%rdx,%rdi,8),%xmm0
  movsd  (%rbx),%xmm1
  lea    -0x8(%rax,%r11,1),%r11
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rbx)
  movsd  (%r10),%xmm0
  mulsd  (%r9),%xmm0
  lea    (%rax,%rsi,8),%r10
  mulsd  0x10(%rdx,%rdi,8),%xmm0
  movsd  (%r11),%xmm1
  lea    0x18(,%rsi,8),%r9
  movslq %ecx,%rsi
  lea    (%rax,%r9,1),%rdi
  lea    (%r8,%rsi,8),%rsi
  lea    (%rcx,%rcx,2),%ecx
  lea    -0x10(%rax,%r9,1),%r8
  movslq %ecx,%rcx
  lea    -0x8(%rax,%r9,1),%rax
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%r11)
  movsd  (%rdi),%xmm0
  mulsd  (%rsi),%xmm0
  mulsd  (%rdx,%rcx,8),%xmm0
  movsd  (%r10),%xmm1
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%r10)
  movsd  (%rdi),%xmm0
  mulsd  (%rsi),%xmm0
  mulsd  0x8(%rdx,%rcx,8),%xmm0
  movsd  (%r8),%xmm1
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%r8)
  movsd  (%rdi),%xmm0
  mulsd  (%rsi),%xmm0
  mulsd  0x10(%rdx,%rcx,8),%xmm0
  movsd  (%rax),%xmm1
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax)
  pop    %rbx
  ret
```

assistant: ```c
void setCornerCP(double *cpw, int ncp, int kcp, double *dirOffset, double *sgnDistDiff) {
  int ind;
  ind = 0;
  cpw[4 * ind] -= cpw[4 * ind + 3] * sgnDistDiff[ind] * dirOffset[3 * ind];
  cpw[4 * ind + 1] -= cpw[4 * ind + 3] * sgnDistDiff[ind] * dirOffset[3 * ind + 1];
  cpw[4 * ind + 2] -= cpw[4 * ind + 3] * sgnDistDiff[ind] * dirOffset[3 * ind + 2];
  ind = ncp - 1;
  cpw[4 * ind] -= cpw[4 * ind + 3] * sgnDistDiff[ind] * dirOffset[3 * ind];
  cpw[4 * ind + 1] -= cpw[4 * ind + 3] * sgnDistDiff[ind] * dirOffset[3 * ind + 1];
  cpw[4 * ind + 2] -= cpw[4 * ind + 3] * sgnDistDiff[ind] * dirOffset[3 * ind + 2];
  ind = (kcp - 1) * ncp;
  cpw[4 * ind] -= cpw[4 * ind + 3] * sgnDistDiff[ind] * dirOffset[3 * ind];
  cpw[4 * ind + 1] -= cpw[4 * ind + 3] * sgnDistDiff[ind] * dirOffset[3 * ind + 1];
  cpw[4 * ind + 2] -= cpw[4 * ind + 3] * sgnDistDiff[ind] * dirOffset[3 * ind + 2];
  ind = ncp * kcp - 1;
  cpw[4 * ind] -= cpw[4 * ind + 3] * sgnDistDiff[ind] * dirOffset[3 * ind];
  cpw[4 * ind + 1] -= cpw[4 * ind + 3] * sgnDistDiff[ind] * dirOffset[3 * ind + 1];
  cpw[4 * ind + 2] -= cpw[4 * ind + 3] * sgnDistDiff[ind] * dirOffset[3 * ind + 2];
}
```