//
// cocos2d::extension::CCControlPotentiometer::setValue from 0x180009120 to 0x1800091af (143 bytes)
//
// 6 xrefs:
// > cocos2d::extension::CCControlPotentiometer::initWithTrackSprite_ProgressTimer_ThumbSprite @ 0x18000908a
// > cocos2d::extension::CCControlPotentiometer::setMinimumValue @ 0x1800091eb
// > cocos2d::extension::CCControlPotentiometer::setMaximumValue @ 0x18000922b
// > cocos2d::extension::CCControlPotentiometer::potentiometerMoved @ 0x1800096e6
// > ??> @ 0x18002fdf8
// > ??> @ 0x18004999c
//
// 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::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) + 336LL))(*((_QWORD *)this + 59));
(*(void (__fastcall **)(cocos2d::extension::CCControlPotentiometer *, __int64))(*(_QWORD *)this + 1072LL))(this, 256);
}