//
// GameLevelManager::onUpdateEditorSoundDescriptionCompleted from 0x845ae4 to 0x845c50 (364 bytes)
//
// 2 xrefs:
// > GameLevelManager::handleIt @ 0x85bc8c
// > ??> @ 0xb7790
//
// 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:55:20 +0000
//
__int64 __fastcall GameLevelManager::onUpdateEditorSoundDescriptionCompleted(__int64 a1, __int64 a2, __int64 a3)
{
unsigned __int64 v5; // x1
unsigned int v6; // w23
const char *v7; // x0
void (__fastcall ***v8)(_QWORD, _QWORD, __int64); // x0
__int64 v10; // x0
char *v11; // x24
__int64 v13[2]; // [xsp+50h] [xbp+50h] BYREF
char *v14; // [xsp+60h] [xbp+60h]
std::__tree::__erase_unique((__int64 **)(a1 + 720), a3);
v5 = *(_BYTE *)a3 >> 1;
if ( (*(_BYTE *)a3 & 1) != 0 )
v5 = *(_QWORD *)(a3 + 8);
if ( v5 > 8 )
{
std::string::basic_string(v13, a3, 8u, 0xFFFFFFFFFFFFFFFFLL);
if ( (v13[0] & 1) != 0 )
{
v11 = v14;
v6 = atoi(v14);
operator delete(v11);
}
else
{
v6 = atoi((const char *)v13 + 1);
}
}
else
{
v6 = 0;
}
v13[0] = 3222788;
v13[1] = 0;
v14 = nullptr;
if ( sub_7FEA60(a2, (__int64)v13) )
goto LABEL_12;
v7 = (const char *)(a2 + 1);
if ( (*(_BYTE *)a2 & 1) != 0 )
v7 = *(const char **)(a2 + 16);
if ( atoi(v7) < 0 )
{
LABEL_12:
v10 = *(_QWORD *)(a1 + 1360);
if ( v10 )
(*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)v10 + 8LL))(v10, v6, 73);
}
else
{
v8 = *(void (__fastcall ****)(_QWORD, _QWORD, __int64))(a1 + 1360);
if ( v8 )
(**v8)(v8, v6, 73);
}
return _stack_chk_guard;
}