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

```asm
<asn1_primitive_new>:
  endbr64
  test   %rsi,%rsi
  je     L281
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    0x10(%rsi),%rax
  test   %rax,%rax
  je     L106
  test   %edx,%edx
  je     L32
  mov    0x8(%rax),%rax
  test   %rax,%rax
  je     L313
  call   *%rax
  pop    %rbx
  mov    $0x1,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   (%rax)
L32:
  mov    (%rax),%rax
  test   %rax,%rax
  je     L99
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  jmp    *%rax
  nopw   0x0(%rax,%rax,1)
L106:
  mov    D57(%rip),%rbx
  mov    (%rbx),%rax
  cmp    %rax,(%rsi)
  je     L294
  mov    0x8(%rsi),%r12d
  cmp    $0x82,%r12d
  je     L61
  jg     L104
  cmp    $0x80,%r12d
  je     L274
  cmp    $0x81,%r12d
  jne    L143
L30:
  movq   $0x1,0x0(%r13)
  mov    $0x1,%eax
L67:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L99:
  mov    D57(%rip),%rbx
  mov    (%rbx),%rax
  cmp    %rax,(%rsi)
  je     L339
  mov    0x8(%rsi),%r12d
  cmp    $0x82,%r12d
  je     L61
  jg     L286
  cmp    $0x80,%r12d
  je     L274
  cmp    $0x81,%r12d
  je     L30
L329:
  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     L259
  mov    0x4(%r14),%ecx
  mov    %edx,%eax
L184:
  mov    D70(%rip),%rdx
  or     (%rdx),%ecx
  mov    %ecx,0x4(%r14)
  jmp    L259
  nop
L313:
  mov    D57(%rip),%rbx
  mov    (%rbx),%rax
  cmp    %rax,(%rsi)
  je     L213
  mov    0x8(%rsi),%r12d
  cmp    $0x82,%r12d
  je     L61
  jg     L357
  cmp    $0x80,%r12d
  je     L274
  cmp    $0x81,%r12d
  je     L30
  jmp    L372
  cs nopw 0x0(%rax,%rax,1)
L294:
  mov    $0xffffffff,%r12d
L143:
  test   %edx,%edx
  je     L329
L372:
  mov    0x0(%r13),%r14
  mov    $0x8,%edx
  xor    %esi,%esi
  mov    %r14,%rdi
  call   <memset@plt>
  mov    D72(%rip),%rax
  mov    %r12d,(%r14)
  mov    (%rax),%ecx
  mov    (%rbx),%rax
  mov    %ecx,0x4(%r14)
  cmp    %rax,0x0(%rbp)
  je     L14
  cmpq   $0x0,0x0(%r13)
  setne  %al
L259:
  pop    %rbx
  movzbl %al,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L281:
  xor    %eax,%eax
  ret
  nopl   0x0(%rax,%rax,1)
L104:
  cmp    $0x83,%r12d
  jne    L143
L22:
  mov    $0x10,%edi
  call   <OPENSSL_malloc@plt>
  test   %rax,%rax
  je     L255
  movq   $0x0,0x8(%rax)
  movl   $0xffffffff,(%rax)
  mov    %rax,0x0(%r13)
  mov    $0x1,%eax
  jmp    L259
  nopl   (%rax)
L286:
  cmp    $0x83,%r12d
  je     L22
  jmp    L329
  cs nopw 0x0(%rax,%rax,1)
L357:
  cmp    $0x83,%r12d
  je     L22
  jmp    L372
  xchg   %ax,%ax
L61:
  mov    0xc(%rbp),%eax
  mov    %eax,0x0(%r13)
  mov    $0x1,%eax
  jmp    L67
  nopl   0x0(%rax)
L274:
  mov    D32(%rip),%rax
  mov    (%rax),%edi
  call   <OBJ_nid2obj@plt>
  mov    %rax,0x0(%r13)
  mov    $0x1,%eax
  jmp    L67
  nopl   0x0(%rax)
L213:
  mov    $0xffffffff,%r12d
  jmp    L372
  nopl   0x0(%rax,%rax,1)
L339:
  mov    $0xffffffff,%r12d
  jmp    L329
  nopl   0x0(%rax,%rax,1)
L14:
  cmpq   $0x0,0x0(%r13)
  setne  %al
  jmp    L184
L255:
  mov    D15(%rip),%rax
  mov    (%rax),%esi
  mov    D69(%rip),%rax
  mov    (%rax),%edi
  call   <ERR_raise@plt>
  xor    %eax,%eax
  jmp    L67
```

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:
    if ((typ = OPENSSL_malloc(sizeof(*typ))) == NULL) {
      ERR_raise(ERR_LIB_ASN1, ERR_R_MALLOC_FAILURE);
      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;
}
```