user: Converte this assembly snippet into its equivalent C code:

```asm
<nbodyC>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdx,0x28(%rsp)
  mov    %ecx,0x30(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x40(%rsp)
  movq   $0x0,0x48(%rsp)
  movq   $0x0,0x50(%rsp)
  test   %ecx,%ecx
  jle    L132
  mov    %rsi,%r14
  mov    %rdi,0x38(%rsp)
  movl   $0x0,0x34(%rsp)
  movl   $0x0,0x4(%rsp)
  lea    0x40(%rsp),%r15
  jmp    L25
L45:
  add    $0x1,%rbx
  cmp    0x8(%rsp),%rbx
  je     L120
L139:
  cmp    %ebx,0x4(%rsp)
  je     L45
  lea    (%rbx,%rbx,2),%ebp
  movslq %ebp,%rbp
  shl    $0x3,%rbp
  lea    (%r14,%rbp,1),%r12
  movsd  (%r12),%xmm0
  subsd  0x0(%r13),%xmm0
  mov    $0x2,%edi
  call   <pow@plt>
  movsd  %xmm0,0x10(%rsp)
  movsd  0x8(%r14,%rbp,1),%xmm0
  mov    0x18(%rsp),%rax
  subsd  (%rax),%xmm0
  mov    $0x2,%edi
  call   <pow@plt>
  addsd  0x10(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsp)
  movsd  0x10(%r14,%rbp,1),%xmm0
  mov    0x20(%rsp),%rax
  subsd  (%rax),%xmm0
  mov    $0x2,%edi
  call   <pow@plt>
  addsd  0x10(%rsp),%xmm0
  mov    $0x1,%edi
  call   <pow@plt>
  movapd %xmm0,%xmm1
  ucomisd D8(%rip),%xmm0
  jp     L58
  je     L96
L58:
  mov    0x28(%rsp),%rax
  movsd  (%rax,%rbx,8),%xmm2
  mov    $0x0,%eax
L109:
  movsd  (%r12,%rax,1),%xmm0
  subsd  0x0(%r13,%rax,1),%xmm0
  divsd  %xmm1,%xmm0
  mulsd  %xmm2,%xmm0
  addsd  (%rax,%r15,1),%xmm0
  movsd  %xmm0,(%rax,%r15,1)
  add    $0x8,%rax
  cmp    $0x18,%rax
  jne    L109
  jmp    L45
L120:
  mov    $0x0,%eax
  mov    0x38(%rsp),%rdx
L36:
  movsd  (%rax,%r15,1),%xmm0
  movsd  %xmm0,(%rdx,%rax,1)
  add    $0x8,%rax
  cmp    $0x18,%rax
  jne    L36
  addl   $0x1,0x4(%rsp)
  mov    0x4(%rsp),%eax
  addl   $0x3,0x34(%rsp)
  addq   $0x18,0x38(%rsp)
  cmp    %eax,0x30(%rsp)
  je     L26
L25:
  mov    $0x18,%edx
  mov    $0x0,%esi
  mov    %r15,%rdi
  call   <memset@plt>
  movslq 0x34(%rsp),%rax
  shl    $0x3,%rax
  lea    (%r14,%rax,1),%r13
  lea    0x8(%r14,%rax,1),%rcx
  mov    %rcx,0x18(%rsp)
  lea    0x10(%r14,%rax,1),%rax
  mov    %rax,0x20(%rsp)
  mov    0x30(%rsp),%eax
  mov    %rax,0x8(%rsp)
  mov    $0x0,%ebx
  jmp    L139
L26:
  mov    $0x0,%eax
  jmp    L81
L132:
  mov    $0x0,%eax
  jmp    L81
L96:
  mov    $0xffffffff,%eax
L81:
  mov    0x58(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L110
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L110:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D8
data_type: f64

tool: D8: 0

assistant: ```c
int nbodyC(double dx[], double x[], double mus[], int n) {
  double temp[3] = {0.0};
  double rnorm3;
  int j;
  int k;
  int i;
  for (j = 0; j < n; j++) {
    memset(temp, 0, sizeof(temp));
    for (k = 0; k < n; k++) {
      if (k == j) {
        continue;
      }
      rnorm3 = pow(pow(x[k * 3] - x[j * 3], 2.) + pow(x[k * 3 + 1] - x[j * 3 + 1], 2.) + pow(x[k * 3 + 2] - x[j * 3 + 2], 2.), 3. / 2.);
      if (rnorm3 == 0.0) {
        return -1;
      }
      for (i = 0; i < 3; i++) {
        temp[i] += (x[k * 3 + i] - x[j * 3 + i]) / rnorm3 * mus[k];
      }
    }
    for (i = 0; i < 3; i++) {
      dx[j * 3 + i] = temp[i];
    }
  }
  return 0;
}
```