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

```asm
<dcr_hat_transform>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    %ecx,-0x28(%rbp)
  mov    %r8d,-0x2c(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L9
L30:
  mov    -0x24(%rbp),%eax
  imul   -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movaps %xmm0,%xmm1
  addss  %xmm0,%xmm1
  mov    -0x2c(%rbp),%eax
  sub    -0x4(%rbp),%eax
  imul   -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm0,%xmm1
  mov    -0x4(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  imul   -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x4(%rbp)
L9:
  mov    -0x4(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jl     L30
  jmp    L17
L53:
  mov    -0x24(%rbp),%eax
  imul   -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movaps %xmm0,%xmm1
  addss  %xmm0,%xmm1
  mov    -0x4(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  imul   -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm0,%xmm1
  mov    -0x4(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  imul   -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x4(%rbp)
L17:
  mov    -0x4(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  cmp    %eax,-0x28(%rbp)
  jg     L53
  jmp    L48
L34:
  mov    -0x24(%rbp),%eax
  imul   -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  movaps %xmm0,%xmm1
  addss  %xmm0,%xmm1
  mov    -0x4(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  imul   -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  addss  %xmm0,%xmm1
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  add    %eax,%eax
  mov    -0x4(%rbp),%ecx
  mov    -0x2c(%rbp),%edx
  add    %ecx,%edx
  sub    %edx,%eax
  imul   -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mov    -0x4(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  addss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  addl   $0x1,-0x4(%rbp)
L48:
  mov    -0x4(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L34
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void dcr_hat_transform(float *temp, float *base, int st, int size, int sc) {
  int i;
  for (i = 0; i < sc; i++)
    temp[i] = 2 * base[st * i] + base[st * (sc - i)] + base[st * (i + sc)];
  for (; i + sc < size; i++)
    temp[i] = 2 * base[st * i] + base[st * (i - sc)] + base[st * (i + sc)];
  for (; i < size; i++)
    temp[i] = 2 * base[st * i] + base[st * (i - sc)] + base[st * (2 * size - 2 - (i + sc))];
}
```