user: 下面的汇编指令对应的C源代码是什么:

```asm
<RGB24toBGR32>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %r9d,%r12d
  push   %rbp
  mov    %r8d,%ebp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x24(%rsp),%rax
  mov    0x80(%rsp),%r14
  mov    0x98(%rsp),%r15d
  push   %rax
  lea    0x28(%rsp),%rax
  push   %rax
  mov    0xc8(%rsp),%eax
  push   %rax
  mov    0xc8(%rsp),%eax
  push   %rax
  mov    0xc8(%rsp),%eax
  push   %rax
  mov    0xc8(%rsp),%eax
  push   %rax
  push   %r15
  mov    0xc8(%rsp),%eax
  push   %rax
  mov    0xc8(%rsp),%eax
  push   %rax
  push   %r14
  mov    0xc8(%rsp),%eax
  push   %rax
  mov    0xc8(%rsp),%eax
  push   %rax
  mov    %rdi,0x60(%rsp)
  call   <chk_args@plt>
  add    $0x60,%rsp
  test   %eax,%eax
  je     L108
  test   %r15d,%r15d
  mov    (%rsp),%rdi
  jns    L103
  mov    0x90(%rsp),%eax
  sub    $0x1,%eax
  imul   %r15d,%eax
  cltq
  sub    %rax,%r14
L103:
  test   %ebx,%ebx
  jns    L3
  sub    $0x1,%r13d
  imul   %ebx,%r13d
  movslq %r13d,%rax
  sub    %rax,%rdi
L3:
  mov    0x20(%rsp),%eax
  cmp    $0x1,%eax
  je     L56
  cmp    $0x2,%eax
  jne    L108
  cmpl   $0x2,0x24(%rsp)
  jne    L108
  mov    0xa0(%rsp),%eax
  imul   %ebx,%r12d
  lea    (%rax,%rax,2),%edx
  mov    0xa8(%rsp),%eax
  movslq %edx,%rdx
  movslq %r12d,%rcx
  imul   %r15d,%eax
  cltq
  add    %rax,%rdx
  lea    0x0(,%rbp,4),%eax
  cltq
  add    %r14,%rdx
  add    %rcx,%rax
  mov    0xb8(%rsp),%ecx
  lea    (%rdi,%rax,1),%rsi
  test   %ecx,%ecx
  jle    L142
  mov    0xb0(%rsp),%eax
  lea    (%rbx,%rbx,1),%r12d
  movslq %r15d,%rbp
  lea    0x0(,%rax,8),%r14d
  lea    (%rax,%rax,2),%eax
  cltq
  movslq %r14d,%r13
  sub    %rax,%rbp
  movslq %r12d,%rax
  neg    %r13
  mov    %rax,(%rsp)
  movslq %ebx,%rax
  mov    %rax,0x8(%rsp)
  mov    0xb0(%rsp),%eax
  sub    $0x1,%eax
  add    $0x1,%rax
  lea    (%rax,%rax,2),%rbx
  shl    $0x3,%rax
  mov    %rax,0x18(%rsp)
  mov    %rbx,0x10(%rsp)
  xor    %ebx,%ebx
  nopl   (%rax)
L188:
  mov    0x10(%rsp),%rax
  mov    %rsi,%rdi
  lea    (%rdx,%rax,1),%r12
  mov    0xb0(%rsp),%eax
  test   %eax,%eax
  je     L71
  nopl   0x0(%rax,%rax,1)
L89:
  movzbl (%rdx),%eax
  movzbl 0x1(%rdx),%ecx
  add    $0x3,%rdx
  add    $0x8,%rdi
  shl    $0x8,%ecx
  shl    $0x10,%eax
  or     %ecx,%eax
  movzbl -0x1(%rdx),%ecx
  or     %ecx,%eax
  mov    %eax,-0x8(%rdi)
  mov    %eax,-0x4(%rdi)
  cmp    %r12,%rdx
  jne    L89
  add    0x18(%rsp),%rsi
L165:
  mov    0x8(%rsp),%rax
  lea    (%rsi,%r13,1),%r15
  mov    %r14d,%edx
  add    $0x1,%ebx
  mov    %r15,%rsi
  lea    (%r15,%rax,1),%rdi
  call   <memcpy@plt>
  mov    (%rsp),%rax
  lea    (%r12,%rbp,1),%rdx
  lea    (%r15,%rax,1),%rsi
  cmp    %ebx,0xb8(%rsp)
  jne    L188
L142:
  xor    %eax,%eax
L73:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L125
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L71:
  mov    %rdx,%r12
  jmp    L165
L56:
  cmpl   $0x1,0x24(%rsp)
  mov    $0xffffffff,%eax
  jne    L73
  mov    0xa0(%rsp),%eax
  mov    %r12d,%ecx
  mov    0x78(%rsp),%esi
  imul   %ebx,%ecx
  lea    (%rax,%rax,2),%edx
  mov    0xa8(%rsp),%eax
  movslq %edx,%rdx
  imul   %r15d,%eax
  movslq %ecx,%rcx
  cltq
  add    %rax,%rdx
  lea    0x0(,%rbp,4),%eax
  cltq
  add    %r14,%rdx
  add    %rcx,%rax
  add    %rax,%rdi
  test   %esi,%esi
  jle    L142
  mov    0x70(%rsp),%eax
  mov    %r15d,%r11d
  mov    0x78(%rsp),%r12d
  xor    %r8d,%r8d
  lea    (%rax,%rax,2),%eax
  sub    %eax,%r11d
  mov    0x70(%rsp),%eax
  movslq %r11d,%r11
  shl    $0x2,%eax
  sub    %eax,%ebx
  mov    0x70(%rsp),%eax
  movslq %ebx,%r10
  lea    -0x1(%rax),%r9d
  mov    %eax,%ebp
  add    $0x1,%r9
  lea    (%r9,%r9,2),%rbx
  shl    $0x2,%r9
L170:
  lea    (%rdx,%rbx,1),%rsi
  mov    %rdi,%rcx
  test   %ebp,%ebp
  je     L19
  xchg   %ax,%ax
L68:
  movzbl (%rdx),%eax
  movzbl 0x1(%rdx),%r13d
  add    $0x3,%rdx
  add    $0x4,%rcx
  shl    $0x8,%r13d
  shl    $0x10,%eax
  or     %r13d,%eax
  movzbl -0x1(%rdx),%r13d
  or     %r13d,%eax
  mov    %eax,-0x4(%rcx)
  cmp    %rsi,%rdx
  jne    L68
  add    %r9,%rdi
L118:
  add    $0x1,%r8d
  lea    (%rsi,%r11,1),%rdx
  add    %r10,%rdi
  cmp    %r8d,%r12d
  jne    L170
  jmp    L142
L108:
  mov    $0xffffffff,%eax
  jmp    L73
L19:
  mov    %rdx,%rsi
  jmp    L118
L125:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int RGB24toBGR32(unsigned char *dest_ptr, int dest_width, int dest_height, int dest_pitch, int dest_x, int dest_y, int dest_dx, int dest_dy, unsigned char *src_ptr, int src_width, int src_height, int src_pitch, int src_x, int src_y, int src_dx, int src_dy) {
  int scale_x, scale_y;
  if (!chk_args(dest_ptr, dest_width, dest_height, dest_pitch, dest_x, dest_y, dest_dx, dest_dy, src_ptr, src_width, src_height, src_pitch, src_x, src_y, src_dx, src_dy, &scale_x, &scale_y))
    return -1;
  if (src_pitch < 0)
    src_ptr -= (src_height - 1) * src_pitch;
  if (dest_pitch < 0)
    dest_ptr -= (dest_height - 1) * dest_pitch;
  if (scale_x == 1 && scale_y == 1) {
    unsigned char *s, *d;
    register int i;
    s = src_ptr + src_x * 3 + src_y * src_pitch;
    d = dest_ptr + dest_x * 4 + dest_y * dest_pitch;
    for (i = 0; i < dest_dy; i++) {
      register int ddx = dest_dx;
      while (ddx) {
        *(unsigned int *)d = (unsigned int)(s[0] << 16) | (s[1] << 8) | s[2];
        d += 4;
        s += 3;
        ddx--;
      }
      s += src_pitch - dest_dx * 3;
      d += dest_pitch - dest_dx * 4;
    }
    return 0;
  }
  if (scale_x == 2 && scale_y == 2) {
    unsigned char *s, *d;
    register int i;
    s = src_ptr + src_x * 3 + src_y * src_pitch;
    d = dest_ptr + dest_x * 4 + dest_y * dest_pitch;
    for (i = 0; i < src_dy; i++) {
      register int sdx = src_dx;
      while (sdx) {
        register unsigned int a;
        a = (unsigned int)(s[0] << 16) | (s[1] << 8) | s[2];
        *(unsigned int *)d = a;
        *(unsigned int *)(d + 4) = a;
        d += 2 * 4;
        s += 3;
        sdx--;
      }
      s -= src_dx * 3;
      d -= src_dx * 2 * 4;
      memcpy(d + dest_pitch, d, src_dx * 2 * 4);
      s += src_pitch;
      d += dest_pitch * 2;
    }
    return 0;
  }
  return -1;
}
```