//
// sub_4DDBA0 from 0x4ddba0 to 0x4ddbe0 (64 bytes)
//
// 27 xrefs:
// > GJPathPage::onIconInfo @ 0xa6d40c
// > GJPathPage::onIconInfo @ 0xa6d428
// > GJPathPage::unlockAnimationStep2 @ 0xa6d760
// > GJPathSprite::init @ 0xa6db64
// > GJPathSprite::changeToLockedArt @ 0xa6dee0
// > GJPathSprite::changeToLockedArt @ 0xa6defc
// > GJPathPage::playUnlockAnimation @ 0xa6e408
// > GJPathPage::playUnlockAnimation @ 0xa6e434
// > GJPathSprite::addRankLabel @ 0xa6e5d4
// > GJPathSprite::addShardSprite @ 0xa6e8bc
// > GJPathPage::unlockAnimationStep3 @ 0xa6ee2c
// > GJPathPage::unlockAnimationStep3 @ 0xa6ee48
// > GJPathPage::init @ 0xa70e1c
// > GJPathPage::init @ 0xa70e48
// > GJPathPage::init @ 0xa70e80
// > GJPathPage::init @ 0xa70eac
// > GJPathPage::init @ 0xa70edc
// > GJPathPage::init @ 0xa70f08
// > GJPathPage::init @ 0xa70f38
// > GJPathPage::showCantAffordMessage @ 0xa71d64
// > GJPathPage::showCantAffordMessage @ 0xa71d80
// > GJPathPage::showCantAffordMessage @ 0xa71dac
// > GJPathPage::showCantAffordMessage @ 0xa71dd0
// > GJPathPage::showCantAffordMessage @ 0xa71df4
// > GJPathPage::showCantAffordMessage @ 0xa71e24
// > GJPathPage::showCantAffordMessage @ 0xa71e48
// > GJPathPage::onUnlock @ 0xa71fac
//
// 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_4DDBA0(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);
}