//
// GJBaseGameLayer::updateKeyframeOrder from 0x864f18 to 0x864fc8 (176 bytes)
//
// 5 xrefs:
// > LevelEditorLayer::reverseKeyframeAnimationOrder @ 0x662bbc
// > GJBaseGameLayer::addKeyframe @ 0x865030
// > GJBaseGameLayer::addKeyframe @ 0x865054
// > GJBaseGameLayer::removeKeyframe @ 0x8650a8
// > ??> @ 0x75990
//
// 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 GJBaseGameLayer::updateKeyframeOrder(GJBaseGameLayer *a1, int a2)
{
cocos2d::CCArray *v2; // x0
cocos2d::CCArray *v3; // x20
unsigned int v4; // w19
__int64 v5; // x0
int v6; // w23
int v7; // w21
int v8; // w22
bool v9; // cf
unsigned int v10; // w1
cocos2d::CCArray *v11; // x0
__int64 v12; // x0
v2 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(a1->m_keyframeGroups, a2);
v3 = v2;
if ( v2 && (unsigned int)cocos2d::CCArray::count(v2) )
{
v4 = 0;
v5 = cocos2d::CCArray::objectAtIndex(v3, 0);
v6 = *(__int16 *)(v5 + 1186);
v7 = *(unsigned __int8 *)(v5 + 1866);
v8 = v6 + 1;
while ( 1 )
{
v9 = v4 >= (unsigned int)cocos2d::CCArray::count(v3);
v10 = v4;
v11 = v3;
if ( v9 )
break;
while ( 1 )
{
v12 = cocos2d::CCArray::objectAtIndex(v11, v10);
*(_DWORD *)(v12 + 1844) = v4;
*(_BYTE *)(v12 + 1866) = v7;
++v4;
if ( !v7 )
break;
*(_WORD *)(v12 + 1188) = v8++;
*(_WORD *)(v12 + 1186) = v6;
v9 = v4 >= (unsigned int)cocos2d::CCArray::count(v3);
v10 = v4;
v11 = v3;
if ( v9 )
return;
}
}
}
}