//
// sub_F86AE4 from 0xf86ae4 to 0xf86b54 (112 bytes)
//
// 0 xrefs:
//
// 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:13:53 +0000
//
__int64 __fastcall sub_F86AE4(__int64 a1, std::__shared_count *a2)
{
std::__shared_count **v2; // x8
__int64 result; // x0
std::__shared_count *v4[2]; // [xsp+0h] [xbp-10h] BYREF
v4[1] = *(std::__shared_count **)(_ReadStatusReg(TPIDR_EL0) + 40);
v4[0] = a2;
v2 = *(std::__shared_count ***)(a1 + 8);
if ( v2 == *(std::__shared_count ***)(a1 + 16) )
{
sub_F86DD4(a1, v4);
}
else
{
*v2 = a2;
*(_QWORD *)(a1 + 8) += 8LL;
}
result = std::__shared_count::__add_shared((__int64)v4[0]);
_ReadStatusReg(TPIDR_EL0);
return result;
}