user: 请从给定的汇编指令推导出C源代码:

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

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