//
// GJGameLevel::scoreVectorToString from 0x85f2e4 to 0x85f50c (552 bytes)
//
// 2 xrefs:
// > GJGameLevel::storeNewLocalScore @ 0x85f5d8
// > ??> @ 0x6c358
//
// 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:55:35 +0000
//
__int64 *__usercall GJGameLevel::scoreVectorToString@(__int64 *a1@, int a2@, __int64 *a3@)
{
__int64 v5; // x0
int *v6; // x1
__int64 v7; // x0
__int64 v8; // x20
unsigned __int64 v9; // x4
size_t v10; // x19
size_t v11; // x27
size_t v12; // x26
const char *v13; // x1
size_t v14; // x0
char *v16; // [xsp+68h] [xbp+68h]
_BYTE v17[8]; // [xsp+70h] [xbp+70h] BYREF
_BYTE v18[8]; // [xsp+78h] [xbp+78h] BYREF
unsigned int v19; // [xsp+80h] [xbp+80h]
size_t v20; // [xsp+88h] [xbp+88h] BYREF
unsigned __int64 v21; // [xsp+90h] [xbp+90h]
char *v22; // [xsp+98h] [xbp+98h]
_BYTE v23[504]; // [xsp+A0h] [xbp+A0h] BYREF
v5 = *a1;
v6 = (int *)a1[1];
if ( a2 == 1 )
{
v17[0] = 0;
std::__sort &,int *>(v5, v6, (__int64)v17);
}
else
{
v18[0] = 0;
std::__sort &,int *>(v5, v6, (__int64)v18);
}
v7 = *a1;
v8 = a1[1];
v9 = (v8 - *a1) >> 2;
if ( v9 > 0xA )
{
a1[1] = v8 - 4;
v9 = (v8 - 4 - v7) >> 2;
}
v20 = 0;
v10 = 0;
v21 = 500;
v22 = v23;
if ( v9 )
{
while ( 1 )
{
v19 = *(_DWORD *)(v7 + 4 * v10);
fmt::BasicWriter::FormatInt,char>>(&v20, v19);
v7 = *a1;
if ( ++v10 >= (a1[1] - *a1) >> 2 )
break;
while ( (_DWORD)v10 )
{
v11 = v20;
v12 = v20 + 1;
if ( v20 + 1 > v21 )
fmt::internal::Array::grow(&v20, v20 + 1);
v20 = v12;
v22[v11] = 44;
v19 = *(_DWORD *)(*a1 + 4 * v10);
fmt::BasicWriter::FormatInt,char>>(&v20, v19);
v7 = *a1;
if ( ++v10 >= (a1[1] - *a1) >> 2 )
goto LABEL_11;
}
}
LABEL_11:
v10 = v20;
if ( v20 + 1 > v21 )
fmt::internal::Array::grow(&v20, v20 + 1);
}
v22[v10] = 0;
*a3 = 0;
v13 = v22;
a3[1] = 0;
a3[2] = 0;
v16 = (char *)v13;
v14 = strlen(v13);
std::string::__init(a3, v16, v14);
if ( v22 != v23 && v22 )
operator delete[](v22);
return a3;
}