//
// SetupSequenceTriggerPopup::onAddChance from 0xb82394 to 0xb82448 (180 bytes)
//
// 3 xrefs:
// > ??> @ 0x9a228
// > SetupSequenceTriggerPopup::init @ 0xb829a0
// > ??> @ 0x1544380
//
// 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:29 +0000
//
__int64 __fastcall SetupSequenceTriggerPopup::onAddChance(SetupSequenceTriggerPopup *this, cocos2d::CCObject *a2)
{
float v3; // s8
float v4; // s0
__int64 result; // x0
int v6; // w2
__int64 v7; // x20
int v8; // w0
int v9; // w1
int v10; // [xsp+38h] [xbp+38h]
v3 = (*(float (__fastcall **)(SetupSequenceTriggerPopup *, __int64))(*(_QWORD *)this + 1464LL))(this, 0xFFFFFFFFLL);
v4 = (*(float (__fastcall **)(SetupSequenceTriggerPopup *, __int64))(*(_QWORD *)this + 1464LL))(this, 4294967294LL);
result = *((_QWORD *)this + 127);
v6 = (int)v4;
if ( result )
{
if ( !v6 )
return result;
v10 = (int)v4;
v7 = *((_QWORD *)this + 85);
v8 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)result + 64LL))(result);
SequenceTriggerGameObject::addCount(v7, v8, v10);
return SetupSequenceTriggerPopup::updateGroupIDButtons(this);
}
v9 = (int)v3;
if ( v6 > 0 && v9 > 0 )
{
SequenceTriggerGameObject::addTarget(*((SequenceTriggerGameObject **)this + 85), v9, v6);
return SetupSequenceTriggerPopup::updateGroupIDButtons(this);
}
return result;
}