user: What is the c source code of the assembly code below:

```asm
<resample_post_theta>:
  endbr64
  push   %r15
  mov    %edi,%r15d
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x48,%rsp
  mov    0x80(%rsp),%rax
  mov    %edi,0xc(%rsp)
  mov    %rdx,0x20(%rsp)
  mov    0x88(%rsp),%rbp
  mov    %rax,0x38(%rsp)
  lea    0x1(%rsi),%eax
  mov    0x90(%rsp),%r13
  lea    0x0(,%rax,8),%edi
  mov    %rcx,0x10(%rsp)
  movslq %eax,%r14
  mov    %r8,0x28(%rsp)
  mov    %r9,0x30(%rsp)
  call   <malloc@plt>
  mov    %rax,%r12
  test   %r15d,%r15d
  jle    L91
  pxor   %xmm0,%xmm0
  lea    -0x8(%rax,%r14,8),%r15
  lea    -0x1(%rbx),%eax
  mov    $0x1,%r14d
  cvtsi2sd %ebx,%xmm0
  mulsd  D7(%rip),%xmm0
  lea    0x8(,%rax,8),%rax
  mov    %rax,0x18(%rsp)
  movsd  %xmm0,(%rsp)
  movsd  D34(%rip),%xmm0
  nopw   0x0(%rax,%rax,1)
L52:
  test   %ebx,%ebx
  jle    L61
  mov    0x18(%rsp),%rdx
  xor    %esi,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  mov    D34(%rip),%rax
  movq   %rax,%xmm0
L61:
  mov    0x10(%rsp),%rax
  movsd  (%rsp),%xmm2
  movslq -0x4(%rax,%r14,4),%r10
  movsd  %xmm2,(%r15)
  test   %r10d,%r10d
  jle    L62
  mov    0x20(%rsp),%rax
  xor    %edi,%edi
  mov    -0x8(%rax,%r14,8),%r11
  nopl   0x0(%rax)
L16:
  mov    (%r11,%rdi,4),%edx
  test   %edx,%edx
  jle    L54
  mov    -0x8(%r13,%r14,8),%rax
  sub    $0x1,%edx
  mov    (%rax,%rdi,8),%rax
  lea    (%rax,%rdx,4),%rcx
  nopl   0x0(%rax,%rax,1)
L55:
  movsd  (%r15),%xmm1
  movslq (%rax),%rdx
  addsd  %xmm0,%xmm1
  lea    -0x8(%r12,%rdx,8),%rdx
  movsd  %xmm1,(%r15)
  movsd  (%rdx),%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdx)
  mov    %rax,%rdx
  add    $0x4,%rax
  cmp    %rcx,%rdx
  jne    L55
L54:
  add    $0x1,%rdi
  cmp    %rdi,%r10
  jne    L16
L62:
  test   %rbp,%rbp
  je     L79
  movslq -0x4(%rbp,%r14,4),%rax
  cmp    $0xffffffff,%eax
  je     L96
  mov    0x30(%rsp),%rsi
  mov    %ebx,%edx
  mov    (%rsi,%rax,8),%rdi
  mov    %r12,%rsi
  call   <add_dst@plt>
  mov    D34(%rip),%rax
  movq   %rax,%xmm0
L32:
  add    $0x1,%r14
  cmp    %r14d,0xc(%rsp)
  jge    L52
L91:
  add    $0x48,%rsp
  mov    %r12,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <free@plt>
L96:
  mov    0x28(%rsp),%rax
  mov    %ebx,%edx
  mov    %r12,%rsi
  mov    -0x8(%rax,%r14,8),%rdi
  call   <sample_Delta@plt>
  mov    0x28(%rsp),%rax
  mov    0x38(%rsp),%rsi
  mov    %ebx,%edx
  mov    -0x8(%rax,%r14,8),%rdi
  call   <add_dst@plt>
  mov    D34(%rip),%rax
  movq   %rax,%xmm0
  jmp    L32
L79:
  mov    0x28(%rsp),%rax
  mov    %ebx,%edx
  mov    %r12,%rsi
  mov    -0x8(%rax,%r14,8),%rdi
  call   <sample_Delta@plt>
  mov    D34(%rip),%rax
  movq   %rax,%xmm0
  jmp    L32
```

tool_calls: name: parse_data
arguments: tag: D7
datatype: f64
name: parse_data
arguments: tag: D34
datatype: f64

tool: D7: 0

tool: D34: 1

assistant: ```c
void resample_post_theta(int D, int K, int **M, int *N, double **post_theta, double **post_theta_train, double *global_topic_counts, int *entity_map, int ***z) {
  int d_9;
  double *tmpSP7;
  int n_3;
  int m_75;
  int dvv_loop_var_1;
  int i;
  tmpSP7 = (double *)malloc(sizeof(double) * (1 + ((K) + (1)) - (1)));
  for (d_9 = 1; d_9 <= D; d_9++) {
    for (dvv_loop_var_1 = 1; dvv_loop_var_1 <= K; dvv_loop_var_1++) {
      tmpSP7[dvv_loop_var_1 - 1] = 0.0;
    }
    tmpSP7[(K) + (1) - 1] = (0.0) * (((1) + (K)) - (1));
    for (n_3 = 1; n_3 <= N[d_9 - 1]; n_3++) {
      for (m_75 = 1; m_75 <= M[d_9 - 1][n_3 - 1]; m_75++) {
        tmpSP7[(K) + (1) - 1] += 1.0;
        tmpSP7[z[d_9 - 1][n_3 - 1][m_75 - 1] - 1] += 1.0;
      }
    }
    if (entity_map == NULL) {
      sample_Delta(post_theta[d_9 - 1], tmpSP7, K);
    } else if (entity_map[d_9 - 1] == -1) {
      sample_Delta(post_theta[d_9 - 1], tmpSP7, K);
      add_dst(post_theta[d_9 - 1], global_topic_counts, K);
    } else {
      add_dst(post_theta_train[entity_map[d_9 - 1]], tmpSP7, K);
    }
  }
  free(tmpSP7);
}
```