user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<v4lconvert_border_bayer_line_to_y>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rax
  mov    %rsi,%rdi
  test   %r8d,%r8d
  je     L48
  test   %r9d,%r9d
  je     L184
  lea    0x1(%rdx),%rsi
  movzbl (%rdi),%r8d
  imul   $0x2105,%r8d,%r8d
  movzbl (%rax),%r10d
  imul   $0x40d2,%r10d,%r10d
  add    %r10d,%r8d
  movzbl 0x1(%rax),%r10d
  imul   $0xc97,%r10d,%r10d
  lea    0x80000(%r8,%r10,1),%r8d
  sar    $0xf,%r8d
  mov    %r8b,(%rdx)
  lea    0x2(%rdx),%r10
  movzbl (%rax),%edx
  movzbl 0x2(%rax),%r8d
  add    %r8d,%edx
  movzbl 0x1(%rdi),%r8d
  add    %r8d,%edx
  imul   $0x159b,%edx,%edx
  movzbl (%rdi),%r8d
  movzbl 0x2(%rdi),%r11d
  add    %r11d,%r8d
  imul   $0x1082,%r8d,%r8d
  add    %r8d,%edx
  movzbl 0x1(%rax),%r8d
  imul   $0xc97,%r8d,%r8d
  lea    0x80000(%rdx,%r8,1),%edx
  sar    $0xf,%edx
L0:
  mov    %dl,(%rsi)
  add    $0x1,%rax
  add    $0x1,%rdi
  lea    -0x2(%rcx),%r8d
L38:
  test   %r9d,%r9d
  jne    L189
  cmp    $0x2,%r8d
  jle    L172
  lea    -0x3(%r8),%r11d
  shr    %r11d
  lea    0x1(%r11),%ebx
  add    %rbx,%rbx
  lea    (%rax,%rbx,1),%r9
  mov    %r10,%rsi
  mov    %rdi,%rcx
L122:
  movzbl (%rax),%edx
  movzbl 0x2(%rax),%ebp
  add    %ebp,%edx
  imul   $0x1082,%edx,%edx
  movzbl 0x1(%rax),%ebp
  imul   $0x40d2,%ebp,%ebp
  add    %ebp,%edx
  movzbl 0x1(%rcx),%ebp
  imul   $0xc97,%ebp,%ebp
  lea    0x80000(%rdx,%rbp,1),%edx
  sar    $0xf,%edx
  mov    %dl,(%rsi)
  add    $0x2,%rsi
  movzbl 0x1(%rax),%edx
  movzbl 0x3(%rax),%ebp
  add    %ebp,%edx
  movzbl 0x2(%rcx),%ebp
  add    %ebp,%edx
  imul   $0x159b,%edx,%edx
  movzbl 0x2(%rax),%ebp
  imul   $0x2105,%ebp,%ebp
  add    %ebp,%edx
  movzbl 0x1(%rcx),%ebp
  movzbl 0x3(%rcx),%r12d
  add    %r12d,%ebp
  imul   $0x64b,%ebp,%ebp
  lea    0x80000(%rdx,%rbp,1),%edx
  sar    $0xf,%edx
  mov    %dl,-0x1(%rsi)
  add    $0x2,%rax
  add    $0x2,%rcx
  cmp    %rax,%r9
  jne    L122
  add    %rbx,%r10
  add    %rbx,%rdi
  neg    %r11d
  lea    -0x2(%r8,%r11,2),%r8d
L172:
  cmp    $0x2,%r8d
  je     L61
  movzbl (%rax),%edx
  imul   $0x2105,%edx,%edx
  movzbl 0x1(%rax),%eax
  imul   $0x40d2,%eax,%eax
  add    %edx,%eax
  movzbl 0x1(%rdi),%edx
  imul   $0xc97,%edx,%edx
  lea    0x80000(%rax,%rdx,1),%eax
  sar    $0xf,%eax
  mov    %al,(%r10)
  jmp    L8
L184:
  lea    0x1(%rdx),%rsi
  movzbl 0x1(%rax),%r8d
  imul   $0x2105,%r8d,%r8d
  movzbl (%rax),%r10d
  imul   $0x40d2,%r10d,%r10d
  add    %r10d,%r8d
  movzbl (%rdi),%r10d
  imul   $0xc97,%r10d,%r10d
  lea    0x80000(%r8,%r10,1),%r8d
  sar    $0xf,%r8d
  mov    %r8b,(%rdx)
  lea    0x2(%rdx),%r10
  movzbl (%rax),%edx
  movzbl 0x2(%rax),%r8d
  add    %r8d,%edx
  movzbl 0x1(%rdi),%r8d
  add    %r8d,%edx
  imul   $0x159b,%edx,%edx
  movzbl 0x1(%rax),%r8d
  imul   $0x2105,%r8d,%r8d
  add    %r8d,%edx
  movzbl (%rdi),%r8d
  movzbl 0x2(%rdi),%r11d
  add    %r11d,%r8d
  imul   $0x64b,%r8d,%r8d
  lea    0x80000(%rdx,%r8,1),%edx
  sar    $0xf,%edx
  jmp    L0
L48:
  movzbl 0x1(%rax),%esi
  movzbl (%rdi),%r8d
  add    %r8d,%esi
  test   %r9d,%r9d
  je     L181
  lea    0x1(%rdx),%r10
  movzbl 0x1(%rdi),%r8d
  imul   $0x2105,%r8d,%r8d
  imul   $0x2069,%esi,%esi
  add    %r8d,%esi
  movzbl (%rax),%r8d
  imul   $0xc97,%r8d,%r8d
  lea    0x80000(%rsi,%r8,1),%esi
  sar    $0xf,%esi
L25:
  mov    %sil,(%rdx)
  lea    -0x1(%rcx),%r8d
  jmp    L38
L181:
  lea    0x1(%rdx),%r10
  movzbl (%rax),%r8d
  imul   $0x2105,%r8d,%r8d
  imul   $0x2069,%esi,%esi
  add    %r8d,%esi
  movzbl 0x1(%rdi),%r8d
  imul   $0xc97,%r8d,%r8d
  lea    0x80000(%rsi,%r8,1),%esi
  sar    $0xf,%esi
  jmp    L25
L189:
  cmp    $0x2,%r8d
  jle    L68
  lea    -0x3(%r8),%ebx
  shr    %ebx
  mov    %ebx,%r12d
  lea    0x2(%r12,%r12,1),%rbp
  lea    (%rax,%rbp,1),%r11
  mov    %r10,%r9
  mov    %rdi,%rsi
  mov    %rax,%rcx
L95:
  movzbl 0x1(%rsi),%r13d
  imul   $0x2105,%r13d,%r13d
  movzbl 0x1(%rcx),%edx
  imul   $0x40d2,%edx,%edx
  add    %edx,%r13d
  movzbl (%rcx),%edx
  movzbl 0x2(%rcx),%r14d
  add    %r14d,%edx
  imul   $0x64b,%edx,%edx
  lea    0x80000(%r13,%rdx,1),%edx
  sar    $0xf,%edx
  mov    %dl,(%r9)
  add    $0x2,%r9
  movzbl 0x1(%rcx),%edx
  movzbl 0x3(%rcx),%r13d
  add    %r13d,%edx
  movzbl 0x2(%rsi),%r13d
  add    %r13d,%edx
  imul   $0x159b,%edx,%r13d
  movzbl 0x1(%rsi),%edx
  movzbl 0x3(%rsi),%r14d
  add    %r14d,%edx
  imul   $0x1082,%edx,%edx
  add    %r13d,%edx
  movzbl 0x2(%rcx),%r13d
  imul   $0xc97,%r13d,%r13d
  lea    0x80000(%rdx,%r13,1),%edx
  sar    $0xf,%edx
  mov    %dl,-0x1(%r9)
  add    $0x2,%rcx
  add    $0x2,%rsi
  cmp    %rcx,%r11
  jne    L95
  add    %rbp,%r10
  add    %rbp,%rdi
  lea    (%rax,%r12,2),%rsi
  neg    %ebx
  lea    -0x2(%r8,%rbx,2),%eax
  cmp    $0x2,%eax
  je     L83
L71:
  movzbl 0x1(%rdi),%eax
  imul   $0x2105,%eax,%eax
  movzbl 0x1(%rcx),%edx
  imul   $0x40d2,%edx,%edx
  add    %edx,%eax
  movzbl (%rcx),%edx
  imul   $0xc97,%edx,%edx
  lea    0x80000(%rax,%rdx,1),%eax
  sar    $0xf,%eax
  mov    %al,(%r10)
L8:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L118:
  movzbl (%rax),%edx
  movzbl 0x2(%rax),%ecx
  add    %ecx,%edx
  mov    %rax,%rcx
  jmp    L101
L83:
  movzbl 0x2(%rsi),%edx
  movzbl 0x4(%rsi),%eax
  add    %eax,%edx
L101:
  movzbl 0x1(%rdi),%eax
  imul   $0x2105,%eax,%eax
  movzbl 0x1(%rcx),%esi
  imul   $0x40d2,%esi,%esi
  add    %esi,%eax
  imul   $0x64b,%edx,%edx
  lea    0x80000(%rax,%rdx,1),%eax
  sar    $0xf,%eax
  mov    %al,(%r10)
  movzbl 0x1(%rcx),%eax
  movzbl 0x2(%rdi),%edx
  add    %edx,%eax
  imul   $0x2069,%eax,%eax
  movzbl 0x1(%rdi),%edx
  imul   $0x2105,%edx,%edx
  add    %edx,%eax
  movzbl 0x2(%rcx),%edx
  imul   $0xc97,%edx,%edx
  lea    0x80000(%rax,%rdx,1),%eax
  sar    $0xf,%eax
  mov    %al,0x1(%r10)
  jmp    L8
L61:
  movzbl (%rax),%edx
  movzbl 0x2(%rax),%ecx
  add    %ecx,%edx
  imul   $0x1082,%edx,%edx
  movzbl 0x1(%rax),%ecx
  imul   $0x40d2,%ecx,%ecx
  add    %ecx,%edx
  movzbl 0x1(%rdi),%ecx
  imul   $0xc97,%ecx,%ecx
  lea    0x80000(%rdx,%rcx,1),%edx
  sar    $0xf,%edx
  mov    %dl,(%r10)
  movzbl 0x1(%rax),%edx
  movzbl 0x2(%rdi),%ecx
  add    %ecx,%edx
  imul   $0x2069,%edx,%edx
  movzbl 0x2(%rax),%eax
  imul   $0x2105,%eax,%eax
  add    %edx,%eax
  movzbl 0x1(%rdi),%edx
  imul   $0xc97,%edx,%edx
  lea    0x80000(%rax,%rdx,1),%eax
  sar    $0xf,%eax
  mov    %al,0x1(%r10)
  jmp    L8
L68:
  je     L118
  mov    %rax,%rcx
  jmp    L71
```

assistant: ```c
void v4lconvert_border_bayer_line_to_y(const unsigned char *bayer, const unsigned char *adjacent_bayer, unsigned char *y, int width, int start_with_green, int blue_line) {
  int t0, t1;
  if (start_with_green) {
    if (blue_line) {
      *y++ = (8453 * adjacent_bayer[0] + 16594 * bayer[0] + 3223 * bayer[1] + 524288) >> 15;
    } else {
      *y++ = (8453 * bayer[1] + 16594 * bayer[0] + 3223 * adjacent_bayer[0] + 524288) >> 15;
    }
    t0 = bayer[0] + bayer[2] + adjacent_bayer[1];
    t1 = adjacent_bayer[0] + adjacent_bayer[2];
    if (blue_line) {
      *y++ = (4226 * t1 + 5531 * t0 + 3223 * bayer[1] + 524288) >> 15;
    } else {
      *y++ = (8453 * bayer[1] + 5531 * t0 + 1611 * t1 + 524288) >> 15;
    }
    bayer++;
    adjacent_bayer++;
    width -= 2;
  } else {
    t0 = bayer[1] + adjacent_bayer[0];
    if (blue_line) {
      *y++ = (8453 * adjacent_bayer[1] + 8297 * t0 + 3223 * bayer[0] + 524288) >> 15;
    } else {
      *y++ = (8453 * bayer[0] + 8297 * t0 + 3223 * adjacent_bayer[1] + 524288) >> 15;
    }
    width--;
  }
  if (blue_line) {
    for (; width > 2; width -= 2) {
      t0 = bayer[0] + bayer[2];
      *y++ = (8453 * adjacent_bayer[1] + 16594 * bayer[1] + 1611 * t0 + 524288) >> 15;
      bayer++;
      adjacent_bayer++;
      t0 = bayer[0] + bayer[2] + adjacent_bayer[1];
      t1 = adjacent_bayer[0] + adjacent_bayer[2];
      *y++ = (4226 * t1 + 5531 * t0 + 3223 * bayer[1] + 524288) >> 15;
      bayer++;
      adjacent_bayer++;
    }
  } else {
    for (; width > 2; width -= 2) {
      t0 = bayer[0] + bayer[2];
      *y++ = (4226 * t0 + 16594 * bayer[1] + 3223 * adjacent_bayer[1] + 524288) >> 15;
      bayer++;
      adjacent_bayer++;
      t0 = bayer[0] + bayer[2] + adjacent_bayer[1];
      t1 = adjacent_bayer[0] + adjacent_bayer[2];
      *y++ = (8453 * bayer[1] + 5531 * t0 + 1611 * t1 + 524288) >> 15;
      bayer++;
      adjacent_bayer++;
    }
  }
  if (width == 2) {
    t0 = bayer[0] + bayer[2];
    if (blue_line) {
      *y++ = (8453 * adjacent_bayer[1] + 16594 * bayer[1] + 1611 * t0 + 524288) >> 15;
    } else {
      *y++ = (4226 * t0 + 16594 * bayer[1] + 3223 * adjacent_bayer[1] + 524288) >> 15;
    }
    t0 = bayer[1] + adjacent_bayer[2];
    if (blue_line) {
      *y++ = (8453 * adjacent_bayer[1] + 8297 * t0 + 3223 * bayer[2] + 524288) >> 15;
    } else {
      *y++ = (8453 * bayer[2] + 8297 * t0 + 3223 * adjacent_bayer[1] + 524288) >> 15;
    }
  } else {
    if (blue_line) {
      *y++ = (8453 * adjacent_bayer[1] + 16594 * bayer[1] + 3223 * bayer[0] + 524288) >> 15;
    } else {
      *y++ = (8453 * bayer[0] + 16594 * bayer[1] + 3223 * adjacent_bayer[1] + 524288) >> 15;
    }
  }
}
```