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

```asm
<fir3>:
  endbr64
  test   %r8d,%r8d
  jle    L18
  push   %rbx
  mov    %r9d,%ecx
  mov    %rdi,%rax
  lea    -0x1(%r8),%r8d
  lea    0x2(%rdi,%r8,2),%r10
L8:
  movswl (%rax),%edi
  movswl (%rsi),%r8d
  imul   %r8d,%edi
  movswl 0x2(%rax),%r8d
  movswl 0x2(%rsi),%r9d
  imul   %r9d,%r8d
  add    %r8d,%edi
  movswl 0x4(%rax),%r8d
  movswl 0x4(%rsi),%r9d
  imul   %r9d,%r8d
  movswl 0x6(%rax),%r9d
  movswl 0x6(%rsi),%r11d
  imul   %r11d,%r9d
  add    %r9d,%r8d
  add    %r8d,%edi
  movswl 0x8(%rax),%r8d
  movswl 0x8(%rsi),%r9d
  imul   %r9d,%r8d
  movswl 0xa(%rax),%r9d
  movswl 0xa(%rsi),%r11d
  imul   %r11d,%r9d
  add    %r9d,%r8d
  add    %r8d,%edi
  movswl 0xc(%rax),%r8d
  movswl 0xc(%rsi),%r9d
  imul   %r9d,%r8d
  movswl 0xe(%rax),%r9d
  movswl 0xe(%rsi),%r11d
  imul   %r11d,%r9d
  add    %r9d,%r8d
  add    %r8d,%edi
  movswl 0x10(%rax),%r8d
  movswl 0x10(%rsi),%r9d
  imul   %r9d,%r8d
  movswl 0x12(%rax),%r9d
  movswl 0x12(%rsi),%r11d
  imul   %r11d,%r9d
  add    %r9d,%r8d
  movswl 0x14(%rax),%r9d
  movswl 0x14(%rsi),%r11d
  imul   %r11d,%r9d
  movswl 0x16(%rax),%r11d
  movswl 0x16(%rsi),%ebx
  imul   %ebx,%r11d
  add    %r11d,%r9d
  add    %r9d,%r8d
  movswl 0x18(%rax),%r9d
  movswl 0x18(%rsi),%r11d
  imul   %r11d,%r9d
  movswl 0x1a(%rax),%r11d
  movswl 0x1a(%rsi),%ebx
  imul   %ebx,%r11d
  add    %r11d,%r9d
  add    %r9d,%r8d
  movswl 0x1c(%rax),%r9d
  movswl 0x1c(%rsi),%r11d
  imul   %r11d,%r9d
  movswl 0x1e(%rax),%r11d
  movswl 0x1e(%rsi),%ebx
  imul   %ebx,%r11d
  add    %r11d,%r9d
  add    %r9d,%r8d
  add    %r8d,%edi
  movswl 0x20(%rax),%r8d
  movswl 0x20(%rsi),%r9d
  imul   %r9d,%r8d
  movswl 0x22(%rax),%r9d
  movswl 0x22(%rsi),%r11d
  imul   %r11d,%r9d
  add    %r9d,%r8d
  movswl 0x24(%rax),%r9d
  movswl 0x24(%rsi),%r11d
  imul   %r11d,%r9d
  movswl 0x26(%rax),%r11d
  movswl 0x26(%rsi),%ebx
  imul   %ebx,%r11d
  add    %r11d,%r9d
  add    %r9d,%r8d
  movswl 0x28(%rax),%r9d
  movswl 0x28(%rsi),%r11d
  imul   %r11d,%r9d
  movswl 0x2a(%rax),%r11d
  movswl 0x2a(%rsi),%ebx
  imul   %ebx,%r11d
  add    %r11d,%r9d
  add    %r9d,%r8d
  movswl 0x2c(%rax),%r9d
  movswl 0x2c(%rsi),%r11d
  imul   %r11d,%r9d
  movswl 0x2e(%rax),%r11d
  movswl 0x2e(%rsi),%ebx
  imul   %ebx,%r11d
  add    %r11d,%r9d
  add    %r9d,%r8d
  add    %r8d,%edi
  movswl 0x30(%rax),%r8d
  movswl 0x30(%rsi),%r9d
  imul   %r9d,%r8d
  movswl 0x32(%rax),%r9d
  movswl 0x32(%rsi),%r11d
  imul   %r11d,%r9d
  add    %r9d,%r8d
  movswl 0x34(%rax),%r9d
  movswl 0x34(%rsi),%r11d
  imul   %r11d,%r9d
  movswl 0x36(%rax),%r11d
  movswl 0x36(%rsi),%ebx
  imul   %ebx,%r11d
  add    %r11d,%r9d
  add    %r9d,%r8d
  movswl 0x38(%rax),%r9d
  movswl 0x38(%rsi),%r11d
  imul   %r11d,%r9d
  movswl 0x3a(%rax),%r11d
  movswl 0x3a(%rsi),%ebx
  imul   %ebx,%r11d
  add    %r11d,%r9d
  add    %r9d,%r8d
  movswl 0x3c(%rax),%r9d
  movswl 0x3c(%rsi),%r11d
  imul   %r11d,%r9d
  movswl 0x3e(%rax),%r11d
  movswl 0x3e(%rsi),%ebx
  imul   %ebx,%r11d
  add    %r11d,%r9d
  add    %r9d,%r8d
  add    %r8d,%edi
  sar    %cl,%edi
  mov    %di,(%rdx)
  add    $0x2,%rax
  add    $0x2,%rdx
  cmp    %r10,%rax
  jne    L8
  pop    %rbx
  ret
L18:
  ret
```

assistant: ```c
void fir3(const short x[], const short h[], short y[], int n, int m, int s) {
  int j;
  int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8, tmp9;
  int tmp10, tmp11, tmp12, tmp13, tmp14, tmp15, tmp16, tmp17, tmp18, tmp19;
  for (j = 0; j < m; j++) {
    tmp0 = x[j] * h[0] + x[j + 1] * h[1];
    tmp1 = x[j + 2] * h[2] + x[j + 3] * h[3];
    tmp2 = x[j + 4] * h[4] + x[j + 5] * h[5];
    tmp3 = x[j + 6] * h[6] + x[j + 7] * h[7];
    tmp4 = x[j + 8] * h[8] + x[j + 9] * h[9];
    tmp5 = x[j + 10] * h[10] + x[j + 11] * h[11];
    tmp6 = x[j + 12] * h[12] + x[j + 13] * h[13];
    tmp7 = x[j + 14] * h[14] + x[j + 15] * h[15];
    tmp8 = x[j + 16] * h[16] + x[j + 17] * h[17];
    tmp9 = x[j + 18] * h[18] + x[j + 19] * h[19];
    tmp10 = x[j + 20] * h[20] + x[j + 21] * h[21];
    tmp11 = x[j + 22] * h[22] + x[j + 23] * h[23];
    tmp12 = x[j + 24] * h[24] + x[j + 25] * h[25];
    tmp13 = x[j + 26] * h[26] + x[j + 27] * h[27];
    tmp14 = x[j + 28] * h[28] + x[j + 29] * h[29];
    tmp15 = x[j + 30] * h[30] + x[j + 31] * h[31];
    tmp16 = tmp0 + tmp1 + tmp2 + tmp3;
    tmp17 = tmp4 + tmp5 + tmp6 + tmp7;
    tmp18 = tmp8 + tmp9 + tmp10 + tmp11;
    tmp19 = tmp12 + tmp13 + tmp14 + tmp15;
    y[j] = (tmp16 + tmp17 + tmp18 + tmp19) >> s;
  }
}
```