user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<parse_char_code_common>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x18,%rsp
  mov    (%rdi),%rbp
  mov    %ecx,0x8(%rsp)
  movsbl 0x1(%rbp),%r14d
  movsbl 0x0(%rbp),%r15d
  mov    %r14d,%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  jne    L67
  add    $0x1,%rbp
L0:
  xor    %r14d,%r14d
  test   %rbx,%rbx
  je     L82
  cmpb   $0x7e,0x0(%rbp)
  je     L215
L82:
  cmp    $0x20,%r12b
  je     L45
L35:
  test   %r12b,%r12b
  jne    L226
L175:
  mov    %r15d,%eax
  not    %eax
  shr    $0x1f,%eax
L6:
  test   %r14d,%r14d
  js     L178
  test   %al,%al
  je     L178
  mov    %rbp,0x0(%r13)
L178:
  test   %rbx,%rbx
  je     L25
  mov    %r14d,(%rbx)
L25:
  add    $0x18,%rsp
  mov    %r15d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L226:
  cmp    %r12b,0x0(%rbp)
  jne    L194
  add    $0x1,%rbp
  jmp    L175
L215:
  movsbl 0x2(%rbp),%esi
  movsbl 0x1(%rbp),%r14d
  mov    %esi,%edi
  mov    %esi,0xc(%rsp)
  call   <isxdigit@plt>
  mov    0xc(%rsp),%esi
  test   %rax,%rax
  jne    L179
  add    $0x2,%rbp
  cmp    $0x20,%r12b
  jne    L35
L45:
  movsbl 0x0(%rbp),%edi
  test   %dil,%dil
  je     L47
  call   <isspace@plt>
  test   %eax,%eax
  jne    L47
  xor    %r15d,%r15d
  mov    $0x1,%eax
  jmp    L6
  nopw   0x0(%rax,%rax,1)
L47:
  mov    %rbp,%rdi
  call   <skip_whitespace@plt>
  mov    %rax,%rbp
  mov    %r15d,%eax
  not    %eax
  shr    $0x1f,%eax
  jmp    L6
  nopl   0x0(%rax,%rax,1)
L67:
  mov    %r15d,%edi
  add    $0x2,%rbp
  call   <isxdigit@plt>
  test   %rax,%rax
  jne    L118
  mov    $0xffffffff,%r15d
  jmp    L0
  nopl   0x0(%rax)
L118:
  mov    %r15d,%edi
  mov    %r14d,%esi
  call   <two_char_as_hex@plt>
  mov    %eax,%r15d
  mov    0x8(%rsp),%eax
  or     %r15d,%eax
  mov    $0xffffffff,%eax
  cmove  %eax,%r15d
  jmp    L0
  nopl   0x0(%rax,%rax,1)
L179:
  mov    %r14d,%edi
  mov    %esi,0xc(%rsp)
  add    $0x3,%rbp
  call   <isxdigit@plt>
  mov    0xc(%rsp),%esi
  test   %rax,%rax
  jne    L136
  mov    $0xffffffff,%r14d
  jmp    L82
  nopl   0x0(%rax)
L194:
  mov    $0xffffffff,%r15d
  jmp    L178
L136:
  mov    %r14d,%edi
  call   <two_char_as_hex@plt>
  mov    %eax,%r14d
  mov    0x8(%rsp),%eax
  or     %r14d,%eax
  mov    $0xffffffff,%eax
  cmove  %eax,%r14d
  jmp    L82
```

assistant: ```c
int parse_char_code_common(char **_s, int *comp, char terminator, int zeroOk) {
  char *s = *_s;
  int cc, cc2;
  char follower;
  cc = *(s++);
  follower = *s;
  if (isxdigit(follower)) {
    s++;
    if (isxdigit(cc))
      cc = two_char_as_hex(cc, follower);
    else
      cc = -1;
    if ((!zeroOk) && (cc == 0))
      cc = -1;
  }
  cc2 = 0;
  if ((comp != NULL) && (*s != '~'))
    ;
  else if ((comp != NULL) && (*s == '~')) {
    s++;
    cc2 = *(s++);
    follower = *s;
    if (isxdigit(follower)) {
      s++;
      if (isxdigit(cc2))
        cc2 = two_char_as_hex(cc2, follower);
      else
        cc2 = -1;
      if ((!zeroOk) && (cc2 == 0))
        cc2 = -1;
    }
  }
  if (terminator == ' ') {
    if ((*s != 0) && (!isspace(*s)))
      cc = 0;
    else
      s = skip_whitespace(s);
  } else if (terminator != 0) {
    if (*s != terminator)
      cc = -1;
    else
      s++;
  }
  if ((cc >= 0) && (cc2 >= 0))
    *_s = s;
  if (comp != NULL)
    *comp = cc2;
  return cc;
}
```