//
// cocos2d::CCParticleBatchNode::getCurrentIndex from 0x1800639c0 to 0x180063a8a (202 bytes)
//
// 2 xrefs:
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bd990
//
// This function is hookable on this platform (idp: pc, 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:21:52 +0000
//
void __fastcall cocos2d::CCParticleBatchNode::getCurrentIndex(
cocos2d::CCArray **this,
unsigned int *a2,
unsigned int *a3,
struct cocos2d::CCNode *a4,
int a5)
{
cocos2d::CCArray **v5; // r14
char v8; // r15
char v9; // si
int v10; // ebp
unsigned int v11; // r12d
unsigned int v12; // ebx
struct cocos2d::CCNode *v13; // r14
v5 = this;
v8 = 0;
v9 = 0;
v10 = 0;
v11 = cocos2d::CCArray::count(*(this + 26));
v12 = 0;
if ( v11 )
{
while ( 1 )
{
v13 = cocos2d::CCArray::stringAtIndex(v5[26], v12);
if ( (*(int (__fastcall **)(struct cocos2d::CCNode *))(*(_QWORD *)v13 + 96LL))(v13) > a5 && !v9 )
{
*a3 = v12;
v9 = 1;
if ( v8 )
break;
}
if ( a4 == v13 )
{
*a2 = v12;
v8 = 1;
if ( v9 )
break;
v10 = -1;
}
if ( ++v12 >= v11 )
{
if ( v9 )
break;
goto LABEL_11;
}
v5 = this;
}
}
else
{
LABEL_11:
*a3 = v11;
}
*a3 += v10;
}