user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<IDCT>:
  endbr64
  mov    %rdi,%r9
  cmp    $0x1,%esi
  je     L19
  push   %r13
  mov    %rdi,%rax
  push   %r12
  lea    0x20(%rdi),%r12
  push   %rbp
  push   %rbx
  jmp    L28
  nopw   0x0(%rax,%rax,1)
L9:
  lea    0x0(%rbp,%rdi,1),%esi
  sub    %ebp,%edi
  lea    (%r8,%rbx,1),%ebp
  sub    %ebx,%r8d
  imul   $0x16a,%r8d,%r8d
  lea    (%rsi,%rbp,1),%ebx
  sub    %ebp,%esi
  add    $0x4,%rax
  lea    (%rdx,%r11,1),%r13d
  sub    %r11d,%edx
  sar    $0x8,%r8d
  sub    %ebp,%r8d
  lea    (%rdi,%r8,1),%ebp
  sub    %r8d,%edi
  lea    (%rcx,%r10,1),%r8d
  sub    %r10d,%ecx
  mov    %ecx,%r11d
  imul   $0x115,%ecx,%ecx
  lea    0x0(%r13,%r8,1),%r10d
  sub    %r13d,%r8d
  sub    %edx,%r11d
  imul   $0x29d,%edx,%edx
  imul   $0x1d9,%r11d,%r11d
  imul   $0x16a,%r8d,%r8d
  sar    $0x8,%ecx
  sar    $0x8,%edx
  sar    $0x8,%r11d
  add    %r11d,%edx
  sar    $0x8,%r8d
  sub    %r11d,%ecx
  lea    (%rbx,%r10,1),%r11d
  sub    %r10d,%edx
  sub    %r10d,%ebx
  mov    %r11d,-0x4(%rax)
  sub    %edx,%r8d
  lea    0x0(%rbp,%rdx,1),%r10d
  sub    %edx,%ebp
  mov    %ebx,0xdc(%rax)
  lea    (%rdi,%r8,1),%edx
  add    %r8d,%ecx
  sub    %r8d,%edi
  mov    %r10d,0x1c(%rax)
  mov    %edx,0x3c(%rax)
  lea    (%rsi,%rcx,1),%edx
  sub    %ecx,%esi
  mov    %ebp,0xbc(%rax)
  mov    %edi,0x9c(%rax)
  mov    %edx,0x7c(%rax)
  mov    %esi,0x5c(%rax)
  cmp    %r12,%rax
  je     L30
L28:
  mov    0x20(%rax),%ecx
  mov    0x40(%rax),%r8d
  mov    0x60(%rax),%edx
  mov    0x80(%rax),%ebp
  mov    %ecx,%esi
  mov    0xa0(%rax),%r11d
  mov    0xc0(%rax),%ebx
  or     %r8d,%esi
  mov    0xe0(%rax),%r10d
  mov    (%rax),%edi
  or     %edx,%esi
  or     %ebp,%esi
  or     %r11d,%esi
  or     %ebx,%esi
  or     %r10d,%esi
  jne    L9
  mov    %edi,0xe0(%rax)
  add    $0x4,%rax
  mov    %edi,0xbc(%rax)
  mov    %edi,0x9c(%rax)
  mov    %edi,0x7c(%rax)
  mov    %edi,0x5c(%rax)
  mov    %edi,0x3c(%rax)
  mov    %edi,0x1c(%rax)
  cmp    %r12,%rax
  jne    L28
L30:
  lea    0x100(%r9),%rax
  pxor   %xmm11,%xmm11
L16:
  movdqu (%r9),%xmm2
  movdqu 0x10(%r9),%xmm5
  sub    $0xffffffffffffff80,%r9
  movdqu -0x60(%r9),%xmm4
  movdqu -0x40(%r9),%xmm3
  movdqa %xmm2,%xmm1
  shufps $0xdd,%xmm5,%xmm2
  movdqu -0x20(%r9),%xmm0
  shufps $0x88,%xmm5,%xmm1
  movdqu -0x50(%r9),%xmm5
  movdqa %xmm4,%xmm8
  movdqa %xmm3,%xmm6
  movdqa %xmm0,%xmm7
  shufps $0x88,%xmm5,%xmm8
  shufps $0xdd,%xmm5,%xmm4
  movdqu -0x30(%r9),%xmm5
  shufps $0x88,%xmm5,%xmm6
  shufps $0xdd,%xmm5,%xmm3
  movdqu -0x10(%r9),%xmm5
  shufps $0x88,%xmm5,%xmm7
  shufps $0xdd,%xmm5,%xmm0
  movdqa %xmm1,%xmm5
  shufps $0xdd,%xmm8,%xmm1
  shufps $0x88,%xmm8,%xmm5
  movdqa %xmm6,%xmm8
  shufps $0xdd,%xmm7,%xmm6
  shufps $0x88,%xmm7,%xmm8
  movdqa %xmm2,%xmm7
  shufps $0xdd,%xmm4,%xmm2
  movdqa %xmm2,%xmm9
  shufps $0x88,%xmm4,%xmm7
  movdqa %xmm3,%xmm4
  movdqa %xmm7,%xmm13
  shufps $0xdd,%xmm0,%xmm3
  shufps $0x88,%xmm0,%xmm4
  shufps $0xdd,%xmm4,%xmm7
  shufps $0xdd,%xmm3,%xmm2
  movdqa %xmm5,%xmm0
  shufps $0x88,%xmm4,%xmm13
  movdqa %xmm1,%xmm4
  shufps $0x88,%xmm3,%xmm9
  shufps $0xdd,%xmm6,%xmm1
  shufps $0x88,%xmm6,%xmm4
  movdqa %xmm13,%xmm3
  movdqa %xmm4,%xmm6
  shufps $0xdd,%xmm8,%xmm5
  por    %xmm7,%xmm6
  por    %xmm5,%xmm3
  shufps $0x88,%xmm8,%xmm0
  movdqa %xmm0,%xmm10
  por    %xmm6,%xmm3
  movdqa %xmm9,%xmm6
  movdqa %xmm2,%xmm14
  por    %xmm1,%xmm6
  psrad  $0x5,%xmm10
  paddd  %xmm13,%xmm14
  por    %xmm2,%xmm6
  psubd  %xmm2,%xmm13
  movdqa %xmm9,%xmm15
  por    %xmm6,%xmm3
  movdqa %xmm10,%xmm6
  movdqa %xmm13,%xmm2
  pcmpeqd %xmm11,%xmm3
  paddd  %xmm7,%xmm15
  pand   %xmm3,%xmm6
  movdqa %xmm3,%xmm8
  pandn  %xmm0,%xmm3
  por    %xmm6,%xmm3
  pcmpeqd %xmm11,%xmm8
  movdqa %xmm5,%xmm6
  paddd  %xmm0,%xmm6
  psubd  %xmm5,%xmm0
  movdqa %xmm1,%xmm5
  paddd  %xmm4,%xmm5
  psubd  %xmm1,%xmm4
  movdqa %xmm4,%xmm12
  pslld  $0x1,%xmm12
  paddd  %xmm4,%xmm12
  movdqa %xmm12,%xmm1
  pslld  $0x4,%xmm1
  psubd  %xmm12,%xmm1
  pslld  $0x2,%xmm1
  paddd  %xmm4,%xmm1
  movdqa %xmm6,%xmm4
  psubd  %xmm5,%xmm6
  pslld  $0x1,%xmm1
  paddd  %xmm5,%xmm4
  psrad  $0x8,%xmm1
  psubd  %xmm5,%xmm1
  movdqa %xmm0,%xmm5
  paddd  %xmm1,%xmm5
  psubd  %xmm1,%xmm0
  movdqa %xmm9,%xmm1
  psubd  %xmm7,%xmm1
  movdqa %xmm15,%xmm9
  psubd  %xmm1,%xmm2
  paddd  %xmm14,%xmm9
  movdqa %xmm2,%xmm12
  psubd  %xmm15,%xmm14
  pslld  $0x4,%xmm12
  psubd  %xmm2,%xmm12
  pslld  $0x2,%xmm12
  psubd  %xmm2,%xmm12
  pslld  $0x3,%xmm12
  paddd  %xmm2,%xmm12
  movdqa %xmm1,%xmm2
  pslld  $0x3,%xmm2
  psrad  $0x8,%xmm12
  psubd  %xmm1,%xmm2
  pslld  $0x5,%xmm2
  psubd  %xmm1,%xmm2
  movdqa %xmm14,%xmm1
  movdqa %xmm2,%xmm7
  pslld  $0x1,%xmm1
  paddd  %xmm14,%xmm1
  pslld  $0x2,%xmm7
  psubd  %xmm2,%xmm7
  movdqa %xmm1,%xmm2
  pslld  $0x4,%xmm2
  psrad  $0x8,%xmm7
  psubd  %xmm1,%xmm2
  movdqa %xmm13,%xmm1
  paddd  %xmm12,%xmm7
  pslld  $0x4,%xmm1
  pslld  $0x2,%xmm2
  psubd  %xmm9,%xmm7
  paddd  %xmm13,%xmm1
  paddd  %xmm14,%xmm2
  pslld  $0x2,%xmm1
  pslld  $0x1,%xmm2
  paddd  %xmm13,%xmm1
  psrad  $0x8,%xmm2
  pslld  $0x2,%xmm1
  psubd  %xmm7,%xmm2
  paddd  %xmm13,%xmm1
  movdqa %xmm4,%xmm13
  psubd  %xmm9,%xmm4
  psrad  $0x8,%xmm1
  psrad  $0x5,%xmm4
  paddd  %xmm9,%xmm13
  psubd  %xmm12,%xmm1
  movdqa %xmm8,%xmm12
  movdqa %xmm8,%xmm9
  pandn  %xmm3,%xmm12
  movdqa %xmm5,%xmm3
  psubd  %xmm7,%xmm5
  paddd  %xmm7,%xmm3
  movdqa %xmm0,%xmm7
  paddd  %xmm2,%xmm1
  paddd  %xmm2,%xmm7
  psubd  %xmm2,%xmm0
  movdqa %xmm6,%xmm2
  paddd  %xmm1,%xmm2
  psubd  %xmm1,%xmm6
  psrad  $0x5,%xmm3
  pandn  %xmm10,%xmm9
  psrad  $0x5,%xmm13
  pand   %xmm8,%xmm3
  psrad  $0x5,%xmm5
  psrad  $0x5,%xmm7
  por    %xmm9,%xmm3
  psrad  $0x5,%xmm0
  psrad  $0x5,%xmm2
  pand   %xmm8,%xmm13
  psrad  $0x5,%xmm6
  pand   %xmm8,%xmm4
  pand   %xmm8,%xmm5
  pand   %xmm8,%xmm6
  pand   %xmm8,%xmm7
  pand   %xmm8,%xmm0
  pand   %xmm8,%xmm2
  por    %xmm9,%xmm4
  por    %xmm9,%xmm5
  por    %xmm9,%xmm0
  por    %xmm9,%xmm2
  por    %xmm9,%xmm7
  por    %xmm13,%xmm12
  por    %xmm6,%xmm9
  movdqa %xmm3,%xmm6
  punpckldq %xmm0,%xmm6
  punpckhdq %xmm0,%xmm3
  movdqa %xmm12,%xmm1
  movdqa %xmm7,%xmm0
  punpckldq %xmm2,%xmm1
  punpckhdq %xmm5,%xmm7
  punpckldq %xmm5,%xmm0
  punpckhdq %xmm2,%xmm12
  movdqa %xmm9,%xmm5
  punpckldq %xmm4,%xmm5
  punpckhdq %xmm4,%xmm9
  movdqa %xmm1,%xmm2
  movdqa %xmm1,%xmm4
  movdqa %xmm12,%xmm1
  punpckhdq %xmm7,%xmm12
  punpckldq %xmm7,%xmm1
  movdqa %xmm6,%xmm7
  punpckldq %xmm0,%xmm4
  punpckldq %xmm5,%xmm7
  punpckhdq %xmm0,%xmm2
  movdqa %xmm6,%xmm0
  movdqa %xmm4,%xmm6
  punpckhdq %xmm7,%xmm4
  punpckhdq %xmm5,%xmm0
  movups %xmm4,-0x70(%r9)
  movdqa %xmm3,%xmm5
  movdqa %xmm2,%xmm4
  punpckhdq %xmm0,%xmm2
  punpckldq %xmm9,%xmm5
  punpckldq %xmm0,%xmm4
  movdqa %xmm1,%xmm0
  movups %xmm2,-0x50(%r9)
  punpckldq %xmm5,%xmm0
  punpckhdq %xmm9,%xmm3
  punpckldq %xmm7,%xmm6
  movups %xmm4,-0x60(%r9)
  movups %xmm0,-0x40(%r9)
  movdqa %xmm12,%xmm0
  punpckhdq %xmm5,%xmm1
  punpckhdq %xmm3,%xmm12
  punpckldq %xmm3,%xmm0
  movups %xmm6,-0x80(%r9)
  movups %xmm1,-0x30(%r9)
  movups %xmm0,-0x20(%r9)
  movups %xmm12,-0x10(%r9)
  cmp    %r9,%rax
  jne    L16
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L19:
  xor    %eax,%eax
  jmp    1050 <IDCT1@plt>
```

assistant: ```c
void IDCT(int *block, int k) {
  int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
  int z5, z10, z11, z12, z13;
  int *ptr;
  int i;
  switch (k) {
  case 1:
    IDCT1(block);
    return;
  }
  ptr = block;
  for (i = 0; i < 8; i++, ptr++) {
    if ((ptr[8 * 1] | ptr[8 * 2] | ptr[8 * 3] | ptr[8 * 4] | ptr[8 * 5] | ptr[8 * 6] | ptr[8 * 7]) == 0) {
      ptr[8 * 0] = ptr[8 * 1] = ptr[8 * 2] = ptr[8 * 3] = ptr[8 * 4] = ptr[8 * 5] = ptr[8 * 6] = ptr[8 * 7] = ptr[8 * 0];
      continue;
    }
    z10 = ptr[8 * 0] + ptr[8 * 4];
    z11 = ptr[8 * 0] - ptr[8 * 4];
    z13 = ptr[8 * 2] + ptr[8 * 6];
    z12 = ((((ptr[8 * 2] - ptr[8 * 6]) * ((362))) >> (8))) - z13;
    tmp0 = z10 + z13;
    tmp3 = z10 - z13;
    tmp1 = z11 + z12;
    tmp2 = z11 - z12;
    z13 = ptr[8 * 3] + ptr[8 * 5];
    z10 = ptr[8 * 3] - ptr[8 * 5];
    z11 = ptr[8 * 1] + ptr[8 * 7];
    z12 = ptr[8 * 1] - ptr[8 * 7];
    z5 = ((((z12 - z10) * ((473))) >> (8)));
    tmp7 = z11 + z13;
    tmp6 = ((((z10) * ((669))) >> (8))) + z5 - tmp7;
    tmp5 = ((((z11 - z13) * ((362))) >> (8))) - tmp6;
    tmp4 = ((((z12) * ((277))) >> (8))) - z5 + tmp5;
    ptr[8 * 0] = (tmp0 + tmp7);
    ptr[8 * 7] = (tmp0 - tmp7);
    ptr[8 * 1] = (tmp1 + tmp6);
    ptr[8 * 6] = (tmp1 - tmp6);
    ptr[8 * 2] = (tmp2 + tmp5);
    ptr[8 * 5] = (tmp2 - tmp5);
    ptr[8 * 4] = (tmp3 + tmp4);
    ptr[8 * 3] = (tmp3 - tmp4);
  }
  ptr = block;
  for (i = 0; i < 8; i++, ptr += 8) {
    if ((ptr[1] | ptr[2] | ptr[3] | ptr[4] | ptr[5] | ptr[6] | ptr[7]) == 0) {
      ptr[0] = ptr[1] = ptr[2] = ptr[3] = ptr[4] = ptr[5] = ptr[6] = ptr[7] = (((ptr[0]) >> (2 + 3)));
      ;
      continue;
    }
    z10 = ptr[0] + ptr[4];
    z11 = ptr[0] - ptr[4];
    z13 = ptr[2] + ptr[6];
    z12 = ((((ptr[2] - ptr[6]) * ((362))) >> (8))) - z13;
    tmp0 = z10 + z13;
    tmp3 = z10 - z13;
    tmp1 = z11 + z12;
    tmp2 = z11 - z12;
    z13 = ptr[3] + ptr[5];
    z10 = ptr[3] - ptr[5];
    z11 = ptr[1] + ptr[7];
    z12 = ptr[1] - ptr[7];
    z5 = ((((z12 - z10) * ((473))) >> (8)));
    tmp7 = z11 + z13;
    tmp6 = ((((z10) * ((669))) >> (8))) + z5 - tmp7;
    tmp5 = ((((z11 - z13) * ((362))) >> (8))) - tmp6;
    tmp4 = ((((z12) * ((277))) >> (8))) - z5 + tmp5;
    ptr[0] = (((tmp0 + tmp7) >> (2 + 3)));
    ;
    ptr[7] = (((tmp0 - tmp7) >> (2 + 3)));
    ;
    ptr[1] = (((tmp1 + tmp6) >> (2 + 3)));
    ;
    ptr[6] = (((tmp1 - tmp6) >> (2 + 3)));
    ;
    ptr[2] = (((tmp2 + tmp5) >> (2 + 3)));
    ;
    ptr[5] = (((tmp2 - tmp5) >> (2 + 3)));
    ;
    ptr[4] = (((tmp3 + tmp4) >> (2 + 3)));
    ;
    ptr[3] = (((tmp3 - tmp4) >> (2 + 3)));
    ;
  }
}
```