//
// sub_10055C768 from 0x10055c768 to 0x10055c8f4 (396 bytes)
//
// 1 xrefs:
// > sub_10055C764 @ 0x10055c764
//
// 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 11:08:01 +0000
//
__int64 __fastcall sub_10055C768(_BYTE *a1, int a2, float *a3, int a4, int a5, int a6, int a7, int a8)
{
__int64 v12; // x22
__int16 *v13; // x0
size_t v14; // x1
float v15; // s0
__int16 v16; // w8
double v17; // d0
int v18; // w0
__int64 v19; // x25
__int64 v20; // x22
_WORD *v21; // x0
size_t v22; // x1
float v23; // s0
double v24; // d0
int v25; // w0
if ( a2 < 1 )
{
v12 = 0;
if ( !a4 )
goto LABEL_25;
}
else
{
*a1 = 123;
v12 = 1;
if ( !a4 )
goto LABEL_25;
}
if ( (int)v12 >= a2 )
goto LABEL_25;
v13 = (__int16 *)&a1[(unsigned int)v12];
v14 = (unsigned int)(a2 - v12);
v15 = *a3;
if ( (int)v14 >= 2 )
{
if ( v15 == 1.0 )
{
v16 = 49;
goto LABEL_12;
}
if ( v15 == 0.0 )
{
v16 = 48;
LABEL_12:
*v13 = v16;
v18 = 1;
goto LABEL_13;
}
}
v17 = v15;
v18 = sub_1005ED57C((int)v13, v14, (int)"%g", a4, a5, a6, a7, a8, SLOBYTE(v17));
LABEL_13:
v12 = (unsigned int)(v18 + v12);
if ( a4 >= 2 && (int)v12 < a2 )
{
v19 = 1;
while ( 1 )
{
a1[(int)v12] = 44;
v20 = (int)v12 + 1LL;
v21 = &a1[v20];
v22 = (unsigned int)(a2 - v20);
v23 = a3[v19];
if ( (int)v22 < 2 )
break;
if ( v23 == 1.0 )
{
*v21 = 49;
}
else
{
if ( v23 != 0.0 )
break;
*v21 = 48;
}
v25 = 1;
LABEL_23:
v12 = (unsigned int)(v25 + v20);
if ( ++v19 >= (unsigned __int64)(unsigned int)a4 || (int)v12 >= a2 )
goto LABEL_25;
}
v24 = v23;
v25 = sub_1005ED57C((int)v21, v22, (int)"%g", a4, a5, a6, a7, a8, SLOBYTE(v24));
goto LABEL_23;
}
LABEL_25:
if ( (int)v12 < a2 )
{
a1[(int)v12] = 125;
return (unsigned int)(v12 + 1);
}
return v12;
}