//
// sub_1005FE8E4 from 0x1005fe8e4 to 0x1005fe930 (76 bytes)
//
// 0 xrefs:
//
// 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 11:09:56 +0000
//
__int64 __fastcall sub_1005FE8E4(unsigned int *a1)
{
__int64 v1; // x9
unsigned __int64 *v2; // x8
unsigned __int64 *v3; // x8
unsigned __int64 v4; // x10
unsigned __int64 v5; // t1
__int64 v6; // x9
unsigned __int64 v7; // x11
bool v8; // cf
bool v9; // zf
v1 = *a1;
if ( (unsigned int)v1 < 2 )
return 1;
v2 = *((unsigned __int64 **)a1 + 1);
v5 = *v2;
v3 = v2 + 3;
v4 = v5;
v6 = v1 - 1;
while ( 1 )
{
v7 = *v3;
if ( *v3 == -1 )
{
v8 = 1;
v9 = 0;
}
else
{
v8 = v7 >= v4;
v9 = v7 == v4;
}
if ( v9 || !v8 )
break;
v3 += 3;
v4 = v7;
if ( !--v6 )
return 1;
}
return 0;
}