//
// sub_10018A770 from 0x10018a770 to 0x10018a8ec (380 bytes)
//
// 1 xrefs:
// > EditorUI::addObjectsToSmartTemplate @ 0x100478ad0
//
// 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 10:59:52 +0000
//
void __usercall sub_10018A770(__int64 a1@, __int64 a2@, std::string *a3@)
{
unsigned int *v6; // x9
__int64 v7; // x8
_QWORD *v8; // x23
unsigned __int64 v9; // x24
_DWORD *v10; // x22
double *v11; // x0
double v12; // d0
float32x2_t *v13; // x0
double v14; // d0
void **v15; // x1
std::string::size_type v16; // x2
void *__p[2]; // [xsp+8h] [xbp-68h] BYREF
unsigned __int8 v18; // [xsp+1Fh] [xbp-51h]
__int64 v19; // [xsp+20h] [xbp-50h] BYREF
float32x2_t v20; // [xsp+28h] [xbp-48h] BYREF
qsort(
*(void **)(*(_QWORD *)(a2 + 56) + 16LL),
**(unsigned int **)(a2 + 56),
8u,
(int (__cdecl *)(const void *, const void *))sub_1001A8B70);
EditorUI::getGroupCenter(a2, 0, (float *)&v20);
sub_100009900(a3, "");
v6 = *(unsigned int **)(a2 + 56);
v7 = *v6;
if ( (_DWORD)v7 )
{
v8 = *((_QWORD **)v6 + 2);
v9 = (unsigned __int64)&v8[v7 - 1];
do
{
v10 = (_DWORD *)*v8;
if ( !*v8 )
break;
if ( v10[257] != 749 )
{
v11 = (double *)(*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v10 + 192LL))(*v8);
v12 = sub_1000262F4(&v19, v11);
v13 = (float32x2_t *)(*(__int64 (__fastcall **)(_DWORD *, double))(*(_QWORD *)v10 + 192LL))(v10, v12);
*(float32x2_t *)&v14 = sub_10002632C(v13, &v20, (float32x2_t *)__p);
(*(void (__fastcall **)(_DWORD *, void **, double))(*(_QWORD *)v10 + 184LL))(v10, __p, v14);
(*(void (__fastcall **)(void **__return_ptr, _DWORD *, _QWORD))(*(_QWORD *)v10 + 1392LL))(
__p,
v10,
*(_QWORD *)(a1 + 1440));
(*(void (__fastcall **)(_DWORD *, __int64 *))(*(_QWORD *)v10 + 184LL))(v10, &v19);
if ( (v18 & 0x80u) == 0 )
v15 = __p;
else
v15 = (void **)__p[0];
if ( (v18 & 0x80u) == 0 )
v16 = v18;
else
v16 = (std::string::size_type)__p[1];
std::string::append(a3, (const std::string::value_type *)v15, v16);
std::string::append(a3, ";");
if ( (char)v18 < 0 )
operator delete(__p[0]);
}
++v8;
}
while ( (unsigned __int64)v8 <= v9 );
}
}