user: 提供的汇编代码用C语言表示会是什么样子：

```asm
<ff_dm_quad>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xa0,%rsp
  mov    %edi,-0x54(%rbp)
  mov    %rsi,-0x60(%rbp)
  mov    %rdx,-0x68(%rbp)
  mov    %rcx,-0x70(%rbp)
  movsd  %xmm0,-0x78(%rbp)
  mov    %r8,-0x80(%rbp)
  mov    %r9,-0x88(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x90(%rbp)
  mov    0x18(%rbp),%rax
  mov    %rax,-0x98(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movl   $0x0,-0x50(%rbp)
  jmp    L56
L49:
  movl   $0x0,-0x4c(%rbp)
  jmp    L21
L6:
  mov    -0x50(%rbp),%eax
  imul   -0x54(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    -0x50(%rbp),%eax
  imul   -0x54(%rbp),%eax
  mov    %eax,%edx
  mov    -0x4c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movsd  -0x40(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L60
  mov    -0x4c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  lea    (%rdx,%rax,1),%rsi
  mov    -0x50(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  lea    (%rdx,%rax,1),%rdi
  mov    -0x90(%rbp),%r8
  mov    -0x88(%rbp),%rcx
  mov    -0x80(%rbp),%rdx
  lea    -0x20(%rbp),%rax
  mov    %r8,%r9
  mov    %rcx,%r8
  mov    %rdx,%rcx
  mov    %rax,%rdx
  call   <calc_delta@plt>
  movsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x30(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x30(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x30(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x28(%rbp)
  movsd  -0x28(%rbp),%xmm0
  subsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movsd  -0x78(%rbp),%xmm0
  mulsd  -0x38(%rbp),%xmm0
  mulsd  -0x30(%rbp),%xmm0
  mulsd  -0x30(%rbp),%xmm0
  movsd  -0x48(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  cmpq   $0x0,-0x98(%rbp)
  je     L60
  movsd  -0x78(%rbp),%xmm0
  addsd  %xmm0,%xmm0
  mulsd  -0x38(%rbp),%xmm0
  mulsd  -0x30(%rbp),%xmm0
  divsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x98(%rbp),%rcx
  lea    -0x20(%rbp),%rdx
  mov    -0x30(%rbp),%rdi
  mov    -0x4c(%rbp),%esi
  mov    -0x50(%rbp),%eax
  movq   %rdi,%xmm0
  mov    %eax,%edi
  call   <add_grad@plt>
L60:
  addl   $0x1,-0x4c(%rbp)
L21:
  mov    -0x4c(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L6
  addl   $0x1,-0x50(%rbp)
L56:
  mov    -0x50(%rbp),%eax
  cmp    -0x54(%rbp),%eax
  jl     L49
  movsd  -0x48(%rbp),%xmm0
  movq   %xmm0,%rax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L30
  call   <__stack_chk_fail@plt>
L30:
  movq   %rax,%xmm0
  leave
  ret
```

assistant: ```c
double ff_dm_quad(int n, double *cor, double *dm0, double *dmk, double amp, double *unitcell, double *unitcell_reciproke, int *unitcell_active, double *gradient) {
  int i, j;
  double d, d0, k, tmp, result;
  double delta[3];
  result = 0.0;
  for (i = 0; i < n; i++) {
    for (j = 0; j < i; j++) {
      d0 = dm0[i * n + j];
      k = dmk[i * n + j];
      if (d0 > 0) {
        calc_delta(cor + 3 * i, cor + 3 * j, delta, unitcell, unitcell_reciproke, unitcell_active);
        tmp = delta[0];
        d = tmp * tmp;
        tmp = delta[1];
        d += tmp * tmp;
        tmp = delta[2];
        d += tmp * tmp;
        d = sqrt(d);
        tmp = (d - d0);
        result += amp * k * tmp * tmp;
        if (gradient != NULL) {
          tmp = 2 * amp * k * tmp / d;
          add_grad(i, j, tmp, delta, gradient);
        }
      }
    }
  }
  return result;
}
```