user: What is the c source code of the assembly code below:

```asm
<asn1_d2i_ex_primitive>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    0xa8(%rsp),%rax
  mov    0xa0(%rsp),%r10d
  mov    %rax,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  movb   $0x0,0x2b(%rsp)
  test   %rdi,%rdi
  je     L280
  mov    D101(%rip),%rax
  mov    %rdx,%r15
  mov    %rsi,%r12
  mov    %rdi,%r13
  mov    D0(%rip),%rdx
  mov    %rcx,%rbp
  mov    %r8d,%ebx
  mov    %r9d,%r14d
  mov    (%rax),%eax
  mov    (%rdx),%rsi
  cmp    %rsi,(%rcx)
  je     L18
  mov    0x8(%rcx),%edx
  lea    0x38(%rsp),%r11
  mov    %edx,0x2c(%rsp)
  cmp    %eax,%edx
  je     L311
L246:
  cmp    $0xffffffff,%ebx
  je     L384
L51:
  mov    (%r12),%rax
  lea    0x2a(%rsp),%rcx
  lea    0x30(%rsp),%rdi
  xor    %edx,%edx
  sub    $0x8,%rsp
  mov    %r11,%r9
  xor    %esi,%esi
  mov    %rax,0x40(%rsp)
  movsbl %r10b,%eax
  push   0x10(%rsp)
  push   %rax
  push   %r14
  push   %rbx
  push   %r15
  lea    0x59(%rsp),%r8
  mov    %r11,0x40(%rsp)
  call   <asn1_check_tlen@plt>
  add    $0x30,%rsp
  mov    0x10(%rsp),%r11
  test   %eax,%eax
  mov    %eax,%r14d
  je     L71
  cmp    $0xffffffff,%eax
  je     L142
  mov    D165(%rip),%rax
  mov    0x2c(%rsp),%ecx
  mov    (%rax),%edx
  mov    D124(%rip),%rax
  cmp    (%rax),%ecx
  je     L72
  mov    D137(%rip),%rax
  cmp    (%rax),%ecx
  je     L72
  cmp    %edx,%ecx
  je     L217
  cmpb   $0x0,0x29(%rsp)
  mov    0x30(%rsp),%rdx
  jne    L131
  mov    0x38(%rsp),%r14
  lea    (%r14,%rdx,1),%rax
  mov    %rax,0x38(%rsp)
L210:
  mov    %rbp,%r9
  lea    0x2b(%rsp),%r8
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <asn1_ex_c2i@plt>
  test   %eax,%eax
  je     L173
  mov    0x38(%rsp),%rax
  mov    $0x1,%r14d
  mov    %rax,(%r12)
L185:
  cmpb   $0x0,0x2b(%rsp)
  je     L142
L200:
  mov    0x48(%rsp),%rdi
  test   %rdi,%rdi
  je     L142
  call   <OPENSSL_free@plt>
  nopl   0x0(%rax)
L142:
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L61
  add    $0x68,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L311:
  test   %r8d,%r8d
  js     L100
  mov    D45(%rip),%rax
  mov    (%rax),%esi
  mov    D77(%rip),%rax
  mov    (%rax),%edi
  call   <ASN1err@plt>
L347:
  xor    %r14d,%r14d
  jmp    L142
  nopl   0x0(%rax)
L72:
  cmp    %edx,%ecx
  je     L217
  cmpb   $0x0,0x29(%rsp)
  je     L29
L277:
  movsbl 0x2a(%rsp),%edx
  mov    (%r12),%r14
  mov    0x30(%rsp),%rsi
  test   %dl,%dl
  jne    L114
  movq   $0x0,0x48(%rsp)
  mov    0x38(%rsp),%rax
  mov    %rax,%rdx
  add    %rsi,%rax
  sub    %r14,%rdx
  mov    %rax,0x38(%rsp)
  add    %rsi,%rdx
  jmp    L210
  nopl   (%rax)
L28:
  mov    $0xffffffff,%ebx
L100:
  test   %r10b,%r10b
  jne    L391
  mov    (%r12),%rax
  mov    %r10d,0x1c(%rsp)
  lea    0x38(%rsp),%r11
  xor    %ecx,%ecx
  lea    0x40(%rsp),%rdx
  lea    0x2c(%rsp),%rsi
  sub    $0x8,%rsp
  xor    %edi,%edi
  mov    %rax,0x40(%rsp)
  mov    %r11,%r9
  xor    %r8d,%r8d
  push   0x10(%rsp)
  push   $0x0
  push   $0x0
  push   $0xffffffffffffffff
  push   %r15
  mov    %r11,0x40(%rsp)
  call   <asn1_check_tlen@plt>
  add    $0x30,%rsp
  mov    0x10(%rsp),%r11
  mov    0x1c(%rsp),%r10d
  test   %eax,%eax
  je     L329
  mov    D56(%rip),%rax
  movzbl (%rax),%eax
  cmp    %al,0x40(%rsp)
  je     L246
  mov    D165(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,0x2c(%rsp)
  jmp    L246
  nopl   0x0(%rax,%rax,1)
L18:
  mov    %r8d,0x2c(%rsp)
  lea    0x38(%rsp),%r11
  cmp    %eax,%r8d
  je     L28
L80:
  mov    D56(%rip),%rax
  movzbl (%rax),%r14d
  jmp    L51
  nopl   0x0(%rax,%rax,1)
L114:
  mov    %r11,%rdi
  call   <asn1_find_end@plt>
  test   %eax,%eax
  je     L173
  mov    0x38(%rsp),%rdx
  mov    0x2c(%rsp),%ecx
  sub    %r14,%rdx
  jmp    L210
  nopl   (%rax)
L391:
  mov    D12(%rip),%rax
  mov    (%rax),%esi
  mov    D77(%rip),%rax
  mov    (%rax),%edi
  call   <ASN1err@plt>
  jmp    L347
  nopl   0x0(%rax)
L173:
  xor    %r14d,%r14d
  jmp    L185
  nopl   0x0(%rax,%rax,1)
L71:
  mov    D108(%rip),%rax
  mov    (%rax),%esi
  mov    D77(%rip),%rax
  mov    (%rax),%edi
  call   <ASN1err@plt>
  jmp    L142
  nopl   0x0(%rax)
L217:
  mov    0x8(%rsp),%rax
  test   %rax,%rax
  je     L277
  movq   $0x0,(%rax)
  jmp    L277
  nopw   0x0(%rax,%rax,1)
L280:
  mov    D145(%rip),%rax
L96:
  mov    (%rax),%esi
  mov    D77(%rip),%rax
  mov    (%rax),%edi
  call   <ASN1err@plt>
  jmp    L347
  nopl   0x0(%rax)
L29:
  mov    D27(%rip),%rax
  jmp    L96
  nopl   0x0(%rax)
L384:
  mov    0x2c(%rsp),%ebx
  jmp    L80
  nopl   0x0(%rax)
L131:
  mov    D56(%rip),%rax
  movsbl 0x2a(%rsp),%ecx
  lea    0x40(%rsp),%r15
  mov    %r11,%rsi
  mov    $0xffffffff,%r8d
  mov    %r15,%rdi
  movq   $0x0,0x40(%rsp)
  movq   $0x0,0x50(%rsp)
  movzbl (%rax),%r9d
  movq   $0x0,0x48(%rsp)
  call   <asn1_collect@plt>
  mov    %eax,%r14d
  test   %eax,%eax
  jne    L215
  movb   $0x1,0x2b(%rsp)
  jmp    L200
  nopw   0x0(%rax,%rax,1)
L329:
  mov    D108(%rip),%rax
  mov    (%rax),%esi
  mov    D77(%rip),%rax
  mov    (%rax),%edi
  call   <ASN1err@plt>
  jmp    L347
  nopl   0x0(%rax)
L215:
  mov    0x40(%rsp),%rdx
  mov    %r15,%rdi
  lea    0x1(%rdx),%rsi
  mov    %rdx,0x8(%rsp)
  call   <BUF_MEM_grow_clean@plt>
  mov    0x8(%rsp),%rdx
  test   %eax,%eax
  mov    %eax,%r14d
  je     L314
  mov    0x48(%rsp),%r14
  mov    0x2c(%rsp),%ecx
  movq   $0x0,(%r14,%rdx,8)
  movb   $0x1,0x2b(%rsp)
  jmp    L210
L314:
  mov    D182(%rip),%rax
  mov    (%rax),%esi
  mov    D77(%rip),%rax
  mov    (%rax),%edi
  call   <ASN1err@plt>
  jmp    L142
L61:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int asn1_d2i_ex_primitive(ASN1_VALUE **pval, const unsigned char **in, long inlen, const ASN1_ITEM *it, int tag, int aclass, char opt, ASN1_TLC *ctx) {
  int ret = 0, utype;
  long plen;
  char cst, inf, free_cont = 0;
  const unsigned char *p;
  BUF_MEM buf;
  const unsigned char *cont = NULL;
  long len;
  if (!pval) {
    ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE, ASN1_R_ILLEGAL_NULL);
    return 0;
  }
  if (it->itype == ASN1_ITYPE_MSTRING) {
    utype = tag;
    tag = -1;
  } else
    utype = it->utype;
  if (utype == V_ASN1_ANY) {
    unsigned char oclass;
    if (tag >= 0) {
      ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE, ASN1_R_ILLEGAL_TAGGED_ANY);
      return 0;
    }
    if (opt) {
      ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE, ASN1_R_ILLEGAL_OPTIONAL_ANY);
      return 0;
    }
    p = *in;
    ret = asn1_check_tlen(NULL, &utype, &oclass, NULL, NULL, &p, inlen, -1, 0, 0, ctx);
    if (!ret) {
      ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE, ERR_R_NESTED_ASN1_ERROR);
      return 0;
    }
    if (oclass != V_ASN1_UNIVERSAL)
      utype = V_ASN1_OTHER;
  }
  if (tag == -1) {
    tag = utype;
    aclass = V_ASN1_UNIVERSAL;
  }
  p = *in;
  ret = asn1_check_tlen(&plen, NULL, NULL, &inf, &cst, &p, inlen, tag, aclass, opt, ctx);
  if (!ret) {
    ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE, ERR_R_NESTED_ASN1_ERROR);
    return 0;
  } else if (ret == -1)
    return -1;
  ret = 0;
  if ((utype == V_ASN1_SEQUENCE) || (utype == V_ASN1_SET) || (utype == V_ASN1_OTHER)) {
    if (utype == V_ASN1_OTHER) {
      if (ctx)
        (ctx)->valid = 0;
    } else if (!cst) {
      ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE, ASN1_R_TYPE_NOT_CONSTRUCTED);
      return 0;
    }
    cont = *in;
    if (inf) {
      if (!asn1_find_end(&p, plen, inf))
        goto err;
      len = p - cont;
    } else {
      len = p - cont + plen;
      p += plen;
      buf.data = NULL;
    }
  } else if (cst) {
    buf.length = 0;
    buf.max = 0;
    buf.data = NULL;
    if (!asn1_collect(&buf, &p, plen, inf, -1, V_ASN1_UNIVERSAL)) {
      free_cont = 1;
      goto err;
    }
    len = buf.length;
    if (!BUF_MEM_grow_clean(&buf, len + 1)) {
      ASN1err(ASN1_F_ASN1_D2I_EX_PRIMITIVE, ERR_R_MALLOC_FAILURE);
      return 0;
    }
    buf.data[len] = 0;
    cont = (const unsigned char *)buf.data;
    free_cont = 1;
  } else {
    cont = p;
    len = plen;
    p += plen;
  }
  if (!asn1_ex_c2i(pval, cont, len, utype, &free_cont, it))
    goto err;
  *in = p;
  ret = 1;
err:
  if (free_cont && buf.data)
    OPENSSL_free(buf.data);
  return ret;
}
```