//
// __cxa_free_exception from 0x7796ec to 0x779770 (132 bytes)
//
// 18 xrefs:
// > std::unexpected @ 0x743a1a
// > ??> @ 0x773096
// > ??> @ 0x773116
// > ??> @ 0x773196
// > ??> @ 0x773216
// > ??> @ 0x773296
// > ??> @ 0x77333e
// > ??> @ 0x7733be
// > ??> @ 0x77343e
// > ??> @ 0x7734be
// > ??> @ 0x77353e
// > ??> @ 0x7735be
// > ??> @ 0x77363a
// > ??> @ 0x7736d4
// > ??> @ 0x773760
// > ??> @ 0x776bbe
// > sub_779AE8 @ 0x779b28
// > std::__exception_ptr::exception_ptr::_M_release @ 0x779bc8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void _cxa_free_exception(void *a1)
{
_BOOL4 v1; // r2
unsigned int v2; // r4
v1 = a1 >= &unk_ACECC8;
if ( a1 >= &byte_AD2CC8 )
v1 = 0;
if ( v1 )
{
v2 = (unsigned int)((_BYTE *)a1 - (_BYTE *)&unk_ACECC8) >> 9;
if ( &pthread_create )
{
if ( pthread_mutex_lock((pthread_mutex_t *)&dword_ACECC0) )
sub_756FA8();
dword_ACECC4 &= ~(1 << v2);
if ( pthread_mutex_unlock((pthread_mutex_t *)&dword_ACECC0) )
sub_756274();
}
else
{
dword_ACECC4 &= ~(1 << v2);
}
}
else
{
sub_8E4210((char *)a1 - 128);
}
}