user: 请从给定的汇编指令推导出C源代码:

```asm
<audio_out_resample_6channel>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,-0x2c(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %ecx,-0x30(%rbp)
  movl   $0x0,-0x18(%rbp)
  mov    -0x2c(%rbp),%eax
  sub    $0x2,%eax
  shl    $0x10,%eax
  mov    -0x30(%rbp),%edx
  lea    -0x2(%rdx),%esi
  cltd
  idiv   %esi
  mov    %eax,-0x14(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L0
L10:
  mov    -0x18(%rbp),%eax
  movzwl %ax,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x18(%rbp),%eax
  sar    $0x10,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x18(%rbp),%eax
  sar    $0x10,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  add    $0x6,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  mov    $0x10000,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  imul   -0x10(%rbp),%eax
  add    %edx,%eax
  sar    $0x10,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%eax
  sar    $0x10,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x18(%rbp),%eax
  sar    $0x10,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  add    $0x7,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  mov    $0x10000,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  imul   -0x10(%rbp),%eax
  add    %edx,%eax
  sar    $0x10,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  add    $0x1,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%eax
  sar    $0x10,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x18(%rbp),%eax
  sar    $0x10,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  add    $0x8,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  mov    $0x10000,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  imul   -0x10(%rbp),%eax
  add    %edx,%eax
  sar    $0x10,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  add    $0x2,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%eax
  sar    $0x10,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  add    $0x3,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x18(%rbp),%eax
  sar    $0x10,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  add    $0x9,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  mov    $0x10000,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  imul   -0x10(%rbp),%eax
  add    %edx,%eax
  sar    $0x10,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  add    $0x3,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%eax
  sar    $0x10,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  add    $0x4,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x18(%rbp),%eax
  sar    $0x10,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  add    $0xa,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  mov    $0x10000,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  imul   -0x10(%rbp),%eax
  add    %edx,%eax
  sar    $0x10,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  add    $0x4,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%eax
  sar    $0x10,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  add    $0x5,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x18(%rbp),%eax
  sar    $0x10,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  add    $0xb,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x8(%rbp)
  mov    $0x10000,%eax
  sub    -0x10(%rbp),%eax
  imul   -0xc(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8(%rbp),%eax
  imul   -0x10(%rbp),%eax
  add    %edx,%eax
  sar    $0x10,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x1c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  add    $0x5,%rax
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x14(%rbp),%eax
  add    %eax,-0x18(%rbp)
  addl   $0x1,-0x1c(%rbp)
L0:
  mov    -0x30(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x1c(%rbp)
  jl     L10
  mov    -0x2c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  shl    $0x2,%rax
  lea    -0x18(%rax),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x30(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  shl    $0x2,%rax
  lea    -0x18(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  mov    -0x2c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  shl    $0x2,%rax
  lea    -0x14(%rax),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x30(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  shl    $0x2,%rax
  lea    -0x14(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  mov    -0x2c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  shl    $0x2,%rax
  lea    -0x10(%rax),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x30(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  shl    $0x2,%rax
  lea    -0x10(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  mov    -0x2c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  shl    $0x2,%rax
  lea    -0xc(%rax),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x30(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  shl    $0x2,%rax
  lea    -0xc(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  mov    -0x2c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  shl    $0x2,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x30(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  shl    $0x2,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  mov    -0x2c(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x28(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x30(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    %eax,%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    (%rcx),%eax
  mov    %eax,(%rdx)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void audio_out_resample_6channel(int16_t *input_samples, uint32_t in_samples, int16_t *output_samples, uint32_t out_samples) {
  int osample;
  uint32_t isample = 0;
  uint32_t istep = ((in_samples - 2) << 16) / (out_samples - 2);
  for (osample = 0; osample < out_samples - 1; osample++) {
    int s1;
    int s2;
    int16_t os;
    uint32_t t = isample & 0xffff;
    s1 = input_samples[(isample >> 16) * 6];
    s2 = input_samples[(isample >> 16) * 6 + 6];
    os = (s1 * (0x10000 - t) + s2 * t) >> 16;
    output_samples[osample * 6] = os;
    s1 = input_samples[(isample >> 16) * 6 + 1];
    s2 = input_samples[(isample >> 16) * 6 + 7];
    os = (s1 * (0x10000 - t) + s2 * t) >> 16;
    output_samples[(osample * 6) + 1] = os;
    s1 = input_samples[(isample >> 16) * 6 + 2];
    s2 = input_samples[(isample >> 16) * 6 + 8];
    os = (s1 * (0x10000 - t) + s2 * t) >> 16;
    output_samples[(osample * 6) + 2] = os;
    s1 = input_samples[(isample >> 16) * 6 + 3];
    s2 = input_samples[(isample >> 16) * 6 + 9];
    os = (s1 * (0x10000 - t) + s2 * t) >> 16;
    output_samples[(osample * 6) + 3] = os;
    s1 = input_samples[(isample >> 16) * 6 + 4];
    s2 = input_samples[(isample >> 16) * 6 + 10];
    os = (s1 * (0x10000 - t) + s2 * t) >> 16;
    output_samples[(osample * 6) + 4] = os;
    s1 = input_samples[(isample >> 16) * 6 + 5];
    s2 = input_samples[(isample >> 16) * 6 + 11];
    os = (s1 * (0x10000 - t) + s2 * t) >> 16;
    output_samples[(osample * 6) + 5] = os;
    isample += istep;
  }
  output_samples[out_samples * 6 - 6] = input_samples[in_samples * 6 - 6];
  output_samples[out_samples * 6 - 5] = input_samples[in_samples * 6 - 5];
  output_samples[out_samples * 6 - 4] = input_samples[in_samples * 6 - 4];
  output_samples[out_samples * 6 - 3] = input_samples[in_samples * 6 - 3];
  output_samples[out_samples * 6 - 2] = input_samples[in_samples * 6 - 2];
  output_samples[out_samples * 6 - 1] = input_samples[in_samples * 6 - 1];
}
```