//
// cocos2d::CCTurnOffTiles::shuffle from 0x18003b3d0 to 0x18003b422 (82 bytes)
//
// 2 xrefs:
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b0f00
//
// 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
//
// Alternative name is '?shuffle@CCShuffleTiles@cocos2d@@QEAAXPEAII@Z'
void __fastcall cocos2d::CCTurnOffTiles::shuffle(cocos2d::CCTurnOffTiles *this, unsigned int *a2, int a3)
{
int v3; // ebx
__int64 i; // rdi
int v6; // eax
unsigned int v7; // r8d
__int64 v8; // rdx
v3 = a3;
for ( i = a3 - 1; i >= 0; a2[v8] = v7 )
{
v6 = rand();
v7 = a2[i];
v8 = (unsigned int)(v6 >> 31);
LODWORD(v8) = v6 % v3;
a2[i] = a2[v8];
--v3;
--i;
}
}