//
// BIO_gets from 0xff4df8 to 0xff4ef4 (252 bytes)
//
// 21 xrefs:
// > OBJ_create_objects @ 0x1040f80
// > OBJ_create_objects @ 0x1041040
// > PEM_read_bio @ 0x10463c8
// > PEM_read_bio @ 0x1046514
// > PEM_read_bio @ 0x104664c
// > PEM_read_bio @ 0x104671c
// > TXT_DB_read @ 0x105f358
// > TXT_DB_read @ 0x105f43c
// > a2i_ASN1_INTEGER @ 0x108d114
// > a2i_ASN1_INTEGER @ 0x108d234
// > a2i_ASN1_STRING @ 0x108d5f0
// > a2i_ASN1_STRING @ 0x108d6f8
// > sub_10A1D38 @ 0x10a1e18
// > OCSP_REQ_CTX_nbio @ 0x10e1950
// > sub_10EE980 @ 0x10eea08
// > sub_10EE980 @ 0x10eeb4c
// > sub_10EEBD8 @ 0x10eec30
// > SMIME_crlf_copy @ 0x10ef8bc
// > SMIME_crlf_copy @ 0x10ef920
// > sub_10FEB40 @ 0x10feb64
// > ??> @ 0xac138
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:15:47 +0000
//
__int64 __fastcall BIO_gets(__int64 a1, __int64 a2, unsigned int a3)
{
__int64 (*v6)(void); // x3
__int64 (*v7)(void); // x20
__int64 result; // x0
int v9; // w0
if ( !a1 || !*(_QWORD *)a1 || (v6 = *(__int64 (**)(void))(*(_QWORD *)a1 + 40LL)) == nullptr )
{
ERR_put_error(32, 104, 121, "crypto/bio/bio_lib.c", 276);
return 4294967294LL;
}
v7 = *(__int64 (**)(void))(a1 + 8);
if ( !v7 )
{
if ( *(_DWORD *)(a1 + 24) )
return v6();
goto LABEL_11;
}
result = v7();
if ( (int)result <= 0 )
return result;
if ( !*(_DWORD *)(a1 + 24) )
{
LABEL_11:
ERR_put_error(32, 104, 120, "crypto/bio/bio_lib.c", 286);
return 4294967294LL;
}
v9 = (*(__int64 (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a1 + 40LL))(a1, a2, a3);
return ((__int64 (__fastcall *)(__int64, __int64, __int64, _QWORD, _QWORD, _QWORD))v7)(a1, 133, a2, a3, 0, v9);
}