//
// cocos2d::CCLayerMultiplex::switchToAndReleaseMe from 0x7d843e to 0x7d8496 (88 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:00:41 +0000
//
int __fastcall cocos2d::CCLayerMultiplex::switchToAndReleaseMe(cocos2d::CCLayerMultiplex *this, unsigned int a2)
{
void (__fastcall *v4)(cocos2d::CCLayerMultiplex *, int, int); // r6
int v5; // r0
cocos2d::CCArray *v6; // r3
int (__fastcall *v7)(cocos2d::CCLayerMultiplex *, int); // r6
int v8; // r0
cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 80));
v4 = *(void (__fastcall **)(cocos2d::CCLayerMultiplex *, int, int))(*(_DWORD *)this + 276);
v5 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 80), *((_DWORD *)this + 79));
v4(this, v5, 1);
cocos2d::CCArray::replaceObjectAtIndex(*((cocos2d::CCArray **)this + 80), *((_DWORD *)this + 79), nullptr, 1);
v6 = *(cocos2d::CCArray **)this;
*((_DWORD *)this + 79) = a2;
v7 = *((int (__fastcall **)(cocos2d::CCLayerMultiplex *, int))v6 + 57);
v8 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 80), a2);
return v7(this, v8);
}