//
// SongUsagePopup::buildStatRow from 0xc8ca5c to 0xc8cd9c (832 bytes)
//
// 2 xrefs:
// > SongUsagePopup::songUsageFinished @ 0xc8dd6c
// > ??> @ 0x535a8
//
// 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 13:05:45 +0000
//
__int64 __fastcall SongUsagePopup::buildStatRow(__int64 a1, __int64 a2, __int64 a3, int a4, float a5)
{
cocos2d::CCDirector *v9; // x0
cocos2d::CCNode *WinSize; // x0
__int64 v11; // x21
__int64 v12; // x27
__int64 v13; // x20
float v14; // s9
__int64 v15; // x22
float v16; // s8
void (__fastcall *v17)(__int64, float *); // x28
const char *v18; // x2
cocos2d::CCLabelBMFont *v19; // x0
__int64 v20; // x26
void (__fastcall *v21)(__int64, float *); // x28
void (__fastcall *v22)(__int64, float *); // x28
const char *v23; // x1
cocos2d::CCSprite *v24; // x0
__int64 v25; // x26
void (__fastcall *v26)(__int64, float); // x28
__int64 v27; // x0
int v28; // w0
const void *v29; // x0
void (__fastcall *v30)(__int64, float); // x28
float v31; // s0
float v32; // s9
float v33; // s9
void (__fastcall *v34)(__int64, float *); // x20
__int64 v37; // [xsp+B8h] [xbp+B8h] BYREF
float v38; // [xsp+C0h] [xbp+C0h] BYREF
v9 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(_stack_chk_guard);
WinSize = (cocos2d::CCNode *)cocos2d::CCDirector::getWinSize(&v37, v9);
v11 = cocos2d::CCNode::create(WinSize);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v11, 2);
if ( a4 <= 0 )
{
v33 = -11.0;
goto LABEL_16;
}
v12 = a2 + 1;
v13 = a3 + 1;
v14 = 0.0;
v15 = a2 + 24LL * (unsigned int)(a4 - 1) + 25;
do
{
v23 = (const char *)*(unsigned __int8 *)(v12 - 1);
v24 = (cocos2d::CCSprite *)v12;
if ( ((unsigned __int8)v23 & 1) != 0 )
v24 = *(cocos2d::CCSprite **)(v12 + 15);
v25 = cocos2d::CCSprite::createWithSpriteFrameName(v24, v23);
v26 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v25 + 160LL);
v27 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v25 + 328LL))(v25);
v26(v25, 19.2 / *(float *)(v27 + 4));
v28 = *(unsigned __int8 *)(v12 - 1);
if ( (v28 & 1) != 0 )
{
if ( *(_QWORD *)(v12 + 7) != 18 )
goto LABEL_4;
v29 = *(const void **)(v12 + 15);
}
else
{
if ( v28 >> 1 != 18 )
goto LABEL_4;
v29 = (const void *)v12;
}
if ( !memcmp(v29, "exportIcon_001.png", 0x12u) )
{
v30 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v25 + 160LL);
v31 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v25 + 168LL))(v25);
v30(v25, v31 * 0.9);
}
LABEL_4:
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v11 + 464LL))(v11, v25, 2);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v25 + 336LL))(v25);
v16 = v38;
v17 = *(void (__fastcall **)(__int64, float *))(*(_QWORD *)v25 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v38, v14 + (float)(v38 * 0.5), 0.0);
v17(v25, &v38);
v19 = (cocos2d::CCLabelBMFont *)v13;
if ( (*(_BYTE *)(v13 - 1) & 1) != 0 )
v19 = *(cocos2d::CCLabelBMFont **)(v13 + 15);
v12 += 24;
v13 += 24;
v20 = cocos2d::CCLabelBMFont::create(v19, "bigFont.fnt", v18);
v21 = *(void (__fastcall **)(__int64, float *))(*(_QWORD *)v20 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v38, 0.0, 0.5);
v21(v20, &v38);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v20 + 160LL))(v20, 0.5);
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v11 + 464LL))(v11, v20, 2);
v22 = *(void (__fastcall **)(__int64, float *))(*(_QWORD *)v20 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v38, (float)(v14 + v16) + 6.0, 0.0);
v22(v20, &v38);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v20 + 336LL))(v20);
v14 = v14 + (float)((float)((float)(v16 + 6.0) + v38) + 22.0);
}
while ( v12 != v15 );
v32 = v14 - 22.0;
if ( v32 > 340.0 )
{
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v11 + 160LL))(v11, 340.0 / v32);
v33 = 170.0;
}
else
{
v33 = v32 * 0.5;
}
LABEL_16:
v34 = *(void (__fastcall **)(__int64, float *))(*(_QWORD *)v11 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v38, -(float)(v33 - (float)(*(float *)&v37 * 0.5)), a5);
v34(v11, &v38);
return _stack_chk_guard;
}