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

```asm
<compute_log_posterior>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %edi,0x54(%rsp)
  mov    %esi,0x8(%rsp)
  mov    %rcx,0x28(%rsp)
  mov    %r8d,0x50(%rsp)
  movsd  %xmm0,0x58(%rsp)
  mov    %r9,0x10(%rsp)
  movsd  %xmm1,0x60(%rsp)
  mov    0xc0(%rsp),%r14
  test   %edi,%edi
  jle    L165
  mov    %rdx,0x38(%rsp)
  mov    0xb0(%rsp),%rdi
  mov    %rdx,0x40(%rsp)
  movq   $0x1,0x30(%rsp)
  pxor   %xmm5,%xmm5
  movsd  %xmm5,0x48(%rsp)
  mov    %r14,0x68(%rsp)
  mov    %rdi,%r15
  jmp    L160
L165:
  pxor   %xmm4,%xmm4
  movsd  %xmm4,0x48(%rsp)
  movsd  %xmm4,0x30(%rsp)
L66:
  mov    $0x1,%esi
  mov    D7(%rip),%rax
  movq   %rax,%xmm1
  movsd  0x58(%rsp),%xmm0
  mov    $0x1,%edi
  call   <ldf_Gam@plt>
  movq   %xmm0,%rbx
  mov    $0x1,%esi
  mov    D7(%rip),%rax
  movq   %rax,%xmm1
  movsd  0x60(%rsp),%xmm0
  mov    $0x1,%edi
  call   <ldf_Gam@plt>
  movapd %xmm0,%xmm1
  movsd  0x48(%rsp),%xmm0
  addsd  0x30(%rsp),%xmm0
  addsd  D21(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movq   %rbx,%xmm5
  addsd  %xmm5,%xmm0
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L125:
  mov    0x18(%rsp),%rax
  lea    0x0(,%rax,8),%r13
  mov    $0x0,%ebx
  pxor   %xmm1,%xmm1
  movsd  %xmm1,(%rsp)
L101:
  mov    (%r14),%rax
  mov    (%rax,%r13,1),%rax
  mov    (%rax,%rbx,4),%esi
  mov    0x8(%rsp),%r8d
  mov    $0x1,%ecx
  mov    (%r15),%rdx
  mov    $0x1,%edi
  call   <ldf_Mult@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  add    $0x1,%rbx
  mov    (%r12),%rdx
  lea    0x1(%rbx),%eax
  cmp    %eax,(%rdx,%rbp,1)
  jge    L101
L80:
  movsd  0x20(%rsp),%xmm4
  addsd  (%rsp),%xmm4
  movsd  %xmm4,0x20(%rsp)
  addq   $0x1,0x18(%rsp)
  mov    0x18(%rsp),%rax
  add    $0x1,%eax
  mov    0x28(%rsp),%rdi
  mov    0x30(%rsp),%rcx
  cmp    %eax,-0x4(%rdi,%rcx,4)
  jl     L71
L164:
  mov    0x40(%rsp),%rax
  mov    %rax,%r12
  mov    0x18(%rsp),%rdi
  lea    0x0(,%rdi,4),%rbp
  mov    (%rax),%rax
  cmpl   $0x0,(%rax,%rdi,4)
  jg     L125
  pxor   %xmm6,%xmm6
  movsd  %xmm6,(%rsp)
  jmp    L80
L71:
  movsd  0x48(%rsp),%xmm6
  addsd  0x20(%rsp),%xmm6
  movsd  %xmm6,0x48(%rsp)
  addq   $0x1,0x30(%rsp)
  mov    0x30(%rsp),%rax
  addq   $0x8,0x40(%rsp)
  add    $0x8,%r15
  add    $0x8,%r14
  cmp    %eax,0x54(%rsp)
  jl     L167
L160:
  movq   $0x0,0x18(%rsp)
  pxor   %xmm6,%xmm6
  movsd  %xmm6,0x20(%rsp)
  mov    0x28(%rsp),%rax
  mov    0x30(%rsp),%rdi
  cmpl   $0x0,-0x4(%rax,%rdi,4)
  jg     L164
  jmp    L71
L167:
  mov    0x68(%rsp),%r15
  mov    0xb8(%rsp),%r14
  movq   $0x1,0x20(%rsp)
  pxor   %xmm5,%xmm5
  movsd  %xmm5,0x30(%rsp)
  jmp    L39
L65:
  mov    0x8(%rsp),%rax
  lea    0x0(,%rax,8),%rbp
  mov    $0x0,%ebx
  pxor   %xmm1,%xmm1
  movsd  %xmm1,(%rsp)
L2:
  mov    (%r15),%rax
  mov    (%rax,%rbp,1),%rax
  movslq (%rax,%rbx,4),%rax
  mov    0x10(%rsp),%rcx
  mov    -0x8(%rcx,%rax,8),%rdx
  mov    (%r14),%rax
  mov    (%rax,%rbp,1),%rax
  mov    (%rax,%rbx,4),%esi
  mov    0x50(%rsp),%r8d
  mov    $0x1,%ecx
  mov    $0x1,%edi
  call   <ldf_Mult@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  addsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  add    $0x1,%rbx
  lea    0x1(%rbx),%edx
  mov    0x0(%r13),%rax
  cmp    (%rax,%r12,1),%edx
  jle    L2
L163:
  movsd  0x18(%rsp),%xmm5
  addsd  (%rsp),%xmm5
  movsd  %xmm5,0x18(%rsp)
  addq   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%rax
  add    $0x1,%eax
  mov    0x28(%rsp),%rdi
  mov    0x20(%rsp),%rcx
  cmp    -0x4(%rdi,%rcx,4),%eax
  jg     L158
L6:
  mov    0x38(%rsp),%rax
  mov    %rax,%r13
  mov    0x8(%rsp),%rdi
  lea    0x0(,%rdi,4),%r12
  mov    (%rax),%rax
  cmpl   $0x0,(%rax,%rdi,4)
  jg     L65
  pxor   %xmm7,%xmm7
  movsd  %xmm7,(%rsp)
  jmp    L163
L158:
  movsd  0x30(%rsp),%xmm7
  addsd  0x18(%rsp),%xmm7
  movsd  %xmm7,0x30(%rsp)
  addq   $0x1,0x20(%rsp)
  mov    0x20(%rsp),%rax
  addq   $0x8,0x38(%rsp)
  add    $0x8,%r15
  add    $0x8,%r14
  cmp    %eax,0x54(%rsp)
  jl     L66
L39:
  movq   $0x0,0x8(%rsp)
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x18(%rsp)
  mov    0x28(%rsp),%rax
  mov    0x20(%rsp),%rdi
  cmpl   $0x0,-0x4(%rax,%rdi,4)
  jg     L6
  jmp    L158
```

tool_calls: name: read_data
arguments: tag: D7
data_type: f64
name: read_data
arguments: tag: D21
data_type: f64

tool: D7: 0.1

tool: D21: 0

assistant: ```c
double compute_log_posterior(int D, int K, int **M, int *N, int V, double alpha, double **beta, double eta, double **theta, int ***w, int ***z) {
  double ldfP4_0;
  double ldfP4_1;
  double ldfP4_2;
  int m_22;
  int n_16;
  int d_10;
  double ldfP5_0;
  double ldfP5_1;
  double ldfP5_2;
  int m_23;
  int n_17;
  int d_11;
  ldfP4_0 = 0.0;
  for (d_10 = 1; d_10 <= D; d_10++) {
    ldfP4_1 = 0.0;
    for (n_16 = 1; n_16 <= N[d_10 - 1]; n_16++) {
      ldfP4_2 = 0.0;
      for (m_22 = 1; m_22 <= M[d_10 - 1][n_16 - 1]; m_22++) {
        ldfP4_2 += ldf_Mult(1, z[d_10 - 1][n_16 - 1][m_22 - 1], theta[d_10 - 1], 1, K);
      }
      ldfP4_1 += ldfP4_2;
    }
    ldfP4_0 += ldfP4_1;
  }
  ldfP5_0 = 0.0;
  for (d_11 = 1; d_11 <= D; d_11++) {
    ldfP5_1 = 0.0;
    for (n_17 = 1; n_17 <= N[d_11 - 1]; n_17++) {
      ldfP5_2 = 0.0;
      for (m_23 = 1; m_23 <= M[d_11 - 1][n_17 - 1]; m_23++) {
        ldfP5_2 += ldf_Mult(1, w[d_11 - 1][n_17 - 1][m_23 - 1], beta[z[d_11 - 1][n_17 - 1][m_23 - 1] - 1], 1, V);
      }
      ldfP5_1 += ldfP5_2;
    }
    ldfP5_0 += ldfP5_1;
  }
  return ((ldf_Gam(1, alpha, 0.1, 1)) + ((ldf_Gam(1, eta, 0.1, 1)) + ((0.0) + ((0.0) + ((ldfP4_0) + (ldfP5_0))))));
}
```