user: 下面的汇编指令对应的C源代码是什么：

```asm
<NURBSsurfaceEval>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xe8,%rsp
  mov    %edi,0x40(%rsp)
  mov    %esi,0x44(%rsp)
  mov    %rdx,%r15
  mov    %ecx,%r11d
  mov    %ecx,0x70(%rsp)
  mov    %r8d,0x74(%rsp)
  mov    %r9,0x38(%rsp)
  mov    0x128(%rsp),%rcx
  mov    0x130(%rsp),%edx
  lea    0x0(,%r11,4),%ebx
  mov    %ebx,0x14(%rsp)
  test   %edx,%edx
  jle    L297
  movslq %edi,%rax
  lea    (%r9,%rax,8),%rax
  mov    %rax,0x18(%rsp)
  movslq %r11d,%rax
  lea    (%r9,%rax,8),%rax
  mov    %rax,0x30(%rsp)
  movslq %esi,%rax
  mov    0x120(%rsp),%r11
  lea    (%r11,%rax,8),%r13
  movslq %r8d,%rax
  lea    (%r11,%rax,8),%rax
  mov    %rax,0x28(%rsp)
  lea    -0x1(%r8),%eax
  imul   %ebx,%eax
  mov    %eax,%r11d
  mov    %eax,0xc8(%rsp)
  mov    %ebx,%eax
  imul   %r8d,%eax
  cltq
  shl    $0x3,%rax
  lea    -0x20(%r15,%rax,1),%r10
  mov    %r10,0xa8(%rsp)
  lea    -0x8(%r15,%rax,1),%r10
  mov    %r10,0xb0(%rsp)
  lea    -0x18(%r15,%rax,1),%r10
  mov    %r10,0xb8(%rsp)
  lea    -0x10(%r15,%rax,1),%rax
  mov    %rax,0xc0(%rsp)
  movslq %ebx,%rax
  shl    $0x3,%rax
  mov    %rax,0x48(%rsp)
  lea    -0x20(%r15,%rax,1),%rbx
  mov    %rbx,0x80(%rsp)
  lea    -0x8(%r15,%rax,1),%rbx
  mov    %rbx,0x88(%rsp)
  lea    -0x18(%r15,%rax,1),%rbx
  mov    %rbx,0x90(%rsp)
  lea    -0x10(%r15,%rax,1),%rax
  mov    %rax,0x98(%rsp)
  movslq %r11d,%rax
  shl    $0x3,%rax
  lea    (%r15,%rax,1),%rbx
  mov    %rbx,0x50(%rsp)
  lea    0x18(%r15,%rax,1),%rbx
  mov    %rbx,0x58(%rsp)
  lea    0x8(%r15,%rax,1),%rbx
  mov    %rbx,0x60(%rsp)
  lea    0x10(%r15,%rax,1),%rax
  mov    %rax,0x68(%rsp)
  mov    %rcx,%r14
  mov    0x138(%rsp),%r12
  lea    -0x1(%rdx),%eax
  shl    $0x4,%rax
  lea    0x10(%rcx,%rax,1),%rax
  mov    %rax,0x20(%rsp)
  mov    %esi,%eax
  mov    0x168(%rsp),%rsi
  lea    0x8(%rsi,%rax,8),%rax
  mov    %rax,0x78(%rsp)
  mov    %edi,%eax
  mov    %rax,0xd8(%rsp)
  mov    0x150(%rsp),%rdi
  lea    0x8(%rdi,%rax,8),%rbp
  shl    $0x2,%rax
  mov    %rax,0xd0(%rsp)
  lea    0x20(%r15),%rax
  mov    %rax,0xa0(%rsp)
  jmp    L336
L338:
  mov    0x28(%rsp),%rax
  comisd (%rax),%xmm0
  jb     L327
  mov    0x50(%rsp),%rax
  movsd  (%rax),%xmm0
  mov    0x58(%rsp),%rax
  divsd  (%rax),%xmm0
  movsd  %xmm0,(%r12)
  mov    0x60(%rsp),%rsi
  movsd  (%rsi),%xmm0
  divsd  (%rax),%xmm0
  movsd  %xmm0,0x8(%r12)
  mov    0x68(%rsp),%rdi
  movsd  (%rdi),%xmm0
  divsd  (%rax),%xmm0
  movsd  %xmm0,0x10(%r12)
L167:
  add    $0x10,%r14
  add    $0x18,%r12
  cmp    0x20(%rsp),%r14
  je     L297
L336:
  mov    %r14,0x8(%rsp)
  movsd  (%r14),%xmm0
  mov    0x18(%rsp),%rax
  movsd  (%rax),%xmm1
  comisd %xmm0,%xmm1
  jb     L348
  movsd  0x8(%r14),%xmm0
  movsd  0x0(%r13),%xmm1
  comisd %xmm0,%xmm1
  jb     L338
  movsd  (%r15),%xmm0
  divsd  0x18(%r15),%xmm0
  movsd  %xmm0,(%r12)
  movsd  0x8(%r15),%xmm0
  divsd  0x18(%r15),%xmm0
  movsd  %xmm0,0x8(%r12)
  movsd  0x10(%r15),%xmm0
  divsd  0x18(%r15),%xmm0
  movsd  %xmm0,0x10(%r12)
  jmp    L167
L327:
  mov    %r12,%rbx
  movq   $0x0,(%r12)
  movq   $0x0,0x8(%r12)
  movq   $0x0,0x10(%r12)
  mov    0x8(%rsp),%rax
  movsd  0x8(%rax),%xmm0
  mov    0x120(%rsp),%rdx
  mov    0x44(%rsp),%esi
  mov    0x74(%rsp),%edi
  call   <FindSpan@plt>
  mov    0x8(%rsp),%rcx
  movsd  0x8(%rcx),%xmm0
  mov    0x160(%rsp),%r9
  mov    0x158(%rsp),%r8
  mov    0x168(%rsp),%rcx
  mov    0x120(%rsp),%rdx
  mov    0x44(%rsp),%esi
  mov    %eax,0x8(%rsp)
  mov    %eax,%edi
  call   <BasisFuns@plt>
  mov    0x8(%rsp),%eax
  mov    0x44(%rsp),%edi
  sub    %edi,%eax
  test   %edi,%edi
  js     L97
  imul   0x14(%rsp),%eax
  cltq
  lea    (%r15,%rax,8),%rdx
  mov    0x168(%rsp),%rax
  pxor   %xmm1,%xmm1
  mov    0x78(%rsp),%rcx
L2:
  movsd  (%rax),%xmm0
  mulsd  (%rdx),%xmm0
  addsd  (%rbx),%xmm0
  movsd  %xmm0,(%rbx)
  movsd  (%rax),%xmm0
  mulsd  0x8(%rdx),%xmm0
  addsd  0x8(%rbx),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  (%rax),%xmm0
  mulsd  0x10(%rdx),%xmm0
  addsd  0x10(%rbx),%xmm0
  movsd  %xmm0,0x10(%rbx)
  movsd  (%rax),%xmm0
  mulsd  0x18(%rdx),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x8,%rax
  add    0x48(%rsp),%rdx
  cmp    %rcx,%rax
  jne    L2
L157:
  movsd  (%rbx),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rbx)
  movsd  0x8(%rbx),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  0x10(%rbx),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rbx)
  jmp    L167
L97:
  pxor   %xmm1,%xmm1
  jmp    L157
L348:
  mov    0x30(%rsp),%rax
  comisd (%rax),%xmm0
  jb     L263
  mov    0x8(%rsp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  0x0(%r13),%xmm1
  comisd %xmm0,%xmm1
  jb     L28
  mov    0x80(%rsp),%rax
  movsd  (%rax),%xmm0
  mov    0x88(%rsp),%rax
  divsd  (%rax),%xmm0
  movsd  %xmm0,(%r12)
  mov    0x90(%rsp),%rsi
  movsd  (%rsi),%xmm0
  divsd  (%rax),%xmm0
  movsd  %xmm0,0x8(%r12)
  mov    0x98(%rsp),%rdi
  movsd  (%rdi),%xmm0
  divsd  (%rax),%xmm0
  movsd  %xmm0,0x10(%r12)
  jmp    L167
L28:
  mov    0x28(%rsp),%rax
  comisd (%rax),%xmm0
  jb     L40
  mov    0xa8(%rsp),%rax
  movsd  (%rax),%xmm0
  mov    0xb0(%rsp),%rax
  divsd  (%rax),%xmm0
  movsd  %xmm0,(%r12)
  mov    0xb8(%rsp),%rsi
  movsd  (%rsi),%xmm0
  divsd  (%rax),%xmm0
  movsd  %xmm0,0x8(%r12)
  mov    0xc0(%rsp),%rdi
  movsd  (%rdi),%xmm0
  divsd  (%rax),%xmm0
  movsd  %xmm0,0x10(%r12)
  jmp    L167
L40:
  mov    %r12,%rbx
  movq   $0x0,(%r12)
  movq   $0x0,0x8(%r12)
  movq   $0x0,0x10(%r12)
  mov    0x8(%rsp),%rax
  movsd  0x8(%rax),%xmm0
  mov    0x120(%rsp),%rdx
  mov    0x44(%rsp),%esi
  mov    0x74(%rsp),%edi
  call   <FindSpan@plt>
  mov    0x8(%rsp),%rcx
  movsd  0x8(%rcx),%xmm0
  mov    0x160(%rsp),%r9
  mov    0x158(%rsp),%r8
  mov    0x168(%rsp),%rcx
  mov    0x120(%rsp),%rdx
  mov    0x44(%rsp),%esi
  mov    %eax,0x8(%rsp)
  mov    %eax,%edi
  call   <BasisFuns@plt>
  mov    0x8(%rsp),%eax
  mov    0x44(%rsp),%edi
  sub    %edi,%eax
  add    $0x1,%eax
  imul   0x14(%rsp),%eax
  test   %edi,%edi
  js     L344
  cltq
  lea    (%r15,%rax,8),%rdx
  mov    0x168(%rsp),%rax
  pxor   %xmm1,%xmm1
  mov    0x78(%rsp),%rcx
L253:
  movsd  (%rax),%xmm0
  mulsd  -0x20(%rdx),%xmm0
  addsd  (%rbx),%xmm0
  movsd  %xmm0,(%rbx)
  movsd  (%rax),%xmm0
  mulsd  -0x18(%rdx),%xmm0
  addsd  0x8(%rbx),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  (%rax),%xmm0
  mulsd  -0x10(%rdx),%xmm0
  addsd  0x10(%rbx),%xmm0
  movsd  %xmm0,0x10(%rbx)
  movsd  (%rax),%xmm0
  mulsd  -0x8(%rdx),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x8,%rax
  add    0x48(%rsp),%rdx
  cmp    %rcx,%rax
  jne    L253
L250:
  movsd  (%rbx),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rbx)
  movsd  0x8(%rbx),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  0x10(%rbx),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rbx)
  jmp    L167
L344:
  pxor   %xmm1,%xmm1
  jmp    L250
L263:
  mov    %r12,%rbx
  movq   $0x0,(%r12)
  movq   $0x0,0x8(%r12)
  movq   $0x0,0x10(%r12)
  mov    0x8(%rsp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  0x0(%r13),%xmm1
  comisd %xmm0,%xmm1
  jae    L220
  mov    0x28(%rsp),%rax
  comisd (%rax),%xmm0
  jb     L56
  mov    0x38(%rsp),%rdx
  mov    0x8(%rsp),%rax
  movsd  (%rax),%xmm0
  mov    0x40(%rsp),%esi
  mov    0x70(%rsp),%edi
  call   <FindSpan@plt>
  mov    0x148(%rsp),%r9
  mov    0x140(%rsp),%r8
  mov    0x150(%rsp),%rcx
  mov    0x38(%rsp),%rdx
  mov    0x40(%rsp),%esi
  mov    0x8(%rsp),%r11
  movsd  (%r11),%xmm0
  mov    %eax,0x8(%rsp)
  mov    %eax,%edi
  call   <BasisFuns@plt>
  mov    0x8(%rsp),%eax
  mov    0x40(%rsp),%edi
  sub    %edi,%eax
  mov    0xc8(%rsp),%esi
  lea    (%rsi,%rax,4),%edx
  test   %edi,%edi
  js     L59
  movslq %edx,%rdx
  lea    (%r15,%rdx,8),%rax
  add    0xd0(%rsp),%rdx
  mov    0xa0(%rsp),%rsi
  lea    (%rsi,%rdx,8),%rcx
  mov    0x150(%rsp),%rdx
  pxor   %xmm1,%xmm1
L130:
  movsd  (%rdx),%xmm0
  mulsd  (%rax),%xmm0
  addsd  (%rbx),%xmm0
  movsd  %xmm0,(%rbx)
  movsd  (%rdx),%xmm0
  mulsd  0x8(%rax),%xmm0
  addsd  0x8(%rbx),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  (%rdx),%xmm0
  mulsd  0x10(%rax),%xmm0
  addsd  0x10(%rbx),%xmm0
  movsd  %xmm0,0x10(%rbx)
  movsd  (%rdx),%xmm0
  mulsd  0x18(%rax),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x8,%rdx
  add    $0x20,%rax
  cmp    %rcx,%rax
  jne    L130
L238:
  movsd  (%rbx),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rbx)
  movsd  0x8(%rbx),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  0x10(%rbx),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rbx)
  jmp    L167
L220:
  mov    0x38(%rsp),%rdx
  movsd  (%rax),%xmm0
  mov    0x40(%rsp),%esi
  mov    0x70(%rsp),%edi
  call   <FindSpan@plt>
  mov    %eax,%edi
  mov    0x148(%rsp),%r9
  mov    0x140(%rsp),%r8
  mov    0x150(%rsp),%rcx
  mov    0x38(%rsp),%rdx
  mov    0x40(%rsp),%esi
  mov    0x8(%rsp),%r11
  movsd  (%r11),%xmm0
  mov    %eax,0x8(%rsp)
  call   <BasisFuns@plt>
  mov    0x8(%rsp),%edx
  mov    0x40(%rsp),%eax
  sub    %eax,%edx
  test   %eax,%eax
  js     L18
  lea    0x0(,%rdx,4),%eax
  cltq
  lea    (%r15,%rax,8),%rax
  movslq %edx,%rcx
  add    0xd8(%rsp),%rcx
  shl    $0x5,%rcx
  add    0xa0(%rsp),%rcx
  mov    0x150(%rsp),%rdx
  pxor   %xmm1,%xmm1
L80:
  movsd  (%rdx),%xmm0
  mulsd  (%rax),%xmm0
  addsd  (%rbx),%xmm0
  movsd  %xmm0,(%rbx)
  movsd  (%rdx),%xmm0
  mulsd  0x8(%rax),%xmm0
  addsd  0x8(%rbx),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  (%rdx),%xmm0
  mulsd  0x10(%rax),%xmm0
  addsd  0x10(%rbx),%xmm0
  movsd  %xmm0,0x10(%rbx)
  movsd  (%rdx),%xmm0
  mulsd  0x18(%rax),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x8,%rdx
  add    $0x20,%rax
  cmp    %rcx,%rax
  jne    L80
L208:
  movsd  (%rbx),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rbx)
  movsd  0x8(%rbx),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  0x10(%rbx),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rbx)
  jmp    L167
L18:
  pxor   %xmm1,%xmm1
  jmp    L208
L59:
  pxor   %xmm1,%xmm1
  jmp    L238
L56:
  mov    0x38(%rsp),%rdx
  mov    0x8(%rsp),%rax
  movsd  (%rax),%xmm0
  mov    0x40(%rsp),%esi
  mov    0x70(%rsp),%edi
  call   <FindSpan@plt>
  mov    0x148(%rsp),%r9
  mov    0x140(%rsp),%r8
  mov    0x150(%rsp),%rcx
  mov    0x38(%rsp),%rdx
  mov    0x40(%rsp),%esi
  mov    0x8(%rsp),%rdi
  movsd  (%rdi),%xmm0
  mov    %eax,0xcc(%rsp)
  mov    %eax,%edi
  call   <BasisFuns@plt>
  mov    0x8(%rsp),%rax
  movsd  0x8(%rax),%xmm0
  mov    0x120(%rsp),%rdx
  mov    0x44(%rsp),%esi
  mov    0x74(%rsp),%edi
  call   <FindSpan@plt>
  mov    0x8(%rsp),%rcx
  movsd  0x8(%rcx),%xmm0
  mov    0x160(%rsp),%r9
  mov    0x158(%rsp),%r8
  mov    0x168(%rsp),%rcx
  mov    0x120(%rsp),%rdx
  mov    0x44(%rsp),%esi
  mov    %eax,0x8(%rsp)
  mov    %eax,%edi
  call   <BasisFuns@plt>
  mov    0x8(%rsp),%eax
  mov    0x44(%rsp),%ecx
  sub    %ecx,%eax
  imul   0x14(%rsp),%eax
  mov    %eax,%edx
  mov    0xcc(%rsp),%eax
  sub    0x40(%rsp),%eax
  lea    (%rdx,%rax,4),%edi
  pxor   %xmm2,%xmm2
  test   %ecx,%ecx
  js     L114
  mov    0x168(%rsp),%rcx
  mov    $0x0,%esi
  pxor   %xmm2,%xmm2
  movslq %edi,%rdi
  mov    0x78(%rsp),%r8
  mov    0x40(%rsp),%r9d
  mov    0x150(%rsp),%r10
  jmp    L322
L101:
  movslq %esi,%rax
  add    %rdi,%rax
  lea    (%r15,%rax,8),%rax
  mov    %r10,%rdx
L330:
  movsd  (%rcx),%xmm0
  mulsd  (%rdx),%xmm0
  movapd %xmm0,%xmm1
  mulsd  (%rax),%xmm1
  addsd  (%rbx),%xmm1
  movsd  %xmm1,(%rbx)
  movapd %xmm0,%xmm1
  mulsd  0x8(%rax),%xmm1
  addsd  0x8(%rbx),%xmm1
  movsd  %xmm1,0x8(%rbx)
  movapd %xmm0,%xmm1
  mulsd  0x10(%rax),%xmm1
  addsd  0x10(%rbx),%xmm1
  movsd  %xmm1,0x10(%rbx)
  mulsd  0x18(%rax),%xmm0
  addsd  %xmm0,%xmm2
  add    $0x8,%rdx
  add    $0x20,%rax
  cmp    %rbp,%rdx
  jne    L330
L61:
  add    $0x8,%rcx
  add    0x14(%rsp),%esi
  cmp    %r8,%rcx
  je     L114
L322:
  test   %r9d,%r9d
  jns    L101
  jmp    L61
L114:
  movsd  (%rbx),%xmm0
  divsd  %xmm2,%xmm0
  movsd  %xmm0,(%rbx)
  movsd  0x8(%rbx),%xmm0
  divsd  %xmm2,%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  0x10(%rbx),%xmm0
  divsd  %xmm2,%xmm0
  movsd  %xmm0,0x10(%rbx)
  jmp    L167
L297:
  add    $0xe8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void NURBSsurfaceEval(int degU, int degV, double *cp, int ncp, int kcp, double *knotU, double *knotV, double *us, int nus, double *ep, double *leftU, double *rightU, double *NU, double *leftV, double *rightV, double *NV) {
  int i, j, jj, spanU, spanV, ind, ind2, fourncp, threejj, myint;
  double wgh, NN;
  fourncp = 4 * ncp;
  for (jj = 0; jj < nus; jj++) {
    threejj = 3 * jj;
    if (us[2 * jj] <= knotU[degU]) {
      if (us[2 * jj + 1] <= knotV[degV]) {
        ep[threejj] = cp[0] / cp[3];
        ep[threejj + 1] = cp[1] / cp[3];
        ep[threejj + 2] = cp[2] / cp[3];
      } else if (us[2 * jj + 1] >= knotV[kcp]) {
        myint = fourncp * (kcp - 1);
        ep[threejj] = cp[myint] / cp[myint + 3];
        ep[threejj + 1] = cp[myint + 1] / cp[myint + 3];
        ep[threejj + 2] = cp[myint + 2] / cp[myint + 3];
      } else {
        ep[threejj] = 0.0;
        ep[threejj + 1] = 0.0;
        ep[threejj + 2] = 0.0;
        wgh = 0.0;
        spanV = FindSpan(kcp, degV, us[2 * jj + 1], knotV);
        BasisFuns(spanV, us[2 * jj + 1], degV, knotV, NV, leftV, rightV);
        ind = spanV - degV;
        for (i = 0; i <= degV; i++) {
          myint = (ind + i) * fourncp;
          ep[threejj] += NV[i] * cp[myint];
          ep[threejj + 1] += NV[i] * cp[myint + 1];
          ep[threejj + 2] += NV[i] * cp[myint + 2];
          wgh += NV[i] * cp[myint + 3];
        }
        ep[threejj] = ep[threejj] / wgh;
        ep[threejj + 1] = ep[threejj + 1] / wgh;
        ep[threejj + 2] = ep[threejj + 2] / wgh;
      }
    } else if (us[2 * jj] >= knotU[ncp]) {
      if (us[2 * jj + 1] <= knotV[degV]) {
        ep[threejj] = cp[fourncp - 4] / cp[fourncp - 1];
        ep[threejj + 1] = cp[fourncp - 3] / cp[fourncp - 1];
        ep[threejj + 2] = cp[fourncp - 2] / cp[fourncp - 1];
      } else if (us[2 * jj + 1] >= knotV[kcp]) {
        myint = fourncp * kcp;
        ep[threejj] = cp[myint - 4] / cp[myint - 1];
        ep[threejj + 1] = cp[myint - 3] / cp[myint - 1];
        ep[threejj + 2] = cp[myint - 2] / cp[myint - 1];
      } else {
        ep[threejj] = 0.0;
        ep[threejj + 1] = 0.0;
        ep[threejj + 2] = 0.0;
        wgh = 0.0;
        spanV = FindSpan(kcp, degV, us[2 * jj + 1], knotV);
        BasisFuns(spanV, us[2 * jj + 1], degV, knotV, NV, leftV, rightV);
        ind = spanV - degV;
        myint = (ind + 1) * fourncp;
        for (i = 0; i <= degV; i++) {
          ep[threejj] += NV[i] * cp[i * fourncp + myint - 4];
          ep[threejj + 1] += NV[i] * cp[i * fourncp + myint - 3];
          ep[threejj + 2] += NV[i] * cp[i * fourncp + myint - 2];
          wgh += NV[i] * cp[i * fourncp + myint - 1];
        }
        ep[threejj] = ep[threejj] / wgh;
        ep[threejj + 1] = ep[threejj + 1] / wgh;
        ep[threejj + 2] = ep[threejj + 2] / wgh;
      }
    } else {
      ep[threejj] = 0.0;
      ep[threejj + 1] = 0.0;
      ep[threejj + 2] = 0.0;
      wgh = 0.0;
      if (us[2 * jj + 1] <= knotV[degV]) {
        spanU = FindSpan(ncp, degU, us[2 * jj], knotU);
        BasisFuns(spanU, us[2 * jj], degU, knotU, NU, leftU, rightU);
        ind = spanU - degU;
        for (i = 0; i <= degU; i++) {
          ep[threejj] += NU[i] * cp[(ind + i) * 4];
          ep[threejj + 1] += NU[i] * cp[(ind + i) * 4 + 1];
          ep[threejj + 2] += NU[i] * cp[(ind + i) * 4 + 2];
          wgh += NU[i] * cp[(ind + i) * 4 + 3];
        }
        ep[threejj] = ep[threejj] / wgh;
        ep[threejj + 1] = ep[threejj + 1] / wgh;
        ep[threejj + 2] = ep[threejj + 2] / wgh;
      } else if (us[2 * jj + 1] >= knotV[kcp]) {
        spanU = FindSpan(ncp, degU, us[2 * jj], knotU);
        BasisFuns(spanU, us[2 * jj], degU, knotU, NU, leftU, rightU);
        ind = spanU - degU;
        myint = ind * 4 + (kcp - 1) * fourncp;
        for (i = 0; i <= degU; i++) {
          ep[threejj] += NU[i] * cp[i * 4 + myint];
          ep[threejj + 1] += NU[i] * cp[i * 4 + myint + 1];
          ep[threejj + 2] += NU[i] * cp[i * 4 + myint + 2];
          wgh += NU[i] * cp[i * 4 + myint + 3];
        }
        ep[threejj] = ep[threejj] / wgh;
        ep[threejj + 1] = ep[threejj + 1] / wgh;
        ep[threejj + 2] = ep[threejj + 2] / wgh;
      } else {
        spanU = FindSpan(ncp, degU, us[2 * jj], knotU);
        BasisFuns(spanU, us[2 * jj], degU, knotU, NU, leftU, rightU);
        spanV = FindSpan(kcp, degV, us[2 * jj + 1], knotV);
        BasisFuns(spanV, us[2 * jj + 1], degV, knotV, NV, leftV, rightV);
        ind = spanU - degU;
        ind2 = spanV - degV;
        myint = ind2 * fourncp + ind * 4;
        for (i = 0; i <= degV; i++) {
          for (j = 0; j <= degU; j++) {
            NN = NV[i] * NU[j];
            ep[threejj] += NN * cp[i * fourncp + j * 4 + myint];
            ep[threejj + 1] += NN * cp[i * fourncp + j * 4 + myint + 1];
            ep[threejj + 2] += NN * cp[i * fourncp + j * 4 + myint + 2];
            wgh += NN * cp[i * fourncp + j * 4 + myint + 3];
          }
        }
        ep[threejj] = ep[threejj] / wgh;
        ep[threejj + 1] = ep[threejj + 1] / wgh;
        ep[threejj + 2] = ep[threejj + 2] / wgh;
      }
    }
  }
}
```