//
// BIO_pop from 0x7d0fe0 to 0x7d1038 (88 bytes)
//
// 13 xrefs:
// > SSL_set0_wbio @ 0x796750
// > ssl_free_wbio_buffer @ 0x79977c
// > SMIME_read_ASN1 @ 0x8c58e0
// > SMIME_read_ASN1 @ 0x8c5a5c
// > SMIME_read_ASN1 @ 0x8c5b60
// > SMIME_read_ASN1 @ 0x8c5ce8
// > SMIME_crlf_copy @ 0x8c5f6c
// > i2d_ASN1_bio_stream @ 0x8c60a4
// > PEM_write_bio_ASN1_stream @ 0x8c6184
// > SMIME_write_ASN1 @ 0x8c64f4
// > SMIME_write_ASN1 @ 0x8c661c
// > SMIME_write_ASN1 @ 0x8c6848
// > ??> @ 0x5ba9c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall BIO_pop(_DWORD *a1)
{
int v2; // r5
int v3; // r3
int result; // r0
int v5; // r2
if ( !a1 )
return 0;
v2 = a1[9];
BIO_ctrl(a1, 7, 0, (int)a1);
v3 = a1[10];
result = v2;
if ( v3 )
*(_DWORD *)(v3 + 36) = a1[9];
v5 = a1[9];
if ( v5 )
*(_DWORD *)(v5 + 40) = v3;
a1[9] = 0;
a1[10] = 0;
return result;
}