//
// EC_nistz256_pre_comp_free from 0xa06724 to 0xa06794 (112 bytes)
//
// 2 xrefs:
// > sub_A067A0 @ 0xa068b8
// > ??> @ 0x7bafc
//
// 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:41 +0000
//
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;
}