//
// GameToolbox::pointsToString from 0x100048a14 to 0x100048bcc (440 bytes)
//
// 37 xrefs:
// > LevelInfoLayer::setupPlatformerStats @ 0x100027a28
// > LevelInfoLayer::updateLabelValues @ 0x100029620
// > LevelInfoLayer::updateLabelValues @ 0x1000296cc
// > GJScoreCell::loadFromScore @ 0x100107e18
// > GJScoreCell::loadFromScore @ 0x100107fa8
// > GJScoreCell::loadFromScore @ 0x100108178
// > GJScoreCell::loadFromScore @ 0x1001082ec
// > GJScoreCell::loadFromScore @ 0x1001084a8
// > GJScoreCell::loadFromScore @ 0x100108670
// > GJScoreCell::loadFromScore @ 0x100108844
// > GJLevelScoreCell::loadFromScore @ 0x100109104
// > GJLocalLevelScoreCell::loadFromScore @ 0x100109594
// > PauseLayer::setupProgressBars @ 0x10014308c
// > GJShopLayer::init @ 0x10014b518
// > PurchaseItemPopup::init @ 0x10014df00
// > ProfilePage::loadPageFromUserInfo @ 0x1001980fc
// > ProfilePage::onInfo @ 0x10019a764
// > ProfilePage::onInfo @ 0x10019a788
// > ProfilePage::onInfo @ 0x10019a7ac
// > ProfilePage::onInfo @ 0x10019a7d0
// > ProfilePage::onInfo @ 0x10019a7f0
// > ProfilePage::onInfo @ 0x10019a80c
// > ProfilePage::onInfo @ 0x10019a8d4
// > DemonInfoPopup::init @ 0x10019d168
// > DemonInfoPopup::init @ 0x10019d20c
// > DemonInfoPopup::init @ 0x10019d468
// > DemonInfoPopup::init @ 0x10019d4fc
// > DemonInfoPopup::init @ 0x10019d634
// > DemonInfoPopup::init @ 0x10019d700
// > StarInfoPopup::init @ 0x10019dc1c
// > StarInfoPopup::init @ 0x10019ddf8
// > StarInfoPopup::init @ 0x10019deec
// > StarInfoPopup::init @ 0x10019dfb8
// > StarInfoPopup::init @ 0x10019e084
// > GJBaseGameLayer::updateSpecialLabels @ 0x100200e3c
// > EndLevelLayer::customSetup @ 0x1002f5ed8
// > GJPathPage::init @ 0x1003b9d04
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __usercall GameToolbox::pointsToString(__int64 a1@, __int64 a2@)
{
int v2; // w20
int v4; // w23
__int64 v5; // x24
int v6; // w25
unsigned int v7; // w26
char *p_p; // x8
_BOOL4 v10; // w9
bool v11; // zf
__int128 v12; // [xsp+0h] [xbp-80h] BYREF
__int64 v13; // [xsp+10h] [xbp-70h]
void *__p; // [xsp+18h] [xbp-68h] BYREF
int v15; // [xsp+20h] [xbp-60h]
unsigned __int8 v16; // [xsp+2Fh] [xbp-51h]
v2 = a1;
if ( (unsigned int)(a1 + 999) > 0x7CE )
{
if ( (int)a1 >= 0 )
a1 = (unsigned int)a1;
else
a1 = (unsigned int)-(int)a1;
GameToolbox::intToString(a1, &__p);
*(_QWORD *)a2 = 0;
*(_QWORD *)(a2 + 8) = 0;
*(_QWORD *)(a2 + 16) = 0;
if ( (v16 & 0x80u) == 0 )
v4 = v16;
else
v4 = v15;
v5 = (unsigned int)(v4 - 1);
if ( v4 - 1 >= 0 )
{
v6 = -1;
v7 = 1;
do
{
if ( (v16 & 0x80u) == 0 )
p_p = (char *)&__p;
else
p_p = (char *)__p;
sub_100048C00(&v12, (unsigned int)p_p[v5], a2);
if ( *(char *)(a2 + 23) < 0 )
operator delete(*(void **)a2);
*(_OWORD *)a2 = v12;
*(_QWORD *)(a2 + 16) = v13;
v10 = v5-- != 0;
if ( v6 + 3 * (v7 / 3) )
v11 = 1;
else
v11 = !v10;
if ( !v11 )
{
std::operator+(&v12, ",", a2);
if ( *(char *)(a2 + 23) < 0 )
operator delete(*(void **)a2);
*(_OWORD *)a2 = v12;
*(_QWORD *)(a2 + 16) = v13;
}
--v6;
++v7;
--v4;
}
while ( v4 );
}
if ( v2 < 0 )
{
std::operator+(&v12, "-", a2);
if ( *(char *)(a2 + 23) < 0 )
operator delete(*(void **)a2);
*(_OWORD *)a2 = v12;
*(_QWORD *)(a2 + 16) = v13;
}
if ( (char)v16 < 0 )
operator delete(__p);
}
else
{
GameToolbox::intToString(a1, (_QWORD *)a2);
}
}