user: What is the c source code of the assembly code below:

```asm
<load_hex_table>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  movslq %edx,%r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rcx,%rbx
  sub    $0x18,%rsp
  test   %rdi,%rdi
  setne  %dil
  mov    %rcx,0x8(%rsp)
  movzbl %dil,%edi
  call   <assert@plt>
  xor    %edi,%edi
  test   %rbp,%rbp
  setne  %dil
  call   <assert@plt>
  test   %rbx,%rbx
  je     L78
  movl   $0x0,(%rbx)
L78:
  test   %r13d,%r13d
  jle    L192
  movslq %r13d,%rdx
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <memset@plt>
  jmp    L192
L19:
  add    $0x1,%r14
L192:
  movzbl (%r14),%eax
  cmp    $0x20,%al
  je     L19
  cmp    $0x9,%al
  je     L19
  mov    $0x2,%edx
  lea    D47(%rip),%rsi
  mov    %r14,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  jne    L4
  add    $0x2,%r14
L103:
  xor    %r12d,%r12d
  test   %r13d,%r13d
  jle    L225
  nopl   (%rax)
L88:
  mov    %r14,%rbx
  nopl   0x0(%rax,%rax,1)
L54:
  mov    %rbx,%r14
  movzbl (%rbx),%esi
  add    $0x1,%rbx
  cmp    $0x20,%sil
  je     L54
  cmp    $0x9,%sil
  je     L54
  test   %sil,%sil
  je     L96
  movsbl %sil,%r15d
  mov    %r15d,%edi
  call   <get_hex_digit@plt>
  cmp    $0xffffffff,%eax
  je     L99
  movzbl (%rbx),%esi
  shl    $0x4,%eax
  add    $0x2,%r14
  mov    %eax,%r15d
  test   %sil,%sil
  je     L46
  movsbl %sil,%ebx
  mov    %ebx,%edi
  call   <get_hex_digit@plt>
  cmp    $0xffffffff,%eax
  je     L83
  add    %eax,%r15d
  add    $0x1,%r12d
  add    $0x1,%rbp
  mov    %r15b,-0x1(%rbp)
  cmp    %r12d,%r13d
  jne    L88
  cs nopw 0x0(%rax,%rax,1)
L33:
  movzbl (%r14),%eax
  add    $0x1,%r14
  cmp    $0x20,%al
  je     L33
  cmp    $0x9,%al
  je     L33
  mov    %r13d,%r12d
  test   %al,%al
  jne    L219
L96:
  mov    0x8(%rsp),%rax
  mov    $0x1,%r15d
  test   %rax,%rax
  je     L8
  mov    %r12d,(%rax)
L8:
  add    $0x18,%rsp
  mov    %r15d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L4:
  cmpb   $0x22,(%r14)
  jne    L103
  mov    %r13d,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <load_char_table@plt>
  mov    0x8(%rsp),%rbx
  mov    %eax,%r15d
  test   %rbx,%rbx
  je     L8
  cmp    $0x1,%eax
  jne    L8
  movb   $0x0,-0x1(%rbp,%r13,1)
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,(%rbx)
  jmp    L8
L99:
  mov    %r15d,%esi
  lea    D14(%rip),%rdi
  xor    %eax,%eax
  xor    %r15d,%r15d
  call   <printf@plt>
  jmp    L8
L46:
  lea    D27(%rip),%rdi
  xor    %r15d,%r15d
  call   <puts@plt>
  jmp    L8
L83:
  mov    %ebx,%esi
  lea    D14(%rip),%rdi
  xor    %eax,%eax
  xor    %r15d,%r15d
  call   <printf@plt>
  jmp    L8
L225:
  jne    L96
  jmp    L33
  cs nopw 0x0(%rax,%rax,1)
L219:
  lea    D6(%rip),%rdi
  xor    %r15d,%r15d
  call   <puts@plt>
  jmp    L8
```

tool_calls: name: unpack_data
arguments: label: D47
type_infered: string
name: unpack_data
arguments: label: D14
type_infered: string
name: unpack_data
arguments: label: D27
type_infered: string
name: unpack_data
arguments: label: D6
type_infered: string

tool: D47: 0x

tool: D14: load_hex_table: invalid character '%c'


tool: D27: load_hex_table: incomplete hex byte

tool: D6: load_hex_table: too long hex value

assistant: ```c
int load_hex_table(const char *data, unsigned char *table, int maxlen, int *length) {
  int i, tmp, res;
  char c;
  assert(data != NULL);
  assert(table != NULL);
  if (length != NULL) {
    *length = 0;
  }
  for (i = 0; i < maxlen; i++) {
    table[i] = '\0';
  }
  while (*data == ' ' || *data == '\t')
    data++;
  if (strncmp(data, "0x", 2) == 0) {
    data += 2;
  } else if (*data == '"') {
    res = load_char_table(data, (char *)table, maxlen);
    if (length != NULL && res == 1) {
      table[maxlen - 1] = '\0';
      *length = strlen((char *)table);
    }
    return res;
  }
  for (i = 0; i < maxlen; i++) {
    do {
      c = *data++;
    } while (c == ' ' || c == '\t');
    if (c == '\0')
      break;
    tmp = get_hex_digit(c);
    if (tmp == -1) {
      printf("load_hex_table: invalid character '%c'\n", c);
      return 0;
    }
    res = tmp * 16;
    c = *data++;
    if (c == '\0') {
      printf("load_hex_table: incomplete hex byte\n");
      return 0;
    }
    tmp = get_hex_digit(c);
    if (tmp == -1) {
      printf("load_hex_table: invalid character '%c'\n", c);
      return 0;
    }
    res += tmp;
    table[i] = res;
  }
  if (i == maxlen) {
    do {
      c = *data++;
    } while (c == ' ' || c == '\t');
    if (c != '\0') {
      printf("load_hex_table: too long hex value\n");
      return 0;
    }
  }
  if (length != NULL) {
    *length = i;
  }
  return 1;
}
```