//
// SetupItemCompareTriggerPopup::onOpButton from 0x10040e668 to 0x10040e724 (188 bytes)
//
// 1 xrefs:
// > SetupItemCompareTriggerPopup::init @ 0x10040e140
//
// 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)
{
__int64 v4; // x21
float v5; // s0
int v6; // w12
int v7; // w9
int v8; // w8
int v9; // w8
int v10; // w9
int v11; // w22
SetupItemCompareTriggerPopup *v12; // x0
v4 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
((void (__fastcall *)(SetupItemCompareTriggerPopup *, __int64))a1->getValue)(a1, v4);
if ( (v4 & 0xFFFFFFFE) == 0x242 )
v6 = 1;
else
v6 = 3;
if ( (unsigned int)(v4 - 485) >= 2 )
v7 = v6;
else
v7 = 2;
if ( (_DWORD)v4 == 482 )
v8 = 4;
else
v8 = v7;
if ( v8 >= (int)v5 )
v9 = (int)v5 + 1;
else
v9 = 0;
if ( v9 <= 1 )
v10 = 1;
else
v10 = v9;
if ( (v4 & 0xFFFFFFFE) == 0x1E0 )
v11 = v10;
else
v11 = v9;
SetupTriggerPopup::updateValue(a1, v4, (float)v11);
SetupItemCompareTriggerPopup::updateOpButton(v12, (CCMenuItemSpriteExtra *)a2, v11, v4);
SetupItemCompareTriggerPopup::updateFormulaLabel(a1);
}