user: Translate the below assembly code into C programming language:

```asm
<L_4_inv>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x18(%rbp),%rax
  mov    0x10(%rax),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  lea    0x10(%rax),%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%rax
  mov    0x4(%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x4(%rax),%rdx
  mov    -0x18(%rbp),%rax
  mov    0x14(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%rax
  lea    0x14(%rax),%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%rax
  mov    0x8(%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    -0x18(%rbp),%rax
  mov    0x18(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%rax
  lea    0x18(%rax),%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%rax
  mov    0xc(%rax),%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x18(%rbp),%rax
  lea    0xc(%rax),%rdx
  mov    -0x18(%rbp),%rax
  mov    0x1c(%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%rax
  lea    0x1c(%rax),%rdx
  mov    -0x4(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x18(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  xor    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  xor    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  xor    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  shl    $0x8,%eax
  mov    %eax,%edx
  mov    -0x4(%rbp),%eax
  sar    $0x8,%eax
  or     %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x18(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%ecx
  mov    -0x18(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%eax
  xor    -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x10,%rax
  xor    %ecx,%edx
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x14,%rax
  mov    (%rax),%ecx
  mov    -0x18(%rbp),%rax
  add    $0x4,%rax
  mov    (%rax),%eax
  xor    -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x14,%rax
  xor    %ecx,%edx
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%ecx
  mov    -0x18(%rbp),%rax
  mov    (%rax),%eax
  xor    -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x18,%rax
  xor    %ecx,%edx
  mov    %edx,(%rax)
  mov    -0x18(%rbp),%rax
  add    $0x1c,%rax
  mov    (%rax),%ecx
  mov    -0x18(%rbp),%rax
  add    $0xc,%rax
  mov    (%rax),%eax
  xor    -0x4(%rbp),%eax
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  add    $0x1c,%rax
  xor    %ecx,%edx
  mov    %edx,(%rax)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void L_4_inv(uint16_t *x) {
  uint16_t tmp;
  tmp = x[0];
  x[0] = x[4];
  x[4] = tmp;
  tmp = x[1];
  x[1] = x[5];
  x[5] = tmp;
  tmp = x[2];
  x[2] = x[6];
  x[6] = tmp;
  tmp = x[3];
  x[3] = x[7];
  x[7] = tmp;
  tmp = x[0] ^ x[1] ^ x[2] ^ x[3];
  tmp = (((tmp) << 8) | ((tmp) >> (16 - (8))));
  x[4] ^= x[2] ^ tmp;
  x[5] ^= x[1] ^ tmp;
  x[6] ^= x[0] ^ tmp;
  x[7] ^= x[3] ^ tmp;
}
```