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

```asm
<bilinear_interpolation_at>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    %ecx,-0x38(%rbp)
  mov    %r8d,-0x3c(%rbp)
  movss  %xmm0,-0x40(%rbp)
  movss  %xmm1,-0x44(%rbp)
  movss  -0x40(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0x1c(%rbp)
  movss  -0x44(%rbp),%xmm0
  cvttss2si %xmm0,%eax
  mov    %eax,-0x18(%rbp)
  movl   $0x0,-0x20(%rbp)
  jmp    L10
L4:
  mov    -0x18(%rbp),%r9d
  mov    -0x1c(%rbp),%r8d
  mov    -0x3c(%rbp),%ecx
  mov    -0x38(%rbp),%edx
  mov    -0x34(%rbp),%esi
  mov    -0x30(%rbp),%rax
  sub    $0x8,%rsp
  mov    -0x20(%rbp),%edi
  push   %rdi
  mov    %rax,%rdi
  call   <getsamplen@plt>
  add    $0x10,%rsp
  movd   %xmm0,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%r10d
  mov    -0x18(%rbp),%r8d
  mov    -0x3c(%rbp),%ecx
  mov    -0x38(%rbp),%edx
  mov    -0x34(%rbp),%esi
  mov    -0x30(%rbp),%rax
  sub    $0x8,%rsp
  mov    -0x20(%rbp),%edi
  push   %rdi
  mov    %r8d,%r9d
  mov    %r10d,%r8d
  mov    %rax,%rdi
  call   <getsamplen@plt>
  add    $0x10,%rsp
  movd   %xmm0,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%r9d
  mov    -0x1c(%rbp),%r8d
  mov    -0x3c(%rbp),%ecx
  mov    -0x38(%rbp),%edx
  mov    -0x34(%rbp),%esi
  mov    -0x30(%rbp),%rax
  sub    $0x8,%rsp
  mov    -0x20(%rbp),%edi
  push   %rdi
  mov    %rax,%rdi
  call   <getsamplen@plt>
  add    $0x10,%rsp
  movd   %xmm0,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x18(%rbp),%eax
  lea    0x1(%rax),%r9d
  mov    -0x1c(%rbp),%eax
  lea    0x1(%rax),%r8d
  mov    -0x3c(%rbp),%ecx
  mov    -0x38(%rbp),%edx
  mov    -0x34(%rbp),%esi
  mov    -0x30(%rbp),%rax
  sub    $0x8,%rsp
  mov    -0x20(%rbp),%edi
  push   %rdi
  mov    %rax,%rdi
  call   <getsamplen@plt>
  add    $0x10,%rsp
  movd   %xmm0,%eax
  mov    %eax,-0x8(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0x18(%rbp),%xmm1
  movss  -0x44(%rbp),%xmm0
  movaps %xmm0,%xmm4
  subss  %xmm1,%xmm4
  pxor   %xmm1,%xmm1
  cvtsi2ssl -0x1c(%rbp),%xmm1
  movss  -0x40(%rbp),%xmm0
  movaps %xmm0,%xmm3
  subss  %xmm1,%xmm3
  movss  -0x8(%rbp),%xmm2
  movss  -0xc(%rbp),%xmm1
  movss  -0x10(%rbp),%xmm0
  mov    -0x14(%rbp),%eax
  movaps %xmm4,%xmm5
  movaps %xmm3,%xmm4
  movaps %xmm2,%xmm3
  movaps %xmm1,%xmm2
  movaps %xmm0,%xmm1
  movd   %eax,%xmm0
  call   <evaluate_bilinear_cell@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movss  -0x4(%rbp),%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x20(%rbp)
L10:
  mov    -0x20(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L4
  nop
  nop
  leave
  ret
```

assistant: ```c
void bilinear_interpolation_at(float *result, float *x, int w, int h, int pd, float p, float q) {
  int ip = p;
  int iq = q;
  for (int l = 0; l < (pd); l++) {
    float a = getsamplen(x, w, h, pd, ip, iq, l);
    float b = getsamplen(x, w, h, pd, ip + 1, iq, l);
    float c = getsamplen(x, w, h, pd, ip, iq + 1, l);
    float d = getsamplen(x, w, h, pd, ip + 1, iq + 1, l);
    float r = evaluate_bilinear_cell(a, b, c, d, p - ip, q - iq);
    result[l] = r;
  }
}
```