user: What would the C source look like for the assembly code provided here?

```asm
<resample_post_theta>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %esi,-0x28(%rbp)
  mov    %rdx,-0x30(%rbp)
  mov    %rcx,-0x38(%rbp)
  mov    %r8,-0x40(%rbp)
  mov    %r9,-0x48(%rbp)
  mov    -0x28(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x1,-0x18(%rbp)
  jmp    L16
L85:
  movl   $0x1,-0xc(%rbp)
  jmp    L72
L83:
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0xc(%rbp)
L72:
  mov    -0xc(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jle    L83
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x28(%rbp),%xmm1
  mov    -0x28(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x1,-0x14(%rbp)
  jmp    L89
L37:
  movl   $0x1,-0x10(%rbp)
  jmp    L31
L17:
  mov    -0x28(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x28(%rbp),%eax
  add    $0x1,%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  D6(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%rax
  sub    $0x8,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x2,%rax
  sub    $0x4,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%rax
  sub    $0x8,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x2,%rax
  sub    $0x4,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  D6(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x10(%rbp)
L31:
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x2,%rax
  sub    $0x4,%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x10(%rbp)
  jle    L17
  addl   $0x1,-0x14(%rbp)
L89:
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    %eax,-0x14(%rbp)
  jle    L37
  cmpq   $0x0,0x18(%rbp)
  jne    L6
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x28(%rbp),%edx
  mov    -0x8(%rbp),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sample_Delta@plt>
  jmp    L11
L6:
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cmp    $0xffffffff,%eax
  jne    L19
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x28(%rbp),%edx
  mov    -0x8(%rbp),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sample_Delta@plt>
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x28(%rbp),%edx
  mov    0x10(%rbp),%rsi
  mov    %rax,%rdi
  call   <add_dst@plt>
  jmp    L11
L19:
  mov    -0x18(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    -0x28(%rbp),%edx
  mov    -0x8(%rbp),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <add_dst@plt>
L11:
  addl   $0x1,-0x18(%rbp)
L16:
  mov    -0x18(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jle    L85
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  nop
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D6
type_guessed: f64

tool: D6: 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);
}
```