user: What is the c source code of the assembly code below:

```asm
<get_derivative_nac>:
  endbr64
  push   %r15
  mov    %rcx,%rax
  mov    %r9,%rcx
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x118,%rsp
  movsd  0x40(%rax),%xmm5
  movsd  0x20(%rax),%xmm8
  movsd  0x28(%rax),%xmm9
  movsd  0x38(%rax),%xmm10
  movsd  %xmm0,0x20(%rsp)
  lea    0xa0(%rsp),%r13
  movapd %xmm8,%xmm0
  movsd  0x30(%rax),%xmm4
  movsd  0x18(%rax),%xmm7
  mov    %rdi,0x70(%rsp)
  movapd %xmm9,%xmm1
  movapd %xmm9,%xmm12
  movapd %xmm10,%xmm11
  movsd  (%rax),%xmm2
  mulsd  %xmm10,%xmm1
  movsd  0x8(%rax),%xmm6
  movsd  0x10(%rax),%xmm3
  mov    %edx,0x9c(%rsp)
  mulsd  %xmm5,%xmm0
  mov    0x158(%rsp),%rdi
  mov    %r8,0x90(%rsp)
  mov    %r13,%r8
  mulsd  %xmm4,%xmm12
  movapd %xmm6,%xmm13
  mov    %rsi,0x58(%rsp)
  mov    0x150(%rsp),%r14
  mulsd  %xmm7,%xmm11
  mov    %rdi,0x40(%rsp)
  mov    0x160(%rsp),%rdx
  xor    %edi,%edi
  mov    %fs:0x28,%rsi
  mov    %rsi,0x108(%rsp)
  xor    %esi,%esi
  subsd  %xmm1,%xmm0
  movapd %xmm5,%xmm1
  lea    0xc0(%rsp),%rsi
  mulsd  %xmm7,%xmm1
  subsd  %xmm1,%xmm12
  movapd %xmm8,%xmm1
  mulsd  %xmm4,%xmm1
  mulsd  %xmm12,%xmm13
  subsd  %xmm1,%xmm11
  movapd %xmm2,%xmm1
  mulsd  %xmm0,%xmm1
  addsd  %xmm13,%xmm1
  movapd %xmm3,%xmm13
  mulsd  %xmm11,%xmm13
  addsd  %xmm13,%xmm1
  divsd  %xmm1,%xmm12
  divsd  %xmm1,%xmm11
  movsd  %xmm12,0xc8(%rsp)
  movapd %xmm5,%xmm12
  mulsd  %xmm6,%xmm12
  mulsd  %xmm2,%xmm5
  divsd  %xmm1,%xmm0
  movsd  %xmm11,0xd0(%rsp)
  movapd %xmm10,%xmm11
  mulsd  %xmm3,%xmm11
  mulsd  %xmm2,%xmm10
  subsd  %xmm12,%xmm11
  divsd  %xmm1,%xmm11
  movsd  %xmm0,0xc0(%rsp)
  movsd  %xmm11,0xd8(%rsp)
  movapd %xmm4,%xmm11
  mulsd  %xmm3,%xmm11
  mulsd  %xmm6,%xmm4
  subsd  %xmm11,%xmm5
  subsd  %xmm10,%xmm4
  divsd  %xmm1,%xmm5
  divsd  %xmm1,%xmm4
  movsd  %xmm5,0xe0(%rsp)
  movapd %xmm8,%xmm5
  mulsd  %xmm3,%xmm5
  mulsd  %xmm7,%xmm3
  movsd  %xmm4,0xe8(%rsp)
  movapd %xmm9,%xmm4
  movq   $0x0,0xb0(%rsp)
  mulsd  %xmm6,%xmm4
  mulsd  %xmm2,%xmm9
  mulsd  %xmm7,%xmm6
  mulsd  %xmm8,%xmm2
  subsd  %xmm5,%xmm4
  subsd  %xmm9,%xmm3
  subsd  %xmm6,%xmm2
  divsd  %xmm1,%xmm4
  divsd  %xmm1,%xmm3
  movsd  %xmm4,0xf0(%rsp)
  divsd  %xmm1,%xmm2
  pxor   %xmm1,%xmm1
  movaps %xmm1,0xa0(%rsp)
  movsd  %xmm3,0xf8(%rsp)
  movsd  %xmm2,0x100(%rsp)
L67:
  xor    %eax,%eax
  pxor   %xmm1,%xmm1
  test   %rdx,%rdx
  je     L140
L130:
  mulsd  (%rdx,%rax,1),%xmm0
  add    $0x8,%rax
  addsd  %xmm0,%xmm1
  cmp    $0x18,%rax
  je     L20
L136:
  movsd  (%rsi,%rax,1),%xmm0
  test   %rdx,%rdx
  jne    L130
L140:
  mulsd  (%rcx,%rax,1),%xmm0
  add    $0x8,%rax
  addsd  %xmm0,%xmm1
  cmp    $0x18,%rax
  jne    L136
L20:
  add    $0x3,%edi
  movsd  %xmm1,(%r8)
  add    $0x18,%rsi
  add    $0x8,%r8
  cmp    $0x9,%edi
  je     L116
  movsd  (%rsi),%xmm0
  jmp    L67
L116:
  mov    0x40(%rsp),%rsi
  mov    %r13,%rdi
  call   <get_C@plt>
  mov    0x9c(%rsp),%eax
  movsd  %xmm0,0x38(%rsp)
  test   %eax,%eax
  jle    L10
  movslq %eax,%rcx
  imul   %eax,%eax
  mov    %r14,%r15
  mov    %r13,%r14
  mov    %rcx,0x88(%rsp)
  movl   $0x0,0x98(%rsp)
  movq   $0x0,0x80(%rsp)
  lea    (%rax,%rax,8),%eax
  mov    %eax,0x78(%rsp)
L3:
  movq   $0x0,0x68(%rsp)
  mov    0x80(%rsp),%eax
  mov    %eax,0x60(%rsp)
  mov    0x98(%rsp),%eax
  lea    (%rax,%rax,8),%eax
  mov    %eax,0x7c(%rsp)
  nopl   0x0(%rax)
L56:
  mov    0x68(%rsp),%rdi
  mov    0x90(%rsp),%rax
  pxor   %xmm5,%xmm5
  mov    0x80(%rsp),%rcx
  mov    %edi,%r13d
  movsd  (%rax,%rcx,8),%xmm0
  mulsd  (%rax,%rdi,8),%xmm0
  ucomisd %xmm0,%xmm5
  ja     L128
  sqrtsd %xmm0,%xmm0
L43:
  mulsd  0x38(%rsp),%xmm0
  mov    0x7c(%rsp),%eax
  movl   $0x0,0x54(%rsp)
  xor    %ebx,%ebx
  mov    %eax,0x64(%rsp)
  movsd  %xmm0,0x18(%rsp)
L103:
  movslq 0x64(%rsp),%rax
  mov    0x70(%rsp),%rcx
  xor    %ebp,%ebp
  mov    %rax,%rdi
  lea    (%rcx,%rax,8),%rax
  mov    %rax,0x10(%rsp)
  mov    %edi,0x4c(%rsp)
L14:
  mov    0x60(%rsp),%r12d
  mov    %r15,%rcx
  mov    %r14,%rdx
  mov    %ebp,%esi
  mov    %r12d,%edi
  call   <get_A@plt>
  mov    %r15,%rcx
  mov    %r12d,%edi
  mov    %ebx,%edx
  mov    %ebp,%esi
  movsd  %xmm0,0x28(%rsp)
  xor    %r12d,%r12d
  call   <get_dA@plt>
  mov    0x54(%rsp),%eax
  mov    %ebp,0x48(%rsp)
  add    0x4c(%rsp),%eax
  movsd  %xmm0,0x30(%rsp)
  mov    %eax,0x50(%rsp)
  mov    %r14,%rax
  mov    %r12,%r14
  mov    %r15,%r12
  mov    %r13d,%r15d
  mov    %rax,%r13
L133:
  mov    %r14d,%esi
  mov    %r12,%rcx
  mov    %r13,%rdx
  mov    %r15d,%edi
  call   <get_A@plt>
  mov    %r12,%rcx
  mov    %ebx,%edx
  mov    %r14d,%esi
  mov    %r15d,%edi
  movsd  %xmm0,0x8(%rsp)
  call   <get_dA@plt>
  mov    0x40(%rsp),%r8
  mov    0x48(%rsp),%edi
  mov    %ebx,%edx
  mov    %r13,%rcx
  mov    %r14d,%esi
  movsd  %xmm0,(%rsp)
  call   <get_dC@plt>
  movsd  0x28(%rsp),%xmm7
  movsd  0x8(%rsp),%xmm1
  movsd  (%rsp),%xmm2
  mov    0x10(%rsp),%rax
  movapd %xmm7,%xmm3
  mulsd  %xmm1,%xmm3
  mulsd  %xmm7,%xmm2
  mulsd  0x30(%rsp),%xmm1
  mulsd  %xmm3,%xmm0
  divsd  0x38(%rsp),%xmm0
  addsd  %xmm2,%xmm1
  subsd  %xmm0,%xmm1
  divsd  0x18(%rsp),%xmm1
  mulsd  0x20(%rsp),%xmm1
  movsd  %xmm1,(%rax,%r14,8)
  test   %ebx,%ebx
  jne    L57
  divsd  0x18(%rsp),%xmm3
  mulsd  0x20(%rsp),%xmm3
  mov    0x50(%rsp),%eax
  lea    (%rax,%r14,1),%edx
  mov    0x58(%rsp),%rax
  movslq %edx,%rdx
  movsd  %xmm3,(%rax,%rdx,8)
L57:
  add    $0x1,%r14
  cmp    $0x3,%r14
  jne    L133
  mov    0x48(%rsp),%ebp
  mov    %r13,%r14
  mov    %r15d,%r13d
  addl   $0x3,0x4c(%rsp)
  addq   $0x18,0x10(%rsp)
  mov    %r12,%r15
  add    $0x1,%ebp
  cmp    $0x3,%ebp
  jne    L14
  add    $0x1,%ebx
  mov    0x78(%rsp),%ecx
  add    %ecx,0x64(%rsp)
  sub    %ecx,0x54(%rsp)
  cmp    $0x3,%ebx
  jne    L103
  addq   $0x1,0x68(%rsp)
  mov    0x68(%rsp),%rax
  addl   $0x9,0x7c(%rsp)
  cmp    %rax,0x88(%rsp)
  jne    L56
  addq   $0x1,0x80(%rsp)
  mov    0x9c(%rsp),%edi
  mov    0x80(%rsp),%rax
  add    %edi,0x98(%rsp)
  cmp    %rax,0x88(%rsp)
  jne    L3
L10:
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L49
  add    $0x118,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L128:
  call   <sqrt@plt>
  jmp    L43
L49:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void get_derivative_nac(double *ddnac, double *dnac, const int num_patom, const double *lattice, const double *mass, const double *q, const double *born, const double *dielectric, const double *q_direction, const double factor) {
  int i, j, k, l, m;
  double a, b, c, da, db, dc, volume, mass_sqrt;
  double q_cart[3], rec_lat[9];
  volume = lattice[0] * (lattice[4] * lattice[8] - lattice[5] * lattice[7]) + lattice[1] * (lattice[5] * lattice[6] - lattice[3] * lattice[8]) + lattice[2] * (lattice[3] * lattice[7] - lattice[4] * lattice[6]);
  rec_lat[0] = (lattice[4] * lattice[8] - lattice[5] * lattice[7]) / volume;
  rec_lat[1] = (lattice[5] * lattice[6] - lattice[3] * lattice[8]) / volume;
  rec_lat[2] = (lattice[3] * lattice[7] - lattice[4] * lattice[6]) / volume;
  rec_lat[3] = (lattice[7] * lattice[2] - lattice[8] * lattice[1]) / volume;
  rec_lat[4] = (lattice[8] * lattice[0] - lattice[6] * lattice[2]) / volume;
  rec_lat[5] = (lattice[6] * lattice[1] - lattice[7] * lattice[0]) / volume;
  rec_lat[6] = (lattice[1] * lattice[5] - lattice[2] * lattice[4]) / volume;
  rec_lat[7] = (lattice[2] * lattice[3] - lattice[0] * lattice[5]) / volume;
  rec_lat[8] = (lattice[0] * lattice[4] - lattice[1] * lattice[3]) / volume;
  for (i = 0; i < 3; i++) {
    q_cart[i] = 0;
    for (j = 0; j < 3; j++) {
      if (q_direction) {
        q_cart[i] += rec_lat[i * 3 + j] * q_direction[j];
      } else {
        q_cart[i] += rec_lat[i * 3 + j] * q[j];
      }
    }
  }
  c = get_C(q_cart, dielectric);
  for (i = 0; i < num_patom; i++) {
    for (j = 0; j < num_patom; j++) {
      mass_sqrt = sqrt(mass[i] * mass[j]);
      for (k = 0; k < 3; k++) {
        for (l = 0; l < 3; l++) {
          a = get_A(i, l, q_cart, born);
          da = get_dA(i, l, k, born);
          for (m = 0; m < 3; m++) {
            b = get_A(j, m, q_cart, born);
            db = get_dA(j, m, k, born);
            dc = get_dC(l, m, k, q_cart, dielectric);
            ddnac[k * num_patom * num_patom * 9 + i * 9 * num_patom + j * 9 + l * 3 + m] = (da * b + db * a - a * b * dc / c) / (c * mass_sqrt) * factor;
            if (k == 0) {
              dnac[i * 9 * num_patom + j * 9 + l * 3 + m] = a * b / (c * mass_sqrt) * factor;
            }
          }
        }
      }
    }
  }
}
```