user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<asn1_primitive_new>:
  endbr64
  test   %rsi,%rsi
  je     L82
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    0x10(%rsi),%rax
  test   %rax,%rax
  je     L344
  test   %edx,%edx
  je     L114
  mov    0x8(%rax),%rax
  test   %rax,%rax
  je     L209
  call   *%rax
  pop    %rbx
  mov    $0x1,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   (%rax)
L114:
  mov    (%rax),%rax
  test   %rax,%rax
  je     L268
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    *%rax
  nopw   0x0(%rax,%rax,1)
L344:
  mov    D11(%rip),%rbx
  mov    (%rbx),%rax
  cmp    %rax,(%rsi)
  je     L0
  mov    0x8(%rsi),%r12d
  cmp    $0x82,%r12d
  je     L27
  jg     L347
  cmp    $0x80,%r12d
  je     L165
  cmp    $0x81,%r12d
  jne    L224
L311:
  movq   $0x1,0x0(%r13)
  mov    $0x1,%eax
L139:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L268:
  mov    D11(%rip),%rbx
  mov    (%rbx),%rax
  cmp    %rax,(%rsi)
  je     L321
  mov    0x8(%rsi),%r12d
  cmp    $0x82,%r12d
  je     L27
  jg     L266
  cmp    $0x80,%r12d
  je     L165
  cmp    $0x81,%r12d
  je     L311
L14:
  mov    %r12d,%edi
  call   <ASN1_STRING_type_new@plt>
  mov    (%rbx),%rcx
  test   %rax,%rax
  mov    %rax,0x0(%r13)
  mov    %rax,%r14
  setne  %al
  cmp    %rcx,0x0(%rbp)
  sete   %dl
  and    %al,%dl
  je     L253
  mov    0x4(%r14),%ecx
  mov    %edx,%eax
L13:
  mov    D30(%rip),%rdx
  or     (%rdx),%ecx
  mov    %ecx,0x4(%r14)
  jmp    L253
  nop
L209:
  mov    D11(%rip),%rbx
  mov    (%rbx),%rax
  cmp    %rax,(%rsi)
  je     L44
  mov    0x8(%rsi),%r12d
  cmp    $0x82,%r12d
  je     L27
  jg     L43
  cmp    $0x80,%r12d
  je     L165
  cmp    $0x81,%r12d
  je     L311
  jmp    L223
  cs nopw 0x0(%rax,%rax,1)
L0:
  mov    $0xffffffff,%r12d
L224:
  test   %edx,%edx
  je     L14
L223:
  mov    0x0(%r13),%r14
  mov    $0x8,%edx
  xor    %esi,%esi
  mov    %r14,%rdi
  call   <memset@plt>
  mov    D4(%rip),%rax
  mov    %r12d,(%r14)
  mov    (%rax),%ecx
  mov    (%rbx),%rax
  mov    %ecx,0x4(%r14)
  cmp    %rax,0x0(%rbp)
  je     L90
  cmpq   $0x0,0x0(%r13)
  setne  %al
L253:
  pop    %rbx
  movzbl %al,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L347:
  cmp    $0x83,%r12d
  jne    L224
L239:
  mov    $0x10,%edi
  call   <OPENSSL_malloc@plt>
  test   %rax,%rax
  je     L330
  movq   $0x0,0x8(%rax)
  movl   $0xffffffff,(%rax)
  mov    %rax,0x0(%r13)
  mov    $0x1,%eax
  jmp    L253
  nopl   0x0(%rax)
L330:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L266:
  cmp    $0x83,%r12d
  je     L239
  jmp    L14
  xchg   %ax,%ax
L43:
  cmp    $0x83,%r12d
  je     L239
  jmp    L223
  xchg   %ax,%ax
L27:
  mov    0xc(%rbp),%eax
  mov    %eax,0x0(%r13)
  mov    $0x1,%eax
  jmp    L139
  nopl   0x0(%rax)
L165:
  mov    D24(%rip),%rax
  mov    (%rax),%edi
  call   <OBJ_nid2obj@plt>
  mov    %rax,0x0(%r13)
  mov    $0x1,%eax
  jmp    L139
  nopl   0x0(%rax)
L44:
  mov    $0xffffffff,%r12d
  jmp    L223
  nopl   0x0(%rax,%rax,1)
L321:
  mov    $0xffffffff,%r12d
  jmp    L14
  nopl   0x0(%rax,%rax,1)
L90:
  cmpq   $0x0,0x0(%r13)
  setne  %al
  jmp    L13
  nopl   (%rax)
L82:
  xor    %eax,%eax
  ret
```

assistant: ```c
int asn1_primitive_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed) {
  ASN1_TYPE *typ;
  ASN1_STRING *str;
  int utype;
  if (!it)
    return 0;
  if (it->funcs) {
    const ASN1_PRIMITIVE_FUNCS *pf = it->funcs;
    if (embed) {
      if (pf->prim_clear) {
        pf->prim_clear(pval, it);
        return 1;
      }
    } else if (pf->prim_new) {
      return pf->prim_new(pval, it);
    }
  }
  if (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:
    *(ASN1_BOOLEAN *)pval = it->size;
    return 1;
  case V_ASN1_NULL:
    *pval = (ASN1_VALUE *)1;
    return 1;
  case V_ASN1_ANY:
    typ = OPENSSL_malloc(sizeof(*typ));
    if (typ == NULL)
      return 0;
    typ->value.ptr = NULL;
    typ->type = -1;
    *pval = (ASN1_VALUE *)typ;
    break;
  default:
    if (embed) {
      str = *(ASN1_STRING **)pval;
      memset(str, 0, sizeof(*str));
      str->type = utype;
      str->flags = ASN1_STRING_FLAG_EMBED;
    } else {
      str = ASN1_STRING_type_new(utype);
      *pval = (ASN1_VALUE *)str;
    }
    if (it->itype == ASN1_ITYPE_MSTRING && str)
      str->flags |= ASN1_STRING_FLAG_MSTRING;
    break;
  }
  if (*pval)
    return 1;
  return 0;
}
```