user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<SSL_use_RSAPrivateKey_file>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x44(%rbp)
  movl   $0x0,-0x24(%rbp)
  movq   $0x0,-0x20(%rbp)
  mov    $0x0,%eax
  call   <BIO_s_file@plt>
  mov    %eax,%edi
  call   <BIO_new@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L68
  mov    D6(%rip),%rax
  mov    (%rax),%edx
  mov    D91(%rip),%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <ERR_raise@plt>
  jmp    L0
L68:
  mov    -0x40(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <BIO_read_filename@plt>
  test   %rax,%rax
  jg     L79
  mov    D65(%rip),%rax
  mov    (%rax),%edx
  mov    D91(%rip),%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <ERR_raise@plt>
  jmp    L0
L79:
  mov    D63(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x44(%rbp)
  jne    L62
  mov    D86(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x18(%rbp),%rax
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <d2i_RSAPrivateKey_bio@plt>
  mov    %rax,-0x20(%rbp)
  jmp    L87
L62:
  mov    D57(%rip),%rax
  mov    (%rax),%eax
  cmp    %eax,-0x44(%rbp)
  jne    L91
  mov    D83(%rip),%rax
  mov    (%rax),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <SSL_get_default_passwd_cb_userdata@plt>
  mov    %eax,%ebx
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <SSL_get_default_passwd_cb@plt>
  mov    %eax,%edx
  mov    -0x18(%rbp),%rax
  mov    %ebx,%ecx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <PEM_read_bio_RSAPrivateKey@plt>
  mov    %rax,-0x20(%rbp)
  jmp    L87
L91:
  mov    D104(%rip),%rax
  mov    (%rax),%edx
  mov    D91(%rip),%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <ERR_raise@plt>
  jmp    L0
L87:
  cmpq   $0x0,-0x20(%rbp)
  jne    L12
  mov    D91(%rip),%rax
  mov    (%rax),%eax
  mov    -0x28(%rbp),%edx
  mov    %edx,%esi
  mov    %eax,%edi
  call   <ERR_raise@plt>
  jmp    L0
L12:
  mov    -0x20(%rbp),%rdx
  mov    -0x38(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <SSL_use_RSAPrivateKey@plt>
  mov    %eax,-0x24(%rbp)
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <RSA_free@plt>
L0:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <BIO_free@plt>
  mov    -0x24(%rbp),%eax
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

assistant: ```c
int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type) {
  int j, ret = 0;
  BIO *in;
  RSA *rsa = NULL;
  in = BIO_new(BIO_s_file());
  if (in == NULL) {
    ERR_raise(ERR_LIB_SSL, ERR_R_BUF_LIB);
    goto end;
  }
  if (BIO_read_filename(in, file) <= 0) {
    ERR_raise(ERR_LIB_SSL, ERR_R_SYS_LIB);
    goto end;
  }
  if (type == SSL_FILETYPE_ASN1) {
    j = ERR_R_ASN1_LIB;
    rsa = d2i_RSAPrivateKey_bio(in, NULL);
  } else if (type == SSL_FILETYPE_PEM) {
    j = ERR_R_PEM_LIB;
    rsa = PEM_read_bio_RSAPrivateKey(in, NULL, SSL_get_default_passwd_cb(ssl), SSL_get_default_passwd_cb_userdata(ssl));
  } else {
    ERR_raise(ERR_LIB_SSL, SSL_R_BAD_SSL_FILETYPE);
    goto end;
  }
  if (rsa == NULL) {
    ERR_raise(ERR_LIB_SSL, j);
    goto end;
  }
  ret = SSL_use_RSAPrivateKey(ssl, rsa);
  RSA_free(rsa);
end:
  BIO_free(in);
  return ret;
}
```