//
// cocos2d::CCLayerMultiplex::switchToAndReleaseMe from 0x1004ade80 to 0x1004adf04 (132 bytes)
//
// 0 xrefs:
//
// 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:30:58 +0000
//
__int64 __fastcall cocos2d::CCLayerMultiplex::switchToAndReleaseMe(__int64 a1, unsigned int a2)
{
__int64 v3; // rax
__int64 v4; // rax
sub_1007FEF90(*(_QWORD *)(a1 + 408));
v3 = sub_1007FEFE0(*(_QWORD *)(a1 + 408), *(unsigned int *)(a1 + 404));
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 552LL))(a1, v3, 1);
sub_1007FF250(*(_QWORD *)(a1 + 408), *(unsigned int *)(a1 + 404), 0, 1);
*(_DWORD *)(a1 + 404) = a2;
v4 = sub_1007FEFE0(*(_QWORD *)(a1 + 408), a2);
return (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 456LL))(a1, v4);
}