user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<qword_get>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r15
  mov    %edx,%r14d
  mov    (%rdi),%rbx
  movzbl (%rbx),%eax
  cmp    $0x20,%al
  jne    L189
L114:
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  cmp    $0x20,%al
  je     L114
L189:
  cmp    $0x5c,%al
  je     L235
L100:
  movzbl (%rbx),%eax
  test   $0xdf,%al
  je     L176
  cmp    $0xa,%al
  je     L176
  sub    $0x1,%r14d
  lea    0x1(%rsi),%rbp
  mov    $0x1,%r12d
  test   %r14d,%r14d
  jg     L67
L270:
  mov    $0xffffffff,%r13d
  jmp    L93
L235:
  cmpb   $0x78,0x1(%rbx)
  jne    L100
  add    $0x2,%rbx
  mov    %rsi,%rbp
  mov    $0x0,%r13d
  jmp    L70
L148:
  movsbl (%rbx),%edi
  call   <toupper@plt>
  movsbl %al,%r12d
  sub    $0x37,%r12d
  jmp    L197
L138:
  movsbl 0x1(%rbx),%edi
  call   <toupper@plt>
  movsbl %al,%eax
  sub    $0x37,%eax
L122:
  or     %r12d,%eax
  mov    %al,0x0(%rbp)
  add    $0x2,%rbx
  add    $0x1,%r13d
  add    $0x1,%rbp
L70:
  movsbl (%rbx),%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  je     L178
  movsbl 0x1(%rbx),%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  je     L178
  cmp    %r14d,%r13d
  jge    L178
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L148
  movsbl (%rbx),%r12d
  sub    $0x30,%r12d
L197:
  shl    $0x4,%r12d
  movsbl 0x1(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L138
  movsbl 0x1(%rbx),%eax
  sub    $0x30,%eax
  jmp    L122
L209:
  movzbl (%rbx),%eax
  mov    %r12d,%r13d
  lea    0x1(%rbx),%rbx
L300:
  mov    %al,-0x1(%rbp)
  movzbl (%rbx),%eax
  test   $0xdf,%al
  je     L213
  cmp    $0xa,%al
  je     L213
  add    $0x1,%rbp
  add    $0x1,%r12d
  cmp    %r14d,%r13d
  jge    L270
L67:
  cmp    $0x5c,%al
  jne    L209
  movsbl 0x1(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L209
  cmpb   $0x33,0x1(%rbx)
  jg     L209
  movsbl 0x2(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L209
  cmpb   $0x37,0x2(%rbx)
  jg     L209
  movsbl 0x3(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L209
  movzbl 0x3(%rbx),%eax
  cmp    $0x37,%al
  jg     L209
  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
  sub    $0x30,%eax
  or     %edx,%eax
  mov    %r12d,%r13d
  jmp    L300
L178:
  movzbl (%rbx),%eax
  test   $0xdf,%al
  je     L318
  cmp    $0xa,%al
  je     L318
  mov    $0xffffffff,%r13d
  jmp    L93
L176:
  mov    $0x0,%r13d
L213:
  movzbl (%rbx),%eax
L318:
  cmp    $0x20,%al
  jne    L37
L167:
  add    $0x1,%rbx
  cmpb   $0x20,(%rbx)
  je     L167
L37:
  mov    %rbx,(%r15)
L93:
  mov    %r13d,%eax
  add    $0x8,%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;
  return len;
}
```