//
// EC_nistz256_pre_comp_free from 0x101634c to 0x10163c0 (116 bytes)
//
// 2 xrefs:
// > sub_10163C0 @ 0x10164bc
// > ??> @ 0x5b1e0
//
// 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:05 +0000
//
__int64 __fastcall EC_nistz256_pre_comp_free(__int64 result)
{
__int64 v1; // x19
int v2; // [xsp+2Ch] [xbp+2Ch] BYREF
if ( result )
{
v1 = result;
CRYPTO_atomic_add(result + 32, 0xFFFFFFFFLL, &v2, *(_QWORD *)(result + 40));
result = (unsigned int)v2;
if ( v2 <= 0 )
{
CRYPTO_free(*(_QWORD *)(v1 + 24), "crypto/ec/ecp_nistz256.c", 1487);
CRYPTO_THREAD_lock_free(*(_QWORD *)(v1 + 40));
return CRYPTO_free(v1, "crypto/ec/ecp_nistz256.c", 1489);
}
}
return result;
}