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

```asm
<nuclear_mep>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x28(%rbp)
  mov    %r8,-0x40(%rbp)
  mov    -0x28(%rbp),%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x10(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L9
L15:
  movl   $0x0,-0x14(%rbp)
  jmp    L36
L19:
  mov    -0x18(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x14(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  mov    $0x2,%edi
  movq   %rax,%xmm0
  call   <pow@plt>
  movsd  %xmm0,-0x48(%rbp)
  mov    -0x18(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x14(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movapd %xmm0,%xmm2
  subsd  %xmm1,%xmm2
  movq   %xmm2,%rax
  mov    $0x2,%edi
  movq   %rax,%xmm0
  call   <pow@plt>
  movapd %xmm0,%xmm3
  addsd  -0x48(%rbp),%xmm3
  movsd  %xmm3,-0x48(%rbp)
  mov    -0x18(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x14(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  mov    $0x2,%edi
  movq   %rax,%xmm0
  call   <pow@plt>
  addsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm4
  movsd  %xmm4,-0x48(%rbp)
  mov    -0x8(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movsd  -0x48(%rbp),%xmm1
  divsd  %xmm0,%xmm1
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x14(%rbp)
L36:
  mov    -0x14(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L19
  addl   $0x1,-0x18(%rbp)
L9:
  mov    -0x18(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L15
  mov    -0x10(%rbp),%rax
  leave
  ret
```

assistant: ```c
double *nuclear_mep(int nr_nuclei, double charges[nr_nuclei], double coordinates[3 * nr_nuclei], int grid_size, double grid[3 * grid_size]) {
  double *mep = (double *)calloc(grid_size, sizeof(double));
  for (int i = 0; i < nr_nuclei; i++) {
    for (int j = 0; j < grid_size; j++) {
      double dist = pow((coordinates[i * 3] - grid[j * 3]), 2) + pow((coordinates[i * 3 + 1] - grid[j * 3 + 1]), 2) + pow((coordinates[i * 3 + 2] - grid[j * 3 + 2]), 2);
      mep[j] += charges[i] / sqrt(dist);
    }
  }
  return mep;
}
```