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

```asm
<main>:
  endbr64
  push   %r15
  lea    D1(%rip),%rsi
  lea    D37(%rip),%rdi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    D56(%rip),%rbx
  sub    $0x128,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x118(%rsp)
  xor    %eax,%eax
  lea    0x18(%rsp),%r15
  lea    0x10(%rsp),%r14
  call   <popen@plt>
  mov    $0x15,%edx
  mov    $0x1,%esi
  lea    D86(%rip),%rdi
  mov    %rax,%rbp
  mov    %rax,%rcx
  lea    0x20(%rsp),%r12
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x12,%edx
  mov    $0x1,%esi
  lea    D8(%rip),%rdi
  call   <fwrite@plt>
  movl   $0x4,0xc(%rsp)
  xchg   %ax,%ax
L14:
  mov    %rbp,%rcx
  mov    $0x1e,%edx
  mov    $0x1,%esi
  xor    %r13d,%r13d
  lea    D88(%rip),%rdi
  call   <fwrite@plt>
  nopl   0x0(%rax)
L22:
  mov    0xc(%rsp),%eax
  mov    %r14,%rsi
  mov    %r15,%rdi
  pxor   %xmm0,%xmm0
  add    %r13d,%eax
  cvtsi2sd %eax,%xmm0
  divsd  D36(%rip),%xmm0
  call   <sincos@plt>
  movsd  0x18(%rsp),%xmm0
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  movsd  0x10(%rsp),%xmm1
  movsd  %xmm0,(%r12,%r13,8)
  pxor   %xmm0,%xmm0
  cvtsi2sd %r13d,%xmm0
  addsd  D27(%rip),%xmm0
  add    $0x1,%r13
  cvttsd2si %xmm0,%edx
  movapd %xmm1,%xmm0
  call   <fprintf@plt>
  cmp    $0x1e,%r13
  jne    L22
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  xor    %r13d,%r13d
  lea    D49(%rip),%rdi
  call   <fwrite@plt>
  xchg   %ax,%ax
L16:
  pxor   %xmm0,%xmm0
  movsd  (%r12,%r13,8),%xmm1
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  cvtsi2sd %r13d,%xmm0
  addsd  D15(%rip),%xmm0
  add    $0x1,%r13
  cvttsd2si %xmm0,%edx
  movapd %xmm1,%xmm0
  call   <fprintf@plt>
  cmp    $0x1e,%r13
  jne    L16
  mov    %rbp,%rcx
  mov    $0x2,%edx
  mov    $0x1,%esi
  lea    D49(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rdi
  call   <fflush@plt>
  addl   $0x4,0xc(%rsp)
  mov    0xc(%rsp),%eax
  cmp    $0x194,%eax
  jne    L14
  mov    %rbp,%rdi
  call   <pclose@plt>
  mov    0x118(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L3
  add    $0x128,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D1
type_guessed: string
name: extract_symbolic_data
arguments: tag: D37
type_guessed: string
name: extract_symbolic_data
arguments: tag: D56
type_guessed: string
name: extract_symbolic_data
arguments: tag: D86
type_guessed: string
name: extract_symbolic_data
arguments: tag: D8
type_guessed: string
name: extract_symbolic_data
arguments: tag: D88
type_guessed: string
name: extract_symbolic_data
arguments: tag: D36
type_guessed: f64
name: extract_symbolic_data
arguments: tag: D27
type_guessed: f64
name: extract_symbolic_data
arguments: tag: D49
type_guessed: string
name: extract_symbolic_data
arguments: tag: D15
type_guessed: f64

tool: D1: w

tool: D37: gnuplot --persist

tool: D56: %f %f


tool: D86: load 'startup_2ch.p'


tool: D8: set yrange [-1:1]


tool: D88: plot '-' w boxes, '-' w boxes


tool: D36: 100

tool: D27: 0.25

tool: D49: e


tool: D15: 0.75

assistant: ```c
int main() {
  double xarray[30];
  double yarray[30];
  FILE *pipe_gp;
  pipe_gp = popen("gnuplot --persist", "w");
  int i;
  int j;
  fputs("load 'startup_2ch.p'\n", pipe_gp);
  fputs("set yrange [-1:1]\n", pipe_gp);
  for (j = 1; j <= 100; j++) {
    fputs("plot '-' w boxes, '-' w boxes\n", pipe_gp);
    for (i = 0; i < 30; ++i) {
      double x = (i + 4 * j) / 100.0;
      xarray[i] = sin(x);
      yarray[i] = cos(x);
      fprintf(pipe_gp, "%f %f\n", i + 0.25, yarray[i]);
    }
    fputs("e\n", pipe_gp);
    for (i = 0; i < 30; i++) {
      fprintf(pipe_gp, "%f %f\n", i + 0.75, xarray[i]);
    }
    fputs("e\n", pipe_gp);
    fflush(pipe_gp);
    for (i = 0; i < 10000000; i++) {
    }
  }
  pclose(pipe_gp);
  return 0;
}
```