//
// SetupTriggerPopup::valueChanged from 0x100237190 to 0x1002386c0 (5424 bytes)
//
// 26 xrefs:
// > SetupKeyframePopup::onTimeMode @ 0x10020160d
// > SetupTriggerPopup::textChanged @ 0x1002370b3
// > SetupTriggerPopup::triggerSliderChanged @ 0x100239658
// > SetupTriggerPopup::triggerArrowLeft @ 0x10023978c
// > SetupTriggerPopup::triggerArrowChanged @ 0x100239819
// > SetupTriggerPopup::triggerArrowRight @ 0x10023989c
// > SetupTriggerPopup::onDisableValue @ 0x10023a935
// > SetupTriggerPopup::updateValue @ 0x10023a9aa
// > SetupTriggerPopup::resetDisabledValues @ 0x10023a9f7
// > SetupTriggerPopup::onToggleTriggerValue @ 0x10023af22
// > SetupTriggerPopup::onEase @ 0x10023ecf9
// > SetupTriggerPopup::valuePopupClosed @ 0x10023f033
// > SetupTriggerPopup::valuePopupClosed @ 0x10023f055
// > SetupTriggerPopup::onCustomEaseArrowUp @ 0x10023fb13
// > SetupTriggerPopup::onCustomEaseArrowDown @ 0x10023fbb4
// > SetupTriggerPopup::onCustomEaseArrow @ 0x10023fe6c
// > SetupShaderEffectPopup::onZLayer @ 0x1002d03c0
// > SetupShaderEffectPopup::onZLayer @ 0x1002d0419
// > SetupShaderEffectPopup::valueDidChange @ 0x1002d07b6
// > SetupAdvFollowPopup::valueDidChange @ 0x100309736
// > SetupAdvFollowRetargetPopup::valueDidChange @ 0x10030bfb8
// > SetupTeleportPopup::onTeleportGravity @ 0x10035a28d
// > SetupAreaMoveTriggerPopup::onSpecialTarget @ 0x1004d47b3
// > SetupAreaMoveTriggerPopup::onMode @ 0x1004d48fd
// > SetupAreaMoveTriggerPopup::onMode @ 0x1004d490f
// > SetupAreaMoveTriggerPopup::onMode @ 0x1004d4921
//
// 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
//
// local variable allocation has failed, the output may be wrong!
void __fastcall SetupTriggerPopup::valueChanged(SetupTriggerPopup *a1, int a2, float a3)
{
SetupTriggerPopup *v3; // r14
__int64 v4; // r15
__int64 *v5; // rbx
__int64 m_gameObjects; // r12
unsigned int v7; // r13d
__int64 *v8; // r15
SetupTriggerPopup *v9; // rbx
std::__tree_end_node *>::pointer left; // rax
std::__compressed_pair *>> *v11; // r13
std::__compressed_pair *>> *v12; // r14
unsigned int v13; // r12d
_DWORD *v14; // r12
std::__tree_end_node *> *v15; // rax
_DWORD *v16; // r13
float v17; // xmm1_4
__m128 v18; // rt1
std::__compressed_pair *>> *p_pair1; // [rsp+0h] [rbp-60h]
intptr_t v20; // [rsp+8h] [rbp-58h]
__int64 i; // [rsp+10h] [rbp-50h]
int v22; // [rsp+24h] [rbp-3Ch]
float v24; // [rsp+34h] [rbp-2Ch]
v3 = a1;
p_pair1 = &a1->m_shouldLimitValues.__tree_.__pair1_;
v20 = a2;
v4 = (unsigned int)(a2 - 10);
v5 = qword_1002386C0;
v22 = a2;
for ( i = v4; ; v4 = i )
{
if ( v3->m_gameObject )
{
m_gameObjects = sub_10071F9E0(a1, *(_QWORD *)&a2);
sub_10071FCD0(m_gameObjects, v3->m_gameObject);
if ( !m_gameObjects )
goto LABEL_14;
}
else
{
m_gameObjects = (__int64)v3->m_gameObjects;
if ( !m_gameObjects )
goto LABEL_14;
}
if ( (unsigned int)sub_100720070(m_gameObjects) && (unsigned int)sub_100720070(m_gameObjects) )
{
v7 = 0;
do
{
sub_1007200C0(m_gameObjects, v7);
if ( (unsigned int)v4 <= 0x24D )
__asm { jmp rcx }
++v7;
}
while ( v7 < (unsigned int)sub_100720070(m_gameObjects) );
}
LABEL_14:
v8 = v5;
v9 = v3;
left = v3->m_shouldLimitValues.__tree_.__pair1_.__value_.__left_;
v11 = p_pair1;
v12 = p_pair1;
v13 = v22;
if ( left )
break;
LABEL_21:
v14 = operator new(0x28u);
v14[7] = v22;
*((_BYTE *)v14 + 32) = 0;
*(_OWORD *)v14 = 0;
*((_QWORD *)v14 + 2) = v11;
v12->__value_.__left_ = (std::__tree_end_node *>::pointer)v14;
v3 = v9;
v15 = (std::__tree_end_node *> *)v9->m_shouldLimitValues.__tree_.__begin_node_->__left_;
if ( v15 )
v9->m_shouldLimitValues.__tree_.__begin_node_ = v15;
sub_100054DD0((__int64 *)v9->m_shouldLimitValues.__tree_.__pair1_.__value_.__left_, (__int64 *)v14);
++v9->m_shouldLimitValues.__tree_.__pair3_.__value_;
v16 = v14;
v13 = v22;
if ( *((_BYTE *)v16 + 32) != 1 )
goto LABEL_32;
LABEL_26:
if ( !cocos2d::CCDictionary::objectForKey(v3->m_minSliderValues, v20)
|| (v24 = *(float *)&cocos2d::CCDictionary::objectForKey(v3->m_minSliderValues, v20)[1].__vftable, v24 <= a3) )
{
if ( !cocos2d::CCDictionary::objectForKey(v3->m_maxSliderValues, v20) )
goto LABEL_32;
v17 = *(float *)&cocos2d::CCDictionary::objectForKey(v3->m_maxSliderValues, v20)[1].__vftable;
v24 = fminf(v17, a3);
if ( a3 <= v17 )
goto LABEL_33;
}
if ( cocos2d::CCDictionary::objectForKey(v3->m_valueToggles, v20) )
{
v18.i32[0] = 0;
a1 = v3;
*(_QWORD *)&a2 = v13;
((void (__fastcall *)(SetupTriggerPopup *, _QWORD, _QWORD))v3->updateToggleItem)(
v3,
v13,
_mm_cvtsi128_si32((__m128i)_mm_cmpneq_ss((__m128)LODWORD(v24), v18)) & 1);
}
else
{
a1 = v3;
*(_QWORD *)&a2 = v13;
SetupTriggerPopup::updateValueControls(v3, v13, v24);
}
a3 = v24;
v5 = v8;
}
while ( 1 )
{
while ( 1 )
{
v11 = (std::__compressed_pair *>> *)left;
if ( *((_DWORD *)left + 7) <= v22 )
break;
left = *(std::__tree_end_node *>::pointer *)left;
v12 = v11;
if ( !v11->__value_.__left_ )
goto LABEL_21;
}
if ( *((_DWORD *)left + 7) >= v22 )
break;
left = *((std::__tree_end_node *>::pointer *)left + 1);
if ( !left )
{
v12 = v11 + 1;
goto LABEL_21;
}
}
v3 = v9;
if ( *((_BYTE *)left + 32) == 1 )
goto LABEL_26;
LABEL_32:
v24 = a3;
LABEL_33:
((void (__fastcall *)(SetupTriggerPopup *, _QWORD, float))v3->valueDidChange)(v3, v13, v24);
}