//
// cocos2d::extension::CCControlPotentiometer::setValue from 0x180008bd0 to 0x180008c5f (143 bytes)
//
// 6 xrefs:
// > cocos2d::extension::CCControlPotentiometer::initWithTrackSprite_ProgressTimer_ThumbSprite @ 0x180008b3a
// > cocos2d::extension::CCControlPotentiometer::setMinimumValue @ 0x180008c9b
// > cocos2d::extension::CCControlPotentiometer::setMaximumValue @ 0x180008cdb
// > cocos2d::extension::CCControlPotentiometer::potentiometerMoved @ 0x180009196
// > ??> @ 0x180032408
// > ??> @ 0x18004b8d0
//
// This function is hookable on this platform (idp: pc, 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 12:15:37 +0000
//
void __fastcall cocos2d::extension::CCControlPotentiometer::setValue(
cocos2d::extension::CCControlPotentiometer *this,
float a2)
{
float v2; // xmm2_4
float v4; // xmm6_4
float v5; // xmm3_4
float v6; // xmm6_4
v2 = *((float *)this + 125);
v4 = *((float *)this + 126);
v5 = v4 - v2;
v6 = fminf(v4, fmaxf(v2, a2));
*((float *)this + 124) = v6;
cocos2d::CCProgressTimer::setPercentage(
*((cocos2d::CCProgressTimer **)this + 60),
(float)((float)(v6 - v2) / v5) * 100.0);
(*(void (__fastcall **)(_QWORD))(**((_QWORD **)this + 59) + 352LL))(*((_QWORD *)this + 59));
(*(void (__fastcall **)(cocos2d::extension::CCControlPotentiometer *, __int64))(*(_QWORD *)this + 1088LL))(this, 256);
}