//
// sub_4DD120 from 0x4dd120 to 0x4dd160 (64 bytes)
//
// 14 xrefs:
// > SetupCameraOffsetTrigger::onEasingRate @ 0x967494
// > SetupCameraOffsetTrigger::onEasingRate @ 0x9674b0
// > SetupCameraOffsetTrigger::updateEasingRateLabel @ 0x967674
// > SetupCameraOffsetTrigger::updateEasingLabel @ 0x9678b8
// > SetupCameraOffsetTrigger::updateEasingLabel @ 0x9678d4
// > SetupCameraOffsetTrigger::updateDurLabel @ 0x967a4c
// > SetupCameraOffsetTrigger::updateValueXLabel @ 0x967b94
// > SetupCameraOffsetTrigger::updateValueYLabel @ 0x967cd8
// > SetupCameraOffsetTrigger::init @ 0x968f1c
// > SetupCameraOffsetTrigger::init @ 0x968f2c
// > SetupCameraOffsetTrigger::init @ 0x968f5c
// > SetupCameraOffsetTrigger::init @ 0x968f7c
// > SetupCameraOffsetTrigger::init @ 0x968fa8
// > SetupCameraOffsetTrigger::init @ 0x968fd4
//
// 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_4DD120(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);
}