user: Converte this assembly snippet into its equivalent C code:

```asm
<recvac>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    %ecx,-0x38(%rbp)
  mov    %r8d,-0x3c(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L9
L11:
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%rax
  mov    (%rax),%ecx
  mov    -0x8(%rbp),%rax
  mov    (%rax),%eax
  add    %ecx,%eax
  add    $0x1,%eax
  sar    %eax
  add    %edx,%eax
  add    $0x1,%eax
  sar    %eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%ecx
  mov    -0x8(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  add    %ecx,%eax
  add    $0x1,%eax
  sar    %eax
  add    %edx,%eax
  lea    0x1(%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  sar    %edx
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%ecx
  mov    -0x8(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  add    %ecx,%eax
  add    $0x1,%eax
  sar    %eax
  add    %edx,%eax
  lea    0x1(%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  sar    %edx
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%ecx
  mov    -0x8(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  add    %ecx,%eax
  add    $0x1,%eax
  sar    %eax
  add    %edx,%eax
  lea    0x1(%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0xc,%rax
  sar    %edx
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%ecx
  mov    -0x8(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%eax
  add    %ecx,%eax
  add    $0x1,%eax
  sar    %eax
  add    %edx,%eax
  lea    0x1(%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0x10,%rax
  sar    %edx
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x14,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%rax
  add    $0x14,%rax
  mov    (%rax),%ecx
  mov    -0x8(%rbp),%rax
  add    $0x14,%rax
  mov    (%rax),%eax
  add    %ecx,%eax
  add    $0x1,%eax
  sar    %eax
  add    %edx,%eax
  lea    0x1(%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0x14,%rax
  sar    %edx
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%ecx
  mov    -0x8(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%eax
  add    %ecx,%eax
  add    $0x1,%eax
  sar    %eax
  add    %edx,%eax
  lea    0x1(%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0x18,%rax
  sar    %edx
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x1c,%rax
  mov    (%rax),%edx
  mov    -0x10(%rbp),%rax
  add    $0x1c,%rax
  mov    (%rax),%ecx
  mov    -0x8(%rbp),%rax
  add    $0x1c,%rax
  mov    (%rax),%eax
  add    %ecx,%eax
  add    $0x1,%eax
  sar    %eax
  add    %edx,%eax
  lea    0x1(%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0x1c,%rax
  sar    %edx
  mov    %edx,(%rax)
  mov    -0x38(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x8(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x18(%rbp)
  addl   $0x1,-0x1c(%rbp)
L9:
  mov    -0x1c(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L11
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void recvac(uint8_t *s, uint8_t *d, int lx, int lx2, int h) {
  uint8_t *dp = d, *sp = s, *sp2 = s + lx;
  int j;
  for (j = 0; j < h; ++j) {
    dp[0] = (dp[0] + ((uint32_t)(sp[0] + sp2[0] + 1) >> 1) + 1) >> 1;
    dp[1] = (dp[1] + ((uint32_t)(sp[1] + sp2[1] + 1) >> 1) + 1) >> 1;
    dp[2] = (dp[2] + ((uint32_t)(sp[2] + sp2[2] + 1) >> 1) + 1) >> 1;
    dp[3] = (dp[3] + ((uint32_t)(sp[3] + sp2[3] + 1) >> 1) + 1) >> 1;
    dp[4] = (dp[4] + ((uint32_t)(sp[4] + sp2[4] + 1) >> 1) + 1) >> 1;
    dp[5] = (dp[5] + ((uint32_t)(sp[5] + sp2[5] + 1) >> 1) + 1) >> 1;
    dp[6] = (dp[6] + ((uint32_t)(sp[6] + sp2[6] + 1) >> 1) + 1) >> 1;
    dp[7] = (dp[7] + ((uint32_t)(sp[7] + sp2[7] + 1) >> 1) + 1) >> 1;
    sp += lx2;
    sp2 += lx2;
    dp += lx2;
  }
}
```