//
// sub_100247608 from 0x100247608 to 0x10024793c (820 bytes)
//
// 2 xrefs:
// > sub_100246A8C @ 0x100246da8
// > sub_100246A8C @ 0x100247150
//
// 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:01:27 +0000
//
__int64 __fastcall sub_100247608(__int64 result, int a2, int a3, int a4, int a5, int a6, float32x2_t *a7, __int64 *a8)
{
__int64 v13; // x20
unsigned int v14; // w27
float v15; // s10
__int64 v16; // x25
__int64 v17; // x26
__n128 v18; // q0
float *v19; // x0
__int64 v20; // x0
float v21; // s8
float v22; // s8
float v23; // s8
float v24; // s0
double v25; // d0
__int64 v26; // x19
float32x2_t v27; // [xsp+0h] [xbp-A0h] BYREF
float32x2_t v28; // [xsp+8h] [xbp-98h] BYREF
__int64 v29; // [xsp+10h] [xbp-90h] BYREF
__int16 v30; // [xsp+18h] [xbp-88h] BYREF
char v31; // [xsp+1Ah] [xbp-86h]
__int16 v32; // [xsp+1Ch] [xbp-84h] BYREF
char v33; // [xsp+1Eh] [xbp-82h]
v32 = a5;
v33 = BYTE2(a5);
v30 = a6;
v31 = BYTE2(a6);
if ( a4 >= 1 )
{
v13 = result;
sub_1000262EC(&v29);
v14 = 0;
v15 = (float)a3;
do
{
v16 = cocos2d::CCSprite::createWithSpriteFrameName("whiteSquare60_001.png");
v17 = cocos2d::CCSprite::createWithSpriteFrameName("whiteSquare60_001.png");
v18.n128_f64[0] = (*(double (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v16 + 464LL))(v16, v17, 1);
cocos2d::CCNode::convertToNodeSpace(&v28, v16, &unk_1009F50B0, v18);
(*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v17 + 184LL))(v17, &v28);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(v13 + 584) + 464LL))(
*(_QWORD *)(v13 + 584),
v16,
3);
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v16 + 960LL))(v16, &v30);
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v17 + 960LL))(v17, &v32);
v19 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v16 + 328LL))(v16);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v16 + 128LL))(v16, (float)a2 / *v19);
v20 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v16 + 328LL))(v16);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v16 + 144LL))(v16, v15 / *(float *)(v20 + 4));
v21 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v16 + 136LL))(v16);
v22 = v21 / (*(float (__fastcall **)(__int64))(*(_QWORD *)v16 + 152LL))(v16);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v17 + 128LL))(v17, 0.75);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v17 + 144LL))(v17, 0.75 / v22);
v23 = *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v16 + 328LL))(v16) + 4);
v24 = (float)(v23 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v16 + 152LL))(v16)) * -0.25 * 0.5;
sub_1000262BC((float *)&v27, 0.0, (float)(v15 + v24) * (float)v14);
sub_100026318(a7, &v27, &v28);
v25 = sub_10002630C(&v29, (double *)&v28);
result = (*(__int64 (__fastcall **)(__int64, __int64 *, double))(*(_QWORD *)v16 + 184LL))(v16, &v29, v25);
++v14;
}
while ( a4 != v14 );
if ( *((char *)a8 + 23) < 0 )
{
if ( !a8[1] )
return result;
a8 = (__int64 *)*a8;
}
else if ( !*((_BYTE *)a8 + 23) )
{
return result;
}
v26 = cocos2d::CCLabelBMFont::create_1(a8, "chatFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(v13 + 584) + 464LL))(
*(_QWORD *)(v13 + 584),
v26,
3);
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v26 + 1072LL))(v26, &unk_100762858);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v26 + 1024LL))(v26, 125);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v26 + 160LL))(v26, 0.8);
sub_1000262BC((float *)&v28, *(float *)&v29, *((float *)&v29 + 1) + 13.0);
return (*(__int64 (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v26 + 184LL))(v26, &v28);
}
return result;
}