//
// CustomizeObjectLayer::recreateLayer from 0x9871a0 to 0x987244 (164 bytes)
//
// 2 xrefs:
// > CustomizeObjectSettingsPopup::onClose @ 0x987298
// > ??> @ 0x79d20
//
// 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 12:57:54 +0000
//
__int64 __fastcall CustomizeObjectLayer::recreateLayer(CustomizeObjectLayer **this)
{
cocos2d::CCObject *v1; // x21
CustomizeObjectLayer *v2; // x20
cocos2d::CCObject *v3; // x19
__int64 v4; // x0
cocos2d::CCTouchDispatcher *v5; // x0
cocos2d::CCArray *v6; // x2
__int64 v7; // x0
__int64 result; // x0
v1 = (cocos2d::CCObject *)this;
v2 = *(this + 86);
v3 = *(this + 87);
if ( v2 )
this = (CustomizeObjectLayer **)cocos2d::CCObject::retain(*(this + 86));
if ( v3 )
this = (CustomizeObjectLayer **)cocos2d::CCObject::retain(v3);
v4 = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this);
v5 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 160LL))(v4);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v5, v1);
CustomizeObjectLayer::onClose(v1, nullptr);
v7 = CustomizeObjectLayer::create(v2, v3, v6);
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 1312LL))(v7);
if ( v2 )
result = cocos2d::CCObject::release(v2);
if ( v3 )
return cocos2d::CCObject::release(v3);
return result;
}