//
// cocos2d::extension::CCControlButton::setPreferredSize from 0x180005c80 to 0x180005d58 (216 bytes)
//
// 6 xrefs:
// > ??> @ 0x180026698
// > ??> @ 0x18002a610
// > ??> @ 0x18002fdc8
// > ??> @ 0x18002fe00
// > ??> @ 0x180032408
// > ??> @ 0x18004b51c
//
// 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 12:15:36 +0000
//
__int64 __fastcall cocos2d::extension::CCControlButton::setPreferredSize(__int64 a1, float *a2)
{
__int64 v4; // rdi
__int64 v5; // rdi
__int64 i; // rsi
__int64 *v7; // rdi
__int64 v8; // rbx
__int64 v9; // rax
char v11; // [rsp+40h] [rbp+8h] BYREF
if ( *a2 == 0.0 && a2[1] == 0.0 )
{
*(_BYTE *)(a1 + 483) = 1;
}
else
{
v4 = *(_QWORD *)(a1 + 552);
*(_BYTE *)(a1 + 483) = 0;
if ( v4 )
{
v5 = *(_QWORD *)(v4 + 56);
if ( v5 )
{
for ( i = *(_QWORD *)(v5 + 288); ; i = *(_QWORD *)(i + 288) )
{
v7 = *(__int64 **)(v5 + 264);
v8 = *v7;
v9 = cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v11, (const struct cocos2d::CCSize *)a2);
(*(void (__fastcall **)(__int64 *, __int64))(v8 + 896))(v7, v9);
v5 = i;
if ( !i )
break;
}
}
}
}
cocos2d::CCSize::operator=(a1 + 504, a2);
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 1080LL))(a1);
}