//
// GJSmartTemplate::rotateBlockType from 0x100413780 to 0x100413821 (161 bytes)
//
// 0 xrefs:
//
// 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:30:10 +0000
//
__int64 __fastcall GJSmartTemplate::rotateBlockType(unsigned int a1, unsigned int a2)
{
__int64 result; // rax
unsigned 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 && (int)a2 > 0 )
{
if ( ((3054198967LL * ((a2 - 1) >> 1)) & 0x2000000000LL) != 0 )
{
v3 = a2;
}
else
{
v3 = a2 - 90;
v4 = a1 - 50;
if ( a1 - 50 <= 0x1A )
{
v5 = 134185215;
if ( _bittest(&v5, v4) )
result = *(unsigned int *)&a3_4[4 * v4];
}
}
if ( a2 >= 0x5B )
{
v6 = v3 - 1;
v7 = 134185215;
do
{
v8 = result - 50;
if ( (unsigned int)(result - 50) <= 0x1A && _bittest(&v7, v8) )
result = *(unsigned int *)&a3_4[4 * v8];
v9 = result - 50;
if ( (unsigned int)(result - 50) <= 0x1A )
{
if ( _bittest(&v7, v9) )
result = *(unsigned int *)&a3_4[4 * v9];
}
v6 -= 180;
}
while ( v6 < 0xFFFFFFA5 );
}
}
return result;
}