//
// SetupObjectOptionsPopup::onExtendedCollision from 0x140597320 to 0x14059745d (317 bytes)
//
// 2 xrefs:
// > SetupObjectOptionsPopup::init @ 0x140595c41
// > ??> @ 0x14092d140
//
// This function is hookable on this platform (idp: pc, 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 11:34:34 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall SetupObjectOptionsPopup::onExtendedCollision(__int64 a1)
{
__int64 v2; // r14
__int64 v3; // r14
char v4; // si
__int64 v5; // rbx
struct cocos2d::CCObject *v6; // rax
struct cocos2d::CCObject *v7; // rsi
char v8; // bp
void *v9; // [rsp+50h] [rbp+18h]
v2 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v9 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v9);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v2 = qword_14090BFD0;
}
v3 = *(_QWORD *)(v2 + 568);
if ( v3 )
{
v4 = *(_BYTE *)(a1 + 701) == 0;
*(_BYTE *)(a1 + 701) = v4;
v5 = *(_QWORD *)(a1 + 664);
if ( v5 )
{
if ( *(_BYTE *)(v5 + 640) != v4 )
{
GJBaseGameLayer::removeObjectFromSection(v3, *(_QWORD *)(a1 + 664));
*(_BYTE *)(v5 + 640) = v4;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 1192LL))(v3, v5);
}
}
else if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 672)) )
{
do
{
v6 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 672), v5);
v7 = v6;
v8 = *(_BYTE *)(a1 + 701);
if ( *((_BYTE *)v6 + 640) != v8 )
{
GJBaseGameLayer::removeObjectFromSection(v3, (__int64)v6);
*((_BYTE *)v7 + 640) = v8;
(*(void (__fastcall **)(__int64, struct cocos2d::CCObject *))(*(_QWORD *)v3 + 1192LL))(v3, v7);
}
LODWORD(v5) = v5 + 1;
}
while ( (unsigned int)v5 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 672)) );
}
}
}