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     L80
  mov    $0xffffffff,%eax
  cmp    $0x71,%sil
  jne    L92
  movzbl (%rdi),%edx
  mov    %edx,%eax
  test   %edx,%edx
  je     L235
  mov    %r12,%r15
  mov    $0x20,%r13d
  cmp    $0x3f,%edx
  jne    L73
  jmp    L235
  nopl   0x0(%rax)
L1:
  cmp    $0x5f,%edx
  lea    0x1(%r15),%rcx
  cmove  %r13d,%eax
L234:
  mov    %al,(%r15)
  add    $0x1,%rbx
  mov    %rcx,%r15
L158:
  movzbl (%rbx),%edx
  mov    %edx,%eax
  test   %edx,%edx
  je     L7
  cmp    $0x3f,%edx
  je     L7
L73:
  cmp    $0x3d,%edx
  jne    L1
  movzbl 0x1(%rbx),%ebp
  test   %ebp,%ebp
  jne    L14
  add    $0x1,%rbx
  xor    %r14d,%r14d
L116:
  xor    %eax,%eax
  mov    %ebp,%edi
  call   <isreturn@plt>
  test   %eax,%eax
  jne    L158
  mov    %ebp,%edi
  call   <qp_code@plt>
  mov    %eax,%ebp
  test   %eax,%eax
  js     L227
  xor    %eax,%eax
  mov    %r14d,%edi
  call   <qp_code@plt>
  test   %eax,%eax
  js     L227
  shl    $0x4,%ebp
  lea    0x1(%r15),%rcx
  add    %ebp,%eax
  jmp    L234
  nopw   0x0(%rax,%rax,1)
L7:
  mov    %r15d,%eax
  sub    %r12d,%eax
L92:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L14:
  movzbl 0x2(%rbx),%r14d
  add    $0x2,%rbx
  jmp    L116
  nopl   0x0(%rax,%rax,1)
L80:
  movzbl (%rdi),%edi
  cmp    $0x3f,%edi
  je     L235
  mov    %rdx,%r15
  xor    %r13d,%r13d
  xor    %ebp,%ebp
  test   %edi,%edi
  jne    L98
  jmp    L235
  xchg   %ax,%ax
L230:
  sub    $0x2,%r13d
  mov    %ebp,%eax
  add    $0x1,%r15
  mov    %r13d,%ecx
  sar    %cl,%eax
  mov    %al,-0x1(%r15)
L81:
  movzbl (%rbx),%edi
  test   %edi,%edi
  je     L7
  cmp    $0x3f,%edi
  je     L7
L98:
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <base64_code@plt>
  test   %eax,%eax
  js     L81
  shl    $0x6,%ebp
  or     %eax,%ebp
  lea    0x6(%r13),%eax
  cmp    $0x7,%eax
  jg     L230
  mov    %eax,%r13d
  jmp    L81
  nopl   0x0(%rax)
L235:
  xor    %eax,%eax
  jmp    L92
L227:
  mov    $0xffffffff,%eax
  jmp    L92
```

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;
}
```