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

```asm
<uCharToHex>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    %edx,-0x24(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L197
  cmpq   $0x0,-0x20(%rbp)
  jne    L244
L197:
  mov    $0xffffffff,%eax
  jmp    L222
L244:
  movl   $0x0,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  jmp    L236
L108:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  ja     L8
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0xa(%rbp)
  jmp    L201
L8:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jbe    L208
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  ja     L208
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  sub    $0x30,%eax
  mov    %al,-0xa(%rbp)
  jmp    L201
L208:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x60,%al
  jbe    L83
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x66,%al
  ja     L83
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  sub    $0x57,%eax
  mov    %al,-0xa(%rbp)
  jmp    L201
L83:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  jbe    L201
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x46,%al
  ja     L201
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  sub    $0x37,%eax
  mov    %al,-0xa(%rbp)
L201:
  addl   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x9,%al
  ja     L127
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x9(%rbp)
  jmp    L62
L127:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jbe    L180
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  ja     L180
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  sub    $0x30,%eax
  mov    %al,-0x9(%rbp)
  jmp    L62
L180:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x60,%al
  jbe    L237
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x66,%al
  ja     L237
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  sub    $0x57,%eax
  mov    %al,-0x9(%rbp)
  jmp    L62
L237:
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x40,%al
  jbe    L62
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x46,%al
  ja     L62
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  sub    $0x37,%eax
  mov    %al,-0x9(%rbp)
L62:
  movzbl -0xa(%rbp),%eax
  shl    $0x4,%eax
  mov    %eax,%esi
  movzbl -0x9(%rbp),%eax
  and    $0xf,%eax
  mov    %eax,%ecx
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  lea    (%rsi,%rcx,1),%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x4(%rbp)
  addl   $0x1,-0x8(%rbp)
L236:
  mov    -0x8(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L108
  mov    -0x4(%rbp),%eax
L222:
  pop    %rbp
  ret
```

assistant: ```c
int uCharToHex(unsigned char *src, unsigned char *dst, int MaxLen) {
  int i, j;
  unsigned char high, low;
  if ((src == NULL) || (dst == NULL))
    return -1;
  i = 0;
  j = 0;
  while (i < MaxLen) {
    if ((src[i] >= 0) && (src[i] <= 9)) {
      high = src[i];
    } else if ((src[i] >= 0x30) && (src[i] <= 0x39)) {
      high = src[i] - 0x30;
    } else if ((src[i] >= 'a') && (src[i] <= 'f')) {
      high = src[i] - 'a' + 10;
    } else if ((src[i] >= 'A') && (src[i] <= 'F')) {
      high = src[i] - 'A' + 10;
    }
    i++;
    if ((src[i] >= 0) && (src[i] <= 9)) {
      low = src[i];
    } else if ((src[i] >= 0x30) && (src[i] <= 0x39)) {
      low = src[i] - 0x30;
    } else if ((src[i] >= 'a') && (src[i] <= 'f')) {
      low = src[i] - 'a' + 10;
    } else if ((src[i] >= 'A') && (src[i] <= 'F')) {
      low = src[i] - 'A' + 10;
    }
    dst[j] = ((high & 0xF) << 4) + (low & 0xF);
    j++;
    i++;
  }
  return j;
}
```