//
// SetupItemEditTriggerPopup::updateOpButton from 0xb7c780 to 0xb7c984 (516 bytes)
//
// 3 xrefs:
// > SetupItemEditTriggerPopup::init @ 0xb7d4e4
// > SetupItemEditTriggerPopup::onOpButton @ 0xb7dd14
// > ??> @ 0x9a438
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:02:26 +0000
//
__int64 __fastcall SetupItemEditTriggerPopup::updateOpButton(
SetupItemEditTriggerPopup *this,
CCMenuItemSpriteExtra *a2,
int a3,
int a4)
{
unsigned int v5; // w23
__int64 v6; // x0
cocos2d::CCLabelBMFont *v7; // x22
char *v8; // x1
__int64 v11; // [xsp+58h] [xbp+58h] BYREF
__int64 v12; // [xsp+60h] [xbp+60h]
void *v13; // [xsp+68h] [xbp+68h]
__int64 v14[3]; // [xsp+70h] [xbp+70h] BYREF
__int64 v15[3]; // [xsp+88h] [xbp+88h] BYREF
__int64 v16[3]; // [xsp+A0h] [xbp+A0h] BYREF
v5 = a4 - 485;
v6 = (*(__int64 (__fastcall **)(CCMenuItemSpriteExtra *))(*(_QWORD *)a2 + 1072LL))(a2);
v11 = 0;
v12 = 0;
v13 = nullptr;
v7 = *(cocos2d::CCLabelBMFont **)(v6 + 624);
if ( v5 <= 1 )
{
roundKeyToString(a3, 1, v14);
LOWORD(v11) = 0;
std::string::reserve(&v11, 0);
v11 = v14[0];
v12 = v14[1];
v13 = (void *)v14[2];
}
else if ( (unsigned int)(a4 - 578) <= 1 )
{
signKeyToString(a3, 1, v15);
LOWORD(v11) = 0;
std::string::reserve(&v11, 0);
v11 = v15[0];
v12 = v15[1];
v13 = (void *)v15[2];
}
else
{
opKeyToString(a3, v16);
LOWORD(v11) = 0;
std::string::reserve(&v11, 0);
v11 = v16[0];
v12 = v16[1];
v13 = (void *)v16[2];
}
v8 = (char *)&v11 + 1;
if ( (v11 & 1) != 0 )
v8 = (char *)v13;
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, char *))(*(_QWORD *)v7 + 928LL))(v7, v8);
if ( (unsigned int)(a4 - 578) <= 1 || v5 <= 1 )
cocos2d::CCLabelBMFont::limitLabelWidth(v7, 50.0, 0.8, 0.0);
if ( (v11 & 1) != 0 )
operator delete(v13);
return _stack_chk_guard;
}