//
// LabelGameObject::createLabel from 0x4f5fa0 to 0x4f604c (172 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::updateLevelFont @ 0x466fd2
// > LabelGameObject::setupCustomSprites @ 0x4f609c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:51:17 +0000
//
int __fastcall LabelGameObject::createLabel(LabelGameObject *a1, int a2, int a3, int a4)
{
int v4; // r4
cocos2d::CCLabelBMFont *v6; // r5
GameManager *v7; // r7
int v8; // r0
const char *FontFile; // r0
const char *v10; // r2
int v11; // r0
float v12; // s15
float v13; // r1
int v14; // r7
void (__fastcall *v15)(int, _DWORD *); // r8
int result; // r0
_DWORD v17[3]; // [sp+4h] [bp-Ch] BYREF
v17[0] = a2;
v17[1] = a3;
v17[2] = a4;
v4 = (int)a1;
if ( *((_DWORD *)a1 + 412) )
a1 = (LabelGameObject *)LabelGameObject::removeLabel(a1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v6 = *(cocos2d::CCLabelBMFont **)(a2 + 8);
else
v6 = (cocos2d::CCLabelBMFont *)(a2 + 1);
v7 = (GameManager *)GameManager::sharedState(a1);
v8 = GameManager::sharedState(v7);
FontFile = GameManager::getFontFile(v7, *(_DWORD *)(v8 + 780));
v11 = cocos2d::CCLabelBMFont::create(v6, FontFile, v10);
v12 = *(float *)(v4 + 348) * 0.5;
v13 = *(float *)(v4 + 344) * 0.5;
*(_DWORD *)(v4 + 1648) = v11;
v14 = v11;
v15 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v11 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v17, v13, v12);
v15(v14, v17);
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v4 + 228))(v4, *(_DWORD *)(v4 + 1648));
result = LabelGameObject::updateLabelAlign(v4, *(_DWORD *)(v4 + 1672));
*(_BYTE *)(v4 + 1652) = 0;
return result;
}