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

```asm
<str_decode>:
  endbr64
  push   %r15
  xor    %eax,%eax
  mov    %rsi,%r15
  push   %r14
  mov    %rdi,%r14
  mov    %rsi,%rdi
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  call   <ignorestr@plt>
  test   %eax,%eax
  jne    L80
  movzbl (%r15),%ebp
  movl   $0x0,0x4(%rsp)
  xor    %edx,%edx
  movl   $0x0,0x8(%rsp)
  mov    %ebp,%eax
  test   %ebp,%ebp
  jne    L85
  jmp    L191
  nopl   0x0(%rax,%rax,1)
L132:
  cmp    $0xa,%ebp
  je     L392
  mov    0x8(%rsp),%edi
  test   %edi,%edi
  je     L206
  cmp    $0x3d,%ebp
  jne    L206
  movzbl 0x1(%r15),%edi
  movzbl 0x2(%r15),%r13d
  xor    %eax,%eax
  mov    %edx,0xc(%rsp)
  lea    0x2(%r15),%r12
  add    $0x1,%r14
  call   <qp_code@plt>
  mov    %r13d,%edi
  mov    %eax,%ebp
  xor    %eax,%eax
  call   <qp_code@plt>
  shl    $0x4,%ebp
  mov    0xc(%rsp),%edx
  or     %eax,%ebp
  mov    %bpl,-0x1(%r14)
L174:
  movzbl 0x1(%r12),%ebp
  lea    0x1(%r12),%r15
  mov    %ebp,%eax
  test   %ebp,%ebp
  je     L191
L85:
  cmp    $0x3f,%ebp
  jne    L132
  cmpb   $0x3d,0x1(%r15)
  lea    0x1(%r15),%r12
  je     L174
  mov    0x4(%rsp),%ecx
  test   %ecx,%ecx
  je     L307
  test   %edx,%edx
  je     L14
L307:
  mov    %al,(%r14)
  mov    %r15,%r12
  add    $0x1,%r14
  jmp    L174
  nopl   0x0(%rax)
L6:
  movzbl 0x1(%r15),%ebp
  add    $0x1,%r15
L14:
  mov    %ebp,%edi
  call   <isspace@plt>
  test   %eax,%eax
  jne    L6
  test   %ebp,%ebp
  je     L191
  nopl   0x0(%rax)
L167:
  movzbl 0x1(%r15),%r12d
  add    $0x1,%r15
  mov    %r12d,%edi
  call   <isspace@plt>
  test   %eax,%eax
  jne    L167
  test   %r12d,%r12d
  je     L191
  cs nopw 0x0(%rax,%rax,1)
L296:
  movzbl 0x1(%r15),%r13d
  add    $0x1,%r15
  mov    %r13d,%edi
  call   <isspace@plt>
  test   %eax,%eax
  jne    L296
  test   %r13d,%r13d
  je     L191
  xchg   %ax,%ax
L61:
  movzbl 0x1(%r15),%ebx
  add    $0x1,%r15
  mov    %ebx,%edi
  call   <isspace@plt>
  test   %eax,%eax
  jne    L61
  mov    %eax,0xc(%rsp)
  test   %ebx,%ebx
  je     L191
  cmp    $0x3d,%ebp
  je     L240
  cmp    $0x3d,%r12d
  je     L240
  mov    %r12d,%edi
  xor    %eax,%eax
  call   <base64_code@plt>
  mov    %ebp,%edi
  mov    %eax,%r12d
  xor    %eax,%eax
  call   <base64_code@plt>
  mov    %r12d,%ecx
  mov    0xc(%rsp),%edx
  sar    $0x4,%ecx
  shl    $0x2,%eax
  and    $0x3,%ecx
  or     %eax,%ecx
  cmp    $0x3d,%r13d
  mov    %cl,(%r14)
  jne    L259
  add    $0x1,%r14
  mov    %r15,%r12
  mov    $0x1,%edx
  jmp    L174
  nopl   0x0(%rax)
L206:
  mov    0x4(%rsp),%esi
  test   %esi,%esi
  je     L345
  test   %edx,%edx
  je     L14
L345:
  cmp    $0x3d,%ebp
  jne    L307
  movzbl 0x1(%r15),%ecx
  cmp    $0x3f,%cl
  jne    L307
  lea    0x1(%r15),%r12
  xor    %edi,%edi
  xor    %esi,%esi
  mov    $0x3f,%eax
  jmp    L298
  cs nopw 0x0(%rax,%rax,1)
L9:
  or     $0x20,%ecx
  cmp    $0x2,%esi
  movzbl %cl,%ecx
  cmove  %ecx,%edi
L22:
  movzbl 0x1(%r12),%eax
  add    $0x1,%r12
  mov    %eax,%ecx
  test   %eax,%eax
  je     L343
L298:
  cmp    $0x3f,%eax
  jne    L9
  add    $0x1,%esi
  cmp    $0x2,%esi
  jle    L22
L343:
  cmp    $0x71,%edi
  je     L173
  cmp    $0x62,%edi
  mov    $0x1,%eax
  cmovne 0x4(%rsp),%eax
  mov    %eax,0x4(%rsp)
  jmp    L174
  nopl   0x0(%rax,%rax,1)
L392:
  movl   $0x0,0x4(%rsp)
  lea    0x1(%r15),%r12
  xor    %edx,%edx
  movl   $0x0,0x8(%rsp)
  jmp    L174
  nopl   0x0(%rax,%rax,1)
L240:
  mov    %r15,%r12
  mov    $0x1,%edx
  jmp    L174
  nopl   (%rax)
L191:
  movb   $0x0,(%r14)
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L259:
  xor    %eax,%eax
  mov    %r13d,%edi
  mov    %edx,0xc(%rsp)
  shl    $0x4,%r12d
  call   <base64_code@plt>
  mov    0xc(%rsp),%edx
  mov    %eax,%ebp
  sar    $0x2,%eax
  and    $0xf,%eax
  or     %r12d,%eax
  cmp    $0x3d,%ebx
  mov    %al,0x1(%r14)
  jne    L115
  add    $0x2,%r14
  mov    %r15,%r12
  mov    $0x1,%edx
  jmp    L174
  nopl   0x0(%rax,%rax,1)
L115:
  mov    %ebx,%edi
  xor    %eax,%eax
  mov    %edx,0xc(%rsp)
  shl    $0x6,%ebp
  call   <base64_code@plt>
  mov    %r15,%r12
  mov    0xc(%rsp),%edx
  add    $0x3,%r14
  or     %eax,%ebp
  mov    %bpl,-0x1(%r14)
  jmp    L174
L80:
  add    $0x18,%rsp
  mov    %r15,%rsi
  mov    %r14,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10a0 <strcpy@plt>
L173:
  movl   $0x1,0x8(%rsp)
  jmp    L174
```

assistant: ```c
void str_decode(dst, src) register unsigned char *dst, *src;
{
  register int is_qp, is_base64, is_done;
  register int c1, c2, c3, c4;
  if (ignorestr(src)) {
    strcpy(dst, src);
    return;
  }
  for (is_done = is_qp = is_base64 = 0; (c1 = *src); src++) {
    if (c1 == '?' && src[1] == '=') {
      src++;
      continue;
    } else if (c1 == '\n') {
      src++;
      is_done = is_qp = is_base64 = 0;
      continue;
    } else if (is_qp && c1 == '=') {
      c1 = *++src;
      c2 = *++src;
      *dst++ = (qp_code(c1) << 4) | qp_code(c2);
    } else if (is_base64 && !is_done) {
      while (isspace(c1)) {
        c1 = *++src;
      }
      if (!c1)
        break;
      do {
        c2 = *++src;
      } while (isspace(c2));
      if (!c2)
        break;
      do {
        c3 = *++src;
      } while (isspace(c3));
      if (!c3)
        break;
      do {
        c4 = *++src;
      } while (isspace(c4));
      if (!c4)
        break;
      if (c1 == '=' || c2 == '=') {
        is_done = 1;
        continue;
      }
      c2 = base64_code(c2);
      *dst++ = (base64_code(c1) << 2) | ((c2 & 0x30) >> 4);
      if (c3 == '=')
        is_done = 1;
      else {
        c3 = base64_code(c3);
        *dst++ = ((c2 & 0xF) << 4) | ((c3 & 0x3c) >> 2);
        if (c4 == '=')
          is_done = 1;
        else {
          *dst++ = ((c3 & 0x03) << 6) | base64_code(c4);
        }
      }
    } else if ((c1 == '=') && (src[1] == '?')) {
      c2 = c3 = 0;
      for (;;) {
        c1 = *++src;
        if (c1 == 0)
          break;
        if (c1 != '?') {
          if (c2 == 2)
            c3 = c1 | 0x20;
        } else {
          if (++c2 >= 3)
            break;
        }
      }
      if (c3 == 'q')
        is_qp = 1;
      else if (c3 == 'b')
        is_base64 = 1;
    } else
      *dst++ = c1;
  }
  *dst = '\0';
}
```