user: What would the C source look like for the assembly code provided here?

```asm
<ti_wilders>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x58,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %rdx,-0x58(%rbp)
  mov    %rcx,-0x60(%rbp)
  mov    -0x50(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x58(%rbp),%rax
  movsd  (%rax),%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x60(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x38(%rbp)
  cmpl   $0x0,-0x3c(%rbp)
  jg     L13
  mov    $0x1,%eax
  jmp    L5
L13:
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <ti_wilders_start@plt>
  cmp    %eax,-0x44(%rbp)
  jg     L69
  mov    $0x0,%eax
  jmp    L5
L69:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x3c(%rbp),%xmm1
  movsd  D3(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movl   $0x0,-0x40(%rbp)
  jmp    L33
L61:
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  addl   $0x1,-0x40(%rbp)
L33:
  mov    -0x40(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L61
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x3c(%rbp),%xmm1
  movsd  -0x30(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x38(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x40(%rbp)
  jmp    L29
L27:
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x28(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x38(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x38(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x40(%rbp)
L29:
  mov    -0x40(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L27
  mov    -0x60(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%rax
  sub    %rdx,%rax
  sar    $0x3,%rax
  mov    %rax,%rbx
  mov    -0x58(%rbp),%rax
  mov    %rax,%rdi
  call   <ti_wilders_start@plt>
  mov    %eax,%edx
  mov    -0x44(%rbp),%eax
  sub    %edx,%eax
  cltq
  cmp    %rax,%rbx
  sete   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    $0x0,%eax
L5:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: read_data
arguments: label: D3
data_type: f64

tool: D3: 1

assistant: ```c
int ti_wilders(int size, double const *const *inputs, double const *options, double *const *outputs) {
  const double *input = inputs[0];
  const int period = (int)options[0];
  double *output = outputs[0];
  if (period < 1)
    return 1;
  if (size <= ti_wilders_start(options))
    return 0;
  const double per = 1.0 / ((double)period);
  double sum = 0;
  int i;
  for (i = 0; i < period; ++i) {
    sum += input[i];
  }
  double val = sum / period;
  *output++ = val;
  for (i = period; i < size; ++i) {
    val = (input[i] - val) * per + val;
    *output++ = val;
  }
  assert(output - outputs[0] == size - ti_wilders_start(options));
  return 0;
}
```