//
// sub_4DBFD8 from 0x4dbfd8 to 0x4dc018 (64 bytes)
//
// 14 xrefs:
// > LocalLevelManager::sharedState @ 0x7e891c
// > LocalLevelManager::getLevelsInNameGroups @ 0x7e8b3c
// > LocalLevelManager::getAllLevelsInDict @ 0x7e8d08
// > LocalLevelManager::getAllLevelsInDict @ 0x7e8d38
// > LocalLevelManager::updateLevelRevision @ 0x7e93ac
// > LocalLevelManager::updateLevelRevision @ 0x7e93d4
// > LocalLevelManager::updateLevelRevision @ 0x7e9408
// > LocalLevelManager::dataLoaded @ 0x7ea1d0
// > LocalLevelManager::dataLoaded @ 0x7ea204
// > LocalLevelManager::dataLoaded @ 0x7ea22c
// > LocalLevelManager::dataLoaded @ 0x7ea248
// > LocalLevelManager::tryLoadMainLevelString @ 0x7ea534
// > LocalLevelManager::tryLoadMainLevelString @ 0x7ea550
// > LocalLevelManager::tryLoadMainLevelString @ 0x7ea57c
//
// 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 sub_4DBFD8(void *p)
{
unsigned int *v1; // x3
int v2; // w2
if ( &pthread_create )
{
v1 = (unsigned int *)((char *)p + 16);
do
v2 = __ldaxr(v1);
while ( __stlxr(v2 - 1, v1) );
}
else
{
v2 = *((_DWORD *)p + 4);
*((_DWORD *)p + 4) = v2 - 1;
}
if ( v2 <= 0 )
operator delete(p);
}