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

```asm
<get_downleftleft_pred>:
  endbr64
  push   %rbx
  movslq %edx,%rax
  sub    $0x310,%rsp
  mov    %fs:0x28,%rdx
  mov    %rdx,0x308(%rsp)
  xor    %edx,%edx
  test   %eax,%eax
  jle    L86
  test   %r8d,%r8d
  jle    L166
  imul   %ecx,%esi
  movslq %ecx,%r10
  lea    -0x1(%r8),%ecx
  shl    $0x2,%r10
  movslq %esi,%rdx
  lea    0x4(%rsp,%rcx,4),%rsi
  add    %rdx,%rax
  lea    (%rdi,%rax,4),%rdx
  mov    %rsp,%rax
  mov    %rcx,%rdi
  cs nopw 0x0(%rax,%rax,1)
L4:
  mov    -0x4(%rdx),%ecx
  add    $0x4,%rax
  add    %r10,%rdx
  mov    %ecx,-0x4(%rax)
  cmp    %rsi,%rax
  jne    L4
L72:
  mov    (%rsp),%edx
  mov    0x4(%rsp),%esi
  lea    (%rdx,%rdx,2),%eax
  lea    0x2(%rsi,%rax,1),%eax
  sar    $0x2,%eax
  mov    %eax,0x100(%rsp)
  cmp    $0x1,%edi
  jle    L8
  lea    -0x3(%r8),%r10d
  lea    0x104(%rsp),%rax
  lea    0x8(%rsp),%rcx
  lea    0x108(%rsp,%r10,4),%r10
  jmp    L65
  nopw   0x0(%rax,%rax,1)
L92:
  mov    -0x8(%rcx),%edx
L65:
  lea    (%rdx,%rsi,2),%edx
  mov    (%rcx),%esi
  add    $0x4,%rax
  add    $0x4,%rcx
  lea    0x2(%rdx,%rsi,1),%edx
  sar    $0x2,%edx
  mov    %edx,-0x4(%rax)
  cmp    %rax,%r10
  jne    L92
L8:
  lea    -0x2(%r8),%eax
  movslq %edi,%rcx
  lea    (%r8,%r8,1),%esi
  cltq
  mov    (%rsp,%rcx,4),%edx
  mov    (%rsp,%rax,4),%eax
  lea    (%rax,%rdx,2),%eax
  lea    0x2(%rdx,%rax,1),%edx
  lea    -0x1(%rsi),%eax
  sar    $0x2,%edx
  mov    %edx,0x100(%rsp,%rcx,4)
  cmp    %eax,%r8d
  jge    L197
  sub    %r8d,%esi
  movslq %r8d,%rdi
  sub    $0x2,%esi
  lea    0x100(%rsp,%rdi,4),%rax
  add    %rdi,%rsi
  lea    0x104(%rsp,%rsi,4),%rsi
  jmp    L112
  nopl   0x0(%rax)
L19:
  mov    0x100(%rsp,%rcx,4),%edx
L112:
  mov    %edx,(%rax)
  add    $0x4,%rax
  cmp    %rax,%rsi
  jne    L19
L197:
  test   %r8d,%r8d
  jle    L69
  lea    (%r8,%r8,2),%ebx
  mov    %r8d,%edi
  xor    %r11d,%r11d
  xor    %r10d,%r10d
  nopl   0x0(%rax)
L57:
  movslq %r10d,%rax
  lea    (%r9,%rax,4),%rcx
  mov    %r11d,%eax
  jmp    L14
  nopl   0x0(%rax)
L54:
  add    $0x1,%eax
  add    $0x4,%rcx
  mov    %eax,%edx
  sar    %edx
  movslq %edx,%rdx
  mov    0x100(%rsp,%rdx,4),%edx
  mov    %edx,-0x4(%rcx)
  cmp    %edi,%eax
  je     L55
L14:
  test   $0x1,%al
  jne    L54
  mov    %eax,%edx
  add    $0x1,%eax
  add    $0x4,%rcx
  sar    %edx
  lea    0x1(%rdx),%esi
  movslq %edx,%rdx
  movslq %esi,%rsi
  mov    0x100(%rsp,%rdx,4),%edx
  add    0x100(%rsp,%rsi,4),%edx
  sar    %edx
  mov    %edx,-0x4(%rcx)
  cmp    %edi,%eax
  jne    L14
L55:
  add    $0x2,%edi
  add    %r8d,%r10d
  add    $0x2,%r11d
  cmp    %edi,%ebx
  jne    L57
L69:
  mov    0x308(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L29
  add    $0x310,%rsp
  pop    %rbx
  ret
L86:
  test   %r8d,%r8d
  jle    L166
  lea    -0x1(%r8),%edx
  mov    %rsp,%rax
  mov    %rdx,%rdi
  lea    0x4(%rsp,%rdx,4),%rdx
  nopl   0x0(%rax)
L93:
  movl   $0x80,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L93
  jmp    L72
L166:
  lea    -0x1(%r8),%edi
  jmp    L72
L29:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void get_downleftleft_pred(uint8_t *rec, int ypos, int xpos, int stride, int size, uint8_t *pblock) {
  int i, j, diag;
  uint16_t hor[64];
  uint8_t horF[2 * 64];
  if (xpos > 0) {
    for (i = 0; i < size; i++) {
      hor[i] = rec[(ypos + i) * stride + xpos - 1];
    }
  } else {
    for (i = 0; i < size; i++) {
      hor[i] = 128;
    }
  }
  horF[0] = (uint8_t)((hor[0] + 2 * hor[0] + hor[1] + 2) >> 2);
  for (j = 1; j < size - 1; j++) {
    horF[j] = (uint8_t)((hor[j - 1] + 2 * hor[j] + hor[j + 1] + 2) >> 2);
  }
  horF[size - 1] = (uint8_t)((hor[size - 2] + 2 * hor[size - 1] + hor[size - 1] + 2) >> 2);
  for (j = size; j < 2 * size - 1; j++) {
    horF[j] = horF[size - 1];
  }
  for (i = 0; i < size; i++) {
    for (j = 0; j < size; j++) {
      diag = 2 * i + j;
      if (diag & 1)
        pblock[i * size + j] = horF[(diag + 1) / 2];
      else
        pblock[i * size + j] = (horF[diag / 2] + horF[diag / 2 + 1]) >> 1;
    }
  }
}
```