//
// std::__ndk1::to_string from 0x97ce9c to 0x97cf60 (196 bytes)
//
// 0 xrefs:
//
// 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 12:06:04 +0000
//
int __fastcall std::to_string(_DWORD *a1, int a2)
{
char v4; // r1
unsigned int v5; // r4
char *v6; // r0
signed int v7; // r0
unsigned int v8; // r1
void *v9; // r2
int v11; // [sp+0h] [bp-1Ch] BYREF
unsigned int v12; // [sp+4h] [bp-18h]
void *v13; // [sp+8h] [bp-14h]
int v14; // [sp+Ch] [bp-10h]
v13 = nullptr;
v11 = 0;
v12 = 0;
std::string::resize((unsigned __int8 *)&v11, 0xAu, 0);
v4 = v11;
v5 = v12;
if ( (v11 & 1) == 0 )
v5 = (unsigned __int8)v11 >> 1;
while ( 1 )
{
v6 = (char *)v13;
if ( (v4 & 1) == 0 )
v6 = (char *)&v11 + 1;
v7 = sub_993B88(v6, v5 + 1, "%u", a2);
if ( v7 >= 0 )
break;
v5 = (2 * v5) | 1;
LABEL_9:
std::string::resize((unsigned __int8 *)&v11, v5, 0);
v4 = v11;
}
if ( v7 > v5 )
{
v5 = v7;
goto LABEL_9;
}
std::string::resize((unsigned __int8 *)&v11, v7, 0);
v8 = v12;
v9 = v13;
*a1 = v11;
a1[1] = v8;
a1[2] = v9;
return _stack_chk_guard - v14;
}