//
// ColorSelectPopup::updateCopyColorTextInputLabel from 0x14012ca80 to 0x14012cb81 (257 bytes)
//
// 4 xrefs:
// > ColorSelectPopup::init @ 0x140129305
// > ColorSelectPopup::onUpdateCopyColor @ 0x14012c46b
// > ColorSelectPopup::onToggleHSVMode @ 0x14012c503
// > ??> @ 0x140916cc4
//
// This function is hookable on this platform (idp: pc, 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 11:27:01 +0000
//
void __fastcall ColorSelectPopup::updateCopyColorTextInputLabel(__int64 a1)
{
__int64 v1; // rdx
cocos2d::CCString *v3; // rax
const char *CString; // rax
const char *v5; // rdx
size_t v6; // rbx
size_t v7; // r8
__int64 v8; // rcx
_BYTE *v9; // rax
__int128 v10; // [rsp+20h] [rbp-28h] BYREF
__int64 v11; // [rsp+30h] [rbp-18h]
__int64 v12; // [rsp+38h] [rbp-10h]
v1 = *(unsigned int *)(a1 + 1160);
*(_BYTE *)(a1 + 744) = 1;
v3 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v1);
CString = cocos2d::CCString::getCString(v3);
v5 = "0";
v6 = -1;
if ( *(int *)(a1 + 1160) < 1000 )
v5 = CString;
v7 = -1;
v11 = 0;
v12 = 0;
v10 = 0;
do
++v7;
while ( v5[v7] );
sub_14003D230(&v10, v5, v7);
CCTextInputNode::setString(*(_QWORD **)(a1 + 1208), &v10);
v8 = *(unsigned int *)(a1 + 1160);
if ( (int)v8 >= 1000 )
{
v9 = (_BYTE *)GJSpecialColorSelect::textForColorIdx(v8);
v11 = 0;
v10 = 0;
v12 = 0;
do
++v6;
while ( v9[v6] );
sub_14003D230(&v10, v9, v6);
CCTextInputNode::updateLabel(*(_QWORD *)(a1 + 1208), (__int64 *)&v10);
}
*(_BYTE *)(a1 + 744) = 0;
}