//
// cocos2d::CCParticleBatchNode::getCurrentIndex from 0x5dd2b2 to 0x5dd334 (130 bytes)
//
// 1 xrefs:
// > cocos2d::CCParticleBatchNode::reorderChild @ 0x5dd4c6
//
// 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 cocos2d::CCParticleBatchNode::getCurrentIndex(
cocos2d::CCParticleBatchNode *a1,
unsigned int *a2,
unsigned int *a3,
cocos2d::CCNode *a4,
int a5)
{
unsigned int v9; // r0
unsigned int v10; // r4
int v11; // r10
int v12; // r6
int v13; // r3
unsigned int v14; // r2
cocos2d::CCNode *v15; // r7
int v16; // r0
int v17; // [sp+0h] [bp-Ch]
unsigned int v18; // [sp+4h] [bp-8h]
v9 = cocos2d::CCArray::count(a1->m_pChildren);
v10 = 0;
v11 = 0;
v12 = 0;
v13 = 0;
v14 = v9;
while ( v10 != v14 )
{
v18 = v14;
v17 = v13;
v15 = (cocos2d::CCNode *)cocos2d::CCArray::objectAtIndex(a1->m_pChildren, v10);
v16 = v15->getZOrder(v15);
v14 = v18;
v13 = v17;
if ( v16 <= a5 )
{
if ( a4 == v15 )
{
*a2 = v10;
if ( v12 )
goto LABEL_12;
v11 = -1;
v13 = 1;
}
}
else if ( v12 )
{
if ( a4 == v15 )
goto LABEL_17;
}
else
{
*a3 = v10;
if ( v17 )
goto LABEL_12;
if ( a4 == v15 )
{
LABEL_17:
*a2 = v10;
goto LABEL_12;
}
v12 = 1;
}
++v10;
}
if ( !v12 )
*a3 = v10;
LABEL_12:
*a3 += v11;
}