//
// GJCompactUserCell::addStat from 0x100240020 to 0x10024026f (591 bytes)
//
// 8 xrefs:
// > GJCompactUserCell::buildUserRow @ 0x10023fd12
// > GJCompactUserCell::buildUserRow @ 0x10023fd33
// > GJCompactUserCell::buildUserRow @ 0x10023fd54
// > GJCompactUserCell::buildUserRow @ 0x10023fd7a
// > GJCompactUserCell::createStatStrip @ 0x10023ff9f
// > GJCompactUserCell::createStatStrip @ 0x10023ffc0
// > GJCompactUserCell::createStatStrip @ 0x10023ffe1
// > GJCompactUserCell::createStatStrip @ 0x100240008
//
// This function is hookable on this platform (idp: pc, 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 12:27:17 +0000
//
float *__fastcall GJCompactUserCell::addStat(unsigned int a1, const char *a2, __int64 a3, float *a4, int a5, float a6)
{
char *v9; // rdi
__int64 v10; // r12
__int64 v11; // r14
float v12; // xmm0_4
float v13; // xmm1_4
float v14; // xmm0_4
float *result; // rax
_BYTE v16[8]; // [rsp+0h] [rbp-60h] BYREF
float *v17; // [rsp+8h] [rbp-58h]
__int16 v18; // [rsp+10h] [rbp-50h] BYREF
char v19; // [rsp+12h] [rbp-4Eh]
void *__p; // [rsp+20h] [rbp-40h]
__int64 v21; // [rsp+28h] [rbp-38h]
float v22; // [rsp+30h] [rbp-30h]
float v23; // [rsp+34h] [rbp-2Ch]
*(float *)&v21 = a6;
GameToolbox::intToShortString(&v18, a1, 1);
if ( (v18 & 1) != 0 )
v9 = (char *)__p;
else
v9 = (char *)&v18 + 1;
v10 = cocos2d::CCLabelBMFont::create_3(v9, "bigFont.fnt");
v22 = *(float *)&a5;
if ( (v18 & 1) != 0 )
operator delete(__p);
sub_100278250(&v18, 0.0, 0.5);
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v10 + 296LL))(v10, &v18);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v10 + 160LL))(v10, 0.40000001);
v17 = a4;
sub_100278250(&v18, *a4, *(float *)&v21);
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v10 + 184LL))(v10, &v18);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a3 + 464LL))(a3, v10, 2);
v11 = cocos2d::CCSprite::createWithSpriteFrameName(a2);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v11 + 160LL))(v11, 0.5);
v21 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 192LL))(v10);
v23 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 328LL))(v10);
v12 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v10 + 168LL))(v10);
v23 = (float)(v12 * v23) + 7.0;
if ( !strcmp(a2, "GJ_starsIcon_001.png") )
v13 = -1.0;
else
v13 = 0.0;
sub_100278250(v16, v23, v13);
sub_100278350(&v18, v21, v16);
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v11 + 184LL))(v11, &v18);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a3 + 464LL))(a3, v11, 2);
if ( LOBYTE(v22) )
{
v19 = -126;
v18 = -32126;
(*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v10 + 1072LL))(v10, &v18);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v10 + 1024LL))(v10, 150);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v11 + 912LL))(v11, 110);
}
LODWORD(v21) = (*(float (__fastcall **)(__int64))(*(_QWORD *)v11 + 224LL))(v11);
v22 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 328LL))(v11);
v14 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v11 + 168LL))(v11);
result = v17;
*v17 = (float)((float)((float)(v14 * v22) * 0.5) + *(float *)&v21) + 8.0;
return result;
}