//
// addStarsToMap from 0x7200ec to 0x720294 (424 bytes)
//
// 3 xrefs:
// > GameManager::recountUserStats @ 0x726870
// > GameManager::recountUserStats @ 0x7270e4
// > ??> @ 0x6d768
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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:52:23 +0000
//
__int64 __fastcall addStarsToMap(__int64 a1, unsigned __int8 *a2)
{
_BYTE *v3; // x20
unsigned __int64 v4; // x0
__int64 v5; // x19
__int64 v6; // x21
const char *v7; // x0
char *v8; // x2
const char *v9; // x0
int v10; // w26
_BYTE *v11; // x0
int v13; // [xsp+5Ch] [xbp+5Ch] BYREF
void *v14; // [xsp+60h] [xbp+60h] BYREF
_BYTE *v15; // [xsp+68h] [xbp+68h]
__int64 v16; // [xsp+70h] [xbp+70h]
v14 = nullptr;
v15 = nullptr;
v16 = 0;
sub_71A920(a2, &byte_1169BE0, (__int64 *)&v14);
v3 = v14;
v4 = 0xAAAAAAAAAAAAAAABLL * ((v15 - (_BYTE *)v14) >> 3);
if ( (int)v4 > 1 )
{
v5 = 0;
v6 = 48 * (((unsigned int)(v4 - 2) >> 1) + 1LL);
do
{
while ( 1 )
{
v7 = &v3[v5 + 1];
if ( (v3[v5] & 1) != 0 )
v7 = *(const char **)&v3[v5 + 16];
v13 = atoi(v7);
v8 = &v3[v5 + 24];
v9 = v8 + 1;
if ( (*v8 & 1) != 0 )
v9 = *((const char **)v8 + 2);
v10 = atoi(v9);
if ( (unsigned int)(v10 - 1) <= 9 )
break;
v5 += 48;
if ( v5 == v6 )
goto LABEL_10;
}
v5 += 48;
*(_DWORD *)std::unordered_map::operator[](a1, &v13) = v10;
v3 = v14;
}
while ( v5 != v6 );
}
LABEL_10:
if ( v3 )
{
v11 = v15;
if ( v15 != v3 )
{
do
{
v15 = v11 - 24;
std::string::~string((__int64)(v11 - 24));
v11 = v15;
}
while ( v15 != v3 );
v3 = v14;
}
operator delete(v3);
}
return _stack_chk_guard;
}