//
// BIO_pop from 0x9e5be0 to 0x9e5c38 (88 bytes)
//
// 13 xrefs:
// > SSL_set0_wbio @ 0x9ab354
// > ssl_free_wbio_buffer @ 0x9ae380
// > SMIME_read_ASN1 @ 0xada8e0
// > SMIME_read_ASN1 @ 0xadaa5c
// > SMIME_read_ASN1 @ 0xadab60
// > SMIME_read_ASN1 @ 0xadace8
// > SMIME_crlf_copy @ 0xadaf6c
// > i2d_ASN1_bio_stream @ 0xadb0a4
// > PEM_write_bio_ASN1_stream @ 0xadb184
// > SMIME_write_ASN1 @ 0xadb4f4
// > SMIME_write_ASN1 @ 0xadb61c
// > SMIME_write_ASN1 @ 0xadb848
// > ??> @ 0x7551c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:07:23 +0000
//
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;
}