//
// cocos2d::extension::CCControlPotentiometer::setMaximumValue from 0x10035ae20 to 0x10035aec1 (161 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::setMaximumValue(
cocos2d::extension::CCControlPotentiometer *a1,
float a2)
{
float v2; // xmm1_4
unsigned int v3; // xmm2_4
float v4; // [rsp+0h] [rbp-Ch]
*(float *)&a1[1].m_uIndexInArray = a2;
v2 = *(float *)&a1[1].m_eObjType;
if ( v2 >= a2 )
{
v2 = a2 + -1.0;
*(float *)&a1[1].m_eObjType = a2 + -1.0;
}
*(float *)&v3 = fminf(a2, v2);
a1[1].m_uAutoReleaseCount = v3;
v4 = (float)(*(float *)&v3 - v2) / (float)(a2 - v2);
cocos2d::CCProgressTimer::setPercentage(*(cocos2d::CCProgressTimer **)&a1[1].m_uID, 100.0 * v4);
(*((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,
v4 * 360.0);
((void (__fastcall *)(cocos2d::extension::CCControlPotentiometer *, __int64))a1->sendActionsForControlEvents)(a1, 256);
}