//
// __cxa_allocate_dependent_exception from 0x779788 to 0x77980e (134 bytes)
//
// 1 xrefs:
// > std::rethrow_exception @ 0x779cd8
//
// 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
//
char *_cxa_allocate_dependent_exception()
{
char *v0; // r4
int v2; // r3
unsigned int i; // r2
v0 = (char *)malloc(0x78u);
if ( !v0 )
{
if ( &pthread_create && pthread_mutex_lock((pthread_mutex_t *)&dword_ACECC0) )
sub_756FA8();
v2 = 0;
for ( i = dword_ACDDBC; (i & 1) != 0; i >>= 1 )
{
if ( ++v2 == 32 )
std::terminate();
}
v0 = (char *)&unk_ACDDC0 + 120 * v2;
dword_ACDDBC |= 1 << v2;
if ( &pthread_create && pthread_mutex_unlock((pthread_mutex_t *)&dword_ACECC0) )
sub_756274();
}
memset(v0, 0, 0x78u);
return v0;
}