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

```asm
<gen_signal_double>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x30,%rsp
  movsd  %xmm0,0x28(%rsp)
  cmp    $0x1,%esi
  je     L91
  test   %edx,%edx
  jle    L25
  mov    %rdi,%r12
  pxor   %xmm3,%xmm3
  lea    -0x3e8(%rdx),%ebp
  xor    %eax,%eax
  movapd D52(%rip),%xmm2
  movapd D109(%rip),%xmm1
  jmp    L103
L128:
  cmp    %eax,%ebp
  jge    L4
  mov    %ebx,%edx
  pxor   %xmm3,%xmm3
  sub    %eax,%edx
  cvtsi2sd %edx,%xmm3
  mulsd  0x28(%rsp),%xmm3
  divsd  D105(%rip),%xmm3
L4:
  mulpd  D204(%rip),%xmm1
  lea    0x1(%rax),%r13d
  movsd  %xmm3,0x8(%rsp)
  add    $0x10,%r12
  mulpd  D19(%rip),%xmm2
  movapd %xmm1,%xmm0
  movapd %xmm3,%xmm1
  addpd  %xmm2,%xmm0
  unpcklpd %xmm1,%xmm1
  mulpd  %xmm1,%xmm0
  movups %xmm0,-0x10(%r12)
  cmp    %ebx,%r13d
  je     L25
  add    $0x2,%eax
  pxor   %xmm4,%xmm4
  movsd  D202(%rip),%xmm0
  cvtsi2sd %eax,%xmm4
  mulsd  %xmm4,%xmm0
  movsd  %xmm4,(%rsp)
  divsd  D189(%rip),%xmm0
  call   <sin@plt>
  movsd  %xmm0,0x10(%rsp)
  movsd  D124(%rip),%xmm0
  mulsd  (%rsp),%xmm0
  divsd  D189(%rip),%xmm0
  call   <cos@plt>
  movsd  0x10(%rsp),%xmm1
  movsd  %xmm0,0x20(%rsp)
  unpcklpd %xmm0,%xmm1
  movsd  D166(%rip),%xmm0
  mulsd  (%rsp),%xmm0
  movaps %xmm1,0x10(%rsp)
  divsd  D189(%rip),%xmm0
  call   <sin@plt>
  mov    %r13d,%eax
  movsd  0x20(%rsp),%xmm2
  movapd 0x10(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm3
  unpcklpd %xmm0,%xmm2
L103:
  cmp    $0x3e8,%eax
  jg     L128
  pxor   %xmm3,%xmm3
  cvtsi2sd %eax,%xmm3
  mulsd  0x28(%rsp),%xmm3
  divsd  D105(%rip),%xmm3
  jmp    L4
  cs nopw 0x0(%rax,%rax,1)
L25:
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   (%rax)
L91:
  test   %edx,%edx
  jle    L25
  pxor   %xmm7,%xmm7
  movslq %edx,%r12
  lea    -0x3e8(%rdx),%r13d
  xor    %r14d,%r14d
  movsd  D52(%rip),%xmm0
  movsd  D109(%rip),%xmm1
  movsd  %xmm7,(%rsp)
  jmp    L69
  nop
L101:
  cmp    %r14d,%r13d
  jge    L55
  mov    %ebx,%edx
  pxor   %xmm2,%xmm2
  sub    %r14d,%edx
  cvtsi2sd %edx,%xmm2
  mulsd  0x28(%rsp),%xmm2
  divsd  D105(%rip),%xmm2
  movsd  %xmm2,(%rsp)
L55:
  mulsd  D204(%rip),%xmm1
  mulsd  D161(%rip),%xmm0
  addsd  %xmm0,%xmm1
  mulsd  (%rsp),%xmm1
  movsd  %xmm1,0x0(%rbp,%r14,8)
  add    $0x1,%r14
  cmp    %r12,%r14
  je     L25
  lea    0x1(%r14),%eax
  pxor   %xmm2,%xmm2
  movsd  D202(%rip),%xmm0
  cvtsi2sd %eax,%xmm2
  mulsd  %xmm2,%xmm0
  movsd  %xmm2,0x10(%rsp)
  divsd  D189(%rip),%xmm0
  call   <sin@plt>
  movsd  0x10(%rsp),%xmm2
  mulsd  D124(%rip),%xmm2
  movsd  %xmm0,0x8(%rsp)
  divsd  D189(%rip),%xmm2
  movapd %xmm2,%xmm0
  call   <cos@plt>
  movsd  0x8(%rsp),%xmm1
L69:
  cmp    $0x3e8,%r14
  ja     L101
  pxor   %xmm2,%xmm2
  cvtsi2sd %r14d,%xmm2
  mulsd  0x28(%rsp),%xmm2
  divsd  D105(%rip),%xmm2
  movsd  %xmm2,(%rsp)
  jmp    L55
```

tool_calls: name: extract_symbolic_data
arguments: label: D52
type_guessed: byte[16]
name: extract_symbolic_data
arguments: label: D109
type_guessed: byte[16]
name: extract_symbolic_data
arguments: label: D105
type_guessed: f32[2]
name: extract_symbolic_data
arguments: label: D204
type_guessed: f64[2]
name: extract_symbolic_data
arguments: label: D19
type_guessed: f64[2]
name: extract_symbolic_data
arguments: label: D202
type_guessed: byte[8]
name: extract_symbolic_data
arguments: label: D189
type_guessed: f32[2]
name: extract_symbolic_data
arguments: label: D124
type_guessed: byte[8]
name: extract_symbolic_data
arguments: label: D166
type_guessed: byte[8]
name: extract_symbolic_data
arguments: label: D161
type_guessed: f64

tool: {"D52": [0x3a,0x5f,0x7e,0x21,0x42,0xca,0xef,0x3f,0xcb,0x0b,0x62,0xa9,0x11,0x31,0xa0,0x3f]}

tool: {"D109": [0x13,0x68,0x8c,0x17,0x9d,0x6e,0x93,0x3f,0x3a,0x5f,0x7e,0x21,0x42,0xca,0xef,0x3f]}

tool: {"D105": [0.0,4.4765625]}

tool: {"D204": [0.4,0.3]}

tool: {"D19": [0.3,0.4]}

tool: {"D202": [0x53,0x25,0x4a,0xbd,0x5c,0x27,0x6a,0x40]}

tool: {"D189": [0.0,6.17291259765625]}

tool: {"D124": [0x06,0x5b,0x18,0xbb,0x31,0xbe,0x93,0x40]}

tool: {"D166": [0x1b,0x1f,0x13,0xf3,0x77,0xcb,0x75,0x40]}

tool: D161: 0.3

assistant: ```c
void gen_signal_double(double *data, double scale, int channels, int datalen) {
  int k, ramplen;
  double amp = 0.0;
  ramplen = 1000;
  if (channels == 1) {
    for (k = 0; k < datalen; k++) {
      if (k <= ramplen)
        amp = scale * k / ((double)ramplen);
      else if (k > datalen - ramplen)
        amp = scale * (datalen - k) / ((double)ramplen);
      data[k] = amp * (0.4 * sin(33.3 * 2.0 * 3.14159265358979323846264338 * ((double)(k + 1)) / ((double)11025)) + 0.3 * cos(201.1 * 2.0 * 3.14159265358979323846264338 * ((double)(k + 1)) / ((double)11025)));
    };
  } else {
    for (k = 0; k < datalen; k++) {
      if (k <= ramplen)
        amp = scale * k / ((double)ramplen);
      else if (k > datalen - ramplen)
        amp = scale * (datalen - k) / ((double)ramplen);
      data[2 * k] = amp * (0.4 * sin(33.3 * 2.0 * 3.14159265358979323846264338 * ((double)(k + 1)) / ((double)11025)) + 0.3 * cos(201.1 * 2.0 * 3.14159265358979323846264338 * ((double)(k + 1)) / ((double)11025)));
      data[2 * k + 1] = amp * (0.4 * sin(55.5 * 2.0 * 3.14159265358979323846264338 * ((double)(k + 1)) / ((double)11025)) + 0.3 * cos(201.1 * 2.0 * 3.14159265358979323846264338 * ((double)(k + 1)) / ((double)11025)));
    };
  };
  return;
}
```