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

```asm
<NURBScurveEval>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %edi,0x10(%rsp)
  mov    %edx,0x14(%rsp)
  test   %r9d,%r9d
  jle    L81
  mov    %rsi,%r12
  mov    %edx,%esi
  movslq %edi,%rdi
  mov    %rcx,%rdx
  lea    0x0(,%rsi,4),%eax
  lea    (%rcx,%rdi,8),%r14
  movslq %esi,%rcx
  mov    %rdi,0x18(%rsp)
  cltq
  lea    (%rdx,%rcx,8),%rsi
  mov    0x80(%rsp),%rbx
  mov    %r8,%rbp
  shl    $0x3,%rax
  mov    %rsi,0x8(%rsp)
  lea    -0x20(%r12,%rax,1),%r11
  lea    -0x10(%r12,%rax,1),%r15
  lea    -0x8(%r12,%rax,1),%r13
  lea    -0x18(%r12,%rax,1),%r10
  lea    -0x1(%r9),%eax
  lea    0x8(%r8,%rax,8),%rax
  mov    %rax,(%rsp)
  mov    %r15,%rax
  mov    %r11,%r15
  mov    %rax,%r11
  jmp    L8
  nopw   0x0(%rax,%rax,1)
L74:
  movsd  (%r12),%xmm0
  divsd  0x18(%r12),%xmm0
  movsd  %xmm0,(%rbx)
  movsd  0x8(%r12),%xmm0
  divsd  0x18(%r12),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  0x10(%r12),%xmm0
  divsd  0x18(%r12),%xmm0
L14:
  movsd  %xmm0,0x10(%rbx)
  add    $0x8,%rbp
  add    $0x18,%rbx
  cmp    %rbp,(%rsp)
  je     L81
L8:
  movsd  0x0(%rbp),%xmm0
  movsd  (%r14),%xmm1
  comisd %xmm0,%xmm1
  jae    L74
  mov    0x8(%rsp),%rax
  comisd (%rax),%xmm0
  jb     L96
  movsd  (%r15),%xmm0
  divsd  0x0(%r13),%xmm0
  movsd  %xmm0,(%rbx)
  movsd  (%r10),%xmm0
  divsd  0x0(%r13),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  (%r11),%xmm0
  divsd  0x0(%r13),%xmm0
  jmp    L14
  nopl   0x0(%rax)
L81:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L96:
  mov    0x10(%rsp),%esi
  mov    0x14(%rsp),%edi
  movq   $0x0,(%rbx)
  movq   $0x0,0x8(%rbx)
  movq   $0x0,0x10(%rbx)
  movsd  0x0(%rbp),%xmm0
  mov    %r11,0x38(%rsp)
  mov    %r10,0x30(%rsp)
  mov    %rdx,0x20(%rsp)
  call   <FindSpan@plt>
  mov    0x20(%rsp),%rdx
  mov    0x90(%rsp),%r9
  mov    0x10(%rsp),%esi
  movsd  0x0(%rbp),%xmm0
  mov    %eax,%edi
  mov    %eax,0x20(%rsp)
  mov    0x88(%rsp),%r8
  mov    0x98(%rsp),%rcx
  mov    %rdx,0x28(%rsp)
  call   <BasisFuns@plt>
  mov    0x10(%rsp),%eax
  mov    0x20(%rsp),%edi
  mov    0x28(%rsp),%rdx
  mov    0x30(%rsp),%r10
  sub    %eax,%edi
  test   %eax,%eax
  mov    0x38(%rsp),%r11
  js     L18
  lea    0x0(,%rdi,4),%eax
  movslq %edi,%rdi
  movsd  (%rbx),%xmm3
  pxor   %xmm4,%xmm4
  add    0x18(%rsp),%rdi
  cltq
  movsd  0x8(%rbx),%xmm2
  shl    $0x5,%rdi
  mov    0x98(%rsp),%rcx
  movsd  0x10(%rbx),%xmm0
  lea    (%r12,%rax,8),%rax
  lea    0x20(%r12,%rdi,1),%rsi
  nopw   0x0(%rax,%rax,1)
L84:
  movsd  (%rcx),%xmm1
  mulsd  (%rax),%xmm1
  add    $0x20,%rax
  add    $0x8,%rcx
  addsd  %xmm1,%xmm3
  movsd  %xmm3,(%rbx)
  movsd  -0x8(%rcx),%xmm1
  mulsd  -0x18(%rax),%xmm1
  addsd  %xmm1,%xmm2
  movsd  %xmm2,0x8(%rbx)
  movsd  -0x8(%rcx),%xmm1
  mulsd  -0x10(%rax),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rbx)
  movsd  -0x8(%rcx),%xmm1
  mulsd  -0x8(%rax),%xmm1
  addsd  %xmm1,%xmm4
  cmp    %rax,%rsi
  jne    L84
L22:
  divsd  %xmm4,%xmm3
  divsd  %xmm4,%xmm2
  movsd  %xmm3,(%rbx)
  divsd  %xmm4,%xmm0
  movsd  %xmm2,0x8(%rbx)
  jmp    L14
L18:
  movsd  (%rbx),%xmm3
  movsd  0x8(%rbx),%xmm2
  pxor   %xmm4,%xmm4
  movsd  0x10(%rbx),%xmm0
  jmp    L22
```

assistant: ```c
void NURBScurveEval(int deg, double *cp, int ncp, double *knot, double *us, int nus, double *ep, double *left, double *right, double *N) {
  int i, jj, span, ind, fourncp;
  double wgh;
  fourncp = 4 * ncp;
  for (jj = 0; jj < nus; jj++) {
    if (us[jj] <= knot[deg]) {
      ep[jj * 3] = cp[0] / cp[3];
      ep[jj * 3 + 1] = cp[1] / cp[3];
      ep[jj * 3 + 2] = cp[2] / cp[3];
    } else if (us[jj] >= knot[ncp]) {
      ep[jj * 3] = cp[fourncp - 4] / cp[fourncp - 1];
      ep[jj * 3 + 1] = cp[fourncp - 3] / cp[fourncp - 1];
      ep[jj * 3 + 2] = cp[fourncp - 2] / cp[fourncp - 1];
    } else {
      ep[jj * 3] = 0.0;
      ep[jj * 3 + 1] = 0.0;
      ep[jj * 3 + 2] = 0.0;
      wgh = 0.0;
      span = FindSpan(ncp, deg, us[jj], knot);
      BasisFuns(span, us[jj], deg, knot, N, left, right);
      ind = span - deg;
      for (i = 0; i <= deg; i++) {
        ep[jj * 3] += N[i] * cp[(i + ind) * 4];
        ep[jj * 3 + 1] += N[i] * cp[(i + ind) * 4 + 1];
        ep[jj * 3 + 2] += N[i] * cp[(i + ind) * 4 + 2];
        wgh += N[i] * cp[(i + ind) * 4 + 3];
      }
      ep[jj * 3] = ep[jj * 3] / wgh;
      ep[jj * 3 + 1] = ep[jj * 3 + 1] / wgh;
      ep[jj * 3 + 2] = ep[jj * 3 + 2] / wgh;
    }
  }
}
```