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

```asm
<quikgray>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %ecx,%r13d
  mov    %edx,%ecx
  push   %r12
  imul   %esi,%ecx
  mov    %esi,%r12d
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  movdqa D3(%rip),%xmm0
  mov    %edx,0x1c(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  movaps %xmm0,0x30(%rsp)
  movdqa D20(%rip),%xmm0
  movl   $0x1,0x2c(%rsp)
  movaps %xmm0,0x40(%rsp)
  test   %ecx,%ecx
  jle    L60
  lea    -0x1(%rcx),%edx
  pxor   %xmm0,%xmm0
  movss  D66(%rip),%xmm3
  mov    %rdi,%rax
  lea    0x4(%rdi,%rdx,4),%rdx
  movaps %xmm0,%xmm2
  nopl   0x0(%rax,%rax,1)
L109:
  movss  (%rax),%xmm1
  add    $0x4,%rax
  movaps %xmm1,%xmm4
  addss  %xmm1,%xmm2
  mulss  %xmm1,%xmm4
  maxss  %xmm3,%xmm1
  movaps %xmm1,%xmm3
  addss  %xmm4,%xmm0
  cmp    %rax,%rdx
  jne    L109
L77:
  pxor   %xmm1,%xmm1
  movss  %xmm3,0x8(%rsp)
  cvtsi2ss %ecx,%xmm1
  divss  %xmm1,%xmm2
  divss  %xmm1,%xmm0
  movaps %xmm2,%xmm1
  movss  %xmm2,0x4(%rsp)
  mulss  %xmm2,%xmm1
  subss  %xmm1,%xmm0
  call   <sqrt@plt>
  movss  D45(%rip),%xmm4
  movss  0x4(%rsp),%xmm2
  movaps %xmm0,%xmm1
  movss  0x8(%rsp),%xmm3
  mulss  %xmm4,%xmm1
  addss  %xmm2,%xmm1
  comiss %xmm3,%xmm1
  jbe    L34
  subss  %xmm2,%xmm3
  movaps %xmm3,%xmm0
  divss  %xmm4,%xmm0
L34:
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  jle    L21
  test   %r13d,%r13d
  jle    L21
  lea    0x30(%rsp),%rax
  movl   $0x0,0x18(%rsp)
  movss  D49(%rip),%xmm4
  xor    %r15d,%r15d
  mov    %rax,0x10(%rsp)
L44:
  pxor   %xmm3,%xmm3
  xor    %ebp,%ebp
  xor    %ebx,%ebx
  cvtsi2ssl 0x18(%rsp),%xmm3
  addss  %xmm4,%xmm3
  nopw   0x0(%rax,%rax,1)
L81:
  add    $0x1,%ebp
  lea    (%r15,%rbp,1),%eax
  cmp    %ebp,%r12d
  jne    L103
  mov    %r15d,%eax
  xor    %ebp,%ebp
L103:
  cltq
  movss  %xmm3,0x28(%rsp)
  movss  (%r14,%rax,4),%xmm1
  subss  %xmm2,%xmm1
  divss  %xmm0,%xmm1
  cvttss2si %xmm1,%eax
  pxor   %xmm1,%xmm1
  cvtsi2ss %ebx,%xmm1
  addss  %xmm4,%xmm1
  movss  %xmm1,0x24(%rsp)
  test   %eax,%eax
  jle    L73
  mov    $0x7,%edx
  mov    0x10(%rsp),%rsi
  lea    0x2c(%rsp),%rdi
  movss  %xmm3,0xc(%rsp)
  cmp    %edx,%eax
  movss  %xmm2,0x8(%rsp)
  cmovg  %edx,%eax
  lea    0x28(%rsp),%rdx
  movss  %xmm0,0x4(%rsp)
  cltq
  lea    (%rsi,%rax,4),%rcx
  lea    0x24(%rsp),%rsi
  call   <pgpt_@plt>
  movss  D49(%rip),%xmm4
  movss  0xc(%rsp),%xmm3
  movss  0x8(%rsp),%xmm2
  movss  0x4(%rsp),%xmm0
L73:
  add    $0x1,%ebx
  cmp    %ebx,%r13d
  jne    L81
  addl   $0x1,0x18(%rsp)
  add    %r12d,%r15d
  mov    0x18(%rsp),%eax
  cmp    %eax,0x1c(%rsp)
  jne    L44
L21:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L27
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L60:
  pxor   %xmm0,%xmm0
  movss  D66(%rip),%xmm3
  movaps %xmm0,%xmm2
  jmp    L77
L27:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D3
type: f32[4]
name: extract_symbolic_data
arguments: label: D20
type: byte[16]
name: extract_symbolic_data
arguments: label: D66
type: byte[4]
name: extract_symbolic_data
arguments: label: D45
type: f32
name: extract_symbolic_data
arguments: label: D49
type: byte[4]

tool: {"D3": [0.0,1.401298464324817e-45,2.802596928649634e-44,2.942726775082116e-44]}

tool: {"D20": [0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x12,0x00,0x00,0x00]}

tool: {"D66": [0xca,0xf2,0x49,0xf1]}

tool: D45: 7

tool: {"D49": [0x00,0x00,0x80,0x3f]}

assistant: ```c
void quikgray(float *dat, int nx, int ny, int nxx) {
  int ksym[8] = {0, 1, 20, 21, 2, 3, 17, 18};
  float s = 0.;
  float ss = 0.;
  float smin = 1.e30;
  float smax = -1.e30;
  float aa, rms, x, y;
  int i, ii, j, k;
  int one = 1;
  for (i = 0; i < nx * ny; i = i + 1) {
    aa = dat[i];
    s = s + aa;
    ss = ss + aa * aa;
    if (aa > smax)
      smax = aa;
    if (aa < smin)
      smin = aa;
  }
  s = s / (float)(nx * ny);
  rms = sqrt(ss / (float)(nx * ny) - s * s);
  if (s + 7 * rms > smax)
    rms = (smax - s) / 7.0;
  for (j = 0; j < ny; j = j + 1) {
    ii = 0;
    for (i = 0; i < nxx; i = i + 1) {
      ii = ii + 1;
      if (ii == nx)
        ii = 0;
      k = (int)((dat[(int)(j * nx + ii)] - s) / rms);
      if (k > 7)
        k = 7;
      x = (float)i + 1;
      y = (float)j + 1;
      if (k > 0)
        pgpt_(&one, &x, &y, ksym + k);
    }
  }
}
```