//
// GJSmartTemplate::rotateBlockType from 0x100426b10 to 0x100426bb1 (161 bytes)
//
// 0 xrefs:
//
// 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 __fastcall GJSmartTemplate::rotateBlockType(SmartBlockType a1, int a2)
{
SmartBlockType result; // eax
int v3; // ecx
unsigned int v4; // edx
int v5; // edi
unsigned int v6; // ecx
int v7; // edx
unsigned int v8; // edi
unsigned int v9; // edi
result = a1;
if ( (a1 & 0xFFFFFFFE) != 48 && a2 > 0 )
{
if ( ((3054198967LL * ((unsigned int)(a2 - 1) >> 1)) & 0x2000000000LL) != 0 )
{
v3 = a2;
}
else
{
v3 = a2 - 90;
v4 = a1 - 50;
if ( (unsigned int)(a1 - 50) <= 0x1A )
{
v5 = 134185215;
if ( _bittest(&v5, v4) )
result = *(_DWORD *)&a3_3[4 * v4];
}
}
if ( (unsigned int)a2 >= 0x5B )
{
v6 = v3 - 1;
v7 = 134185215;
do
{
v8 = result - 50;
if ( (unsigned int)(result - 50) <= 0x1A && _bittest(&v7, v8) )
result = *(_DWORD *)&a3_3[4 * v8];
v9 = result - 50;
if ( (unsigned int)(result - 50) <= 0x1A )
{
if ( _bittest(&v7, v9) )
result = *(_DWORD *)&a3_3[4 * v9];
}
v6 -= 180;
}
while ( v6 < 0xFFFFFFA5 );
}
}
return result;
}