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

```asm
<do_blob_header>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %esi,-0x1c(%rbp)
  mov    %rdx,-0x28(%rbp)
  mov    %rcx,-0x30(%rbp)
  mov    %r8,-0x38(%rbp)
  mov    %r9,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x18(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x10(%rbp)
  cmpl   $0xf,-0x1c(%rbp)
  ja     L93
  mov    $0x0,%eax
  jmp    L214
L93:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x6,%al
  jne    L253
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L130
  mov    D29(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <PEMerror@plt>
  mov    $0x0,%eax
  jmp    L214
L130:
  mov    -0x40(%rbp),%rax
  movl   $0x1,(%rax)
  jmp    L273
L253:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x7,%al
  jne    L237
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x1,%eax
  jne    L29
  mov    D51(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <PEMerror@plt>
  mov    $0x0,%eax
  jmp    L214
L29:
  mov    -0x40(%rbp),%rax
  movl   $0x0,(%rax)
  jmp    L273
L237:
  mov    $0x0,%eax
  jmp    L214
L273:
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  movzbl (%rax),%eax
  cmp    $0x2,%al
  je     L3
  mov    D48(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <PEMerror@plt>
  mov    $0x0,%eax
  jmp    L214
L3:
  mov    -0x10(%rbp),%rax
  add    $0x6,%rax
  mov    %rax,-0x10(%rbp)
  lea    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <read_ledword@plt>
  mov    -0x28(%rbp),%rdx
  mov    %eax,(%rdx)
  lea    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <read_ledword@plt>
  mov    -0x30(%rbp),%rdx
  mov    %eax,(%rdx)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x10000,%eax
  jbe    L103
  mov    D45(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <PEMerror@plt>
  mov    $0x0,%eax
  jmp    L214
L103:
  mov    -0x38(%rbp),%rax
  movl   $0x0,(%rax)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x32535344,%eax
  je     L201
  cmp    $0x32535344,%eax
  ja     L97
  cmp    $0x32415352,%eax
  je     L134
  cmp    $0x32415352,%eax
  ja     L97
  cmp    $0x31415352,%eax
  je     L175
  cmp    $0x31535344,%eax
  jne    L97
  mov    -0x38(%rbp),%rax
  movl   $0x1,(%rax)
L175:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  test   %eax,%eax
  jne    L31
  mov    D29(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <PEMerror@plt>
  mov    $0x0,%eax
  jmp    L214
L201:
  mov    -0x38(%rbp),%rax
  movl   $0x1,(%rax)
L134:
  mov    -0x40(%rbp),%rax
  mov    (%rax),%eax
  cmp    $0x1,%eax
  jne    L270
  mov    D51(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <PEMerror@plt>
  mov    $0x0,%eax
  jmp    L214
L97:
  mov    D61(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <PEMerror@plt>
  mov    $0xffffffff,%eax
  jmp    L214
L31:
  nop
  jmp    L182
L270:
  nop
L182:
  mov    -0x10(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,(%rax)
  mov    $0x1,%eax
L214:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L185
  call   <__stack_chk_fail@plt>
L185:
  leave
  ret
```

assistant: ```c
int do_blob_header(const unsigned char **in, unsigned int length, unsigned int *pmagic, unsigned int *pbitlen, int *pisdss, int *pispub) {
  const unsigned char *p = *in;
  if (length < 16)
    return 0;
  if (*p == 0x6) {
    if (*pispub == 0) {
      PEMerror(PEM_R_EXPECTING_PRIVATE_KEY_BLOB);
      return 0;
    }
    *pispub = 1;
  } else if (*p == 0x7) {
    if (*pispub == 1) {
      PEMerror(PEM_R_EXPECTING_PUBLIC_KEY_BLOB);
      return 0;
    }
    *pispub = 0;
  } else
    return 0;
  p++;
  if (*p++ != 0x2) {
    PEMerror(PEM_R_BAD_VERSION_NUMBER);
    return 0;
  }
  p += 6;
  *pmagic = read_ledword(&p);
  *pbitlen = read_ledword(&p);
  if (*pbitlen > 65536) {
    PEMerror(PEM_R_INCONSISTENT_HEADER);
    return 0;
  }
  *pisdss = 0;
  switch (*pmagic) {
  case 0x31535344L:
    *pisdss = 1;
  case 0x31415352L:
    if (*pispub == 0) {
      PEMerror(PEM_R_EXPECTING_PRIVATE_KEY_BLOB);
      return 0;
    }
    break;
  case 0x32535344L:
    *pisdss = 1;
  case 0x32415352L:
    if (*pispub == 1) {
      PEMerror(PEM_R_EXPECTING_PUBLIC_KEY_BLOB);
      return 0;
    }
    break;
  default:
    PEMerror(PEM_R_BAD_MAGIC_NUMBER);
    return -1;
  }
  *in = p;
  return 1;
}
```