user: Please show me the C implementation that matches the assembly code listed below:

```asm
<ChenIDct>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rcx
  mov    %rdi,%r10
  mov    %rsi,%rax
  lea    0x20(%rdi),%r15
  mov    %rsi,%r11
L41:
  mov    (%r10),%ebx
  lea    0x0(,%rbx,4),%edx
  mov    0x80(%r10),%ebx
  lea    0x0(,%rbx,4),%r9d
  mov    0x20(%r10),%ebx
  lea    0x0(,%rbx,4),%edi
  movslq %edi,%rdi
  mov    0xe0(%r10),%ebx
  shl    $0x2,%ebx
  movslq %ebx,%rbx
  lea    (%rdi,%rdi,4),%rsi
  lea    (%rsi,%rsi,4),%r8
  imul   $0xfffffffffffffe0a,%rbx,%rsi
  lea    (%rsi,%r8,4),%rsi
  sar    $0x9,%rsi
  mov    0xa0(%r10),%r14d
  lea    0x0(,%r14,4),%r12d
  movslq %r12d,%r12
  mov    0x60(%r10),%r14d
  lea    0x0(,%r14,4),%r8d
  movslq %r8d,%r8
  imul   $0x1aa,%r12,%rbp
  imul   $0xfffffffffffffee4,%r8,%r13
  add    %r13,%rbp
  sar    $0x9,%rbp
  imul   $0x1aa,%r8,%r8
  imul   $0x11c,%r12,%r12
  add    %r12,%r8
  sar    $0x9,%r8
  imul   $0x1f6,%rdi,%rdi
  lea    (%rbx,%rbx,4),%rbx
  lea    (%rbx,%rbx,4),%rbx
  lea    (%rdi,%rbx,4),%rbx
  sar    $0x9,%rbx
  lea    (%rdx,%r9,1),%edi
  movslq %edi,%rdi
  imul   $0x16a,%rdi,%rdi
  sar    $0x9,%rdi
  sub    %r9d,%edx
  movslq %edx,%rdx
  imul   $0x16a,%rdx,%rdx
  sar    $0x9,%rdx
  mov    0x40(%r10),%r14d
  lea    0x0(,%r14,4),%r9d
  movslq %r9d,%r9
  mov    0xc0(%r10),%r14d
  lea    0x0(,%r14,4),%r13d
  movslq %r13d,%r13
  imul   $0xc4,%r9,%r12
  imul   $0xfffffffffffffe27,%r13,%r14
  add    %r14,%r12
  sar    $0x9,%r12
  imul   $0x1d9,%r9,%r9
  imul   $0xc4,%r13,%r13
  add    %r13,%r9
  sar    $0x9,%r9
  lea    (%r9,%rdi,1),%r13d
  lea    (%r12,%rdx,1),%r14d
  sub    %r12d,%edx
  sub    %r9d,%edi
  lea    0x0(%rbp,%rsi,1),%r9d
  sub    %ebp,%esi
  mov    %ebx,%ebp
  sub    %r8d,%ebp
  add    %r8d,%ebx
  mov    %ebp,%r8d
  sub    %esi,%r8d
  movslq %r8d,%r8
  imul   $0x16a,%r8,%r8
  sar    $0x9,%r8
  add    %ebp,%esi
  movslq %esi,%rsi
  imul   $0x16a,%rsi,%rsi
  sar    $0x9,%rsi
  lea    0x0(%r13,%rbx,1),%ebp
  mov    %ebp,(%r11)
  lea    (%r14,%rsi,1),%ebp
  mov    %ebp,0x20(%r11)
  lea    (%rdx,%r8,1),%ebp
  mov    %ebp,0x40(%r11)
  lea    (%rdi,%r9,1),%ebp
  mov    %ebp,0x60(%r11)
  sub    %r9d,%edi
  mov    %edi,0x80(%r11)
  sub    %r8d,%edx
  mov    %edx,0xa0(%r11)
  sub    %esi,%r14d
  mov    %r14d,0xc0(%r11)
  sub    %ebx,%r13d
  mov    %r13d,0xe0(%r11)
  add    $0x4,%r10
  add    $0x4,%r11
  cmp    %r15,%r10
  jne    L41
  lea    0x100(%rax),%rbx
L7:
  mov    (%rax),%esi
  movslq 0x4(%rax),%rdi
  movslq 0x1c(%rax),%r10
  lea    (%rdi,%rdi,4),%rdx
  lea    (%rdx,%rdx,4),%r8
  imul   $0xfffffffffffffe0a,%r10,%rdx
  lea    (%rdx,%r8,4),%rdx
  sar    $0x9,%rdx
  movslq 0x14(%rax),%r9
  movslq 0xc(%rax),%r8
  imul   $0x1aa,%r9,%r11
  imul   $0xfffffffffffffee4,%r8,%rbp
  add    %rbp,%r11
  sar    $0x9,%r11
  imul   $0x1aa,%r8,%r8
  imul   $0x11c,%r9,%r9
  add    %r9,%r8
  sar    $0x9,%r8
  imul   $0x1f6,%rdi,%rdi
  lea    (%r10,%r10,4),%r9
  lea    (%r9,%r9,4),%r9
  lea    (%rdi,%r9,4),%r10
  sar    $0x9,%r10
  mov    %esi,%edi
  add    0x10(%rax),%edi
  movslq %edi,%rdi
  imul   $0x16a,%rdi,%rdi
  sar    $0x9,%rdi
  sub    0x10(%rax),%esi
  movslq %esi,%rsi
  imul   $0x16a,%rsi,%rsi
  sar    $0x9,%rsi
  movslq 0x8(%rax),%r9
  movslq 0x18(%rax),%r12
  imul   $0xc4,%r9,%rbp
  imul   $0xfffffffffffffe27,%r12,%r13
  add    %r13,%rbp
  sar    $0x9,%rbp
  imul   $0x1d9,%r9,%r9
  imul   $0xc4,%r12,%r12
  add    %r12,%r9
  sar    $0x9,%r9
  lea    (%r9,%rdi,1),%r12d
  lea    0x0(%rbp,%rsi,1),%r13d
  sub    %ebp,%esi
  sub    %r9d,%edi
  lea    (%r11,%rdx,1),%r9d
  sub    %r11d,%edx
  mov    %r10d,%r11d
  sub    %r8d,%r11d
  add    %r8d,%r10d
  mov    %r11d,%r8d
  sub    %edx,%r8d
  movslq %r8d,%r8
  imul   $0x16a,%r8,%r8
  sar    $0x9,%r8
  add    %r11d,%edx
  movslq %edx,%rdx
  imul   $0x16a,%rdx,%rdx
  sar    $0x9,%rdx
  lea    (%r12,%r10,1),%r11d
  mov    %r11d,(%rax)
  lea    0x0(%r13,%rdx,1),%r11d
  mov    %r11d,0x4(%rax)
  lea    (%rsi,%r8,1),%r11d
  mov    %r11d,0x8(%rax)
  lea    (%rdi,%r9,1),%r11d
  mov    %r11d,0xc(%rax)
  sub    %r9d,%edi
  mov    %edi,0x10(%rax)
  sub    %r8d,%esi
  mov    %esi,0x14(%rax)
  sub    %edx,%r13d
  mov    %r13d,0x18(%rax)
  sub    %r10d,%r12d
  mov    %r12d,0x1c(%rax)
  add    $0x20,%rax
  cmp    %rbx,%rax
  jne    L7
  lea    0x100(%rcx),%rsi
  jmp    L25
L9:
  lea    0x17(%rax),%edx
  add    $0x8,%eax
  cmovs  %edx,%eax
  sar    $0x4,%eax
L55:
  mov    %eax,(%rcx)
  add    $0x4,%rcx
  cmp    %rcx,%rsi
  je     L56
L25:
  mov    (%rcx),%eax
  test   %eax,%eax
  jns    L9
  lea    0x7(%rax),%edx
  sub    $0x8,%eax
  cmovs  %edx,%eax
  sar    $0x4,%eax
  jmp    L55
L56:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void ChenIDct(x, y) int *x;
int *y;
{
  register int i;
  register int *aptr;
  register int a0, a1, a2, a3;
  register int b0, b1, b2, b3;
  register int c0, c1, c2, c3;
  for (i = 0; i < 8; i++) {
    aptr = x + i;
    b0 = ((*aptr) << (2));
    aptr += 8;
    a0 = ((*aptr) << (2));
    aptr += 8;
    b2 = ((*aptr) << (2));
    aptr += 8;
    a1 = ((*aptr) << (2));
    aptr += 8;
    b1 = ((*aptr) << (2));
    aptr += 8;
    a2 = ((*aptr) << (2));
    aptr += 8;
    b3 = ((*aptr) << (2));
    aptr += 8;
    a3 = ((*aptr) << (2));
    c0 = ((((100L * a0) - (502L * a3))) >> (9));
    c1 = ((((426L * a2) - (284L * a1))) >> (9));
    c2 = ((((426L * a1) + (284L * a2))) >> (9));
    c3 = ((((502L * a0) + (100L * a3))) >> (9));
    a0 = (((362L * (b0 + b1))) >> (9));
    a1 = (((362L * (b0 - b1))) >> (9));
    a2 = ((((196L * b2) - (473L * b3))) >> (9));
    a3 = ((((473L * b2) + (196L * b3))) >> (9));
    b0 = a0 + a3;
    b1 = a1 + a2;
    b2 = a1 - a2;
    b3 = a0 - a3;
    a0 = c0 + c1;
    a1 = c0 - c1;
    a2 = c3 - c2;
    a3 = c3 + c2;
    c0 = a0;
    c1 = (((362L * (a2 - a1))) >> (9));
    c2 = (((362L * (a2 + a1))) >> (9));
    c3 = a3;
    aptr = y + i;
    *aptr = b0 + c3;
    aptr += 8;
    *aptr = b1 + c2;
    aptr += 8;
    *aptr = b2 + c1;
    aptr += 8;
    *aptr = b3 + c0;
    aptr += 8;
    *aptr = b3 - c0;
    aptr += 8;
    *aptr = b2 - c1;
    aptr += 8;
    *aptr = b1 - c2;
    aptr += 8;
    *aptr = b0 - c3;
  }
  for (i = 0; i < 8; i++) {
    aptr = y + ((i) << (3));
    b0 = *(aptr++);
    a0 = *(aptr++);
    b2 = *(aptr++);
    a1 = *(aptr++);
    b1 = *(aptr++);
    a2 = *(aptr++);
    b3 = *(aptr++);
    a3 = *(aptr);
    c0 = ((((100L * a0) - (502L * a3))) >> (9));
    c1 = ((((426L * a2) - (284L * a1))) >> (9));
    c2 = ((((426L * a1) + (284L * a2))) >> (9));
    c3 = ((((502L * a0) + (100L * a3))) >> (9));
    a0 = (((362L * (b0 + b1))) >> (9));
    a1 = (((362L * (b0 - b1))) >> (9));
    a2 = ((((196L * b2) - (473L * b3))) >> (9));
    a3 = ((((473L * b2) + (196L * b3))) >> (9));
    b0 = a0 + a3;
    b1 = a1 + a2;
    b2 = a1 - a2;
    b3 = a0 - a3;
    a0 = c0 + c1;
    a1 = c0 - c1;
    a2 = c3 - c2;
    a3 = c3 + c2;
    c0 = a0;
    c1 = (((362L * (a2 - a1))) >> (9));
    c2 = (((362L * (a2 + a1))) >> (9));
    c3 = a3;
    aptr = y + ((i) << (3));
    *(aptr++) = b0 + c3;
    *(aptr++) = b1 + c2;
    *(aptr++) = b2 + c1;
    *(aptr++) = b3 + c0;
    *(aptr++) = b3 - c0;
    *(aptr++) = b2 - c1;
    *(aptr++) = b1 - c2;
    *(aptr) = b0 - c3;
  }
  for (i = 0, aptr = y; i < 64; i++, aptr++)
    *aptr = (((*aptr < 0) ? (*aptr - 8) : (*aptr + 8)) / 16);
}
```