user: Translate the below assembly code into C programming language:

```asm
<get_upupleft_pred>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x450,%rsp
  mov    %rdi,-0x438(%rbp)
  mov    %esi,-0x43c(%rbp)
  mov    %edx,-0x440(%rbp)
  mov    %ecx,-0x444(%rbp)
  mov    %r8d,-0x448(%rbp)
  mov    %r9,-0x450(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  cmpl   $0x0,-0x43c(%rbp)
  jle    L50
  movl   $0x0,-0x420(%rbp)
  jmp    L83
L255:
  mov    -0x43c(%rbp),%eax
  sub    $0x1,%eax
  imul   -0x444(%rbp),%eax
  mov    %eax,%edx
  mov    -0x440(%rbp),%eax
  add    %eax,%edx
  mov    -0x420(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x438(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x420(%rbp),%eax
  cltq
  mov    %edx,-0x410(%rbp,%rax,4)
  addl   $0x1,-0x420(%rbp)
L83:
  mov    -0x420(%rbp),%eax
  cmp    -0x448(%rbp),%eax
  jl     L255
  jmp    L288
L50:
  movl   $0x0,-0x420(%rbp)
  jmp    L14
L24:
  mov    -0x420(%rbp),%eax
  cltq
  movl   $0x80,-0x410(%rbp,%rax,4)
  addl   $0x1,-0x420(%rbp)
L14:
  mov    -0x420(%rbp),%eax
  cmp    -0x448(%rbp),%eax
  jl     L24
L288:
  cmpl   $0x0,-0x440(%rbp)
  jle    L296
  movl   $0x0,-0x424(%rbp)
  jmp    L266
L104:
  mov    -0x43c(%rbp),%edx
  mov    -0x424(%rbp),%eax
  add    %edx,%eax
  imul   -0x444(%rbp),%eax
  mov    %eax,%edx
  mov    -0x440(%rbp),%eax
  add    %edx,%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x438(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x424(%rbp),%eax
  cltq
  mov    %edx,-0x310(%rbp,%rax,4)
  addl   $0x1,-0x424(%rbp)
L266:
  mov    -0x424(%rbp),%eax
  cmp    -0x448(%rbp),%eax
  jl     L104
  jmp    L34
L296:
  movl   $0x0,-0x424(%rbp)
  jmp    L123
L310:
  mov    -0x424(%rbp),%eax
  cltq
  movl   $0x80,-0x310(%rbp,%rax,4)
  addl   $0x1,-0x424(%rbp)
L123:
  mov    -0x424(%rbp),%eax
  cmp    -0x448(%rbp),%eax
  jl     L310
L34:
  cmpl   $0x0,-0x440(%rbp)
  jle    L64
  cmpl   $0x0,-0x43c(%rbp)
  jle    L64
  mov    -0x43c(%rbp),%eax
  sub    $0x1,%eax
  imul   -0x444(%rbp),%eax
  mov    %eax,%edx
  mov    -0x440(%rbp),%eax
  add    %edx,%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x438(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x41c(%rbp)
  jmp    L8
L64:
  movl   $0x80,-0x41c(%rbp)
L8:
  mov    -0x410(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x40c(%rbp),%eax
  add    %edx,%eax
  add    $0x2,%eax
  sar    $0x2,%eax
  mov    %eax,-0x210(%rbp)
  movl   $0x1,-0x420(%rbp)
  jmp    L0
L22:
  mov    -0x420(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x410(%rbp,%rax,4),%edx
  mov    -0x420(%rbp),%eax
  cltq
  mov    -0x410(%rbp,%rax,4),%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x420(%rbp),%eax
  add    $0x1,%eax
  cltq
  mov    -0x410(%rbp,%rax,4),%eax
  add    %edx,%eax
  add    $0x2,%eax
  sar    $0x2,%eax
  mov    %eax,%edx
  mov    -0x420(%rbp),%eax
  cltq
  mov    %edx,-0x210(%rbp,%rax,4)
  addl   $0x1,-0x420(%rbp)
L0:
  mov    -0x448(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x420(%rbp)
  jl     L22
  mov    -0x448(%rbp),%eax
  sub    $0x2,%eax
  cltq
  mov    -0x410(%rbp,%rax,4),%edx
  mov    -0x448(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x410(%rbp,%rax,4),%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x448(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x410(%rbp,%rax,4),%eax
  add    %edx,%eax
  lea    0x2(%rax),%edx
  mov    -0x448(%rbp),%eax
  sub    $0x1,%eax
  sar    $0x2,%edx
  cltq
  mov    %edx,-0x210(%rbp,%rax,4)
  mov    -0x310(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x30c(%rbp),%eax
  add    %edx,%eax
  add    $0x2,%eax
  sar    $0x2,%eax
  mov    %eax,-0x110(%rbp)
  movl   $0x1,-0x420(%rbp)
  jmp    L141
L171:
  mov    -0x420(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x310(%rbp,%rax,4),%edx
  mov    -0x420(%rbp),%eax
  cltq
  mov    -0x310(%rbp,%rax,4),%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x420(%rbp),%eax
  add    $0x1,%eax
  cltq
  mov    -0x310(%rbp,%rax,4),%eax
  add    %edx,%eax
  add    $0x2,%eax
  sar    $0x2,%eax
  mov    %eax,%edx
  mov    -0x420(%rbp),%eax
  cltq
  mov    %edx,-0x110(%rbp,%rax,4)
  addl   $0x1,-0x420(%rbp)
L141:
  mov    -0x448(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x420(%rbp)
  jl     L171
  mov    -0x448(%rbp),%eax
  sub    $0x2,%eax
  cltq
  mov    -0x310(%rbp,%rax,4),%edx
  mov    -0x448(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x310(%rbp,%rax,4),%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x448(%rbp),%eax
  sub    $0x1,%eax
  cltq
  mov    -0x310(%rbp,%rax,4),%eax
  add    %edx,%eax
  lea    0x2(%rax),%edx
  mov    -0x448(%rbp),%eax
  sub    $0x1,%eax
  sar    $0x2,%edx
  cltq
  mov    %edx,-0x110(%rbp,%rax,4)
  mov    -0x310(%rbp),%edx
  mov    -0x41c(%rbp),%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x410(%rbp),%eax
  add    %edx,%eax
  add    $0x2,%eax
  sar    $0x2,%eax
  mov    %eax,-0x418(%rbp)
  movl   $0x0,-0x424(%rbp)
  jmp    L258
L276:
  movl   $0x0,-0x420(%rbp)
  jmp    L244
L113:
  mov    -0x420(%rbp),%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x424(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,-0x414(%rbp)
  cmpl   $0x1,-0x414(%rbp)
  jle    L170
  mov    -0x414(%rbp),%eax
  lea    -0x2(%rax),%ecx
  mov    -0x424(%rbp),%eax
  imul   -0x448(%rbp),%eax
  mov    %eax,%edx
  mov    -0x420(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x450(%rbp),%rax
  add    %rax,%rdx
  movslq %ecx,%rax
  mov    -0x110(%rbp,%rax,4),%eax
  mov    %eax,(%rdx)
  jmp    L216
L170:
  cmpl   $0x1,-0x414(%rbp)
  jne    L204
  mov    -0x424(%rbp),%eax
  imul   -0x448(%rbp),%eax
  mov    %eax,%edx
  mov    -0x420(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x450(%rbp),%rax
  add    %rax,%rdx
  mov    -0x418(%rbp),%eax
  mov    %eax,(%rdx)
  jmp    L216
L204:
  cmpl   $0x0,-0x414(%rbp)
  jne    L45
  mov    -0x210(%rbp),%edx
  mov    -0x418(%rbp),%eax
  add    %eax,%edx
  mov    -0x424(%rbp),%eax
  imul   -0x448(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x420(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x450(%rbp),%rax
  add    %rcx,%rax
  sar    %edx
  mov    %edx,(%rax)
  jmp    L216
L45:
  mov    -0x414(%rbp),%eax
  and    $0x1,%eax
  test   %eax,%eax
  je     L58
  mov    -0x414(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  neg    %eax
  mov    %eax,%ecx
  mov    -0x424(%rbp),%eax
  imul   -0x448(%rbp),%eax
  mov    %eax,%edx
  mov    -0x420(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x450(%rbp),%rax
  add    %rax,%rdx
  movslq %ecx,%rax
  mov    -0x210(%rbp,%rax,4),%eax
  mov    %eax,(%rdx)
  jmp    L216
L58:
  mov    -0x414(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  neg    %eax
  cltq
  mov    -0x210(%rbp,%rax,4),%edx
  mov    -0x414(%rbp),%eax
  mov    %eax,%ecx
  shr    $0x1f,%ecx
  add    %ecx,%eax
  sar    %eax
  neg    %eax
  sub    $0x1,%eax
  cltq
  mov    -0x210(%rbp,%rax,4),%eax
  add    %eax,%edx
  mov    -0x424(%rbp),%eax
  imul   -0x448(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x420(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x450(%rbp),%rax
  add    %rcx,%rax
  sar    %edx
  mov    %edx,(%rax)
L216:
  addl   $0x1,-0x420(%rbp)
L244:
  mov    -0x420(%rbp),%eax
  cmp    -0x448(%rbp),%eax
  jl     L113
  addl   $0x1,-0x424(%rbp)
L258:
  mov    -0x424(%rbp),%eax
  cmp    -0x448(%rbp),%eax
  jl     L276
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L191
  call   <__stack_chk_fail@plt>
L191:
  leave
  ret
```

assistant: ```c
void get_upupleft_pred(uint8_t *rec, int ypos, int xpos, int stride, int size, uint8_t *pblock) {
  int i, j, diag;
  uint16_t ver[64];
  uint16_t hor[64];
  uint16_t up_left;
  uint8_t verF[64];
  uint8_t horF[64];
  uint8_t up_leftF;
  if (ypos > 0) {
    for (j = 0; j < size; j++) {
      ver[j] = rec[(ypos - 1) * stride + xpos + j];
    }
  } else {
    for (j = 0; j < size; j++) {
      ver[j] = 128;
    }
  }
  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;
    }
  }
  if (xpos > 0 && ypos > 0) {
    up_left = rec[(ypos - 1) * stride + xpos - 1];
  } else {
    up_left = 128;
  }
  verF[0] = (uint8_t)((ver[0] + 2 * ver[0] + ver[1] + 2) >> 2);
  for (j = 1; j < size - 1; j++) {
    verF[j] = (uint8_t)((ver[j - 1] + 2 * ver[j] + ver[j + 1] + 2) >> 2);
  }
  verF[size - 1] = (uint8_t)((ver[size - 2] + 2 * ver[size - 1] + ver[size - 1] + 2) >> 2);
  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);
  up_leftF = (uint8_t)((hor[0] + 2 * up_left + ver[0] + 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] = horF[diag - 2];
      } else if (diag == 1)
        pblock[i * size + j] = up_leftF;
      else if (diag == 0)
        pblock[i * size + j] = (up_leftF + verF[0]) >> 1;
      else {
        if (diag & 1)
          pblock[i * size + j] = verF[(-diag) / 2];
        else
          pblock[i * size + j] = (verF[(-diag) / 2] + verF[((-diag) / 2) - 1]) >> 1;
      }
    }
  }
}
```