//
// std::__ndk1::__shared_weak_count::__release_shared from 0xf79934 to 0xf799a8 (116 bytes)
//
// 1 xrefs:
// > ??> @ 0x600a0
//
// 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:44 +0000
//
unsigned __int64 *__fastcall std::__shared_weak_count::__release_shared(unsigned __int64 *this)
{
__int64 v1; // x19
unsigned __int64 *v2; // x8
unsigned __int64 v3; // x9
unsigned __int64 *v4; // x20
unsigned __int64 v5; // x8
v1 = (__int64)this;
v2 = this + 1;
do
v3 = __ldaxr(v2);
while ( __stlxr(v3 - 1, v2) );
if ( !v3 )
{
v4 = this + 2;
this = (unsigned __int64 *)(*(__int64 (__fastcall **)(unsigned __int64 *))(*this + 16))(this);
do
v5 = __ldaxr(v4);
while ( __stlxr(v5 - 1, v4) );
if ( !v5 )
return (unsigned __int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v1 + 32LL))(v1);
}
return this;
}