//
// GameToolbox::alignItemsVertically from 0x1004ee600 to 0x1004ee7b2 (434 bytes)
//
// 1 xrefs:
// > AccountLoginLayer::init @ 0x10049998c
//
// 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
//
// local variable allocation has failed, the output may be wrong!
void __fastcall GameToolbox::alignItemsVertically(cocos2d::CCArray *a1, float a2, cocos2d::CCPoint a3)
{
unsigned __int64 *v3; // rsi
cocos2d::ccArray *data; // rax
__int64 num; // rcx
unsigned __int64 *v6; // rbx
__m128 v7; // xmm0
cocos2d::CCObject **arr; // r12
unsigned __int64 v9; // r13
cocos2d::CCObject *v10; // r15
__int64 v11; // rax
cocos2d::ccArray *v12; // rax
__int64 v13; // rcx
__m128 v14; // xmm0
cocos2d::CCObject **v15; // r13
cocos2d::CCObject **v16; // r14
cocos2d::CCObject *v17; // r12
_QWORD *v18; // rsi
float v19; // xmm0_4
unsigned __int64 *v20; // rax
double v21; // [rsp+8h] [rbp-68h] BYREF
__m128 v22; // [rsp+10h] [rbp-60h]
__int64 v23; // [rsp+28h] [rbp-48h] BYREF
__m128 v24; // [rsp+30h] [rbp-40h]
float v25; // [rsp+44h] [rbp-2Ch]
v22 = *(__m128 *)&a2;
if ( a1 )
{
data = a1->data;
num = data->num;
if ( data->num )
{
v6 = v3;
v7 = _mm_xor_ps((__m128)xmmword_1008150B0, v22);
v24 = v7;
arr = data->arr;
v9 = (unsigned __int64)&arr[num - 1];
do
{
v10 = *arr;
if ( !*arr )
break;
v11 = ((__int64 (__fastcall *)(cocos2d::CCObject *, double, double))v10->__vftable[3].setTag)(
*arr,
*(double *)v7.i64,
*(double *)&a3);
v7.i64[0] = *(unsigned int *)(v11 + 4);
v25 = *(float *)(v11 + 4);
v7.f32[0] = (float)(((float (__fastcall *)(cocos2d::CCObject *))v10->__vftable[1].setTag)(v10) * v25)
+ v22.f32[0];
*(__m128 *)&a3.x = v24;
a3.x = v24.f32[0] + v7.f32[0];
v24 = *(__m128 *)&a3.x;
++arr;
}
while ( (unsigned __int64)arr <= v9 );
v12 = a1->data;
v13 = v12->num;
if ( v12->num )
{
v14 = v24;
v14.f32[0] = v24.f32[0] * -0.5;
v24 = v14;
v15 = v12->arr;
v16 = &v15[v13 - 1];
do
{
v17 = *v15;
if ( !*v15 )
break;
v18 = (_QWORD *)((__int64 (__fastcall *)(cocos2d::CCObject *, double, double))v17->__vftable[3].setTag)(
*v15,
*(double *)v14.i64,
*(double *)&a3);
sub_10028CFC0(&v23, v18);
v25 = *((float *)&v23 + 1);
v19 = ((float (__fastcall *)(cocos2d::CCObject *))v17->__vftable[1].setTag)(v17);
sub_10028CBE0((float *)&v21, 0.0, (float)((float)(v25 * v19) * 0.5) + v24.f32[0]);
((void (__fastcall *)(cocos2d::CCObject *, double *))v17->__vftable[2].isEqual)(v17, &v21);
v20 = (unsigned __int64 *)((__int64 (__fastcall *)(cocos2d::CCObject *))v17->__vftable[2].acceptVisitor)(v17);
sub_10028CCE0(&v21, v6, v20);
((void (__fastcall *)(cocos2d::CCObject *, double *))v17->__vftable[2].isEqual)(v17, &v21);
v14.i64[0] = HIDWORD(v23);
v25 = *((float *)&v23 + 1);
v14.f32[0] = ((float (__fastcall *)(cocos2d::CCObject *))v17->__vftable[1].setTag)(v17);
v14.f32[0] = (float)(v14.f32[0] * v25) + v22.f32[0];
*(__m128 *)&a3.x = v24;
a3.x = v24.f32[0] + v14.f32[0];
v24 = *(__m128 *)&a3.x;
++v15;
}
while ( v15 <= v16 );
}
}
}
}