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

```asm
<qword_get>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L43
L226:
  addq   $0x1,-0x8(%rbp)
L43:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L226
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L189
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x78,%al
  jne    L189
  addq   $0x2,-0x8(%rbp)
  jmp    L264
L249:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L84
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  jmp    L180
L84:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <toupper@plt>
  movsbl %al,%eax
  sub    $0x37,%eax
L180:
  mov    %eax,-0x10(%rbp)
  addq   $0x1,-0x8(%rbp)
  shll   $0x4,-0x10(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L34
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  jmp    L72
L34:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <toupper@plt>
  movsbl %al,%eax
  sub    $0x37,%eax
L72:
  or     %eax,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  mov    -0x10(%rbp),%edx
  mov    %dl,(%rax)
  addq   $0x1,-0x8(%rbp)
  addl   $0x1,-0x14(%rbp)
L264:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  je     L316
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  je     L316
  mov    -0x14(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L249
  jmp    L316
L217:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x5c,%al
  jne    L31
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L31
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x37,%al
  jg     L31
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  cmp    $0x33,%al
  jg     L31
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L31
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movzbl (%rax),%eax
  cmp    $0x37,%al
  jg     L31
  mov    -0x8(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L31
  mov    -0x8(%rbp),%rax
  add    $0x3,%rax
  movzbl (%rax),%eax
  cmp    $0x37,%al
  jg     L31
  addq   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  mov    %eax,-0xc(%rbp)
  addq   $0x1,-0x8(%rbp)
  mov    -0xc(%rbp),%eax
  lea    0x0(,%rax,8),%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  or     %ecx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  lea    0x0(,%rax,8),%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  or     %ecx,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x30(%rbp)
  mov    -0xc(%rbp),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x14(%rbp)
  jmp    L189
L31:
  mov    -0x8(%rbp),%rdx
  lea    0x1(%rdx),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x30(%rbp),%rax
  lea    0x1(%rax),%rcx
  mov    %rcx,-0x30(%rbp)
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x14(%rbp)
L189:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L203
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L203
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L203
  mov    -0x34(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x14(%rbp)
  jl     L217
  jmp    L203
L316:
  nop
L203:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L165
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  je     L165
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L165
  mov    $0xffffffff,%eax
  jmp    L14
L237:
  addq   $0x1,-0x8(%rbp)
L165:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x20,%al
  je     L237
  mov    -0x28(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x14(%rbp),%eax
L14:
  leave
  ret
```

assistant: ```c
int qword_get(char **bpp, char *dest, int bufsize) {
  char *bp = *bpp;
  int len = 0;
  while (*bp == ' ')
    bp++;
  if (bp[0] == '\\' && bp[1] == 'x') {
    bp += 2;
    while (isxdigit(bp[0]) && isxdigit(bp[1]) && len < bufsize) {
      int byte = isdigit(*bp) ? *bp - '0' : toupper(*bp) - 'A' + 10;
      bp++;
      byte <<= 4;
      byte |= isdigit(*bp) ? *bp - '0' : toupper(*bp) - 'A' + 10;
      *dest++ = byte;
      bp++;
      len++;
    }
  } else {
    while (*bp != ' ' && *bp != '\n' && *bp && len < bufsize - 1) {
      if (*bp == '\\' && (isdigit(bp[1]) && bp[1] <= '7') && (bp[1] <= '3') && (isdigit(bp[2]) && bp[2] <= '7') && (isdigit(bp[3]) && bp[3] <= '7')) {
        int byte = (*++bp - '0');
        bp++;
        byte = (byte << 3) | (*bp++ - '0');
        byte = (byte << 3) | (*bp++ - '0');
        *dest++ = byte;
        len++;
      } else {
        *dest++ = *bp++;
        len++;
      }
    }
  }
  if (*bp != ' ' && *bp != '\n' && *bp != '\0')
    return -1;
  while (*bp == ' ')
    bp++;
  *bpp = bp;
  return len;
}
```