//
// sub_4DD860 from 0x4dd860 to 0x4dd8a0 (64 bytes)
//
// 91 xrefs:
// > SelectPremadeLayer::init @ 0xa17b20
// > SetupAdvFollowRetargetPopup::valueDidChange @ 0xa17da8
// > SetupAdvFollowRetargetPopup::valueDidChange @ 0xa17dd4
// > SetupAdvFollowRetargetPopup::updateDefaultTriggerValues @ 0xa17ff4
// > SetupAdvFollowPopup::updateDefaultTriggerValues @ 0xa18220
// > SetupAdvFollowPopup::valueDidChange @ 0xa184c0
// > SetupAdvFollowPopup::valueDidChange @ 0xa184dc
// > SetupAdvFollowPopup::init @ 0xa1c104
// > SetupAdvFollowPopup::init @ 0xa1c12c
// > SetupAdvFollowPopup::init @ 0xa1c150
// > SetupAdvFollowPopup::init @ 0xa1c174
// > SetupAdvFollowPopup::init @ 0xa1c198
// > SetupAdvFollowPopup::init @ 0xa1c1bc
// > SetupAdvFollowPopup::init @ 0xa1c1e0
// > SetupAdvFollowPopup::init @ 0xa1c204
// > SetupAdvFollowPopup::init @ 0xa1c228
// > SetupAdvFollowPopup::init @ 0xa1c24c
// > SetupAdvFollowPopup::init @ 0xa1c274
// > SetupAdvFollowPopup::init @ 0xa1c298
// > SetupAdvFollowPopup::init @ 0xa1c2c0
// > SetupAdvFollowPopup::init @ 0xa1c2e4
// > SetupAdvFollowPopup::init @ 0xa1c308
// > SetupAdvFollowPopup::init @ 0xa1c32c
// > SetupAdvFollowPopup::init @ 0xa1c354
// > SetupAdvFollowPopup::init @ 0xa1c37c
// > SetupAdvFollowPopup::init @ 0xa1c3a0
// > SetupAdvFollowPopup::init @ 0xa1c3c4
// > SetupAdvFollowPopup::init @ 0xa1c3e8
// > SetupAdvFollowPopup::init @ 0xa1c40c
// > SetupAdvFollowPopup::init @ 0xa1c430
// > SetupAdvFollowPopup::init @ 0xa1c454
// > SetupAdvFollowPopup::init @ 0xa1c478
// > SetupAdvFollowPopup::init @ 0xa1c49c
// > SetupAdvFollowPopup::init @ 0xa1c4c0
// > SetupAdvFollowPopup::init @ 0xa1c4e4
// > SetupAdvFollowPopup::init @ 0xa1c508
// > SetupAdvFollowPopup::init @ 0xa1c52c
// > SetupAdvFollowPopup::init @ 0xa1c550
// > SetupAdvFollowPopup::init @ 0xa1c574
// > SetupAdvFollowPopup::init @ 0xa1c598
// > SetupAdvFollowPopup::init @ 0xa1c5bc
// > SetupAdvFollowPopup::init @ 0xa1c5e0
// > SetupAdvFollowPopup::init @ 0xa1c604
// > SetupAdvFollowPopup::init @ 0xa1c628
// > SetupAdvFollowPopup::init @ 0xa1c64c
// > SetupAdvFollowPopup::init @ 0xa1c670
// > SetupAdvFollowPopup::init @ 0xa1c694
// > SetupAdvFollowPopup::init @ 0xa1c6b8
// > SetupAdvFollowPopup::init @ 0xa1c6dc
// > SetupAdvFollowPopup::init @ 0xa1c700
// > SetupAdvFollowPopup::init @ 0xa1c724
// > SetupAdvFollowPopup::init @ 0xa1c748
// > SetupAdvFollowPopup::init @ 0xa1c76c
// > SetupAdvFollowPopup::init @ 0xa1c790
// > SetupAdvFollowPopup::init @ 0xa1c7b4
// > SetupAdvFollowPopup::init @ 0xa1c7d8
// > SetupAdvFollowPopup::init @ 0xa1c7fc
// > SetupAdvFollowPopup::init @ 0xa1c820
// > SetupAdvFollowPopup::init @ 0xa1c844
// > SetupAdvFollowPopup::init @ 0xa1c868
// > SetupAdvFollowPopup::init @ 0xa1c88c
// > SetupAdvFollowPopup::init @ 0xa1c8b0
// > SetupAdvFollowPopup::init @ 0xa1c8d4
// > SetupAdvFollowPopup::init @ 0xa1c8f8
// > SetupAdvFollowPopup::init @ 0xa1c91c
// > SetupAdvFollowPopup::init @ 0xa1c940
// > SetupAdvFollowPopup::init @ 0xa1c964
// > SetupAdvFollowPopup::init @ 0xa1c988
// > SetupAdvFollowPopup::init @ 0xa1c9ac
// > SetupAdvFollowPopup::init @ 0xa1c9d0
// > SetupAdvFollowPopup::init @ 0xa1c9f4
// > SetupAdvFollowPopup::init @ 0xa1ca18
// > SetupAdvFollowPopup::init @ 0xa1ca3c
// > SetupAdvFollowPopup::init @ 0xa1ca60
// > SetupAdvFollowPopup::init @ 0xa1ca84
// > SetupAdvFollowPopup::init @ 0xa1caa8
// > SetupAdvFollowPopup::init @ 0xa1cacc
// > SetupAdvFollowPopup::init @ 0xa1caf0
// > SetupAdvFollowPopup::init @ 0xa1cb14
// > SetupAdvFollowEditPhysicsPopup::init @ 0xa1e260
// > SetupAdvFollowEditPhysicsPopup::init @ 0xa1e288
// > SetupAdvFollowEditPhysicsPopup::init @ 0xa1e2c4
// > SetupAdvFollowEditPhysicsPopup::init @ 0xa1e2f4
// > SetupAdvFollowEditPhysicsPopup::init @ 0xa1e330
// > SetupAdvFollowEditPhysicsPopup::init @ 0xa1e358
// > SetupAdvFollowRetargetPopup::init @ 0xa1ed0c
// > SetupAdvFollowRetargetPopup::init @ 0xa1ed34
// > SetupAdvFollowRetargetPopup::init @ 0xa1ed58
// > SetupAdvFollowRetargetPopup::init @ 0xa1ed90
// > SetupAdvFollowRetargetPopup::init @ 0xa1edbc
// > SetupAdvFollowRetargetPopup::init @ 0xa1ede0
//
// 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_4DD860(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);
}