//
// GJBaseGameLayer::removeTemporaryParticles from 0x1001391f0 to 0x1001392b4 (196 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::resetLevelVariables @ 0x10013863d
//
// 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::removeTemporaryParticles(__int64 a1)
{
__int64 v1; // rax
__int64 result; // rax
unsigned int v3; // r15d
_DWORD *v4; // r13
int v5[11]; // [rsp+0h] [rbp-2Ch] BYREF
v5[0] = HIDWORD(v1);
result = sub_1007FEF90(*(_QWORD *)(a1 + 12352));
if ( (_DWORD)result )
{
v3 = 0;
do
{
while ( 1 )
{
v4 = (_DWORD *)sub_1007FEFE0(*(_QWORD *)(a1 + 12352), v3);
if ( !(*(unsigned __int8 (__fastcall **)(_DWORD *))(*(_QWORD *)v4 + 1576LL))(v4) )
break;
(*(void (__fastcall **)(_DWORD *))(*(_QWORD *)v4 + 536LL))(v4);
v5[0] = v4[2];
sub_10001C120((__int64 *)(a1 + 12360), v5);
sub_1007FF1A0(*(_QWORD *)(a1 + 12352), v3);
result = sub_1007FEF90(*(_QWORD *)(a1 + 12352));
if ( v3 >= (unsigned int)result )
return result;
}
++v3;
result = sub_1007FEF90(*(_QWORD *)(a1 + 12352));
}
while ( v3 < (unsigned int)result );
}
return result;
}