user: 下面的汇编指令对应的C源代码是什么：

```asm
<pkcs7_encode_rinfo>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  movq   $0x0,-0x20(%rbp)
  movl   $0x0,-0x2c(%rbp)
  mov    -0x38(%rbp),%rax
  mov    0x4(%rax),%eax
  mov    %eax,%edi
  call   <X509_get_pubkey@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L124
  mov    $0x0,%eax
  jmp    L22
L124:
  mov    -0x10(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <EVP_PKEY_CTX_new@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L46
  mov    $0x0,%eax
  jmp    L22
L46:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <EVP_PKEY_encrypt_init@plt>
  test   %rax,%rax
  jle    L86
  mov    D36(%rip),%rax
  mov    (%rax),%ecx
  mov    D3(%rip),%rax
  mov    (%rax),%edx
  mov    -0x38(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    %rsi,%r9
  mov    $0x0,%r8d
  mov    $0xffffffff,%esi
  mov    %rax,%rdi
  call   <EVP_PKEY_CTX_ctrl@plt>
  test   %rax,%rax
  jg     L115
  mov    D2(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <PKCS7error@plt>
  jmp    L9
L115:
  mov    -0x44(%rbp),%esi
  mov    -0x40(%rbp),%rcx
  lea    -0x28(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %esi,%r8d
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <EVP_PKEY_encrypt@plt>
  test   %rax,%rax
  jle    L23
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  jne    L139
  mov    D38(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,%edi
  call   <PKCS7error@plt>
  jmp    L9
L139:
  mov    -0x44(%rbp),%edi
  mov    -0x40(%rbp),%rcx
  lea    -0x28(%rbp),%rdx
  mov    -0x20(%rbp),%rsi
  mov    -0x18(%rbp),%rax
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <EVP_PKEY_encrypt@plt>
  test   %rax,%rax
  jle    L101
  mov    -0x28(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    (%rax),%eax
  mov    -0x20(%rbp),%rcx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <ASN1_STRING_set0@plt>
  movq   $0x0,-0x20(%rbp)
  movl   $0x1,-0x2c(%rbp)
  jmp    L9
L86:
  nop
  jmp    L9
L23:
  nop
  jmp    L9
L101:
  nop
L9:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <EVP_PKEY_free@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <EVP_PKEY_CTX_free@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x2c(%rbp),%eax
L22:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L62
  call   <__stack_chk_fail@plt>
L62:
  leave
  ret
```

assistant: ```c
int pkcs7_encode_rinfo(PKCS7_RECIP_INFO *ri, unsigned char *key, int keylen) {
  EVP_PKEY_CTX *pctx = NULL;
  EVP_PKEY *pkey = NULL;
  unsigned char *ek = NULL;
  int ret = 0;
  size_t eklen;
  pkey = X509_get_pubkey(ri->cert);
  if (!pkey)
    return 0;
  pctx = EVP_PKEY_CTX_new(pkey, NULL);
  if (!pctx)
    return 0;
  if (EVP_PKEY_encrypt_init(pctx) <= 0)
    goto err;
  if (EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_ENCRYPT, EVP_PKEY_CTRL_PKCS7_ENCRYPT, 0, ri) <= 0) {
    PKCS7error(PKCS7_R_CTRL_ERROR);
    goto err;
  }
  if (EVP_PKEY_encrypt(pctx, NULL, &eklen, key, keylen) <= 0)
    goto err;
  ek = malloc(eklen);
  if (ek == NULL) {
    PKCS7error(ERR_R_MALLOC_FAILURE);
    goto err;
  }
  if (EVP_PKEY_encrypt(pctx, ek, &eklen, key, keylen) <= 0)
    goto err;
  ASN1_STRING_set0(ri->enc_key, ek, eklen);
  ek = NULL;
  ret = 1;
err:
  EVP_PKEY_free(pkey);
  EVP_PKEY_CTX_free(pctx);
  free(ek);
  return ret;
}
```