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

```asm
<fc8180_ppi_longread>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,%eax
  mov    %rdx,-0x28(%rbp)
  mov    %ax,-0x1c(%rbp)
  movl   $0x4,-0x4(%rbp)
  mov    -0x4(%rbp),%eax
  shr    $0x10,%eax
  and    $0xf,%eax
  or     $0xffffffc0,%eax
  mov    %al,-0x5(%rbp)
  mov    $0x0,%eax
  call   <OAL_OBTAIN_SEMAPHORE@plt>
  mov    $0x0,%eax
  movzwl -0x1c(%rbp),%edx
  mov    %dl,(%rax)
  movzwl -0x1c(%rbp),%eax
  shr    $0x4,%ax
  mov    %eax,%edx
  mov    $0x0,%eax
  mov    %dl,(%rax)
  movzwl -0x1c(%rbp),%eax
  shr    $0x8,%ax
  mov    %eax,%edx
  mov    $0x0,%eax
  mov    %dl,(%rax)
  movzwl -0x1c(%rbp),%eax
  shr    $0xc,%ax
  mov    %eax,%edx
  mov    $0x0,%eax
  mov    %dl,(%rax)
  mov    $0x0,%edx
  movzbl -0x5(%rbp),%eax
  shr    $0x4,%al
  mov    %al,(%rdx)
  mov    $0x0,%edx
  movzbl -0x5(%rbp),%eax
  mov    %al,(%rdx)
  mov    -0x4(%rbp),%eax
  shr    $0xc,%eax
  mov    %eax,%edx
  mov    $0x0,%eax
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  shr    $0x8,%eax
  mov    %eax,%edx
  mov    $0x0,%eax
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  shr    $0x4,%eax
  mov    %eax,%edx
  mov    $0x0,%eax
  mov    %dl,(%rax)
  mov    $0x0,%eax
  mov    -0x4(%rbp),%edx
  mov    %dl,(%rax)
  mov    $0x0,%eax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x4,%eax
  and    $0xf0,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
  movzbl (%rax),%eax
  movzbl %al,%eax
  and    $0xf,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  or     %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0xc,%eax
  and    $0xf000,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  or     %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x8,%eax
  and    $0xf00,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  or     %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x14,%eax
  and    $0xf00000,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  or     %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x10,%eax
  and    $0xf0000,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  or     %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x1c,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  or     %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
  movzbl (%rax),%eax
  movzbl %al,%eax
  shl    $0x18,%eax
  and    $0xf000000,%eax
  mov    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  or     %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    $0x0,%eax
  call   <OAL_RELEASE_SEMAPHORE@plt>
  mov    $0x0,%eax
  leave
  ret
```

assistant: ```c
signed int fc8180_ppi_longread(void *handle, unsigned short addr, unsigned int *data) {
  unsigned int length = 4;
  unsigned char cmd = 0x80 | 0x40 | ((length & 0x0f0000) >> 16);
  OAL_OBTAIN_SEMAPHORE();
  (*(volatile unsigned char *)(0x00)) = addr;
  (*(volatile unsigned char *)(0x00)) = addr >> 4;
  (*(volatile unsigned char *)(0x00)) = addr >> 8;
  (*(volatile unsigned char *)(0x00)) = addr >> 12;
  (*(volatile unsigned char *)(0x00)) = cmd >> 4;
  (*(volatile unsigned char *)(0x00)) = cmd;
  (*(volatile unsigned char *)(0x00)) = length >> 12;
  (*(volatile unsigned char *)(0x00)) = length >> 8;
  (*(volatile unsigned char *)(0x00)) = length >> 4;
  (*(volatile unsigned char *)(0x00)) = length;
  *data = ((*(volatile unsigned char *)(0x00)) & 0x0f) << 4;
  *data |= ((*(volatile unsigned char *)(0x00)) & 0x0f);
  *data |= ((*(volatile unsigned char *)(0x00)) & 0x0f) << 12;
  *data |= ((*(volatile unsigned char *)(0x00)) & 0x0f) << 8;
  *data |= ((*(volatile unsigned char *)(0x00)) & 0x0f) << 20;
  *data |= ((*(volatile unsigned char *)(0x00)) & 0x0f) << 16;
  *data |= ((*(volatile unsigned char *)(0x00)) & 0x0f) << 28;
  *data |= ((*(volatile unsigned char *)(0x00)) & 0x0f) << 24;
  OAL_RELEASE_SEMAPHORE();
  return 0;
}
```