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

```asm
<v4lconvert_uyvy_to_bgr24>:
  endbr64
  sub    $0x1,%ecx
  js     L50
  test   %edx,%edx
  jle    L50
  sub    $0x1,%edx
  push   %r14
  mov    %rdi,%r9
  mov    %rsi,%r11
  shr    %edx
  push   %r13
  mov    %ecx,%r10d
  xor    %r8d,%r8d
  lea    0x1(%rdx),%eax
  push   %r12
  push   %rbp
  lea    0x0(,%rax,4),%rbp
  push   %rbx
  lea    (%rax,%rax,2),%rbx
  add    %rbx,%rbx
L34:
  mov    %r9,%rsi
  mov    %r11,%rdi
  add    %rbp,%r9
  nopl   0x0(%rax)
L43:
  movzbl (%rsi),%edx
  movzbl 0x2(%rsi),%eax
  mov    $0xffffffff,%r14d
  add    $0xffffff80,%edx
  add    $0xffffff80,%eax
  mov    %edx,%ecx
  lea    (%rax,%rax,1),%r12d
  shl    $0x7,%ecx
  add    %edx,%ecx
  lea    (%rdx,%rdx,2),%edx
  lea    (%rdx,%rax,4),%edx
  add    %r12d,%eax
  sar    $0x6,%ecx
  add    %r12d,%edx
  movzbl 0x1(%rsi),%r12d
  sar    %eax
  sar    $0x3,%edx
  mov    %r12d,%r13d
  add    %ecx,%r12d
  cmp    $0xff,%r12d
  jg     L98
  add    %ecx,%r13d
  test   %r12d,%r12d
  mov    %r13d,%r14d
  cmovs  %r8d,%r14d
L98:
  mov    %r14b,(%rdi)
  movzbl 0x1(%rsi),%r12d
  mov    $0xffffffff,%r14d
  mov    %r12d,%r13d
  sub    %edx,%r12d
  cmp    $0xff,%r12d
  jg     L38
  sub    %edx,%r13d
  test   %r12d,%r12d
  mov    %r13d,%r14d
  cmovs  %r8d,%r14d
L38:
  mov    %r14b,0x1(%rdi)
  movzbl 0x1(%rsi),%r12d
  mov    $0xffffffff,%r14d
  mov    %r12d,%r13d
  add    %eax,%r12d
  cmp    $0xff,%r12d
  jg     L76
  add    %eax,%r13d
  test   %r12d,%r12d
  mov    %r13d,%r14d
  cmovs  %r8d,%r14d
L76:
  mov    %r14b,0x2(%rdi)
  movzbl 0x3(%rsi),%r12d
  mov    $0xffffffff,%r14d
  mov    %r12d,%r13d
  add    %ecx,%r12d
  cmp    $0xff,%r12d
  jg     L93
  add    %ecx,%r13d
  test   %r12d,%r12d
  mov    %r13d,%r14d
  cmovs  %r8d,%r14d
L93:
  mov    %r14b,0x3(%rdi)
  movzbl 0x3(%rsi),%ecx
  mov    $0xffffffff,%r13d
  mov    %ecx,%r12d
  sub    %edx,%ecx
  cmp    $0xff,%ecx
  jg     L54
  sub    %edx,%r12d
  test   %ecx,%ecx
  mov    %r12d,%r13d
  cmovs  %r8d,%r13d
L54:
  mov    %r13b,0x4(%rdi)
  movzbl 0x3(%rsi),%edx
  mov    $0xffffffff,%r12d
  mov    %edx,%ecx
  add    %eax,%edx
  cmp    $0xff,%edx
  jg     L63
  add    %eax,%ecx
  test   %edx,%edx
  cmovs  %r8d,%ecx
  mov    %ecx,%r12d
L63:
  add    $0x4,%rsi
  add    $0x6,%rdi
  mov    %r12b,-0x1(%rdi)
  cmp    %rsi,%r9
  jne    L43
  add    %rbx,%r11
  sub    $0x1,%r10d
  jae    L34
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L50:
  ret
```

assistant: ```c
void v4lconvert_uyvy_to_bgr24(const unsigned char *src, unsigned char *dest, int width, int height) {
  int j;
  while (--height >= 0) {
    for (j = 0; j < width; j += 2) {
      int u = src[0];
      int v = src[2];
      int u1 = (((u - 128) << 7) + (u - 128)) >> 6;
      int rg = (((u - 128) << 1) + (u - 128) + ((v - 128) << 2) + ((v - 128) << 1)) >> 3;
      int v1 = (((v - 128) << 1) + (v - 128)) >> 1;
      *dest++ = (unsigned char)(((src[1] + u1) > 0xFF) ? 0xff : (((src[1] + u1) < 0) ? 0 : (src[1] + u1)));
      *dest++ = (unsigned char)(((src[1] - rg) > 0xFF) ? 0xff : (((src[1] - rg) < 0) ? 0 : (src[1] - rg)));
      *dest++ = (unsigned char)(((src[1] + v1) > 0xFF) ? 0xff : (((src[1] + v1) < 0) ? 0 : (src[1] + v1)));
      *dest++ = (unsigned char)(((src[3] + u1) > 0xFF) ? 0xff : (((src[3] + u1) < 0) ? 0 : (src[3] + u1)));
      *dest++ = (unsigned char)(((src[3] - rg) > 0xFF) ? 0xff : (((src[3] - rg) < 0) ? 0 : (src[3] - rg)));
      *dest++ = (unsigned char)(((src[3] + v1) > 0xFF) ? 0xff : (((src[3] + v1) < 0) ? 0 : (src[3] + v1)));
      src += 4;
    }
  }
}
```