//
// GJBaseGameLayer::removeMiddleground from 0x999790 to 0x9997c8 (56 bytes)
//
// 3 xrefs:
// > GJBaseGameLayer::createMiddleground @ 0x9997e4
// > LevelSettingsLayer::selectArtClosed @ 0xb61bdc
// > ??> @ 0xc25d8
//
// 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:58:03 +0000
//
__int64 __fastcall GJBaseGameLayer::removeMiddleground(__int64 this)
{
__int64 v1; // x1
__int64 v2; // x19
v1 = *(_QWORD *)(this + 3976);
if ( v1 )
{
v2 = this;
this = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v1 + 520LL))(*(_QWORD *)(this + 3976));
*(_QWORD *)(v2 + 3976) = 0;
}
return this;
}