user: 这段汇编代码用C语言表示是什么样的:

```asm
<computeLinGNmatPnt2Pnt>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xf8,%rsp
  mov    %rdx,0xc8(%rsp)
  lea    0x0(,%rcx,4),%edx
  mov    0x140(%rsp),%eax
  mov    %edi,(%rsp)
  add    $0x1,%edi
  mov    0x178(%rsp),%r13
  mov    %edx,0x9c(%rsp)
  lea    0x1(%rsi),%edx
  mov    0x190(%rsp),%rbx
  mov    %ecx,0x14(%rsp)
  imul   %edi,%edx
  imul   %r8d,%ecx
  mov    %esi,0x98(%rsp)
  mov    %r8d,0xbc(%rsp)
  mov    %r9,0x90(%rsp)
  mov    %edi,0x10(%rsp)
  mov    %edx,0xac(%rsp)
  mov    %ecx,0xb8(%rsp)
  test   %eax,%eax
  jle    L38
  mov    0x138(%rsp),%rdx
  sub    $0x1,%eax
  mov    0x158(%rsp),%rcx
  shl    $0x4,%rax
  lea    0x10(%rdx,%rax,1),%rax
  mov    %rdx,0x70(%rsp)
  mov    0x1a8(%rsp),%rdx
  mov    %rax,0xb0(%rsp)
  mov    0x98(%rsp),%eax
  mov    %rcx,0x80(%rsp)
  mov    0x148(%rsp),%rcx
  lea    0x8(%rdx,%rax,8),%rax
  mov    %rax,0x18(%rsp)
  mov    (%rsp),%eax
  mov    %rcx,0x88(%rsp)
  mov    %rax,0xa0(%rsp)
  lea    0x8(%rbx,%rax,8),%r14
  cltq
  mov    %rax,0xe0(%rsp)
  add    $0x1,%rax
  lea    (%rax,%rax,2),%rdx
  shl    $0x2,%rax
  mov    %r14,0xd0(%rsp)
  mov    %rax,0x30(%rsp)
  mov    0x10(%rsp),%eax
  shl    $0x3,%rdx
  mov    %rdx,0x40(%rsp)
  lea    (%rax,%rax,2),%rdx
  mov    %rax,%rcx
  lea    0x0(%r13,%rdx,8),%rdx
  mov    %rdx,0xe8(%rsp)
  movslq 0x14(%rsp),%rdx
  lea    (%rdx,%rdx,2),%rdx
  shl    $0x3,%rdx
  mov    %rdx,0x48(%rsp)
  lea    0x0(,%rax,4),%rdx
  lea    (%rbx,%rax,8),%rax
  mov    %rdx,0x38(%rsp)
  mov    %ecx,%edx
  shr    $0x2,%ecx
  mov    %rax,0x28(%rsp)
  mov    %ecx,%eax
  mov    %edx,%ecx
  mov    0xac(%rsp),%edx
  sub    $0x1,%eax
  and    $0xfffffffc,%ecx
  add    $0x1,%rax
  mov    %ecx,0x54(%rsp)
  lea    (%rdx,%rdx,2),%r15d
  shl    $0x4,%rax
  mov    %rax,0xd8(%rsp)
  movslq %ecx,%rax
  lea    (%rbx,%rax,8),%rax
  mov    %rax,0x58(%rsp)
  lea    0x1(%rcx),%eax
  mov    %eax,0x68(%rsp)
  cltq
  lea    (%rbx,%rax,8),%rax
  mov    %rax,0x60(%rsp)
  lea    0x2(%rcx),%eax
  mov    0x170(%rsp),%rcx
  mov    %eax,0x6c(%rsp)
  cltq
  lea    (%rbx,%rax,8),%rax
  mov    %rax,0x78(%rsp)
  lea    -0x1(%rdx),%eax
  lea    0x4(%rcx,%rax,4),%rax
  mov    %rax,0xc0(%rsp)
  mov    0x150(%rsp),%r12
  mov    0x160(%rsp),%rbp
  nopl   0x0(%rax,%rax,1)
L26:
  mov    0x70(%rsp),%r14
  mov    0x90(%rsp),%rdx
  mov    (%rsp),%esi
  mov    0x14(%rsp),%edi
  movsd  (%r14),%xmm0
  call   <FindSpan@plt>
  movsd  (%r14),%xmm0
  mov    (%rsp),%esi
  mov    %rbx,%rcx
  mov    0x188(%rsp),%r9
  mov    0x180(%rsp),%r8
  mov    %eax,%edi
  mov    %eax,0x4(%rsp)
  mov    0x90(%rsp),%rdx
  call   <BasisFuns@plt>
  mov    0x4(%rsp),%r10d
  movsd  0x8(%r14),%xmm0
  mov    0x130(%rsp),%rdx
  mov    0x98(%rsp),%esi
  mov    0xbc(%rsp),%edi
  mov    %r10d,%r11d
  sub    (%rsp),%r11d
  mov    %r10d,0x50(%rsp)
  mov    %r11d,0x8(%rsp)
  call   <FindSpan@plt>
  movsd  0x8(%r14),%xmm0
  mov    0x98(%rsp),%r14d
  mov    0x130(%rsp),%rdx
  mov    %eax,%edi
  mov    %eax,0x4(%rsp)
  mov    0x1a0(%rsp),%r9
  mov    0x198(%rsp),%r8
  mov    %r14d,%esi
  mov    0x1a8(%rsp),%rcx
  call   <BasisFuns@plt>
  mov    0x4(%rsp),%edx
  mov    0x8(%rsp),%r11d
  mov    0x9c(%rsp),%eax
  mov    0x50(%rsp),%r10d
  sub    %r14d,%edx
  movdqa D3(%rip),%xmm3
  imul   %edx,%eax
  test   %r14d,%r14d
  lea    (%rax,%r11,4),%eax
  js     L42
  mov    %r10d,0x4(%rsp)
  cltq
  mov    (%rsp),%r10d
  xor    %edi,%edi
  mov    %r11d,0x8(%rsp)
  mov    0x1a8(%rsp),%rsi
  pxor   %xmm6,%xmm6
  lea    0x3(%rax),%r8
  mov    %edx,0x50(%rsp)
  mov    0x9c(%rsp),%r9d
  mov    0xd0(%rsp),%r14
  mov    0x18(%rsp),%rdx
  mov    0xc8(%rsp),%r11
  nopw   0x0(%rax,%rax,1)
L4:
  test   %r10d,%r10d
  js     L217
  movslq %edi,%rax
  movsd  (%rsi),%xmm1
  add    %r8,%rax
  lea    (%r11,%rax,8),%rcx
  mov    %rbx,%rax
  cs nopw 0x0(%rax,%rax,1)
L171:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  add    $0x20,%rcx
  mulsd  %xmm1,%xmm0
  mulsd  -0x20(%rcx),%xmm0
  addsd  %xmm0,%xmm6
  cmp    %r14,%rax
  jne    L171
L217:
  add    $0x8,%rsi
  add    %r9d,%edi
  cmp    %rdx,%rsi
  jne    L4
  mov    (%rsp),%ecx
  mov    0x4(%rsp),%r10d
  mov    0x8(%rsp),%r11d
  mov    0x50(%rsp),%edx
  test   %ecx,%ecx
  js     L42
  imul   0x14(%rsp),%edx
  movslq %r10d,%rax
  movapd %xmm6,%xmm9
  mov    %r13,%rcx
  sub    0xe0(%rsp),%rax
  movl   $0x0,0x4(%rsp)
  unpcklpd %xmm9,%xmm9
  mov    %rbp,0x160(%rsp)
  mov    0x1a8(%rsp),%r10
  movslq %edx,%rsi
  mov    0xe8(%rsp),%r9
  add    %r11d,%edx
  mov    0xd8(%rsp),%r14
  add    %rsi,%rax
  mov    %r15d,0xa8(%rsp)
  lea    (%rax,%rax,2),%rax
  lea    (%r12,%rax,8),%rsi
  mov    0x170(%rsp),%rax
  mov    %rsi,%r15
  nopl   0x0(%rax)
L67:
  mov    %r10,%rsi
  add    $0x8,%r10
  cmp    %r9,%rbx
  setae  %dil
  cmp    %rcx,0x28(%rsp)
  setbe  %r8b
  or     %edi,%r8d
  cmpl   $0x2,(%rsp)
  seta   %dil
  and    %edi,%r8d
  mov    0x38(%rsp),%rdi
  add    %rax,%rdi
  cmp    %rdi,%rcx
  setae  %dil
  cmp    %r9,%rax
  setae  %r11b
  or     %r11d,%edi
  and    %r8d,%edi
  cmp    %rsi,%r9
  setbe  %r8b
  cmp    %r10,%rcx
  setae  %r11b
  or     %r11d,%r8d
  test   %r8b,%dil
  je     L5
  lea    0x60(%rcx),%rdi
  cmp    %rdi,%r15
  lea    0x60(%r15),%rdi
  setae  %r8b
  cmp    %rdi,%rcx
  setae  %dil
  or     %r8b,%dil
  je     L5
  movd   %edx,%xmm7
  movsd  (%rsi),%xmm8
  mov    %r15,%r8
  mov    %rcx,%rdi
  pshufd $0x0,%xmm7,%xmm10
  movdqa D6(%rip),%xmm7
  xor    %r11d,%r11d
  unpcklpd %xmm8,%xmm8
  nop
L161:
  movupd (%rbx,%r11,2),%xmm14
  movupd (%r8),%xmm2
  movdqa %xmm7,%xmm0
  add    $0x60,%rdi
  movupd 0x10(%rbx,%r11,2),%xmm12
  movupd 0x10(%r8),%xmm4
  paddd  %xmm10,%xmm0
  paddd  %xmm3,%xmm7
  mulpd  %xmm8,%xmm14
  movupd 0x30(%r8),%xmm13
  movapd %xmm2,%xmm11
  movapd %xmm2,%xmm1
  mulpd  %xmm8,%xmm12
  movhps 0x18(%r8),%xmm11
  unpcklpd %xmm2,%xmm4
  shufpd $0x1,%xmm2,%xmm1
  movhps 0x28(%r8),%xmm4
  movupd 0x40(%r8),%xmm2
  movapd %xmm13,%xmm5
  movhpd 0x20(%r8),%xmm1
  movhps 0x48(%r8),%xmm5
  movups %xmm0,(%rax,%r11,1)
  movapd %xmm13,%xmm0
  add    $0x10,%r11
  unpcklpd %xmm13,%xmm2
  movhps 0x58(%r8),%xmm2
  shufpd $0x1,%xmm13,%xmm0
  movhpd 0x50(%r8),%xmm0
  divpd  %xmm9,%xmm14
  add    $0x60,%r8
  divpd  %xmm9,%xmm12
  mulpd  %xmm14,%xmm11
  mulpd  %xmm14,%xmm1
  mulpd  %xmm14,%xmm4
  movapd %xmm11,%xmm15
  movsd  %xmm4,%xmm15
  movups %xmm15,-0x50(%rdi)
  mulpd  %xmm12,%xmm5
  mulpd  %xmm12,%xmm0
  mulpd  %xmm12,%xmm2
  movapd %xmm11,%xmm12
  unpcklpd %xmm1,%xmm12
  shufpd $0x1,%xmm11,%xmm1
  movsd  %xmm1,%xmm4
  movups %xmm4,-0x40(%rdi)
  movapd %xmm5,%xmm1
  movapd %xmm5,%xmm4
  movups %xmm12,-0x60(%rdi)
  unpcklpd %xmm0,%xmm1
  shufpd $0x1,%xmm5,%xmm0
  movsd  %xmm2,%xmm4
  movsd  %xmm0,%xmm2
  movups %xmm1,-0x30(%rdi)
  movups %xmm4,-0x20(%rdi)
  movups %xmm2,-0x10(%rdi)
  cmp    %r14,%r11
  jne    L161
  mov    0x4(%rsp),%edi
  mov    0x54(%rsp),%r11d
  mov    0x10(%rsp),%r8d
  add    %r11d,%edi
  cmp    %r8d,%r11d
  je     L140
  mov    0x170(%rsp),%rbp
  lea    (%rdx,%r11,1),%r8d
  movslq %edi,%r11
  movsd  (%rsi),%xmm0
  mov    %r8d,0x0(%rbp,%r11,4)
  mov    0x58(%rsp),%r11
  lea    (%r8,%r8,2),%ebp
  movslq %ebp,%rbp
  mulsd  (%r11),%xmm0
  movsd  (%r12,%rbp,8),%xmm1
  lea    (%rdi,%rdi,2),%r11d
  add    $0x1,%edi
  mov    %r11d,0x50(%rsp)
  movslq %r11d,%r11
  lea    0x0(,%r11,8),%r8
  mov    %r8,0x8(%rsp)
  lea    0x1(%r11),%r8
  divsd  %xmm6,%xmm0
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x0(%r13,%r11,8)
  movsd  0x8(%r12,%rbp,8),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x0(%r13,%r8,8)
  mulsd  0x10(%r12,%rbp,8),%xmm0
  movsd  %xmm0,0x8(%r13,%r8,8)
  mov    0x68(%rsp),%r8d
  cmp    %r8d,(%rsp)
  jl     L140
  movslq %edi,%rdi
  lea    (%rdx,%r8,1),%ebp
  movsd  (%rsi),%xmm0
  lea    0x0(,%rdi,4),%r8
  mov    %r8,0x20(%rsp)
  mov    0x170(%rsp),%r8
  mov    %ebp,(%r8,%rdi,4)
  mov    0x60(%rsp),%rdi
  mov    0x8(%rsp),%r8
  mulsd  (%rdi),%xmm0
  lea    0x0(%rbp,%rbp,2),%edi
  movslq %edi,%rdi
  movsd  (%r12,%rdi,8),%xmm1
  divsd  %xmm6,%xmm0
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x18(%r13,%r8,1)
  movsd  0x8(%r12,%rdi,8),%xmm1
  mov    0x50(%rsp),%r8d
  mulsd  %xmm0,%xmm1
  add    $0x3,%r8d
  movslq %r8d,%r8
  add    $0x1,%r8
  movsd  %xmm1,0x0(%r13,%r8,8)
  mulsd  0x10(%r12,%rdi,8),%xmm0
  mov    0x6c(%rsp),%edi
  movsd  %xmm0,0x8(%r13,%r8,8)
  cmp    %edi,(%rsp)
  jl     L140
  mov    0x170(%rsp),%r8
  mov    0x20(%rsp),%rbp
  add    %edx,%edi
  add    $0x7,%r11
  mov    %edi,0x4(%r8,%rbp,1)
  mov    0x78(%rsp),%rbp
  mov    0x8(%rsp),%r8
  movsd  0x0(%rbp),%xmm0
  mulsd  (%rsi),%xmm0
  lea    (%rdi,%rdi,2),%esi
  movslq %esi,%rsi
  movsd  (%r12,%rsi,8),%xmm1
  divsd  %xmm6,%xmm0
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x30(%r13,%r8,1)
  movsd  0x8(%r12,%rsi,8),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x0(%r13,%r11,8)
  mulsd  0x10(%r12,%rsi,8),%xmm0
  movsd  %xmm0,0x8(%r13,%r11,8)
L140:
  mov    0x40(%rsp),%rsi
  mov    0x10(%rsp),%edi
  add    0x30(%rsp),%rax
  add    %edi,0x4(%rsp)
  add    %rsi,%rcx
  add    %rsi,%r9
  add    0x48(%rsp),%r15
  add    0x14(%rsp),%edx
  cmp    0x18(%rsp),%r10
  jne    L67
  mov    0x160(%rsp),%rbp
  mov    0xa8(%rsp),%r15d
L42:
  mov    0x80(%rsp),%rax
  mov    0x170(%rsp),%r11
  mov    %r13,%rcx
  movsd  (%rax),%xmm2
  mov    0x88(%rsp),%rax
  movsd  (%rax),%xmm5
  movsd  0x8(%rax),%xmm4
  mulsd  %xmm2,%xmm5
  mulsd  %xmm2,%xmm4
  mulsd  0x10(%rax),%xmm2
  mov    0xac(%rsp),%eax
  test   %eax,%eax
  jle    L147
  mov    %r12,0x150(%rsp)
  mov    0x168(%rsp),%r14
  mov    %rbx,0x190(%rsp)
  mov    0xc0(%rsp),%r12
  mov    0xb8(%rsp),%ebx
L116:
  movsd  (%rcx),%xmm0
  movsd  0x8(%rcx),%xmm1
  movslq (%r11),%rax
  mov    0x170(%rsp),%rdx
  mulsd  %xmm4,%xmm1
  mulsd  %xmm5,%xmm0
  mov    %rax,%r9
  lea    (%r14,%rax,8),%rax
  mov    %r9d,%r10d
  imul   %ebx,%r10d
  addsd  %xmm1,%xmm0
  movsd  0x10(%rcx),%xmm1
  mulsd  %xmm2,%xmm1
  addsd  %xmm1,%xmm0
  addsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
  xor    %eax,%eax
  nopl   (%rax)
L61:
  mov    (%rdx),%esi
  cmp    %esi,%r9d
  jg     L22
  movslq %eax,%r8
  add    %r10d,%esi
  lea    0x0(,%r8,8),%rdi
  movsd  0x0(%r13,%r8,8),%xmm1
  mulsd  (%rcx),%xmm1
  movslq %esi,%rsi
  movsd  0x8(%r13,%rdi,1),%xmm0
  mulsd  0x8(%rcx),%xmm0
  lea    0x0(%rbp,%rsi,8),%rsi
  addsd  %xmm1,%xmm0
  movsd  0x10(%r13,%rdi,1),%xmm1
  mulsd  0x10(%rcx),%xmm1
  addsd  %xmm1,%xmm0
  addsd  (%rsi),%xmm0
  movsd  %xmm0,(%rsi)
L22:
  add    $0x3,%eax
  add    $0x4,%rdx
  cmp    %r15d,%eax
  jne    L61
  add    $0x4,%r11
  add    $0x18,%rcx
  cmp    %r12,%r11
  jne    L116
  mov    0x150(%rsp),%r12
  mov    0x190(%rsp),%rbx
L147:
  addq   $0x10,0x70(%rsp)
  mov    0x70(%rsp),%rax
  addq   $0x8,0x80(%rsp)
  addq   $0x18,0x88(%rsp)
  cmp    0xb0(%rsp),%rax
  jne    L26
L38:
  cmpl   $0x1,0xb8(%rsp)
  jle    L103
  mov    0x160(%rsp),%rax
  movslq 0xb8(%rsp),%rdx
  mov    $0x1,%r9d
  lea    0x8(%rax),%r8
  mov    0x160(%rsp),%rax
  lea    0x0(,%rdx,8),%rdi
  mov    %rdx,%r11
  lea    0x8(,%rdx,8),%r10
  lea    (%r8,%rdi,1),%rsi
  add    %rdi,%rax
  cs nopw 0x0(%rax,%rax,1)
L8:
  mov    %rax,%rdx
  mov    %r8,%rcx
  cs nopw 0x0(%rax,%rax,1)
L20:
  movsd  (%rcx),%xmm0
  add    $0x8,%rdx
  add    %rdi,%rcx
  movsd  %xmm0,-0x8(%rdx)
  cmp    %rsi,%rdx
  jne    L20
  add    $0x1,%r9d
  add    $0x8,%r8
  add    %rdi,%rax
  add    %r10,%rsi
  cmp    %r9d,%r11d
  jne    L8
L103:
  add    $0xf8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L5:
  lea    (%rdx,%rdx,2),%edi
  mov    %rcx,0x8(%rsp)
  mov    0xa0(%rsp),%rcx
  movslq %edi,%rdi
  lea    (%r12,%rdi,8),%r11
  mov    0x4(%rsp),%edi
  lea    (%rdi,%rdi,2),%edi
  movslq %edi,%rdi
  lea    0x0(%r13,%rdi,8),%r8
  xor    %edi,%edi
  nopl   0x0(%rax,%rax,1)
L105:
  movsd  (%rbx,%rdi,8),%xmm0
  mulsd  (%rsi),%xmm0
  lea    (%rdx,%rdi,1),%ebp
  add    $0x18,%r11
  movsd  -0x18(%r11),%xmm1
  mov    %ebp,(%rax,%rdi,4)
  mov    %rdi,%rbp
  add    $0x18,%r8
  add    $0x1,%rdi
  divsd  %xmm6,%xmm0
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,-0x18(%r8)
  movsd  -0x10(%r11),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,-0x10(%r8)
  mulsd  -0x8(%r11),%xmm0
  movsd  %xmm0,-0x8(%r8)
  cmp    %rcx,%rbp
  jne    L105
  mov    0x8(%rsp),%rcx
  jmp    L140
```

tool_calls: name: retrieve_data
arguments: data_tag: D3
data_type: byte[16]
name: retrieve_data
arguments: data_tag: D6
data_type: f32[4]

tool: {"D3": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: {"D6": [0.0,1.401298464324817e-45,2.802596928649634e-45,4.203895392974451e-45]}

assistant: ```c
void computeLinGNmatPnt2Pnt(int degU, int degV, double *cp, int ncp, int kcp, double *knotU, double *knotV, double *us, int nus, double *dirOffset, double *cpDir, double *sgnDistDiff, double *HessApprx, double *gradIent, int *derivInds, double *derivVals, double *leftU, double *rightU, double *NU, double *leftV, double *rightV, double *NV) {
  int i, j, ii, twoii, threeii, spanU, spanV, ind, ind2, dind, fourncp, myint, numCP, orderU, orderV, nnz, cpInd;
  double bspnt[4], doubleVals[3];
  fourncp = 4 * ncp;
  orderU = degU + 1;
  orderV = degV + 1;
  nnz = orderU * orderV;
  numCP = ncp * kcp;
  for (ii = 0; ii < nus; ii++) {
    twoii = 2 * ii;
    threeii = 3 * ii;
    spanU = FindSpan(ncp, degU, us[twoii], knotU);
    BasisFuns(spanU, us[twoii], degU, knotU, NU, leftU, rightU);
    ind = spanU - degU;
    spanV = FindSpan(kcp, degV, us[twoii + 1], knotV);
    BasisFuns(spanV, us[twoii + 1], degV, knotV, NV, leftV, rightV);
    ind2 = spanV - degV;
    myint = ind2 * fourncp + ind * 4;
    bspnt[0] = 0.0;
    bspnt[1] = 0.0;
    bspnt[2] = 0.0;
    bspnt[3] = 0.0;
    for (i = 0; i <= degV; i++) {
      for (j = 0; j <= degU; j++) {
        bspnt[0] += NV[i] * NU[j] * cp[i * fourncp + j * 4 + myint];
        bspnt[1] += NV[i] * NU[j] * cp[i * fourncp + j * 4 + myint + 1];
        bspnt[2] += NV[i] * NU[j] * cp[i * fourncp + j * 4 + myint + 2];
        bspnt[3] += NV[i] * NU[j] * cp[i * fourncp + j * 4 + myint + 3];
      }
    }
    dind = 0;
    for (i = 0; i <= degV; i++) {
      for (j = 0; j <= degU; j++) {
        cpInd = (ind2 + i) * ncp + ind + j;
        derivInds[dind] = cpInd;
        cpInd = 3 * cpInd;
        doubleVals[0] = NV[i] * NU[j] / bspnt[3];
        derivVals[3 * dind] = doubleVals[0] * cpDir[cpInd];
        derivVals[3 * dind + 1] = doubleVals[0] * cpDir[cpInd + 1];
        derivVals[3 * dind + 2] = doubleVals[0] * cpDir[cpInd + 2];
        dind++;
      }
    }
    doubleVals[0] = sgnDistDiff[ii] * dirOffset[threeii];
    doubleVals[1] = sgnDistDiff[ii] * dirOffset[threeii + 1];
    doubleVals[2] = sgnDistDiff[ii] * dirOffset[threeii + 2];
    for (i = 0; i < nnz; i++) {
      gradIent[derivInds[i]] += doubleVals[0] * derivVals[3 * i] + doubleVals[1] * derivVals[3 * i + 1] + doubleVals[2] * derivVals[3 * i + 2];
      for (j = 0; j < nnz; j++) {
        if (derivInds[j] >= derivInds[i]) {
          HessApprx[derivInds[i] * numCP + derivInds[j]] += derivVals[3 * i] * derivVals[3 * j] + derivVals[3 * i + 1] * derivVals[3 * j + 1] + derivVals[3 * i + 2] * derivVals[3 * j + 2];
        }
      }
    }
  }
  for (i = 1; i < numCP; i++) {
    for (j = 0; j < i; j++) {
      HessApprx[i * numCP + j] = HessApprx[j * numCP + i];
    }
  }
  return;
}
```