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

```asm
<send_cmd_fast>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  movb   $0x0,-0x9(%rbp)
  mov    $0xc000a044,%eax
  mov    (%rax),%edx
  mov    $0xc000a044,%eax
  or     $0x2,%edx
  mov    %edx,(%rax)
  movl   $0x0,-0x8(%rbp)
  jmp    L26
L57:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xa(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L71
L60:
  mov    $0xc000a040,%eax
  mov    (%rax),%edx
  mov    $0xc000a040,%eax
  and    $0xfffffffe,%edx
  mov    %edx,(%rax)
  nop
  movzbl -0xa(%rbp),%eax
  test   %al,%al
  jns    L20
  mov    $0xc000a040,%eax
  mov    (%rax),%edx
  mov    $0xc000a040,%eax
  or     $0x2,%edx
  mov    %edx,(%rax)
  jmp    L16
L20:
  mov    $0xc000a040,%eax
  mov    (%rax),%edx
  mov    $0xc000a040,%eax
  and    $0xfffffffd,%edx
  mov    %edx,(%rax)
L16:
  shlb   -0x9(%rbp)
  nop
  mov    $0xc000a040,%eax
  mov    (%rax),%edx
  mov    $0xc000a040,%eax
  or     $0x1,%edx
  mov    %edx,(%rax)
  movzbl -0x9(%rbp),%eax
  xor    -0xa(%rbp),%al
  test   %al,%al
  jns    L37
  xorb   $0x9,-0x9(%rbp)
L37:
  shlb   -0xa(%rbp)
  addl   $0x1,-0x4(%rbp)
L71:
  cmpl   $0x7,-0x4(%rbp)
  jle    L60
  andb   $0x7f,-0x9(%rbp)
  addl   $0x1,-0x8(%rbp)
L26:
  cmpl   $0x4,-0x8(%rbp)
  jle    L57
  movzbl -0x9(%rbp),%eax
  add    %eax,%eax
  or     $0x1,%eax
  mov    %al,-0x9(%rbp)
  movzbl -0x9(%rbp),%eax
  mov    %al,-0xa(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L97
L104:
  mov    $0xc000a040,%eax
  mov    (%rax),%edx
  mov    $0xc000a040,%eax
  and    $0xfffffffe,%edx
  mov    %edx,(%rax)
  nop
  movzbl -0x9(%rbp),%eax
  test   %al,%al
  jns    L50
  mov    $0xc000a040,%eax
  mov    (%rax),%edx
  mov    $0xc000a040,%eax
  or     $0x2,%edx
  mov    %edx,(%rax)
  jmp    L67
L50:
  mov    $0xc000a040,%eax
  mov    (%rax),%edx
  mov    $0xc000a040,%eax
  and    $0xfffffffd,%edx
  mov    %edx,(%rax)
L67:
  nop
  mov    $0xc000a040,%eax
  mov    (%rax),%edx
  mov    $0xc000a040,%eax
  or     $0x1,%edx
  mov    %edx,(%rax)
  shlb   -0x9(%rbp)
  addl   $0x1,-0x4(%rbp)
L97:
  cmpl   $0x7,-0x4(%rbp)
  jle    L104
  movzbl -0xa(%rbp),%eax
  pop    %rbp
  ret
```

assistant: ```c
unsigned char send_cmd_fast(unsigned char *in) {
  int i, j;
  unsigned char b, crc = 0;
  *((unsigned int *)0xC000A044) |= (1 << 1);
  for (i = 0; i < 5; i++) {
    b = in[i];
    for (j = 0; j < 8; j++) {
      do {
        *((unsigned int *)0xC000A040) &= ~(1 << 0);
        asm volatile("nop");
      } while (0);
      if (b & 0x80)
        *((unsigned int *)0xC000A040) |= (1 << 1);
      else
        *((unsigned int *)0xC000A040) &= ~(1 << 1);
      crc <<= 1;
      do {
        asm volatile("nop");
        *((unsigned int *)0xC000A040) |= (1 << 0);
      } while (0);
      if ((crc ^ b) & 0x80)
        crc ^= 0x09;
      b <<= 1;
    }
    crc &= 0x7f;
  }
  crc = ((crc << 1) | 0x01);
  b = crc;
  for (j = 0; j < 8; j++) {
    do {
      *((unsigned int *)0xC000A040) &= ~(1 << 0);
      asm volatile("nop");
    } while (0);
    if (crc & 0x80)
      *((unsigned int *)0xC000A040) |= (1 << 1);
    else
      *((unsigned int *)0xC000A040) &= ~(1 << 1);
    do {
      asm volatile("nop");
      *((unsigned int *)0xC000A040) |= (1 << 0);
    } while (0);
    crc <<= 1;
  }
  return b;
}
```