//
// GameToolbox::alignItemsHorisontally from 0x100047c8c to 0x100047e54 (456 bytes)
//
// 54 xrefs:
// > SetGroupIDLayer::init @ 0x10003f71c
// > UILayer::init @ 0x1000508f8
// > LevelSearchLayer::init @ 0x10005b050
// > LevelSearchLayer::init @ 0x10005b440
// > DemonFilterSelectLayer::init @ 0x10005fcc8
// > sub_100067294 @ 0x100067508
// > sub_100067294 @ 0x1000675f0
// > RateStarsLayer::init @ 0x100088c2c
// > RateStarsLayer::init @ 0x100088c84
// > RateStarsLayer::init @ 0x100088e6c
// > AccountRegisterLayer::init @ 0x100089a44
// > sub_10008C7D4 @ 0x10008cac8
// > sub_100110828 @ 0x100110bb0
// > sub_100110828 @ 0x100110bf4
// > sub_100110828 @ 0x100110c38
// > sub_100110828 @ 0x100110ca8
// > LevelCell::loadCustomLevelCell @ 0x100133c54
// > GameSettingsLayer::setupTabs @ 0x1001646ac
// > TabbedPopupLayer::createTabButtons @ 0x1001aa320
// > PauseLayer::customSetup @ 0x1001bef24
// > CreateStartPosPopup::init @ 0x1001c1fa0
// > NewgroundsInfoLayer::init @ 0x1001c4c44
// > sub_1001C4F04 @ 0x1001c54d0
// > PurchaseItemPopup::init @ 0x1001ccacc
// > StartPosLayer::addModeButtons @ 0x100210554
// > StartPosLayer::addSpeedButtons @ 0x100210728
// > sub_10021C488 @ 0x10021c75c
// > sub_10021C488 @ 0x10021c7a4
// > ProfilePage::loadPageFromUserInfo @ 0x10022d078
// > ProfilePage::setupAccountButtons @ 0x10022d920
// > DemonInfoPopup::init @ 0x1002318ec
// > MyStuffPopup::init @ 0x100232f10
// > sub_100245DF0 @ 0x1002460c4
// > sub_100245DF0 @ 0x100246114
// > sub_100245DF0 @ 0x1002463ec
// > GauntletSelectLayer::setupGauntlets @ 0x1002550d8
// > ShareCommentLayer::init @ 0x10026cf08
// > sub_1002E5208 @ 0x1002e58e4
// > ShareLevelLayer::init @ 0x10031357c
// > sub_1003138AC @ 0x1003139dc
// > sub_1003138AC @ 0x100313a18
// > GJAccountSettingsLayer::init @ 0x10037464c
// > GJMessagePopup::loadFromGJMessage @ 0x10037a064
// > UIPOptionsLayer::init @ 0x100380f5c
// > EndLevelLayer::customSetup @ 0x1003932a8
// > sub_1003E0E90 @ 0x1003e19c4
// > sub_1003E0E90 @ 0x1003e1a10
// > sub_10044F560 @ 0x10044f748
// > RateDemonLayer::init @ 0x1004a8cf8
// > RateDemonLayer::init @ 0x1004a8de0
// > sub_10051E954 @ 0x10051ecf4
// > sub_10051E954 @ 0x10051ed50
// > sub_10051E954 @ 0x10051efec
// > sub_10051E954 @ 0x10051f0d8
//
// 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:57:39 +0000
//
void __fastcall GameToolbox::alignItemsHorisontally(__int64 a1, float32x2_t *a2, char a3, float a4)
{
unsigned int *v5; // x9
__int64 v6; // x8
float v10; // s9
_QWORD *v11; // x23
unsigned __int64 v12; // x24
__int64 v13; // x22
double *v14; // x1
double v15; // d0
float v16; // s10
unsigned int *v17; // x9
__int64 v18; // x8
float v19; // s9
_QWORD *v20; // x22
unsigned __int64 v21; // x23
__int64 v22; // x21
double *v23; // x1
double v24; // d0
float v25; // s11
float v26; // s0
float32x2_t *v27; // x0
double v28; // d0
float v29; // s11
float32x2_t v30; // [xsp+0h] [xbp-70h] BYREF
__int64 v31; // [xsp+8h] [xbp-68h] BYREF
if ( a1 )
{
v5 = *(unsigned int **)(a1 + 56);
v6 = *v5;
if ( (_DWORD)v6 )
{
v10 = -a4;
v11 = *((_QWORD **)v5 + 2);
v12 = (unsigned __int64)&v11[v6 - 1];
do
{
v13 = *v11;
if ( !*v11 )
break;
v14 = (double *)&unk_1009F28D8;
if ( (a3 & 1) == 0 )
v14 = (double *)(*(__int64 (__fastcall **)(_QWORD, void *))(*(_QWORD *)v13 + 328LL))(*v11, &unk_1009F28D8);
v15 = sub_100026438(&v31, v14);
v16 = *(float *)&v31;
v10 = v10
+ (float)(a4 + (float)(v16 * (*(float (__fastcall **)(__int64, double))(*(_QWORD *)v13 + 136LL))(v13, v15)));
++v11;
}
while ( (unsigned __int64)v11 <= v12 );
v17 = *(unsigned int **)(a1 + 56);
v18 = *v17;
if ( (_DWORD)v18 )
{
v19 = v10 * -0.5;
v20 = *((_QWORD **)v17 + 2);
v21 = (unsigned __int64)&v20[v18 - 1];
do
{
v22 = *v20;
if ( !*v20 )
break;
v23 = (double *)&unk_1009F28D8;
if ( (a3 & 1) == 0 )
v23 = (double *)(*(__int64 (__fastcall **)(_QWORD, void *))(*(_QWORD *)v22 + 328LL))(*v20, &unk_1009F28D8);
v24 = sub_100026438(&v31, v23);
v25 = *(float *)&v31;
v26 = (*(float (__fastcall **)(__int64, double))(*(_QWORD *)v22 + 136LL))(v22, v24);
sub_1000262BC((float *)&v30, v19 + (float)((float)(v25 * v26) * 0.5), 0.0);
(*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v22 + 184LL))(v22, &v30);
v27 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v22 + 192LL))(v22);
*(float32x2_t *)&v28 = sub_100026318(a2, v27, &v30);
(*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v22 + 184LL))(v22, &v30, v28);
v29 = *(float *)&v31;
v19 = v19 + (float)(a4 + (float)(v29 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v22 + 136LL))(v22)));
++v20;
}
while ( (unsigned __int64)v20 <= v21 );
}
}
}
}