//
// EditorSoundConfigInfoLayer::deleteEditorSoundFinished from 0xcce16c to 0xcce2d0 (356 bytes)
//
// 3 xrefs:
// > `non-virtual thunk to'EditorSoundConfigInfoLayer::deleteEditorSoundFinished @ 0xcce2d4
// > ??> @ 0xe97b8
// > ??> @ 0x14fee68
//
// 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 13:06:25 +0000
//
__int64 __fastcall EditorSoundConfigInfoLayer::deleteEditorSoundFinished(EditorSoundConfigInfoLayer *this, int a2)
{
EditorSFXManager *v4; // x0
EditorSFXManager *v6; // x0
GJEditorSoundConfig *MyConfigForSoundID; // x0
GJEditorSoundConfig *v8; // x22
GJEditorSoundConfig *v9; // x0
EditorSFXManager *v10; // x0
cocos2d::CCArray *v11; // x0
__int64 v12; // x0
cocos2d::CCTouchDispatcher *v13; // x0
EditorSoundBrowserLayer *v14; // x0
__int64 v15; // x0
__int64 v16[2]; // [xsp+30h] [xbp+30h] BYREF
void *v17; // [xsp+40h] [xbp+40h]
v4 = *((EditorSFXManager **)this + 136);
if ( !v4 || (v4 = (EditorSFXManager *)*((unsigned int *)v4 + 79), (_DWORD)v4 == a2) )
{
v6 = (EditorSFXManager *)EditorSFXManager::sharedState(v4);
MyConfigForSoundID = (GJEditorSoundConfig *)EditorSFXManager::getMyConfigForSoundID(v6, a2);
v8 = MyConfigForSoundID;
if ( MyConfigForSoundID )
GJEditorSoundConfig::clearServerState(MyConfigForSoundID);
v9 = *((GJEditorSoundConfig **)this + 136);
if ( v8 != v9 && v9 && *((_BYTE *)v9 + 324) )
v9 = (GJEditorSoundConfig *)GJEditorSoundConfig::clearServerState(v9);
v10 = (EditorSFXManager *)EditorSFXManager::sharedState(v9);
v11 = EditorSFXManager::removeFavoriteConfig(v10, a2);
v12 = cocos2d::CCDirector::sharedDirector(v11);
v13 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 160LL))(v12);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v13, this);
v14 = *((EditorSoundBrowserLayer **)this + 138);
if ( v14 )
EditorSoundBrowserLayer::onConfigListChanged(v14);
v16[0] = 0;
v16[1] = 0;
v17 = nullptr;
std::string::__init(v16, "Sound pack removed from the server.", 0x23u);
v15 = FLAlertLayer::create(0, (cocos2d::CCLabelBMFont *)"Deleted", (char *)v16, (ButtonSprite *)"OK", nullptr);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v15 + 1312LL))(v15);
if ( (v16[0] & 1) != 0 )
operator delete(v17);
(*(void (__fastcall **)(EditorSoundConfigInfoLayer *, _QWORD))(*(_QWORD *)this + 1368LL))(this, 0);
}
return _stack_chk_guard;
}