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

```asm
<cdel_decode_from_base64_string>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%r14
  mov    %rsi,0x18(%rsp)
  mov    %rdx,%rbp
  call   <strlen@plt>
  test   %r14,%r14
  je     L76
  lea    0x1(%rax),%r12d
  movslq %r12d,%r12
  mov    %r12,%rdi
  call   <malloc@plt>
  mov    %rax,0x8(%rsp)
  test   %rax,%rax
  je     L67
  mov    %r12,%rdi
  call   <malloc@plt>
  mov    %rax,0x10(%rsp)
  test   %rax,%rax
  je     L37
  mov    %r12,%rdx
  mov    $0x0,%esi
  mov    0x8(%rsp),%rdi
  call   <memset@plt>
  mov    %r12,%rdx
  mov    $0x0,%esi
  mov    0x10(%rsp),%rdi
  call   <memset@plt>
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L87
  mov    $0x0,%r12d
  jmp    L141
L76:
  mov    %rbp,%rbx
  test   %rbp,%rbp
  je     L224
  mov    D26(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x0(%rbp)
  mov    0x18(%rsp),%rbx
  jmp    L224
L67:
  mov    %rbp,%rbx
  test   %rbp,%rbp
  je     L224
  mov    D22(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x0(%rbp)
  mov    $0x0,%ebx
  jmp    L224
L37:
  test   %rbp,%rbp
  je     L245
  mov    D22(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x0(%rbp)
L245:
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  mov    $0x0,%ebx
  jmp    L224
L177:
  add    $0x1,%rbx
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L92
L141:
  movsbl %dil,%edi
  call   <is_base64@plt>
  cmp    $0x1,%eax
  jne    L177
  movzbl (%rbx),%eax
  mov    0x8(%rsp),%rcx
  mov    %al,(%rcx,%r12,1)
  lea    0x1(%r12),%r12
  jmp    L177
L92:
  test   %r12,%r12
  je     L131
  mov    0x8(%rsp),%rax
  lea    0x3(%rax),%r13
  mov    0x10(%rsp),%rbx
  mov    $0x0,%ebp
  jmp    L195
L202:
  movsbl %dil,%edi
  call   <base64_decode_byte@plt>
  mov    %al,0x7(%rsp)
  movsbl 0x5(%rsp),%edi
  call   <base64_decode_byte@plt>
  mov    %al,0x5(%rsp)
  movsbl %r15b,%edi
  call   <base64_decode_byte@plt>
  mov    %al,0x6(%rsp)
  movsbl %r14b,%edi
  call   <base64_decode_byte@plt>
  mov    %eax,%ecx
  movzbl 0x5(%rsp),%eax
  shr    $0x4,%al
  movzbl 0x7(%rsp),%edx
  shl    $0x2,%edx
  or     %eax,%edx
  mov    %dl,(%rbx)
  cmp    $0x3d,%r15b
  je     L119
  movzbl 0x6(%rsp),%eax
  shr    $0x2,%al
  movzbl 0x5(%rsp),%edx
  shl    $0x4,%edx
  or     %eax,%edx
  mov    %dl,0x1(%rbx)
  lea    0x2(%rbx),%rbx
L2:
  cmp    $0x3d,%r14b
  je     L51
  movzbl 0x6(%rsp),%eax
  shl    $0x6,%eax
  or     %ecx,%eax
  mov    %al,(%rbx)
  lea    0x1(%rbx),%rbx
L51:
  add    $0x4,%rbp
  add    $0x4,%r13
  cmp    %rbp,%r12
  jbe    L34
L195:
  movzbl -0x3(%r13),%edi
  lea    0x1(%rbp),%rax
  movb   $0x41,0x5(%rsp)
  cmp    %rax,%r12
  jbe    L189
  movzbl -0x2(%r13),%eax
  mov    %al,0x5(%rsp)
L189:
  lea    0x2(%rbp),%rax
  mov    $0x41,%r15d
  cmp    %rax,%r12
  jbe    L73
  movzbl -0x1(%r13),%r15d
L73:
  lea    0x3(%rbp),%rax
  mov    $0x41,%r14d
  cmp    %r12,%rax
  jae    L202
  movzbl 0x0(%r13),%r14d
  jmp    L202
L119:
  add    $0x1,%rbx
  jmp    L2
L87:
  mov    0x10(%rsp),%rbx
L34:
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  mov    %rbx,%rax
  sub    0x10(%rsp),%rax
  mov    0x18(%rsp),%rcx
  mov    %rax,(%rcx)
L224:
  mov    %rbx,%rax
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L131:
  mov    0x10(%rsp),%rbx
  jmp    L34
```

assistant: ```c
unsigned char *cdel_decode_from_base64_string(const char *in_string, size_t *buff_len, int *error) {
  char c1 = 0;
  char c2 = 0;
  char c3 = 0;
  char c4 = 0;
  unsigned char b1 = 0;
  unsigned char b2 = 0;
  unsigned char b3 = 0;
  unsigned char b4 = 0;
  unsigned char *buf = NULL;
  unsigned char *out_buffer = NULL;
  size_t k;
  size_t l = strlen(in_string) + 1;
  unsigned char *dest = NULL;
  if (buff_len == NULL) {
    if (error != NULL)
      *error = EINVAL;
    return NULL;
  }
  buf = (unsigned char *)malloc(l);
  if (buf == NULL) {
    if (error != NULL)
      *error = ENOMEM;
    return NULL;
  }
  out_buffer = (unsigned char *)malloc(l);
  if (out_buffer == NULL) {
    if (error != NULL)
      *error = ENOMEM;
    free(buf);
    return NULL;
  }
  memset(buf, 0, l);
  memset(out_buffer, 0, l);
  dest = out_buffer;
  for (k = 0, l = 0; in_string[k]; k++) {
    if (is_base64(in_string[k]) == 1)
      buf[l++] = in_string[k];
  }
  for (k = 0; k < l; k += 4) {
    c1 = 'A';
    c2 = 'A';
    c3 = 'A';
    c4 = 'A';
    b1 = 0;
    b2 = 0;
    b3 = 0;
    b4 = 0;
    c1 = buf[k];
    if (k + 1 < l) {
      c2 = buf[k + 1];
    }
    if (k + 2 < l) {
      c3 = buf[k + 2];
    }
    if (k + 3 < l) {
      c4 = buf[k + 3];
    }
    b1 = base64_decode_byte(c1);
    b2 = base64_decode_byte(c2);
    b3 = base64_decode_byte(c3);
    b4 = base64_decode_byte(c4);
    *out_buffer++ = ((b1 << 2) | (b2 >> 4));
    if (c3 != '=') {
      *out_buffer++ = (((b2 & 0xf) << 4) | (b3 >> 2));
    }
    if (c4 != '=') {
      *out_buffer++ = (((b3 & 0x3) << 6) | b4);
    }
  }
  free(buf);
  *buff_len = (size_t)(out_buffer - dest);
  return out_buffer;
}
```