//
// GJBaseGameLayer::clearActivatedAudioTriggers from 0x1001390e0 to 0x1001391e7 (263 bytes)
//
// 4 xrefs:
// > LevelEditorLayer::updateGameObjects @ 0x1000ad8c5
// > LevelEditorLayer::resetPlayback @ 0x1000c23c3
// > LevelEditorLayer::onPlaytest @ 0x1000c6197
// > GJBaseGameLayer::resetLevelVariables @ 0x100138635
//
// This function is hookable on this platform (idp: pc, 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:24:52 +0000
//
__int64 __fastcall GJBaseGameLayer::clearActivatedAudioTriggers(_QWORD *a1)
{
_QWORD *v2; // rdi
_QWORD *v3; // r14
__int64 v4; // rsi
_QWORD *v5; // r14
__int64 v6; // rsi
__int64 result; // rax
_QWORD *v8; // r15
void *v9; // rdi
if ( a1[227] )
{
v2 = (_QWORD *)a1[226];
if ( v2 )
{
do
{
v3 = (_QWORD *)*v2;
operator delete(v2);
v2 = v3;
}
while ( v3 );
}
a1[226] = 0;
v4 = a1[225];
if ( v4 )
__bzero(a1[224], 8 * v4);
a1[227] = 0;
}
if ( a1[232] )
{
v5 = (_QWORD *)a1[231];
if ( v5 )
{
do
{
v8 = (_QWORD *)*v5;
v9 = (void *)v5[3];
if ( v9 )
{
v5[4] = v9;
operator delete(v9);
}
operator delete(v5);
v5 = v8;
}
while ( v8 );
}
a1[231] = 0;
v6 = a1[230];
if ( v6 )
__bzero(a1[229], 8 * v6);
a1[232] = 0;
}
result = a1[234];
a1[235] = result;
return result;
}