//
// sub_4DBF98 from 0x4dbf98 to 0x4dbfd8 (64 bytes)
//
// 30 xrefs:
// > InfoLayer::onOriginal @ 0x7e165c
// > InfoLayer::onLevelInfo @ 0x7e1c98
// > InfoLayer::onLevelInfo @ 0x7e1cb4
// > InfoLayer::onLevelInfo @ 0x7e1cd0
// > InfoLayer::onLevelInfo @ 0x7e1cec
// > InfoLayer::onLevelInfo @ 0x7e1d14
// > InfoLayer::onLevelInfo @ 0x7e1d38
// > InfoLayer::onLevelInfo @ 0x7e1d5c
// > InfoLayer::onCopyLevelID @ 0x7e1f44
// > InfoLayer::onComment @ 0x7e237c
// > InfoLayer::onComment @ 0x7e23ac
// > InfoLayer::onComment @ 0x7e23c8
// > InfoLayer::commentUploadFailed @ 0x7e2614
// > InfoLayer::confirmReport @ 0x7e289c
// > InfoLayer::confirmReport @ 0x7e28b8
// > InfoLayer::confirmReport @ 0x7e28e0
// > InfoLayer::onSimilar @ 0x7e2e18
// > InfoLayer::loadPage @ 0x7e3664
// > InfoLayer::setupPageInfo @ 0x7e3b48
// > InfoLayer::setupPageInfo @ 0x7e3b74
// > InfoLayer::setupPageInfo @ 0x7e3b98
// > InfoLayer::init @ 0x7e57d0
// > InfoLayer::init @ 0x7e57f8
// > InfoLayer::init @ 0x7e5814
// > InfoLayer::init @ 0x7e5830
// > InfoLayer::init @ 0x7e584c
// > InfoLayer::init @ 0x7e5868
// > InfoLayer::init @ 0x7e5894
// > InfoLayer::init @ 0x7e58c0
// > InfoLayer::init @ 0x7e58ec
//
// 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_4DBF98(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);
}