//
// sub_4DD420 from 0x4dd420 to 0x4dd460 (64 bytes)
//
// 16 xrefs:
// > SetupCameraRotatePopup::onEasingRate @ 0x9abd34
// > SetupCameraRotatePopup::onEasingRate @ 0x9abd50
// > SetupCameraRotatePopup::updateEasingRateLabel @ 0x9abea0
// > SetupCameraRotatePopup::updateEasingLabel @ 0x9ac0e4
// > SetupCameraRotatePopup::updateEasingLabel @ 0x9ac100
// > SetupCameraRotatePopup::updateDurLabel @ 0x9ac278
// > SetupCameraRotatePopup::updateDegreesLabel @ 0x9ac3b0
// > SetupCameraRotatePopup::init @ 0x9ad3d4
// > SetupCameraRotatePopup::init @ 0x9ad400
// > SetupCameraRotatePopup::init @ 0x9ad444
// > SetupCameraRotatePopup::init @ 0x9ad474
// > SetupCameraRotatePopup2::init @ 0x9ae258
// > SetupCameraRotatePopup2::init @ 0x9ae280
// > SetupCameraRotatePopup2::init @ 0x9ae2a4
// > SetupCameraRotatePopup2::init @ 0x9ae2dc
// > SetupCameraRotatePopup2::init @ 0x9ae300
//
// 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_4DD420(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);
}