//
// std::__ndk1::to_string from 0x97d10c to 0x97d1d4 (200 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(__int64 a1, unsigned int a2, unsigned int a3)
{
_DWORD *v3; // r8
char v6; // r1
unsigned int v7; // r5
char *v8; // r0
signed int v9; // r0
unsigned int v10; // r1
void *v11; // r2
int v13; // [sp+8h] [bp-20h] BYREF
unsigned int v14; // [sp+Ch] [bp-1Ch]
void *v15; // [sp+10h] [bp-18h]
int v16; // [sp+18h] [bp-10h]
v3 = (_DWORD *)a1;
v15 = nullptr;
v13 = 0;
v14 = 0;
std::string::resize((unsigned __int8 *)&v13, 0xAu, 0);
v6 = v13;
v7 = v14;
if ( (v13 & 1) == 0 )
v7 = (unsigned __int8)v13 >> 1;
while ( 1 )
{
v8 = (char *)v15;
if ( (v6 & 1) == 0 )
v8 = (char *)&v13 + 1;
v9 = sub_993B88(v8, v7 + 1, "%lld", __PAIR64__(a3, a2));
if ( v9 >= 0 )
break;
v7 = (2 * v7) | 1;
LABEL_9:
std::string::resize((unsigned __int8 *)&v13, v7, 0);
v6 = v13;
}
if ( v9 > v7 )
{
v7 = v9;
goto LABEL_9;
}
std::string::resize((unsigned __int8 *)&v13, v9, 0);
v10 = v14;
v11 = v15;
*v3 = v13;
v3[1] = v10;
v3[2] = v11;
return _stack_chk_guard - v16;
}