user: 请将以下的汇编代码转换成C语言代码:

```asm
<recvc>:
  endbr64
  movslq %edx,%r11
  lea    (%rdi,%r11,1),%r10
  test   %r8d,%r8d
  jle    L44
  movslq %ecx,%rdx
  xor    %r9d,%r9d
  push   %r13
  mov    %r10,%rax
  test   %rdx,%rdx
  push   %r12
  cmovns %rdx,%r9
  push   %rbp
  mov    $0x0,%ebp
  cmovle %rdx,%rbp
  push   %rbx
  lea    0x7(%r9),%rcx
  lea    (%rdi,%rcx,1),%r9
  lea    (%rsi,%rbp,1),%r12
  cmp    %r9,%r12
  lea    (%rdi,%rbp,1),%r13
  lea    (%rsi,%rcx,1),%rbx
  seta   %r9b
  cmp    %r13,%rbx
  setb   %r13b
  or     %r13d,%r9d
  lea    0x7(%rdx),%r13
  cmp    $0xe,%r13
  seta   %r13b
  test   %r13b,%r9b
  je     L63
  lea    (%r11,%rcx,1),%r9
  lea    (%r11,%rbp,1),%rcx
  add    %rdi,%r9
  cmp    %r9,%r12
  seta   %r9b
  add    %rdi,%rcx
  cmp    %rcx,%rbx
  setb   %cl
  or     %cl,%r9b
  je     L63
  cmp    $0x1,%r8d
  je     L61
  mov    %r8d,%r12d
  lea    (%rdx,%rdx,1),%rbp
  xor    %eax,%eax
  xor    %ecx,%ecx
  shr    %r12d
  lea    (%rdi,%rdx,1),%rbx
  lea    (%r10,%rdx,1),%r11
  lea    (%rsi,%rdx,1),%r9
  nopl   (%rax)
L14:
  movq   (%rdi,%rax,1),%xmm0
  movq   (%r10,%rax,1),%xmm1
  add    $0x1,%ecx
  movhps (%rbx,%rax,1),%xmm0
  movhps (%r11,%rax,1),%xmm1
  pavgb  %xmm1,%xmm0
  movq   %xmm0,(%rsi,%rax,1)
  movhps %xmm0,(%r9,%rax,1)
  add    %rbp,%rax
  cmp    %ecx,%r12d
  jne    L14
  mov    %r8d,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%r8d
  je     L70
L71:
  imul   %rdx,%rax
  movq   (%rdi,%rax,1),%xmm0
  movq   (%r10,%rax,1),%xmm1
  pavgb  %xmm1,%xmm0
  movq   %xmm0,(%rsi,%rax,1)
L70:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L63:
  xor    %r9d,%r9d
  nopl   0x0(%rax,%rax,1)
L16:
  movzbl (%rdi),%r10d
  movzbl (%rax),%ecx
  add    $0x1,%r9d
  lea    0x1(%r10,%rcx,1),%ecx
  shr    %ecx
  mov    %cl,(%rsi)
  movzbl 0x1(%rdi),%r10d
  movzbl 0x1(%rax),%ecx
  lea    0x1(%r10,%rcx,1),%ecx
  shr    %ecx
  mov    %cl,0x1(%rsi)
  movzbl 0x2(%rdi),%r10d
  movzbl 0x2(%rax),%ecx
  lea    0x1(%r10,%rcx,1),%ecx
  shr    %ecx
  mov    %cl,0x2(%rsi)
  movzbl 0x3(%rdi),%r10d
  movzbl 0x3(%rax),%ecx
  lea    0x1(%r10,%rcx,1),%ecx
  shr    %ecx
  mov    %cl,0x3(%rsi)
  movzbl 0x4(%rdi),%r10d
  movzbl 0x4(%rax),%ecx
  lea    0x1(%r10,%rcx,1),%ecx
  shr    %ecx
  mov    %cl,0x4(%rsi)
  movzbl 0x5(%rdi),%r10d
  movzbl 0x5(%rax),%ecx
  lea    0x1(%r10,%rcx,1),%ecx
  shr    %ecx
  mov    %cl,0x5(%rsi)
  movzbl 0x6(%rdi),%r10d
  movzbl 0x6(%rax),%ecx
  lea    0x1(%r10,%rcx,1),%ecx
  shr    %ecx
  mov    %cl,0x6(%rsi)
  movzbl 0x7(%rdi),%r10d
  add    %rdx,%rdi
  movzbl 0x7(%rax),%ecx
  add    %rdx,%rax
  lea    0x1(%r10,%rcx,1),%ecx
  shr    %ecx
  mov    %cl,0x7(%rsi)
  add    %rdx,%rsi
  cmp    %r9d,%r8d
  jne    L16
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L44:
  ret
L61:
  xor    %eax,%eax
  jmp    L71
```

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