user: 请从给定的汇编指令推导出C源代码:

```asm
<mmdecode_header>:
  endbr64
  push   %r15
  or     $0x20,%esi
  push   %r14
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  cmp    $0x62,%sil
  je     L60
  mov    $0xffffffff,%eax
  cmp    $0x71,%sil
  jne    L140
  movzbl (%rdi),%edx
  mov    %edx,%eax
  test   %edx,%edx
  je     L160
  mov    %r12,%r15
  mov    $0x20,%r13d
  cmp    $0x3f,%edx
  jne    L162
  jmp    L160
  nopl   0x0(%rax)
L47:
  cmp    $0x5f,%edx
  lea    0x1(%r15),%rcx
  cmove  %r13d,%eax
L33:
  mov    %al,(%r15)
  add    $0x1,%rbx
  mov    %rcx,%r15
L189:
  movzbl (%rbx),%edx
  mov    %edx,%eax
  test   %edx,%edx
  je     L85
  cmp    $0x3f,%edx
  je     L85
L162:
  cmp    $0x3d,%edx
  jne    L47
  movzbl 0x1(%rbx),%ebp
  test   %ebp,%ebp
  jne    L4
  add    $0x1,%rbx
  xor    %r14d,%r14d
L203:
  xor    %eax,%eax
  mov    %ebp,%edi
  call   <isreturn@plt>
  test   %eax,%eax
  jne    L189
  mov    %ebp,%edi
  call   <qp_code@plt>
  mov    %eax,%ebp
  test   %eax,%eax
  js     L120
  xor    %eax,%eax
  mov    %r14d,%edi
  call   <qp_code@plt>
  test   %eax,%eax
  js     L120
  shl    $0x4,%ebp
  lea    0x1(%r15),%rcx
  add    %ebp,%eax
  jmp    L33
  nopw   0x0(%rax,%rax,1)
L85:
  mov    %r15d,%eax
  sub    %r12d,%eax
L140:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L4:
  movzbl 0x2(%rbx),%r14d
  add    $0x2,%rbx
  jmp    L203
  nopl   0x0(%rax,%rax,1)
L60:
  movzbl (%rdi),%edi
  cmp    $0x3f,%edi
  je     L160
  mov    %rdx,%r15
  xor    %r13d,%r13d
  xor    %ebp,%ebp
  test   %edi,%edi
  jne    L127
  jmp    L160
  xchg   %ax,%ax
L25:
  sub    $0x2,%r13d
  mov    %ebp,%eax
  add    $0x1,%r15
  mov    %r13d,%ecx
  sar    %cl,%eax
  mov    %al,-0x1(%r15)
L235:
  movzbl (%rbx),%edi
  test   %edi,%edi
  je     L85
  cmp    $0x3f,%edi
  je     L85
L127:
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <base64_code@plt>
  test   %eax,%eax
  js     L235
  shl    $0x6,%ebp
  or     %eax,%ebp
  lea    0x6(%r13),%eax
  cmp    $0x7,%eax
  jg     L25
  mov    %eax,%r13d
  jmp    L235
  nopl   0x0(%rax)
L160:
  xor    %eax,%eax
  jmp    L140
L120:
  mov    $0xffffffff,%eax
  jmp    L140
```

assistant: ```c
int mmdecode_header(src, encode, dst)
unsigned char *src;
unsigned char encode;
unsigned char *dst;
{
  unsigned char *t;
  int pattern, bits;
  int ch;
  t = dst;
  encode |= 0x20;
  switch (encode) {
  case 'q':
    while ((ch = *src) && ch != '?') {
      if (ch == '=') {
        int x, y;
        x = *++src;
        y = x ? *++src : 0;
        if (isreturn(x))
          continue;
        if ((x = qp_code(x)) < 0 || (y = qp_code(y)) < 0)
          return -1;
        *t++ = (x << 4) + y;
      } else if (ch == '_') {
        *t++ = ' ';
      } else {
        *t++ = ch;
      }
      src++;
    }
    return t - dst;
  case 'b':
    pattern = 0;
    bits = 0;
    while ((ch = *src) && ch != '?') {
      int x;
      x = base64_code(*src++);
      if (x < 0)
        continue;
      pattern = (pattern << 6) | x;
      bits += 6;
      if (bits >= 8) {
        bits -= 8;
        *t++ = (pattern >> bits) & 0xff;
      }
    }
    return t - dst;
  }
  return -1;
}
```