//
// SecretLayer5::updateSearchLabel from 0x59dab4 to 0x59dbd8 (292 bytes)
//
// 3 xrefs:
// > SecretLayer5::textInputClosed @ 0x59dc02
// > SecretLayer5::textChanged @ 0x59dc4e
// > SecretLayer5::init @ 0x59f13e
//
// 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 SecretLayer5::updateSearchLabel(SecretLayer5 *a1, const char *a2)
{
cocos2d::CCLabelBMFont *m_textLabel; // r8
unsigned int v5; // r9
int v6; // r9
CCTextInputNode *m_textInput; // r6
void (__fastcall *setColor)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r3
void (__fastcall *v9)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::ccColor3B *); // r2
_BYTE v10[4]; // [sp+14h] [bp-4h] BYREF
int v11; // [sp+18h] [bp+0h] BYREF
_BYTE v12[4]; // [sp+1Ch] [bp+4h] BYREF
char *v13; // [sp+20h] [bp+8h] BYREF
m_textLabel = a1->m_textInput->m_textLabel;
sub_776584((int)v10, (char *)a2);
sub_776584((int)&v11, (char *)&unk_939830);
if ( sub_774DBC(v10, &v11) )
{
sub_776584((int)v12, (char *)a2);
sub_776584((int)&v13, "...");
v5 = __clz(sub_774DBC(v12, &v13));
sub_774008(&v13);
v6 = v5 >> 5;
sub_774008(v12);
}
else
{
v6 = 1;
}
sub_774008(&v11);
sub_774008(v10);
if ( v6 )
{
m_textInput = a1->m_textInput;
sub_776584((int)&v13, "...");
CCTextInputNode::updateLabel((int)m_textInput, &v13);
sub_774008(&v13);
setColor = m_textLabel->setColor;
LOWORD(v13) = -26260;
BYTE2(v13) = -40;
setColor(m_textLabel, (const cocos2d::ccColor3B *)&v13);
}
else
{
v9 = m_textLabel->setColor;
LOWORD(v13) = -1;
BYTE2(v13) = -1;
v9(m_textLabel, (const cocos2d::ccColor3B *)&v13);
}
}