//
// GJBaseGameLayer::unclaimParticle from 0x9af43c to 0x9af614 (472 bytes)
//
// 2 xrefs:
// > GameObject::unclaimParticle @ 0x76cdec
// > ??> @ 0x7dbc0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:58:14 +0000
//
__int64 __fastcall GJBaseGameLayer::unclaimParticle(GJBaseGameLayer *this, char *a2, cocos2d::CCParticleSystemQuad *a3)
{
size_t v6; // x0
__int64 v7; // x24
cocos2d::CCArray *v8; // x25
size_t v9; // x0
char *v10; // x1
__int64 v11; // x21
cocos2d::CCArray *v12; // x21
__int64 v14[2]; // [xsp+58h] [xbp+58h] BYREF
void *v15; // [xsp+68h] [xbp+68h]
__int64 v16[2]; // [xsp+70h] [xbp+70h] BYREF
void *v17; // [xsp+80h] [xbp+80h]
if ( a3 )
{
v16[0] = 0;
v16[1] = 0;
v17 = nullptr;
v6 = strlen(a2);
v7 = *((_QWORD *)this + 1535);
std::string::__init(v16, a2, v6);
v8 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v7, v16);
if ( (v16[0] & 1) != 0 )
operator delete(v17);
if ( v8 )
{
v14[0] = 0;
v14[1] = 0;
v15 = nullptr;
v9 = strlen(a2);
v10 = a2;
v11 = *((_QWORD *)this + 1535);
std::string::__init(v14, v10, v9);
GJBaseGameLayer::getParticleKey2((char *)v14, v16);
v12 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v11, v16);
if ( (v16[0] & 1) != 0 )
{
operator delete(v17);
if ( (v14[0] & 1) == 0 )
goto LABEL_7;
}
else if ( (v14[0] & 1) == 0 )
{
LABEL_7:
cocos2d::CCArray::addObject(v8, a3);
cocos2d::CCArray::removeObject(v12, a3, 1);
cocos2d::CCArray::removeObject(*((cocos2d::CCArray **)this + 1544), a3, 1);
(*(void (__fastcall **)(cocos2d::CCParticleSystemQuad *, _QWORD))(*(_QWORD *)a3 + 344LL))(a3, 0);
(*(void (__fastcall **)(cocos2d::CCParticleSystemQuad *, _QWORD))(*(_QWORD *)a3 + 528LL))(a3, 0);
return _stack_chk_guard;
}
operator delete(v15);
goto LABEL_7;
}
}
return _stack_chk_guard;
}