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

```asm
<ChangeTHEX2CPTR>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  movl   $0xffffffff,-0xc(%rbp)
  movl   $0x0,-0x4(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L59
  cmpq   $0x0,-0x20(%rbp)
  jne    L56
L59:
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L13
L56:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x4(%rbp)
  cmpl   $0x1,-0x4(%rbp)
  jg     L81
  lea    D25(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L13
L81:
  andl   $0xfffffffe,-0x4(%rbp)
  movl   $0x0,-0x8(%rbp)
  jmp    L1
L28:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xe(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xd(%rbp)
  mov    -0x8(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  movsbl -0xe(%rbp),%eax
  mov    %eax,%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  je     L94
  movsbl -0xd(%rbp),%eax
  mov    %eax,%edi
  call   <isxdigit@plt>
  test   %rax,%rax
  je     L94
  movsbl -0xe(%rbp),%eax
  mov    %eax,%edi
  call   <oneHexCharToHex@plt>
  mov    %al,-0xe(%rbp)
  movsbl -0xd(%rbp),%eax
  mov    %eax,%edi
  call   <oneHexCharToHex@plt>
  mov    %al,-0xd(%rbp)
  movsbl -0xe(%rbp),%eax
  shl    $0x4,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %edx,%eax
  sar    %eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rax,%rdx
  mov    %ecx,%eax
  or     -0xd(%rbp),%al
  mov    %al,(%rdx)
  addl   $0x2,-0x8(%rbp)
  jmp    L1
L94:
  movsbl -0xd(%rbp),%edx
  movsbl -0xe(%rbp),%eax
  mov    %eax,%esi
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L13
L1:
  mov    -0x8(%rbp),%eax
  cmp    -0x4(%rbp),%eax
  jl     L28
  movl   $0x0,-0xc(%rbp)
L13:
  mov    -0xc(%rbp),%eax
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D20
datatype: string
name: disassemble_data
arguments: data_label: D25
datatype: string
name: disassemble_data
arguments: data_label: D5
datatype: string

tool: D20: error: inHexString or outHex is null!

tool: D25: error: strlen(inHexString) <= 1!

tool: D5: error: %c or %c is not hex digit!


assistant: ```c
int ChangeTHEX2CPTR(const char *inHexString, char *outHex) {
  int success = -1;
  int len = 0;
  int i;
  char ch1, ch2;
  do {
    if (NULL == inHexString || NULL == outHex) {
      printf("error: inHexString or outHex is null!\n");
      break;
    }
    len = strlen(inHexString);
    if (len <= 1) {
      printf("error: strlen(inHexString) <= 1!\n");
      break;
    }
    len &= ~1;
    for (i = 0; i < len; i += 2) {
      ch1 = inHexString[i];
      ch2 = inHexString[i + 1];
      outHex[i / 2 + 1] = 0;
      if (isxdigit(ch1) && isxdigit(ch2)) {
        ch1 = oneHexCharToHex(ch1);
        ch2 = oneHexCharToHex(ch2);
        outHex[i / 2] = (ch1 << 4) | ch2;
      } else {
        printf("error: %c or %c is not hex digit!\n", ch1, ch2);
        goto exit;
      }
    }
    success = 0;
  } while (0);
exit:
  return success;
}
```