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

```asm
<resample_post_gamma>:
  endbr64
  push   %r15
  lea    0x1(%rcx),%eax
  push   %r14
  mov    %edi,%r14d
  lea    0x0(,%rax,8),%edi
  movslq %eax,%r15
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  mov    %r9,%rbx
  sub    $0x28,%rsp
  mov    %r8,0x18(%rsp)
  mov    0x60(%rsp),%r8
  mov    %ecx,0x14(%rsp)
  mov    %r8,0x8(%rsp)
  call   <malloc@plt>
  mov    0x14(%rsp),%ecx
  mov    0x8(%rsp),%r8
  mov    %rax,%rbp
  test   %ecx,%ecx
  jle    L38
  movslq %ecx,%rdx
  xor    %esi,%esi
  mov    %rax,%rdi
  shl    $0x3,%rdx
  call   <memset@plt>
  mov    0x8(%rsp),%r8
L38:
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  lea    -0x8(%rbp,%r15,8),%rdx
  cvtsi2sdl 0x14(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx)
  test   %r14d,%r14d
  jle    L87
  movslq %r14d,%rax
  movsd  D7(%rip),%xmm2
  xor    %r11d,%r11d
  mov    %rax,0x8(%rsp)
L20:
  movslq (%r12,%r11,4),%r14
  test   %r14d,%r14d
  jle    L88
  mov    0x0(%r13,%r11,8),%r15
  xor    %r10d,%r10d
  nopl   0x0(%rax)
L77:
  movslq (%r15,%r10,4),%rcx
  test   %ecx,%ecx
  jle    L59
  mov    (%r8,%r11,8),%rax
  mov    (%rax,%r10,8),%rsi
  mov    (%rbx,%r11,8),%rax
  mov    (%rax,%r10,8),%rdi
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L74:
  cmpl   $0x2,(%rsi,%rax,4)
  movsd  (%rdx),%xmm0
  je     L67
  movslq (%rdi,%rax,4),%r9
  addsd  %xmm1,%xmm0
  add    $0x1,%rax
  lea    -0x8(%rbp,%r9,8),%r9
  movsd  %xmm0,(%rdx)
  movsd  (%r9),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%r9)
  cmp    %rax,%rcx
  jne    L74
L59:
  add    $0x1,%r10
  cmp    %r14,%r10
  jne    L77
L88:
  add    $0x1,%r11
  cmp    0x8(%rsp),%r11
  jne    L20
L87:
  mov    0x18(%rsp),%rdi
  mov    0x14(%rsp),%edx
  mov    %rbp,%rsi
  call   <sample_Delta@plt>
  add    $0x28,%rsp
  mov    %rbp,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1080 <free@plt>
  nopl   (%rax)
L67:
  movslq (%rdi,%rax,4),%r9
  addsd  %xmm2,%xmm0
  add    $0x1,%rax
  lea    -0x8(%rbp,%r9,8),%r9
  movsd  %xmm0,(%rdx)
  movsd  (%r9),%xmm0
  addsd  %xmm2,%xmm0
  movsd  %xmm0,(%r9)
  cmp    %rcx,%rax
  jne    L74
  add    $0x1,%r10
  cmp    %r14,%r10
  jne    L77
  jmp    L88
```

tool_calls: name: extract_symbolic_data
arguments: label: D7
data_type: f64

tool: D7: 1

assistant: ```c
void resample_post_gamma(int D, int **M, int *N, int V, double *post_gamma, int ***w, int ***s) {
  int k_8;
  double *tmpSP4;
  int d_2;
  int n_74;
  int m_290;
  int dvv_loop_var_1;
  tmpSP4 = (double *)malloc(sizeof(double) * (1 + ((V) + (1)) - (1)));
  for (k_8 = 2; k_8 <= 2; k_8++) {
    for (dvv_loop_var_1 = 1; dvv_loop_var_1 <= V; dvv_loop_var_1++) {
      tmpSP4[dvv_loop_var_1 - 1] = 0.0;
    }
    tmpSP4[(V) + (1) - 1] = (0.0) * (((1) + (V)) - (1));
    for (d_2 = 1; d_2 <= D; d_2++) {
      for (n_74 = 1; n_74 <= N[d_2 - 1]; n_74++) {
        for (m_290 = 1; m_290 <= M[d_2 - 1][n_74 - 1]; m_290++) {
          tmpSP4[(V) + (1) - 1] += (1.0) * ((((k_8) == (s[d_2 - 1][n_74 - 1][m_290 - 1])) ? 1 : 0));
          tmpSP4[w[d_2 - 1][n_74 - 1][m_290 - 1] - 1] += (1.0) * ((((k_8) == (s[d_2 - 1][n_74 - 1][m_290 - 1])) ? 1 : 0));
        }
      }
    }
    sample_Delta(post_gamma, tmpSP4, V);
  }
  free(tmpSP4);
}
```