user: 请将以下的汇编代码转换成C语言代码:

```asm
<idct4x4dc>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x58(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x44(%rbp)
  jmp    L30
L28:
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  movswl %ax,%edx
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x58(%rbp),%rax
  add    %rcx,%rax
  movzwl 0x2(%rax),%eax
  cwtl
  add    %edx,%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  cwtl
  mov    -0x44(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x58(%rbp),%rdx
  add    %rcx,%rdx
  movzwl 0x2(%rdx),%edx
  movswl %dx,%edx
  sub    %edx,%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzwl 0x4(%rax),%eax
  movswl %ax,%edx
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x58(%rbp),%rax
  add    %rcx,%rax
  movzwl 0x6(%rax),%eax
  cwtl
  add    %edx,%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzwl 0x4(%rax),%eax
  cwtl
  mov    -0x44(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x58(%rbp),%rdx
  add    %rcx,%rdx
  movzwl 0x6(%rdx),%edx
  movswl %dx,%edx
  sub    %edx,%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x40(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  mov    -0x44(%rbp),%eax
  cltq
  mov    %dx,-0x30(%rbp,%rax,2)
  mov    -0x40(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    -0x44(%rbp),%eax
  cltq
  add    $0x4,%rax
  mov    %dx,-0x30(%rbp,%rax,2)
  mov    -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,%edx
  mov    -0x44(%rbp),%eax
  cltq
  add    $0x8,%rax
  mov    %dx,-0x30(%rbp,%rax,2)
  mov    -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%edx
  mov    -0x44(%rbp),%eax
  cltq
  add    $0xc,%rax
  mov    %dx,-0x30(%rbp,%rax,2)
  addl   $0x1,-0x44(%rbp)
L30:
  cmpl   $0x3,-0x44(%rbp)
  jle    L28
  movl   $0x0,-0x44(%rbp)
  jmp    L32
L38:
  mov    -0x44(%rbp),%eax
  cltq
  movzwl -0x30(%rbp,%rax,8),%eax
  movswl %ax,%edx
  mov    -0x44(%rbp),%eax
  cltq
  movzwl -0x2e(%rbp,%rax,8),%eax
  cwtl
  add    %edx,%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  movzwl -0x30(%rbp,%rax,8),%eax
  movswl %ax,%edx
  mov    -0x44(%rbp),%eax
  cltq
  movzwl -0x2e(%rbp,%rax,8),%eax
  movswl %ax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  movzwl -0x2c(%rbp,%rax,8),%eax
  movswl %ax,%edx
  mov    -0x44(%rbp),%eax
  cltq
  movzwl -0x2a(%rbp,%rax,8),%eax
  cwtl
  add    %edx,%eax
  mov    %eax,-0x38(%rbp)
  mov    -0x44(%rbp),%eax
  cltq
  movzwl -0x2c(%rbp,%rax,8),%eax
  movswl %ax,%edx
  mov    -0x44(%rbp),%eax
  cltq
  movzwl -0x2a(%rbp,%rax,8),%eax
  movswl %ax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x40(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%ecx
  mov    -0x58(%rbp),%rax
  mov    -0x44(%rbp),%edx
  movslq %edx,%rdx
  mov    %cx,(%rax,%rdx,2)
  mov    -0x40(%rbp),%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%eax
  mov    %edx,%ecx
  sub    %eax,%ecx
  mov    -0x58(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  mov    %cx,(%rdx,%rax,2)
  mov    -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  mov    %edx,%ecx
  sub    %eax,%ecx
  mov    -0x58(%rbp),%rax
  lea    0x10(%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  mov    %cx,(%rdx,%rax,2)
  mov    -0x3c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0x58(%rbp),%rax
  lea    0x18(%rax),%rdx
  mov    -0x44(%rbp),%eax
  cltq
  mov    %cx,(%rdx,%rax,2)
  addl   $0x1,-0x44(%rbp)
L32:
  cmpl   $0x3,-0x44(%rbp)
  jle    L38
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L18
  call   <__stack_chk_fail@plt>
L18:
  leave
  ret
```

assistant: ```c
void idct4x4dc(short d[4][4]) {
  short tmp[4][4];
  int s01, s23;
  int d01, d23;
  int i;
  for (i = 0; i < 4; i++) {
    s01 = d[i][0] + d[i][1];
    d01 = d[i][0] - d[i][1];
    s23 = d[i][2] + d[i][3];
    d23 = d[i][2] - d[i][3];
    tmp[0][i] = s01 + s23;
    tmp[1][i] = s01 - s23;
    tmp[2][i] = d01 - d23;
    tmp[3][i] = d01 + d23;
  }
  for (i = 0; i < 4; i++) {
    s01 = tmp[i][0] + tmp[i][1];
    d01 = tmp[i][0] - tmp[i][1];
    s23 = tmp[i][2] + tmp[i][3];
    d23 = tmp[i][2] - tmp[i][3];
    d[0][i] = s01 + s23;
    d[1][i] = s01 - s23;
    d[2][i] = d01 - d23;
    d[3][i] = d01 + d23;
  }
}
```