//
// cocos2d::extension::CCControlSwitchSprite::setSliderXPosition from 0x7aa54c to 0x7aa578 (44 bytes)
//
// 3 xrefs:
// > cocos2d::extension::CCControlSwitchSprite::updateTweenAction @ 0x7aa578
// > cocos2d::extension::CCControlSwitch::setOn @ 0x7aa83c
// > cocos2d::extension::CCControlSwitch::ccTouchMoved @ 0x7aa98a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:00:01 +0000
//
int __fastcall cocos2d::extension::CCControlSwitchSprite::setSliderXPosition(
cocos2d::extension::CCControlSwitchSprite *this,
float a2)
{
float v2; // s15
v2 = *((float *)this + 130);
if ( a2 > v2 )
{
v2 = *((float *)this + 129);
if ( a2 < v2 )
v2 = a2;
}
*((float *)this + 128) = v2;
return cocos2d::extension::CCControlSwitchSprite::needsLayout(this);
}