user: 请将以下的汇编代码转换成C语言代码：

```asm
<contr_nuc_attr>:
  endbr64
  push   %r15
  mov    %edi,%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xa8,%rsp
  movsd  %xmm0,0x88(%rsp)
  test   %edi,%edi
  jle    L39
  sub    $0x1,%eax
  mov    %rdx,%rbp
  mov    %rcx,0x78(%rsp)
  movapd %xmm4,%xmm6
  lea    0x8(%rdx,%rax,8),%rax
  mov    %rsi,0x58(%rsp)
  pxor   %xmm4,%xmm4
  mov    0xf8(%rsp),%rdx
  mov    %rax,0x98(%rsp)
  mov    0xe8(%rsp),%eax
  movapd %xmm5,%xmm7
  movapd %xmm3,%xmm5
  mov    0x128(%rsp),%rcx
  mov    0xe0(%rsp),%rsi
  mov    %r9,0x68(%rsp)
  sub    $0x1,%eax
  mov    %r8,0x70(%rsp)
  lea    0x8(%rdx,%rax,8),%rax
  mov    %rsi,0x60(%rsp)
  mov    %rax,0x90(%rsp)
  mov    0x120(%rsp),%eax
  movsd  %xmm4,0x8(%rsp)
  sub    $0x1,%eax
  lea    0x4(%rcx,%rax,4),%rax
  mov    %rax,0x80(%rsp)
L59:
  mov    0xe8(%rsp),%eax
  test   %eax,%eax
  jle    L6
  mov    0xf0(%rsp),%rax
  mov    0x108(%rsp),%r15
  mov    0x100(%rsp),%r13
  mov    0xf8(%rsp),%r14
  mov    %rax,0x40(%rsp)
  mov    0x118(%rsp),%rax
  mov    %rax,0x48(%rsp)
  mov    0x110(%rsp),%rax
  mov    %rax,0x50(%rsp)
  xchg   %ax,%ax
L18:
  mov    0x120(%rsp),%edx
  mov    0x130(%rsp),%r12
  mov    0x128(%rsp),%rbx
  test   %edx,%edx
  jle    L41
  nop
L42:
  movsd  0x0(%rbp),%xmm0
  pxor   %xmm3,%xmm3
  sub    $0x8,%rsp
  mov    (%r15),%ecx
  cvtsi2sdl (%rbx),%xmm3
  mov    (%r12),%rax
  add    $0x4,%rbx
  add    $0x8,%r12
  mulsd  (%r14),%xmm0
  mulsd  %xmm3,%xmm0
  movsd  %xmm0,0x18(%rsp)
  push   0x10(%rax)
  push   0x8(%rax)
  push   (%rax)
  mov    0x60(%rsp),%rax
  push   (%rax)
  push   0x0(%r13)
  mov    0x78(%rsp),%rax
  mov    (%rax),%r9d
  mov    0x80(%rsp),%rax
  movsd  %xmm7,0x68(%rsp)
  movsd  %xmm6,0x60(%rsp)
  mov    (%rax),%r8d
  mov    0x88(%rsp),%rax
  movsd  %xmm5,0x58(%rsp)
  movsd  (%rax),%xmm4
  mov    0x90(%rsp),%rax
  mov    (%rax),%edx
  mov    0x98(%rsp),%rax
  mov    (%rax),%esi
  mov    0xa0(%rsp),%rax
  mov    (%rax),%edi
  mov    0xa8(%rsp),%rax
  movsd  %xmm2,0x50(%rsp)
  movsd  0xb8(%rsp),%xmm0
  movsd  %xmm1,0x48(%rsp)
  movsd  (%rax),%xmm3
  call   <nuclear_attraction@plt>
  mulsd  0x40(%rsp),%xmm0
  addsd  0x38(%rsp),%xmm0
  movsd  %xmm0,0x38(%rsp)
  add    $0x30,%rsp
  movsd  0x18(%rsp),%xmm1
  movsd  0x20(%rsp),%xmm2
  cmp    %rbx,0x80(%rsp)
  movsd  0x28(%rsp),%xmm5
  movsd  0x30(%rsp),%xmm6
  movsd  0x38(%rsp),%xmm7
  jne    L42
L41:
  addq   $0x8,0x40(%rsp)
  add    $0x8,%r14
  add    $0x4,%r15
  add    $0x8,%r13
  addq   $0x4,0x48(%rsp)
  addq   $0x4,0x50(%rsp)
  cmp    0x90(%rsp),%r14
  jne    L18
L6:
  addq   $0x8,0x58(%rsp)
  add    $0x8,%rbp
  addq   $0x4,0x60(%rsp)
  addq   $0x4,0x68(%rsp)
  addq   $0x4,0x70(%rsp)
  addq   $0x8,0x78(%rsp)
  cmp    0x98(%rsp),%rbp
  jne    L59
L1:
  movsd  0x8(%rsp),%xmm0
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L39:
  pxor   %xmm4,%xmm4
  movsd  %xmm4,0x8(%rsp)
  jmp    L1
```

assistant: ```c
double contr_nuc_attr(int lena, double *aexps, double *acoefs, double *anorms, double xa, double ya, double za, int *la, int *ma, int *na, int lenb, double *bexps, double *bcoefs, double *bnorms, double xb, double yb, double zb, int *lb, int *mb, int *nb, int natoms, int *qn, double **xyzn) {
  double val = 0.0;
  int i, j, c;
  for (i = 0; i < lena; ++i) {
    for (j = 0; j < lenb; ++j) {
      for (c = 0; c < natoms; ++c) {
        val += acoefs[i] * bcoefs[j] * qn[c] * nuclear_attraction(xa, ya, za, anorms[i], la[i], ma[i], na[i], aexps[i], xb, yb, zb, bnorms[j], lb[j], mb[j], nb[j], bexps[j], xyzn[c][0], xyzn[c][1], xyzn[c][2]);
      }
    }
  }
  return val;
}
```