//
// __cxa_free_dependent_exception from 0xd1ed88 to 0xd1ee68 (224 bytes)
//
// 2 xrefs:
// > sub_D1F048 @ 0xd1f064
// > ??> @ 0x39a80
//
// 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 __fastcall _cxa_free_dependent_exception(__int64 *a1)
{
unsigned int v1; // w19
if ( a1 < qword_124B700 || a1 >= &qword_124D300 )
{
free(a1);
}
else
{
v1 = ((unsigned int)a1 - (unsigned int)qword_124B700) / 0x70;
if ( &pthread_create )
{
if ( pthread_mutex_lock((pthread_mutex_t *)&qword_124D300) )
sub_CEAFC4();
qword_124B6F0 &= ~(1LL << v1);
if ( pthread_mutex_unlock((pthread_mutex_t *)&qword_124D300) )
sub_CE9C50();
}
else
{
qword_124B6F0 &= ~(1LL << v1);
}
}
}