user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<oneBspEval2>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %esi,0x8(%rsp)
  mov    %rdx,%rbp
  mov    %r8d,0x4(%rsp)
  mov    0x58(%rsp),%r15
  mov    0x60(%rsp),%rbx
  lea    0x0(,%rcx,4),%r14d
  movsd  (%r15),%xmm0
  movslq %edi,%rax
  movsd  (%r9,%rax,8),%xmm1
  comisd %xmm0,%xmm1
  jb     L217
  movsd  0x8(%r15),%xmm0
  movslq %esi,%rax
  mov    0x50(%rsp),%rdi
  movsd  (%rdi,%rax,8),%xmm1
  comisd %xmm0,%xmm1
  jb     L272
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rbx)
  movsd  0x8(%rdx),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  0x10(%rdx),%xmm0
  movsd  %xmm0,0x10(%rbx)
  movsd  0x18(%rdx),%xmm0
  movsd  %xmm0,0x18(%rbx)
L152:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L272:
  mov    0x4(%rsp),%edi
  movslq %edi,%rax
  mov    0x50(%rsp),%rsi
  comisd (%rsi,%rax,8),%xmm0
  jb     L97
  mov    %edi,%eax
  sub    $0x1,%eax
  imul   %r14d,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  movsd  0x0(%rbp,%rax,8),%xmm0
  movsd  %xmm0,(%rbx)
  movsd  0x8(%rbp,%rdx,1),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  0x10(%rbp,%rdx,1),%xmm0
  movsd  %xmm0,0x10(%rbx)
  movsd  0x18(%rbp,%rdx,1),%xmm0
  movsd  %xmm0,0x18(%rbx)
  jmp    L152
L97:
  movq   $0x0,(%rbx)
  movq   $0x0,0x8(%rbx)
  movq   $0x0,0x10(%rbx)
  movq   $0x0,0x18(%rbx)
  movsd  0x8(%r15),%xmm0
  mov    0x50(%rsp),%rdx
  mov    0x8(%rsp),%r13d
  mov    %r13d,%esi
  mov    0x4(%rsp),%edi
  call   <FindSpan@plt>
  mov    %eax,%r12d
  movsd  0x8(%r15),%xmm0
  mov    0x88(%rsp),%r9
  mov    0x80(%rsp),%r8
  mov    0x90(%rsp),%rcx
  mov    0x50(%rsp),%rdx
  mov    %r13d,%esi
  mov    %eax,%edi
  call   <BasisFuns@plt>
  sub    %r13d,%r12d
  test   %r13d,%r13d
  js     L152
  mov    0x90(%rsp),%rax
  movslq %r14d,%rcx
  shl    $0x3,%rcx
  imul   %r14d,%r12d
  movslq %r12d,%rdx
  lea    0x0(%rbp,%rdx,8),%rdx
  mov    %r13d,%esi
  lea    0x8(%rax,%rsi,8),%rsi
L204:
  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  0x18(%rbx),%xmm0
  movsd  %xmm0,0x18(%rbx)
  add    $0x8,%rax
  add    %rcx,%rdx
  cmp    %rsi,%rax
  jne    L204
  jmp    L152
L217:
  mov    %edi,%r12d
  mov    %r9,%r13
  movslq %ecx,%rax
  comisd (%r9,%rax,8),%xmm0
  jb     L98
  movsd  0x8(%r15),%xmm0
  movslq 0x8(%rsp),%rax
  mov    0x50(%rsp),%rdi
  movsd  (%rdi,%rax,8),%xmm1
  comisd %xmm0,%xmm1
  jb     L247
  movslq %r14d,%r14
  shl    $0x3,%r14
  movsd  -0x20(%rdx,%r14,1),%xmm0
  movsd  %xmm0,(%rbx)
  movsd  -0x18(%rdx,%r14,1),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  -0x10(%rdx,%r14,1),%xmm0
  movsd  %xmm0,0x10(%rbx)
  movsd  -0x8(%rdx,%r14,1),%xmm0
  movsd  %xmm0,0x18(%rbx)
  jmp    L152
L247:
  mov    0x4(%rsp),%edi
  movslq %edi,%rax
  mov    0x50(%rsp),%rsi
  comisd (%rsi,%rax,8),%xmm0
  jb     L0
  imul   %edi,%r14d
  movslq %r14d,%rax
  shl    $0x3,%rax
  movsd  -0x20(%rdx,%rax,1),%xmm0
  movsd  %xmm0,(%rbx)
  movsd  -0x18(%rdx,%rax,1),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  -0x10(%rdx,%rax,1),%xmm0
  movsd  %xmm0,0x10(%rbx)
  movsd  -0x8(%rdx,%rax,1),%xmm0
  movsd  %xmm0,0x18(%rbx)
  jmp    L152
L0:
  movq   $0x0,(%rbx)
  movq   $0x0,0x8(%rbx)
  movq   $0x0,0x10(%rbx)
  movq   $0x0,0x18(%rbx)
  movsd  0x8(%r15),%xmm0
  mov    0x50(%rsp),%rdx
  mov    0x8(%rsp),%r13d
  mov    %r13d,%esi
  mov    0x4(%rsp),%edi
  call   <FindSpan@plt>
  mov    %eax,%r12d
  movsd  0x8(%r15),%xmm0
  mov    0x88(%rsp),%r9
  mov    0x80(%rsp),%r8
  mov    0x90(%rsp),%rcx
  mov    0x50(%rsp),%rdx
  mov    %r13d,%esi
  mov    %eax,%edi
  call   <BasisFuns@plt>
  sub    %r13d,%r12d
  lea    0x1(%r12),%edx
  imul   %r14d,%edx
  test   %r13d,%r13d
  js     L152
  mov    0x90(%rsp),%rax
  movslq %r14d,%rcx
  shl    $0x3,%rcx
  movslq %edx,%rdx
  lea    0x0(%rbp,%rdx,8),%rdx
  mov    %r13d,%esi
  lea    0x8(%rax,%rsi,8),%rsi
L210:
  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  0x18(%rbx),%xmm0
  movsd  %xmm0,0x18(%rbx)
  add    $0x8,%rax
  add    %rcx,%rdx
  cmp    %rsi,%rax
  jne    L210
  jmp    L152
L98:
  movq   $0x0,(%rbx)
  movq   $0x0,0x8(%rbx)
  movq   $0x0,0x10(%rbx)
  movq   $0x0,0x18(%rbx)
  movsd  0x8(%r15),%xmm0
  movslq 0x8(%rsp),%rax
  mov    0x50(%rsp),%rdi
  movsd  (%rdi,%rax,8),%xmm1
  comisd %xmm0,%xmm1
  jae    L236
  movslq 0x4(%rsp),%rax
  mov    0x50(%rsp),%rdi
  comisd (%rdi,%rax,8),%xmm0
  jb     L251
  mov    %r9,%rdx
  movsd  (%r15),%xmm0
  mov    %r12d,%esi
  mov    %ecx,%edi
  call   <FindSpan@plt>
  mov    %eax,%edi
  mov    0x70(%rsp),%r9
  mov    0x68(%rsp),%r8
  mov    0x78(%rsp),%rcx
  mov    %r13,%rdx
  mov    %r12d,%esi
  movsd  (%r15),%xmm0
  mov    %eax,%r15d
  call   <BasisFuns@plt>
  mov    %r15d,%edi
  sub    %r12d,%edi
  mov    0x4(%rsp),%edx
  sub    $0x1,%edx
  imul   %r14d,%edx
  lea    (%rdx,%rdi,4),%ecx
  test   %r12d,%r12d
  js     L152
  mov    0x78(%rsp),%rax
  movslq %ecx,%rcx
  lea    0x0(%rbp,%rcx,8),%rdx
  mov    %r12d,%r12d
  lea    (%rcx,%r12,4),%rcx
  lea    0x20(%rbp,%rcx,8),%rcx
L4:
  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  0x18(%rbx),%xmm0
  movsd  %xmm0,0x18(%rbx)
  add    $0x8,%rax
  add    $0x20,%rdx
  cmp    %rcx,%rdx
  jne    L4
  jmp    L152
L236:
  mov    %r9,%rdx
  movsd  (%r15),%xmm0
  mov    %r12d,%esi
  mov    %ecx,%edi
  call   <FindSpan@plt>
  mov    %eax,%r14d
  mov    0x70(%rsp),%r9
  mov    0x68(%rsp),%r8
  mov    0x78(%rsp),%rcx
  mov    %r13,%rdx
  mov    %r12d,%esi
  movsd  (%r15),%xmm0
  mov    %eax,%edi
  call   <BasisFuns@plt>
  sub    %r12d,%r14d
  test   %r12d,%r12d
  js     L152
  mov    0x78(%rsp),%rdx
  lea    0x0(,%r14,4),%eax
  cltq
  lea    0x0(%rbp,%rax,8),%rcx
  movslq %r14d,%rax
  mov    %r12d,%r12d
  add    %r12,%rax
  shl    $0x5,%rax
  lea    0x20(%rbp,%rax,1),%rax
L266:
  movsd  (%rdx),%xmm0
  mulsd  (%rcx),%xmm0
  addsd  (%rbx),%xmm0
  movsd  %xmm0,(%rbx)
  movsd  (%rdx),%xmm0
  mulsd  0x8(%rcx),%xmm0
  addsd  0x8(%rbx),%xmm0
  movsd  %xmm0,0x8(%rbx)
  movsd  (%rdx),%xmm0
  mulsd  0x10(%rcx),%xmm0
  addsd  0x10(%rbx),%xmm0
  movsd  %xmm0,0x10(%rbx)
  movsd  (%rdx),%xmm0
  mulsd  0x18(%rcx),%xmm0
  addsd  0x18(%rbx),%xmm0
  movsd  %xmm0,0x18(%rbx)
  add    $0x8,%rdx
  add    $0x20,%rcx
  cmp    %rax,%rcx
  jne    L266
  jmp    L152
L251:
  mov    %r9,%rdx
  movsd  (%r15),%xmm0
  mov    %r12d,%esi
  mov    %ecx,%edi
  call   <FindSpan@plt>
  mov    0x70(%rsp),%r9
  mov    0x68(%rsp),%r8
  mov    0x78(%rsp),%rcx
  mov    %r13,%rdx
  mov    %r12d,%esi
  movsd  (%r15),%xmm0
  mov    %eax,0xc(%rsp)
  mov    %eax,%edi
  call   <BasisFuns@plt>
  movsd  0x8(%r15),%xmm0
  mov    0x50(%rsp),%rdx
  mov    0x8(%rsp),%esi
  mov    0x4(%rsp),%edi
  call   <FindSpan@plt>
  mov    %eax,%r13d
  movsd  0x8(%r15),%xmm0
  mov    0x88(%rsp),%r9
  mov    0x80(%rsp),%r8
  mov    0x90(%rsp),%rcx
  mov    0x50(%rsp),%rdx
  mov    0x8(%rsp),%r15d
  mov    %r15d,%esi
  mov    %eax,%edi
  call   <BasisFuns@plt>
  sub    %r15d,%r13d
  imul   %r14d,%r13d
  mov    0xc(%rsp),%eax
  sub    %r12d,%eax
  lea    0x0(%r13,%rax,4),%r8d
  test   %r15d,%r15d
  js     L152
  mov    0x90(%rsp),%rcx
  mov    %r15d,%eax
  lea    0x8(%rcx,%rax,8),%r9
  mov    %r12d,%eax
  mov    0x78(%rsp),%rdi
  lea    0x8(%rdi,%rax,8),%rsi
  mov    $0x0,%edi
  movslq %r8d,%r8
  jmp    L192
L53:
  movslq %edi,%rax
  add    %r8,%rax
  lea    0x0(%rbp,%rax,8),%rax
  mov    0x78(%rsp),%rdx
L106:
  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  0x18(%rbx),%xmm0
  movsd  %xmm0,0x18(%rbx)
  add    $0x8,%rdx
  add    $0x20,%rax
  cmp    %rsi,%rdx
  jne    L106
L22:
  add    $0x8,%rcx
  add    %r14d,%edi
  cmp    %r9,%rcx
  je     L152
L192:
  test   %r12d,%r12d
  jns    L53
  jmp    L22
```

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