//
// CreateParticlePopup::toggleGravityMode from 0xafee24 to 0xaff008 (484 bytes)
//
// 4 xrefs:
// > CreateParticlePopup::onEmitterMode @ 0xaff088
// > CreateParticlePopup::onPage @ 0xaff290
// > CreateParticlePopup::init @ 0xb01ea0
// > ??> @ 0xe8060
//
// 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 13:01:19 +0000
//
bool __fastcall CreateParticlePopup::toggleGravityMode(cocos2d::CCArray **this, unsigned __int8 a2)
{
unsigned int v2; // w20
cocos2d::CCDictionary *PageInputNodes; // x23
__int64 v5; // x19
cocos2d::CCDictionary *PageSliders; // x24
__int64 v7; // x0
__int64 v8; // x0
__int64 v9; // x0
__int64 v10; // x1
__int64 v11; // x0
unsigned int v12; // w22
__int64 i; // x19
__int64 v14; // x0
__int64 v15; // x0
__int64 v16; // x0
__int64 v17; // x1
__int64 v18; // x0
unsigned int v19; // w19
__int64 v20; // x0
bool v21; // cf
unsigned int v22; // w1
unsigned int v23; // w19
__int64 v24; // x0
unsigned int v25; // w1
__int64 v26; // x19
_BOOL8 result; // x0
v2 = a2;
PageInputNodes = (cocos2d::CCDictionary *)CreateParticlePopup::getPageInputNodes(this, 0);
v5 = 8;
PageSliders = (cocos2d::CCDictionary *)CreateParticlePopup::getPageSliders(this, 0);
do
{
v7 = cocos2d::CCDictionary::objectForKey(PageInputNodes, v5);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v7 + 344LL))(v7, v2);
v8 = cocos2d::CCDictionary::objectForKey(PageInputNodes, v5);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v8 + 1000LL))(v8, v2);
v9 = cocos2d::CCDictionary::objectForKey(PageSliders, v5);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v9 + 344LL))(v9, v2);
v10 = v5++;
v11 = cocos2d::CCDictionary::objectForKey(PageSliders, v10);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v11 + 1000LL))(v11, v2);
}
while ( v5 != 18 );
v12 = v2 ^ 1;
for ( i = 50; i != 56; ++i )
{
v14 = cocos2d::CCDictionary::objectForKey(PageInputNodes, i);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v14 + 344LL))(v14, v12);
v15 = cocos2d::CCDictionary::objectForKey(PageInputNodes, i);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v15 + 1000LL))(v15, v12);
v16 = cocos2d::CCDictionary::objectForKey(PageSliders, i);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v16 + 344LL))(v16, v12);
v17 = i;
v18 = cocos2d::CCDictionary::objectForKey(PageSliders, v17);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v18 + 1000LL))(v18, v12);
}
v19 = 0;
while ( 1 )
{
v21 = v19 >= (unsigned int)cocos2d::CCArray::count(*(this + 120));
v22 = v19++;
if ( v21 )
break;
v20 = cocos2d::CCArray::objectAtIndex(*(this + 120), v22);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v20 + 344LL))(v20, v2);
}
v23 = 0;
while ( 1 )
{
v21 = v23 >= (unsigned int)cocos2d::CCArray::count(*(this + 121));
v25 = v23++;
if ( v21 )
break;
v24 = cocos2d::CCArray::objectAtIndex(*(this + 121), v25);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v24 + 344LL))(v24, v12);
}
v26 = (__int64)*(this + 99);
result = (*(unsigned int (__fastcall **)(_QWORD))(*(_QWORD *)*(this + 89) + 1592LL))(*(this + 89)) == 0;
*(_BYTE *)(v26 + 560) = result;
return result;
}