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

```asm
<qc_imag_bay2rgb_cottnoip10>:
  endbr64
  push   %r15
  mov    %rdx,%r10
  sar    %r9d
  mov    %ecx,%eax
  push   %r14
  sar    %r8d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x1(%r9),%ebx
  sub    $0x98,%rsp
  mov    %rdx,0x88(%rsp)
  movslq %esi,%rdx
  mov    0xd0(%rsp),%r15d
  lea    (%rdx,%rdx,1),%rbp
  mov    %ebx,0x68(%rsp)
  lea    0x4(%rbp),%rbx
  lea    (%r15,%r15,1),%ecx
  mov    %r9d,0x6c(%rsp)
  mov    %rbx,0x8(%rsp)
  lea    0x0(,%rdx,4),%rbx
  movslq %ecx,%rsi
  movslq %r15d,%rdx
  mov    %rbx,0x58(%rsp)
  movslq %eax,%rbx
  add    %eax,%eax
  lea    0x2(%rbp),%r12
  cltq
  mov    %rdx,0x20(%rsp)
  lea    0x2(%rbp,%rbp,1),%r14
  mov    %rax,0x60(%rsp)
  lea    -0x2(%r8),%eax
  add    $0x1,%rax
  mov    %rbx,0x10(%rsp)
  add    %rdx,%rbx
  lea    0x0(,%rax,4),%rdx
  mov    %rsi,0x28(%rsp)
  imul   %rsi,%rax
  mov    %rbx,0x18(%rsp)
  mov    %rdi,%rbx
  add    %rdx,%rbx
  mov    %rdi,0x80(%rsp)
  mov    %rdx,0x70(%rsp)
  mov    %rax,%rsi
  mov    %rax,0x78(%rsp)
  mov    %r10,%rax
  add    %rsi,%rax
  mov    %rbx,0x38(%rsp)
  mov    %rax,0x40(%rsp)
  mov    %rbx,0x30(%rsp)
  mov    %r10,0x50(%rsp)
  mov    %rdi,0x48(%rsp)
  xchg   %ax,%ax
L0:
  mov    0x48(%rsp),%rax
  mov    0x50(%rsp),%rbx
  mov    %r12,%r13
  mov    %rax,%r12
L18:
  movzwl (%r12),%ecx
  movzwl (%r12,%rbp,1),%r8d
  mov    %rbx,%rdi
  mov    %r15d,%esi
  movzwl 0x2(%r12),%edx
  add    $0x4,%r12
  call   <qc_imag_writergb10@plt>
  mov    0x20(%rsp),%rax
  movzwl (%r12),%ecx
  mov    %r15d,%esi
  movzwl -0x2(%r12),%edx
  lea    (%rax,%rbx,1),%rdi
  mov    0x8(%rsp),%rax
  movzwl -0x4(%r12,%rax,1),%r8d
  call   <qc_imag_writergb10@plt>
  mov    0x10(%rsp),%rsi
  movzwl -0x4(%r12,%r13,1),%ecx
  movzwl -0x4(%r12,%r14,1),%edx
  movzwl -0x4(%r12,%rbp,1),%r8d
  lea    (%rsi,%rbx,1),%rdi
  mov    %r15d,%esi
  call   <qc_imag_writergb10@plt>
  mov    0x8(%rsp),%rax
  mov    0x18(%rsp),%rsi
  movzwl -0x4(%r12,%r13,1),%ecx
  movzwl -0x4(%r12,%r14,1),%edx
  movzwl -0x4(%r12,%rax,1),%r8d
  lea    (%rsi,%rbx,1),%rdi
  mov    %r15d,%esi
  call   <qc_imag_writergb10@plt>
  add    0x28(%rsp),%rbx
  cmp    0x30(%rsp),%r12
  jne    L18
  mov    0x38(%rsp),%rbx
  mov    0x40(%rsp),%rdi
  mov    %r12,%rax
  mov    %r15d,%esi
  mov    %r13,%r12
  mov    %rax,%r13
  movzwl (%rbx),%ecx
  movzwl 0x2(%rbx),%edx
  movzwl (%rbx,%rbp,1),%r8d
  call   <qc_imag_writergb10@plt>
  mov    %rbx,%rax
  movzwl (%rbx,%r12,1),%ecx
  movzwl 0x2(%rbx),%edx
  mov    0x20(%rsp),%rsi
  mov    0x40(%rsp),%rbx
  mov    %rax,0x38(%rsp)
  movzwl (%rax,%rbp,1),%r8d
  add    %rbx,%rsi
  mov    %rsi,%rdi
  mov    %r15d,%esi
  call   <qc_imag_writergb10@plt>
  mov    0x10(%rsp),%rsi
  mov    0x38(%rsp),%rax
  mov    %rbx,0x40(%rsp)
  add    %rbx,%rsi
  movzwl (%rax,%r12,1),%ecx
  movzwl (%rax,%r14,1),%edx
  mov    %rsi,%rbx
  movzwl (%rax,%rbp,1),%r8d
  mov    %r15d,%esi
  mov    %rbx,%rdi
  call   <qc_imag_writergb10@plt>
  mov    0x38(%rsp),%rax
  mov    0x40(%rsp),%rdi
  mov    %r15d,%esi
  add    0x18(%rsp),%rdi
  movzwl (%rax,%r12,1),%ecx
  movzwl (%rax,%r14,1),%edx
  movzwl (%rax,%rbp,1),%r8d
  call   <qc_imag_writergb10@plt>
  mov    0x58(%rsp),%rdi
  add    0x10(%rsp),%rbx
  add    %rdi,0x48(%rsp)
  mov    0x60(%rsp),%rcx
  add    %rdi,%r13
  add    %rcx,0x50(%rsp)
  add    %rdi,0x38(%rsp)
  subl   $0x1,0x68(%rsp)
  mov    %rbx,0x40(%rsp)
  mov    %r13,0x30(%rsp)
  jne    L0
  mov    0x6c(%rsp),%eax
  mov    0x80(%rsp),%r9
  mov    0x88(%rsp),%r13
  lea    -0x2(%rax),%edx
  mov    %rdi,%rax
  add    $0x1,%rdx
  imul   %rdx,%rax
  imul   %rcx,%rdx
  add    %rax,%r9
  mov    0x70(%rsp),%rax
  add    %rdx,%r13
  mov    %r9,%r14
  add    %r9,%rax
  mov    %r13,0x38(%rsp)
  mov    %r13,%rbx
  mov    0x8(%rsp),%r13
  mov    %rax,0x30(%rsp)
  nopw   0x0(%rax,%rax,1)
L25:
  movzwl (%r14),%ecx
  movzwl 0x2(%r14),%edx
  mov    %rbx,%rdi
  mov    %r15d,%esi
  movzwl (%r14,%rbp,1),%r8d
  add    $0x4,%r14
  call   <qc_imag_writergb10@plt>
  mov    0x20(%rsp),%rax
  movzwl (%r14),%ecx
  mov    %r15d,%esi
  movzwl -0x2(%r14),%edx
  movzwl -0x4(%r14,%r13,1),%r8d
  lea    (%rax,%rbx,1),%rdi
  call   <qc_imag_writergb10@plt>
  mov    0x10(%rsp),%rax
  movzwl -0x2(%r14),%edx
  mov    %r15d,%esi
  movzwl -0x4(%r14,%r12,1),%ecx
  movzwl -0x4(%r14,%rbp,1),%r8d
  lea    (%rax,%rbx,1),%rdi
  call   <qc_imag_writergb10@plt>
  mov    0x18(%rsp),%rax
  movzwl -0x2(%r14),%edx
  mov    %r15d,%esi
  movzwl -0x4(%r14,%r12,1),%ecx
  movzwl -0x4(%r14,%r13,1),%r8d
  lea    (%rax,%rbx,1),%rdi
  call   <qc_imag_writergb10@plt>
  add    0x28(%rsp),%rbx
  cmp    0x30(%rsp),%r14
  jne    L25
  mov    0x38(%rsp),%r13
  mov    0x78(%rsp),%rbx
  add    %r14,%rbp
  mov    %r15d,%esi
  movzwl (%r14),%ecx
  movzwl 0x2(%r14),%edx
  add    %r14,%r12
  add    %r13,%rbx
  movzwl 0x0(%rbp),%r8d
  mov    %rbx,%rdi
  call   <qc_imag_writergb10@plt>
  mov    0x20(%rsp),%rdi
  movzwl (%r12),%ecx
  mov    %r15d,%esi
  movzwl 0x2(%r14),%edx
  movzwl 0x0(%rbp),%r8d
  add    %rbx,%rdi
  call   <qc_imag_writergb10@plt>
  mov    0x10(%rsp),%rdi
  movzwl (%r12),%ecx
  mov    %r15d,%esi
  movzwl 0x2(%r14),%edx
  movzwl 0x0(%rbp),%r8d
  add    %rbx,%rdi
  call   <qc_imag_writergb10@plt>
  mov    0x18(%rsp),%rdi
  movzwl (%r12),%ecx
  mov    %r15d,%esi
  movzwl 0x2(%r14),%edx
  movzwl 0x0(%rbp),%r8d
  add    $0x98,%rsp
  add    %rbx,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1050 <qc_imag_writergb10@plt>
```

assistant: ```c
void qc_imag_bay2rgb_cottnoip10(unsigned short *bay, int bay_line, unsigned char *rgb, int rgb_line, int columns, int rows, int bpp) {
  unsigned short *cur_bay;
  unsigned char *cur_rgb;
  int bay_line2, rgb_line2;
  int total_columns;
  total_columns = (columns >> 1) - 1;
  rows = (rows >> 1) - 1;
  bay_line2 = 2 * bay_line;
  rgb_line2 = 2 * rgb_line;
  do {
    cur_bay = bay;
    cur_rgb = rgb;
    columns = total_columns;
    do {
      qc_imag_writergb10(cur_rgb + 0, bpp, cur_bay[1], cur_bay[0], cur_bay[bay_line]);
      qc_imag_writergb10(cur_rgb + bpp, bpp, cur_bay[1], cur_bay[2], cur_bay[bay_line + 2]);
      qc_imag_writergb10(cur_rgb + rgb_line, bpp, cur_bay[bay_line2 + 1], cur_bay[bay_line + 1], cur_bay[bay_line]);
      qc_imag_writergb10(cur_rgb + rgb_line + bpp, bpp, cur_bay[bay_line2 + 1], cur_bay[bay_line + 1], cur_bay[bay_line + 2]);
      cur_bay += 2;
      cur_rgb += 2 * bpp;
    } while (--columns);
    qc_imag_writergb10(cur_rgb + 0, bpp, cur_bay[1], cur_bay[0], cur_bay[bay_line]);
    qc_imag_writergb10(cur_rgb + bpp, bpp, cur_bay[1], cur_bay[bay_line + 1], cur_bay[bay_line]);
    qc_imag_writergb10(cur_rgb + rgb_line, bpp, cur_bay[bay_line2 + 1], cur_bay[bay_line + 1], cur_bay[bay_line]);
    qc_imag_writergb10(cur_rgb + rgb_line + bpp, bpp, cur_bay[bay_line2 + 1], cur_bay[bay_line + 1], cur_bay[bay_line]);
    bay += bay_line2;
    rgb += rgb_line2;
  } while (--rows);
  cur_bay = bay;
  cur_rgb = rgb;
  columns = total_columns;
  do {
    qc_imag_writergb10(cur_rgb + 0, bpp, cur_bay[1], cur_bay[0], cur_bay[bay_line]);
    qc_imag_writergb10(cur_rgb + bpp, bpp, cur_bay[1], cur_bay[2], cur_bay[bay_line + 2]);
    qc_imag_writergb10(cur_rgb + rgb_line, bpp, cur_bay[1], cur_bay[bay_line + 1], cur_bay[bay_line]);
    qc_imag_writergb10(cur_rgb + rgb_line + bpp, bpp, cur_bay[1], cur_bay[bay_line + 1], cur_bay[bay_line + 2]);
    cur_bay += 2;
    cur_rgb += 2 * bpp;
  } while (--columns);
  qc_imag_writergb10(cur_rgb + 0, bpp, cur_bay[1], cur_bay[0], cur_bay[bay_line]);
  qc_imag_writergb10(cur_rgb + bpp, bpp, cur_bay[1], cur_bay[bay_line + 1], cur_bay[bay_line]);
  qc_imag_writergb10(cur_rgb + rgb_line, bpp, cur_bay[1], cur_bay[bay_line + 1], cur_bay[bay_line]);
  qc_imag_writergb10(cur_rgb + rgb_line + bpp, bpp, cur_bay[1], cur_bay[bay_line + 1], cur_bay[bay_line]);
}
```