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

```asm
<grid_abs_squared>:
  endbr64
  push   %rbp
  movapd %xmm0,%xmm2
  mov    %esi,%r10d
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  mov    %edi,%ebx
  sub    $0xb8,%rsp
  movsd  D5(%rip),%xmm0
  mov    %edi,-0xa4(%rbp)
  mov    %esi,-0x98(%rbp)
  mov    %r8,%rsi
  mov    %rsp,%r8
  mov    0x10(%rbp),%rdi
  movapd %xmm0,%xmm5
  mov    %rdx,-0xc0(%rbp)
  mov    %ecx,%edx
  mov    %r9,%rcx
  divsd  %xmm2,%xmm5
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %r10d,%eax
  shl    $0x3,%rax
  mov    %rax,-0xb0(%rbp)
  mov    %ebx,%eax
  shr    %ebx
  lea    0xf(,%rax,8),%rax
  mov    %ebx,-0x9c(%rbp)
  shr    $0x4,%rax
  shl    $0x4,%rax
  mov    %rax,%r9
  and    $0xfffffffffffff000,%r9
  sub    %r9,%r8
  divsd  %xmm1,%xmm0
  movsd  %xmm5,-0x48(%rbp)
  movsd  %xmm0,-0x50(%rbp)
  cmp    %r8,%rsp
  je     L110
L20:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %r8,%rsp
  jne    L20
L110:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L191
L95:
  mov    -0x9c(%rbp),%ebx
  mov    -0xa4(%rbp),%r10d
  mov    %rsp,%r8
  mov    %r8,-0xc8(%rbp)
  mov    %ebx,%eax
  mov    %r10d,%r9d
  neg    %eax
  sub    %ebx,%r9d
  test   %r10d,%r10d
  je     L109
  cs nopw 0x0(%rax,%rax,1)
L285:
  pxor   %xmm0,%xmm0
  add    $0x8,%r8
  cvtsi2sd %eax,%xmm0
  add    $0x1,%eax
  mulsd  %xmm2,%xmm0
  movsd  %xmm0,-0x8(%r8)
  cmp    %r9d,%eax
  jne    L285
L109:
  mov    -0x98(%rbp),%eax
  mov    %rsp,%r8
  shr    %eax
  mov    %eax,-0xa0(%rbp)
  mov    -0xb0(%rbp),%rax
  add    $0xf,%rax
  shr    $0x4,%rax
  shl    $0x4,%rax
  mov    %rax,%r9
  and    $0xfffffffffffff000,%r9
  sub    %r9,%r8
  cmp    %r8,%rsp
  je     L33
L194:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %r8,%rsp
  jne    L194
L33:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L305
L248:
  mov    -0xa0(%rbp),%ebx
  mov    -0x98(%rbp),%r10d
  mov    %rsp,%r8
  mov    %r8,-0xd0(%rbp)
  mov    %ebx,%eax
  mov    %r10d,%r9d
  neg    %eax
  sub    %ebx,%r9d
  test   %r10d,%r10d
  je     L158
L177:
  pxor   %xmm0,%xmm0
  add    $0x8,%r8
  cvtsi2sd %eax,%xmm0
  add    $0x1,%eax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%r8)
  cmp    %r9d,%eax
  jne    L177
L158:
  mov    0x18(%rbp),%eax
  mov    %rsp,%r9
  lea    0x1(%rax,%rax,1),%eax
  lea    0xf(,%rax,8),%rax
  mov    %rax,%r8
  shr    $0x4,%r8
  shl    $0x4,%r8
  mov    %r8,%r10
  and    $0xfffffffffffff000,%r10
  sub    %r10,%r9
  cmp    %r9,%rsp
  je     L308
L251:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %r9,%rsp
  jne    L251
L308:
  and    $0xfff,%r8d
  sub    %r8,%rsp
  test   %r8,%r8
  jne    L316
L287:
  shr    $0x4,%rax
  mov    %rsp,%r8
  mov    %rsp,-0x70(%rbp)
  shl    $0x4,%rax
  mov    %rax,%r9
  and    $0xfffffffffffff000,%r9
  sub    %r9,%r8
  cmp    %r8,%rsp
  je     L341
L210:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %r8,%rsp
  jne    L210
L341:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L219
L222:
  mov    %rsp,-0x88(%rbp)
  test   %edx,%edx
  je     L77
  mov    0x18(%rbp),%eax
  mov    %rcx,-0x58(%rbp)
  mov    %rsi,%r13
  mov    %rdi,-0x60(%rbp)
  add    $0x1,%eax
  mov    %eax,-0xa8(%rbp)
  lea    -0x1(%rdx),%eax
  lea    0x8(%rcx,%rax,8),%rax
  mov    %rax,-0xb8(%rbp)
  mov    -0x88(%rbp),%rax
  add    $0x8,%rax
  mov    %rax,-0xd8(%rbp)
  nopl   0x0(%rax,%rax,1)
L281:
  mov    -0x58(%rbp),%r11
  movsd  -0x48(%rbp),%xmm0
  mov    $0x0,%esi
  mov    -0x60(%rbp),%rcx
  mov    -0xa8(%rbp),%edx
  movsd  (%r11),%xmm1
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  movsd  -0x50(%rbp),%xmm0
  mulsd  (%rcx),%xmm0
  add    -0x9c(%rbp),%eax
  mov    %eax,%edi
  cvttsd2si %xmm0,%ecx
  add    -0xa0(%rbp),%ecx
  sub    0x18(%rbp),%edi
  cmovns %edi,%esi
  add    %edx,%eax
  mov    $0x0,%edi
  mov    %ecx,%r12d
  cmovns %eax,%edi
  mov    -0xa4(%rbp),%eax
  lea    (%rcx,%rdx,1),%ebx
  cmp    %eax,%esi
  cmova  %eax,%esi
  cmp    %eax,%edi
  cmova  %eax,%edi
  mov    $0x0,%eax
  sub    0x18(%rbp),%r12d
  cmovs  %eax,%r12d
  test   %ebx,%ebx
  mov    %esi,-0x68(%rbp)
  cmovs  %eax,%ebx
  mov    -0x98(%rbp),%eax
  mov    %edi,-0x64(%rbp)
  cmp    %eax,%r12d
  cmova  %eax,%r12d
  cmp    %eax,%ebx
  cmova  %eax,%ebx
  cmp    %esi,%edi
  jle    L186
  mov    -0xc8(%rbp),%rcx
  movslq %esi,%rax
  sub    %esi,%edi
  mov    %ebx,-0x90(%rbp)
  mov    %rax,-0x80(%rbp)
  sub    $0x1,%edi
  lea    (%rcx,%rax,8),%r15
  mov    -0x70(%rbp),%rax
  mov    %r12d,-0x94(%rbp)
  mov    %r15,%r12
  mov    %r11,%r15
  mov    %rax,%r14
  add    $0x8,%rax
  mov    %rax,-0x78(%rbp)
  lea    (%rax,%rdi,8),%rax
  mov    %r14,%rbx
  mov    %rax,%r14
  jmp    L46
  nopl   (%rax)
L188:
  movsd  (%r15),%xmm1
L46:
  movsd  (%r12),%xmm0
  add    $0x8,%rbx
  add    $0x8,%r12
  subsd  %xmm1,%xmm0
  mulsd  -0x48(%rbp),%xmm0
  call   <sinc@plt>
  mulsd  -0x48(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x8(%rbx)
  cmp    %rbx,%r14
  jne    L188
  mov    -0x90(%rbp),%ebx
  mov    -0x94(%rbp),%r12d
  cmp    %r12d,%ebx
  jle    L28
L76:
  mov    -0xd0(%rbp),%rcx
  movslq %r12d,%rax
  mov    %ebx,%edx
  mov    %ebx,-0x78(%rbp)
  mov    -0x88(%rbp),%r14
  sub    %r12d,%edx
  mov    %rax,-0x90(%rbp)
  lea    (%rcx,%rax,8),%r15
  mov    -0xd8(%rbp),%rax
  sub    $0x1,%edx
  mov    %r12d,-0x80(%rbp)
  mov    %r14,%rbx
  mov    -0x60(%rbp),%r14
  mov    %r15,%r12
  lea    (%rax,%rdx,8),%rax
  mov    %rax,%r15
  nopl   (%rax)
L171:
  movsd  (%r12),%xmm0
  subsd  (%r14),%xmm0
  add    $0x8,%rbx
  add    $0x8,%r12
  mulsd  -0x50(%rbp),%xmm0
  call   <sinc@plt>
  mulsd  -0x50(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x8(%rbx)
  cmp    %rbx,%r15
  jne    L171
  mov    -0x78(%rbp),%ebx
  mov    -0x80(%rbp),%r12d
  movslq -0x68(%rbp),%rax
  cmp    %eax,-0x64(%rbp)
  jle    L196
  mov    %rax,-0x80(%rbp)
  mov    -0x70(%rbp),%rax
  add    $0x8,%rax
  mov    %rax,-0x78(%rbp)
L17:
  mov    -0x80(%rbp),%rax
  mov    -0xb0(%rbp),%rcx
  mov    -0xc0(%rbp),%rsi
  mov    -0x88(%rbp),%rdi
  imul   %rcx,%rax
  mov    -0x70(%rbp),%r8
  lea    (%rsi,%rax,1),%rdx
  mov    -0x78(%rbp),%rsi
  mov    -0x64(%rbp),%eax
  sub    -0x68(%rbp),%eax
  sub    $0x1,%eax
  lea    (%rsi,%rax,8),%r9
  mov    -0x90(%rbp),%rsi
  mov    %rsi,%rax
  neg    %rax
  lea    (%rdi,%rax,8),%rdi
  nopl   0x0(%rax,%rax,1)
L174:
  cmp    %r12d,%ebx
  jle    L296
  movsd  (%r8),%xmm1
  mov    %rsi,%rax
  nopl   (%rax)
L346:
  movsd  (%rdi,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  mulsd  0x0(%r13),%xmm0
  addsd  (%rdx,%rax,8),%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%ebx
  jg     L346
L296:
  add    $0x8,%r8
  add    %rcx,%rdx
  cmp    %r8,%r9
  jne    L174
L196:
  addq   $0x8,-0x58(%rbp)
  add    $0x8,%r13
  mov    -0x58(%rbp),%rax
  addq   $0x8,-0x60(%rbp)
  cmp    %rax,-0xb8(%rbp)
  jne    L281
L77:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L342
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L316:
  orq    $0x0,-0x8(%rsp,%r8,1)
  jmp    L287
L305:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L248
L191:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L95
L186:
  cmp    %r12d,%ebx
  jg     L76
  jmp    L196
L28:
  movslq %r12d,%rax
  mov    %rax,-0x90(%rbp)
  jmp    L17
L219:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L222
L342:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D5
type_guessed: f64

tool: D5: 1

assistant: ```c
void grid_abs_squared(unsigned int Nk, unsigned int Nq, double grid[Nk][Nq], double vk, double vq, unsigned int Nuv, double inpoints[Nuv], double u[Nuv], double v[Nuv], unsigned int precision) {
  int i;
  int j;
  int l;
  double vk_inv = 1. / vk;
  double vq_inv = 1. / vq;
  int shift_k = Nk / 2;
  double pos_k[Nk];
  for (i = 0; i < Nk; i++)
    pos_k[i] = (i - shift_k) * vk;
  int shift_q = Nq / 2;
  double pos_q[Nq];
  for (i = 0; i < Nq; i++)
    pos_q[i] = (i - shift_q) * vq;
  int ind_k;
  int ind_q;
  int max_ind_k;
  int max_ind_q;
  int min_ind_k;
  int min_ind_q;
  double tempdouble;
  double temp_k[precision * 2 + 1];
  double temp_q[precision * 2 + 1];
  for (i = 0; i < Nuv; i++) {
    ind_k = (int)(u[i] * vk_inv);
    ind_k += Nk / 2;
    ind_q = (int)(v[i] * vq_inv);
    ind_q += Nq / 2;
    min_ind_k = ind_k - precision;
    max_ind_k = ind_k + precision + 1;
    if (min_ind_k < 0)
      min_ind_k = 0;
    if (max_ind_k < 0)
      max_ind_k = 0;
    if (min_ind_k > Nk)
      min_ind_k = Nk;
    if (max_ind_k > Nk)
      max_ind_k = Nk;
    min_ind_q = ind_q - precision;
    max_ind_q = ind_q + precision + 1;
    if (min_ind_q < 0)
      min_ind_q = 0;
    if (max_ind_q < 0)
      max_ind_q = 0;
    if (min_ind_q > Nq)
      min_ind_q = Nq;
    if (max_ind_q > Nq)
      max_ind_q = Nq;
    for (j = min_ind_k; j < max_ind_k; j++) {
      tempdouble = vk_inv * sinc((pos_k[j] - u[i]) * vk_inv);
      temp_k[j - min_ind_k] = tempdouble * tempdouble;
    }
    for (l = min_ind_q; l < max_ind_q; l++) {
      tempdouble = vq_inv * sinc((pos_q[l] - v[i]) * vq_inv);
      temp_q[l - min_ind_q] = tempdouble * tempdouble;
    }
    for (j = min_ind_k; j < max_ind_k; j++) {
      for (l = min_ind_q; l < max_ind_q; l++) {
        grid[j][l] += temp_k[j - min_ind_k] * temp_q[l - min_ind_q] * inpoints[i];
      }
    }
  }
}
```