user: Translate the below assembly code into C programming language:

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