//
// GJLevelList::orderForLevel from 0x807264 to 0x8072b0 (76 bytes)
//
// 3 xrefs:
// > GJLevelList::reorderLevelStep @ 0x857b24
// > LevelListLayer::cellPerformedAction @ 0xbaab7c
// > ??> @ 0xacc90
//
// This function is hookable on this platform (idp: arm, 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:54:46 +0000
//
__int64 __fastcall GJLevelList::orderForLevel(GJLevelList *this, int a2)
{
int *v2; // x2
int *v3; // x4
int *v4; // x2
__int64 result; // x0
int v6; // t1
v2 = *((int **)this + 40);
v3 = *((int **)this + 41);
if ( v2 == v3 || *v2 == a2 )
return 0;
v4 = v2 + 1;
LODWORD(result) = 0;
do
{
result = (unsigned int)(result + 1);
if ( v3 == v4 )
break;
v6 = *v4++;
}
while ( v6 != a2 );
return result;
}