user: 请将以下的汇编代码转换成C语言代码：

```asm
<get_upupright_pred>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  lea    (%r8,%r8,1),%r12d
  push   %rbp
  push   %rbx
  mov    %r8d,%ebx
  sub    $0x428,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x418(%rsp)
  xor    %eax,%eax
  mov    0x460(%rsp),%rbp
  test   %esi,%esi
  jle    L113
  mov    %rdi,%r14
  mov    %esi,%r13d
  mov    %edx,%r15d
  test   %r8d,%r8d
  jle    L85
  lea    -0x1(%rsi),%eax
  movslq %r8d,%rdx
  lea    0x10(%rsp),%rdi
  mov    %ecx,0xc(%rsp)
  imul   %ecx,%eax
  shl    $0x2,%rdx
  add    %r15d,%eax
  cltq
  lea    (%r14,%rax,4),%rsi
  call   <memcpy@plt>
  mov    0xc(%rsp),%ecx
L85:
  mov    0x468(%rsp),%eax
  test   %eax,%eax
  je     L169
  cmp    %r12d,%ebx
  jge    L174
  mov    %r12d,%eax
  movslq %ebx,%rdx
  sub    %ebx,%eax
  lea    0x10(%rsp,%rdx,4),%rdi
  sub    $0x1,%eax
  lea    0x4(,%rax,4),%r8
  lea    -0x1(%r13),%eax
  imul   %ecx,%eax
  add    %r15d,%eax
  cltq
  add    %rdx,%rax
  mov    %r8,%rdx
  lea    (%r14,%rax,4),%rsi
  call   <memcpy@plt>
  lea    -0x1(%r12),%r8d
L171:
  mov    0x10(%rsp),%edx
  mov    0x14(%rsp),%esi
  lea    (%rdx,%rdx,2),%eax
  lea    0x2(%rsi,%rax,1),%eax
  sar    $0x2,%eax
  mov    %eax,0x210(%rsp)
  cmp    $0x1,%r8d
  jle    L122
  lea    -0x3(%r12),%edi
  lea    0x214(%rsp),%rax
  lea    0x18(%rsp),%rcx
  lea    0x218(%rsp,%rdi,4),%rdi
  jmp    L120
L58:
  mov    -0x8(%rcx),%edx
L120:
  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,%rdi
  jne    L58
L122:
  lea    -0x2(%r12),%eax
  movslq %r8d,%r8
  cltq
  mov    0x10(%rsp,%r8,4),%edx
  mov    0x10(%rsp,%rax,4),%eax
  lea    (%rax,%rdx,2),%eax
  lea    0x2(%rdx,%rax,1),%eax
  sar    $0x2,%eax
  mov    %eax,0x210(%rsp,%r8,4)
  test   %ebx,%ebx
  jle    L1
  lea    (%rbx,%rbx,1),%r8d
  xor    %edi,%edi
  lea    (%r8,%rbx,1),%r9d
  mov    %r8d,%esi
  nopl   0x0(%rax)
L63:
  mov    %esi,%eax
  movslq %edi,%rdx
  sub    %r8d,%eax
  lea    0x0(%rbp,%rdx,4),%rcx
  jmp    L163
  nop
L3:
  lea    0x1(%rax),%edx
  add    $0x2,%eax
  add    $0x4,%rcx
  sar    %edx
  movslq %edx,%rdx
  mov    0x210(%rsp,%rdx,4),%edx
  mov    %edx,-0x4(%rcx)
  cmp    %esi,%eax
  je     L39
L163:
  test   $0x1,%al
  jne    L3
  mov    %eax,%edx
  add    $0x2,%eax
  add    $0x4,%rcx
  sar    %edx
  lea    0x1(%rdx),%r10d
  movslq %edx,%rdx
  movslq %r10d,%r10
  mov    0x210(%rsp,%rdx,4),%edx
  add    0x210(%rsp,%r10,4),%edx
  sar    %edx
  mov    %edx,-0x4(%rcx)
  cmp    %esi,%eax
  jne    L163
L39:
  add    $0x1,%esi
  add    %ebx,%edi
  cmp    %esi,%r9d
  jne    L63
L1:
  mov    0x418(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L78
  add    $0x428,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L169:
  cmp    %r12d,%ebx
  jge    L174
  lea    -0x1(%r13),%eax
  mov    %r12d,%edx
  movslq %ebx,%rsi
  imul   %ecx,%eax
  sub    %ebx,%edx
  sub    $0x1,%edx
  add    %rsi,%rdx
  add    %r15d,%eax
  lea    0x14(%rsp,%rdx,4),%rdx
  add    %ebx,%eax
  cltq
  mov    -0x4(%r14,%rax,4),%ecx
  lea    0x10(%rsp,%rsi,4),%rax
  nopl   0x0(%rax)
L102:
  mov    %ecx,(%rax)
  add    $0x4,%rax
  cmp    %rax,%rdx
  jne    L102
L174:
  lea    -0x1(%r12),%r8d
  jmp    L171
L113:
  test   %r12d,%r12d
  jle    L174
  lea    -0x1(%r12),%edx
  lea    0x10(%rsp),%rax
  mov    %rdx,%r8
  lea    0x14(%rsp,%rdx,4),%rdx
  nopl   0x0(%rax)
L152:
  movl   $0x80,(%rax)
  add    $0x4,%rax
  cmp    %rax,%rdx
  jne    L152
  jmp    L171
L78:
  call   <__stack_chk_fail@plt>
```

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