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

```asm
<bit_entry_8>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  movl   $0x0,-0x4(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L74
  mov    $0x0,%eax
  jmp    L35
L74:
  cmpl   $0x40,-0x1c(%rbp)
  jg     L177
  cmpl   $0x0,-0x1c(%rbp)
  jg     L142
L177:
  mov    $0x0,%eax
  jmp    L35
L142:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x4(%rbp)
  mov    -0x1c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x8(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L93
L179:
  mov    -0xc(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x7b,%al
  je     L204
  mov    -0xc(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x7d,%al
  je     L204
  mov    -0xc(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L204
  mov    -0xc(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  je     L204
  mov    -0xc(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x30,%al
  jne    L159
  mov    -0x28(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%ecx
  shl    %cl,%esi
  mov    %esi,%eax
  not    %eax
  and    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%ecx
  shl    %cl,%esi
  mov    %esi,%eax
  or     %eax,%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  subl   $0x1,-0x8(%rbp)
  jmp    L204
L159:
  mov    -0xc(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x31,%al
  jne    L129
  mov    -0x28(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%ecx
  shl    %cl,%esi
  mov    %esi,%eax
  or     %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%ecx
  shl    %cl,%esi
  mov    %esi,%eax
  or     %eax,%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  subl   $0x1,-0x8(%rbp)
  jmp    L204
L129:
  mov    -0xc(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  je     L101
  mov    -0xc(%rbp),%edx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L54
L101:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%ecx
  shl    %cl,%esi
  mov    %esi,%eax
  not    %eax
  and    %eax,%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%edx
  mov    -0x8(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%ecx
  shl    %cl,%esi
  mov    %esi,%eax
  not    %eax
  and    %eax,%edx
  mov    -0x30(%rbp),%rax
  mov    %edx,(%rax)
  subl   $0x1,-0x8(%rbp)
  jmp    L204
L54:
  mov    $0x0,%eax
  jmp    L35
L204:
  addl   $0x1,-0xc(%rbp)
L93:
  mov    -0xc(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jb     L179
  cmpl   $0xffffffff,-0x8(%rbp)
  je     L24
  mov    $0x0,%eax
  jmp    L35
L24:
  mov    $0x1,%eax
L35:
  leave
  ret
```

assistant: ```c
int bit_entry_8(const char *token, int bits, uint8_t *data, uint8_t *mask) {
  do {
    unsigned int count = 0;
    unsigned int index;
    int buf_index;
    if (token == NULL)
      return 0;
    if ((bits > 64) || (bits < 1))
      return 0;
    count = strlen(token);
    buf_index = bits - 1;
    for (index = 0; index < count; index++) {
      if ((token[index] == '{') || (token[index] == '}')) {
      } else if ((token[index] == ' ') || (token[index] == '\t')) {
      } else if (token[index] == '0') {
        *data &= ~(1 << buf_index);
        *mask |= (1 << buf_index);
        buf_index--;
      } else if (token[index] == '1') {
        *data |= (1 << buf_index);
        *mask |= (1 << buf_index);
        buf_index--;
      } else if ((token[index] == '-') || (token[index] == '*')) {
        *data &= ~(1 << buf_index);
        *mask &= ~(1 << buf_index);
        buf_index--;
      } else {
        return 0;
      };
    };
    if (buf_index != -1)
      return 0;
    return 1;
  } while (0);
  ;
}
```