user: Converte this assembly snippet into its equivalent C code:

```asm
<LeeIDct>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%r10
  lea    0x100(%rdi),%r11
  mov    %rsi,%r8
L121:
  mov    (%rdi),%eax
  shl    $0x2,%eax
  cltq
  imul   $0x16a,%rax,%rax
  sar    $0x9,%rax
  mov    0x4(%rdi),%ebx
  lea    0x0(,%rbx,4),%r9d
  mov    0x8(%rdi),%ebx
  lea    0x0(,%rbx,4),%ecx
  mov    0xc(%rdi),%ebx
  lea    0x0(,%rbx,4),%edx
  mov    0x10(%rdi),%ebx
  lea    0x0(,%rbx,4),%esi
  mov    0x14(%rdi),%ebx
  shl    $0x2,%ebx
  mov    0x18(%rdi),%r12d
  add    $0x20,%rdi
  movslq %esi,%rsi
  imul   $0x16a,%rsi,%rsi
  sar    $0x9,%rsi
  lea    (%rsi,%rax,1),%ebp
  sub    %esi,%eax
  lea    (%rcx,%r12,4),%r12d
  movslq %r12d,%r12
  imul   $0x16a,%r12,%r12
  sar    $0x9,%r12
  lea    (%rcx,%r12,1),%esi
  movslq %esi,%rsi
  imul   $0x115,%rsi,%rsi
  sar    $0x9,%rsi
  sub    %r12d,%ecx
  movslq %ecx,%rcx
  imul   $0x29d,%rcx,%rcx
  sar    $0x9,%rcx
  lea    0x0(%rbp,%rsi,1),%r12d
  lea    (%rax,%rcx,1),%r13d
  sub    %esi,%ebp
  sub    %ecx,%eax
  lea    (%rdx,%rbx,1),%ecx
  movslq %ecx,%rcx
  imul   $0x16a,%rcx,%rcx
  sar    $0x9,%rcx
  lea    (%r9,%rcx,1),%r14d
  mov    %r9d,%esi
  sub    %ecx,%esi
  lea    (%r9,%rdx,1),%ecx
  mov    -0x4(%rdi),%edx
  lea    (%rbx,%rdx,4),%ebx
  add    %ecx,%ebx
  movslq %ebx,%rbx
  imul   $0x16a,%rbx,%rbx
  sar    $0x9,%rbx
  lea    (%rcx,%rbx,1),%r9d
  movslq %r9d,%r9
  imul   $0x115,%r9,%r9
  sar    $0x9,%r9
  sub    %ebx,%ecx
  movslq %ecx,%rcx
  imul   $0x29d,%rcx,%rcx
  sar    $0x9,%rcx
  lea    (%r14,%r9,1),%edx
  movslq %edx,%rdx
  mov    %rdx,%rbx
  shl    $0x6,%rbx
  add    %rdx,%rbx
  lea    (%rdx,%rbx,4),%r15
  sar    $0x9,%r15
  lea    (%rsi,%rcx,1),%ebx
  movslq %ebx,%rbx
  imul   $0x134,%rbx,%rbx
  sar    $0x9,%rbx
  sub    %r9d,%r14d
  movslq %r14d,%r14
  lea    (%r14,%r14,4),%rdx
  lea    (%r14,%rdx,8),%r9
  sar    $0x4,%r9
  sub    %ecx,%esi
  movslq %esi,%rdx
  imul   $0x1cd,%rdx,%rdx
  sar    $0x9,%rdx
  lea    (%r12,%r15,1),%ecx
  mov    %ecx,(%r8)
  lea    0x0(%r13,%rbx,1),%ecx
  mov    %ecx,0x4(%r8)
  lea    (%rax,%rdx,1),%ecx
  mov    %ecx,0x8(%r8)
  lea    0x0(%rbp,%r9,1),%ecx
  mov    %ecx,0xc(%r8)
  sub    %r9d,%ebp
  mov    %ebp,0x10(%r8)
  sub    %edx,%eax
  mov    %eax,0x14(%r8)
  sub    %ebx,%r13d
  mov    %r13d,0x18(%r8)
  add    $0x20,%r8
  sub    %r15d,%r12d
  mov    %r12d,-0x4(%r8)
  cmp    %rdi,%r11
  jne    L121
  mov    %r10,%r8
  add    $0x20,%r10
  jmp    L76
L88:
  lea    0x17(%r13),%esi
  add    $0x8,%r13d
  cmovns %r13d,%esi
  sar    $0x4,%esi
L113:
  mov    %esi,(%r9)
  mov    %ebx,%r13d
  add    %ebp,%r13d
  js     L125
  lea    0x17(%r13),%esi
  add    $0x8,%r13d
  cmovns %r13d,%esi
  sar    $0x4,%esi
L53:
  mov    %esi,0x20(%r9)
  mov    %eax,%r13d
  add    %edx,%r13d
  js     L37
  lea    0x17(%r13),%esi
  add    $0x8,%r13d
  cmovns %r13d,%esi
  sar    $0x4,%esi
L77:
  mov    %esi,0x40(%r9)
  mov    %edi,%r13d
  add    %r12d,%r13d
  js     L106
  lea    0x17(%r13),%esi
  add    $0x8,%r13d
  cmovns %r13d,%esi
  sar    $0x4,%esi
L38:
  mov    %esi,0x60(%r9)
  sub    %r12d,%edi
  js     L157
  lea    0x17(%rdi),%esi
  add    $0x8,%edi
  cmovns %edi,%esi
  sar    $0x4,%esi
L118:
  mov    %esi,0x80(%r9)
  sub    %edx,%eax
  js     L156
  lea    0x17(%rax),%edx
  add    $0x8,%eax
  cmovs  %edx,%eax
  sar    $0x4,%eax
L114:
  mov    %eax,0xa0(%r9)
  sub    %ebp,%ebx
  mov    %ebx,%edx
  js     L45
  lea    0x17(%rbx),%eax
  add    $0x8,%edx
  cmovns %edx,%eax
  sar    $0x4,%eax
L153:
  mov    %eax,0xc0(%r9)
  mov    %r11d,%eax
  sub    %ecx,%eax
  js     L16
  lea    0x17(%rax),%edx
  add    $0x8,%eax
  cmovs  %edx,%eax
  sar    $0x4,%eax
L144:
  mov    %eax,0xe0(%r9)
  add    $0x4,%r8
  cmp    %r10,%r8
  je     L21
L76:
  mov    %r8,%r9
  movslq (%r8),%rax
  imul   $0x16a,%rax,%rax
  sar    $0x9,%rax
  movslq 0x80(%r8),%rdx
  imul   $0x16a,%rdx,%rdx
  sar    $0x9,%rdx
  lea    (%rdx,%rax,1),%edi
  sub    %edx,%eax
  mov    0x40(%r8),%edx
  mov    %edx,%esi
  add    0xc0(%r8),%esi
  movslq %esi,%rsi
  imul   $0x16a,%rsi,%rsi
  sar    $0x9,%rsi
  lea    (%rdx,%rsi,1),%ecx
  movslq %ecx,%rcx
  imul   $0x115,%rcx,%rcx
  sar    $0x9,%rcx
  sub    %esi,%edx
  movslq %edx,%rdx
  imul   $0x29d,%rdx,%rdx
  sar    $0x9,%rdx
  lea    (%rdi,%rcx,1),%r11d
  lea    (%rax,%rdx,1),%ebx
  sub    %ecx,%edi
  sub    %edx,%eax
  mov    0xa0(%r8),%ecx
  mov    %ecx,%edx
  add    0x60(%r8),%edx
  movslq %edx,%rdx
  imul   $0x16a,%rdx,%rdx
  sar    $0x9,%rdx
  mov    0x20(%r8),%ebp
  lea    0x0(%rbp,%rdx,1),%r12d
  mov    %ebp,%esi
  sub    %edx,%esi
  mov    %ebp,%edx
  add    0x60(%r8),%edx
  add    0xe0(%r8),%ecx
  add    %edx,%ecx
  movslq %ecx,%rcx
  imul   $0x16a,%rcx,%rcx
  sar    $0x9,%rcx
  lea    (%rdx,%rcx,1),%r13d
  movslq %r13d,%r13
  imul   $0x115,%r13,%r13
  sar    $0x9,%r13
  sub    %ecx,%edx
  movslq %edx,%rdx
  imul   $0x29d,%rdx,%rdx
  sar    $0x9,%rdx
  lea    (%r12,%r13,1),%ecx
  movslq %ecx,%rcx
  mov    %rcx,%rbp
  shl    $0x6,%rbp
  add    %rcx,%rbp
  lea    (%rcx,%rbp,4),%rcx
  sar    $0x9,%rcx
  lea    (%rsi,%rdx,1),%ebp
  movslq %ebp,%rbp
  imul   $0x134,%rbp,%rbp
  sar    $0x9,%rbp
  sub    %r13d,%r12d
  movslq %r12d,%r12
  lea    (%r12,%r12,4),%r13
  lea    (%r12,%r13,8),%r12
  sar    $0x4,%r12
  sub    %edx,%esi
  movslq %esi,%rdx
  imul   $0x1cd,%rdx,%rdx
  sar    $0x9,%rdx
  mov    %r11d,%r13d
  add    %ecx,%r13d
  jns    L88
  lea    0x7(%r13),%esi
  sub    $0x8,%r13d
  cmovns %r13d,%esi
  sar    $0x4,%esi
  jmp    L113
L125:
  lea    0x7(%r13),%esi
  sub    $0x8,%r13d
  cmovns %r13d,%esi
  sar    $0x4,%esi
  jmp    L53
L37:
  lea    0x7(%r13),%esi
  sub    $0x8,%r13d
  cmovns %r13d,%esi
  sar    $0x4,%esi
  jmp    L77
L106:
  lea    0x7(%r13),%esi
  sub    $0x8,%r13d
  cmovns %r13d,%esi
  sar    $0x4,%esi
  jmp    L38
L157:
  lea    0x7(%rdi),%esi
  sub    $0x8,%edi
  cmovns %edi,%esi
  sar    $0x4,%esi
  jmp    L118
L156:
  lea    0x7(%rax),%edx
  sub    $0x8,%eax
  cmovs  %edx,%eax
  sar    $0x4,%eax
  jmp    L114
L45:
  lea    0x7(%rbx),%eax
  sub    $0x8,%edx
  cmovns %edx,%eax
  sar    $0x4,%eax
  jmp    L153
L16:
  lea    0x7(%rax),%edx
  sub    $0x8,%eax
  cmovs  %edx,%eax
  sar    $0x4,%eax
  jmp    L144
L21:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
void LeeIDct(x, y) int *x;
int *y;
{
  register int ex0, ex1, ex2, ex3, ex4, ex5, ex6, ex7;
  register int tx0, tx1, tx2, tx3;
  register int rx0, rx1, rx2, rx3;
  register int gx0, gx1, gx2;
  register int *iptr, *jptr;
  register int i;
  for (jptr = y, iptr = x, i = 0; i < 8; i++) {
    tx0 = (((362L * ((*(iptr++)) << (2)))) >> (9));
    tx1 = ((*(iptr++)) << (2));
    tx2 = ((*(iptr++)) << (2));
    tx3 = ((*(iptr++)) << (2));
    ex4 = ((*(iptr++)) << (2));
    ex5 = ((*(iptr++)) << (2));
    ex6 = ((*(iptr++)) << (2));
    ex7 = ((*(iptr++)) << (2));
    gx2 = (((362L * ex4)) >> (9));
    rx0 = tx0 + gx2;
    rx1 = tx0 - gx2;
    gx2 = (((362L * (tx2 + ex6))) >> (9));
    rx2 = (((277L * (tx2 + gx2))) >> (9));
    rx3 = (((669L * (tx2 - gx2))) >> (9));
    ex0 = rx0 + rx2;
    ex1 = rx1 + rx3;
    ex2 = rx0 - rx2;
    ex3 = rx1 - rx3;
    gx0 = tx3 + ex5;
    gx2 = (((362L * gx0)) >> (9));
    rx0 = tx1 + gx2;
    rx1 = tx1 - gx2;
    gx0 = tx1 + tx3;
    gx1 = ex5 + ex7;
    gx2 = (((362L * (gx0 + gx1))) >> (9));
    rx2 = (((277L * (gx0 + gx2))) >> (9));
    rx3 = (((669L * (gx0 - gx2))) >> (9));
    ex4 = (((261L * (rx0 + rx2))) >> (9));
    ex5 = (((308L * (rx1 + rx3))) >> (9));
    ex6 = (((1312L * (rx0 - rx2))) >> (9));
    ex7 = (((461L * (rx1 - rx3))) >> (9));
    *(jptr++) = ex0 + ex4;
    *(jptr++) = ex1 + ex5;
    *(jptr++) = ex3 + ex7;
    *(jptr++) = ex2 + ex6;
    *(jptr++) = ex2 - ex6;
    *(jptr++) = ex3 - ex7;
    *(jptr++) = ex1 - ex5;
    *(jptr++) = ex0 - ex4;
  }
  for (i = 0; i < 8; i++) {
    jptr = iptr = y + i;
    tx0 = (((362L * (*iptr))) >> (9));
    gx2 = (((362L * iptr[32])) >> (9));
    rx0 = tx0 + gx2;
    rx1 = tx0 - gx2;
    gx2 = (((362L * (iptr[16] + iptr[48]))) >> (9));
    rx2 = (((277L * (iptr[16] + gx2))) >> (9));
    rx3 = (((669L * (iptr[16] - gx2))) >> (9));
    ex0 = rx0 + rx2;
    ex1 = rx1 + rx3;
    ex2 = rx0 - rx2;
    ex3 = rx1 - rx3;
    gx0 = iptr[24] + iptr[40];
    gx2 = (((362L * gx0)) >> (9));
    rx0 = iptr[8] + gx2;
    rx1 = iptr[8] - gx2;
    gx0 = iptr[8] + iptr[24];
    gx1 = iptr[40] + iptr[56];
    gx2 = (((362L * (gx0 + gx1))) >> (9));
    rx2 = (((277L * (gx0 + gx2))) >> (9));
    rx3 = (((669L * (gx0 - gx2))) >> (9));
    ex4 = (((261L * (rx0 + rx2))) >> (9));
    ex5 = (((308L * (rx1 + rx3))) >> (9));
    ex6 = (((1312L * (rx0 - rx2))) >> (9));
    ex7 = (((461L * (rx1 - rx3))) >> (9));
    gx1 = ex0 + ex4;
    (*jptr) = (((gx1 < 0) ? (gx1 - 8) : (gx1 + 8)) / 16);
    ;
    jptr += 8;
    gx1 = ex1 + ex5;
    (*jptr) = (((gx1 < 0) ? (gx1 - 8) : (gx1 + 8)) / 16);
    ;
    jptr += 8;
    gx1 = ex3 + ex7;
    (*jptr) = (((gx1 < 0) ? (gx1 - 8) : (gx1 + 8)) / 16);
    ;
    jptr += 8;
    gx1 = ex2 + ex6;
    (*jptr) = (((gx1 < 0) ? (gx1 - 8) : (gx1 + 8)) / 16);
    ;
    jptr += 8;
    gx1 = ex2 - ex6;
    (*jptr) = (((gx1 < 0) ? (gx1 - 8) : (gx1 + 8)) / 16);
    ;
    jptr += 8;
    gx1 = ex3 - ex7;
    (*jptr) = (((gx1 < 0) ? (gx1 - 8) : (gx1 + 8)) / 16);
    ;
    jptr += 8;
    gx1 = ex1 - ex5;
    (*jptr) = (((gx1 < 0) ? (gx1 - 8) : (gx1 + 8)) / 16);
    ;
    jptr += 8;
    gx1 = ex0 - ex4;
    (*jptr) = (((gx1 < 0) ? (gx1 - 8) : (gx1 + 8)) / 16);
    ;
  }
}
```