user: Converte this assembly snippet into its equivalent C code:

```asm
<HexToBytes>:
  endbr64
  push   %r15
  xor    %r15d,%r15d
  push   %r14
  mov    %rdi,%r14
  mov    $0x2,%edi
  push   %r13
  lea    D19(%rip),%r13
  push   %r12
  lea    D4(%rip),%r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  call   <malloc@plt>
  mov    %r14,%rdi
  mov    %rax,%rbp
  call   <strlen@plt>
  movslq %eax,%rdi
  shr    %rdi
  add    $0x1,%edi
  call   <malloc@plt>
  mov    %r14,%rdi
  mov    %rax,0x8(%rsp)
  call   <strlen@plt>
  cmp    %r15d,%eax
  jle    L67
  nop
L102:
  movzbl (%r14,%r15,1),%eax
  mov    %r14,%rdi
  lea    0x1(%r15),%ebx
  mov    %al,0x0(%rbp)
  call   <strlen@plt>
  mov    %eax,%r8d
  mov    $0x30,%eax
  cmp    %ebx,%r8d
  je     L37
  movzbl 0x1(%r14,%r15,1),%eax
L37:
  movsbl 0x0(%rbp),%esi
  mov    %al,0x1(%rbp)
  lea    -0x30(%rsi),%ecx
  mov    %esi,%eax
  cmp    $0x36,%cl
  ja     L178
  movzbl %cl,%ecx
  movslq 0x0(%r13,%rcx,4),%rcx
  add    %r13,%rcx
  notrack jmp *%rcx
  cs nopw 0x0(%rax,%rax,1)
L178:
  xor    %esi,%esi
  nopw   0x0(%rax,%rax,1)
L132:
  lea    -0x30(%rax),%ecx
  cmp    $0x36,%cl
  ja     L48
  movzbl %cl,%ecx
  movslq (%r12,%rcx,4),%rcx
  add    %r12,%rcx
  notrack jmp *%rcx
  nopl   (%rax)
  add    $0xa,%esi
  nopl   0x0(%rax,%rax,1)
L48:
  sar    %ebx
  mov    0x8(%rsp),%rax
  mov    %r14,%rdi
  add    $0x2,%r15
  movslq %ebx,%rbx
  mov    %sil,(%rax,%rbx,1)
  call   <strlen@plt>
  cmp    %r15d,%eax
  jg     L102
L67:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
  lea    (%rsi,%rsi,4),%esi
  add    %esi,%esi
  jmp    L132
  nopw   0x0(%rax,%rax,1)
  add    %eax,%esi
  jmp    L48
  nopl   0x0(%rax)
  add    $0xc,%esi
  jmp    L48
  nopl   (%rax)
  add    $0xb,%esi
  jmp    L48
  nopl   (%rax)
  add    $0xf,%esi
  jmp    L48
  nopl   (%rax)
  mov    $0x78,%esi
  jmp    L132
  nopw   0x0(%rax,%rax,1)
  mov    $0xffffff8c,%esi
  jmp    L132
  nopw   0x0(%rax,%rax,1)
  mov    $0xffffff82,%esi
  jmp    L132
  nopw   0x0(%rax,%rax,1)
  mov    $0xffffff96,%esi
  jmp    L132
  nopw   0x0(%rax,%rax,1)
  add    $0xe,%esi
  jmp    L48
  nopl   0x0(%rax,%rax,1)
  add    $0xd,%esi
  jmp    L48
  nopl   0x0(%rax,%rax,1)
  mov    $0x64,%esi
  jmp    L132
  nopw   0x0(%rax,%rax,1)
  mov    $0x6e,%esi
  jmp    L132
```

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;
}
```