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

```asm
<RGB_to_YUV>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    %r8,-0x38(%rbp)
  mov    %r9,-0x40(%rbp)
  movq   $0x0,-0x8(%rbp)
  jmp    L21
L18:
  movq   $0x0,-0x10(%rbp)
  jmp    L26
L33:
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  D66(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm2,%xmm2
  cvtss2sd %xmm0,%xmm2
  movsd  D89(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm2,%xmm2
  cvtss2sd %xmm0,%xmm2
  movsd  D98(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  D31(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  D55(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd %xmm1,%xmm2
  movsd  D8(%rip),%xmm1
  mulsd  %xmm1,%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm2,%xmm2
  cvtss2sd %xmm0,%xmm2
  movsd  D83(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  D56(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%rax)
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movsd  D1(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd %xmm1,%xmm2
  movsd  D74(%rip),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  movss  (%rax),%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd %xmm1,%xmm2
  movsd  D6(%rip),%xmm1
  mulsd  %xmm1,%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  D56(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x10(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x8(%rbp),%rax
  shl    $0x2,%rax
  add    %rdx,%rax
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,(%rax)
  addq   $0x1,-0x10(%rbp)
L26:
  mov    -0x10(%rbp),%rax
  cmp    0x10(%rbp),%rax
  jl     L33
  addq   $0x1,-0x8(%rbp)
L21:
  mov    -0x8(%rbp),%rax
  cmp    0x18(%rbp),%rax
  jl     L18
  nop
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D66
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D89
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D98
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D31
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D55
type_infered: byte[8]
name: extract_symbolic_data
arguments: data_label: D8
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D83
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D56
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D1
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D74
type_infered: f64
name: extract_symbolic_data
arguments: data_label: D6
type_infered: f64

tool: D66: 0.1277

tool: D89: 0.5212

tool: D98: 0.21

tool: D31: 16

tool: {"D55": [0x59,0x17,0xb7,0xd1,0x00,0xde,0xb2,0xbf]}

tool: D8: 0.3007

tool: D83: 0.3744

tool: D56: 128

tool: D1: 0.5334

tool: D74: 0.3802

tool: D6: 0.1532

assistant: ```c
void RGB_to_YUV(float **R, float **G, float **B, float **Y, float **U, float **V, long nx, long ny) {
  long i, j;
  for (j = 0; j < ny; j++)
    for (i = 0; i < nx; i++) {
      Y[i][j] = (0.1277 * R[i][j] + 0.5212 * G[i][j] + 0.21 * B[i][j]) + 16.0;
      U[i][j] = ((-0.0737 * R[i][j] - 0.3007 * G[i][j] + 0.3744 * B[i][j])) + 128.0;
      V[i][j] = ((0.5334 * R[i][j] - 0.3802 * G[i][j] - 0.1532 * B[i][j])) + 128.0;
    }
  return;
}
```