//
// sub_4DCBA0 from 0x4dcba0 to 0x4dcbe0 (64 bytes)
//
// 13 xrefs:
// > GJPFollowCommandLayer::updateDurLabel @ 0x9229fc
// > GJPFollowCommandLayer::updateXModLabel @ 0x922b34
// > GJPFollowCommandLayer::updateYModLabel @ 0x922c6c
// > GJPFollowCommandLayer::updateOffsetLabel @ 0x922db4
// > GJPFollowCommandLayer::updateMaxSpeedLabel @ 0x922ee8
// > GJPFollowCommandLayer::updateTextInputLabel @ 0x923020
// > GJPFollowCommandLayer::init @ 0x924610
// > GJPFollowCommandLayer::init @ 0x92463c
// > GJPFollowCommandLayer::init @ 0x924678
// > GJPFollowCommandLayer::init @ 0x9246a0
// > GJPFollowCommandLayer::init @ 0x9246d0
// > GJPFollowCommandLayer::init @ 0x9246f8
// > GJPFollowCommandLayer::init @ 0x92471c
//
// 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_4DCBA0(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);
}