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

```asm
<clpf_block>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x4000(%rsp),%r11
L60:
  sub    $0x1000,%rsp
  orq    $0x0,(%rsp)
  cmp    %r11,%rsp
  jne    L60
  sub    $0xa8,%rsp
  mov    %edx,0x58(%rsp)
  mov    %ecx,0x74(%rsp)
  mov    %r8d,0x78(%rsp)
  mov    %r9d,0x18(%rsp)
  mov    %fs:0x28,%rdx
  mov    %rdx,0x4098(%rsp)
  xor    %edx,%edx
  cmp    %r8d,%ecx
  jge    L58
  mov    0x58(%rsp),%ebx
  mov    %esi,%r13d
  cmp    %ebx,%esi
  jge    L58
  mov    0x18(%rsp),%r10d
  mov    %rdi,%rax
  lea    -0x1(%rcx),%r11d
  mov    %ecx,%r15d
  mov    %ebx,%r8d
  movdqa D10(%rip),%xmm2
  pxor   %xmm3,%xmm3
  movdqa D16(%rip),%xmm5
  movslq %r10d,%rdi
  sub    %r13d,%r8d
  movdqa D17(%rip),%xmm4
  imul   %edi,%r11d
  mov    %rdi,%rsi
  mov    %rdi,0x10(%rsp)
  lea    -0x1(%r8),%r9d
  mov    %r8d,0x30(%rsp)
  mov    %r9d,0x34(%rsp)
  lea    (%rdi,%r11,1),%edx
  shl    $0x2,%rdi
  mov    %rdi,0x20(%rsp)
  movslq %r13d,%rdi
  movslq %edx,%rcx
  mov    %rdi,%rdx
  mov    %rcx,0x8(%rsp)
  add    %rcx,%rdx
  mov    0x78(%rsp),%ecx
  mov    %rdi,0x88(%rsp)
  lea    0x90(%rsp),%rdi
  mov    %rdi,0x80(%rsp)
  lea    (%rax,%rdx,4),%rdx
  sub    %r15d,%ecx
  shl    $0x6,%ecx
  mov    %ecx,0x28(%rsp)
  lea    (%rsi,%rsi,1),%ecx
  mov    %ecx,0x3c(%rsp)
  mov    %r15d,%ecx
  imul   %r10d,%ecx
  movslq %ecx,%rsi
  movslq %r11d,%rcx
  sub    %rsi,%rcx
  shl    $0x2,%rcx
  mov    %rcx,0x40(%rsp)
  lea    0x1(%r15),%ecx
  imul   %r10d,%ecx
  lea    -0x1(%rbx),%r10d
  mov    %r10d,0x1c(%rsp)
  movslq %ecx,%rcx
  sub    %rsi,%rcx
  lea    0x0(,%rcx,4),%rsi
  mov    %r8d,%ecx
  and    $0xfffffffc,%r8d
  shr    $0x2,%ecx
  mov    %rsi,0x48(%rsp)
  lea    -0x1(%rcx),%ebp
  lea    0x0(%r13,%r8,1),%ecx
  mov    %r8d,0x38(%rsp)
  add    $0x1,%rbp
  shl    $0x4,%rbp
  cmp    $0x2,%r9d
  cmovbe %r13d,%ecx
  movslq %ecx,%rsi
  mov    %rsi,%r8
  cmp    %esi,%ebx
  lea    0x1(%rsi),%ecx
  mov    %esi,0x60(%rsp)
  lea    0x2(%r8),%ebx
  mov    %rsi,0x50(%rsp)
  setg   %sil
  cmp    %ecx,%r10d
  mov    %ebx,0x68(%rsp)
  lea    0x3(%r8),%ebx
  mov    %ebx,0x2c(%rsp)
  lea    0x4(%r8),%ebx
  mov    %ecx,0x64(%rsp)
  setg   %cl
  mov    %ebx,0x70(%rsp)
  lea    0x5(%r8),%ebx
  and    %ecx,%esi
  mov    %ebx,0x6c(%rsp)
  lea    0x6(%r8),%ebx
  xor    %r8d,%r8d
  mov    %sil,0x5f(%rsp)
  mov    %ebx,0x7c(%rsp)
L73:
  mov    0x3c(%rsp),%ebx
  mov    %r11d,%r10d
  add    0x18(%rsp),%r11d
  cmpl   $0x2,0x34(%rsp)
  lea    (%r10,%rbx,1),%r12d
  jbe    L65
  mov    0x40(%rsp),%rbx
  mov    0x48(%rsp),%rsi
  lea    0x4(%rdx),%r9
  xor    %ecx,%ecx
  lea    (%rdx,%rbx,1),%r14
  add    %rdx,%rsi
  lea    -0x4(%rdx),%rbx
  cs nopw 0x0(%rax,%rax,1)
L68:
  movdqu (%rbx,%rcx,1),%xmm7
  movdqu (%r14,%rcx,1),%xmm0
  movdqa %xmm3,%xmm6
  movdqu (%rdx,%rcx,1),%xmm1
  paddd  %xmm7,%xmm0
  movdqu (%r9,%rcx,1),%xmm7
  pslld  $0x2,%xmm1
  paddd  %xmm7,%xmm0
  movdqu (%rsi,%rcx,1),%xmm7
  paddd  %xmm7,%xmm0
  movdqa %xmm2,%xmm7
  psubd  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  pcmpgtd %xmm0,%xmm6
  psrad  $0x1f,%xmm1
  pxor   %xmm1,%xmm0
  psubd  %xmm1,%xmm0
  por    %xmm2,%xmm6
  paddd  %xmm5,%xmm0
  psrad  $0x2,%xmm0
  movdqa %xmm0,%xmm1
  pcmpgtd %xmm2,%xmm1
  pand   %xmm1,%xmm7
  pandn  %xmm0,%xmm1
  movdqa %xmm1,%xmm0
  por    %xmm7,%xmm0
  movdqa %xmm0,%xmm1
  psrlq  $0x20,%xmm0
  pmuludq %xmm6,%xmm1
  psrlq  $0x20,%xmm6
  pmuludq %xmm6,%xmm0
  movdqa %xmm4,%xmm6
  pshufd $0x8,%xmm1,%xmm1
  pshufd $0x8,%xmm0,%xmm0
  punpckldq %xmm0,%xmm1
  movdqu (%rdx,%rcx,1),%xmm0
  paddd  %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  pcmpgtd %xmm3,%xmm1
  pand   %xmm1,%xmm0
  movdqa %xmm0,%xmm1
  pcmpgtd %xmm4,%xmm1
  pand   %xmm1,%xmm6
  pandn  %xmm0,%xmm1
  por    %xmm6,%xmm1
  movaps %xmm1,(%rdi,%rcx,1)
  add    $0x10,%rcx
  cmp    %rcx,%rbp
  jne    L68
  mov    0x38(%rsp),%esi
  cmp    %esi,0x30(%rsp)
  je     L148
L65:
  mov    0x50(%rsp),%rsi
  add    0x8(%rsp),%rsi
  shl    $0x2,%rsi
  cmpb   $0x0,0x5f(%rsp)
  lea    (%rax,%rsi,1),%rcx
  je     L5
  mov    0x60(%rsp),%ebx
  mov    0x4(%rax,%rsi,1),%r9d
  mov    (%rcx),%r14d
  mov    -0x4(%rcx),%ecx
  lea    (%r10,%rbx,1),%esi
  movslq %esi,%rsi
  add    (%rax,%rsi,4),%ecx
  lea    (%rbx,%r12,1),%esi
  add    %r8d,%ebx
  movslq %esi,%rsi
  add    %r9d,%ecx
  sub    %r13d,%ebx
  add    (%rax,%rsi,4),%ecx
  lea    0x0(,%r14,4),%esi
  movslq %ebx,%rbx
  sub    %esi,%ecx
  mov    %ecx,%r15d
  mov    %ecx,%esi
  sar    $0x1f,%r15d
  or     $0x1,%r15d
  neg    %esi
  cmovns %esi,%ecx
  mov    $0x1,%esi
  add    $0x2,%ecx
  sar    $0x2,%ecx
  test   %ecx,%ecx
  cmovg  %esi,%ecx
  mov    $0x0,%esi
  imul   %r15d,%ecx
  add    %r14d,%ecx
  cmovs  %esi,%ecx
  mov    $0xff,%esi
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  mov    0x64(%rsp),%esi
  mov    %ecx,0x90(%rsp,%rbx,4)
  lea    (%rsi,%r11,1),%ecx
  movslq %ecx,%rcx
  mov    0x4(%rax,%rcx,4),%ebx
  lea    (%r10,%rsi,1),%ecx
  movslq %ecx,%rcx
  add    (%rax,%rcx,4),%r14d
  lea    (%r14,%rbx,1),%ecx
  mov    %esi,%r14d
  lea    (%rsi,%r12,1),%esi
  movslq %esi,%rsi
  add    %r8d,%r14d
  add    (%rax,%rsi,4),%ecx
  lea    0x0(,%r9,4),%esi
  sub    %r13d,%r14d
  sub    %esi,%ecx
  movslq %r14d,%r14
  mov    %ecx,%r15d
  mov    %ecx,%esi
  sar    $0x1f,%r15d
  or     $0x1,%r15d
  neg    %esi
  cmovns %esi,%ecx
  mov    $0x1,%esi
  add    $0x2,%ecx
  sar    $0x2,%ecx
  test   %ecx,%ecx
  cmovg  %esi,%ecx
  mov    $0x0,%esi
  imul   %r15d,%ecx
  mov    0x68(%rsp),%r15d
  add    %r9d,%ecx
  cmovs  %esi,%ecx
  mov    $0xff,%esi
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  mov    %ecx,0x90(%rsp,%r14,4)
  mov    0x2c(%rsp),%r14d
  mov    %r15d,%ecx
  cmp    %r14d,0x1c(%rsp)
  jle    L117
  lea    (%r15,%r11,1),%ecx
  mov    %r15d,%r14d
  movslq %ecx,%rcx
  lea    (%r8,%r14,1),%r14d
  mov    0x4(%rax,%rcx,4),%esi
  lea    (%r10,%r15,1),%ecx
  sub    %r13d,%r14d
  movslq %ecx,%rcx
  movslq %r14d,%r14
  add    (%rax,%rcx,4),%r9d
  mov    %r15d,%ecx
  add    %r12d,%ecx
  add    %esi,%r9d
  movslq %ecx,%rcx
  add    (%rax,%rcx,4),%r9d
  lea    0x0(,%rbx,4),%ecx
  sub    %ecx,%r9d
  mov    %r9d,%r15d
  mov    %r9d,%ecx
  sar    $0x1f,%r15d
  or     $0x1,%r15d
  neg    %ecx
  cmovs  %r9d,%ecx
  mov    $0x1,%r9d
  add    $0x2,%ecx
  sar    $0x2,%ecx
  test   %ecx,%ecx
  cmovg  %r9d,%ecx
  mov    $0x0,%r9d
  imul   %r15d,%ecx
  add    %ebx,%ecx
  cmovs  %r9d,%ecx
  mov    $0xff,%r9d
  cmp    %r9d,%ecx
  cmovg  %r9d,%ecx
  mov    %ecx,0x90(%rsp,%r14,4)
  mov    0x2c(%rsp),%r14d
  lea    (%r14,%r11,1),%ecx
  movslq %ecx,%rcx
  mov    0x4(%rax,%rcx,4),%r9d
  lea    (%r10,%r14,1),%ecx
  movslq %ecx,%rcx
  add    (%rax,%rcx,4),%ebx
  lea    (%r14,%r12,1),%ecx
  add    %r8d,%r14d
  movslq %ecx,%rcx
  add    %r9d,%ebx
  sub    %r13d,%r14d
  add    (%rax,%rcx,4),%ebx
  lea    0x0(,%rsi,4),%ecx
  movslq %r14d,%r14
  sub    %ecx,%ebx
  mov    %ebx,%r15d
  mov    %ebx,%ecx
  sar    $0x1f,%r15d
  or     $0x1,%r15d
  neg    %ecx
  cmovs  %ebx,%ecx
  mov    $0x1,%ebx
  add    $0x2,%ecx
  sar    $0x2,%ecx
  test   %ecx,%ecx
  cmovg  %ebx,%ecx
  mov    $0x0,%ebx
  imul   %r15d,%ecx
  mov    0x6c(%rsp),%r15d
  add    %esi,%ecx
  cmovs  %ebx,%ecx
  mov    $0xff,%ebx
  cmp    %ebx,%ecx
  cmovg  %ebx,%ecx
  mov    %ecx,0x90(%rsp,%r14,4)
  mov    0x70(%rsp),%r14d
  mov    %r14d,%ecx
  cmp    %r15d,0x1c(%rsp)
  jle    L117
  lea    (%r14,%r11,1),%ecx
  mov    %r14d,%r15d
  movslq %ecx,%rcx
  mov    0x4(%rax,%rcx,4),%ebx
  lea    (%r10,%r14,1),%ecx
  movslq %ecx,%rcx
  add    (%rax,%rcx,4),%esi
  lea    (%rsi,%rbx,1),%ecx
  mov    %r14d,%esi
  lea    0x0(,%r9,4),%r14d
  add    %r12d,%esi
  movslq %esi,%rsi
  add    (%rax,%rsi,4),%ecx
  mov    %r15d,%esi
  sub    %r14d,%ecx
  add    %r8d,%esi
  mov    %ecx,%r14d
  mov    %ecx,%r15d
  sub    %r13d,%esi
  sar    $0x1f,%r14d
  movslq %esi,%rsi
  or     $0x1,%r14d
  neg    %r15d
  cmovns %r15d,%ecx
  mov    $0x1,%r15d
  add    $0x2,%ecx
  sar    $0x2,%ecx
  test   %ecx,%ecx
  cmovg  %r15d,%ecx
  mov    0x6c(%rsp),%r15d
  imul   %r14d,%ecx
  mov    $0x0,%r14d
  add    %r9d,%ecx
  cmovs  %r14d,%ecx
  mov    $0xff,%r14d
  cmp    %r14d,%ecx
  cmovg  %r14d,%ecx
  mov    %ecx,0x90(%rsp,%rsi,4)
  lea    (%r10,%r15,1),%ecx
  lea    (%r15,%r11,1),%esi
  movslq %ecx,%rcx
  movslq %esi,%rsi
  add    (%rax,%rcx,4),%r9d
  mov    %r9d,%ecx
  add    0x4(%rax,%rsi,4),%ecx
  lea    (%r15,%r12,1),%esi
  movslq %esi,%rsi
  lea    (%r8,%r15,1),%r9d
  add    (%rax,%rsi,4),%ecx
  lea    0x0(,%rbx,4),%esi
  sub    %r13d,%r9d
  sub    %esi,%ecx
  movslq %r9d,%r9
  mov    %ecx,%r14d
  mov    %ecx,%esi
  sar    $0x1f,%r14d
  or     $0x1,%r14d
  neg    %esi
  cmovns %esi,%ecx
  mov    $0x1,%esi
  add    $0x2,%ecx
  sar    $0x2,%ecx
  test   %ecx,%ecx
  cmovg  %esi,%ecx
  mov    $0x0,%esi
  imul   %r14d,%ecx
  add    %ebx,%ecx
  cmovs  %esi,%ecx
  mov    $0xff,%esi
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  mov    %ecx,0x90(%rsp,%r9,4)
  mov    0x7c(%rsp),%ecx
L117:
  lea    (%rcx,%r11,1),%esi
  movslq %esi,%rsi
  lea    0x0(,%rsi,4),%r9
  mov    (%rax,%rsi,4),%r15d
  lea    (%r10,%rcx,1),%esi
  movslq %esi,%rsi
  mov    -0x4(%rax,%r9,1),%ebx
  add    (%rax,%rsi,4),%ebx
  mov    0x4(%rax,%r9,1),%esi
  lea    (%rcx,%r12,1),%r9d
  movslq %r9d,%r9
  add    %ebx,%esi
  add    (%rax,%r9,4),%esi
  lea    0x0(,%r15,4),%r9d
  sub    %r9d,%esi
  lea    (%r8,%rcx,1),%ebx
  mov    %esi,%r14d
  mov    %esi,%r9d
  sub    %r13d,%ebx
  sar    $0x1f,%r14d
  movslq %ebx,%rbx
  or     $0x1,%r14d
  neg    %r9d
  cmovns %r9d,%esi
  mov    $0x1,%r9d
  add    $0x2,%esi
  sar    $0x2,%esi
  test   %esi,%esi
  cmovg  %r9d,%esi
  mov    $0x0,%r9d
  imul   %r14d,%esi
  add    %r15d,%esi
  cmovs  %r9d,%esi
  mov    $0xff,%r9d
  cmp    %r9d,%esi
  cmovg  %r9d,%esi
  lea    0x1(%rcx),%r9d
  mov    %esi,0x90(%rsp,%rbx,4)
  cmp    %r9d,0x58(%rsp)
  jle    L148
  lea    (%r9,%r11,1),%esi
  movslq %esi,%rsi
  lea    0x0(,%rsi,4),%rbx
  mov    (%rax,%rsi,4),%r15d
  lea    (%r10,%r9,1),%esi
  movslq %esi,%rsi
  mov    -0x4(%rax,%rbx,1),%r14d
  add    (%rax,%rsi,4),%r14d
  mov    0x4(%rax,%rbx,1),%esi
  lea    (%r9,%r12,1),%ebx
  add    %r8d,%r9d
  movslq %ebx,%rbx
  sub    %r13d,%r9d
  add    %r14d,%esi
  add    (%rax,%rbx,4),%esi
  lea    0x0(,%r15,4),%ebx
  sub    %ebx,%esi
  movslq %r9d,%rbx
  mov    %esi,%r14d
  mov    %esi,%r9d
  sar    $0x1f,%r14d
  or     $0x1,%r14d
  neg    %r9d
  cmovns %r9d,%esi
  mov    $0x1,%r9d
  add    $0x2,%esi
  sar    $0x2,%esi
  test   %esi,%esi
  cmovg  %r9d,%esi
  mov    $0x0,%r9d
  imul   %r14d,%esi
  add    %r15d,%esi
  cmovs  %r9d,%esi
  mov    $0xff,%r9d
  cmp    %r9d,%esi
  cmovg  %r9d,%esi
  add    $0x2,%ecx
  mov    %esi,0x90(%rsp,%rbx,4)
  cmp    %ecx,0x58(%rsp)
  jle    L148
  lea    (%rcx,%r11,1),%esi
  add    %ecx,%r10d
  add    %ecx,%r12d
  add    %r8d,%ecx
  movslq %esi,%rsi
  movslq %r10d,%r10
  movslq %r12d,%r12
  sub    %r13d,%ecx
  lea    0x0(,%rsi,4),%r9
  mov    (%rax,%rsi,4),%esi
  mov    -0x4(%rax,%r9,1),%ebx
  add    (%rax,%r10,4),%ebx
  mov    0x4(%rax,%r9,1),%r10d
  add    %ebx,%r10d
  lea    0x0(,%rsi,4),%ebx
  add    (%rax,%r12,4),%r10d
  sub    %ebx,%r10d
  movslq %ecx,%rbx
  mov    %r10d,%r9d
  sar    $0x1f,%r10d
  mov    %r9d,%ecx
  or     $0x1,%r10d
  neg    %ecx
  cmovs  %r9d,%ecx
  mov    $0x1,%r9d
  add    $0x2,%ecx
  sar    $0x2,%ecx
  test   %ecx,%ecx
  cmovg  %r9d,%ecx
  imul   %r10d,%ecx
  add    %esi,%ecx
  mov    $0x0,%esi
  cmovs  %esi,%ecx
  mov    $0xff,%esi
  cmp    %esi,%ecx
  cmovg  %esi,%ecx
  mov    %ecx,0x90(%rsp,%rbx,4)
L148:
  mov    0x10(%rsp),%rsi
  add    $0x40,%r8d
  add    %rsi,0x8(%rsp)
  add    $0x100,%rdi
  add    0x20(%rsp),%rdx
  cmp    %r8d,0x28(%rsp)
  jne    L73
  mov    0x74(%rsp),%edi
  mov    0x18(%rsp),%edx
  mov    %rsi,%rbx
  mov    0x80(%rsp),%rbp
  shl    $0x2,%rbx
  imul   %edi,%edx
  movslq %edx,%rdx
  add    0x88(%rsp),%rdx
  lea    (%rax,%rdx,4),%rcx
  mov    0x78(%rsp),%eax
  sub    $0x1,%eax
  sub    %edi,%eax
  shl    $0x8,%rax
  lea    0x190(%rsp,%rax,1),%r12
  mov    0x1c(%rsp),%eax
  sub    %r13d,%eax
  lea    0x4(,%rax,4),%r13
  nopl   0x0(%rax,%rax,1)
L131:
  mov    %rbp,%rsi
  mov    %rcx,%rdi
  mov    %r13,%rdx
  add    $0x100,%rbp
  call   <memcpy@plt>
  mov    %rax,%rcx
  add    %rbx,%rcx
  cmp    %rbp,%r12
  jne    L131
L58:
  mov    0x4098(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L113
  add    $0x40a8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L5:
  mov    0x60(%rsp),%ecx
  jmp    L117
L113:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D10
type: byte[16]
name: parse_data
arguments: data_label: D16
type: byte[16]
name: parse_data
arguments: data_label: D17
type: byte[16]

tool: {"D10": [0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00]}

tool: {"D16": [0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x00,0x00,0x00]}

tool: {"D17": [0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00]}

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];
    }
  }
}
```