//
// SongOptionsLayer::onClose from 0x97e43c to 0x97e57c (320 bytes)
//
// 4 xrefs:
// > SongOptionsLayer::keyBackClicked @ 0x97e580
// > ??> @ 0xdfde0
// > SongOptionsLayer::init @ 0x981a40
// > ??> @ 0x1546b90
//
// 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:49 +0000
//
__int64 __fastcall SongOptionsLayer::onClose(SongOptionsLayer *this, cocos2d::CCObject *a2)
{
float v3; // s8
__int64 v4; // x22
char *v5; // x0
float v6; // s0
char v7; // w0
__int64 v9[2]; // [xsp+40h] [xbp+40h] BYREF
char *v10; // [xsp+50h] [xbp+50h]
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 84) + 1160LL))(*((_QWORD *)this + 84), 0);
v3 = *(float *)((*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 83) + 24LL))(*((_QWORD *)this + 83)) + 344);
v4 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 83) + 24LL))(*((_QWORD *)this + 83));
CCTextInputNode::getString(*((CCTextInputNode **)this + 84), v9);
v5 = (char *)v9 + 1;
if ( (v9[0] & 1) != 0 )
v5 = v10;
v6 = atof(v5);
v7 = v9[0];
*(float *)(v4 + 344) = v6;
if ( (v7 & 1) != 0 )
operator delete(v10);
if ( v3 != *(float *)((*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 83) + 24LL))(*((_QWORD *)this + 83))
+ 344) )
*(_BYTE *)((*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 83) + 24LL))(*((_QWORD *)this + 83)) + 416) = 1;
(*(void (__fastcall **)(SongOptionsLayer *, _QWORD))(*(_QWORD *)this + 1072LL))(this, 0);
(*(void (__fastcall **)(SongOptionsLayer *, __int64))(*(_QWORD *)this + 528LL))(this, 1);
return _stack_chk_guard;
}