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

```asm
<BsplnWght5>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  movsd  %xmm0,-0x20(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdq -0x18(%rbp),%xmm1
  movsd  -0x20(%rbp),%xmm0
  subsd  %xmm1,%xmm0
  movq   D68(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  D105(%rip),%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L21
  movsd  -0x20(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x20(%rbp),%xmm1
  movsd  D47(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  movsd  D134(%rip),%xmm0
  subsd  %xmm1,%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  D26(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x8(%rbp),%xmm1
  movsd  D115(%rip),%xmm0
  addsd  %xmm1,%xmm0
  jmp    L9
L21:
  movsd  D113(%rip),%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L34
  movsd  -0x20(%rbp),%xmm1
  movsd  D142(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  D21(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x20(%rbp),%xmm1
  movsd  D11(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mulsd  -0x20(%rbp),%xmm0
  movsd  D97(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x20(%rbp),%xmm1
  movsd  D23(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x20(%rbp),%xmm1
  movsd  D99(%rip),%xmm0
  addsd  %xmm1,%xmm0
  jmp    L9
L34:
  movsd  D6(%rip),%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L42
  movsd  D6(%rip),%xmm0
  subsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movsd  -0x8(%rbp),%xmm0
  mulsd  -0x20(%rbp),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x20(%rbp),%xmm1
  movsd  D14(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  jmp    L9
L42:
  pxor   %xmm0,%xmm0
L9:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  pop    %rbp
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D68
type: qword
name: retrieve_data
arguments: tag: D105
type: f64
name: retrieve_data
arguments: tag: D47
type: byte[8]
name: retrieve_data
arguments: tag: D134
type: f64
name: retrieve_data
arguments: tag: D26
type: f64
name: retrieve_data
arguments: tag: D115
type: f64
name: retrieve_data
arguments: tag: D113
type: f64
name: retrieve_data
arguments: tag: D142
type: byte[8]
name: retrieve_data
arguments: tag: D21
type: f64
name: retrieve_data
arguments: tag: D11
type: f64
name: retrieve_data
arguments: tag: D97
type: f64
name: retrieve_data
arguments: tag: D23
type: f64
name: retrieve_data
arguments: tag: D99
type: f64
name: retrieve_data
arguments: tag: D6
type: f64
name: retrieve_data
arguments: tag: D14
type: byte[8]

tool: D68: 9223372036854775807

tool: D105: 1

tool: {"D47": [0x55,0x55,0x55,0x55,0x55,0x55,0xb5,0x3f]}

tool: D134: 0.25

tool: D26: 0.5

tool: D115: 0.55

tool: D113: 2

tool: {"D142": [0x55,0x55,0x55,0x55,0x55,0x55,0xa5,0x3f]}

tool: D21: 0.375

tool: D11: 1.25

tool: D97: 1.75

tool: D23: 0.625

tool: D99: 0.425

tool: D6: 3

tool: {"D14": [0x11,0x11,0x11,0x11,0x11,0x11,0x81,0x3f]}

assistant: ```c
double BsplnWght5(long i, double x) {
  double f;
  x = fabs(x - (double)i);
  if (x < 1.0) {
    f = x * x;
    return (f * (f * (0.25 - x * (1.0 / 12.0)) - 0.5) + 0.55);
  }
  if (x < 2.0)
    return (x * (x * (x * (x * (x * (1.0 / 24.0) - 0.375) + 1.25) - 1.75) + 0.625) + 0.425);
  if (x < 3.0) {
    f = 3.0 - x;
    x = f * f;
    return (f * x * x * (1.0 / 120.0));
  }
  return (0.0);
}
```