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

```asm
<eckey_priv_decode>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%r8
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x8(%rsp)
  movq   $0x0,0x18(%rsp)
  lea    0x20(%rsp),%rcx
  lea    0x4(%rsp),%rdx
  lea    0x8(%rsp),%rsi
  mov    $0x0,%edi
  call   <PKCS8_pkey_get0@plt>
  test   %eax,%eax
  jne    L32
L63:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L10
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L32:
  lea    0x10(%rsp),%rdx
  mov    %rsp,%rsi
  mov    0x20(%rsp),%rcx
  mov    $0x0,%edi
  call   <X509_ALGOR_get0@plt>
  mov    0x10(%rsp),%rsi
  mov    (%rsp),%edi
  call   <eckey_type2param@plt>
  mov    %rax,0x18(%rsp)
  test   %rax,%rax
  je     L168
  lea    0x8(%rsp),%rsi
  lea    0x18(%rsp),%rdi
  mov    0x4(%rsp),%edx
  call   <d2i_ECPrivateKey@plt>
  test   %eax,%eax
  je     L161
  mov    0x18(%rsp),%rdi
  call   <EC_KEY_get0_public_key@plt>
  test   %rax,%rax
  je     L2
L142:
  mov    0x18(%rsp),%rsi
  mov    %rbx,%rdi
  call   <EVP_PKEY_assign_EC_KEY@plt>
  mov    $0x1,%eax
  jmp    L63
L161:
  mov    D6(%rip),%rax
  mov    (%rax),%edi
  call   <ECerror@plt>
  jmp    L160
L2:
  mov    0x18(%rsp),%rdi
  call   <EC_KEY_get0_group@plt>
  mov    %rax,%r12
  mov    %rax,%rdi
  call   <EC_POINT_new@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L119
  mov    %r12,%rdi
  call   <EC_GROUP_get0_generator@plt>
  mov    %eax,%esi
  mov    %rbp,%rdi
  call   <EC_POINT_copy@plt>
  test   %eax,%eax
  je     L134
  mov    0x18(%rsp),%rdi
  call   <EC_KEY_get0_private_key@plt>
  mov    %rax,%rdx
  mov    $0x0,%r9d
  mov    $0x0,%r8d
  mov    $0x0,%ecx
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <EC_POINT_mul@plt>
  test   %eax,%eax
  je     L79
  mov    %rbp,%rsi
  mov    0x18(%rsp),%rdi
  call   <EC_KEY_set_public_key@plt>
  test   %rax,%rax
  je     L13
  mov    %rbp,%rdi
  call   <EC_POINT_free@plt>
  jmp    L142
L119:
  mov    D16(%rip),%rax
  mov    (%rax),%edi
  call   <ECerror@plt>
  jmp    L168
L134:
  mov    %rbp,%rdi
  call   <EC_POINT_free@plt>
  mov    D16(%rip),%rax
  mov    (%rax),%edi
  call   <ECerror@plt>
L168:
  mov    D16(%rip),%rax
  mov    (%rax),%edi
  call   <ECerror@plt>
L160:
  mov    0x18(%rsp),%rdi
  mov    $0x0,%eax
  test   %rdi,%rdi
  je     L63
  call   <EC_KEY_free@plt>
  mov    $0x0,%eax
  jmp    L63
L79:
  mov    %rbp,%rdi
  call   <EC_POINT_free@plt>
  mov    D16(%rip),%rax
  mov    (%rax),%edi
  call   <ECerror@plt>
  jmp    L168
L13:
  mov    %rbp,%rdi
  call   <EC_POINT_free@plt>
  mov    D16(%rip),%rax
  mov    (%rax),%edi
  call   <ECerror@plt>
  jmp    L168
L10:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int eckey_priv_decode(EVP_PKEY *pkey, const PKCS8_PRIV_KEY_INFO *p8) {
  const unsigned char *p = NULL;
  const void *pval;
  int ptype, pklen;
  EC_KEY *eckey = NULL;
  const X509_ALGOR *palg;
  if (!PKCS8_pkey_get0(NULL, &p, &pklen, &palg, p8))
    return 0;
  X509_ALGOR_get0(NULL, &ptype, &pval, palg);
  eckey = eckey_type2param(ptype, pval);
  if (!eckey)
    goto ecliberr;
  if (!d2i_ECPrivateKey(&eckey, &p, pklen)) {
    ECerror(EC_R_DECODE_ERROR);
    goto ecerr;
  }
  if (EC_KEY_get0_public_key(eckey) == NULL) {
    const BIGNUM *priv_key;
    const EC_GROUP *group;
    EC_POINT *pub_key;
    group = EC_KEY_get0_group(eckey);
    pub_key = EC_POINT_new(group);
    if (pub_key == NULL) {
      ECerror(ERR_R_EC_LIB);
      goto ecliberr;
    }
    if (!EC_POINT_copy(pub_key, EC_GROUP_get0_generator(group))) {
      EC_POINT_free(pub_key);
      ECerror(ERR_R_EC_LIB);
      goto ecliberr;
    }
    priv_key = EC_KEY_get0_private_key(eckey);
    if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, NULL)) {
      EC_POINT_free(pub_key);
      ECerror(ERR_R_EC_LIB);
      goto ecliberr;
    }
    if (EC_KEY_set_public_key(eckey, pub_key) == 0) {
      EC_POINT_free(pub_key);
      ECerror(ERR_R_EC_LIB);
      goto ecliberr;
    }
    EC_POINT_free(pub_key);
  }
  EVP_PKEY_assign_EC_KEY(pkey, eckey);
  return 1;
ecliberr:
  ECerror(ERR_R_EC_LIB);
ecerr:
  if (eckey)
    EC_KEY_free(eckey);
  return 0;
}
```