//
// SetupOptionsTriggerPopup::addOption from 0x1404366e0 to 0x14043693f (607 bytes)
//
// 14 xrefs:
// > SetupOptionsTriggerPopup::init @ 0x14043618f
// > SetupOptionsTriggerPopup::init @ 0x1404361d9
// > SetupOptionsTriggerPopup::init @ 0x140436221
// > SetupOptionsTriggerPopup::init @ 0x140436269
// > SetupOptionsTriggerPopup::init @ 0x1404362b1
// > SetupOptionsTriggerPopup::init @ 0x140436316
// > SetupOptionsTriggerPopup::init @ 0x14043637b
// > SetupOptionsTriggerPopup::init @ 0x1404363f7
// > SetupOptionsTriggerPopup::init @ 0x140436440
// > SetupOptionsTriggerPopup::init @ 0x140436488
// > SetupOptionsTriggerPopup::init @ 0x1404364ca
// > SetupOptionsTriggerPopup::init @ 0x140436524
// > SetupOptionsTriggerPopup::init @ 0x14043656e
// > ??> @ 0x1406d9de8
//
// 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
//
// Hidden C++ exception states: #wind=3
void __fastcall SetupOptionsTriggerPopup::addOption(SetupTriggerPopup *a1, int a2, const char *a3)
{
int v6; // r12d
const char *v7; // rcx
struct cocos2d::CCLabelBMFont *v8; // rdi
float v9; // xmm0_4
cocos2d::CCLabelBMFont_vtbl *v10; // rbx
const cocos2d::CCPoint *v11; // rax
float v12; // xmm0_4
int v13; // r8d
int v14; // r9d
int v15; // r8d
int v16; // r9d
cocos2d::CCPoint v17; // [rsp+50h] [rbp-29h] BYREF
__int128 v18; // [rsp+58h] [rbp-21h] BYREF
__int64 v19; // [rsp+68h] [rbp-11h]
__int64 v20; // [rsp+70h] [rbp-9h]
__int128 *v21; // [rsp+78h] [rbp-1h]
__int128 *v22; // [rsp+80h] [rbp+7h]
const char *v23; // [rsp+88h] [rbp+Fh]
v23 = a3;
v6 = (int)((float (__fastcall *)(SetupTriggerPopup *))a1->getValue)(a1);
v7 = a3;
if ( *((_QWORD *)a3 + 3) > 0xFu )
v7 = *(const char **)a3;
v8 = cocos2d::CCLabelBMFont::create(v7, (const char *)&qword_14052A4D8);
v9 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *))v8->setScale_0)(v8);
v10 = v8->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v9, 0.0);
v10->setAnchorPoint(v8, v11);
v12 = ((float (__fastcall *)(cocos2d::CCLayer_vtbl **, struct cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild_1)(
&a1->m_mainLayer->FLAlertLayer::__vftable,
v8);
cocos2d::CCPoint::CCPoint(v12, -100.0);
cocos2d::CCPoint::operator+(&a1[1], &v17);
v8->setPosition_0(v8, &v17);
SetupTriggerPopup::addObjectToPage(a1, v8, a1[1].m_uID);
v21 = &v18;
v18 = 0;
v19 = 2;
v20 = 15;
strcpy((char *)&v18, "On");
cocos2d::CCPoint::CCPoint(0.0, 40.0);
cocos2d::CCPoint::operator+(&a1[1], &v17);
LOBYTE(v13) = v6 == 1;
SetupTriggerPopup::createCustomToggleValueControl(
(_DWORD)a1,
a2,
v13,
v14,
(__int64)&v18,
(__int64)&v17,
0,
a1[1].m_uID,
0);
v22 = &v18;
v18 = 0;
v19 = 3;
v20 = 15;
LOWORD(v18) = *(_WORD *)"Off";
WORD1(v18) = (unsigned __int8)aOff[2];
cocos2d::CCPoint::CCPoint(0.0, 100.0);
cocos2d::CCPoint::operator+(&a1[1], &v17);
LOBYTE(v15) = v6 == -1;
SetupTriggerPopup::createCustomToggleValueControl(
(_DWORD)a1,
-a2,
v15,
v16,
(__int64)&v18,
(__int64)&v17,
0,
a1[1].m_uID,
0);
*((float *)&a1[1].FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable
+ 1) = *((float *)&a1[1].FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable
+ 1)
- 30.0;
sub_14003A830((__int64)a3);
}