user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<fir_downsampling_kernel>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    %r8,-0x58(%rbp)
  mov    %r9,-0x60(%rbp)
  mov    0x18(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  mov    -0x50(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x38(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jg     L189
  mov    -0x38(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x28(%rbp)
L189:
  mov    0x18(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x20(%rbp)
  jmp    L179
L126:
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x58(%rbp),%rax
  movss  (%rax),%xmm0
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mulss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  movq   $0x1,-0x8(%rbp)
  jmp    L124
L13:
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x20(%rbp),%rax
  sub    -0x8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm2
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  %xmm2,%xmm0
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  addq   $0x1,-0x8(%rbp)
L124:
  mov    -0x8(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  jle    L13
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x8(%rbp)
  jmp    L105
L149:
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x50(%rbp),%rax
  lea    -0x2(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  add    $0x1,%rax
  sub    -0x8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm2
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  %xmm2,%xmm0
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  addq   $0x1,-0x8(%rbp)
L105:
  mov    -0x8(%rbp),%rax
  cmp    -0x50(%rbp),%rax
  jl     L149
  addq   $0x1,-0x10(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    0x10(%rbp),%rax
  add    %rax,-0x20(%rbp)
L179:
  mov    -0x20(%rbp),%rax
  cmp    -0x28(%rbp),%rax
  jle    L126
  mov    0x18(%rbp),%rax
  mov    -0x18(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x18(%rbp),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x20(%rbp)
  jmp    L53
L29:
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x58(%rbp),%rax
  movss  (%rax),%xmm0
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mulss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  movq   $0x1,-0x8(%rbp)
  jmp    L92
L4:
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  mov    -0x20(%rbp),%rax
  sub    -0x8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm2
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  %xmm2,%xmm0
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  addq   $0x1,-0x8(%rbp)
L92:
  mov    -0x50(%rbp),%rax
  cmp    -0x8(%rbp),%rax
  jg     L4
  addq   $0x1,-0x10(%rbp)
  mov    0x18(%rbp),%rax
  mov    -0x20(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    0x10(%rbp),%rax
  add    %rax,-0x20(%rbp)
L53:
  mov    -0x38(%rbp),%rax
  cmp    -0x20(%rbp),%rax
  jg     L29
  mov    0x18(%rbp),%rax
  mov    (%rax),%rdx
  mov    0x10(%rbp),%rax
  add    %rax,%rdx
  mov    0x18(%rbp),%rax
  mov    %rdx,(%rax)
  mov    0x18(%rbp),%rax
  mov    (%rax),%rax
  sub    -0x38(%rbp),%rax
  mov    %rax,%rdx
  mov    0x18(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x50(%rbp),%rax
  sub    $0x1,%rax
  cmp    %rax,-0x38(%rbp)
  jl     L112
  movq   $0x0,-0x8(%rbp)
  jmp    L163
L137:
  mov    -0x38(%rbp),%rax
  add    $0x1,%rax
  sub    -0x50(%rbp),%rax
  mov    %rax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x60(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  addq   $0x1,-0x8(%rbp)
L163:
  mov    -0x50(%rbp),%rax
  sub    $0x1,%rax
  cmp    %rax,-0x8(%rbp)
  jl     L137
  jmp    L80
L112:
  movq   $0x0,-0x8(%rbp)
  jmp    L147
L66:
  mov    -0x8(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x60(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  addq   $0x1,-0x8(%rbp)
L147:
  mov    -0x50(%rbp),%rax
  sub    $0x2,%rax
  sub    -0x38(%rbp),%rax
  cmp    %rax,-0x8(%rbp)
  jle    L66
  mov    -0x50(%rbp),%rax
  sub    $0x1,%rax
  sub    -0x38(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L108
L36:
  mov    -0x38(%rbp),%rax
  lea    -0x1(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x50(%rbp),%rax
  lea    -0x2(%rax),%rcx
  mov    %rdx,%rax
  sub    %rcx,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    -0x8(%rbp),%rax
  lea    0x0(,%rax,4),%rcx
  mov    -0x60(%rbp),%rax
  add    %rcx,%rax
  movss  (%rdx),%xmm0
  movss  %xmm0,(%rax)
  addq   $0x1,-0x8(%rbp)
L108:
  mov    -0x50(%rbp),%rax
  sub    $0x1,%rax
  cmp    %rax,-0x8(%rbp)
  jl     L36
L80:
  mov    -0x10(%rbp),%rax
  pop    %rbp
  ret
```

assistant: ```c
long fir_downsampling_kernel(lenx, x, y, lenh0, h0, T, downfac, k0)
long lenx;
float *x;
float *y;
long lenh0;
float *h0;
float *T;
long downfac;
long *k0;
{
  long ktrans, kx, kStart, ky, kappa;
  kStart = *k0;
  ky = 0;
  ktrans = lenh0 - 1;
  if (ktrans > lenx - 1)
    ktrans = lenx - 1;
  for (kx = *k0; kx <= ktrans; kx += downfac) {
    y[ky] = x[kx] * h0[0];
    for (kappa = 1; kappa <= kx; kappa++) {
      y[ky] += x[kx - kappa] * h0[kappa];
    }
    for (kappa = kx + 1; kappa < lenh0; kappa++) {
      y[ky] += T[lenh0 - 2 + kx + 1 - kappa] * h0[kappa];
    }
    ky++;
    kStart = kx;
  }
  *k0 = kStart;
  for (kx = kStart + downfac; kx <= lenx - 1; kx += downfac) {
    y[ky] = x[kx] * h0[0];
    for (kappa = 1; kappa <= lenh0 - 1; kappa++) {
      y[ky] += x[kx - kappa] * h0[kappa];
    }
    ky++;
    *k0 = kx;
  }
  *k0 = *k0 + downfac;
  *k0 = *k0 - lenx;
  if (lenx >= lenh0 - 1) {
    for (kappa = 0; kappa <= lenh0 - 2; kappa++) {
      T[kappa] = x[lenx + 1 - lenh0 + kappa];
    }
  } else {
    for (kappa = 0; kappa <= lenh0 - 2 - lenx; kappa++) {
      T[kappa] = T[kappa + lenx];
    }
    for (kappa = lenh0 - 1 - lenx; kappa <= lenh0 - 2; kappa++) {
      T[kappa] = x[lenx - 1 + kappa - (lenh0 - 2)];
    }
  }
  return ky;
}
```