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

```asm
<idct_row>:
  endbr64
  push   %rbp
  mov    $0x1,%esi
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  mov    0x4(%rdi),%eax
  or     0x8(%rdi),%eax
  or     0xc(%rdi),%eax
  sete   %dil
  movzbl %dil,%edi
  call   <__builtin_expect@plt>
  test   %rax,%rax
  jne    L4
  mov    (%rbx),%edx
  mov    0x8(%rbx),%edi
  mov    0x4(%rbx),%eax
  mov    0xc(%rbx),%ecx
  shl    $0xb,%edx
  shl    $0xb,%edi
  mov    0x18(%rbx),%r10d
  sub    $0xffffff80,%edx
  lea    (%rdx,%rdi,1),%esi
  sub    %edi,%edx
  lea    (%rax,%rcx,1),%edi
  imul   $0x454,%edi,%edi
  imul   $0x620,%eax,%eax
  imul   $0xfffff138,%ecx,%ecx
  add    %edi,%eax
  add    %edi,%ecx
  lea    (%rsi,%rax,1),%r8d
  sub    %eax,%esi
  mov    0x10(%rbx),%eax
  lea    (%rdx,%rcx,1),%r9d
  sub    %ecx,%edx
  mov    0x1c(%rbx),%ecx
  mov    0x14(%rbx),%edi
  lea    (%rax,%rcx,1),%r11d
  imul   $0x235,%r11d,%r11d
  imul   $0x8e4,%eax,%eax
  imul   $0xfffff2b2,%ecx,%ecx
  add    %r11d,%eax
  add    %r11d,%ecx
  lea    (%rdi,%r10,1),%r11d
  imul   $0x968,%r11d,%r11d
  imul   $0xfffffce1,%r10d,%r10d
  imul   $0xfffff04f,%edi,%edi
  add    %r11d,%r10d
  add    %r11d,%edi
  lea    (%rax,%r10,1),%r11d
  sub    %r10d,%eax
  lea    (%rcx,%rdi,1),%ebp
  sub    %edi,%ecx
  lea    (%rax,%rcx,1),%edi
  sub    %ecx,%eax
  lea    (%r8,%r11,1),%ecx
  imul   $0xb5,%edi,%edi
  sar    $0x8,%ecx
  imul   $0xb5,%eax,%eax
  mov    %ecx,(%rbx)
  sar    $0x8,%edi
  lea    (%r9,%rdi,1),%ecx
  sar    $0x8,%eax
  sar    $0x8,%ecx
  mov    %ecx,0x4(%rbx)
  lea    (%rdx,%rax,1),%ecx
  sar    $0x8,%ecx
  mov    %ecx,0x8(%rbx)
  lea    (%rsi,%rbp,1),%ecx
  sar    $0x8,%ecx
  sub    %ebp,%esi
  sub    %eax,%edx
  sub    %edi,%r9d
  sar    $0x8,%esi
  sub    %r11d,%r8d
  sar    $0x8,%edx
  mov    %ecx,0xc(%rbx)
  sar    $0x8,%r9d
  sar    $0x8,%r8d
  mov    %esi,0x10(%rbx)
  mov    %edx,0x14(%rbx)
  mov    %r9d,0x18(%rbx)
  mov    %r8d,0x1c(%rbx)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L4:
  mov    (%rbx),%eax
  lea    0x0(,%rax,8),%edx
  shl    $0x13,%eax
  or     %edx,%eax
  movd   %eax,%xmm1
  pshufd $0x0,%xmm1,%xmm0
  movups %xmm0,(%rbx)
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

assistant: ```c
void __attribute__((__always___)) idct_row(int16_t *const block) {
  int d0, d1, d2, d3;
  int a0, a1, a2, a3, b0, b1, b2, b3;
  int t0, t1, t2, t3;
  if (__builtin_expect((!(block[1] | ((int32_t *)block)[1] | ((int32_t *)block)[2] | ((int32_t *)block)[3])) != 0, 1)) {
    uint32_t tmp = (uint16_t)(block[0] << 3);
    tmp |= tmp << 16;
    ((int32_t *)block)[0] = tmp;
    ((int32_t *)block)[1] = tmp;
    ((int32_t *)block)[2] = tmp;
    ((int32_t *)block)[3] = tmp;
    return;
  }
  d0 = (block[0] << 11) + 128;
  d1 = block[1];
  d2 = block[2] << 11;
  d3 = block[3];
  t0 = d0 + d2;
  t1 = d0 - d2;
  do {
    int tmp = 1108 * (d3 + d1);
    t2 = tmp + (2676 - 1108) * d1;
    t3 = tmp - (2676 + 1108) * d3;
  } while (0);
  a0 = t0 + t2;
  a1 = t1 + t3;
  a2 = t1 - t3;
  a3 = t0 - t2;
  d0 = block[4];
  d1 = block[5];
  d2 = block[6];
  d3 = block[7];
  do {
    int tmp = 565 * (d3 + d0);
    t0 = tmp + (2841 - 565) * d0;
    t1 = tmp - (2841 + 565) * d3;
  } while (0);
  do {
    int tmp = 2408 * (d1 + d2);
    t2 = tmp + (1609 - 2408) * d2;
    t3 = tmp - (1609 + 2408) * d1;
  } while (0);
  b0 = t0 + t2;
  b3 = t1 + t3;
  t0 -= t2;
  t1 -= t3;
  b1 = ((t0 + t1) * 181) >> 8;
  b2 = ((t0 - t1) * 181) >> 8;
  block[0] = (a0 + b0) >> 8;
  block[1] = (a1 + b1) >> 8;
  block[2] = (a2 + b2) >> 8;
  block[3] = (a3 + b3) >> 8;
  block[4] = (a3 - b3) >> 8;
  block[5] = (a2 - b2) >> 8;
  block[6] = (a1 - b1) >> 8;
  block[7] = (a0 - b0) >> 8;
}
```