user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<y4m_422jpeg_420jpeg_helper>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  mov    %ecx,-0x28(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L15
L193:
  movl   $0x0,-0x8(%rbp)
  jmp    L16
L105:
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x6,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%eax
  mov    $0x2,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  sub    $0x1,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x4e,%eax,%eax
  add    %eax,%ecx
  mov    -0x28(%rbp),%eax
  mov    $0x3,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  sub    $0x1,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0xffffffef,%eax,%eax
  add    %eax,%ecx
  mov    -0x28(%rbp),%eax
  mov    $0x4,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  sub    $0x1,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %ecx,%eax
  add    $0x40,%eax
  sar    $0x7,%eax
  test   %eax,%eax
  jle    L131
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x6,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%eax
  mov    $0x2,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  sub    $0x1,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0x4e,%eax,%eax
  add    %eax,%ecx
  mov    -0x28(%rbp),%eax
  mov    $0x3,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  sub    $0x1,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  imul   $0xffffffef,%eax,%eax
  add    %eax,%ecx
  mov    -0x28(%rbp),%eax
  mov    $0x4,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  sub    $0x1,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %ecx,%eax
  add    $0x40,%eax
  sar    $0x7,%eax
  mov    $0xff,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  mov    %eax,%edx
  jmp    L187
L131:
  mov    $0x0,%edx
L187:
  mov    -0x8(%rbp),%eax
  sar    %eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    %dl,(%rax)
  addl   $0x2,-0x8(%rbp)
L16:
  mov    -0x28(%rbp),%eax
  mov    $0x2,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L105
  jmp    L8
L199:
  mov    -0x8(%rbp),%eax
  sub    $0x2,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x8(%rbp),%eax
  add    $0x3,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  lea    (%rax,%rdx,1),%esi
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x8(%rbp),%eax
  add    $0x2,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  imul   $0xffffffef,%eax,%eax
  add    %eax,%esi
  mov    -0x8(%rbp),%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x8(%rbp),%eax
  add    $0x1,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  imul   $0x4e,%eax,%eax
  add    %esi,%eax
  add    $0x40,%eax
  sar    $0x7,%eax
  test   %eax,%eax
  jle    L1
  mov    -0x8(%rbp),%eax
  sub    $0x2,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x8(%rbp),%eax
  add    $0x3,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  lea    (%rax,%rdx,1),%esi
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x8(%rbp),%eax
  add    $0x2,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  imul   $0xffffffef,%eax,%eax
  add    %eax,%esi
  mov    -0x8(%rbp),%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x8(%rbp),%eax
  add    $0x1,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  imul   $0x4e,%eax,%eax
  add    %esi,%eax
  add    $0x40,%eax
  sar    $0x7,%eax
  mov    $0xff,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  mov    %eax,%edx
  jmp    L6
L1:
  mov    $0x0,%edx
L6:
  mov    -0x8(%rbp),%eax
  sar    %eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    %dl,(%rax)
  addl   $0x2,-0x8(%rbp)
L8:
  mov    -0x28(%rbp),%eax
  sub    $0x3,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L199
  jmp    L159
L215:
  mov    -0x8(%rbp),%eax
  sub    $0x2,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  lea    (%rax,%rdx,1),%esi
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%ecx
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,%edx
  jl     L123
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  jmp    L24
L123:
  mov    -0x8(%rbp),%eax
  add    $0x2,%eax
L24:
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %ecx,%eax
  imul   $0xffffffef,%eax,%eax
  add    %eax,%esi
  mov    -0x8(%rbp),%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L173
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  jmp    L14
L173:
  mov    -0x8(%rbp),%eax
  add    $0x1,%eax
L14:
  imul   -0x24(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  imul   $0x4e,%eax,%eax
  add    %esi,%eax
  add    $0x40,%eax
  sar    $0x7,%eax
  test   %eax,%eax
  jle    L42
  mov    -0x8(%rbp),%eax
  sub    $0x2,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  lea    (%rax,%rdx,1),%esi
  mov    -0x8(%rbp),%eax
  sub    $0x1,%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%ecx
  mov    -0x8(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,%edx
  jl     L176
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  jmp    L40
L176:
  mov    -0x8(%rbp),%eax
  add    $0x2,%eax
L40:
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %ecx,%eax
  imul   $0xffffffef,%eax,%eax
  add    %eax,%esi
  mov    -0x8(%rbp),%eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movzbl %al,%edx
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L125
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  jmp    L84
L125:
  mov    -0x8(%rbp),%eax
  add    $0x1,%eax
L84:
  imul   -0x24(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x20(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  add    %edx,%eax
  imul   $0x4e,%eax,%eax
  add    %esi,%eax
  add    $0x40,%eax
  sar    $0x7,%eax
  mov    $0xff,%edx
  cmp    %edx,%eax
  cmovg  %edx,%eax
  mov    %eax,%edx
  jmp    L145
L42:
  mov    $0x0,%edx
L145:
  mov    -0x8(%rbp),%eax
  sar    %eax
  imul   -0x24(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  mov    %dl,(%rax)
  addl   $0x2,-0x8(%rbp)
L159:
  mov    -0x8(%rbp),%eax
  cmp    -0x28(%rbp),%eax
  jl     L215
  addq   $0x1,-0x20(%rbp)
  addq   $0x1,-0x18(%rbp)
  addl   $0x1,-0x4(%rbp)
L15:
  mov    -0x4(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L193
  nop
  nop
  pop    %rbp
  ret
```

assistant: ```c
void y4m_422jpeg_420jpeg_helper(unsigned char *_dst, const unsigned char *_src, int _c_w, int _c_h) {
  int y;
  int x;
  for (x = 0; x < _c_w; x++) {
    for (y = 0; y < ((_c_h) > (2) ? (2) : (_c_h)); y += 2) {
      _dst[(y >> 1) * _c_w] = (((0) < ((((64 * _src[0] + 78 * _src[((1) > (_c_h - 1) ? (_c_h - 1) : (1)) * _c_w] - 17 * _src[((2) > (_c_h - 1) ? (_c_h - 1) : (2)) * _c_w] + 3 * _src[((3) > (_c_h - 1) ? (_c_h - 1) : (3)) * _c_w] + 64) >> 7) > (255) ? (255) : ((64 * _src[0] + 78 * _src[((1) > (_c_h - 1) ? (_c_h - 1) : (1)) * _c_w] - 17 * _src[((2) > (_c_h - 1) ? (_c_h - 1) : (2)) * _c_w] + 3 * _src[((3) > (_c_h - 1) ? (_c_h - 1) : (3)) * _c_w] + 64) >> 7))) ? ((((64 * _src[0] + 78 * _src[((1) > (_c_h - 1) ? (_c_h - 1) : (1)) * _c_w] - 17 * _src[((2) > (_c_h - 1) ? (_c_h - 1) : (2)) * _c_w] + 3 * _src[((3) > (_c_h - 1) ? (_c_h - 1) : (3)) * _c_w] + 64) >> 7) > (255) ? (255) : ((64 * _src[0] + 78 * _src[((1) > (_c_h - 1) ? (_c_h - 1) : (1)) * _c_w] - 17 * _src[((2) > (_c_h - 1) ? (_c_h - 1) : (2)) * _c_w] + 3 * _src[((3) > (_c_h - 1) ? (_c_h - 1) : (3)) * _c_w] + 64) >> 7))) : (0)));
    }
    for (; y < _c_h - 3; y += 2) {
      _dst[(y >> 1) * _c_w] = (((0) < ((((3 * (_src[(y - 2) * _c_w] + _src[(y + 3) * _c_w]) - 17 * (_src[(y - 1) * _c_w] + _src[(y + 2) * _c_w]) + 78 * (_src[y * _c_w] + _src[(y + 1) * _c_w]) + 64) >> 7) > (255) ? (255) : ((3 * (_src[(y - 2) * _c_w] + _src[(y + 3) * _c_w]) - 17 * (_src[(y - 1) * _c_w] + _src[(y + 2) * _c_w]) + 78 * (_src[y * _c_w] + _src[(y + 1) * _c_w]) + 64) >> 7))) ? ((((3 * (_src[(y - 2) * _c_w] + _src[(y + 3) * _c_w]) - 17 * (_src[(y - 1) * _c_w] + _src[(y + 2) * _c_w]) + 78 * (_src[y * _c_w] + _src[(y + 1) * _c_w]) + 64) >> 7) > (255) ? (255) : ((3 * (_src[(y - 2) * _c_w] + _src[(y + 3) * _c_w]) - 17 * (_src[(y - 1) * _c_w] + _src[(y + 2) * _c_w]) + 78 * (_src[y * _c_w] + _src[(y + 1) * _c_w]) + 64) >> 7))) : (0)));
    }
    for (; y < _c_h; y += 2) {
      _dst[(y >> 1) * _c_w] = (((0) < ((((3 * (_src[(y - 2) * _c_w] + _src[(_c_h - 1) * _c_w]) - 17 * (_src[(y - 1) * _c_w] + _src[((y + 2) > (_c_h - 1) ? (_c_h - 1) : (y + 2)) * _c_w]) + 78 * (_src[y * _c_w] + _src[((y + 1) > (_c_h - 1) ? (_c_h - 1) : (y + 1)) * _c_w]) + 64) >> 7) > (255) ? (255) : ((3 * (_src[(y - 2) * _c_w] + _src[(_c_h - 1) * _c_w]) - 17 * (_src[(y - 1) * _c_w] + _src[((y + 2) > (_c_h - 1) ? (_c_h - 1) : (y + 2)) * _c_w]) + 78 * (_src[y * _c_w] + _src[((y + 1) > (_c_h - 1) ? (_c_h - 1) : (y + 1)) * _c_w]) + 64) >> 7))) ? ((((3 * (_src[(y - 2) * _c_w] + _src[(_c_h - 1) * _c_w]) - 17 * (_src[(y - 1) * _c_w] + _src[((y + 2) > (_c_h - 1) ? (_c_h - 1) : (y + 2)) * _c_w]) + 78 * (_src[y * _c_w] + _src[((y + 1) > (_c_h - 1) ? (_c_h - 1) : (y + 1)) * _c_w]) + 64) >> 7) > (255) ? (255) : ((3 * (_src[(y - 2) * _c_w] + _src[(_c_h - 1) * _c_w]) - 17 * (_src[(y - 1) * _c_w] + _src[((y + 2) > (_c_h - 1) ? (_c_h - 1) : (y + 2)) * _c_w]) + 78 * (_src[y * _c_w] + _src[((y + 1) > (_c_h - 1) ? (_c_h - 1) : (y + 1)) * _c_w]) + 64) >> 7))) : (0)));
    }
    _src++;
    _dst++;
  }
}
```