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

```asm
<filter_r3>:
  endbr64
  mov    %ecx,%r10d
  mov    $0x8,%r11d
  cmp    %r11d,%ecx
  cmovle %ecx,%r11d
  movsd  (%rdi),%xmm1
  test   %ecx,%ecx
  jle    L74
  mov    $0x1,%eax
  movsd  D42(%rip),%xmm0
  movapd %xmm0,%xmm3
L79:
  movapd %xmm0,%xmm2
  mulsd  -0x8(%rdi,%rax,8),%xmm2
  addsd  %xmm2,%xmm1
  mulsd  %xmm3,%xmm0
  add    $0x1,%rax
  cmp    %eax,%r11d
  jge    L79
  movsd  %xmm1,(%rsi)
  cmp    $0x1,%r10d
  jle    L8
L75:
  lea    -0x1(%r10),%ecx
  mov    $0x0,%eax
  movsd  D113(%rip),%xmm2
L68:
  movapd %xmm2,%xmm1
  mulsd  (%rsi,%rax,8),%xmm1
  movsd  (%rdi,%rax,8),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L68
  movslq %r10d,%rax
  lea    -0x8(,%rax,8),%rcx
  lea    (%rdi,%rcx,1),%r8
  movsd  (%r8),%xmm1
L76:
  lea    0x8(%rdi,%rcx,1),%r9
  mov    $0x1,%eax
  movsd  D42(%rip),%xmm0
  movapd %xmm0,%xmm3
L117:
  movapd %xmm0,%xmm2
  mulsd  -0x8(%r9),%xmm2
  addsd  %xmm2,%xmm1
  mulsd  %xmm3,%xmm0
  add    $0x1,%eax
  sub    $0x8,%r9
  cmp    %eax,%r11d
  jge    L117
L9:
  lea    (%rdx,%rcx,1),%r9
  movsd  %xmm1,(%r9)
  mov    %r10d,%eax
  sub    $0x2,%eax
  js     L57
  cltq
  movsd  D113(%rip),%xmm2
L22:
  movapd %xmm2,%xmm1
  mulsd  0x8(%rdx,%rax,8),%xmm1
  movsd  (%rdi,%rax,8),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  sub    $0x1,%rax
  test   %eax,%eax
  jns    L22
L57:
  cmp    $0x1,%r10d
  jle    L33
  lea    -0x2(%r10),%r11d
  mov    $0x0,%eax
  movsd  D32(%rip),%xmm5
  movsd  D111(%rip),%xmm4
  movsd  D75(%rip),%xmm3
  movsd  D5(%rip),%xmm2
L54:
  movapd %xmm5,%xmm0
  mulsd  (%rdx,%rax,8),%xmm0
  movapd %xmm4,%xmm1
  mulsd  (%rsi,%rax,8),%xmm1
  subsd  %xmm1,%xmm0
  addsd  0x8(%rdi,%rax,8),%xmm0
  movapd %xmm3,%xmm1
  mulsd  (%rdi,%rax,8),%xmm1
  addsd  %xmm1,%xmm0
  divsd  %xmm2,%xmm0
  movsd  %xmm0,(%rsi,%rax,8)
  mov    %rax,%r10
  add    $0x1,%rax
  cmp    %r11,%r10
  jne    L54
L33:
  add    %rsi,%rcx
  movsd  (%r8),%xmm1
  movsd  D32(%rip),%xmm0
  mulsd  (%r9),%xmm0
  movsd  D111(%rip),%xmm2
  mulsd  (%rcx),%xmm2
  subsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  mulsd  D75(%rip),%xmm1
  addsd  %xmm1,%xmm0
  divsd  D5(%rip),%xmm0
  movsd  %xmm0,(%rcx)
  ret
L8:
  movslq %r10d,%rax
  lea    -0x8(,%rax,8),%rcx
  lea    (%rdi,%rcx,1),%r8
  movsd  (%r8),%xmm1
  jmp    L76
L74:
  movsd  %xmm1,(%rsi)
  cmp    $0x1,%ecx
  jg     L75
  movslq %r10d,%rax
  lea    -0x8(,%rax,8),%rcx
  lea    (%rdi,%rcx,1),%r8
  movsd  (%r8),%xmm1
  jmp    L9
```

tool_calls: name: parse_data
arguments: data_tag: D42
type_infered: byte[8]
name: parse_data
arguments: data_tag: D113
type_infered: f64
name: parse_data
arguments: data_tag: D32
type_infered: byte[8]
name: parse_data
arguments: data_tag: D111
type_infered: byte[8]
name: parse_data
arguments: data_tag: D75
type_infered: byte[8]
name: parse_data
arguments: data_tag: D5
type_infered: f64

tool: {"D42": [0x55,0x55,0x55,0x55,0x55,0x55,0xd5,0xbf]}

tool: D113: 0.3333333333333333

tool: {"D32": [0x00,0x00,0x00,0x00,0x00,0x00,0x20,0xc0]}

tool: {"D111": [0x1c,0xc7,0x71,0x1c,0xc7,0x71,0xec,0x3f]}

tool: {"D75": [0x55,0x55,0x55,0x55,0x55,0x55,0x27,0x40]}

tool: D5: 6

assistant: ```c
void filter_r3(double *x, double *y, double *t, int len) {
  double init_val, pow_val;
  int i, lookahead;
  lookahead = (len < (8) ? len : (8));
  init_val = x[0];
  pow_val = -(0.3333333333333333333333333333333);
  for (i = 1; i <= lookahead; i++) {
    init_val += pow_val * x[i - 1];
    pow_val *= -(0.3333333333333333333333333333333);
  }
  y[0] = init_val;
  for (i = 1; i < len; i++)
    y[i] = x[i - 1] - (0.3333333333333333333333333333333) * y[i - 1];
  init_val = x[len - 1];
  pow_val = -(0.3333333333333333333333333333333);
  for (i = 1; i <= lookahead; i++) {
    init_val += pow_val * x[len - i];
    pow_val *= -(0.3333333333333333333333333333333);
  }
  t[len - 1] = init_val;
  for (i = len - 2; i >= 0; i--)
    t[i] = x[i] - (0.3333333333333333333333333333333) * t[i + 1];
  for (i = 0; i < len - 1; i++)
    y[i] = (-8.0 * t[i] - 8.0 / 9.0 * y[i] + x[i + 1] + 35.0 / 3.0 * x[i]) / 6.0;
  y[len - 1] = (-8.0 * t[len - 1] - 8.0 / 9.0 * y[len - 1] + x[len - 1] + 35.0 / 3.0 * x[len - 1]) / 6.0;
}
```