//
// cocos2d::extension::CCControlPotentiometer::potentiometerMoved from 0xaa3c94 to 0xaa3ddc (328 bytes)
//
// 2 xrefs:
// > cocos2d::extension::CCControlPotentiometer::ccTouchMoved @ 0xaa3e38
// > ??> @ 0x318f0
//
// 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
//
// local variable allocation has failed, the output may be wrong!
void cocos2d::extension::CCControlPotentiometer::potentiometerMoved(
cocos2d::extension::CCControlPotentiometer *a1,
cocos2d::CCPoint a2)
{
const cocos2d::CCPoint *v2; // x1
const cocos2d::CCPoint *v3; // x21
const cocos2d::CCPoint *p_m_nTag; // x22
const cocos2d::CCPoint *v6; // x0
const cocos2d::CCPoint *v7; // x0
float v8; // s0
float v9; // s0
float v10; // s1
cocos2d::CCPoint v11; // [xsp+78h] [xbp+78h] BYREF
cocos2d::CCPoint v12; // [xsp+80h] [xbp+80h] BYREF
cocos2d::CCPoint v13; // [xsp+88h] [xbp+88h] BYREF
cocos2d::CCPoint v14; // [xsp+90h] [xbp+90h] BYREF
cocos2d::CCPoint v15; // 0:s0.4,4:s1.4
cocos2d::CCPoint v16; // 0:s2.4,4:s3.4
cocos2d::CCPoint v17; // 0:s4.4,4:s5.4
cocos2d::CCPoint v18; // 0:s6.4,4:s7.4
v3 = v2;
p_m_nTag = (const cocos2d::CCPoint *)&a1[1].m_nTag;
v6 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD, long double, long double))(**(_QWORD **)&a1[1].m_uID
+ 192LL))(
*(_QWORD *)&a1[1].m_uID,
*(long double *)&a2.x,
*(long double *)&a2.y);
cocos2d::CCPoint::CCPoint(&v11, v6);
cocos2d::CCPoint::CCPoint(&v12, v3);
v7 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)&a1[1].m_uID + 192LL))(*(_QWORD *)&a1[1].m_uID);
cocos2d::CCPoint::CCPoint(&v13, v7);
cocos2d::CCPoint::CCPoint(&v14, p_m_nTag);
v8 = cocos2d::extension::CCControlPotentiometer::angleInDegreesBetweenLineFromPoint_toPoint_toLineFromPoint_toPoint(
a1,
v15,
v16,
v17,
v18);
if ( v8 > 180.0 )
{
v8 = v8 - 360.0;
}
else if ( v8 < -180.0 )
{
v8 = v8 + 360.0;
}
cocos2d::extension::CCControlPotentiometer::setValue(
a1,
*(float *)&a1[1].m_uAutoReleaseCount
+ (float)((float)(v8 / 360.0) * (float)(*(float *)&a1[1].m_uIndexInArray - *(float *)&a1[1].m_eObjType)));
cocos2d::CCPoint::operator=(p_m_nTag, v9, v10);
}