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

```asm
<pixel_avg_weight_wxh>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %r9d,0xc(%rsp)
  mov    0x60(%rsp),%r13d
  mov    $0x40,%r12d
  sub    %r13d,%r12d
  test   %r9d,%r9d
  jle    L40
  mov    %rdi,%rbx
  mov    %esi,%eax
  mov    %rdx,%rbp
  mov    %r8d,%r15d
  cltq
  shl    $0x2,%rax
  mov    %rax,0x10(%rsp)
  movslq %ecx,%rcx
  lea    0x0(,%rcx,4),%rax
  mov    %rax,0x18(%rsp)
  mov    $0x0,%r14d
  jmp    L7
L5:
  mov    %r13d,%edx
  imul   0x20(%rbx),%edx
  mov    %r12d,%eax
  imul   0x20(%rbp),%eax
  lea    0x20(%rdx,%rax,1),%edi
  sar    $0x6,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,0x20(%rbx)
  mov    %r13d,%edx
  imul   0x24(%rbx),%edx
  mov    %r12d,%eax
  imul   0x24(%rbp),%eax
  lea    0x20(%rdx,%rax,1),%edi
  sar    $0x6,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,0x24(%rbx)
  mov    %r13d,%edx
  imul   0x28(%rbx),%edx
  mov    %r12d,%eax
  imul   0x28(%rbp),%eax
  lea    0x20(%rdx,%rax,1),%edi
  sar    $0x6,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,0x28(%rbx)
  mov    %r13d,%edx
  imul   0x2c(%rbx),%edx
  mov    %r12d,%eax
  imul   0x2c(%rbp),%eax
  lea    0x20(%rdx,%rax,1),%edi
  sar    $0x6,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,0x2c(%rbx)
  mov    %r13d,%edx
  imul   0x30(%rbx),%edx
  mov    %r12d,%eax
  imul   0x30(%rbp),%eax
  lea    0x20(%rdx,%rax,1),%edi
  sar    $0x6,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,0x30(%rbx)
  mov    %r13d,%edx
  imul   0x34(%rbx),%edx
  mov    %r12d,%eax
  imul   0x34(%rbp),%eax
  lea    0x20(%rdx,%rax,1),%edi
  sar    $0x6,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,0x34(%rbx)
  mov    %r13d,%edx
  imul   0x38(%rbx),%edx
  mov    %r12d,%eax
  imul   0x38(%rbp),%eax
  lea    0x20(%rdx,%rax,1),%edi
  sar    $0x6,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,0x38(%rbx)
  mov    %r13d,%edx
  imul   0x3c(%rbx),%edx
  mov    %r12d,%eax
  imul   0x3c(%rbp),%eax
  lea    0x20(%rdx,%rax,1),%edi
  sar    $0x6,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,0x3c(%rbx)
L68:
  add    $0x1,%r14d
  add    0x10(%rsp),%rbx
  add    0x18(%rsp),%rbp
  cmp    %r14d,0xc(%rsp)
  je     L40
L7:
  mov    %r13d,%edx
  imul   (%rbx),%edx
  mov    %r12d,%eax
  imul   0x0(%rbp),%eax
  lea    0x20(%rdx,%rax,1),%edi
  sar    $0x6,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,(%rbx)
  mov    %r13d,%edx
  imul   0x4(%rbx),%edx
  mov    %r12d,%eax
  imul   0x4(%rbp),%eax
  lea    0x20(%rdx,%rax,1),%edi
  sar    $0x6,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,0x4(%rbx)
  cmp    $0x2,%r15d
  je     L68
  mov    %r13d,%edx
  imul   0x8(%rbx),%edx
  mov    %r12d,%eax
  imul   0x8(%rbp),%eax
  lea    0x20(%rdx,%rax,1),%edi
  sar    $0x6,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,0x8(%rbx)
  mov    %r13d,%edx
  imul   0xc(%rbx),%edx
  mov    %r12d,%eax
  imul   0xc(%rbp),%eax
  lea    0x20(%rdx,%rax,1),%edi
  sar    $0x6,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,0xc(%rbx)
  cmp    $0x4,%r15d
  je     L68
  mov    %r13d,%edx
  imul   0x10(%rbx),%edx
  mov    %r12d,%eax
  imul   0x10(%rbp),%eax
  lea    0x20(%rdx,%rax,1),%edi
  sar    $0x6,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,0x10(%rbx)
  mov    %r13d,%edx
  imul   0x14(%rbx),%edx
  mov    %r12d,%eax
  imul   0x14(%rbp),%eax
  lea    0x20(%rdx,%rax,1),%edi
  sar    $0x6,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,0x14(%rbx)
  mov    %r13d,%edx
  imul   0x18(%rbx),%edx
  mov    %r12d,%eax
  imul   0x18(%rbp),%eax
  lea    0x20(%rdx,%rax,1),%edi
  sar    $0x6,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,0x18(%rbx)
  mov    %r13d,%edx
  imul   0x1c(%rbx),%edx
  mov    %r12d,%eax
  imul   0x1c(%rbp),%eax
  lea    0x20(%rdx,%rax,1),%edi
  sar    $0x6,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,0x1c(%rbx)
  cmp    $0x8,%r15d
  jne    L5
  jmp    L68
L40:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void pixel_avg_weight_wxh(uint8_t *dst, int i_dst, uint8_t *src, int i_src, int width, int height, int i_weight1) {
  int y;
  const int i_weight2 = 64 - i_weight1;
  for (y = 0; y < height; y++, dst += i_dst, src += i_src) {
    dst[0] = p264_clip_uint8((dst[0] * i_weight1 + src[0] * i_weight2 + (1 << 5)) >> 6);
    dst[1] = p264_clip_uint8((dst[1] * i_weight1 + src[1] * i_weight2 + (1 << 5)) >> 6);
    if (width == 2)
      continue;
    dst[2] = p264_clip_uint8((dst[2] * i_weight1 + src[2] * i_weight2 + (1 << 5)) >> 6);
    dst[3] = p264_clip_uint8((dst[3] * i_weight1 + src[3] * i_weight2 + (1 << 5)) >> 6);
    if (width == 4)
      continue;
    dst[4] = p264_clip_uint8((dst[4] * i_weight1 + src[4] * i_weight2 + (1 << 5)) >> 6);
    dst[5] = p264_clip_uint8((dst[5] * i_weight1 + src[5] * i_weight2 + (1 << 5)) >> 6);
    dst[6] = p264_clip_uint8((dst[6] * i_weight1 + src[6] * i_weight2 + (1 << 5)) >> 6);
    dst[7] = p264_clip_uint8((dst[7] * i_weight1 + src[7] * i_weight2 + (1 << 5)) >> 6);
    if (width == 8)
      continue;
    dst[8] = p264_clip_uint8((dst[8] * i_weight1 + src[8] * i_weight2 + (1 << 5)) >> 6);
    dst[9] = p264_clip_uint8((dst[9] * i_weight1 + src[9] * i_weight2 + (1 << 5)) >> 6);
    dst[10] = p264_clip_uint8((dst[10] * i_weight1 + src[10] * i_weight2 + (1 << 5)) >> 6);
    dst[11] = p264_clip_uint8((dst[11] * i_weight1 + src[11] * i_weight2 + (1 << 5)) >> 6);
    dst[12] = p264_clip_uint8((dst[12] * i_weight1 + src[12] * i_weight2 + (1 << 5)) >> 6);
    dst[13] = p264_clip_uint8((dst[13] * i_weight1 + src[13] * i_weight2 + (1 << 5)) >> 6);
    dst[14] = p264_clip_uint8((dst[14] * i_weight1 + src[14] * i_weight2 + (1 << 5)) >> 6);
    dst[15] = p264_clip_uint8((dst[15] * i_weight1 + src[15] * i_weight2 + (1 << 5)) >> 6);
  }
}
```