//
// EC_GROUP_clear_free from 0x100fa1c to 0x100fab8 (156 bytes)
//
// 6 xrefs:
// > EC_GROUP_new_from_ecparameters @ 0x100c0bc
// > d2i_ECPKParameters @ 0x100c890
// > d2i_ECPrivateKey @ 0x100ca0c
// > EC_GROUP_new_curve_GFp @ 0x100dc7c
// > EC_GROUP_new_curve_GF2m @ 0x100dcf0
// > ??> @ 0x75fe8
//
// 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:16:02 +0000
//
__int64 __fastcall EC_GROUP_clear_free(__int64 result)
{
__int64 v1; // x19
void (*v2)(void); // x1
v1 = result;
if ( result )
{
v2 = *(void (**)(void))(*(_QWORD *)result + 24LL);
if ( v2 || (v2 = *(void (**)(void))(*(_QWORD *)result + 16LL)) != nullptr )
v2();
EC_pre_comp_free(v1);
BN_MONT_CTX_free(*(_QWORD *)(v1 + 144));
EC_POINT_clear_free(*(_QWORD *)(v1 + 8));
BN_clear_free(*(_BYTE **)(v1 + 16));
BN_clear_free(*(_BYTE **)(v1 + 24));
CRYPTO_clear_free(*(_QWORD *)(v1 + 48), *(_QWORD *)(v1 + 56), "crypto/ec/ec_lib.c", 126);
return CRYPTO_clear_free(v1, 168, "crypto/ec/ec_lib.c", 127);
}
return result;
}