//
// SetupSequenceTriggerPopup::onChangeOrder from 0x140444de0 to 0x140444ebd (221 bytes)
//
// 4 xrefs:
// > SetupSequenceTriggerPopup::init @ 0x140443ccb
// > ??> @ 0x1406a23d8
// > ??> @ 0x1406a240c
// > ??> @ 0x1406da520
//
// 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 SetupSequenceTriggerPopup::onChangeOrder(SetupSequenceTriggerPopup *a1, cocos2d::CCObject *a2)
{
int v3; // ebx
int v4; // eax
EffectGameObject *m_gameObject; // rcx
__int64 v6; // rdx
EffectGameObject_vtbl *v7; // rax
EffectGameObject_vtbl *v8; // r8
__int64 v9; // rcx
int v10; // edi
__int128 v11; // xmm1
CCMenuItemSpriteExtra *m_selectedButton; // rcx
CCMenuItemSpriteExtra_vtbl *v13; // rbx
int v14; // eax
if ( a1->m_selectedButton )
{
v3 = a2->getTag(a2);
v4 = a1->m_selectedButton->getTag(a1->m_selectedButton);
m_gameObject = a1->m_gameObject;
v6 = v4;
v7 = *(EffectGameObject_vtbl **)&m_gameObject[1].m_uID;
v8 = m_gameObject[1].EnhancedGameObject::GameObject::CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v9 = ((char *)v7 - (char *)v8) >> 4;
if ( (int)v9 > (int)v6 && ((_DWORD)v6 != (_DWORD)v9 - 1 || v3 != 3) && ((_DWORD)v6 || v3 == 3) && v8 != v7 )
{
v10 = 1;
if ( v3 != 3 )
v10 = -1;
v11 = *((_OWORD *)&v8->copyWithZone + v6);
*((_OWORD *)&v8->copyWithZone + v6) = *((_OWORD *)&v8->copyWithZone + v10 + (int)v6);
*((_OWORD *)&v8->copyWithZone + v10 + (int)v6) = v11;
m_selectedButton = a1->m_selectedButton;
v13 = m_selectedButton->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
v14 = m_selectedButton->getTag(m_selectedButton);
v13->setTag(a1->m_selectedButton, v10 + v14);
SetupSequenceTriggerPopup::updateGroupIDButtons(a1);
}
}
}