//
// GJSmartTemplate::flipBlockType from 0x9d4b1c to 0x9d4b84 (104 bytes)
//
// 10 xrefs:
// > GJSmartTemplate::flipKey @ 0x9d5128
// > GJSmartTemplate::flipKey @ 0x9d513c
// > GJSmartTemplate::flipKey @ 0x9d5150
// > GJSmartTemplate::flipKey @ 0x9d5164
// > GJSmartTemplate::flipKey @ 0x9d517c
// > GJSmartTemplate::flipKey @ 0x9d5194
// > GJSmartTemplate::flipKey @ 0x9d51ac
// > GJSmartTemplate::flipKey @ 0x9d51c8
// > GJSmartTemplate::flipKey @ 0x9d51e4
// > ??> @ 0x2dca8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
SmartBlockType GJSmartTemplate::flipBlockType(SmartBlockType a1, bool a2, bool a3)
{
SmartBlockType v3; // w3
_BOOL4 v4; // w19
v3 = a1;
v4 = a3;
if ( (unsigned int)(a1 - 48) <= 1 || a2 < (unsigned int)!a3 )
return v3;
if ( a2 )
{
v3 = GJSmartTemplate::flipBlockTypeX(a1);
if ( !v4 )
return v3;
}
else if ( !a3 )
{
return v3;
}
return GJSmartTemplate::flipBlockTypeY(v3);
}