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

```asm
<pkcs7_decrypt_rinfo>:
  endbr64
  push   %r15
  push   %r14
  mov    $0xffffffff,%r14d
  push   %r13
  mov    %rsi,%r13
  xor    %esi,%esi
  push   %r12
  mov    %rdi,%r12
  mov    %rcx,%rdi
  push   %rbp
  push   %rbx
  mov    %rdx,%rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <EVP_PKEY_CTX_new@plt>
  test   %rax,%rax
  je     L70
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <EVP_PKEY_decrypt_init@plt>
  test   %rax,%rax
  jle    L16
  mov    D44(%rip),%rax
  xor    %r8d,%r8d
  mov    %rbx,%r9
  mov    %rbp,%rdi
  mov    $0xffffffff,%esi
  mov    (%rax),%ecx
  mov    D34(%rip),%rax
  mov    (%rax),%edx
  call   <EVP_PKEY_CTX_ctrl@plt>
  test   %rax,%rax
  jle    L68
  mov    (%rbx),%rax
  lea    0x10(%rsp),%rdx
  xor    %esi,%esi
  mov    %rbp,%rdi
  mov    %rdx,0x8(%rsp)
  mov    0x4(%rax),%ecx
  mov    (%rax),%r8d
  call   <EVP_PKEY_decrypt@plt>
  test   %rax,%rax
  jle    L16
  mov    0x10(%rsp),%rdi
  call   <malloc@plt>
  mov    0x8(%rsp),%rdx
  test   %rax,%rax
  mov    %rax,%r15
  je     L89
  mov    (%rbx),%rax
  mov    %r15,%rsi
  mov    %rbp,%rdi
  mov    0x4(%rax),%ecx
  mov    (%rax),%r8d
  call   <EVP_PKEY_decrypt@plt>
  test   %rax,%rax
  jle    L77
  mov    (%r12),%rdi
  test   %rdi,%rdi
  je     L53
  mov    0x0(%r13),%esi
  call   <OPENSSL_cleanse@plt>
  mov    (%r12),%rdi
  call   <free@plt>
L53:
  mov    0x10(%rsp),%rax
  mov    %r15,(%r12)
  mov    %rbp,%rdi
  mov    $0x1,%r14d
  mov    %eax,0x0(%r13)
  call   <EVP_PKEY_CTX_free@plt>
  nopw   0x0(%rax,%rax,1)
L70:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L18
  add    $0x28,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L16:
  mov    $0xffffffff,%r14d
L12:
  mov    %rbp,%rdi
  call   <EVP_PKEY_CTX_free@plt>
  jmp    L70
  nopl   0x0(%rax,%rax,1)
L77:
  mov    D3(%rip),%rax
  xor    %r14d,%r14d
  mov    (%rax),%esi
  mov    D76(%rip),%rax
  mov    (%rax),%edi
  call   <PKCS7err@plt>
  mov    %rbp,%rdi
  call   <EVP_PKEY_CTX_free@plt>
  mov    %r15,%rdi
  call   <free@plt>
  jmp    L70
  nopl   0x0(%rax)
L68:
  mov    D17(%rip),%rax
  mov    (%rax),%esi
  mov    D76(%rip),%rax
  mov    (%rax),%edi
  call   <PKCS7err@plt>
  jmp    L12
L18:
  call   <__stack_chk_fail@plt>
L89:
  mov    D52(%rip),%rax
  mov    (%rax),%esi
  mov    D76(%rip),%rax
  mov    (%rax),%edi
  call   <PKCS7err@plt>
  jmp    L12
```

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