//
// cocos2d::CCTurnOffTiles::shuffle from 0x10089c580 to 0x10089c5cb (75 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:37:09 +0000
//
__int64 __fastcall cocos2d::CCTurnOffTiles::shuffle(__int64 a1, __int64 a2, int a3)
{
__int64 result; // rax
int v4; // ebx
__int64 v5; // r15
int v6; // eax
__int64 v7; // rdx
result = (unsigned int)(a3 - 1);
if ( a3 - 1 >= 0 )
{
v4 = a3;
v5 = (unsigned int)result;
do
{
v6 = rand();
v7 = (unsigned int)(v6 >> 31);
LODWORD(v7) = v6 % v4;
result = *(unsigned int *)(a2 + 4 * v5);
*(_DWORD *)(a2 + 4 * v5) = *(_DWORD *)(a2 + 4 * v7);
*(_DWORD *)(a2 + 4 * v7) = result;
--v4;
}
while ( v5-- != 0 );
}
return result;
}