user: 请从给定的汇编指令推导出C源代码:

```asm
<qword_get>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rsi,%r14
  mov    %edx,%r15d
  mov    (%rdi),%rbx
  movzbl (%rbx),%eax
  cmp    $0x20,%al
  jne    L200
L123:
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  cmp    $0x20,%al
  je     L123
L200:
  cmp    $0x5c,%al
  je     L318
L274:
  movzbl (%rbx),%eax
  test   $0xdf,%al
  je     L285
  cmp    $0xa,%al
  je     L285
  sub    $0x1,%r15d
  lea    0x1(%r14),%rbp
  mov    $0x1,%r12d
  test   %r15d,%r15d
  jg     L171
L312:
  mov    $0xffffffff,%r13d
  jmp    L181
L318:
  cmpb   $0x78,0x1(%rbx)
  jne    L274
  add    $0x2,%rbx
  mov    $0x0,%r13d
  jmp    L166
L98:
  movsbl (%rbx),%edi
  call   <toupper@plt>
  movsbl %al,%ebp
  sub    $0x37,%ebp
  jmp    L314
L110:
  movsbl 0x1(%rbx),%edi
  call   <toupper@plt>
  movsbl %al,%eax
  sub    $0x37,%eax
L132:
  add    $0x1,%r14
  or     %ebp,%eax
  mov    %al,-0x1(%r14)
  add    $0x2,%rbx
  add    $0x1,%r13d
L166:
  movsbl (%rbx),%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  je     L29
  movsbl 0x1(%rbx),%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  je     L29
  cmp    %r15d,%r13d
  jge    L29
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L98
  movsbl (%rbx),%ebp
  sub    $0x30,%ebp
L314:
  shl    $0x4,%ebp
  movsbl 0x1(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L110
  movsbl 0x1(%rbx),%eax
  sub    $0x30,%eax
  jmp    L132
L218:
  mov    %rbp,%r14
  movzbl (%rbx),%eax
  mov    %r12d,%r13d
  lea    0x1(%rbx),%rbx
L298:
  mov    %al,-0x1(%rbp)
  movzbl (%rbx),%eax
  test   $0xdf,%al
  je     L263
  cmp    $0xa,%al
  je     L263
  add    $0x1,%rbp
  add    $0x1,%r12d
  cmp    %r15d,%r13d
  jge    L312
L171:
  cmp    $0x5c,%al
  jne    L218
  movsbl 0x1(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L218
  cmpb   $0x33,0x1(%rbx)
  jg     L218
  movsbl 0x2(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L218
  cmpb   $0x37,0x2(%rbx)
  jg     L218
  movsbl 0x3(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L218
  movzbl 0x3(%rbx),%eax
  cmp    $0x37,%al
  jg     L218
  movsbl 0x1(%rbx),%edx
  lea    -0x180(,%rdx,8),%ecx
  movsbl 0x2(%rbx),%edx
  sub    $0x30,%edx
  or     %ecx,%edx
  shl    $0x3,%edx
  add    $0x4,%rbx
  mov    %rbp,%r14
  sub    $0x30,%eax
  or     %edx,%eax
  mov    %r12d,%r13d
  jmp    L298
L29:
  movzbl (%rbx),%eax
  test   $0xdf,%al
  je     L145
  cmp    $0xa,%al
  je     L145
  mov    $0xffffffff,%r13d
  jmp    L181
L285:
  mov    $0x0,%r13d
L263:
  movzbl (%rbx),%eax
L145:
  cmp    $0x20,%al
  jne    L35
L80:
  add    $0x1,%rbx
  cmpb   $0x20,(%rbx)
  je     L80
L35:
  mov    0x8(%rsp),%rax
  mov    %rbx,(%rax)
  movb   $0x0,(%r14)
L181:
  mov    %r13d,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  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;
  *dest = '\0';
  return len;
}
```