user: Please show me the C implementation that matches the assembly code listed below:

```asm
<clpf_block>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x4000(%rsp),%r11
L124:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L124
  sub    $0x38,%rsp
  mov    %ecx,0x1c(%rsp)
  mov    %r9d,0x4(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x4028(%rsp)
  xor    %eax,%eax
  cmp    %r8d,%ecx
  jge    L80
  mov    %rdi,%rbx
  mov    %esi,%ebp
  mov    %edx,%r10d
  mov    0x1c(%rsp),%eax
  lea    -0x1(%rax),%r13d
  imul   0x4(%rsp),%r13d
  sub    %eax,%r8d
  mov    %r8d,0x18(%rsp)
  movslq %esi,%rax
  mov    %rax,0x8(%rsp)
  mov    %rax,%r15
  neg    %r15
  shl    $0x2,%r15
  mov    $0x0,%r14d
  lea    0x20(%rsp),%rax
  mov    %rax,0x10(%rsp)
  jmp    L71
L118:
  mov    0x4(%rsp),%esi
  lea    0x0(%r13,%rsi,1),%eax
  movslq %r13d,%rdx
  lea    (%rbx,%rdx,4),%r12
  movslq %eax,%rdx
  lea    (%rbx,%rdx,4),%rdi
  add    %esi,%eax
  cltq
  lea    (%rbx,%rax,4),%r11
  mov    %r14d,%eax
  shl    $0x6,%eax
  cltq
  lea    (%r15,%rax,4),%r9
  add    0x10(%rsp),%r9
  mov    0x8(%rsp),%rcx
L55:
  mov    (%rdi,%rcx,4),%edx
  mov    -0x4(%rdi,%rcx,4),%r8d
  add    (%r12,%rcx,4),%r8d
  add    0x4(%rdi,%rcx,4),%r8d
  add    (%r11,%rcx,4),%r8d
  lea    0x0(,%rdx,4),%eax
  sub    %eax,%r8d
  mov    %r8d,%esi
  sar    $0x1f,%esi
  or     $0x1,%esi
  mov    %r8d,%eax
  neg    %eax
  cmovs  %r8d,%eax
  add    $0x2,%eax
  sar    $0x2,%eax
  test   %eax,%eax
  mov    $0x1,%r8d
  cmovg  %r8d,%eax
  imul   %esi,%eax
  add    %edx,%eax
  mov    $0x0,%edx
  cmovs  %edx,%eax
  mov    $0xff,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  mov    %eax,(%r9,%rcx,4)
  add    $0x1,%rcx
  cmp    %ecx,%r10d
  jg     L55
L19:
  add    $0x1,%r14d
  add    0x4(%rsp),%r13d
  cmp    0x18(%rsp),%r14d
  je     L99
L71:
  cmp    %r10d,%ebp
  jl     L118
  jmp    L19
L99:
  mov    0x1c(%rsp),%r8d
  mov    0x4(%rsp),%r12d
  imul   %r12d,%r8d
  mov    $0x0,%edi
  lea    0x20(%rsp),%r9
  mov    0x8(%rsp),%r13
  mov    0x18(%rsp),%r11d
  jmp    L22
L74:
  mov    %edi,%eax
  shl    $0x6,%eax
  cltq
  lea    (%r15,%rax,4),%rcx
  add    %r9,%rcx
  movslq %r8d,%rax
  lea    (%rbx,%rax,4),%rsi
  mov    %r13,%rax
L4:
  mov    (%rcx,%rax,4),%edx
  mov    %edx,(%rsi,%rax,4)
  add    $0x1,%rax
  cmp    %eax,%r10d
  jg     L4
L81:
  add    $0x1,%edi
  add    %r12d,%r8d
  cmp    %r11d,%edi
  je     L80
L22:
  cmp    %r10d,%ebp
  jl     L74
  jmp    L81
L80:
  mov    0x4028(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L68
  add    $0x4038,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L68:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void clpf_block(uint8_t *rec, int x0, int x1, int y0, int y1, int stride) {
  int y, x, A, B, C, D, X, Xprime, delta, sum, sign;
  uint8_t tmp_block[64 * 64];
  for (y = y0; y < y1; y++) {
    for (x = x0; x < x1; x++) {
      A = rec[(y - 1) * stride + x + 0];
      B = rec[(y + 0) * stride + x - 1];
      X = rec[(y + 0) * stride + x + 0];
      C = rec[(y + 0) * stride + x + 1];
      D = rec[(y + 1) * stride + x + 0];
      sum = A + B + C + D - 4 * X;
      sign = sum < 0 ? -1 : 1;
      delta = sign * ((1) < (((abs(sum) + 2) >> 2)) ? (1) : (((abs(sum) + 2) >> 2)));
      Xprime = ((255) < (((0) > ((X + delta)) ? (0) : ((X + delta)))) ? (255) : (((0) > ((X + delta)) ? (0) : ((X + delta)))));
      tmp_block[(y - y0) * 64 + x - x0] = Xprime;
    }
  }
  for (y = y0; y < y1; y++) {
    for (x = x0; x < x1; x++) {
      rec[y * stride + x] = tmp_block[(y - y0) * 64 + x - x0];
    }
  }
}
```