//
// LabelGameObject::createLabel from 0x100388ae0 to 0x100388bac (204 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::updateLevelFont @ 0x10036235c
// > LabelGameObject::setupCustomSprites @ 0x100388a88
//
// 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 __fastcall LabelGameObject::createLabel(LabelGameObject *a1, const char *a2)
{
GameManager *v4; // x21
GameManager *v5; // x0
const char *FontFile; // x0
cocos2d::CCLabelBMFont *v7; // x20
__n128 v8; // q0
__n128 v9; // q1
int v10; // [xsp+8h] [xbp-28h] BYREF
if ( a1->m_label )
LabelGameObject::removeLabel(a1);
if ( a2[23] < 0 )
a2 = *(const char **)a2;
v4 = GameManager::sharedState();
v5 = GameManager::sharedState();
FontFile = GameManager::getFontFile(v4, v5->m_loadedFont);
v7 = cocos2d::CCLabelBMFont::create_1(a2, FontFile);
a1->m_label = v7;
v8.n128_f32[0] = a1->m_obRect.size.width * 0.5;
v9.n128_f32[0] = a1->m_obRect.size.height * 0.5;
sub_100022980(v8, v9, &v10);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int *))v7->setPosition)(v7, &v10);
((void (__fastcall *)(LabelGameObject *, cocos2d::CCLabelBMFont *))a1->addChild)(a1, a1->m_label);
LabelGameObject::updateLabelAlign(a1, a1->m_alignment);
a1->m_labelDirty = 0;
}