//
// GameObject::createAndAddParticle from 0x1002f696c to 0x1002f6a3c (208 bytes)
//
// 35 xrefs:
// > GameObject::customSetup @ 0x1002f4648
// > GameObject::customSetup @ 0x1002f5448
// > GameObject::customSetup @ 0x1002f5500
// > GameObject::customSetup @ 0x1002f560c
// > GameObject::customSetup @ 0x1002f56c8
// > GameObject::customSetup @ 0x1002f5768
// > GameObject::customSetup @ 0x1002f57f4
// > GameObject::customSetup @ 0x1002f5918
// > GameObject::customSetup @ 0x1002f59a0
// > GameObject::customSetup @ 0x1002f5a30
// > GameObject::customSetup @ 0x1002f5ac0
// > GameObject::customSetup @ 0x1002f5b4c
// > GameObject::customSetup @ 0x1002f5bd8
// > GameObject::customSetup @ 0x1002f5cdc
// > GameObject::customSetup @ 0x1002f5e9c
// > GameObject::customSetup @ 0x1002f5f10
// > GameObject::customSetup @ 0x1002f5ff0
// > GameObject::customSetup @ 0x1002f60f0
// > GameObject::customSetup @ 0x1002f6184
// > GameObject::customSetup @ 0x1002f61f0
// > GameObject::customSetup @ 0x1002f6260
// > GameObject::customSetup @ 0x1002f6350
// > GameObject::customSetup @ 0x1002f63e4
// > GameObject::customSetup @ 0x1002f64fc
// > GameObject::customSetup @ 0x1002f6588
// > GameObject::customSetup @ 0x1002f6608
// > GameObject::customSetup @ 0x1002f66d4
// > GameObject::customSetup @ 0x1002f6790
// > GameObject::customSetup @ 0x1002f6850
// > sub_1002F68BC @ 0x1002f693c
// > EnhancedGameObject::updateUserCoin @ 0x1002fc858
// > EnhancedGameObject::customSetup @ 0x1003016cc
// > EnhancedGameObject::customSetup @ 0x100301948
// > EnhancedGameObject::customSetup @ 0x1003019f0
// > EndPortalObject::init @ 0x10047f100
//
// 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 11:03:00 +0000
//
__int64 __fastcall GameObject::createAndAddParticle(__int64 a1, __int64 a2, char *a3, __int64 a4, __int64 a5)
{
__int64 v10; // x0
__int64 Particle; // x21
__int64 v12; // x0
void **v13; // x20
__int128 v15; // [xsp+8h] [xbp-48h] BYREF
__int64 v16; // [xsp+18h] [xbp-38h]
v10 = GameManager::sharedState(a1);
if ( !*(_QWORD *)(v10 + 544) || (*(_BYTE *)(a1 + 1045) & 1) != 0 )
return 0;
v12 = GameManager::sharedState(v10);
Particle = GJBaseGameLayer::createParticle(*(_QWORD *)(v12 + 544), a2, a3, a4, a5);
GameManager::sharedState(Particle);
GJBaseGameLayer::getParticleKey(a2, a3, a4, a5, &v15);
v13 = (void **)(a1 + 784);
if ( *(char *)(a1 + 807) < 0 )
operator delete(*v13);
*(_OWORD *)v13 = v15;
*(_QWORD *)(a1 + 800) = v16;
*(_BYTE *)(a1 + 808) = 1;
return Particle;
}