user: Translate the below assembly code into C programming language:

```asm
<NumberIO_StrToHexInt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r13
  mov    %esi,%r13d
  push   %r12
  mov    %rdx,%r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  lea    0x1(%rsi),%eax
  mov    %rsp,%rcx
  mov    %rax,%rdx
  add    $0xf,%rax
  shr    $0x4,%rax
  shl    $0x4,%rax
  mov    %rax,%rsi
  and    $0xfffffffffffff000,%rsi
  sub    %rsi,%rcx
  cmp    %rcx,%rsp
  je     L56
L103:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L103
L56:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L48
L39:
  mov    %rdi,%rsi
  mov    %rsp,%rdi
  mov    %rsp,%rbx
  call   <memcpy@plt>
  mov    %r13d,%ecx
  mov    %rsp,%rdx
  mov    %r13d,%esi
  mov    %rsp,%rdi
  call   <StrLib_StrRemoveWhitePrefix@plt>
  mov    %r13d,%esi
  mov    %rsp,%rdi
  call   <StrLib_StrLen@plt>
  mov    %eax,%r8d
  test   %eax,%eax
  je     L157
  mov    %eax,%edi
  xor    %edx,%edx
  nopl   0x0(%rax,%rax,1)
L148:
  movsbl (%rbx,%rdx,1),%eax
  mov    %edx,%ecx
  lea    -0x30(%rax),%esi
  cmp    $0x9,%sil
  jbe    L11
  lea    -0x41(%rax),%esi
  cmp    $0x5,%sil
  jbe    L11
  add    $0x1,%rdx
  cmp    %rdx,%rdi
  jne    L148
L157:
  movl   $0x0,(%r12)
L120:
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L100
  lea    -0x18(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L11:
  movl   $0x0,(%r12)
  nopl   0x0(%rax,%rax,1)
L0:
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  ja     L144
L111:
  mov    (%r12),%edx
  shl    $0x4,%edx
  lea    -0x30(%rdx,%rax,1),%eax
  mov    %eax,(%r12)
L101:
  cmp    %r8d,%ecx
  jae    L120
  lea    0x1(%rcx),%eax
  mov    %rax,%rcx
  movsbl (%rbx,%rax,1),%eax
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  jbe    L0
  lea    -0x41(%rax),%edx
  cmp    $0x5,%dl
  ja     L120
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  jbe    L111
L144:
  lea    -0x41(%rax),%edx
  cmp    $0x5,%dl
  ja     L101
  mov    (%r12),%edx
  shl    $0x4,%edx
  lea    -0x37(%rdx,%rax,1),%eax
  mov    %eax,(%r12)
  jmp    L101
  nopw   0x0(%rax,%rax,1)
L48:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L39
L100:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void NumberIO_StrToHexInt(char *a_, unsigned int _a_high, int *x) {
  unsigned int i;
  unsigned int ok;
  unsigned int higha;
  char a[_a_high + 1];
  memcpy(a, a_, _a_high + 1);
  StrLib_StrRemoveWhitePrefix((char *)a, _a_high, (char *)a, _a_high);
  higha = StrLib_StrLen((char *)a, _a_high);
  i = 0;
  ok = (1 == 1);
  while (ok) {
    if (i < higha) {
      if (((a[i] >= '0') && (a[i] <= '9')) || ((a[i] >= 'A') && (a[i] <= 'F'))) {
        ok = (1 == 0);
      } else {
        i += 1;
      }
    } else {
      ok = (1 == 0);
    }
  }
  (*x) = 0;
  if (i < higha) {
    ok = (1 == 1);
    do {
      if ((a[i] >= '0') && (a[i] <= '9')) {
        (*x) = (0x010 * (*x)) + ((int)(((unsigned int)(a[i])) - ((unsigned int)('0'))));
      } else if ((a[i] >= 'A') && (a[i] <= 'F')) {
        (*x) = (0x010 * (*x)) + ((int)((((unsigned int)(a[i])) - ((unsigned int)('A'))) + 10));
      }
      if (i < higha) {
        i += 1;
        if (((a[i] < '0') || (a[i] > '9')) && ((a[i] < 'A') || (a[i] > 'F'))) {
          ok = (1 == 0);
        }
      } else {
        ok = (1 == 0);
      }
    } while (!(!ok));
  }
}
```