//
// sub_761858 from 0x761858 to 0x7618b4 (92 bytes)
//
// 2 xrefs:
// > ClearPlatformerSavesPopup::updateStats @ 0x761902
// > ClearPlatformerSavesPopup::updateStats @ 0x76196c
//
// 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:59:04 +0000
//
int *__fastcall sub_761858(int *a1, const char *a2, int a3, int a4)
{
cocos2d::CCString *v5; // r0
float v6; // s15
char *v7; // r0
const char *CString; // r0
const char *v9; // r5
size_t v10; // r0
if ( (unsigned int)a2 >= 0x400 )
{
if ( (unsigned int)a2 >= 0x100000 )
{
v6 = vcvts_n_f32_u32((unsigned int)a2, 0x14u);
v7 = "%.2f MB";
}
else
{
v6 = vcvts_n_f32_s32((unsigned int)a2, 0xAu);
v7 = "%.1f KB";
}
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)v7, a2, v6, a4);
}
else
{
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%zu B", a2);
}
CString = (const char *)cocos2d::CCString::getCString(v5);
*a1 = 0;
a1[1] = 0;
a1[2] = 0;
v9 = CString;
v10 = strlen(CString);
std::string::__init(a1, v9, v10);
return a1;
}