//
// SongOptionsLayer::onClose from 0x100145808 to 0x100145918 (272 bytes)
//
// 3 xrefs:
// > SongOptionsLayer::keyBackClicked @ 0x100145b18
// > sub_100145B1C @ 0x100145b20
// > SongOptionsLayer::init @ 0x100145230
//
// 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 __fastcall SongOptionsLayer::onClose(SongOptionsLayer *a1, cocos2d::CCObject *a2)
{
float v3; // s8
__int64 v4; // x20
float v5; // s0
char *v6; // x21
float v7; // s0
char *v8[2]; // [xsp+8h] [xbp-48h] BYREF
char v9; // [xsp+1Fh] [xbp-31h]
((void (__fastcall *)(CCTextInputNode *, _QWORD))a1->m_offsetInput->onClickTrackNode)(a1->m_offsetInput, 0);
v3 = *(float *)(((__int64 (__fastcall *)(CustomSongDelegate *))a1->m_delegate->getLevelSettings)(a1->m_delegate) + 344);
v4 = ((__int64 (__fastcall *)(CustomSongDelegate *))a1->m_delegate->getLevelSettings)(a1->m_delegate);
CCTextInputNode::getString(v8, a1->m_offsetInput);
if ( v9 < 0 )
{
v6 = v8[0];
v7 = atof(v8[0]);
*(float *)(v4 + 344) = v7;
operator delete(v6);
}
else
{
v5 = atof((const char *)v8);
*(float *)(v4 + 344) = v5;
}
if ( v3 != *(float *)(((__int64 (__fastcall *)(CustomSongDelegate *))a1->m_delegate->getLevelSettings)(a1->m_delegate)
+ 344) )
*(_BYTE *)(((__int64 (__fastcall *)(CustomSongDelegate *))a1->m_delegate->getLevelSettings)(a1->m_delegate) + 416) = 1;
((void (__fastcall *)(SongOptionsLayer *, _QWORD))a1->setKeypadEnabled)(a1, 0);
((void (__fastcall *)(SongOptionsLayer *, __int64))a1->removeFromParentAndCleanup)(a1, 1);
}