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

```asm
<form_component_prediction>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edx,%r12d
  mov    %ecx,0xc(%rsp)
  mov    %r8d,%r15d
  mov    %r9d,%r14d
  mov    0x58(%rsp),%edx
  mov    0x70(%rsp),%r13d
  movslq 0x50(%rsp),%rcx
  mov    0x68(%rsp),%eax
  sar    %eax
  add    %edx,%eax
  imul   %r12d,%eax
  cltq
  mov    0x60(%rsp),%r8d
  sar    %r8d
  movslq %r8d,%r8
  add    %rcx,%r8
  add    %r8,%rax
  lea    (%rdi,%rax,1),%rbp
  imul   %r12d,%edx
  movslq %edx,%rdx
  add    %rcx,%rdx
  lea    (%rsi,%rdx,1),%rbx
  cmp    %rbx,%rbp
  je     L161
L559:
  mov    0x60(%rsp),%eax
  or     0x68(%rsp),%eax
  test   $0x1,%al
  je     L529
  mov    0x60(%rsp),%edx
  and    $0x1,%edx
  mov    0x68(%rsp),%eax
  and    $0x1,%eax
  je     L4
  test   %edx,%edx
  je     L502
L4:
  test   %eax,%eax
  jne    L276
  test   %edx,%edx
  jne    L157
L276:
  test   %r13d,%r13d
  jne    L48
  test   %r14d,%r14d
  jle    L240
  movslq 0xc(%rsp),%rdi
  movslq %r12d,%rcx
  add    %rbp,%rcx
  mov    %r15d,%r8d
  jmp    L118
L161:
  mov    $0x0,%edi
  call   <assert@plt>
  jmp    L559
L529:
  test   %r13d,%r13d
  jne    L21
  mov    %r15d,%ecx
  movslq 0xc(%rsp),%rsi
  test   %r14d,%r14d
  jg     L504
L240:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L21:
  mov    $0x0,%edi
  mov    %r15d,%esi
  movslq 0xc(%rsp),%r8
  test   %r14d,%r14d
  jg     L411
  jmp    L240
L248:
  movzbl (%rbx,%rax,1),%ecx
  movzbl 0x0(%rbp,%rax,1),%edx
  lea    0x1(%rcx,%rdx,1),%edx
  sar    %edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L248
L146:
  add    %r8,%rbp
  add    %r8,%rbx
  add    $0x1,%edi
  cmp    %edi,%r14d
  je     L240
L411:
  mov    $0x0,%eax
  test   %r15d,%r15d
  jg     L248
  jmp    L146
L545:
  movzbl 0x0(%rbp,%rax,1),%edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L545
L22:
  add    %rsi,%rbp
  add    %rsi,%rbx
  add    $0x1,%r13d
  cmp    %r13d,%r14d
  je     L240
L504:
  mov    $0x0,%eax
  test   %r15d,%r15d
  jg     L545
  jmp    L22
L502:
  test   %r13d,%r13d
  jne    L131
  test   %r14d,%r14d
  jle    L240
  movslq 0xc(%rsp),%r8
  movslq %r12d,%rsi
  add    %rbp,%rsi
  mov    %r15d,%edi
  jmp    L366
L131:
  test   %r14d,%r14d
  jle    L240
  movslq 0xc(%rsp),%r8
  movslq %r12d,%rsi
  add    %rbp,%rsi
  mov    $0x0,%r9d
  mov    %r15d,%edi
  jmp    L89
L317:
  movzbl 0x0(%rbp,%rax,1),%ecx
  movzbl (%rsi,%rax,1),%edx
  lea    0x1(%rcx,%rdx,1),%edx
  shr    %edx
  movzbl (%rbx,%rax,1),%ecx
  lea    0x1(%rdx,%rcx,1),%edx
  sar    %edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rdi
  jne    L317
L137:
  add    %r8,%rbp
  add    %r8,%rbx
  add    $0x1,%r9d
  add    %r8,%rsi
  cmp    %r9d,%r14d
  je     L240
L89:
  mov    $0x0,%eax
  test   %r15d,%r15d
  jg     L317
  jmp    L137
L304:
  movzbl 0x0(%rbp,%rax,1),%ecx
  movzbl (%rsi,%rax,1),%edx
  lea    0x1(%rcx,%rdx,1),%edx
  shr    %edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rdi
  jne    L304
L488:
  add    %r8,%rbp
  add    %r8,%rbx
  add    $0x1,%r13d
  add    %r8,%rsi
  cmp    %r13d,%r14d
  je     L240
L366:
  mov    $0x0,%eax
  test   %r15d,%r15d
  jg     L304
  jmp    L488
L157:
  test   %r13d,%r13d
  jne    L479
  mov    %r15d,%esi
  movslq 0xc(%rsp),%rdi
  test   %r14d,%r14d
  jg     L121
  jmp    L240
L479:
  mov    $0x0,%edi
  mov    %r15d,%esi
  movslq 0xc(%rsp),%r8
  test   %r14d,%r14d
  jg     L191
  jmp    L240
L573:
  movzbl 0x0(%rbp,%rax,1),%ecx
  movzbl 0x1(%rbp,%rax,1),%edx
  lea    0x1(%rcx,%rdx,1),%edx
  shr    %edx
  movzbl (%rbx,%rax,1),%ecx
  lea    0x1(%rdx,%rcx,1),%edx
  sar    %edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rsi
  jne    L573
L416:
  add    %r8,%rbp
  add    %r8,%rbx
  add    $0x1,%edi
  cmp    %edi,%r14d
  je     L240
L191:
  mov    $0x0,%eax
  test   %r15d,%r15d
  jg     L573
  jmp    L416
L427:
  movzbl 0x0(%rbp,%rax,1),%ecx
  movzbl 0x1(%rbp,%rax,1),%edx
  lea    0x1(%rcx,%rdx,1),%edx
  shr    %edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rsi
  jne    L427
L354:
  add    %rdi,%rbp
  add    %rdi,%rbx
  add    $0x1,%r13d
  cmp    %r13d,%r14d
  je     L240
L121:
  mov    $0x0,%eax
  test   %r15d,%r15d
  jg     L427
  jmp    L354
L48:
  test   %r14d,%r14d
  jle    L240
  movslq 0xc(%rsp),%rdi
  movslq %r12d,%rcx
  add    %rbp,%rcx
  mov    $0x0,%r8d
  mov    %r15d,%esi
  jmp    L579
L430:
  movzbl 0x0(%rbp,%rax,1),%edx
  movzbl 0x1(%rbp,%rax,1),%r9d
  add    %r9d,%edx
  movzbl (%rcx,%rax,1),%r9d
  add    %r9d,%edx
  movzbl 0x1(%rcx,%rax,1),%r9d
  lea    0x2(%rdx,%r9,1),%edx
  shr    $0x2,%edx
  movzbl (%rbx,%rax,1),%r9d
  lea    0x1(%rdx,%r9,1),%edx
  sar    %edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rsi,%rax
  jne    L430
L286:
  add    %rdi,%rbp
  add    %rdi,%rbx
  add    $0x1,%r8d
  add    %rdi,%rcx
  cmp    %r8d,%r14d
  je     L240
L579:
  mov    $0x0,%eax
  test   %r15d,%r15d
  jg     L430
  jmp    L286
L277:
  movzbl 0x0(%rbp,%rax,1),%edx
  movzbl 0x1(%rbp,%rax,1),%esi
  add    %esi,%edx
  movzbl (%rcx,%rax,1),%esi
  add    %esi,%edx
  movzbl 0x1(%rcx,%rax,1),%esi
  lea    0x2(%rdx,%rsi,1),%edx
  shr    $0x2,%edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%r8
  jne    L277
L52:
  add    %rdi,%rbp
  add    %rdi,%rbx
  add    $0x1,%r13d
  add    %rdi,%rcx
  cmp    %r13d,%r14d
  je     L240
L118:
  mov    $0x0,%eax
  test   %r15d,%r15d
  jg     L277
  jmp    L52
```

assistant: ```c
void form_component_prediction(unsigned char *src, unsigned char *dst, signed int lx, signed int lx2, signed int w, signed int h, signed int x, signed int y, signed int dx, signed int dy, signed int average_flag) {
  signed int xint;
  signed int yint;
  signed int xh;
  signed int yh;
  signed int i;
  signed int j;
  signed int v;
  unsigned char *s;
  unsigned char *d;
  xint = dx >> 1;
  yint = dy >> 1;
  s = src + (signed long int)(lx * (y + yint)) + (signed long int)x + (signed long int)xint;
  d = dst + (signed long int)(lx * y) + (signed long int)x;
  xh = dx & 1;
  yh = dy & 1;
  if (!(s == d))
    (void)0;
  else
    assert((_Bool)0);
  if (xh == 0) {
    if (yh != 0)
      goto __CPROVER_DUMP_L12;
    if (!(average_flag == 0)) {
      j = 0;
      while (!(j >= h)) {
        i = 0;
        while (!(i >= w)) {
          v = (signed int)d[(signed long int)i] + (signed int)s[(signed long int)i];
          d[(signed long int)i] = (unsigned char)(v + (v >= 0 ? 1 : 0) >> 1);
          i = i + 1;
        }
        s = s + (signed long int)lx2;
        d = d + (signed long int)lx2;
        j = j + 1;
      }
    } else {
      j = 0;
      while (!(j >= h)) {
        i = 0;
        while (!(i >= w)) {
          d[(signed long int)i] = s[(signed long int)i];
          i = i + 1;
        }
        s = s + (signed long int)lx2;
        d = d + (signed long int)lx2;
        j = j + 1;
      }
    }
  } else {
  __CPROVER_DUMP_L12:;
    if (xh == 0) {
      if (yh == 0)
        goto __CPROVER_DUMP_L22;
      if (!(average_flag == 0)) {
        j = 0;
        while (!(j >= h)) {
          i = 0;
          while (!(i >= w)) {
            v = (signed int)((unsigned int)d[(signed long int)i] + ((unsigned int)((signed int)s[(signed long int)i] + (signed int)s[(signed long int)(i + lx)] + 1) >> 1));
            d[(signed long int)i] = (unsigned char)(v + (v >= 0 ? 1 : 0) >> 1);
            i = i + 1;
          }
          s = s + (signed long int)lx2;
          d = d + (signed long int)lx2;
          j = j + 1;
        }
      } else {
        j = 0;
        while (!(j >= h)) {
          i = 0;
          while (!(i >= w)) {
            d[(signed long int)i] = (unsigned char)((unsigned int)((signed int)s[(signed long int)i] + (signed int)s[(signed long int)(i + lx)] + 1) >> 1);
            i = i + 1;
          }
          s = s + (signed long int)lx2;
          d = d + (signed long int)lx2;
          j = j + 1;
        }
      }
    } else {
    __CPROVER_DUMP_L22:;
      if (!(xh == 0)) {
        if (yh != 0)
          goto __CPROVER_DUMP_L32;
        if (!(average_flag == 0)) {
          j = 0;
          while (!(j >= h)) {
            i = 0;
            while (!(i >= w)) {
              v = (signed int)((unsigned int)d[(signed long int)i] + ((unsigned int)((signed int)s[(signed long int)i] + (signed int)s[(signed long int)(i + 1)] + 1) >> 1));
              d[(signed long int)i] = (unsigned char)(v + (v >= 0 ? 1 : 0) >> 1);
              i = i + 1;
            }
            s = s + (signed long int)lx2;
            d = d + (signed long int)lx2;
            j = j + 1;
          }
        } else {
          j = 0;
          while (!(j >= h)) {
            i = 0;
            while (!(i >= w)) {
              d[(signed long int)i] = (unsigned char)((unsigned int)((signed int)s[(signed long int)i] + (signed int)s[(signed long int)(i + 1)] + 1) >> 1);
              i = i + 1;
            }
            s = s + (signed long int)lx2;
            d = d + (signed long int)lx2;
            j = j + 1;
          }
        }
      } else {
      __CPROVER_DUMP_L32:;
        if (!(average_flag == 0)) {
          j = 0;
          while (!(j >= h)) {
            i = 0;
            while (!(i >= w)) {
              v = (signed int)((unsigned int)d[(signed long int)i] + ((unsigned int)((signed int)s[(signed long int)i] + (signed int)s[(signed long int)(i + 1)] + (signed int)s[(signed long int)(i + lx)] + (signed int)s[(signed long int)(i + lx + 1)] + 2) >> 2));
              d[(signed long int)i] = (unsigned char)(v + (v >= 0 ? 1 : 0) >> 1);
              i = i + 1;
            }
            s = s + (signed long int)lx2;
            d = d + (signed long int)lx2;
            j = j + 1;
          }
        } else {
          j = 0;
          while (!(j >= h)) {
            i = 0;
            while (!(i >= w)) {
              d[(signed long int)i] = (unsigned char)((unsigned int)((signed int)s[(signed long int)i] + (signed int)s[(signed long int)(i + 1)] + (signed int)s[(signed long int)(i + lx)] + (signed int)s[(signed long int)(i + lx + 1)] + 2) >> 2);
              i = i + 1;
            }
            s = s + (signed long int)lx2;
            d = d + (signed long int)lx2;
            j = j + 1;
          }
        }
      }
    }
  }
}
```