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

```asm
<vm_loglikelihood_kappa_partial_naive>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  sub    $0x60,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %esi,-0x48(%rbp)
  mov    %edx,-0x4c(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %r8,-0x60(%rbp)
  mov    %r9,-0x68(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movl   $0x0,-0x38(%rbp)
  jmp    L43
L1:
  mov    -0x38(%rbp),%eax
  imul   -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  lea    (%rdx,%rax,1),%r8
  mov    -0x68(%rbp),%rdi
  mov    -0x60(%rbp),%rcx
  mov    -0x58(%rbp),%rdx
  mov    -0x4c(%rbp),%esi
  mov    -0x48(%rbp),%eax
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <marginal_j_concentration@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x38(%rbp),%eax
  imul   -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  lea    (%rdx,%rax,1),%r8
  mov    -0x68(%rbp),%rdi
  mov    -0x60(%rbp),%rcx
  mov    -0x58(%rbp),%rdx
  mov    -0x4c(%rbp),%esi
  mov    -0x48(%rbp),%eax
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %eax,%edi
  call   <marginal_j_mean@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x38(%rbp),%eax
  imul   -0x48(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rbx
  mov    -0x20(%rbp),%rax
  movq   %rax,%xmm0
  call   <bessi1_spd@plt>
  movq   %xmm0,%r12
  mov    -0x20(%rbp),%rax
  movq   %rax,%xmm0
  call   <bessi0_spd@plt>
  movq   %r12,%xmm1
  divsd  %xmm0,%xmm1
  movq   %rbx,%xmm0
  subsd  %xmm1,%xmm0
  divsd  -0x20(%rbp),%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L8
L33:
  mov    -0x34(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  je     L47
  mov    -0x4c(%rbp),%eax
  imul   -0x48(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movsd  %xmm2,-0x70(%rbp)
  mov    -0x38(%rbp),%eax
  imul   -0x48(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  mulsd  -0x70(%rbp),%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
L47:
  addl   $0x1,-0x34(%rbp)
L8:
  mov    -0x34(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jl     L33
  mov    -0x38(%rbp),%eax
  imul   -0x48(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x18(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mulsd  -0x28(%rbp),%xmm0
  divsd  -0x20(%rbp),%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  addl   $0x1,-0x38(%rbp)
L43:
  mov    -0x38(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L1
  movsd  -0x30(%rbp),%xmm0
  movq   D4(%rip),%xmm1
  xorpd  %xmm0,%xmm1
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  add    $0x60,%rsp
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D4
type_guessed: f32[2]

tool: {"D4": [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];
}
```