user: Please show me the C implementation that matches the assembly code listed below:

```asm
<cgau8>:
  endbr64
  test   %esi,%esi
  jle    L5
  push   %r15
  movslq %esi,%rax
  push   %r14
  push   %r13
  mov    %rcx,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x78,%rsp
  mov    %rax,0x58(%rsp)
  lea    0x68(%rsp),%r15
  lea    0x60(%rsp),%r14
  nopw   0x0(%rax,%rax,1)
L11:
  movsd  (%rbx,%rbp,8),%xmm11
  mov    %r14,%rsi
  mov    %r15,%rdi
  movapd %xmm11,%xmm0
  movsd  %xmm11,(%rsp)
  call   <sincos@plt>
  movsd  (%rsp),%xmm11
  movsd  0x60(%rsp),%xmm5
  movsd  D42(%rip),%xmm12
  movsd  0x68(%rsp),%xmm2
  movapd %xmm11,%xmm4
  movapd %xmm11,%xmm3
  movsd  %xmm5,0x10(%rsp)
  mulsd  %xmm11,%xmm4
  movsd  %xmm2,0x18(%rsp)
  mulsd  D8(%rip),%xmm11
  mulsd  %xmm4,%xmm3
  movapd %xmm4,%xmm6
  movapd %xmm4,%xmm7
  mulsd  %xmm4,%xmm6
  mulsd  %xmm4,%xmm12
  xorpd  D56(%rip),%xmm4
  mulsd  %xmm2,%xmm11
  movsd  %xmm4,0x8(%rsp)
  mulsd  %xmm3,%xmm7
  movapd %xmm3,%xmm1
  movapd %xmm3,%xmm8
  mulsd  %xmm6,%xmm1
  movapd %xmm6,%xmm9
  mulsd  %xmm6,%xmm9
  movsd  %xmm12,0x20(%rsp)
  mulsd  D108(%rip),%xmm9
  mulsd  D9(%rip),%xmm1
  mulsd  %xmm3,%xmm8
  mulsd  D119(%rip),%xmm8
  mulsd  D75(%rip),%xmm7
  movapd %xmm9,%xmm10
  movsd  %xmm9,0x50(%rsp)
  mulsd  %xmm5,%xmm10
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x48(%rsp)
  mulsd  %xmm2,%xmm0
  mulsd  D105(%rip),%xmm6
  movsd  %xmm8,0x40(%rsp)
  mulsd  D106(%rip),%xmm3
  movsd  %xmm7,0x38(%rsp)
  addsd  %xmm10,%xmm0
  movapd %xmm8,%xmm10
  mulsd  %xmm5,%xmm10
  movsd  %xmm6,0x30(%rsp)
  movsd  %xmm3,0x28(%rsp)
  subsd  %xmm10,%xmm0
  movapd %xmm7,%xmm10
  mulsd  %xmm2,%xmm10
  subsd  %xmm10,%xmm0
  movapd %xmm6,%xmm10
  mulsd  %xmm5,%xmm10
  addsd  %xmm10,%xmm0
  movapd %xmm3,%xmm10
  mulsd  %xmm2,%xmm10
  addsd  %xmm10,%xmm0
  movapd %xmm12,%xmm10
  mulsd  %xmm5,%xmm10
  subsd  %xmm10,%xmm0
  movsd  D92(%rip),%xmm10
  mulsd  %xmm5,%xmm10
  subsd  %xmm11,%xmm0
  addsd  %xmm10,%xmm0
  movsd  %xmm0,(%rsp)
  movapd %xmm4,%xmm0
  call   <exp@plt>
  pxor   %xmm10,%xmm10
  mov    $0x1,%edi
  cvtsi2sd %eax,%xmm10
  mulsd  (%rsp),%xmm10
  movsd  %xmm10,(%rsp)
  call   <sqrt@plt>
  imul   $0x2c10f10,%eax,%edi
  call   <sqrt@plt>
  pxor   %xmm4,%xmm4
  movsd  (%rsp),%xmm10
  movsd  0x10(%rsp),%xmm5
  cvtsi2sd %eax,%xmm4
  movsd  0x18(%rsp),%xmm2
  movsd  0x50(%rsp),%xmm9
  movsd  0x48(%rsp),%xmm1
  movsd  0x40(%rsp),%xmm8
  mulsd  %xmm2,%xmm9
  movsd  0x38(%rsp),%xmm7
  movsd  0x30(%rsp),%xmm6
  mulsd  %xmm5,%xmm1
  movsd  0x28(%rsp),%xmm3
  movsd  0x20(%rsp),%xmm12
  divsd  %xmm4,%xmm10
  movsd  0x8(%rsp),%xmm0
  mulsd  %xmm2,%xmm8
  mulsd  %xmm5,%xmm7
  mulsd  %xmm2,%xmm6
  subsd  %xmm9,%xmm1
  mulsd  %xmm5,%xmm3
  mulsd  %xmm2,%xmm12
  mulsd  D92(%rip),%xmm2
  addsd  %xmm8,%xmm1
  subsd  %xmm7,%xmm1
  subsd  %xmm6,%xmm1
  addsd  %xmm3,%xmm1
  movsd  D8(%rip),%xmm3
  addsd  %xmm12,%xmm1
  movsd  %xmm10,(%r12,%rbp,8)
  mulsd  (%rbx,%rbp,8),%xmm3
  mulsd  %xmm5,%xmm3
  subsd  %xmm3,%xmm1
  subsd  %xmm2,%xmm1
  movsd  %xmm1,(%rsp)
  call   <exp@plt>
  pxor   %xmm0,%xmm0
  movsd  (%rsp),%xmm1
  mov    $0x1,%edi
  cvtsi2sd %eax,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rsp)
  call   <sqrt@plt>
  imul   $0x2c10f10,%eax,%edi
  call   <sqrt@plt>
  pxor   %xmm1,%xmm1
  movsd  (%rsp),%xmm0
  cvtsi2sd %eax,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%r13,%rbp,8)
  add    $0x1,%rbp
  cmp    %rbp,0x58(%rsp)
  jne    L11
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L5:
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D42
datatype: byte[8]
name: retrieve_data
arguments: tag: D8
datatype: byte[8]
name: retrieve_data
arguments: tag: D56
datatype: byte[16]
name: retrieve_data
arguments: tag: D108
datatype: byte[8]
name: retrieve_data
arguments: tag: D9
datatype: byte[8]
name: retrieve_data
arguments: tag: D119
datatype: byte[8]
name: retrieve_data
arguments: tag: D75
datatype: byte[8]
name: retrieve_data
arguments: tag: D105
datatype: byte[8]
name: retrieve_data
arguments: tag: D106
datatype: byte[8]
name: retrieve_data
arguments: tag: D92
datatype: byte[8]

tool: {"D42": [0x00,0x00,0x00,0x00,0x00,0x1a,0xe2,0x40]}

tool: {"D8": [0x00,0x00,0x00,0x00,0x00,0x5c,0xd4,0x40]}

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

tool: {"D108": [0x00,0x00,0x00,0x00,0x00,0x00,0x70,0x40]}

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

tool: {"D119": [0x00,0x00,0x00,0x00,0x00,0x00,0xb5,0x40]}

tool: {"D75": [0x00,0x00,0x00,0x00,0x00,0x80,0xc8,0x40]}

tool: {"D105": [0x00,0x00,0x00,0x00,0x00,0x58,0xdb,0x40]}

tool: {"D106": [0x00,0x00,0x00,0x00,0x00,0xb8,0xe1,0x40]}

tool: {"D92": [0x00,0x00,0x00,0x00,0x00,0x31,0xb7,0x40]}

assistant: ```c
void cgau8(double *x, int sigInLength, double *psir, double *psii, int sigOutLength, double ys) {
  int count;
  double x2, cosx, sinx, x3, x4, x5, x6, x7, x8;
  for (count = 0; count < sigInLength; count++) {
    x2 = x[count] * x[count];
    x3 = x[count] * x2;
    x4 = x2 * x2;
    x5 = x2 * x3;
    x6 = x3 * x3;
    x7 = x4 * x3;
    x8 = x4 * x4;
    cosx = cos(x[count]);
    sinx = sin(x[count]);
    psir[count] = (256 * x8 * cosx + 1024 * x7 * sinx - 5376 * x6 * cosx - 12544 * x5 * sinx + 28000 * x4 * cosx + 36288 * x3 * sinx - 37072 * x2 * cosx - 20848 * x[count] * sinx + 5937 * cosx) * exp(-x2) / sqrt(46206736 * sqrt(3.1415926535897931159980 / 2));
    psii[count] = (-256 * x8 * sinx + 1024 * x7 * cosx + 5376 * x6 * sinx - 12544 * x5 * cosx - 28000 * x4 * sinx + 36288 * x3 * cosx + 37072 * x2 * sinx - 20848 * x[count] * cosx - 5937 * sinx) * exp(-x2) / sqrt(46206736 * sqrt(3.1415926535897931159980 / 2));
  }
  return;
}
```