//
// cocos2d::CCMenu::alignItemsVerticallyWithPadding from 0x18005acb0 to 0x18005aecb (539 bytes)
//
// 3 xrefs:
// > cocos2d::CCMenu::alignItemsVertically @ 0x18005aca8
// > ??> @ 0x18014cf68
// > ??> @ 0x1801bcd0c
//
// This function is hookable on this platform (idp: pc, 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 11:21:48 +0000
//
void __fastcall cocos2d::CCMenu::alignItemsVerticallyWithPadding(cocos2d::CCMenu *this, float a2)
{
cocos2d::CCArray *v3; // rcx
float v4; // xmm7_4
__int64 v5; // rax
unsigned int *v6; // rbx
__int64 v7; // rax
_QWORD *v8; // rbx
_QWORD *i; // rsi
__int64 v10; // rax
__int64 v11; // rdi
float v12; // xmm6_4
cocos2d::CCArray *v13; // rcx
float v14; // xmm7_4
__int64 v15; // rax
unsigned int *v16; // rdi
__int64 v17; // rax
_QWORD *v18; // rdi
_QWORD *j; // rbp
__int64 v20; // rax
__int64 v21; // rsi
__int64 v22; // rbx
float v23; // xmm6_4
float v24; // xmm0_4
float *v25; // rax
float v26; // xmm6_4
float v27; // [rsp+90h] [rbp+8h] BYREF
v3 = *((cocos2d::CCArray **)this + 26);
v4 = -a2;
if ( v3 )
{
if ( (unsigned int)cocos2d::CCArray::count(v3) )
{
v5 = *((_QWORD *)this + 26);
if ( v5 )
{
v6 = *(unsigned int **)(v5 + 56);
v7 = *v6;
if ( (_DWORD)v7 )
{
v8 = *((_QWORD **)v6 + 2);
for ( i = &v8[v7 - 1]; v8 <= i; ++v8 )
{
if ( !*v8 )
break;
v10 = _RTDynamicCast(
*v8,
0,
&cocos2d::CCObject `RTTI Type Descriptor',
&cocos2d::CCNode `RTTI Type Descriptor',
0);
v11 = v10;
if ( v10 )
{
v12 = *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 320LL))(v10) + 4);
v4 = v4 + (float)((float)((*(float (__fastcall **)(__int64))(*(_QWORD *)v11 + 144LL))(v11) * v12) + a2);
}
}
}
}
}
}
v13 = *((cocos2d::CCArray **)this + 26);
v14 = v4 * 0.5;
if ( v13 )
{
if ( (unsigned int)cocos2d::CCArray::count(v13) )
{
v15 = *((_QWORD *)this + 26);
if ( v15 )
{
v16 = *(unsigned int **)(v15 + 56);
v17 = *v16;
if ( (_DWORD)v17 )
{
v18 = *((_QWORD **)v16 + 2);
for ( j = &v18[v17 - 1]; v18 <= j; ++v18 )
{
if ( !*v18 )
break;
v20 = _RTDynamicCast(
*v18,
0,
&cocos2d::CCObject `RTTI Type Descriptor',
&cocos2d::CCNode `RTTI Type Descriptor',
0);
v21 = v20;
if ( v20 )
{
v22 = *(_QWORD *)v20;
v23 = *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v20 + 320LL))(v20) + 4);
v24 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v21 + 144LL))(v21);
v25 = kmVec2Fill(&v27, 0.0, v14 - (float)((float)(v24 * v23) * 0.5));
(*(void (__fastcall **)(__int64, float *))(v22 + 184))(v21, v25);
v26 = *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v21 + 320LL))(v21) + 4);
v14 = v14 - (float)((float)((*(float (__fastcall **)(__int64))(*(_QWORD *)v21 + 144LL))(v21) * v26) + a2);
}
}
}
}
}
}
}