//
// cocos2d::extension::CCControlStepper::setValueWithSendingEvent from 0x1003a42b0 to 0x1003a43b4 (260 bytes)
//
// 1 xrefs:
// > ??> @ 0x100927018
//
// 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 cocos2d::extension::CCControlStepper::setValueWithSendingEvent(
cocos2d::extension::CCControlStepper *a1,
double a2,
bool a3)
{
double v4; // xmm2_8
char v5; // al
__int64 v6; // rdi
int v7; // r15d
int v8; // eax
__int64 v9; // rdi
__int16 v10; // [rsp+8h] [rbp-28h] BYREF
char v11; // [rsp+Ah] [rbp-26h]
__int16 v12; // [rsp+Ch] [rbp-24h] BYREF
char v13; // [rsp+Eh] [rbp-22h]
v4 = *(double *)&a1[1].m_uOrderOfArrival;
if ( v4 <= a2 )
{
v5 = BYTE2(a1[1].m_unknown2);
if ( a2 > *(double *)&a1[1].m_fRotationX )
{
a2 = *(double *)&a1[1].m_uOrderOfArrival;
if ( (v5 & 1) == 0 )
a2 = *(double *)&a1[1].m_fRotationX;
}
}
else
{
v5 = BYTE2(a1[1].m_unknown2);
if ( v5 == 1 )
a2 = *(double *)&a1[1].m_fRotationX;
else
a2 = *(double *)&a1[1].m_uOrderOfArrival;
}
*(double *)&a1[1].m_uIndexInArray = a2;
if ( (v5 & 1) == 0 )
{
v6 = *(_QWORD *)&a1[1].m_nTag;
v7 = -7105645;
v8 = -7105645;
if ( a2 != v4 )
v8 = 3618615;
v10 = v8;
v11 = BYTE2(v8);
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v6 + 944LL))(v6, &v10);
v9 = *(_QWORD *)&a1[1].m_uAutoReleaseCount;
if ( a2 != *(double *)&a1[1].m_fRotationX )
v7 = 3618615;
v12 = v7;
v13 = BYTE2(v7);
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v9 + 944LL))(v9, &v12);
}
if ( a3 )
((void (__fastcall *)(cocos2d::extension::CCControlStepper *, __int64))a1->sendActionsForControlEvents)(a1, 256);
}