//
// SetupItemCompareTriggerPopup::onOpButton from 0x100581ee0 to 0x100581f9d (189 bytes)
//
// 1 xrefs:
// > SetupItemCompareTriggerPopup::init @ 0x100581ae1
//
// 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 SetupItemCompareTriggerPopup::onOpButton(SetupItemCompareTriggerPopup *a1, cocos2d::CCObject *a2)
{
float v2; // xmm0_4
__int64 v4; // r15
int v5; // eax
int v6; // esi
int v7; // r12d
v4 = ((unsigned int (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
((void (__fastcall *)(SetupItemCompareTriggerPopup *, __int64))a1->getValue)(a1, v4);
v5 = 4;
if ( (_DWORD)v4 != 482 )
{
v5 = 2;
if ( (unsigned int)(v4 - 485) >= 2 )
v5 = 2 * ((v4 & 0xFFFFFFFE) != 578) + 1;
}
v6 = 0;
if ( v5 >= (int)v2 )
v6 = (int)v2 + 1;
v7 = 1;
if ( v6 >= 2 )
v7 = v6;
if ( (v4 & 0xFFFFFFFE) != 0x1E0 )
v7 = v6;
SetupTriggerPopup::updateValue(a1, v4, (float)v7);
SetupItemCompareTriggerPopup::updateOpButton(a1, (CCMenuItemSpriteExtra *)a2, v7, v4);
SetupItemCompareTriggerPopup::updateFormulaLabel(a1);
}