//
// __cxa_decrement_exception_refcount from 0x97fc8a to 0x97fcc6 (60 bytes)
//
// 9 xrefs:
// > std::exception_ptr::~exception_ptr @ 0x95423e
// > std::exception_ptr::operator= @ 0x95426e
// > std::nested_exception::~nested_exception @ 0x9542be
// > std::nested_exception::~nested_exception @ 0x9542de
// > std::nested_exception::rethrow_nested @ 0x9542fc
// > std::nested_exception::rethrow_nested @ 0x95431a
// > sub_97FAC4 @ 0x97facc
// > __cxa_end_catch @ 0x97fc70
// > sub_97FE5C @ 0x97fe6a
//
// 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:06:06 +0000
//
void __fastcall _cxa_decrement_exception_refcount(_DWORD *a1)
{
unsigned int *v2; // r0
unsigned int v3; // r1
void (__fastcall *v4)(_DWORD *); // r1
if ( a1 )
{
v2 = a1 - 32;
__dmb(0xBu);
do
v3 = __ldrex(v2);
while ( __strex(v3 - 1, v2) );
__dmb(0xBu);
if ( v3 == 1 )
{
v4 = (void (__fastcall *)(_DWORD *))*(a1 - 30);
if ( v4 )
v4(a1);
_cxa_free_exception(a1);
}
}
}