user: Converte this assembly snippet into its equivalent C code:

```asm
<cgau4>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %esi,-0x3c(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8d,-0x40(%rbp)
  movsd  %xmm0,-0x58(%rbp)
  movl   $0x0,-0x2c(%rbp)
  jmp    L6
L7:
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x28(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x28(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <cos@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  movsd  -0x18(%rbp),%xmm1
  movsd  D52(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x10(%rbp),%xmm1
  movsd  -0x20(%rbp),%xmm2
  movsd  D50(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  -0x8(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  movsd  -0x28(%rbp),%xmm2
  movsd  D38(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  mulsd  -0x10(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movsd  D41(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  movapd %xmm1,%xmm2
  mulsd  -0x8(%rbp),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  -0x10(%rbp),%xmm2
  movsd  D9(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  %xmm1,-0x60(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movq   D57(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  -0x60(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    $0x1,%edi
  call   <sqrt@plt>
  imul   $0x2fc,%eax,%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x60(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0x18(%rbp),%xmm1
  movsd  D18(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x8(%rbp),%xmm1
  movsd  -0x20(%rbp),%xmm2
  movsd  D50(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  -0x10(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x28(%rbp),%xmm2
  movsd  D38(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  mulsd  -0x8(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movsd  D41(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  mulsd  -0x10(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  movsd  -0x8(%rbp),%xmm2
  movsd  D9(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movq   D57(%rip),%xmm1
  movapd %xmm0,%xmm4
  xorpd  %xmm1,%xmm4
  movq   %xmm4,%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  -0x60(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  mov    $0x1,%edi
  call   <sqrt@plt>
  imul   $0x2fc,%eax,%eax
  mov    %eax,%edi
  call   <sqrt@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  mov    -0x2c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x60(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x2c(%rbp)
L6:
  mov    -0x2c(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L7
  nop
  leave
  ret
```

tool_calls: name: read_data
arguments: data_tag: D52
data_type: byte[8]
name: read_data
arguments: data_tag: D50
data_type: byte[8]
name: read_data
arguments: data_tag: D38
data_type: byte[8]
name: read_data
arguments: data_tag: D41
data_type: byte[8]
name: read_data
arguments: data_tag: D9
data_type: byte[8]
name: read_data
arguments: data_tag: D57
data_type: byte[8]
name: read_data
arguments: data_tag: D18
data_type: byte[8]

tool: {"D52": [0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x40]}

tool: {"D50": [0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x40]}

tool: {"D38": [0x00,0x00,0x00,0x00,0x00,0x00,0x52,0x40]}

tool: {"D41": [0x00,0x00,0x00,0x00,0x00,0x00,0x4c,0x40]}

tool: {"D9": [0x00,0x00,0x00,0x00,0x00,0x00,0x39,0x40]}

tool: {"D57": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

tool: {"D18": [0x00,0x00,0x00,0x00,0x00,0x00,0x30,0xc0]}

assistant: ```c
void cgau4(double *x, int sigInLength, double *psir, double *psii, int sigOutLength, double ys) {
  int count;
  double x2, cosx, sinx, x3, x4;
  for (count = 0; count < sigInLength; count++) {
    x2 = x[count] * x[count];
    x3 = x[count] * x2;
    x4 = x2 * x2;
    cosx = cos(x[count]);
    sinx = sin(x[count]);
    psir[count] = (16 * x4 * cosx + 32 * x3 * sinx - 72 * x2 * cosx - 56 * x[count] * sinx + 25 * cosx) * exp(-x2) / sqrt(764 * sqrt(3.1415926535897931159980 / 2));
    psii[count] = (-16 * x4 * sinx + 32 * x3 * cosx + 72 * x2 * sinx - 56 * x[count] * cosx - 25 * sinx) * exp(-x2) / sqrt(764 * sqrt(3.1415926535897931159980 / 2));
  }
  return;
}
```