//
// cocos2d::extension::CCControlPotentiometer::setValue from 0x10035ac80 to 0x10035ad0f (143 bytes)
//
// 0 xrefs:
//
// 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 *a1,
float a2)
{
float v2; // xmm1_4
float v3; // xmm2_4
int m_uIndexInArray; // xmm0_4
unsigned int v5; // xmm3_4
float v6; // [rsp+0h] [rbp-Ch]
v2 = *(float *)&a1[1].m_eObjType;
v3 = fmaxf(v2, a2);
m_uIndexInArray = a1[1].m_uIndexInArray;
*(float *)&v5 = fminf(*(float *)&m_uIndexInArray, v3);
a1[1].m_uAutoReleaseCount = v5;
v6 = (float)(*(float *)&v5 - v2) / (float)(*(float *)&m_uIndexInArray - v2);
cocos2d::CCProgressTimer::setPercentage(*(cocos2d::CCProgressTimer **)&a1[1].m_uID, 100.0 * v6);
(*((void (__fastcall **)(cocos2d::extension::CCControlPotentiometer_vtbl *, float))a1[1].copyWithZone + 43))(
a1[1].cocos2d::extension::CCControl::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable,
v6 * 360.0);
((void (__fastcall *)(cocos2d::extension::CCControlPotentiometer *, __int64))a1->sendActionsForControlEvents)(a1, 256);
}