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

```asm
<qbase64_decode>:
  endbr64
  sub    $0x118,%rsp
  movdqa D32(%rip),%xmm1
  mov    %rdi,%r8
  movdqa D57(%rip),%xmm0
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  movzbl (%rdi),%eax
  movaps %xmm1,0x20(%rsp)
  movdqa D41(%rip),%xmm1
  movaps %xmm0,(%rsp)
  movaps %xmm1,0x30(%rsp)
  movdqa D10(%rip),%xmm1
  movaps %xmm0,0x10(%rsp)
  movaps %xmm1,0x40(%rsp)
  movdqa D46(%rip),%xmm1
  movaps %xmm0,0x80(%rsp)
  movaps %xmm1,0x50(%rsp)
  movdqa D68(%rip),%xmm1
  movaps %xmm0,0x90(%rsp)
  movaps %xmm1,0x60(%rsp)
  movdqa D25(%rip),%xmm1
  movaps %xmm0,0xa0(%rsp)
  movaps %xmm1,0x70(%rsp)
  movaps %xmm0,0xb0(%rsp)
  movaps %xmm0,0xc0(%rsp)
  movaps %xmm0,0xd0(%rsp)
  movaps %xmm0,0xe0(%rsp)
  movaps %xmm0,0xf0(%rsp)
  test   %al,%al
  je     L73
  mov    %rdi,%rcx
  xor    %edx,%edx
  xor    %esi,%esi
  jmp    L0
  nopl   0x0(%rax)
L109:
  lea    0x1(%rdi),%r9
  cmp    $0x1,%esi
  je     L37
  cmp    $0x2,%esi
  je     L102
  shl    $0x6,%edx
  xor    %esi,%esi
  or     %eax,%edx
  mov    %dl,(%rdi)
  movsbl %al,%edx
  mov    %r9,%rdi
L1:
  movzbl 0x1(%rcx),%eax
  add    $0x1,%rcx
  test   %al,%al
  je     L11
L0:
  movzbl (%rsp,%rax,1),%eax
  cmp    $0x40,%al
  je     L1
  test   %esi,%esi
  jne    L109
  add    $0x1,%rcx
  movsbl %al,%edx
  mov    $0x1,%esi
  movzbl (%rcx),%eax
  test   %al,%al
  jne    L0
L11:
  mov    %rdi,%rax
  sub    %r8,%rax
L72:
  movb   $0x0,(%rdi)
  mov    0x108(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L67
  add    $0x118,%rsp
  ret
  nopl   0x0(%rax,%rax,1)
L37:
  mov    %eax,%esi
  shl    $0x2,%edx
  sar    $0x4,%sil
  or     %esi,%edx
  mov    $0x2,%esi
  mov    %dl,(%rdi)
  movsbl %al,%edx
  mov    %r9,%rdi
  jmp    L1
  nopw   0x0(%rax,%rax,1)
L102:
  mov    %eax,%esi
  shl    $0x4,%edx
  sar    $0x2,%sil
  or     %esi,%edx
  mov    $0x3,%esi
  mov    %dl,(%rdi)
  movsbl %al,%edx
  mov    %r9,%rdi
  jmp    L1
  nopl   (%rax)
L73:
  xor    %eax,%eax
  jmp    L72
L67:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D32
type_infered: byte[16]
name: disassemble_data
arguments: tag: D57
type_infered: byte[16]
name: disassemble_data
arguments: tag: D41
type_infered: byte[16]
name: disassemble_data
arguments: tag: D10
type_infered: byte[16]
name: disassemble_data
arguments: tag: D46
type_infered: byte[16]
name: disassemble_data
arguments: tag: D68
type_infered: byte[16]
name: disassemble_data
arguments: tag: D25
type_infered: byte[16]

tool: {"D32": [0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x3e,0x40,0x40,0x40,0x3f]}

tool: {"D57": [0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40]}

tool: {"D41": [0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x40,0x40,0x40,0x40,0x40,0x40]}

tool: {"D10": [0x40,0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,0x0d,0x0e]}

tool: {"D46": [0x0f,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x40,0x40,0x40,0x40,0x40]}

tool: {"D68": [0x40,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28]}

tool: {"D25": [0x29,0x2a,0x2b,0x2c,0x2d,0x2e,0x2f,0x30,0x31,0x32,0x33,0x40,0x40,0x40,0x40,0x40]}

assistant: ```c
size_t qbase64_decode(char *str) {
  const char B64MAPTBL[16 * 16] = {64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 62, 64, 64, 64, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 64, 64, 64, 64, 64, 64, 64, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 64, 64, 64, 64, 64, 64, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64};
  char *pEncPt, *pBinPt = str;
  int nIdxOfFour = 0;
  char cLastByte = 0;
  for (pEncPt = str; *pEncPt != '\0'; pEncPt++) {
    char cByte = B64MAPTBL[(unsigned char)(*pEncPt)];
    if (cByte == 64)
      continue;
    if (nIdxOfFour == 0) {
      nIdxOfFour++;
    } else if (nIdxOfFour == 1) {
      *pBinPt++ = ((cLastByte << 2) | (cByte >> 4));
      nIdxOfFour++;
    } else if (nIdxOfFour == 2) {
      *pBinPt++ = ((cLastByte << 4) | (cByte >> 2));
      nIdxOfFour++;
    } else {
      *pBinPt++ = ((cLastByte << 6) | cByte);
      nIdxOfFour = 0;
    }
    cLastByte = cByte;
  }
  *pBinPt = '\0';
  return (pBinPt - str);
}
```