//
// cocos2d::extension::CCControlPotentiometer::initWithTrackSprite_ProgressTimer_ThumbSprite from 0xd15100 to 0xd1527c (380 bytes)
//
// 2 xrefs:
// > cocos2d::extension::CCControlPotentiometer::create @ 0xd152dc
// > ??> @ 0x720b8
//
// This function is hookable on this platform (idp: arm, 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 13:07:05 +0000
//
__int64 __fastcall cocos2d::extension::CCControlPotentiometer::initWithTrackSprite_ProgressTimer_ThumbSprite(
cocos2d::extension::CCControlPotentiometer *this,
cocos2d::CCSprite *a2,
cocos2d::CCProgressTimer *a3,
cocos2d::CCSprite *a4)
{
__int64 result; // x0
unsigned int v9; // w22
cocos2d::CCProgressTimer *v10; // x24
cocos2d::CCObject *v11; // x0
cocos2d::CCObject *v12; // x0
cocos2d::CCProgressTimer *v13; // x0
void (__fastcall *v14)(cocos2d::CCSprite *, __int64); // x24
__int64 v15; // x0
void (__fastcall *v16)(cocos2d::extension::CCControlPotentiometer *, __int64); // x20
__int64 v17; // x0
LOBYTE(result) = cocos2d::extension::CCControl::init(this);
v9 = (unsigned __int8)result;
if ( !(_BYTE)result )
return (unsigned __int8)result;
v10 = a3;
(*(void (__fastcall **)(cocos2d::extension::CCControlPotentiometer *, __int64))(*(_QWORD *)this + 1000LL))(this, 1);
v11 = *((cocos2d::CCObject **)this + 60);
if ( v11 != a3 )
{
v10 = nullptr;
if ( a3 )
{
v10 = a3;
cocos2d::CCObject::retain(a3);
v11 = *((cocos2d::CCObject **)this + 60);
}
if ( v11 )
cocos2d::CCObject::release(v11);
*((_QWORD *)this + 60) = a3;
}
v12 = *((cocos2d::CCObject **)this + 59);
if ( a4 != v12 )
{
if ( a4 )
{
cocos2d::CCObject::retain(a4);
v12 = *((cocos2d::CCObject **)this + 59);
}
if ( v12 )
cocos2d::CCObject::release(v12);
*((_QWORD *)this + 59) = a4;
}
v13 = v10;
v14 = *(void (__fastcall **)(cocos2d::CCSprite *, __int64))(*(_QWORD *)a4 + 184LL);
v15 = (*(__int64 (__fastcall **)(cocos2d::CCProgressTimer *))(*(_QWORD *)a3 + 192LL))(v13);
v14(a4, v15);
(*(void (__fastcall **)(cocos2d::extension::CCControlPotentiometer *, cocos2d::CCSprite *, __int64))(*(_QWORD *)this + 464LL))(
this,
a4,
2);
(*(void (__fastcall **)(cocos2d::extension::CCControlPotentiometer *, cocos2d::CCProgressTimer *, __int64))(*(_QWORD *)this + 464LL))(
this,
a3,
1);
(*(void (__fastcall **)(cocos2d::extension::CCControlPotentiometer *, cocos2d::CCSprite *))(*(_QWORD *)this + 456LL))(
this,
a2);
v16 = *(void (__fastcall **)(cocos2d::extension::CCControlPotentiometer *, __int64))(*(_QWORD *)this + 320LL);
v17 = (*(__int64 (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)a2 + 328LL))(a2);
v16(this, v17);
*((float *)this + 126) = 1.0;
*((_DWORD *)this + 125) = 0;
cocos2d::extension::CCControlPotentiometer::setValue(this, 0.0);
return v9;
}