//
// cocos2d::ccCArrayGetIndexOfValue from 0xd924bc to 0xd92508 (76 bytes)
//
// 3 xrefs:
// > cocos2d::ccCArrayContainsValue @ 0xd92510
// > cocos2d::ccCArrayRemoveValue @ 0xd9275c
// > ??> @ 0x42fe8
//
// 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:08:19 +0000
//
__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;
}