//
// cocos2d::extension::CCControlColourPicker::setColorValue from 0x180007eb0 to 0x180007fb3 (259 bytes)
//
// 3 xrefs:
// > ??> @ 0x1800246b8
// > ??> @ 0x18002fdf8
// > ??> @ 0x180049828
//
// 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::CCControlColourPicker::setColorValue(
cocos2d::extension::CCControlColourPicker *this,
const struct cocos2d::_ccColor3B *a2)
{
__m128i v3; // xmm1
int v4; // eax
__int64 v5; // rax
__int64 v6; // xmm0_8
__int64 v7; // rcx
void (__fastcall ***v8)(_QWORD, __int16 *); // rcx
_BYTE v9[32]; // [rsp+20h] [rbp-48h] BYREF
double v10[5]; // [rsp+40h] [rbp-28h] BYREF
__int16 v11; // [rsp+70h] [rbp+8h] BYREF
char v12; // [rsp+72h] [rbp+Ah]
*((_WORD *)this + 236) = *(_WORD *)a2;
*((_BYTE *)this + 474) = *((_BYTE *)a2 + 2);
v3 = _mm_cvtsi32_si128(*((unsigned __int8 *)a2 + 1));
v4 = *((unsigned __int8 *)a2 + 2);
v10[0] = (float)((float)*(unsigned __int8 *)a2 / 255.0);
v10[1] = (float)(_mm_cvtepi32_ps(v3).m128_f32[0] / 255.0);
v10[2] = (float)((float)v4 / 255.0);
v10[3] = 1.0;
v5 = cocos2d::extension::CCControlUtils::HSVfromRGB(v9, v10);
v6 = *(_QWORD *)(v5 + 16);
*((_OWORD *)this + 30) = *(_OWORD *)v5;
*((_QWORD *)this + 62) = v6;
cocos2d::extension::CCControlColourPicker::updateHueAndControlPicker(this);
v7 = *((_QWORD *)this + 66);
if ( v7 )
(**(void (__fastcall ***)(__int64, char *))(v7 + 320))(v7 + 320, (char *)this + 472);
v8 = *((void (__fastcall ****)(_QWORD, __int16 *))this + 67);
if ( v8 )
{
v11 = *((_WORD *)this + 236);
v12 = *((_BYTE *)this + 474);
(**v8)(v8, &v11);
}
}