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

```asm
<IPCLiteCtoMDataWrite_Protected>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  nop
L0:
  mov    $0x400fb704,%eax
  mov    (%rax),%rax
  and    -0x28(%rbp),%rax
  test   %rax,%rax
  je     L0
  mov    $0x400fb980,%eax
  mov    (%rax),%rax
  mov    %rax,-0x18(%rbp)
  mov    $0x400fb980,%eax
  mov    $0xa5a5a5a5,%esi
  mov    %rsi,(%rax)
  mov    $0x400fb720,%eax
  mov    (%rax),%rax
  cmp    $0xd,%rax
  jne    L28
  mov    $0x400fb724,%eax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    $0x400fb728,%eax
  mov    (%rax),%rax
  mov    %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dx,(%rax)
  mov    -0x8(%rbp),%rax
  movzwl (%rax),%eax
  mov    $0x400fb72c,%edx
  movzwl %ax,%eax
  mov    %rax,(%rdx)
  mov    $0x400fb700,%eax
  mov    (%rax),%rcx
  mov    -0x30(%rbp),%rax
  or     -0x28(%rbp),%rax
  mov    $0x400fb700,%edx
  or     %rcx,%rax
  mov    %rax,(%rdx)
  jmp    L46
L28:
  mov    $0x400fb720,%eax
  mov    (%rax),%rax
  cmp    $0xe,%rax
  jne    L31
  mov    $0x400fb724,%eax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    $0x400fb728,%eax
  mov    (%rax),%rdx
  mov    -0x10(%rbp),%rax
  mov    %rdx,(%rax)
  mov    $0x400fb72c,%edx
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,(%rdx)
  mov    $0x400fb700,%eax
  mov    (%rax),%rcx
  mov    -0x30(%rbp),%rax
  or     -0x28(%rbp),%rax
  mov    $0x400fb700,%edx
  or     %rcx,%rax
  mov    %rax,(%rdx)
  jmp    L46
L31:
  mov    $0x400fb700,%eax
  mov    (%rax),%rax
  mov    $0x400fb700,%edx
  or     -0x28(%rbp),%rax
  mov    %rax,(%rdx)
L46:
  mov    $0x400fb980,%edx
  mov    -0x18(%rbp),%rax
  mov    %rax,(%rdx)
  nop
  pop    %rbp
  ret
```

assistant: ```c
void IPCLiteCtoMDataWrite_Protected(unsigned long ulFlag, unsigned long ulStatusFlag) {
  unsigned long *pulAddress;
  unsigned short *pusAddress;
  unsigned long ulWRALLOWtemp;
  while (!((*((volatile unsigned long *)(0x400FB700 + 0x000000004))) & ulFlag)) {
  }
  ulWRALLOWtemp = (*((volatile unsigned long *)(0x400FB980)));
  (*((volatile unsigned long *)(0x400FB980))) = 0xA5A5A5A5;
  if ((*((volatile unsigned long *)(0x400FB700 + 0x000000020))) == 0x0000000D) {
    pusAddress = (unsigned short *)(*((volatile unsigned long *)(0x400FB700 + 0x000000024)));
    *pusAddress = (unsigned short)(*((volatile unsigned long *)(0x400FB700 + 0x000000028)));
    (*((volatile unsigned long *)(0x400FB700 + 0x00000002C))) = (unsigned long)*pusAddress;
    (*((volatile unsigned long *)(0x400FB700 + 0x000000000))) |= (ulStatusFlag | ulFlag);
  } else if (((*((volatile unsigned long *)(0x400FB700 + 0x000000020))) == 0x0000000E)) {
    pulAddress = (unsigned long *)(*((volatile unsigned long *)(0x400FB700 + 0x000000024)));
    *pulAddress = (*((volatile unsigned long *)(0x400FB700 + 0x000000028)));
    (*((volatile unsigned long *)(0x400FB700 + 0x00000002C))) = *pulAddress;
    (*((volatile unsigned long *)(0x400FB700 + 0x000000000))) |= (ulStatusFlag | ulFlag);
  } else {
    (*((volatile unsigned long *)(0x400FB700 + 0x000000000))) |= (ulFlag);
  }
  (*((volatile unsigned long *)(0x400FB980))) = ulWRALLOWtemp;
}
```