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

```asm
<mmdecode_header>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %esi,%eax
  mov    %rdx,-0x38(%rbp)
  mov    %al,-0x2c(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  orb    $0x20,-0x2c(%rbp)
  movzbl -0x2c(%rbp),%eax
  cmp    $0x62,%eax
  je     L202
  cmp    $0x71,%eax
  jne    L7
  jmp    L12
L227:
  cmpl   $0x3d,-0x18(%rbp)
  jne    L108
  addq   $0x1,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  je     L155
  addq   $0x1,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  jmp    L49
L155:
  mov    $0x0,%eax
L49:
  mov    %eax,-0x10(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <isreturn@plt>
  test   %eax,%eax
  je     L143
  jmp    L12
L143:
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <qp_code@plt>
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  js     L22
  mov    -0x10(%rbp),%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <qp_code@plt>
  mov    %eax,-0x10(%rbp)
  cmpl   $0x0,-0x10(%rbp)
  jns    L83
L22:
  mov    $0xffffffff,%eax
  jmp    L129
L83:
  mov    -0x14(%rbp),%eax
  shl    $0x4,%eax
  mov    %eax,%ecx
  mov    -0x10(%rbp),%eax
  mov    %eax,%esi
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  lea    (%rcx,%rsi,1),%edx
  mov    %dl,(%rax)
  jmp    L100
L108:
  cmpl   $0x5f,-0x18(%rbp)
  jne    L229
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movb   $0x20,(%rax)
  jmp    L100
L229:
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    -0x18(%rbp),%edx
  mov    %dl,(%rax)
L100:
  addq   $0x1,-0x28(%rbp)
L12:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x18(%rbp)
  cmpl   $0x0,-0x18(%rbp)
  je     L14
  cmpl   $0x3f,-0x18(%rbp)
  jne    L227
L14:
  mov    -0x8(%rbp),%rax
  sub    -0x38(%rbp),%rax
  jmp    L129
L202:
  movl   $0x0,-0x20(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L102
L215:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <base64_code@plt>
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0xc(%rbp)
  jns    L177
  jmp    L102
L177:
  mov    -0x20(%rbp),%eax
  shl    $0x6,%eax
  or     -0xc(%rbp),%eax
  mov    %eax,-0x20(%rbp)
  addl   $0x6,-0x1c(%rbp)
  cmpl   $0x7,-0x1c(%rbp)
  jle    L102
  subl   $0x8,-0x1c(%rbp)
  mov    -0x1c(%rbp),%eax
  mov    -0x20(%rbp),%edx
  mov    %eax,%ecx
  sar    %cl,%edx
  mov    %edx,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
L102:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,-0x18(%rbp)
  cmpl   $0x0,-0x18(%rbp)
  je     L173
  cmpl   $0x3f,-0x18(%rbp)
  jne    L215
L173:
  mov    -0x8(%rbp),%rax
  sub    -0x38(%rbp),%rax
  jmp    L129
L7:
  mov    $0xffffffff,%eax
L129:
  leave
  ret
```

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