//
// MoreOptionsLayer::onClose from 0x7c76f4 to 0x7c77fc (264 bytes)
//
// 4 xrefs:
// > MoreOptionsLayer::keyBackClicked @ 0x7c7800
// > ??> @ 0x36588
// > MoreOptionsLayer::init @ 0x7cbcec
// > ??> @ 0x1229a88
//
// 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
//
void MoreOptionsLayer::onClose(MoreOptionsLayer *a1, cocos2d::CCObject *a2)
{
FMODAudioEngine *v3; // x22
char *v4; // x21
char *v5; // x0
unsigned int *v6; // x21
int v7; // w1
char *v8; // [xsp+40h] [xbp+40h] BYREF
a1->m_offsetInput->onClickTrackNode(a1->m_offsetInput, 0);
v3 = FMODAudioEngine::sharedEngine();
CCTextInputNode::getString(a1->m_offsetInput, (__int64)&v8);
v4 = v8;
v3->m_musicOffset = atoi(v8);
v5 = v4 - 24;
if ( v4 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v6 = (unsigned int *)(v4 - 8);
do
v7 = __ldaxr(v6);
while ( __stlxr(v7 - 1, v6) );
}
else
{
v7 = *((_DWORD *)v4 - 2);
*((_DWORD *)v4 - 2) = v7 - 1;
}
if ( v7 <= 0 )
operator delete(v5);
}
a1->setKeypadEnabled(a1, 0);
a1->removeFromParentAndCleanup(a1, 1);
}