//
// cocos2d::extension::CCControlColourPicker::setColorValue from 0xd0e4e8 to 0xd0e5c0 (216 bytes)
//
// 2 xrefs:
// > ??> @ 0x76018
// > ??> @ 0x150b190
//
// 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:01 +0000
//
__int64 (__fastcall ***__fastcall cocos2d::extension::CCControlColourPicker::setColorValue(
__int64 a1,
unsigned __int8 *a2))(_QWORD, _QWORD)
{
__int64 v3; // x21
__int64 v4; // d1
__int64 v5; // d2
__int64 v6; // x0
__int64 (__fastcall ***result)(_QWORD, _QWORD); // x0
v3 = a1 + 472;
*(_WORD *)(a1 + 472) = *(_WORD *)a2;
*(_BYTE *)(a1 + 474) = a2[2];
*(double *)(a1 + 480) = cocos2d::extension::CCControlUtils::HSVfromRGB(
(float)((float)*a2 / 255.0),
(float)((float)a2[1] / 255.0),
(float)((float)a2[2] / 255.0),
1.0);
*(_QWORD *)(a1 + 488) = v4;
*(_QWORD *)(a1 + 496) = v5;
cocos2d::extension::CCControlColourPicker::updateHueAndControlPicker((cocos2d::extension::CCControlColourPicker *)a1);
v6 = *(_QWORD *)(a1 + 528);
if ( v6 )
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v6 + 960LL))(v6, v3);
result = *(__int64 (__fastcall ****)(_QWORD, _QWORD))(a1 + 536);
if ( result )
return (__int64 (__fastcall ***)(_QWORD, _QWORD))(**result)(result, *(_QWORD *)(a1 + 472));
return result;
}