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

```asm
<inv_dct8_1d_internal_c>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  xor    %edi,%edi
  push   %r14
  mov    %r8d,%r14d
  push   %r13
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  mov    %edx,%ebp
  push   %rbx
  movslq %esi,%rbx
  sub    $0x68,%rsp
  test   %ebx,%ebx
  setg   %dil
  call   <assert@plt>
  lea    (%rbx,%rbx,1),%esi
  mov    %r12d,%ecx
  mov    %ebp,%edx
  mov    %r14d,%r8d
  mov    %r15,%rdi
  call   <inv_dct4_1d_internal_c@plt>
  lea    0x0(,%rbx,8),%rcx
  lea    (%r15,%rbx,4),%r10
  lea    (%r10,%rcx,1),%r9
  mov    (%r10),%r13d
  lea    (%r9,%rcx,1),%rsi
  mov    (%r9),%eax
  lea    (%rsi,%rcx,1),%rdx
  mov    %rsi,0x30(%rsp)
  mov    %rdx,0x8(%rsp)
  test   %r14d,%r14d
  je     L14
  imul   $0x31f,%r13d,%r8d
  imul   $0xfffff71c,%eax,%r11d
  imul   $0xd4e,%eax,%r14d
  imul   $0xfb1,%r13d,%r13d
  add    $0x800,%r8d
  add    $0x800,%r11d
  sar    $0xc,%r8d
  add    $0x800,%r14d
  sar    $0xc,%r11d
  add    $0x800,%r13d
  sar    $0xc,%r14d
  sar    $0xc,%r13d
L12:
  lea    (%r8,%r11,1),%edi
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    %r10,0x50(%rsp)
  mov    %rcx,0x28(%rsp)
  imul   $0xffffffffffffffec,%rbx,%rbx
  mov    %r9,0x58(%rsp)
  mov    %r8d,0x10(%rsp)
  mov    %r11d,0x18(%rsp)
  call   <iclip@plt>
  mov    0x18(%rsp),%r11d
  mov    0x10(%rsp),%edi
  mov    %ebp,%esi
  mov    %r12d,%edx
  mov    %rax,0x38(%rsp)
  sub    %r11d,%edi
  call   <iclip@plt>
  lea    (%r14,%r13,1),%edi
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    %rax,0x18(%rsp)
  call   <iclip@plt>
  mov    %r13d,%edi
  mov    %r12d,%edx
  mov    %ebp,%esi
  sub    %r14d,%edi
  mov    %rax,0x10(%rsp)
  call   <iclip@plt>
  mov    0x18(%rsp),%r8
  add    0x8(%rsp),%rbx
  mov    (%rbx),%ecx
  mov    %eax,%edx
  mov    0x10(%rsp),%r9d
  add    %r8d,%eax
  sub    %r8d,%edx
  mov    (%r15),%r8d
  imul   $0xb5,%eax,%eax
  mov    %ecx,0x24(%rsp)
  mov    0x28(%rsp),%rcx
  imul   $0xb5,%edx,%edx
  mov    %r8d,0x44(%rsp)
  lea    (%rbx,%rcx,1),%r14
  sub    $0xffffff80,%eax
  mov    (%r14),%esi
  add    %r14,%rcx
  mov    %eax,%edi
  sub    $0xffffff80,%edx
  mov    (%rcx),%r13d
  mov    %rcx,0x48(%rsp)
  sar    $0x8,%edx
  sar    $0x8,%edi
  mov    %esi,0x28(%rsp)
  mov    %ebp,%esi
  mov    %edx,0x40(%rsp)
  mov    %r12d,%edx
  mov    %edi,0x18(%rsp)
  lea    (%r8,%r9,1),%edi
  call   <iclip@plt>
  mov    0x18(%rsp),%edi
  mov    %r12d,%edx
  add    0x24(%rsp),%edi
  mov    %eax,(%r15)
  mov    %ebp,%esi
  call   <iclip@plt>
  mov    0x50(%rsp),%r10
  mov    0x28(%rsp),%edi
  mov    %ebp,%esi
  mov    0x40(%rsp),%r15d
  mov    %r12d,%edx
  mov    %eax,(%r10)
  add    %r15d,%edi
  call   <iclip@plt>
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    %eax,(%rbx)
  mov    0x38(%rsp),%rbx
  lea    0x0(%r13,%rbx,1),%edi
  sub    %ebx,%r13d
  call   <iclip@plt>
  mov    0x58(%rsp),%r9
  mov    %r13d,%edi
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    %eax,(%r9)
  call   <iclip@plt>
  mov    0x28(%rsp),%esi
  mov    %r12d,%edx
  mov    %eax,(%r14)
  sub    %r15d,%esi
  mov    %esi,%edi
  mov    %ebp,%esi
  call   <iclip@plt>
  mov    0x30(%rsp),%rsi
  mov    0x24(%rsp),%ecx
  mov    %r12d,%edx
  sub    0x18(%rsp),%ecx
  mov    %eax,(%rsi)
  mov    %ecx,%edi
  mov    %ebp,%esi
  call   <iclip@plt>
  mov    0x48(%rsp),%rcx
  mov    0x44(%rsp),%edi
  mov    %ebp,%esi
  sub    0x10(%rsp),%edi
  mov    %r12d,%edx
  mov    %eax,(%rcx)
  call   <iclip@plt>
  mov    0x8(%rsp),%rbx
  mov    %eax,(%rbx)
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L14:
  mov    0x30(%rsp),%rdx
  imul   $0x31f,%r13d,%r8d
  mov    (%rdx),%esi
  mov    0x8(%rsp),%rdx
  mov    (%rdx),%edx
  imul   $0x6a7,%esi,%r11d
  imul   $0x472,%esi,%esi
  imul   $0x4f,%edx,%edi
  lea    0x800(%r8,%rdi,1),%r8d
  imul   $0xfffffb8e,%eax,%edi
  sar    $0xc,%r8d
  imul   $0x6a7,%eax,%eax
  sub    %edx,%r8d
  imul   $0x31f,%edx,%edx
  lea    0x400(%r11,%rdi,1),%r11d
  lea    0x400(%rsi,%rax,1),%r14d
  sar    $0xb,%r11d
  imul   $0xffffffb1,%r13d,%eax
  sar    $0xb,%r14d
  lea    0x800(%rax,%rdx,1),%eax
  sar    $0xc,%eax
  add    %eax,%r13d
  jmp    L12
```

assistant: ```c
__attribute__((no)) void inv_dct8_1d_internal_c(int32_t *const c, const ptrdiff_t stride, const int min, const int max, const int tx64) {
  assert(stride > 0);
  inv_dct4_1d_internal_c(c, stride << 1, min, max, tx64);
  const int in1 = c[1 * stride], in3 = c[3 * stride];
  int t4a, t5a, t6a, t7a;
  if (tx64) {
    t4a = (in1 * 799 + 2048) >> 12;
    t5a = (in3 * -2276 + 2048) >> 12;
    t6a = (in3 * 3406 + 2048) >> 12;
    t7a = (in1 * 4017 + 2048) >> 12;
  } else {
    const int in5 = c[5 * stride], in7 = c[7 * stride];
    t4a = ((in1 * 799 - in7 * (4017 - 4096) + 2048) >> 12) - in7;
    t5a = (in5 * 1703 - in3 * 1138 + 1024) >> 11;
    t6a = (in5 * 1138 + in3 * 1703 + 1024) >> 11;
    t7a = ((in1 * (4017 - 4096) + in7 * 799 + 2048) >> 12) + in1;
  }
  const int t4 = iclip(t4a + t5a, min, max);
  t5a = iclip(t4a - t5a, min, max);
  const int t7 = iclip(t7a + t6a, min, max);
  t6a = iclip(t7a - t6a, min, max);
  const int t5 = ((t6a - t5a) * 181 + 128) >> 8;
  const int t6 = ((t6a + t5a) * 181 + 128) >> 8;
  const int t0 = c[0 * stride];
  const int t1 = c[2 * stride];
  const int t2 = c[4 * stride];
  const int t3 = c[6 * stride];
  c[0 * stride] = iclip(t0 + t7, min, max);
  c[1 * stride] = iclip(t1 + t6, min, max);
  c[2 * stride] = iclip(t2 + t5, min, max);
  c[3 * stride] = iclip(t3 + t4, min, max);
  c[4 * stride] = iclip(t3 - t4, min, max);
  c[5 * stride] = iclip(t2 - t5, min, max);
  c[6 * stride] = iclip(t1 - t6, min, max);
  c[7 * stride] = iclip(t0 - t7, min, max);
}
```