//
// formatBytes from 0x56cf8c to 0x56d020 (148 bytes)
//
// 8 xrefs:
// > CustomSongWidget::updateMultiAssetInfo @ 0x4e525c
// > CustomSongWidget::updateMultiAssetInfo @ 0x4e527a
// > CustomSongWidget::updateMultiAssetInfo @ 0x4e5428
// > CustomSFXWidget::updateSFXInfo @ 0x6a6618
// > AutoBackupPopup::statsText @ 0x73c5f0
// > AutoBackupPopup::onDeleteSelected @ 0x73c946
// > AutoBackupOptionsPopup::onDeleteAll @ 0x73e5c4
// > AutoBackupPopup::buildRows @ 0x73f2d0
//
// 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:52:34 +0000
//
int *__fastcall formatBytes(int *a1, int a2)
{
int v3; // r5
float v4; // s16
int *v5; // r3
char *v6; // r3
cocos2d::CCString *v7; // r0
const char *CString; // r0
const char *v9; // r5
size_t v10; // r0
v3 = 0;
v4 = (float)a2;
while ( COERCE_FLOAT(roundf()) >= 1.0 && v3 != 2 )
{
++v3;
v4 = v4 * 0.00097656;
}
v5 = &dword_D2C254[3 * v3];
if ( (*(_BYTE *)v5 & 1) != 0 )
v6 = (char *)v5[2];
else
v6 = (char *)v5 + 1;
v7 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%0.1f %s",
(const char *)dword_D2C254,
v4,
v6);
CString = (const char *)cocos2d::CCString::getCString(v7);
*a1 = 0;
a1[1] = 0;
a1[2] = 0;
v9 = CString;
v10 = strlen(CString);
std::string::__init(a1, v9, v10);
return a1;
}