//
// GameToolbox::alignItemsVertically from 0x2ebbac to 0x2ebcea (318 bytes)
//
// 1 xrefs:
// > AccountLoginLayer::init @ 0x469aa0
//
// 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 GameToolbox::alignItemsVertically(cocos2d::CCArray *a1, float a2, cocos2d::CCPoint a3)
{
float x; // r6
float v6; // s16
cocos2d::ccArray *data; // r3
cocos2d::CCObject **arr; // r7
cocos2d::CCObject **v9; // r4
int v10; // r8
int v11; // t1
float v12; // s17
cocos2d::ccArray *v13; // r3
int v14; // r4
cocos2d::CCObject **v15; // r3
unsigned int v16; // r7
cocos2d::CCObject **v17; // r8
float i; // s16
int v19; // r4
int v20; // t1
const cocos2d::CCSize *v21; // r0
float height; // s19
void (__fastcall *v23)(int, cocos2d::CCPoint *); // r11
float v24; // r0
void (__fastcall *v25)(int, cocos2d::CCPoint *); // r11
int v26; // r0
float v27; // s19
cocos2d::CCSize v28; // [sp+4h] [bp-18h] BYREF
cocos2d::CCPoint v29; // [sp+Ch] [bp-10h] BYREF
x = a3.x;
v6 = -a2;
if ( a1 )
{
data = a1->data;
if ( data->num )
{
arr = data->arr;
v9 = &arr[data->num] + 0x3FFFFFFF;
while ( arr <= v9 )
{
v11 = (int)*arr++;
v10 = v11;
if ( !v11 )
break;
v12 = *(float *)((*(int (__fastcall **)(int))(*(_DWORD *)v10 + 156))(v10) + 4);
v6 = v6 + (float)(a2 + (float)(v12 * (*(float (__fastcall **)(int))(*(_DWORD *)v10 + 76))(v10)));
}
}
v13 = a1->data;
if ( v13->num )
{
v14 = v13->num + 0x40000000;
v15 = v13->arr;
v16 = (unsigned int)&v15[v14 - 1];
v17 = v15;
for ( i = -(float)(v6 * 0.5);
(unsigned int)v17 <= v16;
i = i + (float)(a2 + (float)(v27 * (*(float (__fastcall **)(int))(*(_DWORD *)v19 + 76))(v19))) )
{
v20 = (int)*v17++;
v19 = v20;
if ( !v20 )
break;
v21 = (const cocos2d::CCSize *)(*(int (__fastcall **)(int))(*(_DWORD *)v19 + 156))(v19);
cocos2d::CCSize::CCSize(&v28, v21);
height = v28.height;
v23 = *(void (__fastcall **)(int, cocos2d::CCPoint *))(*(_DWORD *)v19 + 92);
v24 = (*(float (__fastcall **)(int))(*(_DWORD *)v19 + 76))(v19);
cocos2d::CCPoint::CCPoint(&v29, 0.0, i + (float)((float)(height * v24) * 0.5));
v23(v19, &v29);
v25 = *(void (__fastcall **)(int, cocos2d::CCPoint *))(*(_DWORD *)v19 + 92);
v26 = (*(int (__fastcall **)(int))(*(_DWORD *)v19 + 96))(v19);
cocos2d::CCPoint::operator+(&v29, LODWORD(x), v26);
v25(v19, &v29);
v27 = v28.height;
}
}
}
}