user: 请将以下的汇编代码转换成C语言代码：

```asm
<BTIC4B_DecImageClrDec2T_RCT>:
  endbr64
  push   %r15
  mov    %ecx,%eax
  push   %r14
  push   %r13
  push   %r12
  mov    %edx,%r12d
  mov    %r8d,%edx
  push   %rbp
  sar    %edx
  push   %rbx
  sub    %edx,%esi
  mov    %esi,%r14d
  lea    (%r8,%rsi,1),%ebp
  sub    $0x8,%rsp
  and    $0x40,%edi
  je     L18
  mov    %r9d,%edx
  mov    0x40(%rsp),%r13d
  sar    %edx
  sub    %edx,%r12d
  mov    0x40(%rsp),%edx
  add    %r12d,%r9d
  sar    %edx
  sub    %edx,%eax
  lea    (%r12,%rax,1),%edx
  add    %eax,%r13d
  sar    $0x2,%edx
  sub    %edx,%r14d
  lea    (%rax,%r14,1),%ebx
  lea    (%r9,%r13,1),%eax
  sar    $0x2,%eax
  lea    (%r12,%r14,1),%r15d
  sub    %eax,%ebp
  mov    %ebx,%eax
  or     %r14d,%eax
  add    %ebp,%r13d
  lea    (%r9,%rbp,1),%r12d
  or     %r15d,%eax
  shr    $0x8,%eax
  jne    L51
L14:
  mov    %r13d,%eax
  or     %ebp,%eax
  or     %r12d,%eax
  shr    $0x8,%eax
  jne    L57
L6:
  mov    0x48(%rsp),%rax
  mov    %ebx,(%rax)
  mov    0x50(%rsp),%rax
  mov    %r14d,(%rax)
  mov    0x58(%rsp),%rax
  mov    %r15d,(%rax)
  mov    0x60(%rsp),%rax
  mov    %r13d,(%rax)
  mov    0x68(%rsp),%rax
  mov    %ebp,(%rax)
  mov    0x70(%rsp),%rax
  mov    %r12d,(%rax)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L18:
  lea    (%r12,%rcx,1),%edx
  sar    $0x2,%edx
  sub    %edx,%r14d
  sub    %edx,%ebp
  lea    (%rcx,%r14,1),%ebx
  lea    (%r12,%r14,1),%r15d
  add    %ebp,%r12d
  mov    %ebx,%eax
  lea    (%rcx,%rbp,1),%r13d
  or     %r14d,%eax
  or     %r15d,%eax
  shr    $0x8,%eax
  je     L14
L51:
  mov    %ebx,%edi
  call   <lqtvq_clamp255@plt>
  mov    %r14d,%edi
  mov    %eax,%ebx
  call   <lqtvq_clamp255@plt>
  mov    %r15d,%edi
  mov    %eax,%r14d
  call   <lqtvq_clamp255@plt>
  mov    %eax,%r15d
  mov    %r13d,%eax
  or     %ebp,%eax
  or     %r12d,%eax
  shr    $0x8,%eax
  je     L6
L57:
  mov    %r13d,%edi
  call   <lqtvq_clamp255@plt>
  mov    %ebp,%edi
  mov    %eax,%r13d
  call   <lqtvq_clamp255@plt>
  mov    %r12d,%edi
  mov    %eax,%ebp
  call   <lqtvq_clamp255@plt>
  mov    %eax,%r12d
  jmp    L6
```

assistant: ```c
void BTIC4B_DecImageClrDec2T_RCT(int tag, int acy, int acu, int acv, int dcy, int dcu, int dcv, int *rr0, int *rg0, int *rb0, int *rr1, int *rg1, int *rb1) {
  int mcy, mcu, mcv;
  int ncy, ncu, ncv;
  int cr0, cg0, cb0;
  int cr3, cg3, cb3;
  mcy = acy - (dcy >> 1);
  ncy = mcy + dcy;
  mcu = acu - (dcu >> 1);
  ncu = mcu + dcu;
  mcv = acv - (dcv >> 1);
  ncv = mcv + dcv;
  if (tag & 0x40) {
    cg0 = mcy - ((mcu + mcv) >> 2);
    cb0 = cg0 + mcu;
    cr0 = cg0 + mcv;
    cg3 = ncy - ((ncu + ncv) >> 2);
    cb3 = cg3 + ncu;
    cr3 = cg3 + ncv;
  } else {
    cg0 = mcy - ((acu + acv) >> 2);
    cb0 = cg0 + acu;
    cr0 = cg0 + acv;
    cg3 = ncy - ((acu + acv) >> 2);
    cb3 = cg3 + acu;
    cr3 = cg3 + acv;
  }
  if ((cr0 | cg0 | cb0) >> 8) {
    cr0 = lqtvq_clamp255(cr0);
    cg0 = lqtvq_clamp255(cg0);
    cb0 = lqtvq_clamp255(cb0);
  }
  if ((cr3 | cg3 | cb3) >> 8) {
    cr3 = lqtvq_clamp255(cr3);
    cg3 = lqtvq_clamp255(cg3);
    cb3 = lqtvq_clamp255(cb3);
  }
  *rr0 = cr0;
  *rg0 = cg0;
  *rb0 = cb0;
  *rr1 = cr3;
  *rg1 = cg3;
  *rb1 = cb3;
}
```