user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<rec4a>:
  endbr64
  movslq %edx,%rdx
  add    %rdi,%rdx
  test   %r8d,%r8d
  jle    L15
  push   %rbp
  mov    %rsi,%rax
  xor    %r9d,%r9d
  movslq %ecx,%rsi
  push   %rbx
  xchg   %ax,%ax
L8:
  movzbl (%rdi),%ebx
  movzbl (%rdx),%ecx
  movzbl 0x1(%rdi),%r11d
  movzbl 0x1(%rdx),%r10d
  lea    0x2(%rbx,%rcx,1),%ecx
  movzbl (%rax),%ebx
  add    %r11d,%ecx
  add    %r10d,%ecx
  shr    $0x2,%ecx
  lea    0x1(%rcx,%rbx,1),%ecx
  shr    %ecx
  mov    %cl,(%rax)
  movzbl 0x2(%rdi),%ebp
  lea    0x2(%r11,%r10,1),%ecx
  movzbl 0x2(%rdx),%ebx
  movzbl 0x1(%rax),%r10d
  add    %ebp,%ecx
  add    %ebx,%ecx
  shr    $0x2,%ecx
  lea    0x1(%rcx,%r10,1),%ecx
  shr    %ecx
  mov    %cl,0x1(%rax)
  movzbl 0x3(%rdi),%r11d
  lea    0x2(%rbp,%rbx,1),%ecx
  movzbl 0x3(%rdx),%r10d
  movzbl 0x2(%rax),%ebx
  add    %r11d,%ecx
  add    %r10d,%ecx
  shr    $0x2,%ecx
  lea    0x1(%rcx,%rbx,1),%ecx
  shr    %ecx
  mov    %cl,0x2(%rax)
  movzbl 0x4(%rdi),%ebp
  lea    0x2(%r11,%r10,1),%ecx
  movzbl 0x4(%rdx),%ebx
  movzbl 0x3(%rax),%r10d
  add    %ebp,%ecx
  add    %ebx,%ecx
  shr    $0x2,%ecx
  lea    0x1(%rcx,%r10,1),%ecx
  shr    %ecx
  mov    %cl,0x3(%rax)
  movzbl 0x5(%rdi),%r11d
  lea    0x2(%rbp,%rbx,1),%ecx
  movzbl 0x5(%rdx),%r10d
  movzbl 0x4(%rax),%ebx
  add    %r11d,%ecx
  add    %r10d,%ecx
  shr    $0x2,%ecx
  lea    0x1(%rcx,%rbx,1),%ecx
  shr    %ecx
  mov    %cl,0x4(%rax)
  movzbl 0x6(%rdi),%ebp
  lea    0x2(%r11,%r10,1),%ecx
  movzbl 0x6(%rdx),%ebx
  movzbl 0x5(%rax),%r10d
  add    %ebp,%ecx
  add    %ebx,%ecx
  shr    $0x2,%ecx
  lea    0x1(%rcx,%r10,1),%ecx
  shr    %ecx
  mov    %cl,0x5(%rax)
  movzbl 0x7(%rdi),%r11d
  lea    0x2(%rbp,%rbx,1),%ecx
  movzbl 0x7(%rdx),%r10d
  movzbl 0x6(%rax),%ebx
  add    %r11d,%ecx
  add    %r10d,%ecx
  shr    $0x2,%ecx
  lea    0x1(%rcx,%rbx,1),%ecx
  shr    %ecx
  mov    %cl,0x6(%rax)
  movzbl 0x8(%rdi),%ebp
  lea    0x2(%r11,%r10,1),%ecx
  movzbl 0x8(%rdx),%ebx
  movzbl 0x7(%rax),%r10d
  add    %ebp,%ecx
  add    %ebx,%ecx
  shr    $0x2,%ecx
  lea    0x1(%rcx,%r10,1),%ecx
  shr    %ecx
  mov    %cl,0x7(%rax)
  movzbl 0x9(%rdi),%r11d
  lea    0x2(%rbp,%rbx,1),%ecx
  movzbl 0x9(%rdx),%r10d
  movzbl 0x8(%rax),%ebx
  add    %r11d,%ecx
  add    %r10d,%ecx
  shr    $0x2,%ecx
  lea    0x1(%rcx,%rbx,1),%ecx
  shr    %ecx
  mov    %cl,0x8(%rax)
  movzbl 0xa(%rdi),%ebp
  lea    0x2(%r11,%r10,1),%ecx
  movzbl 0xa(%rdx),%ebx
  movzbl 0x9(%rax),%r10d
  add    %ebp,%ecx
  add    %ebx,%ecx
  shr    $0x2,%ecx
  lea    0x1(%rcx,%r10,1),%ecx
  shr    %ecx
  mov    %cl,0x9(%rax)
  movzbl 0xb(%rdi),%r11d
  lea    0x2(%rbp,%rbx,1),%ecx
  movzbl 0xb(%rdx),%r10d
  movzbl 0xa(%rax),%ebx
  add    %r11d,%ecx
  add    %r10d,%ecx
  shr    $0x2,%ecx
  lea    0x1(%rcx,%rbx,1),%ecx
  shr    %ecx
  mov    %cl,0xa(%rax)
  movzbl 0xc(%rdi),%ebp
  lea    0x2(%r11,%r10,1),%ecx
  movzbl 0xc(%rdx),%ebx
  movzbl 0xb(%rax),%r10d
  add    %ebp,%ecx
  add    %ebx,%ecx
  shr    $0x2,%ecx
  lea    0x1(%rcx,%r10,1),%ecx
  shr    %ecx
  mov    %cl,0xb(%rax)
  movzbl 0xd(%rdi),%r11d
  lea    0x2(%rbp,%rbx,1),%ecx
  movzbl 0xd(%rdx),%r10d
  movzbl 0xc(%rax),%ebx
  add    %r11d,%ecx
  add    %r10d,%ecx
  shr    $0x2,%ecx
  lea    0x1(%rcx,%rbx,1),%ecx
  shr    %ecx
  mov    %cl,0xc(%rax)
  movzbl 0xe(%rdi),%ebp
  lea    0x2(%r11,%r10,1),%ecx
  movzbl 0xe(%rdx),%ebx
  movzbl 0xd(%rax),%r10d
  add    %ebp,%ecx
  add    %ebx,%ecx
  shr    $0x2,%ecx
  lea    0x1(%rcx,%r10,1),%ecx
  shr    %ecx
  mov    %cl,0xd(%rax)
  movzbl 0xf(%rdi),%r11d
  lea    0x2(%rbp,%rbx,1),%ecx
  movzbl 0xf(%rdx),%r10d
  movzbl 0xe(%rax),%ebx
  add    %r11d,%ecx
  add    %r10d,%ecx
  shr    $0x2,%ecx
  lea    0x1(%rcx,%rbx,1),%ecx
  shr    %ecx
  mov    %cl,0xe(%rax)
  lea    0x2(%r11,%r10,1),%ecx
  movzbl 0x10(%rdi),%r10d
  add    %r10d,%ecx
  movzbl 0x10(%rdx),%r10d
  add    %r10d,%ecx
  movzbl 0xf(%rax),%r10d
  shr    $0x2,%ecx
  lea    0x1(%rcx,%r10,1),%ecx
  shr    %ecx
  add    %rsi,%rdi
  add    $0x1,%r9d
  add    %rsi,%rdx
  mov    %cl,0xf(%rax)
  add    %rsi,%rax
  cmp    %r9d,%r8d
  jne    L8
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L15:
  ret
```

assistant: ```c
void rec4a(unsigned char *s, unsigned char *d, int lx, int lx2, int h) {
  unsigned char *dp = d, *sp = s, *sp2 = s + lx;
  unsigned int s1, s2, s3, s4;
  int j;
  for (j = 0; j < h; j++) {
    s1 = sp[0];
    s3 = sp2[0];
    dp[0] = (dp[0] + ((unsigned int)(s1 + (s2 = sp[1]) + s3 + (s4 = sp2[1]) + 2) >> 2) + 1) >> 1;
    dp[1] = (dp[1] + ((unsigned int)(s2 + (s1 = sp[2]) + s4 + (s3 = sp2[2]) + 2) >> 2) + 1) >> 1;
    dp[2] = (dp[2] + ((unsigned int)(s1 + (s2 = sp[3]) + s3 + (s4 = sp2[3]) + 2) >> 2) + 1) >> 1;
    dp[3] = (dp[3] + ((unsigned int)(s2 + (s1 = sp[4]) + s4 + (s3 = sp2[4]) + 2) >> 2) + 1) >> 1;
    dp[4] = (dp[4] + ((unsigned int)(s1 + (s2 = sp[5]) + s3 + (s4 = sp2[5]) + 2) >> 2) + 1) >> 1;
    dp[5] = (dp[5] + ((unsigned int)(s2 + (s1 = sp[6]) + s4 + (s3 = sp2[6]) + 2) >> 2) + 1) >> 1;
    dp[6] = (dp[6] + ((unsigned int)(s1 + (s2 = sp[7]) + s3 + (s4 = sp2[7]) + 2) >> 2) + 1) >> 1;
    dp[7] = (dp[7] + ((unsigned int)(s2 + (s1 = sp[8]) + s4 + (s3 = sp2[8]) + 2) >> 2) + 1) >> 1;
    dp[8] = (dp[8] + ((unsigned int)(s1 + (s2 = sp[9]) + s3 + (s4 = sp2[9]) + 2) >> 2) + 1) >> 1;
    dp[9] = (dp[9] + ((unsigned int)(s2 + (s1 = sp[10]) + s4 + (s3 = sp2[10]) + 2) >> 2) + 1) >> 1;
    dp[10] = (dp[10] + ((unsigned int)(s1 + (s2 = sp[11]) + s3 + (s4 = sp2[11]) + 2) >> 2) + 1) >> 1;
    dp[11] = (dp[11] + ((unsigned int)(s2 + (s1 = sp[12]) + s4 + (s3 = sp2[12]) + 2) >> 2) + 1) >> 1;
    dp[12] = (dp[12] + ((unsigned int)(s1 + (s2 = sp[13]) + s3 + (s4 = sp2[13]) + 2) >> 2) + 1) >> 1;
    dp[13] = (dp[13] + ((unsigned int)(s2 + (s1 = sp[14]) + s4 + (s3 = sp2[14]) + 2) >> 2) + 1) >> 1;
    dp[14] = (dp[14] + ((unsigned int)(s1 + (s2 = sp[15]) + s3 + (s4 = sp2[15]) + 2) >> 2) + 1) >> 1;
    dp[15] = (dp[15] + ((unsigned int)(s2 + sp[16] + s4 + sp2[16] + 2) >> 2) + 1) >> 1;
    sp += lx2;
    sp2 += lx2;
    dp += lx2;
  }
}
```