//
// __cxa_decrement_exception_refcount from 0xf88654 to 0xf8869c (72 bytes)
//
// 7 xrefs:
// > std::exception_ptr::~exception_ptr @ 0xf41ed8
// > std::exception_ptr::operator= @ 0xf41f18
// > std::nested_exception::~nested_exception @ 0xf41fa4
// > std::nested_exception::~nested_exception @ 0xf41fcc
// > std::nested_exception::rethrow_nested @ 0xf41ffc
// > std::nested_exception::rethrow_nested @ 0xf42028
// > ??> @ 0xb1a60
//
// 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:54 +0000
//
__int64 __fastcall _cxa_decrement_exception_refcount(__int64 result)
{
unsigned __int64 *v1; // x19
unsigned __int64 v2; // x8
unsigned __int64 v3; // x8
void (*v4)(void); // x8
if ( result )
{
v1 = (unsigned __int64 *)(result - 120);
do
{
v2 = __ldaxr(v1);
v3 = v2 - 1;
}
while ( __stlxr(v3, v1) );
if ( !v3 )
{
v4 = *(void (**)(void))(result - 104);
if ( v4 )
v4();
return _cxa_free_dependent_exception_0(v1);
}
}
return result;
}