user: What is the c source code of the assembly code below?

```asm
<deinterlace_16>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x3c(%rbp)
  mov    %r8d,-0x40(%rbp)
  mov    %r9d,-0x44(%rbp)
  cmpl   $0x0,-0x40(%rbp)
  jle    L48
  cmpl   $0x0,0x10(%rbp)
  je     L14
  movl   $0x0,-0x1c(%rbp)
  jmp    L19
L32:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x44(%rbp),%eax
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    -0x8(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x14(%rbp),%edx
  mov    -0x4(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x18(%rbp)
  mov    $0x0,%eax
  call   <isBigEndian@plt>
  test   %rax,%rax
  je     L10
  mov    -0x18(%rbp),%eax
  shl    $0x8,%eax
  movzwl %ax,%edx
  mov    -0x18(%rbp),%eax
  sar    $0x8,%eax
  movzbl %al,%eax
  or     %edx,%eax
  mov    %eax,-0x18(%rbp)
  mov    -0x14(%rbp),%eax
  shl    $0x8,%eax
  movzwl %ax,%edx
  mov    -0x14(%rbp),%eax
  sar    $0x8,%eax
  movzbl %al,%eax
  or     %edx,%eax
  mov    %eax,-0x14(%rbp)
L10:
  mov    -0x1c(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x1c(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x14(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x1c(%rbp)
L19:
  mov    -0x1c(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jl     L32
  jmp    L60
L14:
  movl   $0x0,-0x1c(%rbp)
  jmp    L2
L79:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  mov    $0x0,%eax
  call   <isBigEndian@plt>
  test   %rax,%rax
  je     L20
  mov    -0x10(%rbp),%eax
  shl    $0x8,%eax
  movzwl %ax,%edx
  mov    -0x10(%rbp),%eax
  sar    $0x8,%eax
  movzbl %al,%eax
  or     %edx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0xc(%rbp),%eax
  shl    $0x8,%eax
  movzwl %ax,%edx
  mov    -0xc(%rbp),%eax
  sar    $0x8,%eax
  movzbl %al,%eax
  or     %edx,%eax
  mov    %eax,-0xc(%rbp)
L20:
  mov    -0x1c(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x1c(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0xc(%rbp),%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x1c(%rbp)
L2:
  mov    -0x1c(%rbp),%eax
  cmp    -0x40(%rbp),%eax
  jl     L79
  jmp    L60
L48:
  nop
L60:
  leave
  ret
```

assistant: ```c
void deinterlace_16(int32_t *buffer_a, int32_t *buffer_b, int16_t *buffer_out, int numchannels, int numsamples, uint8_t interlacing_shift, uint8_t interlacing_leftweight) {
  int i;
  if (numsamples <= 0)
    return;
  if (interlacing_leftweight) {
    for (i = 0; i < numsamples; i++) {
      int32_t difference, midright;
      int16_t left;
      int16_t right;
      midright = buffer_a[i];
      difference = buffer_b[i];
      right = midright - ((difference * interlacing_leftweight) >> interlacing_shift);
      left = right + difference;
      if (isBigEndian()) {
        do {
          left = (((left)&0x00FF) << 0x08) | (((left)&0xFF00) >> 0x08);
        } while (0);
        do {
          right = (((right)&0x00FF) << 0x08) | (((right)&0xFF00) >> 0x08);
        } while (0);
      }
      buffer_out[i * numchannels] = left;
      buffer_out[i * numchannels + 1] = right;
    }
    return;
  }
  for (i = 0; i < numsamples; i++) {
    int16_t left, right;
    left = buffer_a[i];
    right = buffer_b[i];
    if (isBigEndian()) {
      do {
        left = (((left)&0x00FF) << 0x08) | (((left)&0xFF00) >> 0x08);
      } while (0);
      do {
        right = (((right)&0x00FF) << 0x08) | (((right)&0xFF00) >> 0x08);
      } while (0);
    }
    buffer_out[i * numchannels] = left;
    buffer_out[i * numchannels + 1] = right;
  }
}
```