//
// GameToolbox::alignItemsVertically from 0x100043dd4 to 0x100043f64 (400 bytes)
//
// 1 xrefs:
// > AccountLoginLayer::init @ 0x1000837d4
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall GameToolbox::alignItemsVertically(cocos2d::CCArray *a1, float a2, cocos2d::CCPoint a3)
{
float32x2_t *v3; // x1
cocos2d::ccArray *data; // x9
__int64 num; // x8
float32x2_t *v7; // x19
float v9; // s9
cocos2d::CCObject **arr; // x22
unsigned __int64 v11; // x23
cocos2d::CCObject *v12; // x21
float v13; // s10
cocos2d::ccArray *v14; // x9
__int64 v15; // x8
float v16; // s9
cocos2d::CCObject **v17; // x21
unsigned __int64 v18; // x22
cocos2d::CCObject *v19; // x20
double *v20; // x0
double v21; // d0
float v22; // s11
__n128 v23; // q0
__n128 v24; // q1
float32x2_t *v25; // x0
double v26; // d0
float v27; // s11
float32x2_t v28; // [xsp+0h] [xbp-60h] BYREF
__int64 v29; // [xsp+8h] [xbp-58h] BYREF
if ( a1 )
{
data = a1->data;
num = data->num;
if ( (_DWORD)num )
{
v7 = v3;
v9 = -a2;
arr = data->arr;
v11 = (unsigned __int64)&arr[num - 1];
do
{
v12 = *arr;
if ( !*arr )
break;
v13 = *(float *)(((__int64 (__fastcall *)(cocos2d::CCObject *))v12->__vftable[3].setTag)(*arr) + 4);
v9 = v9
+ (float)(a2 + (float)(v13 * ((float (__fastcall *)(cocos2d::CCObject *))v12->__vftable[1].setTag)(v12)));
++arr;
}
while ( (unsigned __int64)arr <= v11 );
v14 = a1->data;
v15 = v14->num;
if ( (_DWORD)v15 )
{
v16 = v9 * -0.5;
v17 = v14->arr;
v18 = (unsigned __int64)&v17[v15 - 1];
do
{
v19 = *v17;
if ( !*v17 )
break;
v20 = (double *)((__int64 (__fastcall *)(cocos2d::CCObject *))v19->__vftable[3].setTag)(*v17);
v21 = sub_100022AFC(&v29, v20);
v22 = *((float *)&v29 + 1);
v23.n128_f64[0] = ((double (__fastcall *)(cocos2d::CCObject *, double))v19->__vftable[1].setTag)(v19, v21);
v24.n128_f32[0] = v16 + (float)((float)(v22 * v23.n128_f32[0]) * 0.5);
v23.n128_u32[0] = 0;
sub_100022980(v23, v24, &v28);
((void (__fastcall *)(cocos2d::CCObject *, float32x2_t *))v19->__vftable[2].isEqual)(v19, &v28);
v25 = (float32x2_t *)((__int64 (__fastcall *)(cocos2d::CCObject *))v19->__vftable[2].acceptVisitor)(v19);
*(float32x2_t *)&v26 = sub_1000229DC(v7, v25, &v28);
((void (__fastcall *)(cocos2d::CCObject *, float32x2_t *, double))v19->__vftable[2].isEqual)(v19, &v28, v26);
v27 = *((float *)&v29 + 1);
v16 = v16
+ (float)(a2 + (float)(v27 * ((float (__fastcall *)(cocos2d::CCObject *))v19->__vftable[1].setTag)(v19)));
++v17;
}
while ( (unsigned __int64)v17 <= v18 );
}
}
}
}