user: 请将以下的汇编代码转换成C语言代码：

```asm
<BasisFuns>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x24(%rbp)
  movsd  %xmm0,-0x30(%rbp)
  mov    %esi,-0x28(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    %r9,-0x50(%rbp)
  mov    -0x40(%rbp),%rax
  movsd  D6(%rip),%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x1,-0x18(%rbp)
  jmp    L17
L10:
  mov    -0x24(%rbp),%eax
  add    $0x1,%eax
  sub    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x30(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x24(%rbp),%edx
  mov    -0x18(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  subsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x40(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x50(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm2
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  addsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x50(%rbp),%rax
  add    $0x8,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  mov    -0x40(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x8(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movl   $0x1,-0x14(%rbp)
  jmp    L7
L35:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x14(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x18(%rbp),%eax
  sub    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  addsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  addsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%eax
  sub    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x8(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  addl   $0x1,-0x14(%rbp)
L7:
  mov    -0x14(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jl     L35
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x18(%rbp)
L17:
  mov    -0x18(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jle    L10
  nop
  nop
  pop    %rbp
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D6
data_type: f64

tool: D6: 1

assistant: ```c
void BasisFuns(int i, double u, int p, double *U, double *N, double *left, double *right) {
  int j;
  double saved, temp;
  int r;
  N[0] = 1.0;
  for (j = 1; j <= p; j++) {
    left[j] = u - U[i + 1 - j];
    right[j] = U[i + j] - u;
    temp = N[0] / (right[1] + left[j]);
    N[0] = right[1] * temp;
    saved = left[j] * temp;
    for (r = 1; r < j; r++) {
      temp = N[r] / (right[r + 1] + left[j - r]);
      N[r] = saved + right[r + 1] * temp;
      saved = left[j - r] * temp;
    }
    N[j] = saved;
  }
}
```