//
// PlayLayer::removeAllObjects from 0x1000806d0 to 0x1000807e6 (278 bytes)
//
// 2 xrefs:
// > PlayLayer::setupHasCompleted @ 0x10007bef1
// > EndLevelLayer::onEdit @ 0x1004bb07f
//
// 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:20:02 +0000
//
__int64 __fastcall PlayLayer::removeAllObjects(__int64 a1)
{
__int64 v2; // rdi
unsigned int *v3; // rax
_QWORD *v4; // r15
unsigned __int64 v5; // r12
__int64 v6; // r14
*(_BYTE *)(a1 + 14184) = 0;
UILayer::disableMenu(*(_QWORD *)(a1 + 13288));
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 3256) + 1312LL))(*(_QWORD *)(a1 + 3256), 1);
PlayerObject::deactivateParticle(*(_QWORD *)(a1 + 3256));
PlayerObject::deactivateStreak(*(_QWORD *)(a1 + 3256), 1);
PlayerObject::toggleGhostEffect(*(_QWORD *)(a1 + 3256), 0);
if ( *(_BYTE *)(a1 + 1010) == 1 )
{
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 3264) + 1312LL))(*(_QWORD *)(a1 + 3264), 1);
PlayerObject::deactivateParticle(*(_QWORD *)(a1 + 3264));
PlayerObject::deactivateStreak(*(_QWORD *)(a1 + 3264), 1);
PlayerObject::toggleGhostEffect(*(_QWORD *)(a1 + 3264), 0);
}
v2 = *(_QWORD *)(a1 + 3280);
if ( !v2 )
{
v2 = 0;
return sub_1007FF190(v2);
}
v3 = *(unsigned int **)(v2 + 56);
if ( !*v3 )
return sub_1007FF190(v2);
v4 = *((_QWORD **)v3 + 2);
v5 = (unsigned __int64)&v4[*v3 - 1];
do
{
v6 = *v4;
if ( !*v4 )
break;
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)v6 + 1312LL))(*v4, 1);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 736LL))(v6);
++v4;
}
while ( (unsigned __int64)v4 <= v5 );
return sub_1007FF190(*(_QWORD *)(a1 + 3280));
}