user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<predictor_decompress_fir_adapt>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r11
  mov    %rsi,%rax
  mov    %ecx,%ebp
  mov    0x60(%rsp),%r12d
  mov    (%rdi),%ecx
  mov    %ecx,(%rsi)
  test   %r9d,%r9d
  jne    L75
  cmp    $0x1,%edx
  jg     L204
L215:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L204:
  lea    -0x4(,%rdx,4),%edx
  lea    0x4(%rdi),%rsi
  lea    0x4(%rax),%rdi
  call   <memcpy@plt>
  jmp    L215
L75:
  cmp    $0x1f,%r9d
  je     L230
  test   %r9d,%r9d
  jle    L215
  lea    -0x1(%r9),%r14d
  mov    %r14d,%esi
  lea    0x2(%rsi),%rbx
  mov    $0x1,%r10d
  mov    $0x20,%r13d
  sub    %ebp,%r13d
  mov    %r13d,%ecx
L200:
  mov    (%r11,%r10,4),%edi
  add    -0x4(%rax,%r10,4),%edi
  shl    %cl,%edi
  sar    %cl,%edi
  mov    %edi,(%rax,%r10,4)
  add    $0x1,%r10
  cmp    %rbx,%r10
  jne    L200
  mov    %ecx,%r13d
  lea    0x1(%r9),%ecx
  cmp    %edx,%ecx
  jge    L215
  lea    -0x1(%r12),%ecx
  mov    $0x1,%edi
  shl    %cl,%edi
  mov    %edi,0x18(%rsp)
  movslq %r9d,%rcx
  lea    0x4(,%rcx,4),%rcx
  mov    %rcx,(%rsp)
  lea    0x4(%rax),%rbx
  add    %rcx,%r11
  sub    $0x2,%edx
  sub    %r9d,%edx
  lea    0x8(%rax,%rdx,4),%rax
  mov    %rax,0x8(%rsp)
  lea    0x4(%r8,%rsi,4),%r10
  lea    -0x8(%rcx),%rax
  mov    %rax,0x10(%rsp)
  lea    -0x2(%r9),%eax
  mov    %eax,0x1c(%rsp)
  mov    $0xffffffff,%r15d
  jmp    L210
L230:
  cmp    $0x1,%edx
  jle    L215
  mov    %edx,%edx
  mov    $0x1,%edi
  mov    $0x20,%ecx
  sub    %ebp,%ecx
L40:
  mov    (%r11,%rdi,4),%esi
  add    -0x4(%rax,%rdi,4),%esi
  shl    %cl,%esi
  sar    %cl,%esi
  mov    %esi,(%rax,%rdi,4)
  add    $0x1,%rdi
  cmp    %rdx,%rdi
  jne    L40
  jmp    L215
L39:
  movslq 0x1c(%rsp),%rdx
  mov    %rbx,%rdi
  mov    %r12d,%ecx
  jmp    L140
L36:
  sub    %eax,0x4(%r8,%rdx,4)
  imul   %r12d,%eax
  sar    %cl,%eax
  imul   %ebp,%eax
  sub    %eax,%esi
  mov    %edx,%eax
  not    %eax
  shr    $0x1f,%eax
  test   %esi,%esi
  setg   %bpl
  sub    $0x1,%rdx
  add    $0x4,%rdi
  test   %al,%bpl
  je     L83
L140:
  mov    %r14d,%ebp
  sub    %edx,%ebp
  mov    -0x4(%r9),%r12d
  mov    %r15d,%eax
  sub    (%rdi),%r12d
  js     L36
  test   %r12d,%r12d
  setg   %al
  movzbl %al,%eax
  jmp    L36
L83:
  mov    %ecx,%r12d
L197:
  add    $0x4,%rbx
  add    $0x4,%r11
  cmp    0x8(%rsp),%rbx
  je     L215
L210:
  mov    (%r11),%esi
  mov    %rbx,%r9
  mov    -0x4(%rbx),%edi
  mov    0x10(%rsp),%rax
  lea    (%rax,%rbx,1),%rbp
  mov    %r8,%rdx
  mov    $0x0,%ecx
L15:
  mov    0x0(%rbp),%eax
  sub    %edi,%eax
  imul   (%rdx),%eax
  add    %eax,%ecx
  sub    $0x4,%rbp
  add    $0x4,%rdx
  cmp    %r10,%rdx
  jne    L15
  mov    0x18(%rsp),%eax
  add    %ecx,%eax
  mov    %r12d,%ecx
  sar    %cl,%eax
  add    %edi,%eax
  add    %esi,%eax
  mov    %r13d,%ecx
  shl    %cl,%eax
  sar    %cl,%eax
  mov    (%rsp),%rcx
  mov    %eax,-0x4(%r9,%rcx,1)
  test   %esi,%esi
  jg     L39
  jns    L197
  movslq 0x1c(%rsp),%rdx
  mov    %rbx,%rdi
  mov    %r12d,%ecx
  jmp    L127
L81:
  test   %r12d,%r12d
  setg   %al
  movzbl %al,%eax
  neg    %eax
L100:
  sub    %eax,0x4(%r8,%rdx,4)
  imul   %r12d,%eax
  sar    %cl,%eax
  imul   %ebp,%eax
  sub    %eax,%esi
  mov    %esi,%eax
  not    %eax
  or     %edx,%eax
  sub    $0x1,%rdx
  add    $0x4,%rdi
  test   %eax,%eax
  js     L224
L127:
  mov    %r14d,%ebp
  sub    %edx,%ebp
  mov    -0x4(%r9),%r12d
  mov    $0x1,%eax
  sub    (%rdi),%r12d
  jns    L81
  jmp    L100
L224:
  mov    %ecx,%r12d
  jmp    L197
```

assistant: ```c
void predictor_decompress_fir_adapt(int32_t *error_buffer, int32_t *buffer_out, int output_size, int readsamplesize, int16_t *predictor_coef_table, int predictor_coef_num, int predictor_quantitization) {
  int i;
  *buffer_out = *error_buffer;
  if (!predictor_coef_num) {
    if (output_size <= 1)
      return;
    memcpy(buffer_out + 1, error_buffer + 1, (output_size - 1) * 4);
    return;
  }
  if (predictor_coef_num == 0x1f) {
    if (output_size <= 1)
      return;
    for (i = 0; i < output_size - 1; i++) {
      int32_t prev_value;
      int32_t error_value;
      prev_value = buffer_out[i];
      error_value = error_buffer[i + 1];
      buffer_out[i + 1] = (((prev_value + error_value) << (32 - readsamplesize)) >> (32 - readsamplesize));
    }
    return;
  }
  if (predictor_coef_num > 0) {
    int i;
    for (i = 0; i < predictor_coef_num; i++) {
      int32_t val;
      val = buffer_out[i] + error_buffer[i + 1];
      val = ((val << (32 - readsamplesize)) >> (32 - readsamplesize));
      buffer_out[i + 1] = val;
    }
  }
  if (predictor_coef_num > 0) {
    for (i = predictor_coef_num + 1; i < output_size; i++) {
      int j;
      int sum = 0;
      int outval;
      int error_val = error_buffer[i];
      for (j = 0; j < predictor_coef_num; j++) {
        sum += (buffer_out[predictor_coef_num - j] - buffer_out[0]) * predictor_coef_table[j];
      }
      outval = (1 << (predictor_quantitization - 1)) + sum;
      outval = outval >> predictor_quantitization;
      outval = outval + buffer_out[0] + error_val;
      outval = ((outval << (32 - readsamplesize)) >> (32 - readsamplesize));
      buffer_out[predictor_coef_num + 1] = outval;
      if (error_val > 0) {
        int predictor_num = predictor_coef_num - 1;
        while (predictor_num >= 0 && error_val > 0) {
          int val = buffer_out[0] - buffer_out[predictor_coef_num - predictor_num];
          int sign = ((val < 0) ? (-1) : ((val > 0) ? (1) : (0)));
          predictor_coef_table[predictor_num] -= sign;
          val *= sign;
          error_val -= ((val >> predictor_quantitization) * (predictor_coef_num - predictor_num));
          predictor_num--;
        }
      } else if (error_val < 0) {
        int predictor_num = predictor_coef_num - 1;
        while (predictor_num >= 0 && error_val < 0) {
          int val = buffer_out[0] - buffer_out[predictor_coef_num - predictor_num];
          int sign = -((val < 0) ? (-1) : ((val > 0) ? (1) : (0)));
          predictor_coef_table[predictor_num] -= sign;
          val *= sign;
          error_val -= ((val >> predictor_quantitization) * (predictor_coef_num - predictor_num));
          predictor_num--;
        }
      }
      buffer_out++;
    }
  }
}
```