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     L106
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <EVP_PKEY_decrypt_init@plt>
  test   %rax,%rax
  jle    L15
  mov    D26(%rip),%rax
  xor    %r8d,%r8d
  mov    %rbx,%r9
  mov    %rbp,%rdi
  mov    $0xffffffff,%esi
  mov    (%rax),%ecx
  mov    D59(%rip),%rax
  mov    (%rax),%edx
  call   <EVP_PKEY_CTX_ctrl@plt>
  test   %rax,%rax
  jle    L36
  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    L15
  mov    0x10(%rsp),%rdi
  call   <malloc@plt>
  mov    0x8(%rsp),%rdx
  test   %rax,%rax
  mov    %rax,%r15
  je     L90
  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    L44
  mov    (%r12),%rdi
  test   %rdi,%rdi
  je     L37
  mov    0x0(%r13),%esi
  call   <OPENSSL_cleanse@plt>
  mov    (%r12),%rdi
  call   <free@plt>
L37:
  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)
L106:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L19
  add    $0x28,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L15:
  mov    $0xffffffff,%r14d
L110:
  mov    %rbp,%rdi
  call   <EVP_PKEY_CTX_free@plt>
  jmp    L106
  nopl   0x0(%rax,%rax,1)
L44:
  mov    D79(%rip),%rax
  xor    %r14d,%r14d
  mov    (%rax),%esi
  mov    D70(%rip),%rax
  mov    (%rax),%edi
  call   <PKCS7err@plt>
  mov    %rbp,%rdi
  call   <EVP_PKEY_CTX_free@plt>
  mov    %r15,%rdi
  call   <free@plt>
  jmp    L106
  nopl   0x0(%rax)
L36:
  mov    D31(%rip),%rax
  mov    (%rax),%esi
  mov    D70(%rip),%rax
  mov    (%rax),%edi
  call   <PKCS7err@plt>
  jmp    L110
L19:
  call   <__stack_chk_fail@plt>
L90:
  mov    D12(%rip),%rax
  mov    (%rax),%esi
  mov    D70(%rip),%rax
  mov    (%rax),%edi
  call   <PKCS7err@plt>
  jmp    L110
```

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