//
// LabelGameObject::removeLabel from 0x1404b36d0 to 0x1404b37a8 (216 bytes)
//
// 3 xrefs:
// > LevelEditorLayer::updateLevelFont @ 0x1402df1ce
// > LabelGameObject::createLabel @ 0x1404b3563
// > ??> @ 0x1406dcaac
//
// 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
//
// Hidden C++ exception states: #wind=1
void LabelGameObject::removeLabel(LabelGameObject *a1)
{
cocos2d::CCLabelBMFont *m_label; // rcx
const char *v3; // rax
size_t v4; // r8
void **v5; // rdx
void *Src[2]; // [rsp+20h] [rbp-28h] BYREF
size_t Size; // [rsp+30h] [rbp-18h]
unsigned __int64 v8; // [rsp+38h] [rbp-10h]
m_label = a1->m_label;
if ( m_label )
{
v3 = m_label->getString(&m_label->cocos2d::CCLabelProtocol);
*(_OWORD *)Src = 0;
Size = 0;
v8 = 0;
v4 = -1;
do
++v4;
while ( v3[v4] );
sub_14003A930(Src, v3, v4);
if ( !a1->m_updateLabel )
{
if ( &a1->m_labelString != (std::string *)Src )
{
v5 = Src;
if ( v8 > 0xF )
v5 = (void **)Src[0];
sub_14003CCE0((void **)&a1->m_labelString, v5, Size);
}
a1->m_labelDirty = 1;
}
sub_14003A830((__int64)Src);
a1->m_label->removeMeAndCleanup(a1->m_label);
a1->m_label = nullptr;
}
}