user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<vm_loglikelihood_kappa_partial_naive>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x78,%rsp
  mov    %edi,0x60(%rsp)
  mov    %esi,0x20(%rsp)
  mov    %r8,0x30(%rsp)
  test   %edi,%edi
  jle    L68
  movslq %esi,%rax
  mov    %rcx,%r12
  mov    %r9,%r13
  xor    %r14d,%r14d
  mov    %rax,%rdi
  mov    %eax,%esi
  shl    $0x3,%rax
  pxor   %xmm3,%xmm3
  mov    %rax,0x58(%rsp)
  movslq %edx,%rax
  imul   %edx,%esi
  mov    %rax,0x68(%rsp)
  shl    $0x3,%rax
  mov    %rax,0x50(%rsp)
  add    0xb0(%rsp),%rax
  mov    %rax,0x28(%rsp)
  lea    -0x1(%rdi),%eax
  mov    %esi,0x14(%rsp)
  movl   $0x0,0x24(%rsp)
  mov    %eax,0x64(%rsp)
  nopl   0x0(%rax,%rax,1)
L46:
  mov    0x28(%rsp),%r15
  mov    0x30(%rsp),%rcx
  mov    %r13,%r8
  mov    %r12,%rdx
  mov    0x20(%rsp),%edi
  mov    %ebx,%esi
  movsd  %xmm3,0x48(%rsp)
  mov    %r15,%rbp
  sub    0x50(%rsp),%rbp
  mov    %rbp,%r9
  call   <marginal_j_concentration@plt>
  mov    %rbp,%r9
  mov    0x20(%rsp),%ebp
  mov    %r13,%r8
  mov    0x30(%rsp),%rcx
  mov    %r12,%rdx
  mov    %ebx,%esi
  movsd  %xmm0,0x18(%rsp)
  mov    %ebp,%edi
  call   <marginal_j_mean@plt>
  movapd %xmm0,%xmm6
  movsd  %xmm0,0x38(%rsp)
  movsd  (%r15),%xmm0
  subsd  %xmm6,%xmm0
  call   <cos@plt>
  movsd  %xmm0,0x40(%rsp)
  movsd  0x18(%rsp),%xmm0
  call   <bessi1_spd@plt>
  movsd  %xmm0,0x8(%rsp)
  movsd  0x18(%rsp),%xmm0
  call   <bessi0_spd@plt>
  movsd  0x8(%rsp),%xmm2
  movsd  0x40(%rsp),%xmm1
  movsd  0x48(%rsp),%xmm3
  divsd  %xmm0,%xmm2
  subsd  %xmm2,%xmm1
  divsd  0x18(%rsp),%xmm1
  addsd  %xmm3,%xmm1
  movsd  %xmm1,0x40(%rsp)
  test   %ebp,%ebp
  jle    L38
  movq   $0x0,0x8(%rsp)
  mov    0x64(%rsp),%ebp
  xor    %r15d,%r15d
  jmp    L51
  nopl   0x0(%rax,%rax,1)
L14:
  mov    %rdx,%r15
L51:
  cmp    %r15d,%ebx
  je     L32
  mov    0xb0(%rsp),%rax
  lea    (%r14,%r15,1),%edx
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  subsd  (%r12,%r15,8),%xmm0
  call   <sin@plt>
  mov    0x14(%rsp),%eax
  lea    (%rax,%r15,1),%edx
  movslq %edx,%rdx
  mulsd  0x0(%r13,%rdx,8),%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
L32:
  lea    0x1(%r15),%rdx
  cmp    %r15,%rbp
  jne    L14
L42:
  mov    0x28(%rsp),%r15
  movsd  (%r15),%xmm0
  subsd  0x38(%rsp),%xmm0
  call   <sin@plt>
  mov    0x58(%rsp),%rcx
  movsd  0x40(%rsp),%xmm3
  mulsd  0x8(%rsp),%xmm0
  addl   $0x1,0x24(%rsp)
  add    %rcx,%r15
  divsd  0x18(%rsp),%xmm0
  mov    0x24(%rsp),%eax
  addsd  %xmm0,%xmm3
  mov    %r15,0x28(%rsp)
  add    0x20(%rsp),%r14d
  cmp    %eax,0x60(%rsp)
  jne    L46
  xorpd  D11(%rip),%xmm3
  movapd %xmm3,%xmm0
L59:
  mov    0x30(%rsp),%rax
  mov    0x68(%rsp),%rdi
  mulsd  (%rax,%rdi,8),%xmm0
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L38:
  movq   $0x0,0x8(%rsp)
  jmp    L42
L68:
  movslq %edx,%rax
  movsd  D11(%rip),%xmm0
  mov    %rax,0x68(%rsp)
  jmp    L59
```

tool_calls: name: retrieve_data
arguments: tag: D11
type_guessed: f32[4]

tool: {"D11": [0.0,-0.0,0.0,0.0]}

assistant: ```c
double vm_loglikelihood_kappa_partial_naive(int n, int p, int R, double *mu, double *kappa, double *lambda, double *theta) {
  double k_rest, m_rest;
  double acum = 0., acum_scnd;
  int i, l;
  for (i = 0; i < n; i++) {
    k_rest = marginal_j_concentration(p, R, mu, kappa, lambda, theta + i * p);
    m_rest = marginal_j_mean(p, R, mu, kappa, lambda, theta + i * p);
    acum += (cos(theta[i * p + R] - m_rest) - (bessi1_spd(k_rest) / bessi0_spd(k_rest))) / k_rest;
    acum_scnd = 0.;
    for (l = 0; l < p; l++) {
      if (l != R) {
        acum_scnd += lambda[R * p + l] * sin(theta[i * p + l] - mu[l]);
      }
    }
    acum += (sin(theta[i * p + R] - m_rest) * acum_scnd) / k_rest;
  }
  return -acum * kappa[R];
}
```