user: What would the C source look like for the assembly code provided here:

```asm
<pixel_avg_weight_wxh>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x30(%rbp)
  mov    %r8d,-0x3c(%rbp)
  mov    %r9d,-0x40(%rbp)
  mov    $0x40,%eax
  sub    0x10(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L5
L6:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x20,%eax
  sar    $0x6,%eax
  mov    %eax,%edi
  call   <p264_clip_uint8@plt>
  mov    -0x28(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    -0x28(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x20,%eax
  sar    $0x6,%eax
  mov    -0x28(%rbp),%rdx
  lea    0x4(%rdx),%rbx
  mov    %eax,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,(%rbx)
  cmpl   $0x2,-0x3c(%rbp)
  je     L60
  mov    -0x28(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x20,%eax
  sar    $0x6,%eax
  mov    -0x28(%rbp),%rdx
  lea    0x8(%rdx),%rbx
  mov    %eax,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,(%rbx)
  mov    -0x28(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x20,%eax
  sar    $0x6,%eax
  mov    -0x28(%rbp),%rdx
  lea    0xc(%rdx),%rbx
  mov    %eax,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,(%rbx)
  cmpl   $0x4,-0x3c(%rbp)
  je     L64
  mov    -0x28(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x20,%eax
  sar    $0x6,%eax
  mov    -0x28(%rbp),%rdx
  lea    0x10(%rdx),%rbx
  mov    %eax,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,(%rbx)
  mov    -0x28(%rbp),%rax
  add    $0x14,%rax
  mov    (%rax),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    $0x14,%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x20,%eax
  sar    $0x6,%eax
  mov    -0x28(%rbp),%rdx
  lea    0x14(%rdx),%rbx
  mov    %eax,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,(%rbx)
  mov    -0x28(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x20,%eax
  sar    $0x6,%eax
  mov    -0x28(%rbp),%rdx
  lea    0x18(%rdx),%rbx
  mov    %eax,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,(%rbx)
  mov    -0x28(%rbp),%rax
  add    $0x1c,%rax
  mov    (%rax),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    $0x1c,%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x20,%eax
  sar    $0x6,%eax
  mov    -0x28(%rbp),%rdx
  lea    0x1c(%rdx),%rbx
  mov    %eax,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,(%rbx)
  cmpl   $0x8,-0x3c(%rbp)
  je     L41
  mov    -0x28(%rbp),%rax
  add    $0x20,%rax
  mov    (%rax),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    $0x20,%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x20,%eax
  sar    $0x6,%eax
  mov    -0x28(%rbp),%rdx
  lea    0x20(%rdx),%rbx
  mov    %eax,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,(%rbx)
  mov    -0x28(%rbp),%rax
  add    $0x24,%rax
  mov    (%rax),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    $0x24,%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x20,%eax
  sar    $0x6,%eax
  mov    -0x28(%rbp),%rdx
  lea    0x24(%rdx),%rbx
  mov    %eax,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,(%rbx)
  mov    -0x28(%rbp),%rax
  add    $0x28,%rax
  mov    (%rax),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    $0x28,%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x20,%eax
  sar    $0x6,%eax
  mov    -0x28(%rbp),%rdx
  lea    0x28(%rdx),%rbx
  mov    %eax,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,(%rbx)
  mov    -0x28(%rbp),%rax
  add    $0x2c,%rax
  mov    (%rax),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    $0x2c,%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x20,%eax
  sar    $0x6,%eax
  mov    -0x28(%rbp),%rdx
  lea    0x2c(%rdx),%rbx
  mov    %eax,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,(%rbx)
  mov    -0x28(%rbp),%rax
  add    $0x30,%rax
  mov    (%rax),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    $0x30,%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x20,%eax
  sar    $0x6,%eax
  mov    -0x28(%rbp),%rdx
  lea    0x30(%rdx),%rbx
  mov    %eax,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,(%rbx)
  mov    -0x28(%rbp),%rax
  add    $0x34,%rax
  mov    (%rax),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    $0x34,%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x20,%eax
  sar    $0x6,%eax
  mov    -0x28(%rbp),%rdx
  lea    0x34(%rdx),%rbx
  mov    %eax,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,(%rbx)
  mov    -0x28(%rbp),%rax
  add    $0x38,%rax
  mov    (%rax),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    $0x38,%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x20,%eax
  sar    $0x6,%eax
  mov    -0x28(%rbp),%rdx
  lea    0x38(%rdx),%rbx
  mov    %eax,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,(%rbx)
  mov    -0x28(%rbp),%rax
  add    $0x3c,%rax
  mov    (%rax),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  add    $0x3c,%rax
  mov    (%rax),%eax
  imul   -0x14(%rbp),%eax
  add    %edx,%eax
  add    $0x20,%eax
  sar    $0x6,%eax
  mov    -0x28(%rbp),%rdx
  lea    0x3c(%rdx),%rbx
  mov    %eax,%edi
  call   <p264_clip_uint8@plt>
  mov    %eax,(%rbx)
  jmp    L22
L60:
  nop
  jmp    L22
L64:
  nop
  jmp    L22
L41:
  nop
L22:
  addl   $0x1,-0x18(%rbp)
  mov    -0x2c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x28(%rbp)
  mov    -0x30(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x38(%rbp)
L5:
  mov    -0x18(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jl     L6
  nop
  nop
  mov    -0x8(%rbp),%rbx
  leave
  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);
  }
}
```