//
// PauseLayer::goEdit from 0x14037e8f0 to 0x14037e9b9 (201 bytes)
//
// 2 xrefs:
// > PauseLayer::onEdit @ 0x14037e8a2
// > ??> @ 0x1406d5dc8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=2
void PauseLayer::goEdit(PauseLayer *a1)
{
__int64 v2; // rax
cocos2d::CCTouchDispatcher *v3; // rax
__int64 v4; // rax
__int64 v5; // rdi
GJGameLoadingLayer *v6; // rax
GJGameLoadingLayer *v7; // rbx
cocos2d::CCObject *v8; // rcx
void *v9; // [rsp+30h] [rbp+8h]
if ( a1->m_forcePrioRegistered )
{
a1->m_forcePrioRegistered = 0;
v2 = cocos2d::CCDirector::sharedDirector(a1);
v3 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 144LL))(v2);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v3, a1);
}
v4 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v9 = operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v9);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v4 = qword_1406C2ED8;
}
v5 = *(_QWORD *)(v4 + 520);
v6 = GJGameLoadingLayer::transitionToLoadingLayer(*(GJGameLevel **)(v5 + 2168), 1);
v7 = v6;
if ( *(GJGameLoadingLayer **)(v5 + 14184) != v6 )
{
if ( v6 )
cocos2d::CCObject::retain(v6);
v8 = *(cocos2d::CCObject **)(v5 + 14184);
if ( v8 )
cocos2d::CCObject::release(v8);
*(_QWORD *)(v5 + 14184) = v7;
}
}