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

```asm
<unhex_digest>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L38
L45:
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D56(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L123
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  sub    $0x30,%eax
  shl    $0x4,%eax
  or     %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L97
L123:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L94
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  sub    $0x57,%eax
  shl    $0x4,%eax
  or     %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L97
L94:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L14
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  sub    $0x37,%eax
  shl    $0x4,%eax
  or     %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L97
L14:
  mov    $0x0,%eax
  jmp    L22
L97:
  addq   $0x1,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D56(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L88
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  sub    $0x30,%eax
  or     %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L167
L88:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D38(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L102
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  sub    $0x57,%eax
  or     %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L167
L102:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L86
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%edx
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  sub    $0x37,%eax
  or     %eax,%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  jmp    L167
L86:
  mov    $0x0,%eax
  jmp    L22
L167:
  addq   $0x1,-0x10(%rbp)
  addq   $0x1,-0x8(%rbp)
L38:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L73
  mov    -0x20(%rbp),%rax
  add    $0x10,%rax
  cmp    %rax,-0x8(%rbp)
  jb     L45
L73:
  mov    $0x1,%eax
L22:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D56
data_type: string
name: extract_symbolic_data
arguments: label: D38
data_type: string
name: extract_symbolic_data
arguments: label: D41
data_type: string

tool: D56: 0123456789

tool: D38: abcdef

tool: D41: ABCDEF

assistant: ```c
int unhex_digest(const char *from, unsigned char *to) {
  const char *p;
  unsigned char *q;
  for (p = from, q = to; *p && q < to + 16; ++q) {
    *q = 0;
    if (strchr("0123456789", *p))
      *q |= ((unsigned int)*p - '0') << 4;
    else if (strchr("abcdef", *p))
      *q |= ((unsigned int)*p - 'a' + 10) << 4;
    else if (strchr("ABCDEF", *p))
      *q |= ((unsigned int)*p - 'A' + 10) << 4;
    else
      return 0;
    ++p;
    if (strchr("0123456789", *p))
      *q |= ((unsigned int)*p - '0');
    else if (strchr("abcdef", *p))
      *q |= ((unsigned int)*p - 'a' + 10);
    else if (strchr("ABCDEF", *p))
      *q |= ((unsigned int)*p - 'A' + 10);
    else
      return 0;
    ++p;
  }
  return 1;
}
```