//
// cocos2d::CCParticleBatchNode::getCurrentIndex from 0x1800615b0 to 0x180061677 (199 bytes)
//
// 2 xrefs:
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b363c
//
// 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 cocos2d::CCParticleBatchNode::getCurrentIndex(
cocos2d::CCParticleBatchNode *this,
unsigned int *a2,
unsigned int *a3,
struct cocos2d::CCNode *a4,
int a5)
{
cocos2d::CCParticleBatchNode *v5; // r14
char v8; // r15
char v9; // si
int v10; // ebp
unsigned int v11; // r12d
int v12; // ebx
struct cocos2d::CCNode *v13; // r14
v5 = this;
v8 = 0;
v9 = 0;
v10 = 0;
v11 = cocos2d::CCArray::count(this->m_pChildren);
v12 = 0;
if ( v11 )
{
while ( 1 )
{
v13 = (struct cocos2d::CCNode *)cocos2d::CCArray::stringAtIndex(v5->m_pChildren, v12);
if ( ((int (__fastcall *)(struct cocos2d::CCNode *))v13->getZOrder)(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;
}