user: Please show me the C implementation that matches the assembly code listed below:

```asm
<HexToBytes>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  mov    $0x2,%edi
  call   <malloc@plt>
  mov    %rax,%r13
  mov    %rbp,%rdi
  call   <strlen@plt>
  movslq %eax,%rdi
  shr    %rdi
  add    $0x1,%edi
  call   <malloc@plt>
  mov    %rax,%r15
  mov    $0x0,%ebx
  lea    D10(%rip),%r14
  jmp    L152
  mov    $0x6e,%ecx
  jmp    L85
  lea    (%rdx,%rdx,4),%ecx
  add    %ecx,%ecx
L85:
  sub    $0x30,%eax
  cmp    $0x36,%al
  ja     L62
  movzbl %al,%eax
  lea    D16(%rip),%rsi
  movslq (%rsi,%rax,4),%rax
  add    %rsi,%rax
  notrack jmp *%rax
  mov    $0x78,%ecx
  jmp    L85
  mov    $0x82,%ecx
  jmp    L85
  mov    $0x8c,%ecx
  jmp    L85
  mov    $0x96,%ecx
  jmp    L85
L176:
  mov    $0x0,%ecx
  jmp    L85
  mov    $0x64,%ecx
  jmp    L85
  mov    $0xb,%edx
L10:
  mov    %r12d,%eax
  shr    $0x1f,%eax
  add    %r12d,%eax
  sar    %eax
  cltq
  add    %ecx,%edx
  mov    %dl,(%r15,%rax,1)
  add    $0x2,%rbx
L152:
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    %ebx,%eax
  jle    L18
  movzbl 0x0(%rbp,%rbx,1),%eax
  mov    %al,0x0(%r13)
  lea    0x1(%rbx),%r12d
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    $0x30,%eax
  cmp    %r12d,%edx
  je     L121
  movzbl 0x1(%rbp,%rbx,1),%eax
L121:
  mov    %al,0x1(%r13)
  movzbl 0x0(%r13),%eax
  movsbl %al,%edx
  lea    -0x30(%rax),%ecx
  cmp    $0x36,%cl
  ja     L176
  movzbl %cl,%ecx
  movslq (%r14,%rcx,4),%rcx
  add    %r14,%rcx
  notrack jmp *%rcx
  mov    $0xc,%edx
  jmp    L10
  mov    $0xd,%edx
  jmp    L10
  mov    $0xe,%edx
  jmp    L10
  mov    $0xf,%edx
  jmp    L10
L62:
  mov    $0x0,%edx
  jmp    L10
  mov    $0xa,%edx
  jmp    L10
L18:
  mov    %r13,%rdi
  call   <free@plt>
  mov    %r15,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
char *HexToBytes(char *inputStr) {
  char *miniChunk = (char *)malloc(sizeof(char) * 2);
  unsigned char *maxiChunk = (char *)malloc(sizeof(char) * strlen(inputStr) / 2 + 1);
  int tens, ones;
  for (int i = 0; i < strlen(inputStr); i++) {
    miniChunk[0] = inputStr[i];
    i++;
    if (i == strlen(inputStr)) {
      miniChunk[1] = '0';
    } else {
      miniChunk[1] = inputStr[i];
    }
    switch (miniChunk[0]) {
    case '0':
    case '1':
    case '2':
    case '3':
    case '4':
    case '5':
    case '6':
    case '7':
    case '9':
      tens = 10 * (int)miniChunk[0];
      break;
    case 'A':
    case 'a':
      tens = 100;
      break;
    case 'B':
    case 'b':
      tens = 110;
      break;
    case 'C':
    case 'c':
      tens = 120;
      break;
    case 'D':
    case 'd':
      tens = 130;
      break;
    case 'E':
    case 'e':
      tens = 140;
      break;
    case 'F':
    case 'f':
      tens = 150;
      break;
    default:
      tens = 0;
      break;
    }
    switch (miniChunk[0]) {
    case '0':
    case '1':
    case '2':
    case '3':
    case '4':
    case '5':
    case '6':
    case '7':
    case '9':
      ones = (int)miniChunk[0];
      break;
    case 'A':
    case 'a':
      ones = 10;
      break;
    case 'B':
    case 'b':
      ones = 11;
      break;
    case 'C':
    case 'c':
      ones = 12;
      break;
    case 'D':
    case 'd':
      ones = 13;
      break;
    case 'E':
    case 'e':
      ones = 14;
      break;
    case 'F':
    case 'f':
      ones = 15;
      break;
    default:
      ones = 0;
      break;
    }
    maxiChunk[i / 2] = (unsigned char)(ones + tens);
  }
  free(miniChunk);
  return maxiChunk;
}
```