//
// SelectEventLayer::onClose from 0x10057a530 to 0x10057a5f6 (198 bytes)
//
// 1 xrefs:
// > ??> @ 0x100966320
//
// 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 __fastcall SelectEventLayer::onClose(SelectEventLayer *a1, cocos2d::CCObject *a2)
{
__int64 v2; // r8
__int64 v3; // r9
SetupEventLinkPopup *m_eventLinkPopup; // rax
EffectGameObject *m_gameObject; // rdi
__int64 m_gameObjects; // rax
unsigned int *v8; // rax
__int64 v9; // rcx
std::set *p_m_eventIDs; // r12
_QWORD *v11; // r13
_QWORD *v12; // rbx
__int64 v13; // rdi
if ( a1->m_eventsChanged )
{
m_eventLinkPopup = a1->m_eventLinkPopup;
if ( m_eventLinkPopup )
{
m_gameObject = m_eventLinkPopup->m_gameObject;
if ( m_gameObject )
{
m_gameObjects = sub_10071FA80(m_gameObject);
if ( !m_gameObjects )
goto LABEL_13;
}
else
{
m_gameObjects = (__int64)m_eventLinkPopup->m_gameObjects;
if ( !m_gameObjects )
goto LABEL_13;
}
v8 = *(unsigned int **)(m_gameObjects + 56);
v9 = *v8;
if ( *v8 )
{
p_m_eventIDs = &a1->m_eventIDs;
v11 = *((_QWORD **)v8 + 2);
v12 = &v11[v9 - 1];
do
{
if ( !*v11 )
break;
v13 = *v11 + 1840LL;
if ( (std::set *)v13 != p_m_eventIDs )
sub_1005876E0(v13, p_m_eventIDs->__tree_.__begin_node_, &a1->m_eventIDs.__tree_.__pair1_, v9, v2, v3);
++v11;
}
while ( v11 <= v12 );
}
}
}
LABEL_13:
SetupTriggerPopup::onClose(a1, a2);
}