//
// cocos2d::extension::CCControlSwitch::create from 0x18000c660 to 0x18000c707 (167 bytes)
//
// 2 xrefs:
// > ??> @ 0x180032408
// > ??> @ 0x18004bc54
//
// 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:38 +0000
//
// Hidden C++ exception states: #wind=1
struct cocos2d::extension::CCControlSwitch *__fastcall cocos2d::extension::CCControlSwitch::create(
struct cocos2d::CCSprite *a1,
struct cocos2d::CCSprite *a2,
struct cocos2d::CCSprite *a3,
struct cocos2d::CCSprite *a4)
{
cocos2d::extension::CCControlSwitch *v8; // rax
cocos2d::CCObject *v9; // rbx
cocos2d::extension::CCControlSwitch *v11; // [rsp+40h] [rbp-18h]
v11 = (cocos2d::extension::CCControlSwitch *)sub_18001F040(0x1E8u);
v8 = cocos2d::extension::CCControlSwitch::CCControlSwitch(v11);
v9 = v8;
if ( v8 )
{
if ( cocos2d::extension::CCControlSwitch::initWithMaskSprite(v8, a1, a2, a3, a4, nullptr, nullptr) )
{
cocos2d::CCObject::autorelease(v9);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v9 + 8LL))(v9, 1);
return nullptr;
}
}
return v9;
}