user: Demonstrate the C code that generates the assembly output below:

```asm
<asn1_primitive_new>:
  endbr64
  test   %rsi,%rsi
  je     L135
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbp
  mov    %rsi,%rbx
  mov    0x10(%rsi),%rax
  test   %rax,%rax
  je     L61
  test   %edx,%edx
  je     L216
  mov    0x8(%rax),%rax
  test   %rax,%rax
  je     L252
  call   *%rax
  mov    $0x1,%eax
  jmp    L147
L216:
  mov    (%rax),%rax
  test   %rax,%rax
  je     L132
  call   *%rax
  jmp    L147
L61:
  mov    D27(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,(%rsi)
  je     L239
L23:
  mov    0x8(%rbx),%r12d
  cmp    $0x82,%r12d
  je     L185
  jg     L201
  cmp    $0x80,%r12d
  je     L197
  cmp    $0x81,%r12d
  jne    L241
  movq   $0x1,0x0(%rbp)
  mov    $0x1,%eax
  jmp    L147
L201:
  cmp    $0x83,%r12d
  jne    L241
  mov    $0x10,%edi
  call   <OPENSSL_malloc@plt>
  test   %rax,%rax
  je     L162
  movq   $0x0,0x8(%rax)
  movl   $0xffffffff,(%rax)
  mov    %rax,0x0(%rbp)
  jmp    L45
L197:
  mov    D59(%rip),%rax
  mov    (%rax),%edi
  call   <OBJ_nid2obj@plt>
  mov    %rax,0x0(%rbp)
  mov    $0x1,%eax
  jmp    L147
L185:
  mov    0xc(%rbx),%eax
  mov    %eax,0x0(%rbp)
  mov    $0x1,%eax
  jmp    L147
L239:
  mov    $0xffffffff,%r12d
L241:
  test   %edx,%edx
  je     L13
L224:
  mov    0x0(%rbp),%r13
  mov    $0x8,%edx
  mov    $0x0,%esi
  mov    %r13,%rdi
  call   <memset@plt>
  mov    %r12d,0x0(%r13)
  mov    D22(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x4(%r13)
L198:
  mov    D27(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,(%rbx)
  jne    L45
  test   %r13,%r13
  jne    L180
L45:
  cmpq   $0x0,0x0(%rbp)
  setne  %al
  movzbl %al,%eax
L147:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L180:
  mov    D2(%rip),%rax
  mov    (%rax),%eax
  or     %eax,0x4(%r13)
  jmp    L45
L135:
  mov    $0x0,%eax
  ret
L162:
  mov    $0x0,%eax
  jmp    L147
L252:
  mov    D27(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,(%rsi)
  jne    L23
  mov    $0xffffffff,%r12d
  jmp    L224
L132:
  mov    D27(%rip),%rax
  mov    (%rax),%rax
  cmp    %rax,(%rsi)
  jne    L23
  mov    $0xffffffff,%r12d
L13:
  mov    %r12d,%edi
  call   <ASN1_STRING_type_new@plt>
  mov    %rax,%r13
  mov    %rax,0x0(%rbp)
  jmp    L198
```

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