user: Demonstrate the C code that generates the assembly output below:

```asm
<shanwavf_packet>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x30(%rbp)
  movsd  %xmm0,-0x40(%rbp)
  movsd  D13(%rip),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L16
L43:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L49
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  je     L47
L49:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  D43(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sin@plt>
  movq   %xmm0,%rax
  mov    -0x14(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  movsd  (%rdx),%xmm1
  movsd  D43(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movq   %rax,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L2
L47:
  movsd  D13(%rip),%xmm0
  movsd  %xmm0,-0x10(%rbp)
L2:
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  D36(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <cos@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mulsd  -0x10(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  divsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  D36(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,%edi
  call   <sin@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  mulsd  -0x10(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  mov    -0x14(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  divsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x14(%rbp)
L16:
  mov    -0x14(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L43
  nop
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D13
type_infered: byte[8]
name: unpack_data
arguments: tag: D43
type_infered: f64
name: unpack_data
arguments: tag: D36
type_infered: byte[8]

tool: {"D13": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: D43: 3.141592653589793

tool: {"D36": [0x18,0x2d,0x44,0x54,0xfb,0x21,0x19,0x40]}

assistant: ```c
void shanwavf_packet(double *x, int sigInLength, double *f, int sigOutLength, double ys) {
  int count;
  double con, econ;
  con = 1;
  for (count = 0; count < sigInLength; count++) {
    if (x[count] != 0)
      econ = sin(x[count] * 3.1415926535897931159980) / (x[count] * 3.1415926535897931159980);
    else
      econ = 1;
    f[count] = cos(2 * 3.1415926535897931159980 * x[count]) * econ * con / ys;
    f[count + sigInLength] = sin(2 * 3.1415926535897931159980 * x[count]) * econ * con / ys;
  }
  return;
}
```