//
// EC_nistz256_pre_comp_free from 0x7f1b24 to 0x7f1b94 (112 bytes)
//
// 2 xrefs:
// > sub_7F1BA0 @ 0x7f1cb8
// > ??> @ 0x6207c
//
// 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 EC_nistz256_pre_comp_free(int result)
{
int v1; // r4
int v2; // [sp+4h] [bp-14h] BYREF
if ( result )
{
v1 = result;
result = CRYPTO_atomic_add(result + 16, -1, &v2, *(_DWORD *)(result + 20));
if ( v2 <= 0 )
{
CRYPTO_free(*(_DWORD *)(v1 + 12), "crypto/ec/ecp_nistz256.c", 1487);
CRYPTO_THREAD_lock_free(*(_DWORD *)(v1 + 20));
return CRYPTO_free(v1, "crypto/ec/ecp_nistz256.c", 1489);
}
}
return result;
}