user: Demonstrate the C code that generates the assembly output below:

```asm
<form_component_prediction>:
  endbr64
  push   %r15
  mov    %edx,%r15d
  mov    %ecx,%r10d
  push   %r14
  push   %r13
  mov    %r9d,%r13d
  push   %r12
  mov    %r8d,%r12d
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    0x68(%rsp),%r8d
  mov    0x58(%rsp),%edx
  mov    0x60(%rsp),%r9d
  movslq 0x50(%rsp),%rcx
  mov    %r8d,%eax
  mov    0x70(%rsp),%r14d
  and    $0x1,%r8d
  sar    %eax
  mov    %r9d,%r11d
  and    $0x1,%r9d
  add    %edx,%eax
  imul   %r15d,%edx
  sar    %r11d
  imul   %r15d,%eax
  movslq %r11d,%r11
  add    %rcx,%r11
  movslq %edx,%rdx
  cltq
  add    %rcx,%rdx
  add    %r11,%rax
  lea    (%rsi,%rdx,1),%rbx
  lea    (%rdi,%rax,1),%rbp
  cmp    %rbx,%rbp
  je     L103
L221:
  test   %r9d,%r9d
  je     L26
  test   %r8d,%r8d
  jne    L33
  test   %r14d,%r14d
  jne    L370
  test   %r13d,%r13d
  jle    L405
  movslq %r10d,%rsi
  movslq %r12d,%rdi
  nopl   0x0(%rax,%rax,1)
L6:
  xor    %eax,%eax
  test   %r12d,%r12d
  jle    L220
  nopw   0x0(%rax,%rax,1)
L373:
  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,%rdi
  jne    L373
L220:
  add    $0x1,%r14d
  add    %rsi,%rbp
  add    %rsi,%rbx
  cmp    %r14d,%r13d
  jne    L6
  jmp    L405
L33:
  test   %r14d,%r14d
  je     L29
  test   %r13d,%r13d
  jle    L405
  movslq %r15d,%rdx
  movslq %r10d,%rsi
  xor    %r8d,%r8d
  movslq %r12d,%rdi
  add    %rbp,%rdx
  nopl   0x0(%rax)
L322:
  xor    %eax,%eax
  test   %r12d,%r12d
  jle    L326
  nop
L431:
  movzbl 0x1(%rbp,%rax,1),%r9d
  movzbl 0x0(%rbp,%rax,1),%ecx
  add    %r9d,%ecx
  movzbl (%rdx,%rax,1),%r9d
  add    %r9d,%ecx
  movzbl 0x1(%rdx,%rax,1),%r9d
  lea    0x2(%rcx,%r9,1),%ecx
  movzbl (%rbx,%rax,1),%r9d
  shr    $0x2,%ecx
  lea    0x1(%rcx,%r9,1),%ecx
  sar    %ecx
  mov    %cl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rdi
  jne    L431
L326:
  add    $0x1,%r8d
  add    %rsi,%rbp
  add    %rsi,%rbx
  add    %rsi,%rdx
  cmp    %r8d,%r13d
  jne    L322
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L26:
  test   %r8d,%r8d
  jne    L416
  test   %r14d,%r14d
  je     L419
  test   %r13d,%r13d
  jle    L405
  movslq %r10d,%rsi
  movslq %r12d,%rdi
  nopl   (%rax)
L258:
  xor    %eax,%eax
  test   %r12d,%r12d
  jle    L234
  nopw   0x0(%rax,%rax,1)
L438:
  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    %rax,%rdi
  jne    L438
L234:
  add    $0x1,%r8d
  add    %rsi,%rbp
  add    %rsi,%rbx
  cmp    %r8d,%r13d
  jne    L258
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L416:
  test   %r14d,%r14d
  je     L39
  test   %r13d,%r13d
  jle    L405
  movslq %r15d,%rdi
  movslq %r10d,%rsi
  movslq %r12d,%r8
  add    %rbp,%rdi
  xchg   %ax,%ax
L80:
  xor    %eax,%eax
  test   %r12d,%r12d
  jle    L246
  nopw   0x0(%rax,%rax,1)
L363:
  movzbl 0x0(%rbp,%rax,1),%ecx
  movzbl (%rdi,%rax,1),%edx
  lea    0x1(%rcx,%rdx,1),%edx
  movzbl (%rbx,%rax,1),%ecx
  shr    %edx
  lea    0x1(%rdx,%rcx,1),%edx
  sar    %edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%r8
  jne    L363
L246:
  add    $0x1,%r9d
  add    %rsi,%rbp
  add    %rsi,%rbx
  add    %rsi,%rdi
  cmp    %r9d,%r13d
  jne    L80
  jmp    L405
  nopl   0x0(%rax)
L103:
  lea    D0(%rip),%rcx
  mov    $0x1da,%edx
  lea    D13(%rip),%rsi
  mov    %r10d,0xc(%rsp)
  lea    D9(%rip),%rdi
  mov    %r9d,0x8(%rsp)
  mov    %r8d,0x4(%rsp)
  call   <__assert_fail@plt>
  mov    0xc(%rsp),%r10d
  mov    0x8(%rsp),%r9d
  mov    0x4(%rsp),%r8d
  jmp    L221
  nopw   0x0(%rax,%rax,1)
L419:
  test   %r13d,%r13d
  jle    L405
  movslq %r10d,%rsi
  movslq %r12d,%rcx
  nopl   0x0(%rax,%rax,1)
L387:
  xor    %eax,%eax
  test   %r12d,%r12d
  jle    L119
  nop
L436:
  movzbl 0x0(%rbp,%rax,1),%edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L436
L119:
  add    $0x1,%r14d
  add    %rsi,%rbp
  add    %rsi,%rbx
  cmp    %r14d,%r13d
  jne    L387
L405:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L29:
  test   %r13d,%r13d
  jle    L405
  movslq %r15d,%rcx
  movslq %r10d,%rsi
  movslq %r12d,%r8
  add    %rbp,%rcx
  nopl   0x0(%rax)
L96:
  xor    %eax,%eax
  test   %r12d,%r12d
  jle    L46
  nop
L19:
  movzbl 0x1(%rbp,%rax,1),%edi
  movzbl 0x0(%rbp,%rax,1),%edx
  add    %edi,%edx
  movzbl (%rcx,%rax,1),%edi
  add    %edi,%edx
  movzbl 0x1(%rcx,%rax,1),%edi
  lea    0x2(%rdx,%rdi,1),%edx
  shr    $0x2,%edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%r8
  jne    L19
L46:
  add    $0x1,%r14d
  add    %rsi,%rbp
  add    %rsi,%rbx
  add    %rsi,%rcx
  cmp    %r14d,%r13d
  jne    L96
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L39:
  test   %r13d,%r13d
  jle    L405
  movslq %r15d,%rdi
  movslq %r10d,%rsi
  movslq %r12d,%r8
  add    %rbp,%rdi
  nopl   0x0(%rax)
L32:
  xor    %eax,%eax
  test   %r12d,%r12d
  jle    L366
  nopw   0x0(%rax,%rax,1)
L422:
  movzbl 0x0(%rbp,%rax,1),%ecx
  movzbl (%rdi,%rax,1),%edx
  lea    0x1(%rcx,%rdx,1),%edx
  shr    %edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%r8
  jne    L422
L366:
  add    $0x1,%r14d
  add    %rsi,%rbp
  add    %rsi,%rbx
  add    %rsi,%rdi
  cmp    %r14d,%r13d
  jne    L32
  jmp    L405
L370:
  test   %r13d,%r13d
  jle    L405
  movslq %r10d,%rsi
  movslq %r12d,%rdi
  nopl   0x0(%rax)
L233:
  xor    %eax,%eax
  test   %r12d,%r12d
  jle    L368
  nop
L153:
  movzbl 0x0(%rbp,%rax,1),%ecx
  movzbl 0x1(%rbp,%rax,1),%edx
  lea    0x1(%rcx,%rdx,1),%edx
  movzbl (%rbx,%rax,1),%ecx
  shr    %edx
  lea    0x1(%rdx,%rcx,1),%edx
  sar    %edx
  mov    %dl,(%rbx,%rax,1)
  add    $0x1,%rax
  cmp    %rax,%rdi
  jne    L153
L368:
  add    $0x1,%r8d
  add    %rsi,%rbp
  add    %rsi,%rbx
  cmp    %r8d,%r13d
  jne    L233
  jmp    L405
```

tool_calls: name: unpack_data
arguments: tag: D0
type: string
name: unpack_data
arguments: tag: D13
type: string
name: unpack_data
arguments: tag: D9
type: string

tool: D0: form_component_prediction

tool: D13: src/recon.c

tool: D9: s!=d

assistant: ```c
void form_component_prediction(unsigned char *src, unsigned char *dst, int lx, int lx2, int w, int h, int x, int y, int dx, int dy, int average_flag) {
  int xint;
  int yint;
  int xh;
  int yh;
  int i;
  int j;
  int v;
  unsigned char *s;
  unsigned char *d;
  int tmp;
  int tmp___0;
  int tmp___1;
  int tmp___2;
  {
    xint = dx >> 1;
    yint = dy >> 1;
    s = ((src + lx * (y + yint)) + x) + xint;
    d = (dst + lx * y) + x;
    xh = dx & 1;
    yh = dy & 1;
    if (!((unsigned long)s != (unsigned long)d)) {
      __assert_fail("s!=d", "src/recon.c", 474U, "form_component_prediction");
    }
    if (!xh) {
      if (!yh) {
        if (average_flag) {
          j = 0;
          while (j < h) {
            i = 0;
            while (i < w) {
              v = (int)*(d + i) + (int)*(s + i);
              if (v >= 0) {
                tmp = 1;
              } else {
                tmp = 0;
              }
              *(d + i) = (unsigned char)((v + tmp) >> 1);
              i++;
            }
            s += lx2;
            d += lx2;
            j++;
          }
        } else {
          j = 0;
          while (j < h) {
            i = 0;
            while (i < w) {
              *(d + i) = *(s + i);
              i++;
            }
            s += lx2;
            d += lx2;
            j++;
          }
        }
      } else {
        goto _L___1;
      }
    } else
    _L___1:
      if (!xh) {
        if (yh) {
          if (average_flag) {
            j = 0;
            while (j < h) {
              i = 0;
              while (i < w) {
                v = (int)((unsigned int)*(d + i) + ((unsigned int)(((int)*(s + i) + (int)*(s + (i + lx))) + 1) >> 1));
                if (v >= 0) {
                  tmp___0 = 1;
                } else {
                  tmp___0 = 0;
                }
                *(d + i) = (unsigned char)((v + tmp___0) >> 1);
                i++;
              }
              s += lx2;
              d += lx2;
              j++;
            }
          } else {
            j = 0;
            while (j < h) {
              i = 0;
              while (i < w) {
                *(d + i) = (unsigned char)((unsigned int)(((int)*(s + i) + (int)*(s + (i + lx))) + 1) >> 1);
                i++;
              }
              s += lx2;
              d += lx2;
              j++;
            }
          }
        } else {
          goto _L___0;
        }
      } else
      _L___0:
        if (xh) {
          if (!yh) {
            if (average_flag) {
              j = 0;
              while (j < h) {
                i = 0;
                while (i < w) {
                  v = (int)((unsigned int)*(d + i) + ((unsigned int)(((int)*(s + i) + (int)*(s + (i + 1))) + 1) >> 1));
                  if (v >= 0) {
                    tmp___1 = 1;
                  } else {
                    tmp___1 = 0;
                  }
                  *(d + i) = (unsigned char)((v + tmp___1) >> 1);
                  i++;
                }
                s += lx2;
                d += lx2;
                j++;
              }
            } else {
              j = 0;
              while (j < h) {
                i = 0;
                while (i < w) {
                  *(d + i) = (unsigned char)((unsigned int)(((int)*(s + i) + (int)*(s + (i + 1))) + 1) >> 1);
                  i++;
                }
                s += lx2;
                d += lx2;
                j++;
              }
            }
          } else {
            goto _L;
          }
        } else
        _L:
          if (average_flag) {
            j = 0;
            while (j < h) {
              i = 0;
              while (i < w) {
                v = (int)((unsigned int)*(d + i) + ((unsigned int)(((((int)*(s + i) + (int)*(s + (i + 1))) + (int)*(s + (i + lx))) + (int)*(s + ((i + lx) + 1))) + 2) >> 2));
                if (v >= 0) {
                  tmp___2 = 1;
                } else {
                  tmp___2 = 0;
                }
                *(d + i) = (unsigned char)((v + tmp___2) >> 1);
                i++;
              }
              s += lx2;
              d += lx2;
              j++;
            }
          } else {
            j = 0;
            while (j < h) {
              i = 0;
              while (i < w) {
                *(d + i) = (unsigned char)((unsigned int)(((((int)*(s + i) + (int)*(s + (i + 1))) + (int)*(s + (i + lx))) + (int)*(s + ((i + lx) + 1))) + 2) >> 2);
                i++;
              }
              s += lx2;
              d += lx2;
              j++;
            }
          }
    return;
  }
}
```