//
// SelectEventLayer::onClose from 0x1404676a0 to 0x140467753 (179 bytes)
//
// 4 xrefs:
// > ??> @ 0x140601ab0
// > ??> @ 0x1406a497c
// > ??> @ 0x1406a49b0
// > ??> @ 0x1406db0cc
//
// 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 SelectEventLayer::onClose(SelectEventLayer *a1, cocos2d::CCObject *a2)
{
SetupEventLinkPopup *m_eventLinkPopup; // rax
struct cocos2d::CCObject *m_gameObject; // rcx
struct cocos2d::CCArray *v6; // rax
cocos2d::ccArray *data; // rbx
__int64 num; // rax
cocos2d::CCObject **arr; // rbx
cocos2d::CCObject **i; // rsi
if ( a1->m_eventsChanged )
{
m_eventLinkPopup = a1->m_eventLinkPopup;
if ( m_eventLinkPopup )
{
m_gameObject = m_eventLinkPopup->m_gameObject;
v6 = m_gameObject ? cocos2d::CCArray::createWithObject(m_gameObject) : m_eventLinkPopup->m_gameObjects;
if ( v6 )
{
data = v6->data;
num = data->num;
if ( (_DWORD)num )
{
arr = data->arr;
for ( i = &arr[num - 1]; arr <= i; ++arr )
{
if ( !*arr )
break;
sub_140473880(&(*arr)[33].m_uID, &a1->m_eventIDs);
}
}
}
}
}
SetupTriggerPopup::onClose(a1, a2);
}