//
// cocos2d::ccCArrayGetIndexOfValue from 0xb21918 to 0xb21964 (76 bytes)
//
// 3 xrefs:
// > cocos2d::ccCArrayContainsValue @ 0xb2196c
// > cocos2d::ccCArrayRemoveValue @ 0xb21bb4
// > ??> @ 0x2c4a8
//
// 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
//
__int64 __fastcall cocos2d::ccCArrayGetIndexOfValue(int *a1, __int64 a2)
{
int v2; // w4
_QWORD *v3; // x2
__int64 *v4; // x2
__int64 result; // x0
__int64 v6; // t1
v2 = *a1;
if ( *a1 )
{
v3 = *((_QWORD **)a1 + 2);
if ( *v3 == a2 )
return 0;
v4 = v3 + 1;
LODWORD(result) = 0;
while ( 1 )
{
result = (unsigned int)(result + 1);
if ( (_DWORD)result == v2 )
break;
v6 = *v4++;
if ( v6 == a2 )
return result;
}
}
return 0xFFFFFFFFLL;
}