user: 请从给定的汇编指令推导出C源代码：

```asm
<pkcs7_decrypt_rinfo>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,%r12
  mov    %rsi,%r13
  mov    %rdx,%rbp
  mov    %rcx,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  mov    $0x0,%esi
  call   <EVP_PKEY_CTX_new@plt>
  mov    $0xffffffff,%r14d
  test   %rax,%rax
  je     L64
  mov    %rax,%rbx
  mov    %rax,%rdi
  call   <EVP_PKEY_decrypt_init@plt>
  test   %rax,%rax
  jle    L11
  mov    %rbp,%r9
  mov    $0x0,%r8d
  mov    D55(%rip),%rax
  mov    (%rax),%ecx
  mov    D76(%rip),%rax
  mov    (%rax),%edx
  mov    $0xffffffff,%esi
  mov    %rbx,%rdi
  call   <EVP_PKEY_CTX_ctrl@plt>
  test   %rax,%rax
  jle    L33
  mov    0x0(%rbp),%rax
  mov    0x4(%rax),%ecx
  mov    %rsp,%rdx
  mov    (%rax),%r8d
  mov    $0x0,%esi
  mov    %rbx,%rdi
  call   <EVP_PKEY_decrypt@plt>
  test   %rax,%rax
  jle    L25
  mov    (%rsp),%rdi
  call   <malloc@plt>
  mov    %rax,%r14
  test   %rax,%rax
  je     L10
  mov    0x0(%rbp),%rax
  mov    0x4(%rax),%ecx
  mov    %rsp,%rdx
  mov    (%rax),%r8d
  mov    %r14,%rsi
  mov    %rbx,%rdi
  call   <EVP_PKEY_decrypt@plt>
  test   %rax,%rax
  jle    L74
  mov    (%r12),%rdi
  test   %rdi,%rdi
  je     L114
  mov    0x0(%r13),%esi
  call   <OPENSSL_cleanse@plt>
  mov    (%r12),%rdi
  call   <free@plt>
L114:
  mov    %r14,(%r12)
  mov    (%rsp),%rax
  mov    %eax,0x0(%r13)
  mov    $0x1,%r14d
  jmp    L31
L33:
  mov    D1(%rip),%rax
  mov    (%rax),%esi
  mov    D52(%rip),%rax
  mov    (%rax),%edi
  call   <PKCS7err@plt>
  jmp    L31
L10:
  mov    D67(%rip),%rax
  mov    (%rax),%esi
  mov    D52(%rip),%rax
  mov    (%rax),%edi
  call   <PKCS7err@plt>
  mov    $0xffffffff,%r14d
  jmp    L31
L74:
  mov    D28(%rip),%rax
  mov    (%rax),%esi
  mov    D52(%rip),%rax
  mov    (%rax),%edi
  call   <PKCS7err@plt>
  mov    %rbx,%rdi
  call   <EVP_PKEY_CTX_free@plt>
  mov    %r14,%rdi
  call   <free@plt>
  mov    $0x0,%r14d
  jmp    L64
L11:
  mov    $0xffffffff,%r14d
L31:
  mov    %rbx,%rdi
  call   <EVP_PKEY_CTX_free@plt>
L64:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L34
  mov    %r14d,%eax
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L25:
  mov    $0xffffffff,%r14d
  jmp    L31
L34:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int pkcs7_decrypt_rinfo(unsigned char **pek, int *peklen, PKCS7_RECIP_INFO *ri, EVP_PKEY *pkey) {
  EVP_PKEY_CTX *pctx = NULL;
  unsigned char *ek = NULL;
  size_t eklen;
  int ret = -1;
  pctx = EVP_PKEY_CTX_new(pkey, NULL);
  if (!pctx)
    return -1;
  if (EVP_PKEY_decrypt_init(pctx) <= 0)
    goto err;
  if (EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DECRYPT, EVP_PKEY_CTRL_PKCS7_DECRYPT, 0, ri) <= 0) {
    PKCS7err(PKCS7_F_PKCS7_DECRYPT_RINFO, PKCS7_R_CTRL_ERROR);
    goto err;
  }
  if (EVP_PKEY_decrypt(pctx, NULL, &eklen, ri->enc_key->data, ri->enc_key->length) <= 0)
    goto err;
  ek = malloc(eklen);
  if (ek == NULL) {
    PKCS7err(PKCS7_F_PKCS7_DECRYPT_RINFO, ERR_R_MALLOC_FAILURE);
    goto err;
  }
  if (EVP_PKEY_decrypt(pctx, ek, &eklen, ri->enc_key->data, ri->enc_key->length) <= 0) {
    ret = 0;
    PKCS7err(PKCS7_F_PKCS7_DECRYPT_RINFO, ERR_R_EVP_LIB);
    goto err;
  }
  ret = 1;
  if (*pek) {
    OPENSSL_cleanse(*pek, *peklen);
    free(*pek);
  }
  *pek = ek;
  *peklen = eklen;
err:
  EVP_PKEY_CTX_free(pctx);
  if (!ret && ek)
    free(ek);
  return ret;
}
```