//
// cocos2d::CCMenu::giveMenuTouchPriority from 0x100270820 to 0x1002708a0 (128 bytes)
//
// 3 xrefs:
// > sub_10022B0A0 @ 0x10022b1f4
// > sub_1002707E8 @ 0x10027081c
// > sub_1004F7820 @ 0x1004f7994
//
// This function is hookable on this platform (idp: arm, 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:01:46 +0000
//
__int64 __fastcall cocos2d::CCMenu::giveMenuTouchPriority(__int64 a1, __int64 a2)
{
__int64 v4; // x0
if ( *(_DWORD *)(a1 + 428) == 1 )
{
v4 = *(_QWORD *)(a1 + 432);
if ( v4 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v4 + 1024LL))(v4);
*(_QWORD *)(a1 + 432) = 0;
}
*(_DWORD *)(a1 + 428) = 0;
}
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1000LL))(a1, 0);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1024LL))(a1, a2);
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1000LL))(a1, 1);
}