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

```asm
<idct_perform32_fixed>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  movl   $0x0,-0x28(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L44
L71:
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <abs@plt>
  mov    %eax,%edx
  mov    -0x28(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x28(%rbp)
  addl   $0x1,-0x24(%rbp)
L44:
  cmpl   $0x1f,-0x24(%rbp)
  jle    L71
  cmpl   $0x400000,-0x28(%rbp)
  jle    L66
  mov    $0x2,%eax
  jmp    L76
L66:
  mov    $0x0,%eax
L76:
  mov    %eax,-0x18(%rbp)
  cmpl   $0x0,-0x18(%rbp)
  jle    L57
  mov    -0x18(%rbp),%eax
  sub    $0x1,%eax
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  jmp    L42
L57:
  mov    $0x0,%eax
L42:
  mov    %eax,-0x14(%rbp)
  movl   $0x0,-0x20(%rbp)
  jmp    L2
L49:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x14(%rbp),%eax
  lea    (%rdx,%rax,1),%esi
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x38(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%eax
  mov    %eax,%ecx
  sar    %cl,%esi
  mov    %esi,%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x20(%rbp)
L2:
  cmpl   $0x1f,-0x20(%rbp)
  jle    L49
  mov    -0x40(%rbp),%rcx
  mov    -0x38(%rbp),%rax
  mov    $0x10,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sum_a@plt>
  mov    -0x40(%rbp),%rax
  lea    0x40(%rax),%rcx
  mov    -0x38(%rbp),%rax
  mov    $0x10,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sum_b@plt>
  mov    -0x40(%rbp),%rax
  mov    $0x20,%esi
  mov    %rax,%rdi
  call   <clp_v@plt>
  mov    -0x38(%rbp),%rcx
  mov    -0x40(%rbp),%rax
  mov    $0x8,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sum_a@plt>
  mov    -0x38(%rbp),%rax
  lea    0x20(%rax),%rcx
  mov    -0x40(%rbp),%rax
  mov    $0x8,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sum_b@plt>
  mov    -0x38(%rbp),%rax
  lea    0x40(%rax),%rcx
  mov    -0x40(%rbp),%rax
  add    $0x40,%rax
  mov    $0x8,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sum_c@plt>
  mov    -0x38(%rbp),%rax
  lea    0x60(%rax),%rcx
  mov    -0x40(%rbp),%rax
  add    $0x40,%rax
  mov    $0x8,%edx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sum_d@plt>
  mov    -0x38(%rbp),%rax
  mov    $0x20,%esi
  mov    %rax,%rdi
  call   <clp_v@plt>
  mov    -0x40(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <dct_a@plt>
  mov    -0x40(%rbp),%rax
  lea    0x20(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    $0x20,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <dct_b@plt>
  mov    -0x40(%rbp),%rax
  lea    0x40(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    $0x40,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <dct_b@plt>
  mov    -0x40(%rbp),%rax
  lea    0x60(%rax),%rdx
  mov    -0x38(%rbp),%rax
  add    $0x60,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <dct_b@plt>
  mov    -0x40(%rbp),%rax
  mov    $0x20,%esi
  mov    %rax,%rdi
  call   <clp_v@plt>
  mov    -0x38(%rbp),%rdx
  mov    -0x40(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <mod_a@plt>
  mov    -0x38(%rbp),%rax
  lea    0x40(%rax),%rdx
  mov    -0x40(%rbp),%rax
  add    $0x40,%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <mod_b@plt>
  mov    -0x38(%rbp),%rax
  mov    $0x20,%esi
  mov    %rax,%rdi
  call   <clp_v@plt>
  mov    -0x40(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <mod_c@plt>
  movl   $0x0,-0x1c(%rbp)
  jmp    L96
L88:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%eax
  mov    %eax,%ecx
  shl    %cl,%edx
  mov    %edx,%eax
  mov    -0x1c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x40(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  mov    %eax,%edi
  call   <clip23@plt>
  mov    %eax,(%rbx)
  addl   $0x1,-0x1c(%rbp)
L96:
  cmpl   $0x1f,-0x1c(%rbp)
  jle    L88
  nop
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
void idct_perform32_fixed(int *restrict input, int *restrict output) {
  int mag = 0;
  for (int i = 0; i < 32; i++)
    mag += abs(input[i]);
  int shift = mag > 0x400000 ? 2 : 0;
  int round = shift > 0 ? 1 << (shift - 1) : 0;
  for (int i = 0; i < 32; i++)
    input[i] = (input[i] + round) >> shift;
  sum_a(input, output + 0, 16);
  sum_b(input, output + 16, 16);
  clp_v(output, 32);
  sum_a(output + 0, input + 0, 8);
  sum_b(output + 0, input + 8, 8);
  sum_c(output + 16, input + 16, 8);
  sum_d(output + 16, input + 24, 8);
  clp_v(input, 32);
  dct_a(input + 0, output + 0);
  dct_b(input + 8, output + 8);
  dct_b(input + 16, output + 16);
  dct_b(input + 24, output + 24);
  clp_v(output, 32);
  mod_a(output + 0, input + 0);
  mod_b(output + 16, input + 16);
  clp_v(input, 32);
  mod_c(input, output);
  for (int i = 0; i < 32; i++)
    output[i] = clip23(output[i] * (1 << shift));
}
```