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

```asm
<v4lconvert_border_bayer_line_to_y>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,-0x2c(%rbp)
  mov    %r8d,-0x30(%rbp)
  mov    %r9d,-0x34(%rbp)
  cmpl   $0x0,-0x30(%rbp)
  je     L174
  cmpl   $0x0,-0x34(%rbp)
  je     L153
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x2105,%eax,%edx
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x40d2,%eax,%eax
  add    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0xc97,%eax,%eax
  add    %edx,%eax
  add    $0x80000,%eax
  sar    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L108
L153:
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x2105,%eax,%edx
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x40d2,%eax,%eax
  add    %eax,%edx
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0xc97,%eax,%eax
  add    %edx,%eax
  add    $0x80000,%eax
  sar    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
L108:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,%edx
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x20(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  cmpl   $0x0,-0x34(%rbp)
  je     L70
  mov    -0x4(%rbp),%eax
  imul   $0x1082,%eax,%edx
  mov    -0x8(%rbp),%eax
  imul   $0x159b,%eax,%eax
  add    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0xc97,%eax,%eax
  add    %edx,%eax
  add    $0x80000,%eax
  sar    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L201
L70:
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x2105,%eax,%edx
  mov    -0x8(%rbp),%eax
  imul   $0x159b,%eax,%eax
  add    %eax,%edx
  mov    -0x4(%rbp),%eax
  imul   $0x64b,%eax,%eax
  add    %edx,%eax
  add    $0x80000,%eax
  sar    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
L201:
  addq   $0x1,-0x18(%rbp)
  addq   $0x1,-0x20(%rbp)
  subl   $0x2,-0x2c(%rbp)
  jmp    L204
L174:
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  cmpl   $0x0,-0x34(%rbp)
  je     L138
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x2105,%eax,%edx
  mov    -0x8(%rbp),%eax
  imul   $0x2069,%eax,%eax
  add    %eax,%edx
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0xc97,%eax,%eax
  add    %edx,%eax
  add    $0x80000,%eax
  sar    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L183
L138:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x2105,%eax,%edx
  mov    -0x8(%rbp),%eax
  imul   $0x2069,%eax,%eax
  add    %eax,%edx
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0xc97,%eax,%eax
  add    %edx,%eax
  add    $0x80000,%eax
  sar    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
L183:
  subl   $0x1,-0x2c(%rbp)
L204:
  cmpl   $0x0,-0x34(%rbp)
  je     L14
  jmp    L130
L71:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x2105,%eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x40d2,%eax,%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%eax
  imul   $0x64b,%eax,%eax
  add    %edx,%eax
  add    $0x80000,%eax
  sar    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  addq   $0x1,-0x18(%rbp)
  addq   $0x1,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,%edx
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x20(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  imul   $0x1082,%eax,%edx
  mov    -0x8(%rbp),%eax
  imul   $0x159b,%eax,%eax
  add    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0xc97,%eax,%eax
  add    %edx,%eax
  add    $0x80000,%eax
  sar    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  addq   $0x1,-0x18(%rbp)
  addq   $0x1,-0x20(%rbp)
  subl   $0x2,-0x2c(%rbp)
L130:
  cmpl   $0x2,-0x2c(%rbp)
  jg     L71
  jmp    L80
L170:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  imul   $0x1082,%eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x40d2,%eax,%eax
  add    %eax,%edx
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0xc97,%eax,%eax
  add    %edx,%eax
  add    $0x80000,%eax
  sar    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  addq   $0x1,-0x18(%rbp)
  addq   $0x1,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,%edx
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x20(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x2105,%eax,%edx
  mov    -0x8(%rbp),%eax
  imul   $0x159b,%eax,%eax
  add    %eax,%edx
  mov    -0x4(%rbp),%eax
  imul   $0x64b,%eax,%eax
  add    %edx,%eax
  add    $0x80000,%eax
  sar    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  addq   $0x1,-0x18(%rbp)
  addq   $0x1,-0x20(%rbp)
  subl   $0x2,-0x2c(%rbp)
L14:
  cmpl   $0x2,-0x2c(%rbp)
  jg     L170
L80:
  cmpl   $0x2,-0x2c(%rbp)
  jne    L79
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  cmpl   $0x0,-0x34(%rbp)
  je     L135
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x2105,%eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x40d2,%eax,%eax
  add    %eax,%edx
  mov    -0x8(%rbp),%eax
  imul   $0x64b,%eax,%eax
  add    %edx,%eax
  add    $0x80000,%eax
  sar    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L145
L135:
  mov    -0x8(%rbp),%eax
  imul   $0x1082,%eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x40d2,%eax,%eax
  add    %eax,%edx
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0xc97,%eax,%eax
  add    %edx,%eax
  add    $0x80000,%eax
  sar    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
L145:
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x20(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  mov    %eax,-0x8(%rbp)
  cmpl   $0x0,-0x34(%rbp)
  je     L198
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x2105,%eax,%edx
  mov    -0x8(%rbp),%eax
  imul   $0x2069,%eax,%eax
  add    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0xc97,%eax,%eax
  add    %edx,%eax
  add    $0x80000,%eax
  sar    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L209
L198:
  mov    -0x18(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x2105,%eax,%edx
  mov    -0x8(%rbp),%eax
  imul   $0x2069,%eax,%eax
  add    %eax,%edx
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0xc97,%eax,%eax
  add    %edx,%eax
  add    $0x80000,%eax
  sar    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L209
L79:
  cmpl   $0x0,-0x34(%rbp)
  je     L189
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x2105,%eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x40d2,%eax,%eax
  add    %eax,%edx
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0xc97,%eax,%eax
  add    %edx,%eax
  add    $0x80000,%eax
  sar    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L209
L189:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x2105,%eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x40d2,%eax,%eax
  add    %eax,%edx
  mov    -0x20(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0xc97,%eax,%eax
  add    %edx,%eax
  add    $0x80000,%eax
  sar    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
L209:
  nop
  pop    %rbp
  ret
```

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;
    }
  }
}
```