//
// sub_4DD4E0 from 0x4dd4e0 to 0x4dd520 (64 bytes)
//
// 16 xrefs:
// > CreateParticlePopup::onCopySettings @ 0x9c161c
// > CreateParticlePopup::onCopySettings @ 0x9c1638
// > CreateParticlePopup::updateInputNodeStringForType @ 0x9c36cc
// > CreateParticlePopup::updateInputNodeStringForType @ 0x9c36f4
// > CreateParticlePopup::createParticleSlider @ 0x9c4040
// > CreateParticlePopup::createParticleSlider @ 0x9c405c
// > CreateParticlePopup::onClose @ 0x9c5268
// > CreateParticlePopup::init @ 0x9c91c8
// > CreateParticlePopup::init @ 0x9c9214
// > CreateParticlePopup::init @ 0x9c9240
// > CreateParticlePopup::init @ 0x9c9270
// > CreateParticlePopup::init @ 0x9c92a0
// > CreateParticlePopup::init @ 0x9c92cc
// > CreateParticlePopup::create @ 0x9c9658
// > CreateParticlePopup::create @ 0x9c9760
// > CreateParticlePopup::create @ 0x9c9854
//
// 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_4DD4E0(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);
}