//
// SetupSmartBlockLayer::onAllowFlipping from 0x1405ed470 to 0x1405ed537 (199 bytes)
//
// 3 xrefs:
// > SetupSmartBlockLayer::init @ 0x1405ecf2d
// > SetupSmartBlockLayer::init @ 0x1405ed01e
// > ??> @ 0x14092f084
//
// 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 11:35:04 +0000
//
// Hidden C++ exception states: #wind=1
void __fastcall SetupSmartBlockLayer::onAllowFlipping(__int64 a1, __int64 a2)
{
__int64 v4; // rbx
__int64 v5; // rbx
bool v6; // al
bool v7; // al
void *v8; // [rsp+38h] [rbp+10h]
if ( a2 )
{
v4 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v8 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v8);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v4 = *(_QWORD *)&qword_14090BFB0;
}
v5 = *(_QWORD *)(v4 + 1664);
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2) == 3 )
{
v6 = *(_BYTE *)(a1 + 674) == 0;
*(_BYTE *)(a1 + 674) = v6;
if ( v5 )
*(_BYTE *)(v5 + 128) = v6;
}
else
{
v7 = *(_BYTE *)(a1 + 675) == 0;
*(_BYTE *)(a1 + 675) = v7;
if ( v5 )
*(_BYTE *)(v5 + 129) = v7;
}
}
}