//
// GJBaseGameLayer::modifyGroupPhysics from 0x863a58 to 0x863b48 (240 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::triggerAdvancedFollowEditCommand @ 0x8773d4
// > GJBaseGameLayer::triggerAdvancedFollowEditCommand @ 0x877450
// > ??> @ 0x3b250
//
// 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::modifyGroupPhysics(GJBaseGameLayer *a1, AdvancedFollowEditObject *a2, cocos2d::CCArray *a3)
{
cocos2d::ccArray *data; // x4
cocos2d::CCObject **arr; // x21
__int64 v5; // x3
char *v6; // x19
cocos2d::CCObject *i; // x0
int v10; // w8
std::_Hashtable, std::allocator>, std::__detail::_Select1st, std::equal_to, std::hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits>::size_type M_bucket_count; // x5
unsigned __int64 v12; // x7
std::_Hashtable, std::allocator>, std::__detail::_Select1st, std::equal_to, std::hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits>::__bucket_type v13; // x1
std::__detail::_Hashtable_alloc<_NodeAlloc>::__node_base *M_nxt; // x4
int v15; // w6
std::__detail::_Hashtable_alloc<_NodeAlloc>::__node_base v16; // x2
if ( a3 )
{
data = a3->data;
if ( data->num )
{
arr = data->arr;
v5 = 8LL * data->num - 8;
v6 = (char *)arr + v5;
if ( arr <= (cocos2d::CCObject **)((char *)arr + v5) )
{
for ( i = *arr; *arr; i = *arr )
{
v10 = HIDWORD(i[16].__vftable);
M_bucket_count = a1->m_gameState.m_gameObjectPhysics._M_h._M_bucket_count;
v12 = v10 % M_bucket_count;
v13 = a1->m_gameState.m_gameObjectPhysics._M_h._M_buckets[v12];
if ( v13 )
{
M_nxt = v13->_M_nxt;
v15 = (int)v13->_M_nxt[1]._M_nxt;
while ( v15 != v10 )
{
v16._M_nxt = M_nxt->_M_nxt;
v13 = M_nxt;
M_nxt = v16._M_nxt;
if ( v16._M_nxt )
{
v15 = (int)v16._M_nxt[1]._M_nxt;
if ( v12 == v15 % M_bucket_count )
continue;
}
goto LABEL_10;
}
if ( v13->_M_nxt )
GJBaseGameLayer::modifyObjectPhysics(a1, a2, (GameObjectPhysics *)&v13->_M_nxt[2]);
}
LABEL_10:
if ( v6 < (char *)++arr )
break;
}
}
}
}
}