//
// cocos2d::CCLabelTTF::_updateWithTextDefinition from 0x18004f930 to 0x18004faee (446 bytes)
//
// 5 xrefs:
// > cocos2d::CCLabelTTF::initWithStringAndTextDefinition @ 0x180050462
// > cocos2d::CCLabelTTF::setTextDefinition @ 0x180050638
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bbe84
// > ??> @ 0x1801bbe90
//
// 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:21:45 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall cocos2d::CCLabelTTF::_updateWithTextDefinition(
cocos2d::CCLabelTTF *this,
struct cocos2d::_ccFontDefinition *Src,
char a3)
{
float *v6; // rax
__int64 v7; // rax
_QWORD *v8; // rdi
void *v9; // rbx
struct cocos2d::_ccFontDefinition *v10; // r12
unsigned __int64 v11; // rbp
__int64 v12; // rsi
size_t v13; // rax
__int64 v14; // rax
size_t v15; // rcx
__int64 v16; // [rsp+60h] [rbp+8h] BYREF
v6 = kmVec2Fill((float *)&v16, *((float *)Src + 11), *((float *)Src + 12));
cocos2d::CCSize::operator=((_DWORD *)this + 152, v6);
*((_DWORD *)this + 154) = *((_DWORD *)Src + 9);
*((_DWORD *)this + 155) = *((_DWORD *)Src + 10);
v7 = sub_1800E4AC0(0x20u);
v8 = (_QWORD *)v7;
v16 = v7;
v9 = nullptr;
if ( v7 )
{
*(_OWORD *)v7 = 0;
*(_QWORD *)(v7 + 16) = 0;
*(_QWORD *)(v7 + 24) = 0;
v10 = Src;
if ( *((_QWORD *)Src + 3) > 0xFu )
v10 = *(struct cocos2d::_ccFontDefinition **)Src;
v11 = *((_QWORD *)Src + 2);
v12 = 0x7FFFFFFFFFFFFFFFLL;
if ( v11 > 0x7FFFFFFFFFFFFFFFLL )
std::vector::_Xlen();
if ( v11 <= 0xF )
{
*(_QWORD *)(v7 + 16) = v11;
*(_QWORD *)(v7 + 24) = 15;
*(_OWORD *)v7 = *(_OWORD *)v10;
goto LABEL_21;
}
if ( (v11 | 0xF) <= 0x7FFFFFFFFFFFFFFFLL )
{
v12 = v11 | 0xF;
if ( (v11 | 0xF) < 0x16 )
v12 = 22;
v15 = v12 + 1;
if ( v12 == -1 )
goto LABEL_19;
if ( v15 < 0x1000 )
{
v9 = (void *)sub_1800E4AC0(v15);
LABEL_19:
*v8 = v9;
v8[2] = v11;
v8[3] = v12;
memcpy(v9, v10, v11 + 1);
goto LABEL_21;
}
v13 = v12 + 40;
if ( v12 + 40 < (unsigned __int64)(v12 + 1) )
Concurrency::cancel_current_task();
}
else
{
v13 = 0x8000000000000027uLL;
}
v14 = sub_1800E4AC0(v13);
if ( !v14 )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
v9 = (void *)((v14 + 39) & 0xFFFFFFFFFFFFFFE0uLL);
*((_QWORD *)v9 - 1) = v14;
goto LABEL_19;
}
v8 = nullptr;
LABEL_21:
*((_QWORD *)this + 78) = v8;
*((float *)this + 158) = (float)*((int *)Src + 8);
if ( a3 )
cocos2d::CCLabelTTF::updateTexture(this);
}