user: 请将以下的汇编代码转换成C语言代码:

```asm
<mmdecode_header>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  mov    %rdx,%r12
  or     $0x20,%esi
  cmp    $0x62,%sil
  je     L165
  mov    $0xffffffff,%eax
  cmp    $0x71,%sil
  jne    L38
  movzbl (%rdi),%edx
  movzbl %dl,%eax
  cmp    $0x3f,%dl
  je     L198
  mov    %r12,%rbp
  mov    $0x20,%r13d
  test   %eax,%eax
  jne    L70
L198:
  mov    %r12,%rbp
L203:
  mov    %ebp,%eax
  sub    %r12d,%eax
  jmp    L38
L165:
  movzbl (%rdi),%edi
  cmp    $0x3f,%edi
  je     L132
  mov    %rdx,%rbp
  mov    $0x0,%r14d
  mov    $0x0,%r13d
  test   %edi,%edi
  jne    L196
L132:
  mov    %r12,%rbp
L231:
  mov    %ebp,%eax
  sub    %r12d,%eax
L38:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L63:
  movzbl 0x1(%rbx),%r14d
  test   %r14d,%r14d
  jne    L137
  add    $0x1,%rbx
  mov    %r14d,%r15d
L99:
  mov    %r14d,%edi
  mov    $0x0,%eax
  call   <isreturn@plt>
  test   %eax,%eax
  jne    L193
  mov    %r14d,%edi
  call   <qp_code@plt>
  mov    %eax,%r14d
  test   %eax,%eax
  js     L48
  mov    %r15d,%edi
  mov    $0x0,%eax
  call   <qp_code@plt>
  test   %eax,%eax
  js     L177
  lea    0x1(%rbp),%rcx
  shl    $0x4,%r14d
  lea    (%r14,%rax,1),%edx
L13:
  mov    %dl,0x0(%rbp)
  add    $0x1,%rbx
  mov    %rcx,%rbp
L193:
  movzbl (%rbx),%edx
  movzbl %dl,%eax
  test   %eax,%eax
  je     L203
  cmp    $0x3f,%eax
  je     L203
L70:
  cmp    $0x3d,%eax
  je     L63
  lea    0x1(%rbp),%rcx
  cmp    $0x5f,%eax
  jne    L13
  mov    %r13d,%edx
  jmp    L13
L137:
  movzbl 0x2(%rbx),%r15d
  lea    0x2(%rbx),%rbx
  jmp    L99
L178:
  mov    %eax,%r14d
L144:
  movzbl (%rbx),%edi
  cmp    $0x3f,%edi
  je     L231
  test   %edi,%edi
  je     L231
L196:
  add    $0x1,%rbx
  mov    $0x0,%eax
  call   <base64_code@plt>
  test   %eax,%eax
  js     L144
  shl    $0x6,%r13d
  or     %eax,%r13d
  lea    0x6(%r14),%eax
  cmp    $0x7,%eax
  jle    L178
  sub    $0x2,%r14d
  mov    %r13d,%eax
  mov    %r14d,%ecx
  sar    %cl,%eax
  mov    %al,0x0(%rbp)
  lea    0x1(%rbp),%rbp
  jmp    L144
L48:
  mov    $0xffffffff,%eax
  jmp    L38
L177:
  mov    $0xffffffff,%eax
  jmp    L38
```

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