user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<BaseDecode>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbp
  mov    %rsi,%r12
  mov    %rdx,%rbx
  call   <strlen@plt>
  test   %eax,%eax
  je     L123
  mov    %eax,%edi
  mov    $0x0,%esi
  jmp    L9
L55:
  shl    $0x2,%edx
  mov    %dl,(%r12,%rsi,1)
L126:
  add    $0x1,%rsi
  cmp    %rdi,%rsi
  je     L123
L9:
  movzbl 0x0(%rbp,%rsi,1),%ecx
  mov    $0x0,%eax
L116:
  mov    %eax,%edx
  cmp    %cl,(%rbx,%rax,1)
  je     L55
  add    $0x1,%rax
  cmp    $0x41,%rax
  jne    L116
  jmp    L126
L123:
  mov    %rbp,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  mov    %eax,%r8d
  shr    $0x2,%r8d
  cmp    $0x3,%eax
  jbe    L51
  mov    %r12,%rax
  mov    %r12,%rcx
  mov    $0x0,%edi
L44:
  movzbl 0x1(%rax),%edx
  shr    $0x6,%dl
  or     (%rax),%dl
  mov    %dl,(%rcx)
  movzbl 0x2(%rax),%edx
  shr    $0x4,%dl
  movzbl 0x1(%rax),%esi
  shl    $0x2,%esi
  or     %esi,%edx
  mov    %dl,0x1(%rcx)
  movzbl 0x3(%rax),%edx
  shr    $0x2,%dl
  movzbl 0x2(%rax),%esi
  shl    $0x4,%esi
  or     %esi,%edx
  mov    %dl,0x2(%rcx)
  add    $0x1,%edi
  add    $0x4,%rax
  add    $0x3,%rcx
  cmp    %edi,%r8d
  ja     L44
  lea    (%r8,%r8,2),%r13d
  cmp    $0x3,%ebx
  mov    $0x3,%eax
  cmovbe %eax,%r13d
  mov    $0x1,%r14d
  cmova  %r8d,%r14d
L86:
  mov    %rbp,%rdi
  call   <strlen@plt>
  and    $0xfffffffc,%ebx
  sub    %ebx,%eax
  cmp    $0x2,%eax
  je     L115
  cmp    $0x3,%eax
  je     L23
L43:
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L51:
  mov    $0x0,%r13d
  mov    $0x0,%r14d
  jmp    L86
L115:
  shl    $0x2,%r14d
  mov    %r13d,%edx
  lea    0x1(%r14),%eax
  movzbl (%r12,%rax,1),%eax
  shr    $0x6,%al
  mov    %r14d,%r14d
  or     (%r12,%r14,1),%al
  mov    %al,(%r12,%rdx,1)
  add    $0x1,%r13d
  jmp    L43
L23:
  shl    $0x2,%r14d
  lea    0x1(%r14),%edx
  add    %r12,%rdx
  mov    %r13d,%ecx
  mov    %r14d,%esi
  movzbl (%rdx),%eax
  shr    $0x6,%al
  or     (%r12,%rsi,1),%al
  mov    %al,(%r12,%rcx,1)
  lea    0x1(%r13),%ecx
  add    $0x2,%r14d
  mov    %r14d,%eax
  movzbl (%r12,%rax,1),%eax
  shr    $0x4,%al
  movzbl (%rdx),%edx
  shl    $0x2,%edx
  or     %edx,%eax
  mov    %al,(%r12,%rcx,1)
  add    $0x2,%r13d
  jmp    L43
```

assistant: ```c
unsigned int BaseDecode(unsigned char *hstr, unsigned char *bstr, unsigned char *Bs64) {
  unsigned int i, n, c = 0;
  unsigned char m;
  n = strlen(hstr);
  for (i = 0; i < n; i++) {
    for (m = 0; m < 65; m++) {
      if (Bs64[m] == hstr[i]) {
        bstr[i] = (m << 2);
        break;
      }
    }
  }
  n = (strlen(hstr) / 4);
  for (i = 0; i < n; i++) {
    bstr[c] = bstr[i * 4] | (bstr[(i * 4) + 1] >> 6);
    c++;
    bstr[c] = (bstr[(i * 4) + 1] << 2) | (bstr[(i * 4) + 2] >> 4);
    c++;
    bstr[c] = (bstr[(i * 4) + 2] << 4) | (bstr[(i * 4) + 3] >> 2);
    c++;
  }
  switch (strlen(hstr) - (n * 4)) {
  case 2:
    bstr[c] = bstr[i * 4] | (bstr[(i * 4) + 1] >> 6);
    c++;
    break;
  case 3:
    bstr[c] = bstr[i * 4] | (bstr[(i * 4) + 1] >> 6);
    c++;
    bstr[c] = (bstr[(i * 4) + 1] << 2) | (bstr[(i * 4) + 2] >> 4);
    c++;
    break;
  }
  return c;
}
```