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

```asm
<ASN1_primitive_new>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  je     L20
  mov    -0x30(%rbp),%rax
  mov    0x10(%rax),%rax
  test   %rax,%rax
  je     L20
  mov    -0x30(%rbp),%rax
  mov    0x10(%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L20
  mov    -0x10(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0x30(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   *%rcx
  jmp    L227
L20:
  cmpq   $0x0,-0x30(%rbp)
  je     L120
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rdx
  mov    D1(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,%rdx
  jne    L9
L120:
  movl   $0xffffffff,-0x14(%rbp)
  jmp    L6
L9:
  mov    -0x30(%rbp),%rax
  mov    0x8(%rax),%eax
  mov    %eax,-0x14(%rbp)
L6:
  cmpl   $0x83,-0x14(%rbp)
  je     L173
  cmpl   $0x83,-0x14(%rbp)
  jg     L94
  cmpl   $0x82,-0x14(%rbp)
  je     L142
  cmpl   $0x82,-0x14(%rbp)
  jg     L94
  cmpl   $0x80,-0x14(%rbp)
  je     L4
  cmpl   $0x81,-0x14(%rbp)
  je     L79
  jmp    L94
L4:
  mov    D5(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <OBJ_nid2obj@plt>
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,(%rax)
  mov    $0x1,%eax
  jmp    L227
L142:
  cmpq   $0x0,-0x30(%rbp)
  je     L183
  mov    -0x30(%rbp),%rax
  mov    0xc(%rax),%edx
  mov    -0x28(%rbp),%rax
  mov    %edx,(%rax)
  jmp    L212
L183:
  mov    -0x28(%rbp),%rax
  movl   $0xffffffff,(%rax)
L212:
  mov    $0x1,%eax
  jmp    L227
L79:
  mov    -0x28(%rbp),%rax
  movq   $0x1,(%rax)
  mov    $0x1,%eax
  jmp    L227
L173:
  mov    $0x10,%edi
  call   <OPENSSL_malloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L5
  mov    $0x0,%eax
  jmp    L227
L5:
  mov    -0x8(%rbp),%rax
  movq   $0x0,0x8(%rax)
  mov    -0x8(%rbp),%rax
  movl   $0xffffffff,(%rax)
  mov    -0x28(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,(%rax)
  jmp    L33
L94:
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <ASN1_STRING_type_new@plt>
  mov    %rax,%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,(%rax)
  nop
L33:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  je     L124
  mov    $0x1,%eax
  jmp    L227
L124:
  mov    $0x0,%eax
L227:
  leave
  ret
```

assistant: ```c
int ASN1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it) {
  ASN1_TYPE *typ;
  int utype;
  if (it && it->funcs) {
    const ASN1_PRIMITIVE_FUNCS *pf = it->funcs;
    if (pf->prim_new)
      return pf->prim_new(pval, it);
  }
  if (!it || (it->itype == ASN1_ITYPE_MSTRING))
    utype = -1;
  else
    utype = it->utype;
  switch (utype) {
  case V_ASN1_OBJECT:
    *pval = (ASN1_VALUE *)OBJ_nid2obj(NID_undef);
    return 1;
  case V_ASN1_BOOLEAN:
    if (it)
      *(ASN1_BOOLEAN *)pval = it->size;
    else
      *(ASN1_BOOLEAN *)pval = -1;
    return 1;
  case V_ASN1_NULL:
    *pval = (ASN1_VALUE *)1;
    return 1;
  case V_ASN1_ANY:
    typ = OPENSSL_malloc(sizeof(ASN1_TYPE));
    if (!typ)
      return 0;
    typ->value.ptr = NULL;
    typ->type = -1;
    *pval = (ASN1_VALUE *)typ;
    break;
  default:
    *pval = (ASN1_VALUE *)ASN1_STRING_type_new(utype);
    break;
  }
  if (*pval)
    return 1;
  return 0;
}
```