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

```asm
<finite_sum_with_derivatives>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x118,%rsp
  mov    %rdi,-0xc8(%rbp)
  mov    %rsi,-0xd0(%rbp)
  mov    %rdx,-0xd8(%rbp)
  mov    %rcx,-0xe0(%rbp)
  mov    %r8,-0xe8(%rbp)
  mov    %r9,-0xf0(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0xf8(%rbp)
  mov    0x18(%rbp),%rax
  mov    %rax,-0x100(%rbp)
  mov    0x20(%rbp),%rax
  mov    %rax,-0x108(%rbp)
  mov    0x28(%rbp),%rax
  mov    %rax,-0x110(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  mov    0x38(%rbp),%edx
  movslq %edx,%rax
  sub    $0x1,%rax
  mov    %rax,-0xa0(%rbp)
  movslq %edx,%rax
  mov    %rax,-0x120(%rbp)
  movq   $0x0,-0x118(%rbp)
  movslq %edx,%rax
  mov    %rax,-0x130(%rbp)
  movq   $0x0,-0x128(%rbp)
  movslq %edx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L92:
  cmp    %rdx,%rsp
  je     L54
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L92
L54:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L24
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L24:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x98(%rbp)
  mov    0x38(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x90(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0x140(%rbp)
  movq   $0x0,-0x138(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L36:
  cmp    %rdx,%rsp
  je     L168
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L36
L168:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L98
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L98:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x88(%rbp)
  mov    0x38(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x80(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L100:
  cmp    %rdx,%rsp
  je     L11
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L100
L11:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L108
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L108:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x78(%rbp)
  movl   $0x0,-0xc0(%rbp)
  jmp    L135
L177:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  movl   $0x0,-0xbc(%rbp)
  jmp    L161
L35:
  mov    -0xc0(%rbp),%eax
  imul   0x38(%rbp),%eax
  mov    %eax,%edx
  mov    -0xbc(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0xbc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xf8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0xb8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb8(%rbp)
  addl   $0x1,-0xbc(%rbp)
L161:
  mov    -0xbc(%rbp),%eax
  cmp    0x38(%rbp),%eax
  jl     L35
  mov    -0x98(%rbp),%rax
  mov    -0xc0(%rbp),%edx
  movslq %edx,%rdx
  movsd  -0xb8(%rbp),%xmm0
  movsd  %xmm0,(%rax,%rdx,8)
  addl   $0x1,-0xc0(%rbp)
L135:
  mov    -0xc0(%rbp),%eax
  cmp    0x38(%rbp),%eax
  jl     L177
  movl   $0x0,-0xc0(%rbp)
  jmp    L55
L42:
  mov    -0x98(%rbp),%rax
  mov    -0xc0(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,8),%rax
  movq   %rax,%xmm0
  call   <round@plt>
  movq   %xmm0,%rax
  mov    -0x88(%rbp),%rdx
  mov    -0xc0(%rbp),%ecx
  movslq %ecx,%rcx
  mov    %rax,(%rdx,%rcx,8)
  mov    -0x98(%rbp),%rax
  mov    -0xc0(%rbp),%edx
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  mov    -0x88(%rbp),%rax
  mov    -0xc0(%rbp),%edx
  movslq %edx,%rdx
  movsd  (%rax,%rdx,8),%xmm1
  subsd  %xmm1,%xmm0
  mov    -0x78(%rbp),%rax
  mov    -0xc0(%rbp),%edx
  movslq %edx,%rdx
  movsd  %xmm0,(%rax,%rdx,8)
  addl   $0x1,-0xc0(%rbp)
L55:
  mov    -0xc0(%rbp),%eax
  cmp    0x38(%rbp),%eax
  jl     L42
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movl   $0x0,-0xc0(%rbp)
  jmp    L148
L142:
  mov    -0xc0(%rbp),%eax
  imul   0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x100(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x70(%rbp)
  mov    0x38(%rbp),%edi
  mov    -0x88(%rbp),%rcx
  mov    -0xf0(%rbp),%rdx
  mov    -0xd8(%rbp),%rsi
  mov    -0x70(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <exppart@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x68(%rbp)
  mov    0x38(%rbp),%ecx
  mov    -0x78(%rbp),%rdx
  mov    -0xe8(%rbp),%rsi
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  call   <normpart@plt>
  mov    %eax,%edi
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x60(%rbp)
  mov    -0x68(%rbp),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movsd  -0x60(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  mov    -0x68(%rbp),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movsd  -0x60(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  mov    -0x110(%rbp),%r9
  mov    -0x108(%rbp),%r8
  mov    -0x88(%rbp),%rcx
  mov    -0x70(%rbp),%rdx
  lea    -0x40(%rbp),%rsi
  lea    -0x48(%rbp),%rax
  mov    0x38(%rbp),%edi
  push   %rdi
  mov    0x30(%rbp),%edi
  push   %rdi
  mov    %rax,%rdi
  call   <deriv_prod@plt>
  add    $0x10,%rsp
  movsd  -0x48(%rbp),%xmm0
  mulsd  -0x58(%rbp),%xmm0
  movsd  -0x40(%rbp),%xmm1
  mulsd  -0x50(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  movsd  -0xb0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xb0(%rbp)
  movsd  -0x48(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x50(%rbp),%xmm1
  movsd  -0x40(%rbp),%xmm0
  mulsd  -0x58(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0xa8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  addl   $0x1,-0xc0(%rbp)
L148:
  mov    -0xc0(%rbp),%eax
  cmp    0x40(%rbp),%eax
  jl     L142
  mov    -0xc8(%rbp),%rax
  movsd  -0xb0(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0xd0(%rbp),%rax
  movsd  -0xa8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    %rbx,%rsp
  nop
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L3
  call   <__stack_chk_fail@plt>
L3:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

assistant: ```c
void finite_sum_with_derivatives(double *fsum_real, double *fsum_imag, double *X, double *Yinv, double *T, double *x, double *y, double *S, double *deriv_real, double *deriv_imag, int nderivs, int g, int N) {
  int k, j;
  double shift[g];
  double intshift[g];
  double fracshift[g];
  double sum;
  for (k = 0; k < g; k++) {
    sum = 0;
    for (j = 0; j < g; j++)
      sum += Yinv[k * g + j] * y[j];
    shift[k] = sum;
  }
  for (k = 0; k < g; k++) {
    intshift[k] = round(shift[k]);
    fracshift[k] = shift[k] - intshift[k];
  }
  double real_total = 0, imag_total = 0;
  double ept, npt, cpt, spt;
  double dpr[1];
  double dpi[1];
  double *n;
  dpr[0] = 0;
  dpi[0] = 0;
  for (k = 0; k < N; k++) {
    n = S + k * g;
    ept = exppart(n, X, x, intshift, g);
    npt = exp(normpart(n, T, fracshift, g));
    cpt = npt * cos(ept);
    spt = npt * sin(ept);
    deriv_prod(dpr, dpi, n, intshift, deriv_real, deriv_imag, nderivs, g);
    real_total += dpr[0] * cpt - dpi[0] * spt;
    imag_total += dpr[0] * spt + dpi[0] * cpt;
  }
  fsum_real[0] = real_total;
  fsum_imag[0] = imag_total;
}
```