//
// sub_783854 from 0x783854 to 0x78391c (200 bytes)
//
// 2 xrefs:
// > sub_783AD8 @ 0x783b10
// > sub_783AD8 @ 0x783b40
//
// 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:59:30 +0000
//
int __fastcall sub_783854(int a1, cocos2d::CCLabelBMFont *a2, const char *a3)
{
float v3; // s0
float v4; // s1
cocos2d::CCLabelBMFont *v6; // r4
void (__fastcall *v7)(cocos2d::CCLabelBMFont *, _BYTE *); // r8
void (__fastcall *v8)(cocos2d::CCLabelBMFont *, _BYTE *); // r2
void (__fastcall *v9)(cocos2d::CCLabelBMFont *, _BYTE *); // r8
_BYTE v11[8]; // [sp+4h] [bp-10h] BYREF
v6 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(a2, "chatFont.fnt", a3);
v7 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_DWORD *)v6 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, 1.0, 0.5);
v7(v6, v11);
v8 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_DWORD *)v6 + 536);
v11[0] = 0;
v11[1] = 0;
v11[2] = 0;
v8(v6, v11);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, int))(*(_DWORD *)v6 + 512))(v6, 175);
cocos2d::CCLabelBMFont::limitLabelWidth(v6, 90.0, 0.6, 0.0);
v9 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_DWORD *)v6 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v11, (float)(*(float *)(*(_DWORD *)a1 + 400) - v3) - 21.0, v4);
v9(v6, v11);
return (*(int (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *))(**(_DWORD **)(*(_DWORD *)a1 + 412) + 228))(
*(_DWORD *)(*(_DWORD *)a1 + 412),
v6);
}