//
// sub_10037D90C from 0x10037d90c to 0x10037dac8 (444 bytes)
//
// 1 xrefs:
// > SFXBrowser::cellPerformedAction @ 0x1001f829c
//
// This function is hookable on this platform (idp: arm, 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:03:28 +0000
//
__int64 __fastcall sub_10037D90C(__int64 a1, __int64 a2)
{
__int64 v4; // x0
double WinSize; // d0
__int64 v6; // x0
__int64 v7; // x20
int v8; // w0
unsigned int v9; // w23
void **v10; // x1
void *__p[2]; // [xsp+0h] [xbp-60h] BYREF
char v13; // [xsp+17h] [xbp-49h]
__int64 v14; // [xsp+18h] [xbp-48h] BYREF
v4 = cocos2d::CCDirector::sharedDirector();
WinSize = cocos2d::CCDirector::getWinSize(v4, &v14);
if ( *(char *)(a2 + 23) >= 0 )
v6 = cocos2d::CCLabelBMFont::create_1((const char *)a2, "chatFont.fnt", WinSize);
else
v6 = cocos2d::CCLabelBMFont::create_1(*(const char **)a2, "chatFont.fnt", WinSize);
v7 = v6;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v6 + 1024LL))(v6, 200);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v7 + 1072LL))(v7, &unk_10076D71C);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v7 + 160LL))(v7, 0.6);
v8 = sub_10004B590((char *)a2, " / ");
if ( v8 >= 2 )
{
v9 = v8 + 1;
do
{
if ( (float)(*(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 328LL))(v7) * 0.6) <= 280.0 )
break;
sub_10004B724(" / ", (const std::string *)a2, v9 - 2, (__int64)__p);
v10 = v13 >= 0 ? __p : (void **)__p[0];
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v7 + 928LL))(v7, v10);
if ( v13 < 0 )
operator delete(__p[0]);
--v9;
}
while ( v9 > 2 );
}
cocos2d::CCLabelBMFont::limitLabelWidth(v7, 280.0, 0.6, 0.3);
sub_1000262BC(
(float *)__p,
*(float *)&v14 * 0.5,
*(float *)(a1 + 684) + (float)((float)(*((float *)&v14 + 1) * 0.5) + -22.0));
(*(void (__fastcall **)(__int64, void **))(*(_QWORD *)v7 + 184LL))(v7, __p);
return (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v7);
}