user: Translate the below assembly code into C programming language:

```asm
<qword_get>:
  endbr64
  push   %r15
  push   %r14
  mov    %edx,%r14d
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    (%rdi),%rbx
  movzbl (%rbx),%eax
  cmp    $0x20,%al
  jne    L18
  nopl   (%rax)
L131:
  movzbl 0x1(%rbx),%eax
  add    $0x1,%rbx
  cmp    $0x20,%al
  je     L131
L18:
  cmp    $0x5c,%al
  je     L62
L135:
  movzbl (%rbx),%eax
  test   $0xdf,%al
  je     L45
  cmp    $0xa,%al
  je     L45
  sub    $0x1,%r14d
  xor    %r12d,%r12d
  test   %r14d,%r14d
  jg     L272
  jmp    L92
L241:
  movzbl (%rbx),%eax
  add    $0x1,%rbx
L136:
  mov    %al,0x0(%rbp)
  movzbl (%rbx),%eax
  test   $0xdf,%al
  je     L118
  cmp    $0xa,%al
  je     L118
  add    $0x1,%rbp
  cmp    %r12d,%r14d
  je     L92
L272:
  add    $0x1,%r12d
  cmp    $0x5c,%al
  jne    L241
  movsbl 0x1(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L241
  cmpb   $0x33,0x1(%rbx)
  jg     L241
  movsbl 0x2(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L241
  cmpb   $0x37,0x2(%rbx)
  jg     L241
  movsbl 0x3(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L241
  movzbl 0x3(%rbx),%eax
  cmp    $0x37,%al
  jg     L241
  movsbl 0x1(%rbx),%edx
  sub    $0x30,%eax
  add    $0x4,%rbx
  lea    -0x180(,%rdx,8),%ecx
  movsbl -0x2(%rbx),%edx
  sub    $0x30,%edx
  or     %ecx,%edx
  shl    $0x3,%edx
  or     %edx,%eax
  jmp    L136
  nopl   (%rax)
L180:
  movzbl (%rbx),%eax
  test   $0xdf,%al
  je     L118
  cmp    $0xa,%al
  jne    L92
  nopw   0x0(%rax,%rax,1)
L118:
  cmp    $0x20,%al
  jne    L83
  nopl   0x0(%rax)
L49:
  add    $0x1,%rbx
  cmpb   $0x20,(%rbx)
  je     L49
L83:
  mov    %rbx,0x0(%r13)
L161:
  add    $0x8,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L62:
  cmpb   $0x78,0x1(%rbx)
  jne    L135
  add    $0x2,%rbx
  xor    %r12d,%r12d
  jmp    L264
  nopl   0x0(%rax,%rax,1)
L102:
  movsbl (%rbx),%r15d
  sub    $0x30,%r15d
L199:
  movsbl 0x1(%rbx),%edi
  shl    $0x4,%r15d
  call   <isdigit@plt>
  test   %rax,%rax
  je     L156
  movsbl 0x1(%rbx),%eax
  sub    $0x30,%eax
L253:
  or     %r15d,%eax
  add    $0x2,%rbx
  add    $0x1,%r12d
  add    $0x1,%rbp
  mov    %al,-0x1(%rbp)
L264:
  movsbl (%rbx),%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  je     L180
  movsbl 0x1(%rbx),%edi
  call   <isxdigit@plt>
  cmp    %r14d,%r12d
  jge    L180
  test   %rax,%rax
  je     L180
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L102
  movsbl (%rbx),%edi
  call   <toupper@plt>
  movsbl %al,%r15d
  sub    $0x37,%r15d
  jmp    L199
  cs nopw 0x0(%rax,%rax,1)
L156:
  movsbl 0x1(%rbx),%edi
  call   <toupper@plt>
  movsbl %al,%eax
  sub    $0x37,%eax
  jmp    L253
L45:
  xor    %r12d,%r12d
  jmp    L118
  nopl   0x0(%rax)
L92:
  mov    $0xffffffff,%r12d
  jmp    L161
```

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;
}
```