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

```asm
<do_generate>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rcx,%rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %rdx,%rdx
  je     L57
  mov    %rdi,%r13
  xor    %edi,%edi
  mov    %rdx,%r14
  call   <NCONF_new@plt>
  lea    0x8(%rsp),%rdx
  mov    %r14,%rsi
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <NCONF_load@plt>
  test   %eax,%eax
  je     L134
  test   %rbp,%rbp
  je     L111
L3:
  mov    %rbp,%rdi
  mov    %r12,%rsi
  call   <ASN1_generate_nconf@plt>
  mov    %r12,%rdi
  mov    %rax,%rbp
  call   <NCONF_free@plt>
  test   %rbp,%rbp
  je     L42
  xor    %esi,%esi
  mov    %rbp,%rdi
  call   <i2d_ASN1_TYPE@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  jle    L56
  mov    %eax,%esi
  mov    %rbx,%rdi
  call   <BUF_MEM_grow@plt>
  test   %eax,%eax
  je     L56
  mov    (%rbx),%rax
  mov    %rbp,%rdi
  lea    0x10(%rsp),%rsi
  mov    %rax,0x10(%rsp)
  call   <i2d_ASN1_TYPE@plt>
  mov    %rbp,%rdi
  call   <ASN1_TYPE_free@plt>
L109:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L46
  add    $0x20,%rsp
  mov    %r12d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L57:
  xor    %r12d,%r12d
  jmp    L3
  nopl   0x0(%rax,%rax,1)
L111:
  lea    D40(%rip),%rdx
  lea    D25(%rip),%rsi
  mov    %r12,%rdi
  call   <NCONF_get_string@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  jne    L3
  mov    %r14,%rdx
  lea    D17(%rip),%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <BIO_printf@plt>
  cs nopw 0x0(%rax,%rax,1)
L68:
  mov    %r12,%rdi
  mov    $0xffffffff,%r12d
  call   <NCONF_free@plt>
  mov    %rbp,%rdi
  call   <ASN1_TYPE_free@plt>
  jmp    L109
  nopl   0x0(%rax,%rax,1)
L56:
  xor    %r12d,%r12d
  jmp    L68
L42:
  mov    $0xffffffff,%r12d
  jmp    L109
L134:
  mov    0x8(%rsp),%rdx
  test   %rdx,%rdx
  jle    L65
  mov    %r14,%rcx
  lea    D29(%rip),%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <BIO_printf@plt>
  xor    %ebp,%ebp
  jmp    L68
L65:
  mov    %r14,%rdx
  lea    D4(%rip),%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <BIO_printf@plt>
  xor    %ebp,%ebp
  jmp    L68
L46:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D40
data_type: string
name: parse_data
arguments: label: D25
data_type: string
name: parse_data
arguments: label: D17
data_type: string
name: parse_data
arguments: label: D29
data_type: string
name: parse_data
arguments: label: D4
data_type: string

tool: D40: asn1

tool: D25: default

tool: D17: Can't find 'asn1' in '%s'


tool: D29: Error on line %ld of config file '%s'


tool: D4: Error loading config file '%s'


assistant: ```c
int do_generate(BIO *bio, char *genstr, char *genconf, BUF_MEM *buf) {
  CONF *cnf = NULL;
  int len;
  long errline;
  unsigned char *p;
  ASN1_TYPE *atyp = NULL;
  if (genconf) {
    cnf = NCONF_new(NULL);
    if (!NCONF_load(cnf, genconf, &errline))
      goto conferr;
    if (!genstr)
      genstr = NCONF_get_string(cnf, "default", "asn1");
    if (!genstr) {
      BIO_printf(bio, "Can't find 'asn1' in '%s'\n", genconf);
      goto err;
    }
  }
  atyp = ASN1_generate_nconf(genstr, cnf);
  NCONF_free(cnf);
  cnf = NULL;
  if (!atyp)
    return -1;
  len = i2d_ASN1_TYPE(atyp, NULL);
  if (len <= 0)
    goto err;
  if (!BUF_MEM_grow(buf, len))
    goto err;
  p = (unsigned char *)buf->data;
  i2d_ASN1_TYPE(atyp, &p);
  ASN1_TYPE_free(atyp);
  return len;
conferr:
  if (errline > 0)
    BIO_printf(bio, "Error on line %ld of config file '%s'\n", errline, genconf);
  else
    BIO_printf(bio, "Error loading config file '%s'\n", genconf);
err:
  NCONF_free(cnf);
  ASN1_TYPE_free(atyp);
  return -1;
}
```