//
// GameToolbox::intToShortString from 0x3d3c38 to 0x3d3da8 (368 bytes)
//
// 17 xrefs:
// > GJCompactUserCell::addStat @ 0x4276c4
// > LevelListCell::loadFromList @ 0x429d88
// > LevelListCell::loadFromList @ 0x429ebc
// > LevelCell::loadCustomLevelCell @ 0x42ff74
// > LevelCell::loadCustomLevelCell @ 0x4300cc
// > LevelListLayer::updateStatsArt @ 0x6d63e2
// > LevelListLayer::updateStatsArt @ 0x6d6536
// > LevelListLayer::updateStatsArt @ 0x6d69da
// > SongUsagePopup::songUsageFinished @ 0x760b34
// > SongUsagePopup::songUsageFinished @ 0x760b62
// > SongUsagePopup::songUsageFinished @ 0x760c48
// > SongUsagePopup::songUsageFinished @ 0x760c76
// > EditorSoundConfigCell::loadFromConfig @ 0x7843cc
// > EditorSoundConfigCell::loadFromConfig @ 0x7844a2
// > EditorSoundConfigInfoLayer::refreshLikeState @ 0x7850f8
// > EditorSoundConfigInfoLayer::init @ 0x7875fa
// > EditorSoundConfigInfoLayer::init @ 0x7876cc
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:46:42 +0000
//
GameToolbox *__fastcall GameToolbox::intToShortString(GameToolbox *this, int a2, int a3)
{
int v4; // r6
float v6; // s15
const char *v7; // r3
const char *v8; // r0
const char *v9; // r5
size_t v10; // r0
unsigned int v12[3]; // [sp+Ch] [bp-208h] BYREF
char v13; // [sp+18h] [bp-1FCh] BYREF
v4 = a2;
v12[1] = 500;
v12[0] = 0;
v12[2] = (unsigned int)&v13;
if ( a2 < 0 )
{
v4 = -a2;
fmt::BasicWriter::operator<<(v12, "-", 0);
}
if ( v4 >= 1000 )
{
v6 = (float)v4;
if ( v4 > 9999 )
{
if ( v4 > 999999 )
{
floorf(v6 / 100000.0);
fmt::BasicWriter::operator<<((int)v12);
v7 = "M";
}
else
{
if ( a3 )
floorf(v6 / 100.0);
else
floorf(v6 / 1000.0);
fmt::BasicWriter::operator<<((int)v12);
v7 = "K";
}
}
else
{
floorf(v6 / 100.0);
fmt::BasicWriter::operator<<((int)v12);
v7 = "K";
}
fmt::BasicWriter::operator<<(v12, v7, 0);
}
else
{
fmt::BasicWriter::operator<<(v12, v4);
}
v8 = (const char *)fmt::BasicWriter::c_str((int *)v12);
*(_DWORD *)this = 0;
*((_DWORD *)this + 1) = 0;
v9 = v8;
*((_DWORD *)this + 2) = 0;
v10 = strlen(v8);
std::string::__init((int *)this, v9, v10);
fmt::internal::Array::free((int)v12);
return this;
}