//
// cocos2d::extension::CCControlSlider::needsLayout from 0x18000ad20 to 0x18000ae41 (289 bytes)
//
// 6 xrefs:
// > ??> @ 0x180025ed8
// > ??> @ 0x18002de48
// > ??> @ 0x18002de58
// > ??> @ 0x18002fdf8
// > ??> @ 0x180049bb8
// > ??> @ 0x180049bc4
//
// 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::CCControlSlider::needsLayout(cocos2d::extension::CCControlSlider *this)
{
__int64 v2; // rcx
float v3; // xmm6_4
const struct cocos2d::CCPoint *v4; // rax
float *v5; // rax
__int64 v6; // rcx
__int64 v7; // rax
float v8[2]; // [rsp+30h] [rbp-38h] BYREF
_BYTE v9[4]; // [rsp+38h] [rbp-30h] BYREF
float v10; // [rsp+3Ch] [rbp-2Ch]
_BYTE v11[16]; // [rsp+40h] [rbp-28h] BYREF
float v12; // [rsp+70h] [rbp+8h] BYREF
v2 = *((_QWORD *)this + 62);
if ( v2 && *((_QWORD *)this + 64) )
{
if ( *((_QWORD *)this + 63) )
{
v3 = (float)(*((float *)this + 118) - *((float *)this + 119))
/ (float)(*((float *)this + 120) - *((float *)this + 119));
v4 = (const struct cocos2d::CCPoint *)(*(__int64 (**)(void))(*(_QWORD *)v2 + 200LL))();
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v12, v4);
v5 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 64) + 304LL))(*((_QWORD *)this + 64));
v6 = *((_QWORD *)this + 62);
v12 = v3 * *v5;
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v6 + 184LL))(v6, &v12);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v8, (const struct cocos2d::CCRect *)(*((_QWORD *)this + 63) + 424LL));
v7 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)v11, v8[0], v8[1], v12, v10);
cocos2d::CCRect::operator=(v8, v7);
(*(void (__fastcall **)(_QWORD, float *, _QWORD, _BYTE *))(**((_QWORD **)this + 63) + 968LL))(
*((_QWORD *)this + 63),
v8,
*(unsigned __int8 *)(*((_QWORD *)this + 63) + 440LL),
v9);
}
}
}